diff --git a/configs/beaglebone b/configs/beaglebone index e6cf0a22..4354d1ce 100644 --- a/configs/beaglebone +++ b/configs/beaglebone @@ -126,10 +126,11 @@ CONFIG_MM_OWNER=y CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE="" CONFIG_RD_GZIP=y -# CONFIG_RD_BZIP2 is not set -# CONFIG_RD_LZMA is not set -# CONFIG_RD_XZ is not set -# CONFIG_RD_LZO is not set +CONFIG_RD_BZIP2=y +CONFIG_RD_LZMA=y +CONFIG_RD_XZ=y +CONFIG_RD_LZO=y +CONFIG_RD_LZ4=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL=y CONFIG_ANON_INODES=y @@ -848,7 +849,14 @@ CONFIG_IP6_NF_RAW=m CONFIG_IP6_NF_SECURITY=m # CONFIG_BRIDGE_NF_EBTABLES is not set # CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set +CONFIG_IP_SCTP=m +# CONFIG_SCTP_DBG_MSG is not set +# CONFIG_SCTP_DBG_OBJCNT is not set +CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y +# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1 is not set +# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not set +CONFIG_SCTP_COOKIE_HMAC_MD5=y +CONFIG_SCTP_COOKIE_HMAC_SHA1=y # CONFIG_RDS is not set # CONFIG_TIPC is not set # CONFIG_ATM is not set @@ -1309,6 +1317,7 @@ CONFIG_BMP085_I2C=m # CONFIG_USB_SWITCH_FSA9480 is not set CONFIG_GPEVT=y CONFIG_GROVE_I2C=y +CONFIG_TIEQEP=y # CONFIG_C2PORT is not set # @@ -1336,7 +1345,9 @@ CONFIG_BEAGLEBONE_PINMUX_HELPER=y CONFIG_BEAGLEBONE_IIO_HELPER=y CONFIG_CAPE_BEAGLEBONE=y CONFIG_CAPE_BEAGLEBONE_GEIGER=y +CONFIG_CAPE_BEAGLEBONE_ARGUS=y CONFIG_CAPE_BEAGLEBONE_NIXIE=y +CONFIG_CAPE_LOGIBONE_R1=y # # SCSI device support @@ -1849,9 +1860,13 @@ CONFIG_HW_RANDOM=y # CONFIG_HW_RANDOM_ATMEL is not set CONFIG_HW_RANDOM_VIRTIO=m # CONFIG_HW_RANDOM_EXYNOS is not set +CONFIG_HW_RANDOM_TPM=m # CONFIG_R3964 is not set # CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set +CONFIG_TCG_TPM=m +CONFIG_TCG_TIS_I2C_ATMEL=m +# CONFIG_TCG_TIS_I2C_INFINEON is not set +# CONFIG_TCG_ATMEL is not set CONFIG_I2C=y CONFIG_I2C_BOARDINFO=y CONFIG_I2C_COMPAT=y @@ -2096,6 +2111,7 @@ CONFIG_SENSORS_AM335X_BANDGAP=y # CONFIG_SENSORS_GL520SM is not set CONFIG_SENSORS_GPIO_FAN=m CONFIG_SENSORS_HIH6130=m +CONFIG_SENSORS_HTU21=m # CONFIG_SENSORS_IT87 is not set # CONFIG_SENSORS_JC42 is not set # CONFIG_SENSORS_LINEAGE is not set @@ -2612,6 +2628,7 @@ CONFIG_VIDEO_MT9V011=m # CONFIG_SOC_CAMERA_IMX074 is not set CONFIG_SOC_CAMERA_MT9M001=y CONFIG_SOC_CAMERA_MT9M111=y +CONFIG_SOC_CAMERA_MT9M114=y CONFIG_SOC_CAMERA_MT9T031=y CONFIG_SOC_CAMERA_MT9T112=y CONFIG_SOC_CAMERA_MT9V022=y @@ -3065,9 +3082,8 @@ CONFIG_USB_ANNOUNCE_NEW_DEVICES=y # # Miscellaneous USB options # -# CONFIG_USB_DYNAMIC_MINORS is not set -CONFIG_USB_SUSPEND=y -# CONFIG_USB_OTG is not set +CONFIG_USB_DYNAMIC_MINORS=y +# CONFIG_USB_SUSPEND is not set # CONFIG_USB_OTG_WHITELIST is not set # CONFIG_USB_OTG_BLACKLIST_HUB is not set # CONFIG_USB_DWC3 is not set @@ -3221,7 +3237,7 @@ CONFIG_USB_CYPRESS_CY7C63=m CONFIG_USB_CYTHERM=m CONFIG_USB_IDMOUSE=m CONFIG_USB_FTDI_ELAN=m -CONFIG_USB_APPLEDISPLAY=m +# CONFIG_USB_APPLEDISPLAY is not set # CONFIG_USB_SISUSBVGA is not set CONFIG_USB_LD=m CONFIG_USB_TRANCEVIBRATOR=m @@ -3239,7 +3255,7 @@ CONFIG_OMAP_CONTROL_USB=y CONFIG_USB_ISP1301=m # CONFIG_USB_RCAR_PHY is not set CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_DEBUG=y +# CONFIG_USB_GADGET_DEBUG is not set CONFIG_USB_GADGET_DEBUG_FILES=y CONFIG_USB_GADGET_DEBUG_FS=y CONFIG_USB_GADGET_VBUS_DRAW=2 @@ -3830,8 +3846,15 @@ CONFIG_XFS_POSIX_ACL=y CONFIG_XFS_RT=y # CONFIG_XFS_DEBUG is not set CONFIG_GFS2_FS=m -CONFIG_BTRFS_FS=m -# CONFIG_BTRFS_FS_POSIX_ACL is not set +CONFIG_GFS2_FS_LOCKING_DLM=y +CONFIG_OCFS2_FS=m +CONFIG_OCFS2_FS_O2CB=m +CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m +CONFIG_OCFS2_FS_STATS=y +CONFIG_OCFS2_DEBUG_MASKLOG=y +# CONFIG_OCFS2_DEBUG_FS is not set +CONFIG_BTRFS_FS=y +CONFIG_BTRFS_FS_POSIX_ACL=y # CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set CONFIG_NILFS2_FS=m CONFIG_FS_POSIX_ACL=y @@ -3887,7 +3910,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 @@ -4012,6 +4035,8 @@ CONFIG_NLS_ISO8859_1=y # CONFIG_NLS_MAC_ROMANIAN is not set # CONFIG_NLS_MAC_TURKISH is not set # CONFIG_NLS_UTF8 is not set +CONFIG_DLM=m +# CONFIG_DLM_DEBUG is not set # # Kernel hacking @@ -4132,6 +4157,7 @@ CONFIG_EARLY_PRINTK=y # Security options # CONFIG_KEYS=y +# CONFIG_TRUSTED_KEYS is not set # CONFIG_ENCRYPTED_KEYS is not set # CONFIG_KEYS_DEBUG_PROC_KEYS is not set # CONFIG_SECURITY_DMESG_RESTRICT is not set @@ -4286,9 +4312,24 @@ CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y CONFIG_LZO_COMPRESS=y CONFIG_LZO_DECOMPRESS=y -# CONFIG_XZ_DEC is not set -# CONFIG_XZ_DEC_BCJ is not set +CONFIG_LZ4_COMPRESS=y +CONFIG_LZ4HC_COMPRESS=y +CONFIG_LZ4_DECOMPRESS=y +CONFIG_XZ_DEC=y +CONFIG_XZ_DEC_X86=y +CONFIG_XZ_DEC_POWERPC=y +CONFIG_XZ_DEC_IA64=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +CONFIG_XZ_DEC_SPARC=y +CONFIG_XZ_DEC_BCJ=y +# CONFIG_XZ_DEC_TEST is not set CONFIG_DECOMPRESS_GZIP=y +CONFIG_DECOMPRESS_BZIP2=y +CONFIG_DECOMPRESS_LZMA=y +CONFIG_DECOMPRESS_XZ=y +CONFIG_DECOMPRESS_LZO=y +CONFIG_DECOMPRESS_LZ4=y CONFIG_GENERIC_ALLOCATOR=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y diff --git a/patch.sh b/patch.sh index 26515de2..4ade0eba 100755 --- a/patch.sh +++ b/patch.sh @@ -24,7 +24,7 @@ EXTERNAL_TREE="git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable EXTERNAL_BRANCH="linux-3.8.y" EXTERNAL_SHA="dbf932a9b316d5b29b3e220e5a30e7a165ad2992" -PATCHSET="dma rtc pinctrl cpufreq adc i2c da8xx-fb pwm mmc crypto 6lowpan capebus arm omap omap_sakoman omap_beagle_expansion omap_beagle omap_panda net drm not-capebus pru usb PG2 reboot iio w1 gpmc mxt ssd130x build hdmi resetctrl camera resources pmic pps leds capes fixes" +PATCHSET="dma rtc pinctrl cpufreq adc i2c da8xx-fb pwm mmc crypto 6lowpan capebus arm omap omap_sakoman omap_beagle_expansion omap_beagle omap_panda net drm not-capebus pru usb PG2 reboot iio w1 gpmc mxt ssd130x build hdmi audio resetctrl camera resources pmic pps leds capes proto logibone fixes machinekit backports btrfs" git_kernel_stable () { git pull git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git master --tags || true diff --git a/patches/6lowpan/0001-6lowpan-Refactor-packet-delivery-into-a-function.patch b/patches/6lowpan/0001-6lowpan-Refactor-packet-delivery-into-a-function.patch index d67fb8a4..3a97ccb0 100644 --- a/patches/6lowpan/0001-6lowpan-Refactor-packet-delivery-into-a-function.patch +++ b/patches/6lowpan/0001-6lowpan-Refactor-packet-delivery-into-a-function.patch @@ -1,4 +1,4 @@ -From 1dbf121118e1a56adebb777c2dd3f4cfade7c154 Mon Sep 17 00:00:00 2001 +From dd65895bd708ebea9395bbff3e579c1dd5b36455 Mon Sep 17 00:00:00 2001 From: Alan Ott Date: Wed, 16 Jan 2013 19:09:47 +0000 Subject: [PATCH 01/23] 6lowpan: Refactor packet delivery into a function @@ -9,7 +9,7 @@ function. Signed-off-by: Alan Ott Signed-off-by: David S. Miller --- - net/ieee802154/6lowpan.c | 38 ++++++++++++++++++++++++-------------- + net/ieee802154/6lowpan.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c @@ -72,5 +72,5 @@ index 76c3d0a..9d39f5b 100644 kfree_skb(new); -- -1.7.9.5 +1.9.0 diff --git a/patches/6lowpan/0002-6lowpan-Handle-uncompressed-IPv6-packets-over-6LoWPA.patch b/patches/6lowpan/0002-6lowpan-Handle-uncompressed-IPv6-packets-over-6LoWPA.patch index b978e450..b44a816e 100644 --- a/patches/6lowpan/0002-6lowpan-Handle-uncompressed-IPv6-packets-over-6LoWPA.patch +++ b/patches/6lowpan/0002-6lowpan-Handle-uncompressed-IPv6-packets-over-6LoWPA.patch @@ -1,4 +1,4 @@ -From e6e9c7b810cea56d2998be564e7d3fdc52b9d79d Mon Sep 17 00:00:00 2001 +From 0bbe12e740b7da1f1521f0bce337372893677ed9 Mon Sep 17 00:00:00 2001 From: Alan Ott Date: Wed, 16 Jan 2013 19:09:48 +0000 Subject: [PATCH 02/23] 6lowpan: Handle uncompressed IPv6 packets over 6LoWPAN @@ -8,7 +8,7 @@ Handle the reception of uncompressed packets (dispatch type = IPv6). Signed-off-by: Alan Ott Signed-off-by: David S. Miller --- - net/ieee802154/6lowpan.c | 41 ++++++++++++++++++++++++++++++++--------- + net/ieee802154/6lowpan.c | 41 ++++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c @@ -68,5 +68,5 @@ index 9d39f5b..f62c3b9 100644 return NET_RX_SUCCESS; -- -1.7.9.5 +1.9.0 diff --git a/patches/6lowpan/0003-wpan-whitespace-fix.patch b/patches/6lowpan/0003-wpan-whitespace-fix.patch index 08e7f845..1927dbfb 100644 --- a/patches/6lowpan/0003-wpan-whitespace-fix.patch +++ b/patches/6lowpan/0003-wpan-whitespace-fix.patch @@ -1,4 +1,4 @@ -From 2a14f577082e49bf882cc8ea6dff8cf5edd20ba8 Mon Sep 17 00:00:00 2001 +From 1a89322ca58805b5c41280f122db2bc4f965e4fd Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Tue, 5 Feb 2013 04:25:35 +0000 Subject: [PATCH 03/23] wpan: whitespace fix @@ -6,7 +6,7 @@ Subject: [PATCH 03/23] wpan: whitespace fix Signed-off-by: Alexander Aring Signed-off-by: David S. Miller --- - net/mac802154/wpan.c | 2 +- + net/mac802154/wpan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac802154/wpan.c b/net/mac802154/wpan.c @@ -23,5 +23,5 @@ index 199b922..98c867b 100644 return 0; } -- -1.7.9.5 +1.9.0 diff --git a/patches/6lowpan/0004-6lowpan-use-stack-buffer-instead-of-heap.patch b/patches/6lowpan/0004-6lowpan-use-stack-buffer-instead-of-heap.patch index 010ca82a..4bdda426 100644 --- a/patches/6lowpan/0004-6lowpan-use-stack-buffer-instead-of-heap.patch +++ b/patches/6lowpan/0004-6lowpan-use-stack-buffer-instead-of-heap.patch @@ -1,4 +1,4 @@ -From 1b0720c87c2b99329fca359ea5bad66fd1c31fcc Mon Sep 17 00:00:00 2001 +From f57141725d53db53d6d8f9f5d2cc026e7b0d9658 Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Tue, 5 Feb 2013 10:23:43 +0000 Subject: [PATCH 04/23] 6lowpan: use stack buffer instead of heap @@ -11,7 +11,7 @@ Also fixed a comment codestyle issue. Signed-off-by: Alexander Aring Signed-off-by: David S. Miller --- - net/ieee802154/6lowpan.c | 13 ++++--------- + net/ieee802154/6lowpan.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c @@ -50,5 +50,5 @@ index f62c3b9..43b95ca 100644 skb->len); -- -1.7.9.5 +1.9.0 diff --git a/patches/6lowpan/0005-wpan-use-stack-buffer-instead-of-heap.patch b/patches/6lowpan/0005-wpan-use-stack-buffer-instead-of-heap.patch index 8f279466..c828662a 100644 --- a/patches/6lowpan/0005-wpan-use-stack-buffer-instead-of-heap.patch +++ b/patches/6lowpan/0005-wpan-use-stack-buffer-instead-of-heap.patch @@ -1,4 +1,4 @@ -From 908de1e2e4666bb796cfcde16b22ba5dd56feb94 Mon Sep 17 00:00:00 2001 +From da34106faf5e52228b300314d8948bf89f65688e Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Tue, 5 Feb 2013 10:23:44 +0000 Subject: [PATCH 05/23] wpan: use stack buffer instead of heap @@ -9,7 +9,7 @@ So it's not necessary to put it on the heap. Signed-off-by: Alexander Aring Signed-off-by: David S. Miller --- - net/mac802154/wpan.c | 7 +------ + net/mac802154/wpan.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/net/mac802154/wpan.c b/net/mac802154/wpan.c @@ -43,5 +43,5 @@ index 98c867b..d20c6d3 100644 return pos; } -- -1.7.9.5 +1.9.0 diff --git a/patches/6lowpan/0006-mrf24j40-pinctrl-support.patch b/patches/6lowpan/0006-mrf24j40-pinctrl-support.patch index 0184e54e..a686b277 100644 --- a/patches/6lowpan/0006-mrf24j40-pinctrl-support.patch +++ b/patches/6lowpan/0006-mrf24j40-pinctrl-support.patch @@ -1,4 +1,4 @@ -From b2f8316cdf1f4ab19f7b113011b598c9f4aaedaa Mon Sep 17 00:00:00 2001 +From a3479ec7e4ad7f64373b45f042cd9ea9c8b90470 Mon Sep 17 00:00:00 2001 From: Alan Ott Date: Mon, 18 Mar 2013 00:39:48 -0400 Subject: [PATCH 06/23] mrf24j40: pinctrl support @@ -7,7 +7,7 @@ Activate pinctrl settings when used with a DT system. Signed-off-by: Alan Ott --- - drivers/net/ieee802154/mrf24j40.c | 7 +++++++ + drivers/net/ieee802154/mrf24j40.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c @@ -43,5 +43,5 @@ index 3f2c7aa..3106895 100644 if (spi->max_speed_hz > MAX_SPI_SPEED_HZ) spi->max_speed_hz = MAX_SPI_SPEED_HZ; -- -1.7.9.5 +1.9.0 diff --git a/patches/6lowpan/0007-mrf24j40-Warn-if-transmit-interrupts-timeout.patch b/patches/6lowpan/0007-mrf24j40-Warn-if-transmit-interrupts-timeout.patch index 95212cf4..7c21a4c8 100644 --- a/patches/6lowpan/0007-mrf24j40-Warn-if-transmit-interrupts-timeout.patch +++ b/patches/6lowpan/0007-mrf24j40-Warn-if-transmit-interrupts-timeout.patch @@ -1,4 +1,4 @@ -From 70baba79049278bd1779205840084fe3ba20718c Mon Sep 17 00:00:00 2001 +From 8376f186d351cbcfa039c73f82a0165e2e7dc2f0 Mon Sep 17 00:00:00 2001 From: Alan Ott Date: Mon, 18 Mar 2013 00:49:02 -0400 Subject: [PATCH 07/23] mrf24j40: Warn if transmit interrupts timeout @@ -7,7 +7,7 @@ Issue a warning if a transmit complete interrupt doesn't happen in time. Signed-off-by: Alan Ott --- - drivers/net/ieee802154/mrf24j40.c | 1 + + drivers/net/ieee802154/mrf24j40.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c @@ -23,5 +23,5 @@ index 3106895..bb7e613 100644 } -- -1.7.9.5 +1.9.0 diff --git a/patches/6lowpan/0008-mrf24j40-Increase-max-SPI-speed-to-10MHz.patch b/patches/6lowpan/0008-mrf24j40-Increase-max-SPI-speed-to-10MHz.patch index 5700b66f..d564f648 100644 --- a/patches/6lowpan/0008-mrf24j40-Increase-max-SPI-speed-to-10MHz.patch +++ b/patches/6lowpan/0008-mrf24j40-Increase-max-SPI-speed-to-10MHz.patch @@ -1,4 +1,4 @@ -From dcd6826e52d90d2b5406ff657a0a068ed9e36f06 Mon Sep 17 00:00:00 2001 +From d14fdd79c67419816d9af7357cfb8899b053027d Mon Sep 17 00:00:00 2001 From: Alan Ott Date: Mon, 18 Mar 2013 01:17:05 -0400 Subject: [PATCH 08/23] mrf24j40: Increase max SPI speed to 10MHz @@ -8,7 +8,7 @@ for SCK at 10MHz. Signed-off-by: Alan Ott --- - drivers/net/ieee802154/mrf24j40.c | 5 ++--- + drivers/net/ieee802154/mrf24j40.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c @@ -28,5 +28,5 @@ index bb7e613..f6e723e 100644 #define printdev(X) (&X->spi->dev) -- -1.7.9.5 +1.9.0 diff --git a/patches/6lowpan/0009-mrf24j40-Fix-byte-order-of-IEEE-address.patch b/patches/6lowpan/0009-mrf24j40-Fix-byte-order-of-IEEE-address.patch index 506b2762..bad53d67 100644 --- a/patches/6lowpan/0009-mrf24j40-Fix-byte-order-of-IEEE-address.patch +++ b/patches/6lowpan/0009-mrf24j40-Fix-byte-order-of-IEEE-address.patch @@ -1,4 +1,4 @@ -From 9602f99074c98ae2f290b9ff1127932e332f1729 Mon Sep 17 00:00:00 2001 +From 97dc281b19de57996ffa942eb57efdf2b840260c Mon Sep 17 00:00:00 2001 From: Alan Ott Date: Mon, 18 Mar 2013 01:26:01 -0400 Subject: [PATCH 09/23] mrf24j40: Fix byte-order of IEEE address @@ -8,7 +8,7 @@ byte order. Signed-off-by: Alan Ott --- - drivers/net/ieee802154/mrf24j40.c | 2 +- + drivers/net/ieee802154/mrf24j40.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c @@ -25,5 +25,5 @@ index f6e723e..6481faf 100644 #ifdef DEBUG printk(KERN_DEBUG "Set long addr to: "); -- -1.7.9.5 +1.9.0 diff --git a/patches/6lowpan/0010-6lowpan-lowpan_is_iid_16_bit_compressable-does-not-d.patch b/patches/6lowpan/0010-6lowpan-lowpan_is_iid_16_bit_compressable-does-not-d.patch index 23435036..2c1eadcb 100644 --- a/patches/6lowpan/0010-6lowpan-lowpan_is_iid_16_bit_compressable-does-not-d.patch +++ b/patches/6lowpan/0010-6lowpan-lowpan_is_iid_16_bit_compressable-does-not-d.patch @@ -1,4 +1,4 @@ -From 657946b24cb10c9a7e1cc0587be13b6d343dad81 Mon Sep 17 00:00:00 2001 +From a7752b32176a00a94c224dc1ce5c8ec75bab742d Mon Sep 17 00:00:00 2001 From: Tony Cheneau Date: Mon, 25 Mar 2013 23:59:21 -0400 Subject: [PATCH 10/23] 6lowpan: lowpan_is_iid_16_bit_compressable() does not @@ -9,7 +9,7 @@ and fixed in Contiki. This patch is basically a port of their fix. Signed-off-by: Tony Cheneau --- - net/ieee802154/6lowpan.h | 7 ++++--- + net/ieee802154/6lowpan.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/ieee802154/6lowpan.h b/net/ieee802154/6lowpan.h @@ -31,5 +31,5 @@ index bba5f83..4b8f917 100644 /* multicast address */ #define is_addr_mcast(a) (((a)->s6_addr[0]) == 0xFF) -- -1.7.9.5 +1.9.0 diff --git a/patches/6lowpan/0011-6lowpan-next-header-is-not-properly-set-upon-decompr.patch b/patches/6lowpan/0011-6lowpan-next-header-is-not-properly-set-upon-decompr.patch index e5eb39e7..af53a596 100644 --- a/patches/6lowpan/0011-6lowpan-next-header-is-not-properly-set-upon-decompr.patch +++ b/patches/6lowpan/0011-6lowpan-next-header-is-not-properly-set-upon-decompr.patch @@ -1,4 +1,4 @@ -From 48b865cf3e0f27a727bc1f986a5f359ade5b1036 Mon Sep 17 00:00:00 2001 +From 1de8d79ab1473758754825af5502bc0ba2dc7d30 Mon Sep 17 00:00:00 2001 From: Tony Cheneau Date: Mon, 25 Mar 2013 23:59:22 -0400 Subject: [PATCH 11/23] 6lowpan: next header is not properly set upon @@ -8,7 +8,7 @@ This causes a drop of the UDP packet. Signed-off-by: Tony Cheneau --- - net/ieee802154/6lowpan.c | 4 +++- + net/ieee802154/6lowpan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c @@ -29,5 +29,5 @@ index 43b95ca..9f53904 100644 /* Not fragmented package */ hdr.payload_len = htons(skb->len); -- -1.7.9.5 +1.9.0 diff --git a/patches/6lowpan/0012-6lowpan-always-enable-link-layer-acknowledgments.patch b/patches/6lowpan/0012-6lowpan-always-enable-link-layer-acknowledgments.patch index ba36caea..95ecce2b 100644 --- a/patches/6lowpan/0012-6lowpan-always-enable-link-layer-acknowledgments.patch +++ b/patches/6lowpan/0012-6lowpan-always-enable-link-layer-acknowledgments.patch @@ -1,4 +1,4 @@ -From 0b12c64bcd6e70430d68e14021266323e5ed388f Mon Sep 17 00:00:00 2001 +From d07a8372e65ef9f0448d85b59ae17e9d58f8d6c9 Mon Sep 17 00:00:00 2001 From: Tony Cheneau Date: Mon, 25 Mar 2013 23:59:23 -0400 Subject: [PATCH 12/23] 6lowpan: always enable link-layer acknowledgments @@ -11,7 +11,7 @@ acknowledgments even if this is set. Signed-off-by: Tony Cheneau --- - net/ieee802154/6lowpan.c | 4 ++++ + net/ieee802154/6lowpan.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c @@ -30,5 +30,5 @@ index 9f53904..e7f61de 100644 type, (void *)&da, (void *)&sa, skb->len); } -- -1.7.9.5 +1.9.0 diff --git a/patches/6lowpan/0013-mac802154-turn-on-ACK-when-enabled-by-the-upper-laye.patch b/patches/6lowpan/0013-mac802154-turn-on-ACK-when-enabled-by-the-upper-laye.patch index 3ff8cebe..2351ec0c 100644 --- a/patches/6lowpan/0013-mac802154-turn-on-ACK-when-enabled-by-the-upper-laye.patch +++ b/patches/6lowpan/0013-mac802154-turn-on-ACK-when-enabled-by-the-upper-laye.patch @@ -1,12 +1,11 @@ -From 4f5c20a903d375a41f860d992ac4ce3fb83f8b38 Mon Sep 17 00:00:00 2001 +From ccc1bd88c4b66bf5bcbac5e5533ad31f8d43eaa7 Mon Sep 17 00:00:00 2001 From: Tony Cheneau Date: Mon, 25 Mar 2013 23:59:24 -0400 -Subject: [PATCH 13/23] mac802154: turn on ACK when enabled by the upper - layers +Subject: [PATCH 13/23] mac802154: turn on ACK when enabled by the upper layers Signed-off-by: Tony Cheneau --- - net/mac802154/wpan.c | 2 ++ + net/mac802154/wpan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/mac802154/wpan.c b/net/mac802154/wpan.c @@ -23,5 +22,5 @@ index d20c6d3..7d3f659 100644 if (!saddr) { spin_lock_bh(&priv->mib_lock); -- -1.7.9.5 +1.9.0 diff --git a/patches/6lowpan/0014-6lowpan-use-short-IEEE-802.15.4-addresses-for-broadc.patch b/patches/6lowpan/0014-6lowpan-use-short-IEEE-802.15.4-addresses-for-broadc.patch index ddb6cf55..f694fe04 100644 --- a/patches/6lowpan/0014-6lowpan-use-short-IEEE-802.15.4-addresses-for-broadc.patch +++ b/patches/6lowpan/0014-6lowpan-use-short-IEEE-802.15.4-addresses-for-broadc.patch @@ -1,4 +1,4 @@ -From 511582a7602be3ef8a10aec5f6e506a6c205dee3 Mon Sep 17 00:00:00 2001 +From b4e02d6ad4594adf3a9d721ac52f3d73ce5ed369 Mon Sep 17 00:00:00 2001 From: Tony Cheneau Date: Mon, 25 Mar 2013 23:59:25 -0400 Subject: [PATCH 14/23] 6lowpan: use short IEEE 802.15.4 addresses for @@ -9,7 +9,7 @@ broadcasting. Signed-off-by: Tony Cheneau --- - net/ieee802154/6lowpan.c | 23 +++++++++++++++-------- + net/ieee802154/6lowpan.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c @@ -54,5 +54,5 @@ index e7f61de..0eebb96 100644 return dev_hard_header(skb, lowpan_dev_info(dev)->real_dev, type, (void *)&da, (void *)&sa, skb->len); -- -1.7.9.5 +1.9.0 diff --git a/patches/6lowpan/0015-6lowpan-fix-first-fragment-FRAG1-handling.patch b/patches/6lowpan/0015-6lowpan-fix-first-fragment-FRAG1-handling.patch index 840ef6b5..9f17d7d2 100644 --- a/patches/6lowpan/0015-6lowpan-fix-first-fragment-FRAG1-handling.patch +++ b/patches/6lowpan/0015-6lowpan-fix-first-fragment-FRAG1-handling.patch @@ -1,4 +1,4 @@ -From 158dc176c1180b83fc167e7f3ccc01b7f5190b7d Mon Sep 17 00:00:00 2001 +From e0f7af7145c3e751ba33a32068d7304a18392d13 Mon Sep 17 00:00:00 2001 From: Tony Cheneau Date: Mon, 25 Mar 2013 23:59:26 -0400 Subject: [PATCH 15/23] 6lowpan: fix first fragment (FRAG1) handling @@ -19,7 +19,7 @@ not properly initialized. Signed-off-by: Tony Cheneau --- - net/ieee802154/6lowpan.c | 36 +++++++++++++++++++++++------------- + net/ieee802154/6lowpan.c | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c @@ -119,5 +119,5 @@ index 0eebb96..4a62289 100644 } -- -1.7.9.5 +1.9.0 diff --git a/patches/6lowpan/0016-6lowpan-add-debug-messages-for-6LoWPAN-fragmentation.patch b/patches/6lowpan/0016-6lowpan-add-debug-messages-for-6LoWPAN-fragmentation.patch index 0cf97e04..1dc5c37e 100644 --- a/patches/6lowpan/0016-6lowpan-add-debug-messages-for-6LoWPAN-fragmentation.patch +++ b/patches/6lowpan/0016-6lowpan-add-debug-messages-for-6LoWPAN-fragmentation.patch @@ -1,4 +1,4 @@ -From 047e36b984290479c93bbef4de857886e53cdbe8 Mon Sep 17 00:00:00 2001 +From 31f3d9922e4f90994cb4b3f09857ad5d526d6507 Mon Sep 17 00:00:00 2001 From: Tony Cheneau Date: Mon, 25 Mar 2013 23:59:27 -0400 Subject: [PATCH 16/23] 6lowpan: add debug messages for 6LoWPAN fragmentation @@ -8,7 +8,7 @@ reassembly. Signed-off-by: Tony Cheneau --- - net/ieee802154/6lowpan.c | 25 +++++++++++++++++++++---- + net/ieee802154/6lowpan.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c @@ -80,5 +80,5 @@ index 4a62289..61eee9d 100644 offset += len; } -- -1.7.9.5 +1.9.0 diff --git a/patches/6lowpan/0017-6lowpan-store-fragment-tag-values-per-device-instead.patch b/patches/6lowpan/0017-6lowpan-store-fragment-tag-values-per-device-instead.patch index 86f6ab9c..89a31fe7 100644 --- a/patches/6lowpan/0017-6lowpan-store-fragment-tag-values-per-device-instead.patch +++ b/patches/6lowpan/0017-6lowpan-store-fragment-tag-values-per-device-instead.patch @@ -1,4 +1,4 @@ -From 782e99a904a568d7b3c49dd5bc71e3d830448166 Mon Sep 17 00:00:00 2001 +From 40f48b13f7ba8abaec02f3c23dd0c6614d77230b Mon Sep 17 00:00:00 2001 From: Tony Cheneau Date: Mon, 25 Mar 2013 23:59:28 -0400 Subject: [PATCH 17/23] 6lowpan: store fragment tag values per device instead @@ -6,7 +6,7 @@ Subject: [PATCH 17/23] 6lowpan: store fragment tag values per device instead Signed-off-by: Tony Cheneau --- - net/ieee802154/6lowpan.c | 9 +++++---- + net/ieee802154/6lowpan.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c @@ -64,5 +64,5 @@ index 61eee9d..f952451 100644 entry = kzalloc(sizeof(struct lowpan_dev_record), GFP_KERNEL); -- -1.7.9.5 +1.9.0 diff --git a/patches/6lowpan/0018-mac802154-add-mac802154_dev_get_dsn.patch b/patches/6lowpan/0018-mac802154-add-mac802154_dev_get_dsn.patch index e4eb6a9e..a22df735 100644 --- a/patches/6lowpan/0018-mac802154-add-mac802154_dev_get_dsn.patch +++ b/patches/6lowpan/0018-mac802154-add-mac802154_dev_get_dsn.patch @@ -1,4 +1,4 @@ -From d858c4bb462f22d8fa98930bb16622c85d5ea622 Mon Sep 17 00:00:00 2001 +From a50b50dcd44b193d6f0d3aa4964f01d786f8a085 Mon Sep 17 00:00:00 2001 From: Tony Cheneau Date: Mon, 25 Mar 2013 23:59:29 -0400 Subject: [PATCH 18/23] mac802154: add mac802154_dev_get_dsn() @@ -10,9 +10,9 @@ order to properly set the DSN (Data Sequence Number) value in the IEEE Signed-off-by: Tony Cheneau --- - net/mac802154/mac802154.h | 1 + - net/mac802154/mac_cmd.c | 1 + - net/mac802154/mib.c | 9 +++++++++ + net/mac802154/mac802154.h | 1 + + net/mac802154/mac_cmd.c | 1 + + net/mac802154/mib.c | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/net/mac802154/mac802154.h b/net/mac802154/mac802154.h @@ -57,5 +57,5 @@ index f47781a..f03e55f 100644 { struct phy_chan_notify_work *nw = container_of(work, -- -1.7.9.5 +1.9.0 diff --git a/patches/6lowpan/0019-6lowpan-obtain-IEEE802.15.4-sequence-number-from-the.patch b/patches/6lowpan/0019-6lowpan-obtain-IEEE802.15.4-sequence-number-from-the.patch index 61f0f002..c039b977 100644 --- a/patches/6lowpan/0019-6lowpan-obtain-IEEE802.15.4-sequence-number-from-the.patch +++ b/patches/6lowpan/0019-6lowpan-obtain-IEEE802.15.4-sequence-number-from-the.patch @@ -1,4 +1,4 @@ -From ac2bae8972ff640901fa724e5d235a7bef40c3c1 Mon Sep 17 00:00:00 2001 +From 4bccef4b45e439df92ae873cbb98f259c3955786 Mon Sep 17 00:00:00 2001 From: Tony Cheneau Date: Mon, 25 Mar 2013 23:59:30 -0400 Subject: [PATCH 19/23] 6lowpan: obtain IEEE802.15.4 sequence number from the @@ -9,7 +9,7 @@ number is always set to 0. This makes trafic analysis very hard. Signed-off-by: Tony Cheneau --- - net/ieee802154/6lowpan.c | 8 ++++++++ + net/ieee802154/6lowpan.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c @@ -46,5 +46,5 @@ index f952451..d1d4ee6 100644 static void lowpan_setup(struct net_device *dev) -- -1.7.9.5 +1.9.0 diff --git a/patches/6lowpan/0020-6lowpan-use-the-PANID-provided-by-the-device-instead.patch b/patches/6lowpan/0020-6lowpan-use-the-PANID-provided-by-the-device-instead.patch index 767f742b..411ce204 100644 --- a/patches/6lowpan/0020-6lowpan-use-the-PANID-provided-by-the-device-instead.patch +++ b/patches/6lowpan/0020-6lowpan-use-the-PANID-provided-by-the-device-instead.patch @@ -1,4 +1,4 @@ -From 6f2b7cfc845d1fe460a7daefd3b7b126d6f74499 Mon Sep 17 00:00:00 2001 +From 95a1123bf6883b1422b4bf531b0919c4f1d1c75d Mon Sep 17 00:00:00 2001 From: Tony Cheneau Date: Mon, 25 Mar 2013 23:59:31 -0400 Subject: [PATCH 20/23] 6lowpan: use the PANID provided by the device instead @@ -6,7 +6,7 @@ Subject: [PATCH 20/23] 6lowpan: use the PANID provided by the device instead Signed-off-by: Tony Cheneau --- - net/ieee802154/6lowpan.c | 6 ++++-- + net/ieee802154/6lowpan.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c @@ -29,5 +29,5 @@ index d1d4ee6..276971b 100644 * if the destination address is the broadcast address, use the * corresponding short address -- -1.7.9.5 +1.9.0 diff --git a/patches/6lowpan/0021-6lowpan-modify-udp-compression-uncompression-to-matc.patch b/patches/6lowpan/0021-6lowpan-modify-udp-compression-uncompression-to-matc.patch index eec5a8f0..26442ef1 100644 --- a/patches/6lowpan/0021-6lowpan-modify-udp-compression-uncompression-to-matc.patch +++ b/patches/6lowpan/0021-6lowpan-modify-udp-compression-uncompression-to-matc.patch @@ -1,4 +1,4 @@ -From 0bbaca582b73bab4e9720429b5d80962dcde0cdc Mon Sep 17 00:00:00 2001 +From 06df6f768c4bf3308a785bd33d74a402ef327bc9 Mon Sep 17 00:00:00 2001 From: Tony Cheneau Date: Mon, 25 Mar 2013 23:59:32 -0400 Subject: [PATCH 21/23] 6lowpan: modify udp compression/uncompression to match @@ -9,7 +9,7 @@ UDP header along with the uncompressed one. Signed-off-by: Tony Cheneau --- - net/ieee802154/6lowpan.c | 39 ++++++++++++++++++++++++++++++++++++--- + net/ieee802154/6lowpan.c | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c @@ -86,5 +86,5 @@ index 276971b..c9c3f3d 100644 } -- -1.7.9.5 +1.9.0 diff --git a/patches/6lowpan/0022-6lowpan-fix-a-small-formatting-issue.patch b/patches/6lowpan/0022-6lowpan-fix-a-small-formatting-issue.patch index b15addab..461547a1 100644 --- a/patches/6lowpan/0022-6lowpan-fix-a-small-formatting-issue.patch +++ b/patches/6lowpan/0022-6lowpan-fix-a-small-formatting-issue.patch @@ -1,4 +1,4 @@ -From 451b591d790eef308ef7eade2559a5e437963c30 Mon Sep 17 00:00:00 2001 +From ac16425cf8267abba7ee19c64c69b672ceb52987 Mon Sep 17 00:00:00 2001 From: Tony Cheneau Date: Wed, 27 Mar 2013 00:09:24 -0400 Subject: [PATCH 22/23] 6lowpan: fix a small formatting issue @@ -8,7 +8,7 @@ d4ac32365dcbfd341a87eae444c26679f889249a Signed-off-by: Tony Cheneau --- - net/ieee802154/6lowpan.c | 2 +- + net/ieee802154/6lowpan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c @@ -25,5 +25,5 @@ index c9c3f3d..f4969d7 100644 struct lowpan_dev_record { -- -1.7.9.5 +1.9.0 diff --git a/patches/6lowpan/0023-6lowpan-use-IEEE802154_ADDR_LEN-instead-of-a-magic-n.patch b/patches/6lowpan/0023-6lowpan-use-IEEE802154_ADDR_LEN-instead-of-a-magic-n.patch index 96907b0d..a3dd1de2 100644 --- a/patches/6lowpan/0023-6lowpan-use-IEEE802154_ADDR_LEN-instead-of-a-magic-n.patch +++ b/patches/6lowpan/0023-6lowpan-use-IEEE802154_ADDR_LEN-instead-of-a-magic-n.patch @@ -1,4 +1,4 @@ -From 1fe5097051670621693aac4ddb103da328e0917b Mon Sep 17 00:00:00 2001 +From d9de363911a46784f5b06b45820d796e0be53dec Mon Sep 17 00:00:00 2001 From: Tony Cheneau Date: Wed, 27 Mar 2013 00:09:25 -0400 Subject: [PATCH 23/23] 6lowpan: use IEEE802154_ADDR_LEN instead of a magic @@ -6,7 +6,7 @@ Subject: [PATCH 23/23] 6lowpan: use IEEE802154_ADDR_LEN instead of a magic Signed-off-by: Tony Cheneau --- - net/ieee802154/6lowpan.c | 2 +- + net/ieee802154/6lowpan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c @@ -23,5 +23,5 @@ index f4969d7..e1b4580 100644 /* request acknowledgment */ mac_cb(skb)->flags |= MAC_CB_FLAG_ACKREQ; -- -1.7.9.5 +1.9.0 diff --git a/patches/PG2/0001-beaglebone-black-1ghz-hack.patch b/patches/PG2/0001-beaglebone-black-1ghz-hack.patch index 611d64ca..2a5ebbbb 100644 --- a/patches/PG2/0001-beaglebone-black-1ghz-hack.patch +++ b/patches/PG2/0001-beaglebone-black-1ghz-hack.patch @@ -1,22 +1,23 @@ -From 2896e59ebc3e3037e7db22248d4184dc64c99c8e Mon Sep 17 00:00:00 2001 +From 25226c0eb7c495330a5f272b23e24aab80ac89c8 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 22 Jan 2013 17:52:18 +0100 Subject: [PATCH] beaglebone black: 1ghz hack Signed-off-by: Koen Kooi --- - arch/arm/boot/dts/am335x-boneblack.dts | 16 ++++++++++++++++ - arch/arm/boot/dts/am33xx.dtsi | 2 +- + arch/arm/boot/dts/am335x-boneblack.dts | 16 ++++++++++++++++ + arch/arm/boot/dts/am33xx.dtsi | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts -index 5434bfd..1abf267 100644 +index 897c2a3..eec37a4 100644 --- a/arch/arm/boot/dts/am335x-boneblack.dts +++ b/arch/arm/boot/dts/am335x-boneblack.dts -@@ -43,3 +43,19 @@ +@@ -42,3 +42,19 @@ + ti,non-removable; status = "okay"; }; - ++ + +&cpu { + /* @@ -32,9 +33,8 @@ index 5434bfd..1abf267 100644 + 300000 969000 + >; +}; -+ diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi -index 6b71632..6c24c9b 100644 +index 2fdca7c..84dabd2 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi @@ -24,7 +24,7 @@ @@ -47,5 +47,5 @@ index 6b71632..6c24c9b 100644 /* -- -1.7.9.5 +1.9.0 diff --git a/patches/adc/0001-mfd-input-iio-ti_am335x_adc-use-one-structure-for-ti.patch b/patches/adc/0001-mfd-input-iio-ti_am335x_adc-use-one-structure-for-ti.patch index d85b3d12..7e069c7d 100644 --- a/patches/adc/0001-mfd-input-iio-ti_am335x_adc-use-one-structure-for-ti.patch +++ b/patches/adc/0001-mfd-input-iio-ti_am335x_adc-use-one-structure-for-ti.patch @@ -1,7 +1,7 @@ -From 1d03c900ef504f70b9c8f28e050e1adab90ed753 Mon Sep 17 00:00:00 2001 +From 3e5587fdabc19254fbf99de85b762a92aaacadd6 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 12 Jun 2013 18:58:02 +0200 -Subject: [PATCH 01/21] mfd: input: iio: ti_am335x_adc: use one structure for +Subject: [PATCH 01/19] mfd: input: iio: ti_am335x_adc: use one structure for ti_tscadc_dev The mfd driver creates platform data for the child devices and it is the @@ -14,10 +14,10 @@ the wrong pointer for ti_tscadc_dev and this has been fixed as well. Signed-off-by: Sebastian Andrzej Siewior --- - drivers/iio/adc/ti_am335x_adc.c | 5 +++-- - drivers/input/touchscreen/ti_am335x_tsc.c | 16 +++++++++------- - drivers/mfd/ti_am335x_tscadc.c | 8 ++++---- - include/linux/mfd/ti_am335x_tscadc.h | 7 +++++++ + drivers/iio/adc/ti_am335x_adc.c | 5 +++-- + drivers/input/touchscreen/ti_am335x_tsc.c | 16 +++++++++------- + drivers/mfd/ti_am335x_tscadc.c | 8 ++++---- + include/linux/mfd/ti_am335x_tscadc.h | 7 +++++++ 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c @@ -136,5 +136,5 @@ index c79ad5d..8114e4e 100644 + #endif -- -1.7.9.5 +1.9.0 diff --git a/patches/adc/0002-input-ti_am33x_tsc-Step-enable-bits-made-configurabl.patch b/patches/adc/0002-input-ti_am33x_tsc-Step-enable-bits-made-configurabl.patch index 3984a234..0456a750 100644 --- a/patches/adc/0002-input-ti_am33x_tsc-Step-enable-bits-made-configurabl.patch +++ b/patches/adc/0002-input-ti_am33x_tsc-Step-enable-bits-made-configurabl.patch @@ -1,8 +1,7 @@ -From 3a09da27c8e1ab187d58f994058eb662c22358b6 Mon Sep 17 00:00:00 2001 +From 5b28c8efb2b598c32a5176919467e75ef2ef6d9c Mon Sep 17 00:00:00 2001 From: "Patil, Rachna" Date: Wed, 12 Jun 2013 18:58:03 +0200 -Subject: [PATCH 02/21] input: ti_am33x_tsc: Step enable bits made - configurable +Subject: [PATCH 02/19] input: ti_am33x_tsc: Step enable bits made configurable Current code has hard coded value written to step enable bits. Now the bits are updated based @@ -20,10 +19,10 @@ Signed-off-by: Patil, Rachna Signed-off-by: Felipe Balbi Signed-off-by: Sebastian Andrzej Siewior --- - drivers/iio/adc/ti_am335x_adc.c | 20 ++++++++++++++++++-- - drivers/input/touchscreen/ti_am335x_tsc.c | 12 ++++++++++-- - drivers/mfd/ti_am335x_tscadc.c | 29 ++++++++++++++++++++++++++++- - include/linux/mfd/ti_am335x_tscadc.h | 8 ++++++-- + drivers/iio/adc/ti_am335x_adc.c | 20 ++++++++++++++++++-- + drivers/input/touchscreen/ti_am335x_tsc.c | 12 ++++++++++-- + drivers/mfd/ti_am335x_tscadc.c | 29 ++++++++++++++++++++++++++++- + include/linux/mfd/ti_am335x_tscadc.h | 8 ++++++-- 4 files changed, 62 insertions(+), 7 deletions(-) diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c @@ -216,5 +215,5 @@ index 8114e4e..4258627 100644 + #endif -- -1.7.9.5 +1.9.0 diff --git a/patches/adc/0003-input-ti_am33x_tsc-Order-of-TSC-wires-made-configura.patch b/patches/adc/0003-input-ti_am33x_tsc-Order-of-TSC-wires-made-configura.patch index 987e7fbd..7b8eb250 100644 --- a/patches/adc/0003-input-ti_am33x_tsc-Order-of-TSC-wires-made-configura.patch +++ b/patches/adc/0003-input-ti_am33x_tsc-Order-of-TSC-wires-made-configura.patch @@ -1,7 +1,7 @@ -From 38ac4835f49e91eb19e70067b7606bf6b6bc76db Mon Sep 17 00:00:00 2001 +From 0b24a42898f2655dd0acf1e85e0c3747fb3c11e3 Mon Sep 17 00:00:00 2001 From: "Patil, Rachna" Date: Wed, 12 Jun 2013 18:58:04 +0200 -Subject: [PATCH 03/21] input: ti_am33x_tsc: Order of TSC wires, made +Subject: [PATCH 03/19] input: ti_am33x_tsc: Order of TSC wires, made configurable The current driver expected touchscreen input @@ -15,9 +15,9 @@ Signed-off-by: Patil, Rachna Signed-off-by: Felipe Balbi Signed-off-by: Sebastian Andrzej Siewior --- - drivers/input/touchscreen/ti_am335x_tsc.c | 102 ++++++++++++++++++++++++----- - include/linux/input/ti_am335x_tsc.h | 12 ++++ - include/linux/mfd/ti_am335x_tscadc.h | 3 - + drivers/input/touchscreen/ti_am335x_tsc.c | 102 +++++++++++++++++++++++++----- + include/linux/input/ti_am335x_tsc.h | 12 ++++ + include/linux/mfd/ti_am335x_tscadc.h | 3 - 3 files changed, 98 insertions(+), 19 deletions(-) diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c @@ -258,5 +258,5 @@ index 4258627..e36ae41 100644 #define STEPCHARGE_RFM(val) ((val) << 23) #define STEPCHARGE_RFM_XNUR STEPCHARGE_RFM(1) -- -1.7.9.5 +1.9.0 diff --git a/patches/adc/0004-input-ti_am33x_tsc-remove-unwanted-fifo-flush.patch b/patches/adc/0004-input-ti_am33x_tsc-remove-unwanted-fifo-flush.patch index a4db7641..ad8afbdd 100644 --- a/patches/adc/0004-input-ti_am33x_tsc-remove-unwanted-fifo-flush.patch +++ b/patches/adc/0004-input-ti_am33x_tsc-remove-unwanted-fifo-flush.patch @@ -1,7 +1,7 @@ -From 1c00e3ff030b6b1a4cfbce5fbdfb706369ae77ab Mon Sep 17 00:00:00 2001 +From d7276abc4d5f7b27104b939fc8b04e1947bfe76f Mon Sep 17 00:00:00 2001 From: "Patil, Rachna" Date: Wed, 12 Jun 2013 18:58:05 +0200 -Subject: [PATCH 04/21] input: ti_am33x_tsc: remove unwanted fifo flush +Subject: [PATCH 04/19] input: ti_am33x_tsc: remove unwanted fifo flush When touchscreen and ADC are used together, this unwanted fifo flush leads to loss of ADC data. @@ -10,7 +10,7 @@ Signed-off-by: Patil, Rachna Signed-off-by: Felipe Balbi Signed-off-by: Sebastian Andrzej Siewior --- - drivers/input/touchscreen/ti_am335x_tsc.c | 10 ---------- + drivers/input/touchscreen/ti_am335x_tsc.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c @@ -42,5 +42,5 @@ index 2bdd66c..7b7de60 100644 /* * Calculate pressure using formula -- -1.7.9.5 +1.9.0 diff --git a/patches/adc/0005-input-ti_am33x_tsc-Add-DT-support.patch b/patches/adc/0005-input-ti_am33x_tsc-Add-DT-support.patch index e91ae0ff..fddf4bb9 100644 --- a/patches/adc/0005-input-ti_am33x_tsc-Add-DT-support.patch +++ b/patches/adc/0005-input-ti_am33x_tsc-Add-DT-support.patch @@ -1,7 +1,7 @@ -From 06d0af0909c82dc09c34794d19c61e28493e5d72 Mon Sep 17 00:00:00 2001 +From 40add915c9acc0258db0379e7dea23eabc62ad22 Mon Sep 17 00:00:00 2001 From: "Patil, Rachna" Date: Wed, 12 Jun 2013 18:58:06 +0200 -Subject: [PATCH 05/21] input: ti_am33x_tsc: Add DT support +Subject: [PATCH 05/19] input: ti_am33x_tsc: Add DT support This patch adds DT support to touch driver. It also provides a binding document which is used by the MFD and IIO part of the device. @@ -13,10 +13,10 @@ Signed-off-by: Patil, Rachna Signed-off-by: Felipe Balbi Signed-off-by: Sebastian Andrzej Siewior --- - .../bindings/input/touchscreen/ti-tsc-adc.txt | 44 ++++++++ - drivers/input/touchscreen/ti_am335x_tsc.c | 105 +++++++++++++++----- - drivers/mfd/ti_am335x_tscadc.c | 1 + - include/linux/input/ti_am335x_tsc.h | 2 +- + .../bindings/input/touchscreen/ti-tsc-adc.txt | 44 +++++++++ + drivers/input/touchscreen/ti_am335x_tsc.c | 105 ++++++++++++++++----- + drivers/mfd/ti_am335x_tscadc.c | 1 + + include/linux/input/ti_am335x_tsc.h | 2 +- 4 files changed, 128 insertions(+), 24 deletions(-) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/ti-tsc-adc.txt @@ -312,5 +312,5 @@ index 6a66b4d..c0bf08b 100644 }; -- -1.7.9.5 +1.9.0 diff --git a/patches/adc/0006-iio-ti_am335x_adc-Add-DT-support.patch b/patches/adc/0006-iio-ti_am335x_adc-Add-DT-support.patch index f0ce25cd..8e2503d4 100644 --- a/patches/adc/0006-iio-ti_am335x_adc-Add-DT-support.patch +++ b/patches/adc/0006-iio-ti_am335x_adc-Add-DT-support.patch @@ -1,7 +1,7 @@ -From 58a8394ea0bbf0903dd2b376f7348bfce064c590 Mon Sep 17 00:00:00 2001 +From 6586cb5eadbb0f0569c612c58b78a2aa4a2b427d Mon Sep 17 00:00:00 2001 From: "Patil, Rachna" Date: Wed, 12 Jun 2013 18:58:08 +0200 -Subject: [PATCH 06/21] iio: ti_am335x_adc: Add DT support +Subject: [PATCH 06/19] iio: ti_am335x_adc: Add DT support Add DT support for client ADC driver. @@ -11,8 +11,8 @@ Signed-off-by: Pantelis Antoniou Signed-off-by: Felipe Balbi Signed-off-by: Sebastian Andrzej Siewior --- - drivers/iio/adc/ti_am335x_adc.c | 29 ++++++++++++++++++++++++----- - drivers/mfd/ti_am335x_tscadc.c | 1 + + drivers/iio/adc/ti_am335x_adc.c | 29 ++++++++++++++++++++++++----- + drivers/mfd/ti_am335x_tscadc.c | 1 + 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c @@ -96,5 +96,5 @@ index ebce3d3..cca6a6c 100644 cell->pdata_size = sizeof(tscadc); -- -1.7.9.5 +1.9.0 diff --git a/patches/adc/0007-arm-dts-AM335x-evm-Add-TSC-ADC-MFD-device-support.patch b/patches/adc/0007-arm-dts-AM335x-evm-Add-TSC-ADC-MFD-device-support.patch index 5ff5e249..fbfbd079 100644 --- a/patches/adc/0007-arm-dts-AM335x-evm-Add-TSC-ADC-MFD-device-support.patch +++ b/patches/adc/0007-arm-dts-AM335x-evm-Add-TSC-ADC-MFD-device-support.patch @@ -1,15 +1,15 @@ -From 1d5a96ae56f2614889a00dd8d2887215d919f033 Mon Sep 17 00:00:00 2001 +From fa32a210648631cecb7313e3460574dc744c67ea Mon Sep 17 00:00:00 2001 From: "Patil, Rachna" Date: Thu, 24 Jan 2013 03:45:12 +0000 -Subject: [PATCH 07/21] arm/dts: AM335x-evm: Add TSC/ADC MFD device support +Subject: [PATCH 07/19] arm/dts: AM335x-evm: Add TSC/ADC MFD device support Add support for core multifunctional device along with its clients touchscreen and ADC. Signed-off-by: Patil, Rachna --- - arch/arm/boot/dts/am335x-evm.dts | 13 +++++++++++++ - arch/arm/boot/dts/am33xx.dtsi | 8 ++++++++ + arch/arm/boot/dts/am335x-evm.dts | 13 +++++++++++++ + arch/arm/boot/dts/am33xx.dtsi | 8 ++++++++ 2 files changed, 21 insertions(+) diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts @@ -52,5 +52,5 @@ index 9059cfc..47ac3d2 100644 }; }; -- -1.7.9.5 +1.9.0 diff --git a/patches/adc/0008-mfd-ti_am335x_tscadc-Add-DT-support.patch b/patches/adc/0008-mfd-ti_am335x_tscadc-Add-DT-support.patch index ac8f981c..d79ed72e 100644 --- a/patches/adc/0008-mfd-ti_am335x_tscadc-Add-DT-support.patch +++ b/patches/adc/0008-mfd-ti_am335x_tscadc-Add-DT-support.patch @@ -1,7 +1,7 @@ -From f186f75a64153e0eb0505c0e8ffd9161a4846315 Mon Sep 17 00:00:00 2001 +From 32ccf81d8cae0abebe131e02fe1154dbcbbdea5b Mon Sep 17 00:00:00 2001 From: "Patil, Rachna" Date: Wed, 12 Jun 2013 18:58:10 +0200 -Subject: [PATCH 08/21] mfd: ti_am335x_tscadc: Add DT support +Subject: [PATCH 08/19] mfd: ti_am335x_tscadc: Add DT support Add DT support in the MFD core driver. The node name is "am3359" because it was tested on this platform. @@ -13,7 +13,7 @@ Signed-off-by: Patil, Rachna Signed-off-by: Felipe Balbi Signed-off-by: Sebastian Andrzej Siewior --- - drivers/mfd/ti_am335x_tscadc.c | 30 +++++++++++++++++++++++++----- + drivers/mfd/ti_am335x_tscadc.c | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c @@ -86,5 +86,5 @@ index cca6a6c..0fc5867 100644 .probe = ti_tscadc_probe, .remove = ti_tscadc_remove, -- -1.7.9.5 +1.9.0 diff --git a/patches/adc/0009-iio-ti_tscadc-provide-datasheet_name-and-scan_type.patch b/patches/adc/0009-iio-ti_tscadc-provide-datasheet_name-and-scan_type.patch index 096a72e2..ca1d11e8 100644 --- a/patches/adc/0009-iio-ti_tscadc-provide-datasheet_name-and-scan_type.patch +++ b/patches/adc/0009-iio-ti_tscadc-provide-datasheet_name-and-scan_type.patch @@ -1,7 +1,7 @@ -From 5a6594e2edac0198f7b887cf64971b9262dfe20b Mon Sep 17 00:00:00 2001 +From 76e77868d96772df2273d54fae336d5ac898bafa Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 12 Jun 2013 18:58:12 +0200 -Subject: [PATCH 09/21] iio: ti_tscadc: provide datasheet_name and scan_type +Subject: [PATCH 09/19] iio: ti_tscadc: provide datasheet_name and scan_type This patch provides the members "datasheet_name" and scan_type. This is the remaining part of the earlier patch where I (bigeasy) removed iio_map @@ -16,7 +16,7 @@ Signed-off-by: Pantelis Antoniou Signed-off-by: Felipe Balbi Signed-off-by: Sebastian Andrzej Siewior --- - drivers/iio/adc/ti_am335x_adc.c | 29 ++++++++++++++++++++++++----- + drivers/iio/adc/ti_am335x_adc.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c @@ -85,5 +85,5 @@ index 4f4c82e..25feb62 100644 static void tiadc_channels_remove(struct iio_dev *indio_dev) -- -1.7.9.5 +1.9.0 diff --git a/patches/adc/0010-mfd-ti_tscadc-deal-with-partial-activation.patch b/patches/adc/0010-mfd-ti_tscadc-deal-with-partial-activation.patch index 76bf4356..c23f37df 100644 --- a/patches/adc/0010-mfd-ti_tscadc-deal-with-partial-activation.patch +++ b/patches/adc/0010-mfd-ti_tscadc-deal-with-partial-activation.patch @@ -1,7 +1,7 @@ -From 893931228b0b2178fa9a3dd6f13884dc21c7f2dd Mon Sep 17 00:00:00 2001 +From b3cec152181010370807df688ff3c7c8d33b604b Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 12 Jun 2013 18:58:13 +0200 -Subject: [PATCH 10/21] mfd: ti_tscadc: deal with partial activation +Subject: [PATCH 10/19] mfd: ti_tscadc: deal with partial activation Fix the mfd device in the case where a subdevice might not be activated. @@ -9,8 +9,8 @@ Signed-off-by: Pantelis Antoniou Signed-off-by: Felipe Balbi Signed-off-by: Sebastian Andrzej Siewior --- - drivers/mfd/ti_am335x_tscadc.c | 38 ++++++++++++++++++++++------------ - include/linux/mfd/ti_am335x_tscadc.h | 8 +++---- + drivers/mfd/ti_am335x_tscadc.c | 38 ++++++++++++++++++++++++------------ + include/linux/mfd/ti_am335x_tscadc.h | 8 +++----- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c @@ -110,5 +110,5 @@ index e36ae41..fe54ba4 100644 u32 reg_se_cache; spinlock_t reg_lock; -- -1.7.9.5 +1.9.0 diff --git a/patches/adc/0011-input-ti_am335x_adc-use-only-FIFO0-and-clean-up-a-li.patch b/patches/adc/0011-input-ti_am335x_adc-use-only-FIFO0-and-clean-up-a-li.patch index efc9eede..e30fddcf 100644 --- a/patches/adc/0011-input-ti_am335x_adc-use-only-FIFO0-and-clean-up-a-li.patch +++ b/patches/adc/0011-input-ti_am335x_adc-use-only-FIFO0-and-clean-up-a-li.patch @@ -1,7 +1,7 @@ -From e559a1048c247ed6c194c59bfce0ecabc388f336 Mon Sep 17 00:00:00 2001 +From 70b6a93528d18bea99228bbaec68070307541d9a Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 12 Jun 2013 18:58:18 +0200 -Subject: [PATCH 11/21] input: ti_am335x_adc: use only FIFO0 and clean up a +Subject: [PATCH 11/19] input: ti_am335x_adc: use only FIFO0 and clean up a little The driver programs a threshold of "coordinate_readouts" say 5. The @@ -35,9 +35,9 @@ The patch tries to clean up the whole thing a little: Acked-by: Dmitry Torokhov Signed-off-by: Sebastian Andrzej Siewior --- - drivers/iio/adc/ti_am335x_adc.c | 2 +- - drivers/input/touchscreen/ti_am335x_tsc.c | 78 +++++++++++++++-------------- - include/linux/mfd/ti_am335x_tscadc.h | 4 +- + drivers/iio/adc/ti_am335x_adc.c | 2 +- + drivers/input/touchscreen/ti_am335x_tsc.c | 78 ++++++++++++++++--------------- + include/linux/mfd/ti_am335x_tscadc.h | 4 +- 3 files changed, 44 insertions(+), 40 deletions(-) diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c @@ -262,5 +262,5 @@ index fe54ba4..9598360 100644 #define REG_FIFO0THR 0xE8 #define REG_FIFO1CNT 0xF0 -- -1.7.9.5 +1.9.0 diff --git a/patches/adc/0012-input-ti_am335x_tsc-ACK-the-HW_PEN-irq-in-ISR.patch b/patches/adc/0012-input-ti_am335x_tsc-ACK-the-HW_PEN-irq-in-ISR.patch index 83696185..d630a942 100644 --- a/patches/adc/0012-input-ti_am335x_tsc-ACK-the-HW_PEN-irq-in-ISR.patch +++ b/patches/adc/0012-input-ti_am335x_tsc-ACK-the-HW_PEN-irq-in-ISR.patch @@ -1,7 +1,7 @@ -From 520b637af6dc0858c6cc5a73d5de1fb9ca571e0d Mon Sep 17 00:00:00 2001 +From b11c2d8d4b59e60c824925c3ed04566b65e1a393 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 12 Jun 2013 18:58:19 +0200 -Subject: [PATCH 12/21] input: ti_am335x_tsc: ACK the HW_PEN irq in ISR +Subject: [PATCH 12/19] input: ti_am335x_tsc: ACK the HW_PEN irq in ISR The interrupt source IRQENB_HW_PEN is enabled in suspend and suposed to be used as a wake up source. Once this interrupt source is unmaksed, the @@ -11,7 +11,7 @@ freeze. Signed-off-by: Sebastian Andrzej Siewior --- - drivers/input/touchscreen/ti_am335x_tsc.c | 6 ++++++ + drivers/input/touchscreen/ti_am335x_tsc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c @@ -32,5 +32,5 @@ index ef479f0..4b214ea 100644 am335x_tsc_se_update(ts_dev->mfd_tscadc); -- -1.7.9.5 +1.9.0 diff --git a/patches/adc/0013-input-ti_am335x_tsc-return-IRQ_NONE-if-there-was-no-.patch b/patches/adc/0013-input-ti_am335x_tsc-return-IRQ_NONE-if-there-was-no-.patch index b9f759a9..0577e8a1 100644 --- a/patches/adc/0013-input-ti_am335x_tsc-return-IRQ_NONE-if-there-was-no-.patch +++ b/patches/adc/0013-input-ti_am335x_tsc-return-IRQ_NONE-if-there-was-no-.patch @@ -1,7 +1,7 @@ -From bfaa3d38efbac86ef33a425fd28bf3b07fe04929 Mon Sep 17 00:00:00 2001 +From 3762590bfda489985e85f20794f1f773b7ae6805 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 12 Jun 2013 18:58:20 +0200 -Subject: [PATCH 13/21] input: ti_am335x_tsc: return IRQ_NONE if there was no +Subject: [PATCH 13/19] input: ti_am335x_tsc: return IRQ_NONE if there was no IRQ for us The previous patch ("input/ti_am335x_tsc: ACK the HW_PEN irq in ISR") @@ -12,7 +12,7 @@ actually the case. Signed-off-by: Sebastian Andrzej Siewior --- - drivers/input/touchscreen/ti_am335x_tsc.c | 10 ++++++---- + drivers/input/touchscreen/ti_am335x_tsc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c @@ -37,5 +37,5 @@ index 4b214ea..f0acdca 100644 static int titsc_parse_dt(struct ti_tscadc_dev *tscadc_dev, -- -1.7.9.5 +1.9.0 diff --git a/patches/adc/0014-iio-ti_am335x_adc-Allow-to-specify-input-line.patch b/patches/adc/0014-iio-ti_am335x_adc-Allow-to-specify-input-line.patch index 680386fe..0ac7ca26 100644 --- a/patches/adc/0014-iio-ti_am335x_adc-Allow-to-specify-input-line.patch +++ b/patches/adc/0014-iio-ti_am335x_adc-Allow-to-specify-input-line.patch @@ -1,7 +1,7 @@ -From ee86a9dd759780d588e49d60cf3b6398359c1165 Mon Sep 17 00:00:00 2001 +From e6d0165af0f05ccf4b3d7025829646d79aaacdf1 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 12 Jun 2013 18:58:21 +0200 -Subject: [PATCH 14/21] iio: ti_am335x_adc: Allow to specify input line +Subject: [PATCH 14/19] iio: ti_am335x_adc: Allow to specify input line The TSC part allows to specify the input lines. The IIO part assumes that it usues always the last few, that means if IIO has adc-channels @@ -18,9 +18,9 @@ and does not rely on proper FIFO depth. Acked-by: Jonathan Cameron Signed-off-by: Sebastian Andrzej Siewior --- - arch/arm/boot/dts/am335x-evm.dts | 2 +- - drivers/iio/adc/ti_am335x_adc.c | 58 +++++++++++++++++++++++++------------- - drivers/mfd/ti_am335x_tscadc.c | 19 ++++++++++++- + arch/arm/boot/dts/am335x-evm.dts | 2 +- + drivers/iio/adc/ti_am335x_adc.c | 58 ++++++++++++++++++++++++++-------------- + drivers/mfd/ti_am335x_tscadc.c | 19 ++++++++++++- 3 files changed, 57 insertions(+), 22 deletions(-) diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts @@ -210,5 +210,5 @@ index 58f0860..640fe10 100644 if (!res) { dev_err(&pdev->dev, "no memory resource defined.\n"); -- -1.7.9.5 +1.9.0 diff --git a/patches/adc/0015-iio-ti_am335x_adc-check-if-we-found-the-value.patch b/patches/adc/0015-iio-ti_am335x_adc-check-if-we-found-the-value.patch index 0fa130aa..762b3413 100644 --- a/patches/adc/0015-iio-ti_am335x_adc-check-if-we-found-the-value.patch +++ b/patches/adc/0015-iio-ti_am335x_adc-check-if-we-found-the-value.patch @@ -1,7 +1,7 @@ -From 5fbc3052b76300d8255443295f4dbfb9c4950429 Mon Sep 17 00:00:00 2001 +From a422d41b47e1fb6e043ed8234e7618a4e73bbde3 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 12 Jun 2013 18:58:22 +0200 -Subject: [PATCH 15/21] iio: ti_am335x_adc: check if we found the value +Subject: [PATCH 15/19] iio: ti_am335x_adc: check if we found the value Usually we get all the values we wanted but it is possible, that te ADC unit is busy performing the conversation for the HW events. In that case @@ -10,7 +10,7 @@ unit is busy performing the conversation for the HW events. In that case Acked-by: Jonathan Cameron Signed-off-by: Sebastian Andrzej Siewior --- - drivers/iio/adc/ti_am335x_adc.c | 8 ++++++-- + drivers/iio/adc/ti_am335x_adc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c @@ -43,5 +43,5 @@ index a2b6ebd..624935c 100644 } -- -1.7.9.5 +1.9.0 diff --git a/patches/adc/0016-MFD-ti_tscadc-disable-TSC-control-register-bits-when.patch b/patches/adc/0016-MFD-ti_tscadc-disable-TSC-control-register-bits-when.patch index 70ef067b..e311e9b5 100644 --- a/patches/adc/0016-MFD-ti_tscadc-disable-TSC-control-register-bits-when.patch +++ b/patches/adc/0016-MFD-ti_tscadc-disable-TSC-control-register-bits-when.patch @@ -1,7 +1,7 @@ -From abfed3273513d854c5e81c5bf18f4c701ba6355a Mon Sep 17 00:00:00 2001 +From b5c57978955285081f7a3986fb2db2918fd4fd82 Mon Sep 17 00:00:00 2001 From: "Patil, Rachna" Date: Thu, 27 Jun 2013 22:47:13 +0100 -Subject: [PATCH 16/21] MFD: ti_tscadc: disable TSC control register bits when +Subject: [PATCH 16/19] MFD: ti_tscadc: disable TSC control register bits when TSC not in use AFE Pen Ctrl and TouchScreen transistors enabling is not @@ -11,11 +11,11 @@ TSC driver before accessing control register. Signed-off-by: Patil, Rachna Acked-by: Vaibhav Hiremath --- - drivers/mfd/ti_am335x_tscadc.c | 18 +++++++++++------- + drivers/mfd/ti_am335x_tscadc.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c -index 640fe10..408e859 100644 +index 640fe10..addd23d 100644 --- a/drivers/mfd/ti_am335x_tscadc.c +++ b/drivers/mfd/ti_am335x_tscadc.c @@ -220,13 +220,14 @@ static int ti_tscadc_probe(struct platform_device *pdev) @@ -26,13 +26,13 @@ index 640fe10..408e859 100644 - CNTRLREG_STEPID | - CNTRLREG_4WIRE; + CNTRLREG_STEPID; -+ if (tsc_wires > 0) ++ if (tsc_wires > 0) + ctrl |= CNTRLREG_4WIRE | CNTRLREG_TSCENB; tscadc_writel(tscadc, REG_CTRL, ctrl); /* Set register bits for Idle Config Mode */ - tscadc_idle_config(tscadc); -+ if (tsc_wires > 0) ++ if (tsc_wires > 0) + tscadc_idle_config(tscadc); /* Enable the TSC module enable bit */ @@ -49,11 +49,11 @@ index 640fe10..408e859 100644 tscadc_writel(tscadc_dev, REG_CTRL, ctrl); - tscadc_idle_config(tscadc_dev); + -+ if (tscadc_dev->tsc_cell != -1) ++ if (tscadc_dev->tsc_cell != -1) + tscadc_idle_config(tscadc_dev); am335x_tsc_se_update(tscadc_dev); restore = tscadc_readl(tscadc_dev, REG_CTRL); tscadc_writel(tscadc_dev, REG_CTRL, -- -1.7.9.5 +1.9.0 diff --git a/patches/adc/0017-IIO-ADC-ti_adc-Fix-1st-sample-read.patch b/patches/adc/0017-IIO-ADC-ti_adc-Fix-1st-sample-read.patch index 9efa3fe7..11494af2 100644 --- a/patches/adc/0017-IIO-ADC-ti_adc-Fix-1st-sample-read.patch +++ b/patches/adc/0017-IIO-ADC-ti_adc-Fix-1st-sample-read.patch @@ -1,7 +1,7 @@ -From 0d45022e9bf73d936ef250fb81a01b9202bc2f47 Mon Sep 17 00:00:00 2001 +From a67891101722867b29a4db08345cdf45b9035394 Mon Sep 17 00:00:00 2001 From: "Patil, Rachna" Date: Thu, 27 Jun 2013 23:49:41 +0100 -Subject: [PATCH 17/21] IIO: ADC: ti_adc: Fix 1st sample read +Subject: [PATCH 17/19] IIO: ADC: ti_adc: Fix 1st sample read Previously we tried to read data form ADC even before ADC sequencer finished sampling. This led to wrong samples. @@ -9,8 +9,8 @@ We now wait on ADC status register idle bit to be set. Signed-off-by: Patil, Rachna --- - drivers/iio/adc/ti_am335x_adc.c | 29 +++++++++++++++++++++-------- - include/linux/mfd/ti_am335x_tscadc.h | 17 +++++++++++++++++ + drivers/iio/adc/ti_am335x_adc.c | 29 +++++++++++++++++++++-------- + include/linux/mfd/ti_am335x_tscadc.h | 17 +++++++++++++++++ 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c @@ -114,5 +114,5 @@ index 9598360..17c0cba 100644 struct mfd_tscadc_board { -- -1.7.9.5 +1.9.0 diff --git a/patches/adc/0018-input-ti_tsc-Enable-shared-IRQ-TSC.patch b/patches/adc/0018-input-ti_tsc-Enable-shared-IRQ-TSC.patch index ca423dd3..91525176 100644 --- a/patches/adc/0018-input-ti_tsc-Enable-shared-IRQ-TSC.patch +++ b/patches/adc/0018-input-ti_tsc-Enable-shared-IRQ-TSC.patch @@ -1,7 +1,7 @@ -From 8b8b3e58bdc34c47a68a5b3c656d6d348f471318 Mon Sep 17 00:00:00 2001 +From 797b5e310b6dfe2ddd2ca4e55c7a5ade40b8c204 Mon Sep 17 00:00:00 2001 From: "Patil, Rachna" Date: Fri, 28 Jun 2013 00:45:20 +0100 -Subject: [PATCH 18/21] input : ti_tsc : Enable shared IRQ TSC +Subject: [PATCH 18/19] input : ti_tsc : Enable shared IRQ TSC Touchscreen and ADC share the same IRQ line from parent MFD core. Previously only Touchscreen was interrupt based. @@ -12,8 +12,9 @@ touchscreen. Signed-off-by: Patil, Rachna Acked-by: Vaibhav Hiremath --- - drivers/input/touchscreen/ti_am335x_tsc.c | 23 +++++++++++++++-------- - 1 file changed, 15 insertions(+), 8 deletions(-) + drivers/input/touchscreen/ti_am335x_tsc.c | 23 +++++++++++++++-------- + include/linux/mfd/ti_am335x_tscadc.h | 13 ++++++++++++- + 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c index f0acdca..8933c91 100644 @@ -69,6 +70,55 @@ index f0acdca..8933c91 100644 if (err) { dev_err(&pdev->dev, "failed to allocate irq.\n"); goto err_free_mem; +diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h +index 17c0cba..3a9c00f 100644 +--- a/include/linux/mfd/ti_am335x_tscadc.h ++++ b/include/linux/mfd/ti_am335x_tscadc.h +@@ -46,17 +46,23 @@ + /* Step Enable */ + #define STEPENB_MASK (0x1FFFF << 0) + #define STEPENB(val) ((val) << 0) ++#define ENB(val) (1 << (val)) ++#define STPENB_STEPENB STEPENB(0x1FFFF) ++#define STPENB_STEPENB_TC STEPENB(0x1FFF) + + /* IRQ enable */ + #define IRQENB_HW_PEN BIT(0) + #define IRQENB_FIFO0THRES BIT(2) + #define IRQENB_FIFO1THRES BIT(5) + #define IRQENB_PENUP BIT(9) ++#define IRQENB_FIFO1OVRRUN BIT(6) ++#define IRQENB_FIFO1UNDRFLW BIT(7) + + /* Step Configuration */ + #define STEPCONFIG_MODE_MASK (3 << 0) + #define STEPCONFIG_MODE(val) ((val) << 0) + #define STEPCONFIG_MODE_HWSYNC STEPCONFIG_MODE(2) ++#define STEPCONFIG_MODE_SWCNT STEPCONFIG_MODE(1) + #define STEPCONFIG_AVG_MASK (7 << 2) + #define STEPCONFIG_AVG(val) ((val) << 2) + #define STEPCONFIG_AVG_16 STEPCONFIG_AVG(4) +@@ -124,7 +130,8 @@ + #define MAX_CLK_DIV 7 + #define TOTAL_STEPS 16 + #define TOTAL_CHANNELS 8 +- ++#define FIFO1_THRESHOLD 19 ++#define FIFO_SIZE 64 + /* + * ADC runs at 3MHz, and it takes + * 15 cycles to latch one data output. +@@ -159,6 +166,10 @@ struct ti_tscadc_dev { + + /* adc device */ + struct adc_device *adc; ++ ++ /* Context save */ ++ unsigned int irqstat; ++ unsigned int ctrl; + }; + + static inline struct ti_tscadc_dev *ti_tscadc_dev_get(struct platform_device *p) -- -1.7.9.5 +1.9.0 diff --git a/patches/adc/0020-iio-ti_am335x_adc-Add-IIO-map-interface.patch b/patches/adc/0019-iio-ti_am335x_adc-Add-IIO-map-interface.patch similarity index 77% rename from patches/adc/0020-iio-ti_am335x_adc-Add-IIO-map-interface.patch rename to patches/adc/0019-iio-ti_am335x_adc-Add-IIO-map-interface.patch index 1df04737..04bc7510 100644 --- a/patches/adc/0020-iio-ti_am335x_adc-Add-IIO-map-interface.patch +++ b/patches/adc/0019-iio-ti_am335x_adc-Add-IIO-map-interface.patch @@ -1,29 +1,29 @@ -From 5db44aeb51721fe43fca7668508adebb9cca899a Mon Sep 17 00:00:00 2001 +From 0b3c72c70b1dc422d3a7cdb57ee7417f05ead5ef Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Sat, 27 Jul 2013 13:06:21 +0100 -Subject: [PATCH 20/21] iio: ti_am335x_adc: Add IIO map interface +Subject: [PATCH 19/19] iio: ti_am335x_adc: Add IIO map interface Add an IIO map interface that consumers can use. Signed-off-by: Pantelis Antoniou Signed-off-by: Zubair Lutfullah --- - drivers/iio/adc/ti_am335x_adc.c | 50 +++++++++++++++++++++++++++++++++++---- + drivers/iio/adc/ti_am335x_adc.c | 50 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c -index d626508..a172dfb 100644 +index f78d2c1..c380142 100644 --- a/drivers/iio/adc/ti_am335x_adc.c +++ b/drivers/iio/adc/ti_am335x_adc.c -@@ -38,6 +38,7 @@ +@@ -33,6 +33,7 @@ struct tiadc_device { struct ti_tscadc_dev *mfd_tscadc; int channels; + struct iio_map *map; u8 channel_line[8]; u8 channel_step[8]; - struct work_struct poll_work; -@@ -300,13 +301,16 @@ static int tiadc_channel_init(struct iio_dev *indio_dev, int channels) + }; +@@ -105,13 +106,16 @@ static int tiadc_channel_init(struct iio_dev *indio_dev, int channels) struct tiadc_device *adc_dev = iio_priv(indio_dev); struct iio_chan_spec *chan_array; struct iio_chan_spec *chan; @@ -43,10 +43,10 @@ index d626508..a172dfb 100644 chan = chan_array; for (i = 0; i < channels; i++, chan++) { -@@ -323,12 +327,44 @@ static int tiadc_channel_init(struct iio_dev *indio_dev, int channels) - } +@@ -128,12 +132,44 @@ static int tiadc_channel_init(struct iio_dev *indio_dev, int channels) indio_dev->channels = chan_array; + + + map = kcalloc(channels + 1, sizeof(struct iio_map), GFP_KERNEL); + if (map == NULL) { @@ -88,8 +88,8 @@ index d626508..a172dfb 100644 } static int tiadc_read_raw(struct iio_dev *indio_dev, -@@ -436,8 +472,10 @@ static int tiadc_probe(struct platform_device *pdev) - tiadc_writel(adc_dev, REG_FIFO1THR, FIFO1_THRESHOLD); +@@ -246,12 +282,16 @@ static int tiadc_probe(struct platform_device *pdev) + tiadc_step_config(adc_dev); err = tiadc_channel_init(indio_dev, adc_dev->channels); - if (err < 0) @@ -98,11 +98,6 @@ index d626508..a172dfb 100644 goto err_free_device; + } - INIT_WORK(&adc_dev->poll_work, &tiadc_adc_work); - init_waitqueue_head(&adc_dev->wq_data_avail); -@@ -453,8 +491,10 @@ static int tiadc_probe(struct platform_device *pdev) - goto err_unregister; - err = iio_device_register(indio_dev); - if (err) + if (err) { @@ -113,5 +108,5 @@ index d626508..a172dfb 100644 platform_set_drvdata(pdev, indio_dev); -- -1.7.9.5 +1.9.0 diff --git a/patches/adc/0019-iio-ti_am335x_adc-Add-continuous-sampling-and-trigge.patch b/patches/adc/0019-iio-ti_am335x_adc-Add-continuous-sampling-and-trigge.patch deleted file mode 100644 index 3e845a9d..00000000 --- a/patches/adc/0019-iio-ti_am335x_adc-Add-continuous-sampling-and-trigge.patch +++ /dev/null @@ -1,530 +0,0 @@ -From 2a11049a92900e681b34ef8e8b47ad7a4c3114f7 Mon Sep 17 00:00:00 2001 -From: Zubair Lutfullah -Date: Sat, 27 Jul 2013 12:34:04 +0100 -Subject: [PATCH 19/21] iio: ti_am335x_adc: Add continuous sampling and - trigger support - -Previously the driver had only one-shot reading functionality. -This patch adds triggered buffer support to the driver. -A buffer of samples can now be read via /dev/iio. - -Patil Rachna (TI) laid the ground work for ADC HW register access. -Russ Dill (TI) fixed bugs in the driver relevant to FIFOs and IRQs. - -I fixed channel scanning so multiple ADC channels can be read -simultaneously and pushed to userspace. -Restructured the driver to fit IIO ABI. -And added trigger support. - -Signed-off-by: Zubair Lutfullah -Acked-by: Greg Kroah-Hartman -Signed-off-by: Russ Dill ---- - drivers/iio/adc/ti_am335x_adc.c | 335 ++++++++++++++++++++++++++++------ - include/linux/mfd/ti_am335x_tscadc.h | 13 +- - 2 files changed, 287 insertions(+), 61 deletions(-) - -diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c -index f78d2c1..d626508 100644 ---- a/drivers/iio/adc/ti_am335x_adc.c -+++ b/drivers/iio/adc/ti_am335x_adc.c -@@ -26,15 +26,26 @@ - #include - #include - #include -- - #include - #include -+#include -+#include -+#include -+#include -+#include -+#include - - struct tiadc_device { - struct ti_tscadc_dev *mfd_tscadc; - int channels; - u8 channel_line[8]; - u8 channel_step[8]; -+ struct work_struct poll_work; -+ wait_queue_head_t wq_data_avail; -+ bool data_avail; -+ u32 *inputbuffer; -+ int sample_count; -+ int irq; - }; - - static unsigned int tiadc_readl(struct tiadc_device *adc, unsigned int reg) -@@ -57,27 +68,28 @@ static u32 get_adc_step_mask(struct tiadc_device *adc_dev) - return step_en; - } - --static void tiadc_step_config(struct tiadc_device *adc_dev) -+static void tiadc_step_config(struct iio_dev *indio_dev) - { -+ struct tiadc_device *adc_dev = iio_priv(indio_dev); - unsigned int stepconfig; -- int i, steps; -+ int i, steps, chan; - - /* - * There are 16 configurable steps and 8 analog input - * lines available which are shared between Touchscreen and ADC. -- * - * Steps backwards i.e. from 16 towards 0 are used by ADC - * depending on number of input lines needed. - * Channel would represent which analog input - * needs to be given to ADC to digitalize data. - */ -- - steps = TOTAL_STEPS - adc_dev->channels; -- stepconfig = STEPCONFIG_AVG_16 | STEPCONFIG_FIFO1; -+ if (iio_buffer_enabled(indio_dev)) -+ stepconfig = STEPCONFIG_AVG_16 | STEPCONFIG_FIFO1 -+ | STEPCONFIG_MODE_SWCNT; -+ else -+ stepconfig = STEPCONFIG_AVG_16 | STEPCONFIG_FIFO1; - - for (i = 0; i < adc_dev->channels; i++) { -- int chan; -- - chan = adc_dev->channel_line[i]; - tiadc_writel(adc_dev, REG_STEPCONFIG(steps), - stepconfig | STEPCONFIG_INP(chan)); -@@ -86,7 +98,190 @@ static void tiadc_step_config(struct tiadc_device *adc_dev) - adc_dev->channel_step[i] = steps; - steps++; - } -+} -+ -+static irqreturn_t tiadc_irq(int irq, void *private) -+{ -+ struct iio_dev *idev = private; -+ struct tiadc_device *adc_dev = iio_priv(idev); -+ unsigned int status, config; -+ status = tiadc_readl(adc_dev, REG_IRQSTATUS); -+ -+ /* FIFO Overrun. Clear flag. Disable/Enable ADC to recover */ -+ if (status & IRQENB_FIFO1OVRRUN) { -+ config = tiadc_readl(adc_dev, REG_CTRL); -+ config &= ~(CNTRLREG_TSCSSENB); -+ tiadc_writel(adc_dev, REG_CTRL, config); -+ tiadc_writel(adc_dev, REG_IRQSTATUS, IRQENB_FIFO1OVRRUN | -+ IRQENB_FIFO1UNDRFLW | IRQENB_FIFO1THRES); -+ tiadc_writel(adc_dev, REG_CTRL, (config | CNTRLREG_TSCSSENB)); -+ return IRQ_HANDLED; -+ } else if (status & IRQENB_FIFO1THRES) { -+ /* Wake adc_work that pushes FIFO data to iio buffer */ -+ tiadc_writel(adc_dev, REG_IRQCLR, IRQENB_FIFO1THRES); -+ adc_dev->data_avail = 1; -+ wake_up_interruptible(&adc_dev->wq_data_avail); -+ return IRQ_HANDLED; -+ } else -+ return IRQ_NONE; -+} -+ -+static irqreturn_t tiadc_trigger_h(int irq, void *p) -+{ -+ struct iio_poll_func *pf = p; -+ struct iio_dev *indio_dev = pf->indio_dev; -+ struct tiadc_device *adc_dev = iio_priv(indio_dev); -+ unsigned int config; -+ -+ schedule_work(&adc_dev->poll_work); -+ config = tiadc_readl(adc_dev, REG_CTRL); -+ tiadc_writel(adc_dev, REG_CTRL, config & ~CNTRLREG_TSCSSENB); -+ tiadc_writel(adc_dev, REG_CTRL, config | CNTRLREG_TSCSSENB); -+ -+ tiadc_writel(adc_dev, REG_IRQSTATUS, IRQENB_FIFO1THRES | -+ IRQENB_FIFO1OVRRUN | IRQENB_FIFO1UNDRFLW); -+ tiadc_writel(adc_dev, REG_IRQENABLE, IRQENB_FIFO1THRES -+ | IRQENB_FIFO1OVRRUN); -+ -+ iio_trigger_notify_done(indio_dev->trig); -+ return IRQ_HANDLED; -+} -+ -+static int tiadc_buffer_preenable(struct iio_dev *indio_dev) -+{ -+ return iio_sw_buffer_preenable(indio_dev); -+} -+ -+static int tiadc_buffer_postenable(struct iio_dev *indio_dev) -+{ -+ struct tiadc_device *adc_dev = iio_priv(indio_dev); -+ struct iio_buffer *buffer = indio_dev->buffer; -+ unsigned int enb, stepnum; -+ u8 bit; -+ -+ tiadc_step_config(indio_dev); -+ tiadc_writel(adc_dev, REG_SE, 0x00); -+ for_each_set_bit(bit, buffer->scan_mask, -+ adc_dev->channels) { -+ struct iio_chan_spec const *chan = indio_dev->channels + bit; -+ /* -+ * There are a total of 16 steps available -+ * that are shared between ADC and touchscreen. -+ * We start configuring from step 16 to 0 incase of -+ * ADC. Hence the relation between input channel -+ * and step for ADC would be as below. -+ */ -+ stepnum = chan->channel + 9; -+ enb = tiadc_readl(adc_dev, REG_SE); -+ enb |= (1 << stepnum); -+ tiadc_writel(adc_dev, REG_SE, enb); -+ } -+ -+ return iio_triggered_buffer_postenable(indio_dev); -+} -+ -+static int tiadc_buffer_predisable(struct iio_dev *indio_dev) -+{ -+ struct tiadc_device *adc_dev = iio_priv(indio_dev); -+ int fifo1count, i, read, config; -+ -+ config = tiadc_readl(adc_dev, REG_CTRL); -+ config &= ~(CNTRLREG_TSCSSENB); -+ tiadc_writel(adc_dev, REG_CTRL, config); -+ tiadc_writel(adc_dev, REG_IRQCLR, (IRQENB_FIFO1THRES | -+ IRQENB_FIFO1OVRRUN | IRQENB_FIFO1UNDRFLW)); -+ tiadc_writel(adc_dev, REG_SE, STPENB_STEPENB_TC); -+ -+ /* Flush FIFO of any leftover data */ -+ fifo1count = tiadc_readl(adc_dev, REG_FIFO1CNT); -+ for (i = 0; i < fifo1count; i++) -+ read = tiadc_readl(adc_dev, REG_FIFO1); -+ -+ return iio_triggered_buffer_predisable(indio_dev); -+} -+ -+static int tiadc_buffer_postdisable(struct iio_dev *indio_dev) -+{ -+ struct tiadc_device *adc_dev = iio_priv(indio_dev); -+ int config; -+ -+ tiadc_step_config(indio_dev); -+ config = tiadc_readl(adc_dev, REG_CTRL); -+ tiadc_writel(adc_dev, REG_CTRL, (config | CNTRLREG_TSCSSENB)); -+ -+ return 0; -+} -+ -+static const struct iio_buffer_setup_ops tiadc_buffer_setup_ops = { -+ .preenable = &tiadc_buffer_preenable, -+ .postenable = &tiadc_buffer_postenable, -+ .predisable = &tiadc_buffer_predisable, -+ .postdisable = &tiadc_buffer_postdisable, -+}; -+ -+static void tiadc_adc_work(struct work_struct *work_s) -+{ -+ struct tiadc_device *adc_dev = -+ container_of(work_s, struct tiadc_device, poll_work); -+ struct iio_dev *indio_dev = iio_priv_to_dev(adc_dev); -+ struct iio_buffer *buffer = indio_dev->buffer; -+ int i, j, k, fifo1count, read; -+ unsigned int config; -+ int size_to_acquire = buffer->access->get_length(buffer); -+ int sample_count = 0; -+ u32 *data; -+ -+ adc_dev->data_avail = 0; -+ data = kmalloc(indio_dev->scan_bytes, GFP_KERNEL); -+ if (data == NULL) -+ goto out; -+ -+ while (sample_count < size_to_acquire) { -+ tiadc_writel(adc_dev, REG_IRQSTATUS, IRQENB_FIFO1THRES); -+ tiadc_writel(adc_dev, REG_IRQENABLE, IRQENB_FIFO1THRES); -+ -+ wait_event_interruptible(adc_dev->wq_data_avail, -+ (adc_dev->data_avail == 1)); -+ adc_dev->data_avail = 0; -+ -+ fifo1count = tiadc_readl(adc_dev, REG_FIFO1CNT); -+ if (fifo1count * sizeof(u32) < -+ buffer->access->get_bytes_per_datum(buffer)) -+ continue; -+ -+ sample_count = sample_count + fifo1count; -+ for (k = 0; k < fifo1count; k = k + i) { -+ for (i = 0, j = 0; i < (indio_dev->scan_bytes)/4; i++) { -+ read = tiadc_readl(adc_dev, REG_FIFO1); -+ data[i] = read & FIFOREAD_DATA_MASK; -+ } -+ iio_push_to_buffers(indio_dev, (u8 *) data); -+ } -+ } -+out: -+ tiadc_writel(adc_dev, REG_IRQCLR, (IRQENB_FIFO1THRES | -+ IRQENB_FIFO1OVRRUN | IRQENB_FIFO1UNDRFLW)); -+ config = tiadc_readl(adc_dev, REG_CTRL); -+ tiadc_writel(adc_dev, REG_CTRL, config & ~CNTRLREG_TSCSSENB); -+} -+ -+irqreturn_t tiadc_iio_pollfunc(int irq, void *p) -+{ -+ struct iio_poll_func *pf = p; -+ struct iio_dev *indio_dev = pf->indio_dev; -+ struct tiadc_device *adc_dev = iio_priv(indio_dev); -+ int i, fifo1count, read; - -+ tiadc_writel(adc_dev, REG_IRQCLR, (IRQENB_FIFO1THRES | -+ IRQENB_FIFO1OVRRUN | -+ IRQENB_FIFO1UNDRFLW)); -+ -+ /* Flush FIFO before trigger */ -+ fifo1count = tiadc_readl(adc_dev, REG_FIFO1CNT); -+ for (i = 0; i < fifo1count; i++) -+ read = tiadc_readl(adc_dev, REG_FIFO1); -+ -+ return IRQ_WAKE_THREAD; - } - - static const char * const chan_name_ain[] = { -@@ -121,13 +316,13 @@ static int tiadc_channel_init(struct iio_dev *indio_dev, int channels) - chan->channel = adc_dev->channel_line[i]; - chan->info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT; - chan->datasheet_name = chan_name_ain[chan->channel]; -+ chan->scan_index = i; - chan->scan_type.sign = 'u'; - chan->scan_type.realbits = 12; - chan->scan_type.storagebits = 32; - } - - indio_dev->channels = chan_array; -- - return 0; - } - -@@ -142,61 +337,53 @@ static int tiadc_read_raw(struct iio_dev *indio_dev, - { - struct tiadc_device *adc_dev = iio_priv(indio_dev); - int i, map_val; -- unsigned int fifo1count, read, stepid; -- u32 step = UINT_MAX; -- bool found = false; -- u32 step_en; -- unsigned long timeout = jiffies + usecs_to_jiffies -- (IDLE_TIMEOUT * adc_dev->channels); -- step_en = get_adc_step_mask(adc_dev); -- am335x_tsc_se_set(adc_dev->mfd_tscadc, step_en); -- -- /* Wait for ADC sequencer to complete sampling */ -- while (tiadc_readl(adc_dev, REG_ADCFSM) & SEQ_STATUS) { -- if (time_after(jiffies, timeout)) -- return -EAGAIN; -- } -- map_val = chan->channel + TOTAL_CHANNELS; -- /* -- * When the sub-system is first enabled, -- * the sequencer will always start with the -- * lowest step (1) and continue until step (16). -- * For ex: If we have enabled 4 ADC channels and -- * currently use only 1 out of them, the -- * sequencer still configures all the 4 steps, -- * leading to 3 unwanted data. -- * Hence we need to flush out this data. -- */ -- -- for (i = 0; i < ARRAY_SIZE(adc_dev->channel_step); i++) { -- if (chan->channel == adc_dev->channel_line[i]) { -- step = adc_dev->channel_step[i]; -- break; -- } -- } -- if (WARN_ON_ONCE(step == UINT_MAX)) -- return -EINVAL; -- -- fifo1count = tiadc_readl(adc_dev, REG_FIFO1CNT); -- for (i = 0; i < fifo1count; i++) { -- read = tiadc_readl(adc_dev, REG_FIFO1); -- stepid = read & FIFOREAD_CHNLID_MASK; -- stepid = stepid >> 0x10; -+ unsigned int fifo1count, read, stepid, step_en; - -- if (stepid == map_val) { -- read = read & FIFOREAD_DATA_MASK; -- found = true; -- *val = read; -+ if (iio_buffer_enabled(indio_dev)) -+ return -EBUSY; -+ else { -+ unsigned long timeout = jiffies + usecs_to_jiffies -+ (IDLE_TIMEOUT * adc_dev->channels); -+ step_en = get_adc_step_mask(adc_dev); -+ am335x_tsc_se_set(adc_dev->mfd_tscadc, step_en); -+ -+ /* Wait for ADC sequencer to complete sampling */ -+ while (tiadc_readl(adc_dev, REG_ADCFSM) & SEQ_STATUS) { -+ if (time_after(jiffies, timeout)) -+ return -EAGAIN; -+ } -+ map_val = chan->channel + TOTAL_CHANNELS; -+ -+ /* -+ * When the sub-system is first enabled, -+ * the sequencer will always start with the -+ * lowest step (1) and continue until step (16). -+ * For ex: If we have enabled 4 ADC channels and -+ * currently use only 1 out of them, the -+ * sequencer still configures all the 4 steps, -+ * leading to 3 unwanted data. -+ * Hence we need to flush out this data. -+ */ -+ -+ fifo1count = tiadc_readl(adc_dev, REG_FIFO1CNT); -+ for (i = 0; i < fifo1count; i++) { -+ read = tiadc_readl(adc_dev, REG_FIFO1); -+ stepid = read & FIFOREAD_CHNLID_MASK; -+ stepid = stepid >> 0x10; -+ -+ if (stepid == map_val) { -+ read = read & FIFOREAD_DATA_MASK; -+ *val = read; -+ return IIO_VAL_INT; -+ } - } -+ return -EAGAIN; - } -- -- if (found == false) -- return -EBUSY; -- return IIO_VAL_INT; - } - - static const struct iio_info tiadc_info = { - .read_raw = &tiadc_read_raw, -+ .driver_module = THIS_MODULE, - }; - - static int tiadc_probe(struct platform_device *pdev) -@@ -237,18 +424,34 @@ static int tiadc_probe(struct platform_device *pdev) - } - adc_dev->channels = channels; - } -+ adc_dev->channels = channels; -+ adc_dev->irq = adc_dev->mfd_tscadc->irq; - - indio_dev->dev.parent = &pdev->dev; - indio_dev->name = dev_name(&pdev->dev); - indio_dev->modes = INDIO_DIRECT_MODE; - indio_dev->info = &tiadc_info; - -- tiadc_step_config(adc_dev); -+ tiadc_step_config(indio_dev); -+ tiadc_writel(adc_dev, REG_FIFO1THR, FIFO1_THRESHOLD); - - err = tiadc_channel_init(indio_dev, adc_dev->channels); - if (err < 0) - goto err_free_device; - -+ INIT_WORK(&adc_dev->poll_work, &tiadc_adc_work); -+ init_waitqueue_head(&adc_dev->wq_data_avail); -+ -+ err = request_irq(adc_dev->irq, tiadc_irq, IRQF_SHARED, -+ indio_dev->name, indio_dev); -+ if (err) -+ goto err_free_irq; -+ -+ err = iio_triggered_buffer_setup(indio_dev, &tiadc_iio_pollfunc, -+ &tiadc_trigger_h, &tiadc_buffer_setup_ops); -+ if (err) -+ goto err_unregister; -+ - err = iio_device_register(indio_dev); - if (err) - goto err_free_channels; -@@ -257,6 +460,10 @@ static int tiadc_probe(struct platform_device *pdev) - - return 0; - -+err_unregister: -+ iio_buffer_unregister(indio_dev); -+err_free_irq: -+ free_irq(adc_dev->irq, indio_dev); - err_free_channels: - tiadc_channels_remove(indio_dev); - err_free_device: -@@ -271,7 +478,9 @@ static int tiadc_remove(struct platform_device *pdev) - struct tiadc_device *adc_dev = iio_priv(indio_dev); - u32 step_en; - -+ free_irq(adc_dev->irq, indio_dev); - iio_device_unregister(indio_dev); -+ iio_buffer_unregister(indio_dev); - tiadc_channels_remove(indio_dev); - - step_en = get_adc_step_mask(adc_dev); -@@ -309,10 +518,16 @@ static int tiadc_resume(struct device *dev) - - /* Make sure ADC is powered up */ - restore = tiadc_readl(adc_dev, REG_CTRL); -- restore &= ~(CNTRLREG_POWERDOWN); -+ restore &= ~(CNTRLREG_TSCSSENB); - tiadc_writel(adc_dev, REG_CTRL, restore); - -- tiadc_step_config(adc_dev); -+ tiadc_writel(adc_dev, REG_FIFO1THR, FIFO1_THRESHOLD); -+ tiadc_step_config(indio_dev); -+ -+ /* Make sure ADC is powered up */ -+ restore &= ~(CNTRLREG_POWERDOWN); -+ restore |= CNTRLREG_TSCSSENB; -+ tiadc_writel(adc_dev, REG_CTRL, restore); - - return 0; - } -diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h -index 17c0cba..3a9c00f 100644 ---- a/include/linux/mfd/ti_am335x_tscadc.h -+++ b/include/linux/mfd/ti_am335x_tscadc.h -@@ -46,17 +46,23 @@ - /* Step Enable */ - #define STEPENB_MASK (0x1FFFF << 0) - #define STEPENB(val) ((val) << 0) -+#define ENB(val) (1 << (val)) -+#define STPENB_STEPENB STEPENB(0x1FFFF) -+#define STPENB_STEPENB_TC STEPENB(0x1FFF) - - /* IRQ enable */ - #define IRQENB_HW_PEN BIT(0) - #define IRQENB_FIFO0THRES BIT(2) - #define IRQENB_FIFO1THRES BIT(5) - #define IRQENB_PENUP BIT(9) -+#define IRQENB_FIFO1OVRRUN BIT(6) -+#define IRQENB_FIFO1UNDRFLW BIT(7) - - /* Step Configuration */ - #define STEPCONFIG_MODE_MASK (3 << 0) - #define STEPCONFIG_MODE(val) ((val) << 0) - #define STEPCONFIG_MODE_HWSYNC STEPCONFIG_MODE(2) -+#define STEPCONFIG_MODE_SWCNT STEPCONFIG_MODE(1) - #define STEPCONFIG_AVG_MASK (7 << 2) - #define STEPCONFIG_AVG(val) ((val) << 2) - #define STEPCONFIG_AVG_16 STEPCONFIG_AVG(4) -@@ -124,7 +130,8 @@ - #define MAX_CLK_DIV 7 - #define TOTAL_STEPS 16 - #define TOTAL_CHANNELS 8 -- -+#define FIFO1_THRESHOLD 19 -+#define FIFO_SIZE 64 - /* - * ADC runs at 3MHz, and it takes - * 15 cycles to latch one data output. -@@ -159,6 +166,10 @@ struct ti_tscadc_dev { - - /* adc device */ - struct adc_device *adc; -+ -+ /* Context save */ -+ unsigned int irqstat; -+ unsigned int ctrl; - }; - - static inline struct ti_tscadc_dev *ti_tscadc_dev_get(struct platform_device *p) --- -1.7.9.5 - diff --git a/patches/arm/0001-deb-pkg-Simplify-architecture-matching-for-cross-bui.patch b/patches/arm/0001-deb-pkg-Simplify-architecture-matching-for-cross-bui.patch index 0359f142..e8764682 100644 --- a/patches/arm/0001-deb-pkg-Simplify-architecture-matching-for-cross-bui.patch +++ b/patches/arm/0001-deb-pkg-Simplify-architecture-matching-for-cross-bui.patch @@ -1,7 +1,7 @@ -From abf6224661450a8a9a2dfe954357e4ebe2e10481 Mon Sep 17 00:00:00 2001 +From 99c5dabb6473446b8b1c597b7edd9bd7676c3665 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 6 Sep 2012 15:22:02 +0200 -Subject: [PATCH 1/4] deb-pkg: Simplify architecture matching for cross +Subject: [PATCH 1/5] deb-pkg: Simplify architecture matching for cross building No point in invoking dpkg to get the archticture of the host @@ -13,7 +13,7 @@ built arch. Signed-off-by: maximilian attems --- - scripts/package/builddeb | 81 ++++++++++++++++++++++------------------------ + scripts/package/builddeb | 81 +++++++++++++++++++++++------------------------- 1 file changed, 38 insertions(+), 43 deletions(-) diff --git a/scripts/package/builddeb b/scripts/package/builddeb @@ -136,5 +136,5 @@ index acb8650..a5f197b 100644 This is useful for people who need to build external modules EOF -- -1.7.9.5 +1.9.0 diff --git a/patches/arm/0002-Without-MACH_-option-Early-printk-DEBUG_LL.patch b/patches/arm/0002-Without-MACH_-option-Early-printk-DEBUG_LL.patch index d7d3fa18..382f42ce 100644 --- a/patches/arm/0002-Without-MACH_-option-Early-printk-DEBUG_LL.patch +++ b/patches/arm/0002-Without-MACH_-option-Early-printk-DEBUG_LL.patch @@ -1,7 +1,7 @@ -From 4c5228984f7e88ca231869c2d55f12f12d7aad7e Mon Sep 17 00:00:00 2001 +From 4e2e4bd6e7c0ef8efb3284872e0321e8c7246e41 Mon Sep 17 00:00:00 2001 From: "hvaibhav@ti.com" Date: Fri, 31 Aug 2012 16:47:12 +0000 -Subject: [PATCH 2/4] Without MACH_ option Early printk (DEBUG_LL) +Subject: [PATCH 2/5] Without MACH_ option Early printk (DEBUG_LL) On Fri, Aug 31, 2012 at 22:07:37, Hiremath, Vaibhav wrote: > On Fri, Aug 31, 2012 at 21:41:22, Tony Lindgren wrote: @@ -87,7 +87,7 @@ Conflicts: arch/arm/mach-omap2/Kconfig --- - arch/arm/mach-omap2/Kconfig | 3 +++ + arch/arm/mach-omap2/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig @@ -105,5 +105,5 @@ index ce05b87..9cbbd2b 100644 config OMAP_PACKAGE_ZAF bool -- -1.7.9.5 +1.9.0 diff --git a/patches/arm/0003-ARM-7668-1-fix-memset-related-crashes-caused-by-rece.patch b/patches/arm/0003-ARM-7668-1-fix-memset-related-crashes-caused-by-rece.patch index 75ce51e2..4301a8eb 100644 --- a/patches/arm/0003-ARM-7668-1-fix-memset-related-crashes-caused-by-rece.patch +++ b/patches/arm/0003-ARM-7668-1-fix-memset-related-crashes-caused-by-rece.patch @@ -1,7 +1,7 @@ -From 589d7bc7ef1efa5f39f63ae6136b8cafc11474a2 Mon Sep 17 00:00:00 2001 +From b61ebe1fd75fafef5f1c9b7540931652846ad68f Mon Sep 17 00:00:00 2001 From: Ivan Djelic Date: Wed, 6 Mar 2013 20:09:27 +0100 -Subject: [PATCH 3/4] ARM: 7668/1: fix memset-related crashes caused by recent +Subject: [PATCH 3/5] ARM: 7668/1: fix memset-related crashes caused by recent GCC (4.7.2) optimizations Recent GCC versions (e.g. GCC-4.7.2) perform optimizations based on @@ -94,7 +94,7 @@ Signed-off-by: Dirk Behme Signed-off-by: Russell King Signed-off-by: Khem Raj --- - arch/arm/lib/memset.S | 85 +++++++++++++++++++++++++------------------------ + arch/arm/lib/memset.S | 85 ++++++++++++++++++++++++++------------------------- 1 file changed, 44 insertions(+), 41 deletions(-) diff --git a/arch/arm/lib/memset.S b/arch/arm/lib/memset.S @@ -252,5 +252,5 @@ index 650d592..d912e73 100644 mov pc, lr ENDPROC(memset) -- -1.7.9.5 +1.9.0 diff --git a/patches/arm/0004-ARM-7670-1-fix-the-memset-fix.patch b/patches/arm/0004-ARM-7670-1-fix-the-memset-fix.patch index 3c13b8a5..8f4cfb7f 100644 --- a/patches/arm/0004-ARM-7670-1-fix-the-memset-fix.patch +++ b/patches/arm/0004-ARM-7670-1-fix-the-memset-fix.patch @@ -1,7 +1,7 @@ -From 62faa1e343ad3662445262038ee1ef6f94b4e974 Mon Sep 17 00:00:00 2001 +From 11ae48ffdd006fa5e696161a9bc1eff440e77e76 Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Tue, 12 Mar 2013 13:00:42 +0100 -Subject: [PATCH 4/4] ARM: 7670/1: fix the memset fix +Subject: [PATCH 4/5] ARM: 7670/1: fix the memset fix Commit 455bd4c430b0 ("ARM: 7668/1: fix memset-related crashes caused by recent GCC (4.7.2) optimizations") attempted to fix a compliance issue @@ -21,7 +21,7 @@ Signed-off-by: Nicolas Pitre Tested-by: Alexander Holler Signed-off-by: Russell King --- - arch/arm/lib/memset.S | 33 +++++++++++++-------------------- + arch/arm/lib/memset.S | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/arch/arm/lib/memset.S b/arch/arm/lib/memset.S @@ -79,5 +79,5 @@ index d912e73..94b0650 100644 + b 1b ENDPROC(memset) -- -1.7.9.5 +1.9.0 diff --git a/patches/arm/0005-ARM-DTS-AM33XX-Add-PMU-support.patch b/patches/arm/0005-ARM-DTS-AM33XX-Add-PMU-support.patch index de6424f7..1c72c553 100644 --- a/patches/arm/0005-ARM-DTS-AM33XX-Add-PMU-support.patch +++ b/patches/arm/0005-ARM-DTS-AM33XX-Add-PMU-support.patch @@ -1,4 +1,4 @@ -From 3e0d789298f285a691fb45487408aebb8966dcd7 Mon Sep 17 00:00:00 2001 +From 399a88ad36d4a98bb1ac32d099f4f418595d4168 Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Fri, 30 Aug 2013 15:09:45 +0200 Subject: [PATCH 5/5] ARM: DTS: AM33XX: Add PMU support @@ -30,5 +30,5 @@ index 6dcd42a..e0394d3 100644 * The soc node represents the soc top level view. It is uses for IPs * that are not memory mapped in the MPU view or for the MPU itself. -- -1.8.2.1 +1.9.0 diff --git a/patches/audio/0001-Make-the-McASP-code-generic-again-remove-all-hardcod.patch b/patches/audio/0001-Make-the-McASP-code-generic-again-remove-all-hardcod.patch new file mode 100644 index 00000000..ea932b78 --- /dev/null +++ b/patches/audio/0001-Make-the-McASP-code-generic-again-remove-all-hardcod.patch @@ -0,0 +1,162 @@ +From 5803997078d113a39e94010b4d9321451414bd0f Mon Sep 17 00:00:00 2001 +From: Darren Etheridge +Date: Mon, 1 Jul 2013 16:06:55 -0500 +Subject: [PATCH 1/3] Make the McASP code generic again, remove all hardcoding + +After adding the HDMI audio, the McASP driver was left in +a mess, and broken when used with other capes. This patch +puts things right, and moves the necessary config code into +davinci-evm.c where it belongs. + +Signed-off-by: Darren Etheridge +--- + sound/soc/davinci/davinci-evm.c | 42 +++++++++++++++++++++++++++++---------- + sound/soc/davinci/davinci-mcasp.c | 12 +++++------ + 2 files changed, 37 insertions(+), 17 deletions(-) + +diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c +index bbae516..421feb0 100644 +--- a/sound/soc/davinci/davinci-evm.c ++++ b/sound/soc/davinci/davinci-evm.c +@@ -146,6 +146,32 @@ static const struct snd_soc_dapm_route audio_map[] = { + }; + + /* Logic for a aic3x as connected on a davinci-evm */ ++static int evm_tda998x_init(struct snd_soc_pcm_runtime *rtd) ++{ ++ struct snd_soc_dai *codec_dai = rtd->codec_dai; ++ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; ++ int ret; ++ ++ ret = snd_soc_dai_set_clkdiv(cpu_dai, 0, 1); ++ if (ret < 0) ++ return ret; ++ ++ ret = snd_soc_dai_set_clkdiv(cpu_dai, 1, 8); ++ if (ret < 0) ++ return ret; ++ ++ ret = snd_soc_dai_set_sysclk(cpu_dai, 0, 0, SND_SOC_CLOCK_IN); ++ if (ret < 0) ++ return ret; ++ ++ ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_IB_NF); ++ if (ret < 0) ++ return ret; ++ ++ return 0; ++} ++ ++/* Logic for a aic3x as connected on a davinci-evm */ + static int evm_aic3x_init(struct snd_soc_pcm_runtime *rtd) + { + struct snd_soc_codec *codec = rtd->codec; +@@ -380,6 +406,7 @@ static int davinci_evm_probe(struct platform_device *pdev) + evm_dai.name = "NXP TDA HDMI Chip"; + evm_dai.stream_name = "HDMI"; + evm_dai.codec_dai_name = "nxp-hdmi-hifi"; ++ evm_dai.init = evm_tda998x_init; + + /* + * Move GPIO handling out of the probe, if probe gets +@@ -398,12 +425,9 @@ static int davinci_evm_probe(struct platform_device *pdev) + return -EINVAL; + } + gpio_set_value(clk_gpio, 1); +- evm_dai.dai_fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_IB_NF; + break; +- + } + +- + evm_dai.codec_of_node = of_parse_phandle(np, "ti,audio-codec", 0); + if (!evm_dai.codec_of_node) + return -EINVAL; +@@ -421,9 +445,9 @@ static int davinci_evm_probe(struct platform_device *pdev) + return ret; + + ret = snd_soc_register_card(&evm_soc_card); +- if (ret) { ++ if (ret) + dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); +- } ++ + return ret; + } + +@@ -460,9 +484,8 @@ static int __init evm_init(void) + * If dtb is there, the devices will be created dynamically. + * Only register platfrom driver structure. + */ +- if (of_have_populated_dt()) { +- return platform_driver_register(&davinci_evm_driver); +- } ++ if (of_have_populated_dt()) ++ return platform_driver_register(&davinci_evm_driver); + #endif + + if (machine_is_davinci_evm()) { +@@ -483,9 +506,8 @@ static int __init evm_init(void) + } else if (machine_is_davinci_da850_evm()) { + evm_snd_dev_data = &da850_snd_soc_card; + index = 0; +- } else { ++ } else + return -EINVAL; +- } + + evm_snd_device = platform_device_alloc("soc-audio", index); + if (!evm_snd_device) +diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c +index a89ece3..83232c6 100644 +--- a/sound/soc/davinci/davinci-mcasp.c ++++ b/sound/soc/davinci/davinci-mcasp.c +@@ -484,6 +484,10 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai, + mcasp_clr_bits(dev->base + DAVINCI_MCASP_TXFMCTL_REG, FSXDUR); + mcasp_clr_bits(dev->base + DAVINCI_MCASP_RXFMCTL_REG, FSRDUR); + break; ++ case SND_SOC_DAIFMT_I2S: ++ mcasp_set_bits(dev->base + DAVINCI_MCASP_TXFMCTL_REG, FSXDUR); ++ mcasp_set_bits(dev->base + DAVINCI_MCASP_RXFMCTL_REG, FSRDUR); ++ break; + default: + /* configure a full-word SYNC pulse (LRCLK) */ + mcasp_set_bits(dev->base + DAVINCI_MCASP_TXFMCTL_REG, FSXDUR); +@@ -498,16 +502,13 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai, + switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { + case SND_SOC_DAIFMT_CBS_CFS: + /* codec is clock and frame slave */ +- mcasp_set_bits(base + DAVINCI_MCASP_ACLKXCTL_REG, ACLKXE | ACLKXDIV(7)); +- mcasp_set_bits(base + DAVINCI_MCASP_AHCLKXCTL_REG, AHCLKXDIV(0)); +- mcasp_clr_bits(base + DAVINCI_MCASP_AHCLKXCTL_REG, AHCLKXE); ++ mcasp_set_bits(base + DAVINCI_MCASP_ACLKXCTL_REG, ACLKXE); + mcasp_set_bits(base + DAVINCI_MCASP_TXFMCTL_REG, AFSXE); + + mcasp_set_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRE); + mcasp_set_bits(base + DAVINCI_MCASP_RXFMCTL_REG, AFSRE); + + mcasp_set_bits(base + DAVINCI_MCASP_PDIR_REG, ACLKX | AFSX); +- mcasp_clr_bits(base + DAVINCI_MCASP_PDIR_REG, AHCLKX); + break; + case SND_SOC_DAIFMT_CBM_CFS: + /* codec is clock master and frame slave */ +@@ -749,7 +750,6 @@ static void davinci_hw_param(struct davinci_audio_dev *dev, int stream) + if (stream == SNDRV_PCM_STREAM_PLAYBACK) { + /* bit stream is MSB first with no delay */ + /* DSP_B mode */ +- mcasp_clr_bits(dev->base + DAVINCI_MCASP_AHCLKXCTL_REG, AHCLKXE); + mcasp_set_reg(dev->base + DAVINCI_MCASP_TXTDM_REG, mask); + mcasp_set_bits(dev->base + DAVINCI_MCASP_TXFMT_REG, TXORD); + +@@ -759,8 +759,6 @@ static void davinci_hw_param(struct davinci_audio_dev *dev, int stream) + else + printk(KERN_ERR "playback tdm slot %d not supported\n", + dev->tdm_slots); +- mcasp_set_bits(dev->base + DAVINCI_MCASP_TXFMCTL_REG, AFSXE); +- mcasp_set_bits(dev->base + DAVINCI_MCASP_TXFMCTL_REG, FSXDUR); + } else { + /* bit stream is MSB first with no delay */ + /* DSP_B mode */ +-- +1.9.0 + diff --git a/patches/audio/0001-arm-dts-add-am33xx-mcasp1-dt-node.patch b/patches/audio/0001-arm-dts-add-am33xx-mcasp1-dt-node.patch deleted file mode 100644 index e1e9d42e..00000000 --- a/patches/audio/0001-arm-dts-add-am33xx-mcasp1-dt-node.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 5de87f6a01f9067e0dc94092419ec01e16aebe86 Mon Sep 17 00:00:00 2001 -From: Joel A Fernandes -Date: Thu, 25 Oct 2012 00:02:27 -0500 -Subject: [PATCH 1/9] arm/dts: add am33xx mcasp1 dt node - -Add AM33xx McASP1 DT node. Device tree Data is split into SoC specific -and Board specific. - -Signed-off-by: Hebbar, Gururaja ---- - arch/arm/boot/dts/am335x-boneblack.dts | 14 ++++++++++++++ - arch/arm/boot/dts/am33xx.dtsi | 9 +++++++++ - 2 files changed, 23 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts -index 87257ac..a97ee36 100644 ---- a/arch/arm/boot/dts/am335x-boneblack.dts -+++ b/arch/arm/boot/dts/am335x-boneblack.dts -@@ -30,3 +30,17 @@ - ti,non-removable; - status = "okay"; - }; -+ -+ -+&mcasp0 { -+ op-mode = <0>; /* MCASP_IIS_MODE */ -+ tdm-slots = <2>; -+ num-serializer = <16>; -+ serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */ -+ 0 0 1 2 -+ 0 0 0 0 -+ 0 0 0 0 -+ 0 0 0 0 >; -+ tx-num-evt = <1>; -+ rx-num-evt = <1>; -+}; -diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi -index 8bddc9c..15e04d4 100644 ---- a/arch/arm/boot/dts/am33xx.dtsi -+++ b/arch/arm/boot/dts/am33xx.dtsi -@@ -258,6 +258,15 @@ - status = "disabled"; - }; - -+ mcasp0: mcasp@4803C000 { -+ compatible = "ti,omap2-mcasp-audio"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ ti,hwmods = "mcasp1"; -+ reg = <0x4803C000 0x2000>; -+ interrupts = <82 83>; -+ }; -+ - mmc1: mmc@48060000 { - compatible = "ti,omap3-hsmmc"; - ti,hwmods = "mmc1"; --- -1.7.7.6 - diff --git a/patches/audio/0002-ASoc-Davinci-EVM-Config-12MHz-CLK-for-AIC3x-Codec.patch b/patches/audio/0002-ASoc-Davinci-EVM-Config-12MHz-CLK-for-AIC3x-Codec.patch new file mode 100644 index 00000000..9ae9ab49 --- /dev/null +++ b/patches/audio/0002-ASoc-Davinci-EVM-Config-12MHz-CLK-for-AIC3x-Codec.patch @@ -0,0 +1,49 @@ +From 33a301587a50e68f1f75fbd7b3f94a00961e9da9 Mon Sep 17 00:00:00 2001 +From: Cody Lacey +Date: Fri, 18 Oct 2013 12:31:38 -0500 +Subject: [PATCH 2/3] ASoc: Davinci-EVM: Config 12MHz CLK for AIC3x Codec + +The AIC3x Codec needs a 12MHz clock source. If the +codec MCLK is connected to McASP AHCLKX or AHCLKR +then the 24MHz internal clock needs to be divided +by 2. +--- + sound/soc/davinci/davinci-evm.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c +index 421feb0..1d9e9ce 100644 +--- a/sound/soc/davinci/davinci-evm.c ++++ b/sound/soc/davinci/davinci-evm.c +@@ -145,7 +145,7 @@ static const struct snd_soc_dapm_route audio_map[] = { + {"LINE2R", NULL, "Line In"}, + }; + +-/* Logic for a aic3x as connected on a davinci-evm */ ++/* Logic for a tda998x as connected on a davinci-evm */ + static int evm_tda998x_init(struct snd_soc_pcm_runtime *rtd) + { + struct snd_soc_dai *codec_dai = rtd->codec_dai; +@@ -175,6 +175,7 @@ static int evm_tda998x_init(struct snd_soc_pcm_runtime *rtd) + static int evm_aic3x_init(struct snd_soc_pcm_runtime *rtd) + { + struct snd_soc_codec *codec = rtd->codec; ++ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; + struct snd_soc_dapm_context *dapm = &codec->dapm; + struct device_node *np = codec->card->dev->of_node; + int ret; +@@ -193,6 +194,11 @@ static int evm_aic3x_init(struct snd_soc_pcm_runtime *rtd) + snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); + } + ++ /* Divide McASP MCLK by 2 to provide 12MHz to codec */ ++ ret = snd_soc_dai_set_clkdiv(cpu_dai, 0, 2); ++ if (ret < 0) ++ return ret; ++ + /* not connected */ + snd_soc_dapm_disable_pin(dapm, "MONO_LOUT"); + snd_soc_dapm_disable_pin(dapm, "HPLCOM"); +-- +1.9.0 + diff --git a/patches/audio/0002-arm-dts-add-DT-pinmux-details-for-I2C1.patch b/patches/audio/0002-arm-dts-add-DT-pinmux-details-for-I2C1.patch deleted file mode 100644 index c076b1c2..00000000 --- a/patches/audio/0002-arm-dts-add-DT-pinmux-details-for-I2C1.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 8383bc8337b1461a988f2f074a3096fd71ac655d Mon Sep 17 00:00:00 2001 -From: Joel A Fernandes -Date: Thu, 25 Oct 2012 00:07:14 -0500 -Subject: [PATCH 2/9] arm/dts: add DT pinmux details for I2C1 - -Add Pinmux details for I2C1 for am335x-boneblack ---- - arch/arm/boot/dts/am335x-bone-common.dtsi | 8 ++++++++ - 1 files changed, 8 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi -index 0f7f87c..888e6f2 100644 ---- a/arch/arm/boot/dts/am335x-bone-common.dtsi -+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi -@@ -24,6 +24,14 @@ - }; - - am3358_pinmux: pinmux@44e10800 { -+ i2c1_pins: i2c1_pins { -+ pinctrl-single,pins = < -+ /* I2C1 */ -+ 0x158 0x62 /* spi0_d1.i2c1_sda, MODE2 | INPUT | SLEWCTRL_SLOW */ -+ 0x15c 0x62 /* spi0_cs0.i2c1_scl, MODE2 | INPUT | SLEWCTRL_SLOW */ -+ >; -+ }; -+ - spi1_pins: pinmux_spi1_pins { - pinctrl-single,pins = < - 0x190 0x13 /* mcasp0_aclkx.spi1_sclk, OUTPUT_PULLUP | MODE3 */ --- -1.7.7.6 - diff --git a/patches/audio/0003-ASoc-McASP-Lift-Reset-on-CLK-Dividers-when-RX-TX.patch b/patches/audio/0003-ASoc-McASP-Lift-Reset-on-CLK-Dividers-when-RX-TX.patch new file mode 100644 index 00000000..14be1668 --- /dev/null +++ b/patches/audio/0003-ASoc-McASP-Lift-Reset-on-CLK-Dividers-when-RX-TX.patch @@ -0,0 +1,69 @@ +From 4e5f103296c801452774086b14b5092d11c0be6c Mon Sep 17 00:00:00 2001 +From: Cody Lacey +Date: Fri, 18 Oct 2013 12:42:00 -0500 +Subject: [PATCH 3/3] ASoc: McASP: Lift Reset on CLK Dividers when RX/TX + +If TX/RX CLK or High Frequency TX/RX CLK are set to +output and they use the internally generated clock. +Do not reset the tx/rx clock divider when receiving +or sending data in case they supply the clock source +for another device. +--- + sound/soc/davinci/davinci-mcasp.c | 34 ++++++++++++++++++++++++++++++++++ + 1 file changed, 34 insertions(+) + +diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c +index 83232c6..98d559d 100644 +--- a/sound/soc/davinci/davinci-mcasp.c ++++ b/sound/soc/davinci/davinci-mcasp.c +@@ -347,6 +347,23 @@ static inline void mcasp_set_ctl_reg(void __iomem *regs, u32 val) + + static void mcasp_start_rx(struct davinci_audio_dev *dev) + { ++ u32 pdir = mcasp_get_reg(dev->base + DAVINCI_MCASP_PDIR_REG); ++ u32 thclk_reg = mcasp_get_reg(dev->base + DAVINCI_MCASP_AHCLKXCTL_REG); ++ u32 tclk_reg = mcasp_get_reg(dev->base + DAVINCI_MCASP_ACLKXCTL_REG); ++ ++ /* ++ * If Transmit CLK or High Frequency Transmit CLK are set to output ++ * and they use the internally generated clock. Do not reset the ++ * transmit clock divider when receiving data in case they supply ++ * the clock source for another device. ++ */ ++ if((pdir & ACLKX) && (tclk_reg & ACLKXE)) { ++ mcasp_set_ctl_reg(dev->base + DAVINCI_MCASP_GBLCTLX_REG, TXCLKRST); ++ } ++ ++ if((pdir & AHCLKX) && (thclk_reg & AHCLKXE)) { ++ mcasp_set_ctl_reg(dev->base + DAVINCI_MCASP_GBLCTLX_REG, TXHCLKRST); ++ } + mcasp_set_ctl_reg(dev->base + DAVINCI_MCASP_GBLCTLR_REG, RXHCLKRST); + mcasp_set_ctl_reg(dev->base + DAVINCI_MCASP_GBLCTLR_REG, RXCLKRST); + mcasp_set_ctl_reg(dev->base + DAVINCI_MCASP_GBLCTLR_REG, RXSERCLR); +@@ -364,6 +381,23 @@ static void mcasp_start_tx(struct davinci_audio_dev *dev) + { + u8 offset = 0, i; + u32 cnt; ++ u32 pdir = mcasp_get_reg(dev->base + DAVINCI_MCASP_PDIR_REG); ++ u32 rhclk_reg = mcasp_get_reg(dev->base + DAVINCI_MCASP_AHCLKRCTL_REG); ++ u32 rclk_reg = mcasp_get_reg(dev->base + DAVINCI_MCASP_ACLKRCTL_REG); ++ ++ /* ++ * If Receive CLK or High Frequency Receive CLK are set to output ++ * and they use the internally generated clock. Do not reset the ++ * receive clock divider when transmitting data in case they supply ++ * the clock source for another device. ++ */ ++ if((pdir & ACLKR) && (rclk_reg & ACLKRE)) { ++ mcasp_set_ctl_reg(dev->base + DAVINCI_MCASP_GBLCTLR_REG, RXCLKRST); ++ } ++ ++ if((pdir & AHCLKR) && (rhclk_reg & AHCLKRE)) { ++ mcasp_set_ctl_reg(dev->base + DAVINCI_MCASP_GBLCTLR_REG, RXHCLKRST); ++ } + + mcasp_set_ctl_reg(dev->base + DAVINCI_MCASP_GBLCTLX_REG, TXHCLKRST); + mcasp_set_ctl_reg(dev->base + DAVINCI_MCASP_GBLCTLX_REG, TXCLKRST); +-- +1.9.0 + diff --git a/patches/audio/0003-Setup-am335x-bonelt-audio-DT.patch b/patches/audio/0003-Setup-am335x-bonelt-audio-DT.patch deleted file mode 100644 index 8b13175d..00000000 --- a/patches/audio/0003-Setup-am335x-bonelt-audio-DT.patch +++ /dev/null @@ -1,53 +0,0 @@ -From bb789027ae1bae1c9ac8f88b5f42ef49d4fcfa83 Mon Sep 17 00:00:00 2001 -From: Joel A Fernandes -Date: Thu, 25 Oct 2012 00:16:18 -0500 -Subject: [PATCH 3/9] Setup am335x-boneblack audio DT - -Needs mcasp0 node - -Signed-off-by: Hebbar, Gururaja -Signed-off-by: Joel A Fernandes ---- - arch/arm/boot/dts/am335x-boneblack.dts | 26 ++++++++++++++++++++++++++ - 1 files changed, 26 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts -index a97ee36..eb46747 100644 ---- a/arch/arm/boot/dts/am335x-boneblack.dts -+++ b/arch/arm/boot/dts/am335x-boneblack.dts -@@ -9,6 +9,32 @@ - - /include/ "am335x-bone-common.dtsi" - -+/ { -+ sound { -+ compatible = "ti,davinci-evm-audio"; -+ ti,model = "AM335X EVM"; -+ ti,audio-codec = <&tlv320aic3x>; -+ ti,mcasp-controller = <&mcasp0>; -+ ti,codec-clock-rate = <12000000>; -+ dai-data = -+ "TLV320AIC3X", "AIC3X", -+ "tlv320aic3x-hifi", "true", -+ "evm-ops"; -+ ti,audio-routing = -+ "Headphone Jack", "HPLOUT", -+ "Headphone Jack", "HPROUT", -+ "Line Out", "LLOUT", -+ "Line Out", "RLOUT", -+ "MIC3L", "Mic Bias 2V", -+ "MIC3R", "Mic Bias 2V", -+ "Mic Bias 2V", "Mic Jack", -+ "LINE1L", "Line In", -+ "LINE2L", "Line In", -+ "LINE1R", "Line In", -+ "LINE2R", "Line In"; -+ }; -+}; -+ - &userled_pins { - pinctrl-single,pins = < - 0x54 0x7 /* gpmc_a5.gpio1_21, OUTPUT | MODE7 */ --- -1.7.7.6 - diff --git a/patches/audio/0004-AM33XX-bonelt-dts-Add-i2c3-and-mcasp0-pin-mxing.patch b/patches/audio/0004-AM33XX-bonelt-dts-Add-i2c3-and-mcasp0-pin-mxing.patch deleted file mode 100644 index f5d687a3..00000000 --- a/patches/audio/0004-AM33XX-bonelt-dts-Add-i2c3-and-mcasp0-pin-mxing.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 00171b2eb253ee3d440836a48b33cf02a1d0ba43 Mon Sep 17 00:00:00 2001 -From: Joel A Fernandes -Date: Thu, 25 Oct 2012 00:35:36 -0500 -Subject: [PATCH 4/9] AM33XX: bonelt/dts: Add i2c3 and mcasp0 pin mxing - -Signed-off-by: Joel A Fernandes ---- - arch/arm/boot/dts/am335x-boneblack.dts | 20 ++++++++++++++++++++ - 1 files changed, 20 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts -index eb46747..fdbaa75 100644 ---- a/arch/arm/boot/dts/am335x-boneblack.dts -+++ b/arch/arm/boot/dts/am335x-boneblack.dts -@@ -10,6 +10,24 @@ - /include/ "am335x-bone-common.dtsi" - - / { -+ am3358_pinmux: pinmux@44e10800 { -+ mcasp0_pins: mcasp0_pins { -+ pinctrl-single,pins = < -+ 0x10c 0x24 /* mii1_crs.mcasp1_aclkx, MODE4 | INPUT_PULLDOWN */ -+ 0x110 0x24 /* mii1_rxerr.mcasp1_fsx, MODE4 | INPUT_PULLDOWN */ -+ 0x108 0x24 /* mii1_col.mcasp1_axr2, MODE4 | INPUT_PULLDOWN */ -+ 0x144 0x24 /* rmii1_refclk.mcasp1_axr3, MODE4 | INPUT_PULLDOWN */ -+ >; -+ }; -+ -+ i2c3_pins: pinmux_i2c2_pins { -+ pinctrl-single,pins = < -+ 0x178 0x73 /* uart1_ctsn.i2c2_sda, SLEWCTRL_SLOW | INPUT_PULLUP | MODE3 */ -+ 0x17c 0x73 /* uart1_rtsn.i2c2_scl, SLEWCTRL_SLOW | INPUT_PULLUP | MODE3 */ -+ >; -+ }; -+ } -+ - sound { - compatible = "ti,davinci-evm-audio"; - ti,model = "AM335X EVM"; -@@ -59,6 +77,8 @@ - - - &mcasp0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mcasp0_pins>; - op-mode = <0>; /* MCASP_IIS_MODE */ - tdm-slots = <2>; - num-serializer = <16>; --- -1.7.7.6 - diff --git a/patches/audio/0005-Codec-sits-on-i2c3-bus-when-cape-is-connected-to-bea.patch b/patches/audio/0005-Codec-sits-on-i2c3-bus-when-cape-is-connected-to-bea.patch deleted file mode 100644 index c3ab9380..00000000 --- a/patches/audio/0005-Codec-sits-on-i2c3-bus-when-cape-is-connected-to-bea.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 8b8c45b9fdb5297fe2b4c8ebfd61916ab5da5e48 Mon Sep 17 00:00:00 2001 -From: Joel A Fernandes -Date: Thu, 25 Oct 2012 00:41:59 -0500 -Subject: [PATCH 5/9] Codec sits on i2c3 bus when cape is connected to - beaglebone LT. As a part of getting audio working on - beaglebone LT, we first try with cape. - -This patch adds i2c3 node and codec slave address. - -Adapted from following patch by Gururaja Hebbar : - - On am335x-boneblack, codec TLV320AIC3x sits on i2c1 bus. - This patch also add I2C1 node with I2C frequency and TLV320AIC3x Codec - I2C slave address. - -Signed-off-by: Joel A Fernandes ---- - arch/arm/boot/dts/am335x-boneblack.dts | 12 ++++++++++++ - 1 files changed, 12 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts -index fdbaa75..987291b 100644 ---- a/arch/arm/boot/dts/am335x-boneblack.dts -+++ b/arch/arm/boot/dts/am335x-boneblack.dts -@@ -53,6 +53,18 @@ - }; - }; - -+&i2c3 { -+ status = "okay"; -+ clock-frequency = <400000>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c3_pins>; -+ -+ tlv320aic3x: tlv320aic3x@1b { -+ compatible = "ti,tlv320aic3x"; -+ reg = <0x1b>; -+ }; -+}; -+ - &userled_pins { - pinctrl-single,pins = < - 0x54 0x7 /* gpmc_a5.gpio1_21, OUTPUT | MODE7 */ --- -1.7.7.6 - diff --git a/patches/audio/0006-ASoC-Davinci-machine-Add-device-tree-binding.patch b/patches/audio/0006-ASoC-Davinci-machine-Add-device-tree-binding.patch deleted file mode 100644 index 22cfa0eb..00000000 --- a/patches/audio/0006-ASoC-Davinci-machine-Add-device-tree-binding.patch +++ /dev/null @@ -1,329 +0,0 @@ -From ec2df111395ce4883b2e8dae947c88d20e245507 Mon Sep 17 00:00:00 2001 -From: "Hebbar, Gururaja" -Date: Tue, 31 Jul 2012 21:25:38 +0530 -Subject: [PATCH 6/9] ASoC: Davinci: machine: Add device tree binding - -Device tree support for tlv320aic3x CODEC driver - -When the board boots with device tree, the driver will receive card, -codec, dai interface details (like the card name, DAPM routing map, -phandle for the audio components described in the dts file, codec mclk -speed). - -The card will be set up based on this information. -Since the routing is provided via DT we can mark the card fully routed -so core can take care of disconnecting the unused pins. - -When here, code indentation and comment style is also fixed - -Signed-off-by: Hebbar, Gururaja ---- - .../bindings/sound/davinci-evm-audio.txt | 63 +++++++ - sound/soc/davinci/davinci-evm.c | 185 +++++++++++++++++-- - 2 files changed, 228 insertions(+), 20 deletions(-) - create mode 100644 Documentation/devicetree/bindings/sound/davinci-evm-audio.txt - -diff --git a/Documentation/devicetree/bindings/sound/davinci-evm-audio.txt b/Documentation/devicetree/bindings/sound/davinci-evm-audio.txt -new file mode 100644 -index 0000000..fcbcd24 ---- /dev/null -+++ b/Documentation/devicetree/bindings/sound/davinci-evm-audio.txt -@@ -0,0 +1,63 @@ -+* Texas Instruments SoC audio setups with TLV320AIC3X Codec -+ -+Required properties: -+- compatible : "ti,davinci-evm-audio" -+- ti,model : The user-visible name of this sound complex. -+- ti,audio-routing : A list of the connections between audio components. -+ Each entry is a pair of strings, the first being the connection's sink, -+ the second being the connection's source. Valid names for sources and -+ sinks are the codec's pins, and the jacks on the board: -+ -+ Codec pins: -+ -+ * MIC3L -+ * MIC3R -+ * LINE1L -+ * LINE2L -+ * LINE1R -+ * LINE2R -+ -+ Board connectors: -+ -+ * Headphone Jack -+ * Line Out -+ * Mic Jack -+ -+- ti,mcasp-controller : The phandle of the McASP controller -+- ti,audio-codec : The phandle of the TLV320AIC3x audio codec -+- ti,codec-clock-rate : The Codec Clock rate (in Hz) applied to the Codec -+ -+- dai-data : A list of DAI data used by SOC code to register -+ DAI, Codecs platform. -+ The string index "should" be as shown below. -+dai-data = -+"", "", -+"", "", -+""; -+ -+Here fields -+"" : used to indicate the DAI Name -+"" : used to indicate the Stream Name -+"" : used to bind the link between Codec DAI and ASOC DAI -+ -+Machine related options -+"" : Whether the machine specific initialization -+ : evm_aic3x_init() is required -+ -+"" : Which hardware ops function is to be used. -+ : (evm_ops or evm_spdif_ops) -+ -+ -+Example: -+ -+sound { -+ compatible = "ti,davinci-evm-audio"; -+ ti,model = "DA830 EVM"; -+ ti,audio-codec = <&tlv320aic3x>; -+ ti,mcasp-controller = <&mcasp1>; -+ ti,codec-clock-rate = <12000000>; -+ dai-data = -+ "TLV320AIC3X", "AIC3X", -+ "tlv320aic3x-hifi", "true", -+ "evm-ops"; -+}; -diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c -index 44365d5..fd40763 100644 ---- a/sound/soc/davinci/davinci-evm.c -+++ b/sound/soc/davinci/davinci-evm.c -@@ -35,27 +35,38 @@ static int evm_hw_params(struct snd_pcm_substream *substream, - struct snd_soc_pcm_runtime *rtd = substream->private_data; - struct snd_soc_dai *codec_dai = rtd->codec_dai; - struct snd_soc_dai *cpu_dai = rtd->cpu_dai; -+ struct snd_soc_codec *codec = rtd->codec; -+ struct snd_soc_card *soc_card = codec->card; -+ struct device_node *np = soc_card->dev->of_node; - int ret = 0; - unsigned sysclk; - -- /* ASP1 on DM355 EVM is clocked by an external oscillator */ -- if (machine_is_davinci_dm355_evm() || machine_is_davinci_dm6467_evm() || -- machine_is_davinci_dm365_evm()) -- sysclk = 27000000; -- -- /* ASP0 in DM6446 EVM is clocked by U55, as configured by -- * board-dm644x-evm.c using GPIOs from U18. There are six -- * options; here we "know" we use a 48 KHz sample rate. -- */ -- else if (machine_is_davinci_evm()) -- sysclk = 12288000; -- -- else if (machine_is_davinci_da830_evm() || -- machine_is_davinci_da850_evm()) -- sysclk = 24576000; -- -- else -- return -EINVAL; -+ if (np) { -+ ret = of_property_read_u32(np, "ti,codec-clock-rate", &sysclk); -+ if (ret < 0) -+ return ret; -+ } else { -+ /* ASP1 on DM355 EVM is clocked by an external oscillator */ -+ if (machine_is_davinci_dm355_evm() || -+ machine_is_davinci_dm6467_evm() || -+ machine_is_davinci_dm365_evm()) -+ sysclk = 27000000; -+ -+ /* -+ * ASP0 in DM6446 EVM is clocked by U55, as configured by -+ * board-dm644x-evm.c using GPIOs from U18. There are six -+ * options; here we "know" we use a 48 KHz sample rate. -+ */ -+ else if (machine_is_davinci_evm()) -+ sysclk = 12288000; -+ -+ else if (machine_is_davinci_da830_evm() || -+ machine_is_davinci_da850_evm()) -+ sysclk = 24576000; -+ -+ else -+ return -EINVAL; -+ } - - /* set codec DAI configuration */ - ret = snd_soc_dai_set_fmt(codec_dai, AUDIO_FORMAT); -@@ -128,13 +139,22 @@ static int evm_aic3x_init(struct snd_soc_pcm_runtime *rtd) - { - struct snd_soc_codec *codec = rtd->codec; - struct snd_soc_dapm_context *dapm = &codec->dapm; -+ struct device_node *np = codec->card->dev->of_node; -+ int ret; - - /* Add davinci-evm specific widgets */ - snd_soc_dapm_new_controls(dapm, aic3x_dapm_widgets, - ARRAY_SIZE(aic3x_dapm_widgets)); - -- /* Set up davinci-evm specific audio path audio_map */ -- snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); -+ if (np) { -+ ret = snd_soc_of_parse_audio_routing(codec->card, -+ "ti,audio-routing"); -+ if (ret) -+ return ret; -+ } else { -+ /* Set up davinci-evm specific audio path audio_map */ -+ snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); -+ } - - /* not connected */ - snd_soc_dapm_disable_pin(dapm, "MONO_LOUT"); -@@ -283,6 +303,113 @@ static struct snd_soc_card da850_snd_soc_card = { - .num_links = 1, - }; - -+#if defined(CONFIG_OF) -+/* -+ * This struct is just used as place holder. It will be filled with -+ * data from dt node -+ */ -+static struct snd_soc_dai_link evm_dai = { -+}; -+ -+/* davinci evm audio machine driver */ -+static struct snd_soc_card evm_soc_card = { -+ .owner = THIS_MODULE, -+ .dai_link = &evm_dai, -+ .num_links = 1, -+}; -+ -+static int davinci_evm_probe(struct platform_device *pdev) -+{ -+ struct device_node *np = pdev->dev.of_node; -+ const char *stringPtr, *propname; -+ u32 val; -+ int ret = 0; -+ -+ propname = "dai-data"; -+ val = of_property_count_strings(np, propname); -+ if (val < 0) -+ return val; -+ -+ ret = of_property_read_string_index(np, propname, 0, &evm_dai.name); -+ if (ret < 0) -+ return ret; -+ -+ ret = of_property_read_string_index(np, propname, 1, -+ &evm_dai.stream_name); -+ if (ret < 0) -+ return ret; -+ -+ ret = of_property_read_string_index(np, propname, 2, -+ &evm_dai.codec_dai_name); -+ if (ret < 0) -+ return ret; -+ -+ ret = of_property_read_string_index(np, propname, 3, &stringPtr); -+ if (ret < 0) -+ return ret; -+ else -+ if (strcasecmp(stringPtr, "true") == 0) -+ evm_dai.init = evm_aic3x_init; -+ -+ ret = of_property_read_string_index(np, propname, 4, &stringPtr); -+ if (ret < 0) { -+ return ret; -+ } else { -+ if (strcasecmp(stringPtr, "evm-ops") == 0) -+ evm_dai.ops = &evm_ops; -+ else if (strcasecmp(stringPtr, "evm-spdif-ops") == 0) -+ evm_dai.ops = &evm_spdif_ops; -+ } -+ -+ evm_dai.codec_of_node = of_parse_phandle(np, "ti,audio-codec", 0); -+ if (!evm_dai.codec_of_node) -+ return -EINVAL; -+ -+ evm_dai.cpu_dai_of_node = of_parse_phandle(np, -+ "ti,mcasp-controller", 0); -+ if (!evm_dai.cpu_dai_of_node) -+ return -EINVAL; -+ -+ evm_dai.platform_of_node = evm_dai.cpu_dai_of_node; -+ -+ evm_soc_card.dev = &pdev->dev; -+ ret = snd_soc_of_parse_card_name(&evm_soc_card, "ti,model"); -+ if (ret) -+ return ret; -+ -+ ret = snd_soc_register_card(&evm_soc_card); -+ if (ret) -+ dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); -+ -+ return ret; -+} -+ -+static int __devexit davinci_evm_remove(struct platform_device *pdev) -+{ -+ struct snd_soc_card *card = platform_get_drvdata(pdev); -+ -+ snd_soc_unregister_card(card); -+ -+ return 0; -+} -+ -+static const struct of_device_id davinci_evm_dt_ids[] = { -+ { .compatible = "ti,davinci-evm-audio", }, -+ { /* sentinel */ } -+}; -+MODULE_DEVICE_TABLE(of, davinci_mcasp_dt_ids); -+ -+static struct platform_driver davinci_evm_driver = { -+ .probe = davinci_evm_probe, -+ .remove = __devexit_p(davinci_evm_remove), -+ .driver = { -+ .name = "davinci_evm", -+ .owner = THIS_MODULE, -+ .of_match_table = of_match_ptr(davinci_evm_dt_ids), -+ }, -+}; -+#endif -+ - static struct platform_device *evm_snd_device; - - static int __init evm_init(void) -@@ -290,6 +417,14 @@ static int __init evm_init(void) - struct snd_soc_card *evm_snd_dev_data; - int index; - int ret; -+#if defined(CONFIG_OF) -+ struct device_node *np; -+ -+ np = of_find_compatible_node(NULL, NULL, "ti,davinci-evm-audio"); -+ if (np) { -+ return platform_driver_register(&davinci_evm_driver); -+ } -+#endif - - if (machine_is_davinci_evm()) { - evm_snd_dev_data = &dm6446_snd_soc_card_evm; -@@ -326,6 +461,16 @@ static int __init evm_init(void) - - static void __exit evm_exit(void) - { -+#if defined(CONFIG_OF) -+ struct device_node *np; -+ -+ np = of_find_compatible_node(NULL, NULL, "ti,davinci-evm-audio"); -+ if (np) { -+ platform_driver_unregister(&davinci_evm_driver); -+ return; -+ } -+#endif -+ - platform_device_unregister(evm_snd_device); - } - --- -1.7.7.6 - diff --git a/patches/audio/0007-ASoC-AM33XX-Add-support-for-AM33xx-SoC-Audio.patch b/patches/audio/0007-ASoC-AM33XX-Add-support-for-AM33xx-SoC-Audio.patch deleted file mode 100644 index fe6f66cc..00000000 --- a/patches/audio/0007-ASoC-AM33XX-Add-support-for-AM33xx-SoC-Audio.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 628063de62338ca7f67e7c8f79672c144d11ba59 Mon Sep 17 00:00:00 2001 -From: "Hebbar, Gururaja" -Date: Wed, 1 Aug 2012 12:04:22 +0530 -Subject: [PATCH 7/9] ASoC: AM33XX: Add support for AM33xx SoC Audio - -AM33xx uses same McASP IP as the Davinci Platform. This patch updates -Kconfig and makefile to enable build or McASP, PCM & Codec drivers - -Signed-off-by: Hebbar, Gururaja ---- - sound/soc/davinci/Kconfig | 8 ++++++++ - sound/soc/davinci/Makefile | 3 +++ - 2 files changed, 11 insertions(+), 0 deletions(-) - -diff --git a/sound/soc/davinci/Kconfig b/sound/soc/davinci/Kconfig -index 9e11a14..cfeb3a0 100644 ---- a/sound/soc/davinci/Kconfig -+++ b/sound/soc/davinci/Kconfig -@@ -6,6 +6,14 @@ config SND_DAVINCI_SOC - the DAVINCI AC97 or I2S interface. You will also need - to select the audio interfaces to support below. - -+config SND_AM33XX_SOC -+ tristate "SoC Audio for the AM33XX chip" -+ depends on SOC_AM33XX -+ select SND_SOC_TLV320AIC3X -+ help -+ Say Y or M if you want to add support for SoC audio on AM33xx -+ boards using McASP and TLV320AIC3X codec. -+ - config SND_DAVINCI_SOC_I2S - tristate - -diff --git a/sound/soc/davinci/Makefile b/sound/soc/davinci/Makefile -index a93679d..3e07a53 100644 ---- a/sound/soc/davinci/Makefile -+++ b/sound/soc/davinci/Makefile -@@ -5,8 +5,10 @@ snd-soc-davinci-mcasp-objs:= davinci-mcasp.o - snd-soc-davinci-vcif-objs:= davinci-vcif.o - - obj-$(CONFIG_SND_DAVINCI_SOC) += snd-soc-davinci.o -+obj-$(CONFIG_SND_AM33XX_SOC) += snd-soc-davinci.o - obj-$(CONFIG_SND_DAVINCI_SOC_I2S) += snd-soc-davinci-i2s.o - obj-$(CONFIG_SND_DAVINCI_SOC_MCASP) += snd-soc-davinci-mcasp.o -+obj-$(CONFIG_SND_AM33XX_SOC) += snd-soc-davinci-mcasp.o - obj-$(CONFIG_SND_DAVINCI_SOC_VCIF) += snd-soc-davinci-vcif.o - - # DAVINCI Machine Support -@@ -14,6 +16,7 @@ snd-soc-evm-objs := davinci-evm.o - snd-soc-sffsdr-objs := davinci-sffsdr.o - - obj-$(CONFIG_SND_DAVINCI_SOC_EVM) += snd-soc-evm.o -+obj-$(CONFIG_SND_AM33XX_SOC) += snd-soc-evm.o - obj-$(CONFIG_SND_DM6467_SOC_EVM) += snd-soc-evm.o - obj-$(CONFIG_SND_DA830_SOC_EVM) += snd-soc-evm.o - obj-$(CONFIG_SND_DA850_SOC_EVM) += snd-soc-evm.o --- -1.7.7.6 - diff --git a/patches/audio/0008-ASoC-davinci-pcm-add-support-for-sram-support-less-p.patch b/patches/audio/0008-ASoC-davinci-pcm-add-support-for-sram-support-less-p.patch deleted file mode 100644 index fb9a39de..00000000 --- a/patches/audio/0008-ASoC-davinci-pcm-add-support-for-sram-support-less-p.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 3fb3c123c231f28d022bb3c0894b12e78cff8ad1 Mon Sep 17 00:00:00 2001 -From: "Hebbar, Gururaja" -Date: Thu, 30 Aug 2012 14:54:41 +0530 -Subject: [PATCH 8/9] ASoC: davinci: pcm: add support for sram-support-less - platforms - -OMAP2+ platforms (like TI81xx, AM33xx) uses davinci-pcm driver. SRAM is -not needed/used in EDMA transfers for audio on such platforms. However -they do not provide generic SRAM APIs (sram_alloc() and sram_free()). In -such cases the pcm driver cannot be used directly as it results in -compilation failure on OMAP2 platforms. - -Fix this by providing a config option to indicate missing SRAM API -support. This config is enabled by default on Davinci platform so as to -not break existing platforms. For OMAP2+ platforms, the config is -disabled. - -Signed-off-by: Hebbar, Gururaja ---- - sound/soc/davinci/Kconfig | 5 +++++ - sound/soc/davinci/davinci-pcm.c | 4 ++++ - 2 files changed, 9 insertions(+), 0 deletions(-) - -diff --git a/sound/soc/davinci/Kconfig b/sound/soc/davinci/Kconfig -index cfeb3a0..bac326e 100644 ---- a/sound/soc/davinci/Kconfig -+++ b/sound/soc/davinci/Kconfig -@@ -23,6 +23,11 @@ config SND_DAVINCI_SOC_MCASP - config SND_DAVINCI_SOC_VCIF - tristate - -+config SND_DAVINCI_HAVE_SRAM -+ bool -+ default y if ARCH_DAVINCI=y -+ default n if ARCH_OMAP=y -+ - config SND_DAVINCI_SOC_EVM - tristate "SoC Audio support for DaVinci DM6446, DM355 or DM365 EVM" - depends on SND_DAVINCI_SOC -diff --git a/sound/soc/davinci/davinci-pcm.c b/sound/soc/davinci/davinci-pcm.c -index c9d1b7a..6798e13 100644 ---- a/sound/soc/davinci/davinci-pcm.c -+++ b/sound/soc/davinci/davinci-pcm.c -@@ -677,7 +677,9 @@ static int davinci_pcm_open(struct snd_pcm_substream *substream) - - ppcm = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ? - &pcm_hardware_playback : &pcm_hardware_capture; -+#if defined(CONFIG_SND_DAVINCI_HAVE_SRAM) - allocate_sram(substream, params->sram_size, ppcm); -+#endif - snd_soc_set_runtime_hwparams(substream, ppcm); - /* ensure that buffer size is a multiple of period size */ - ret = snd_pcm_hw_constraint_integer(runtime, -@@ -818,11 +820,13 @@ static void davinci_pcm_free(struct snd_pcm *pcm) - dma_free_writecombine(pcm->card->dev, buf->bytes, - buf->area, buf->addr); - buf->area = NULL; -+#if defined(CONFIG_SND_DAVINCI_HAVE_SRAM) - iram_dma = buf->private_data; - if (iram_dma) { - sram_free(iram_dma->area, iram_dma->bytes); - kfree(iram_dma); - } -+#endif - } - } - --- -1.7.7.6 - diff --git a/patches/audio/0009-Enable-SND_SOC-and-SND_AM33XX_SOC-in-omap2plus_defco.patch b/patches/audio/0009-Enable-SND_SOC-and-SND_AM33XX_SOC-in-omap2plus_defco.patch deleted file mode 100644 index 1a7e3054..00000000 --- a/patches/audio/0009-Enable-SND_SOC-and-SND_AM33XX_SOC-in-omap2plus_defco.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 58fb19ca62e20123c93e408f41d3036407cca1c3 Mon Sep 17 00:00:00 2001 -From: Joel A Fernandes -Date: Thu, 25 Oct 2012 01:19:55 -0500 -Subject: [PATCH 9/9] Enable SND_SOC and SND_AM33XX_SOC in omap2plus_defconfig - -Signed-off-by: Joel A Fernandes ---- - arch/arm/configs/omap2plus_defconfig | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) - -diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig -index 89e1c58..9999766 100644 ---- a/arch/arm/configs/omap2plus_defconfig -+++ b/arch/arm/configs/omap2plus_defconfig -@@ -181,7 +181,8 @@ CONFIG_SND_PCM_OSS=m - CONFIG_SND_VERBOSE_PRINTK=y - CONFIG_SND_DEBUG=y - CONFIG_SND_USB_AUDIO=m --CONFIG_SND_SOC=m -+CONFIG_SND_SOC=y -+CONFIG_SND_AM33XX_SOC=y - CONFIG_SND_OMAP_SOC=m - CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m - CONFIG_USB=y --- -1.7.7.6 - diff --git a/patches/backports/0001-backport-v3.13.7-tpm_i2c_atmel.c.patch b/patches/backports/0001-backport-v3.13.7-tpm_i2c_atmel.c.patch new file mode 100644 index 00000000..abf8d84d --- /dev/null +++ b/patches/backports/0001-backport-v3.13.7-tpm_i2c_atmel.c.patch @@ -0,0 +1,4720 @@ +From 934441cd903eeaa98a5d41a628f903e6cbd88f8f Mon Sep 17 00:00:00 2001 +From: Robert Nelson +Date: Tue, 8 Apr 2014 15:50:27 -0500 +Subject: [PATCH] backport (v3.13.7): tpm_i2c_atmel.c + +Signed-off-by: Robert Nelson +--- + drivers/char/tpm/Kconfig | 11 +- + drivers/char/tpm/Makefile | 10 +- + drivers/char/tpm/tpm-interface.c | 1554 +++++++++++++++++++++++++++++++++++ + drivers/char/tpm/tpm.c | 1536 ---------------------------------- + drivers/char/tpm/tpm.h | 57 +- + drivers/char/tpm/tpm_acpi.c | 8 +- + drivers/char/tpm/tpm_atmel.c | 9 +- + drivers/char/tpm/tpm_eventlog.c | 3 - + drivers/char/tpm/tpm_i2c_atmel.c | 284 +++++++ + drivers/char/tpm/tpm_i2c_infineon.c | 195 +++-- + drivers/char/tpm/tpm_ibmvtpm.c | 21 +- + drivers/char/tpm/tpm_nsc.c | 7 +- + drivers/char/tpm/tpm_ppi.c | 41 +- + drivers/char/tpm/tpm_tis.c | 143 ++-- + include/linux/tpm.h | 2 + + 15 files changed, 2172 insertions(+), 1709 deletions(-) + create mode 100644 drivers/char/tpm/tpm-interface.c + delete mode 100644 drivers/char/tpm/tpm.c + create mode 100644 drivers/char/tpm/tpm_i2c_atmel.c + +diff --git a/drivers/char/tpm/Kconfig b/drivers/char/tpm/Kconfig +index 915875e..1420c5c 100644 +--- a/drivers/char/tpm/Kconfig ++++ b/drivers/char/tpm/Kconfig +@@ -33,6 +33,15 @@ config TCG_TIS + from within Linux. To compile this driver as a module, choose + M here; the module will be called tpm_tis. + ++config TCG_TIS_I2C_ATMEL ++ tristate "TPM Interface Specification 1.2 Interface (I2C - Atmel)" ++ depends on I2C ++ ---help--- ++ If you have an Atmel I2C TPM security chip say Yes and it will be ++ accessible from within Linux. ++ To compile this driver as a module, choose M here; the module will ++ be called tpm_tis_i2c_atmel. ++ + config TCG_TIS_I2C_INFINEON + tristate "TPM Interface Specification 1.2 Interface (I2C - Infineon)" + depends on I2C +@@ -42,7 +51,7 @@ config TCG_TIS_I2C_INFINEON + Specification 0.20 say Yes and it will be accessible from within + Linux. + To compile this driver as a module, choose M here; the module +- will be called tpm_tis_i2c_infineon. ++ will be called tpm_i2c_infineon. + + config TCG_NSC + tristate "National Semiconductor TPM Interface" +diff --git a/drivers/char/tpm/Makefile b/drivers/char/tpm/Makefile +index 5b3fc8b..7751499 100644 +--- a/drivers/char/tpm/Makefile ++++ b/drivers/char/tpm/Makefile +@@ -2,16 +2,18 @@ + # Makefile for the kernel tpm device drivers. + # + obj-$(CONFIG_TCG_TPM) += tpm.o ++tpm-y := tpm-interface.o ++tpm-$(CONFIG_ACPI) += tpm_ppi.o ++ + ifdef CONFIG_ACPI +- obj-$(CONFIG_TCG_TPM) += tpm_bios.o +- tpm_bios-objs += tpm_eventlog.o tpm_acpi.o tpm_ppi.o ++ tpm-y += tpm_eventlog.o tpm_acpi.o + else + ifdef CONFIG_TCG_IBMVTPM +- obj-$(CONFIG_TCG_TPM) += tpm_bios.o +- tpm_bios-objs += tpm_eventlog.o tpm_of.o ++ tpm-y += tpm_eventlog.o tpm_of.o + endif + endif + obj-$(CONFIG_TCG_TIS) += tpm_tis.o ++obj-$(CONFIG_TCG_TIS_I2C_ATMEL) += tpm_i2c_atmel.o + obj-$(CONFIG_TCG_TIS_I2C_INFINEON) += tpm_i2c_infineon.o + obj-$(CONFIG_TCG_NSC) += tpm_nsc.o + obj-$(CONFIG_TCG_ATMEL) += tpm_atmel.o +diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c +new file mode 100644 +index 0000000..6ae41d3 +--- /dev/null ++++ b/drivers/char/tpm/tpm-interface.c +@@ -0,0 +1,1554 @@ ++/* ++ * Copyright (C) 2004 IBM Corporation ++ * ++ * Authors: ++ * Leendert van Doorn ++ * Dave Safford ++ * Reiner Sailer ++ * Kylene Hall ++ * ++ * Maintained by: ++ * ++ * Device driver for TCG/TCPA TPM (trusted platform module). ++ * Specifications at www.trustedcomputinggroup.org ++ * ++ * 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, version 2 of the ++ * License. ++ * ++ * Note, the TPM chip is not interrupt driven (only polling) ++ * and can have very long timeouts (minutes!). Hence the unusual ++ * calls to msleep. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include "tpm.h" ++#include "tpm_eventlog.h" ++ ++enum tpm_duration { ++ TPM_SHORT = 0, ++ TPM_MEDIUM = 1, ++ TPM_LONG = 2, ++ TPM_UNDEFINED, ++}; ++ ++#define TPM_MAX_ORDINAL 243 ++#define TSC_MAX_ORDINAL 12 ++#define TPM_PROTECTED_COMMAND 0x00 ++#define TPM_CONNECTION_COMMAND 0x40 ++ ++/* ++ * Bug workaround - some TPM's don't flush the most ++ * recently changed pcr on suspend, so force the flush ++ * with an extend to the selected _unused_ non-volatile pcr. ++ */ ++static int tpm_suspend_pcr; ++module_param_named(suspend_pcr, tpm_suspend_pcr, uint, 0644); ++MODULE_PARM_DESC(suspend_pcr, ++ "PCR to use for dummy writes to faciltate flush on suspend."); ++ ++static LIST_HEAD(tpm_chip_list); ++static DEFINE_SPINLOCK(driver_lock); ++static DECLARE_BITMAP(dev_mask, TPM_NUM_DEVICES); ++ ++/* ++ * Array with one entry per ordinal defining the maximum amount ++ * of time the chip could take to return the result. The ordinal ++ * designation of short, medium or long is defined in a table in ++ * TCG Specification TPM Main Part 2 TPM Structures Section 17. The ++ * values of the SHORT, MEDIUM, and LONG durations are retrieved ++ * from the chip during initialization with a call to tpm_get_timeouts. ++ */ ++static const u8 tpm_ordinal_duration[TPM_MAX_ORDINAL] = { ++ TPM_UNDEFINED, /* 0 */ ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, /* 5 */ ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_SHORT, /* 10 */ ++ TPM_SHORT, ++ TPM_MEDIUM, ++ TPM_LONG, ++ TPM_LONG, ++ TPM_MEDIUM, /* 15 */ ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_MEDIUM, ++ TPM_LONG, ++ TPM_SHORT, /* 20 */ ++ TPM_SHORT, ++ TPM_MEDIUM, ++ TPM_MEDIUM, ++ TPM_MEDIUM, ++ TPM_SHORT, /* 25 */ ++ TPM_SHORT, ++ TPM_MEDIUM, ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_MEDIUM, /* 30 */ ++ TPM_LONG, ++ TPM_MEDIUM, ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_SHORT, /* 35 */ ++ TPM_MEDIUM, ++ TPM_MEDIUM, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_MEDIUM, /* 40 */ ++ TPM_LONG, ++ TPM_MEDIUM, ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_SHORT, /* 45 */ ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_LONG, ++ TPM_MEDIUM, /* 50 */ ++ TPM_MEDIUM, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, /* 55 */ ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_MEDIUM, /* 60 */ ++ TPM_MEDIUM, ++ TPM_MEDIUM, ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_MEDIUM, /* 65 */ ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_SHORT, /* 70 */ ++ TPM_SHORT, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, /* 75 */ ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_LONG, /* 80 */ ++ TPM_UNDEFINED, ++ TPM_MEDIUM, ++ TPM_LONG, ++ TPM_SHORT, ++ TPM_UNDEFINED, /* 85 */ ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_SHORT, /* 90 */ ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_UNDEFINED, /* 95 */ ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_MEDIUM, /* 100 */ ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, /* 105 */ ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_SHORT, /* 110 */ ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_SHORT, /* 115 */ ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_LONG, /* 120 */ ++ TPM_LONG, ++ TPM_MEDIUM, ++ TPM_UNDEFINED, ++ TPM_SHORT, ++ TPM_SHORT, /* 125 */ ++ TPM_SHORT, ++ TPM_LONG, ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_SHORT, /* 130 */ ++ TPM_MEDIUM, ++ TPM_UNDEFINED, ++ TPM_SHORT, ++ TPM_MEDIUM, ++ TPM_UNDEFINED, /* 135 */ ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_SHORT, /* 140 */ ++ TPM_SHORT, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, /* 145 */ ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_SHORT, /* 150 */ ++ TPM_MEDIUM, ++ TPM_MEDIUM, ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_UNDEFINED, /* 155 */ ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_SHORT, /* 160 */ ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, /* 165 */ ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_LONG, /* 170 */ ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, /* 175 */ ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_MEDIUM, /* 180 */ ++ TPM_SHORT, ++ TPM_MEDIUM, ++ TPM_MEDIUM, ++ TPM_MEDIUM, ++ TPM_MEDIUM, /* 185 */ ++ TPM_SHORT, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, /* 190 */ ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, /* 195 */ ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_SHORT, /* 200 */ ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_SHORT, ++ TPM_SHORT, /* 205 */ ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_MEDIUM, /* 210 */ ++ TPM_UNDEFINED, ++ TPM_MEDIUM, ++ TPM_MEDIUM, ++ TPM_MEDIUM, ++ TPM_UNDEFINED, /* 215 */ ++ TPM_MEDIUM, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_SHORT, ++ TPM_SHORT, /* 220 */ ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_SHORT, ++ TPM_UNDEFINED, /* 225 */ ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_SHORT, /* 230 */ ++ TPM_LONG, ++ TPM_MEDIUM, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, /* 235 */ ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_UNDEFINED, ++ TPM_SHORT, /* 240 */ ++ TPM_UNDEFINED, ++ TPM_MEDIUM, ++}; ++ ++static void user_reader_timeout(unsigned long ptr) ++{ ++ struct tpm_chip *chip = (struct tpm_chip *) ptr; ++ ++ schedule_work(&chip->work); ++} ++ ++static void timeout_work(struct work_struct *work) ++{ ++ struct tpm_chip *chip = container_of(work, struct tpm_chip, work); ++ ++ mutex_lock(&chip->buffer_mutex); ++ atomic_set(&chip->data_pending, 0); ++ memset(chip->data_buffer, 0, TPM_BUFSIZE); ++ mutex_unlock(&chip->buffer_mutex); ++} ++ ++/* ++ * Returns max number of jiffies to wait ++ */ ++unsigned long tpm_calc_ordinal_duration(struct tpm_chip *chip, ++ u32 ordinal) ++{ ++ int duration_idx = TPM_UNDEFINED; ++ int duration = 0; ++ u8 category = (ordinal >> 24) & 0xFF; ++ ++ if ((category == TPM_PROTECTED_COMMAND && ordinal < TPM_MAX_ORDINAL) || ++ (category == TPM_CONNECTION_COMMAND && ordinal < TSC_MAX_ORDINAL)) ++ duration_idx = tpm_ordinal_duration[ordinal]; ++ ++ if (duration_idx != TPM_UNDEFINED) ++ duration = chip->vendor.duration[duration_idx]; ++ if (duration <= 0) ++ return 2 * 60 * HZ; ++ else ++ return duration; ++} ++EXPORT_SYMBOL_GPL(tpm_calc_ordinal_duration); ++ ++/* ++ * Internal kernel interface to transmit TPM commands ++ */ ++static ssize_t tpm_transmit(struct tpm_chip *chip, const char *buf, ++ size_t bufsiz) ++{ ++ ssize_t rc; ++ u32 count, ordinal; ++ unsigned long stop; ++ ++ if (bufsiz > TPM_BUFSIZE) ++ bufsiz = TPM_BUFSIZE; ++ ++ count = be32_to_cpu(*((__be32 *) (buf + 2))); ++ ordinal = be32_to_cpu(*((__be32 *) (buf + 6))); ++ if (count == 0) ++ return -ENODATA; ++ if (count > bufsiz) { ++ dev_err(chip->dev, ++ "invalid count value %x %zx\n", count, bufsiz); ++ return -E2BIG; ++ } ++ ++ mutex_lock(&chip->tpm_mutex); ++ ++ rc = chip->vendor.send(chip, (u8 *) buf, count); ++ if (rc < 0) { ++ dev_err(chip->dev, ++ "tpm_transmit: tpm_send: error %zd\n", rc); ++ goto out; ++ } ++ ++ if (chip->vendor.irq) ++ goto out_recv; ++ ++ stop = jiffies + tpm_calc_ordinal_duration(chip, ordinal); ++ do { ++ u8 status = chip->vendor.status(chip); ++ if ((status & chip->vendor.req_complete_mask) == ++ chip->vendor.req_complete_val) ++ goto out_recv; ++ ++ if (chip->vendor.req_canceled(chip, status)) { ++ dev_err(chip->dev, "Operation Canceled\n"); ++ rc = -ECANCELED; ++ goto out; ++ } ++ ++ msleep(TPM_TIMEOUT); /* CHECK */ ++ rmb(); ++ } while (time_before(jiffies, stop)); ++ ++ chip->vendor.cancel(chip); ++ dev_err(chip->dev, "Operation Timed out\n"); ++ rc = -ETIME; ++ goto out; ++ ++out_recv: ++ rc = chip->vendor.recv(chip, (u8 *) buf, bufsiz); ++ if (rc < 0) ++ dev_err(chip->dev, ++ "tpm_transmit: tpm_recv: error %zd\n", rc); ++out: ++ mutex_unlock(&chip->tpm_mutex); ++ return rc; ++} ++ ++#define TPM_DIGEST_SIZE 20 ++#define TPM_RET_CODE_IDX 6 ++ ++enum tpm_capabilities { ++ TPM_CAP_FLAG = cpu_to_be32(4), ++ TPM_CAP_PROP = cpu_to_be32(5), ++ CAP_VERSION_1_1 = cpu_to_be32(0x06), ++ CAP_VERSION_1_2 = cpu_to_be32(0x1A) ++}; ++ ++enum tpm_sub_capabilities { ++ TPM_CAP_PROP_PCR = cpu_to_be32(0x101), ++ TPM_CAP_PROP_MANUFACTURER = cpu_to_be32(0x103), ++ TPM_CAP_FLAG_PERM = cpu_to_be32(0x108), ++ TPM_CAP_FLAG_VOL = cpu_to_be32(0x109), ++ TPM_CAP_PROP_OWNER = cpu_to_be32(0x111), ++ TPM_CAP_PROP_TIS_TIMEOUT = cpu_to_be32(0x115), ++ TPM_CAP_PROP_TIS_DURATION = cpu_to_be32(0x120), ++ ++}; ++ ++static ssize_t transmit_cmd(struct tpm_chip *chip, struct tpm_cmd_t *cmd, ++ int len, const char *desc) ++{ ++ int err; ++ ++ len = tpm_transmit(chip, (u8 *) cmd, len); ++ if (len < 0) ++ return len; ++ else if (len < TPM_HEADER_SIZE) ++ return -EFAULT; ++ ++ err = be32_to_cpu(cmd->header.out.return_code); ++ if (err != 0 && desc) ++ dev_err(chip->dev, "A TPM error (%d) occurred %s\n", err, desc); ++ ++ return err; ++} ++ ++#define TPM_INTERNAL_RESULT_SIZE 200 ++#define TPM_TAG_RQU_COMMAND cpu_to_be16(193) ++#define TPM_ORD_GET_CAP cpu_to_be32(101) ++#define TPM_ORD_GET_RANDOM cpu_to_be32(70) ++ ++static const struct tpm_input_header tpm_getcap_header = { ++ .tag = TPM_TAG_RQU_COMMAND, ++ .length = cpu_to_be32(22), ++ .ordinal = TPM_ORD_GET_CAP ++}; ++ ++ssize_t tpm_getcap(struct device *dev, __be32 subcap_id, cap_t *cap, ++ const char *desc) ++{ ++ struct tpm_cmd_t tpm_cmd; ++ int rc; ++ struct tpm_chip *chip = dev_get_drvdata(dev); ++ ++ tpm_cmd.header.in = tpm_getcap_header; ++ if (subcap_id == CAP_VERSION_1_1 || subcap_id == CAP_VERSION_1_2) { ++ tpm_cmd.params.getcap_in.cap = subcap_id; ++ /*subcap field not necessary */ ++ tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(0); ++ tpm_cmd.header.in.length -= cpu_to_be32(sizeof(__be32)); ++ } else { ++ if (subcap_id == TPM_CAP_FLAG_PERM || ++ subcap_id == TPM_CAP_FLAG_VOL) ++ tpm_cmd.params.getcap_in.cap = TPM_CAP_FLAG; ++ else ++ tpm_cmd.params.getcap_in.cap = TPM_CAP_PROP; ++ tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(4); ++ tpm_cmd.params.getcap_in.subcap = subcap_id; ++ } ++ rc = transmit_cmd(chip, &tpm_cmd, TPM_INTERNAL_RESULT_SIZE, desc); ++ if (!rc) ++ *cap = tpm_cmd.params.getcap_out.cap; ++ return rc; ++} ++ ++void tpm_gen_interrupt(struct tpm_chip *chip) ++{ ++ struct tpm_cmd_t tpm_cmd; ++ ssize_t rc; ++ ++ tpm_cmd.header.in = tpm_getcap_header; ++ tpm_cmd.params.getcap_in.cap = TPM_CAP_PROP; ++ tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(4); ++ tpm_cmd.params.getcap_in.subcap = TPM_CAP_PROP_TIS_TIMEOUT; ++ ++ rc = transmit_cmd(chip, &tpm_cmd, TPM_INTERNAL_RESULT_SIZE, ++ "attempting to determine the timeouts"); ++} ++EXPORT_SYMBOL_GPL(tpm_gen_interrupt); ++ ++#define TPM_ORD_STARTUP cpu_to_be32(153) ++#define TPM_ST_CLEAR cpu_to_be16(1) ++#define TPM_ST_STATE cpu_to_be16(2) ++#define TPM_ST_DEACTIVATED cpu_to_be16(3) ++static const struct tpm_input_header tpm_startup_header = { ++ .tag = TPM_TAG_RQU_COMMAND, ++ .length = cpu_to_be32(12), ++ .ordinal = TPM_ORD_STARTUP ++}; ++ ++static int tpm_startup(struct tpm_chip *chip, __be16 startup_type) ++{ ++ struct tpm_cmd_t start_cmd; ++ start_cmd.header.in = tpm_startup_header; ++ start_cmd.params.startup_in.startup_type = startup_type; ++ return transmit_cmd(chip, &start_cmd, TPM_INTERNAL_RESULT_SIZE, ++ "attempting to start the TPM"); ++} ++ ++int tpm_get_timeouts(struct tpm_chip *chip) ++{ ++ struct tpm_cmd_t tpm_cmd; ++ struct timeout_t *timeout_cap; ++ struct duration_t *duration_cap; ++ ssize_t rc; ++ u32 timeout; ++ unsigned int scale = 1; ++ ++ tpm_cmd.header.in = tpm_getcap_header; ++ tpm_cmd.params.getcap_in.cap = TPM_CAP_PROP; ++ tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(4); ++ tpm_cmd.params.getcap_in.subcap = TPM_CAP_PROP_TIS_TIMEOUT; ++ rc = transmit_cmd(chip, &tpm_cmd, TPM_INTERNAL_RESULT_SIZE, NULL); ++ ++ if (rc == TPM_ERR_INVALID_POSTINIT) { ++ /* The TPM is not started, we are the first to talk to it. ++ Execute a startup command. */ ++ dev_info(chip->dev, "Issuing TPM_STARTUP"); ++ if (tpm_startup(chip, TPM_ST_CLEAR)) ++ return rc; ++ ++ tpm_cmd.header.in = tpm_getcap_header; ++ tpm_cmd.params.getcap_in.cap = TPM_CAP_PROP; ++ tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(4); ++ tpm_cmd.params.getcap_in.subcap = TPM_CAP_PROP_TIS_TIMEOUT; ++ rc = transmit_cmd(chip, &tpm_cmd, TPM_INTERNAL_RESULT_SIZE, ++ NULL); ++ } ++ if (rc) { ++ dev_err(chip->dev, ++ "A TPM error (%zd) occurred attempting to determine the timeouts\n", ++ rc); ++ goto duration; ++ } ++ ++ if (be32_to_cpu(tpm_cmd.header.out.return_code) != 0 || ++ be32_to_cpu(tpm_cmd.header.out.length) ++ != sizeof(tpm_cmd.header.out) + sizeof(u32) + 4 * sizeof(u32)) ++ return -EINVAL; ++ ++ timeout_cap = &tpm_cmd.params.getcap_out.cap.timeout; ++ /* Don't overwrite default if value is 0 */ ++ timeout = be32_to_cpu(timeout_cap->a); ++ if (timeout && timeout < 1000) { ++ /* timeouts in msec rather usec */ ++ scale = 1000; ++ chip->vendor.timeout_adjusted = true; ++ } ++ if (timeout) ++ chip->vendor.timeout_a = usecs_to_jiffies(timeout * scale); ++ timeout = be32_to_cpu(timeout_cap->b); ++ if (timeout) ++ chip->vendor.timeout_b = usecs_to_jiffies(timeout * scale); ++ timeout = be32_to_cpu(timeout_cap->c); ++ if (timeout) ++ chip->vendor.timeout_c = usecs_to_jiffies(timeout * scale); ++ timeout = be32_to_cpu(timeout_cap->d); ++ if (timeout) ++ chip->vendor.timeout_d = usecs_to_jiffies(timeout * scale); ++ ++duration: ++ tpm_cmd.header.in = tpm_getcap_header; ++ tpm_cmd.params.getcap_in.cap = TPM_CAP_PROP; ++ tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(4); ++ tpm_cmd.params.getcap_in.subcap = TPM_CAP_PROP_TIS_DURATION; ++ ++ rc = transmit_cmd(chip, &tpm_cmd, TPM_INTERNAL_RESULT_SIZE, ++ "attempting to determine the durations"); ++ if (rc) ++ return rc; ++ ++ if (be32_to_cpu(tpm_cmd.header.out.return_code) != 0 || ++ be32_to_cpu(tpm_cmd.header.out.length) ++ != sizeof(tpm_cmd.header.out) + sizeof(u32) + 3 * sizeof(u32)) ++ return -EINVAL; ++ ++ duration_cap = &tpm_cmd.params.getcap_out.cap.duration; ++ chip->vendor.duration[TPM_SHORT] = ++ usecs_to_jiffies(be32_to_cpu(duration_cap->tpm_short)); ++ chip->vendor.duration[TPM_MEDIUM] = ++ usecs_to_jiffies(be32_to_cpu(duration_cap->tpm_medium)); ++ chip->vendor.duration[TPM_LONG] = ++ usecs_to_jiffies(be32_to_cpu(duration_cap->tpm_long)); ++ ++ /* The Broadcom BCM0102 chipset in a Dell Latitude D820 gets the above ++ * value wrong and apparently reports msecs rather than usecs. So we ++ * fix up the resulting too-small TPM_SHORT value to make things work. ++ * We also scale the TPM_MEDIUM and -_LONG values by 1000. ++ */ ++ if (chip->vendor.duration[TPM_SHORT] < (HZ / 100)) { ++ chip->vendor.duration[TPM_SHORT] = HZ; ++ chip->vendor.duration[TPM_MEDIUM] *= 1000; ++ chip->vendor.duration[TPM_LONG] *= 1000; ++ chip->vendor.duration_adjusted = true; ++ dev_info(chip->dev, "Adjusting TPM timeout parameters."); ++ } ++ return 0; ++} ++EXPORT_SYMBOL_GPL(tpm_get_timeouts); ++ ++#define TPM_ORD_CONTINUE_SELFTEST 83 ++#define CONTINUE_SELFTEST_RESULT_SIZE 10 ++ ++static struct tpm_input_header continue_selftest_header = { ++ .tag = TPM_TAG_RQU_COMMAND, ++ .length = cpu_to_be32(10), ++ .ordinal = cpu_to_be32(TPM_ORD_CONTINUE_SELFTEST), ++}; ++ ++/** ++ * tpm_continue_selftest -- run TPM's selftest ++ * @chip: TPM chip to use ++ * ++ * Returns 0 on success, < 0 in case of fatal error or a value > 0 representing ++ * a TPM error code. ++ */ ++static int tpm_continue_selftest(struct tpm_chip *chip) ++{ ++ int rc; ++ struct tpm_cmd_t cmd; ++ ++ cmd.header.in = continue_selftest_header; ++ rc = transmit_cmd(chip, &cmd, CONTINUE_SELFTEST_RESULT_SIZE, ++ "continue selftest"); ++ return rc; ++} ++ ++ssize_t tpm_show_enabled(struct device *dev, struct device_attribute *attr, ++ char *buf) ++{ ++ cap_t cap; ++ ssize_t rc; ++ ++ rc = tpm_getcap(dev, TPM_CAP_FLAG_PERM, &cap, ++ "attempting to determine the permanent enabled state"); ++ if (rc) ++ return 0; ++ ++ rc = sprintf(buf, "%d\n", !cap.perm_flags.disable); ++ return rc; ++} ++EXPORT_SYMBOL_GPL(tpm_show_enabled); ++ ++ssize_t tpm_show_active(struct device *dev, struct device_attribute *attr, ++ char *buf) ++{ ++ cap_t cap; ++ ssize_t rc; ++ ++ rc = tpm_getcap(dev, TPM_CAP_FLAG_PERM, &cap, ++ "attempting to determine the permanent active state"); ++ if (rc) ++ return 0; ++ ++ rc = sprintf(buf, "%d\n", !cap.perm_flags.deactivated); ++ return rc; ++} ++EXPORT_SYMBOL_GPL(tpm_show_active); ++ ++ssize_t tpm_show_owned(struct device *dev, struct device_attribute *attr, ++ char *buf) ++{ ++ cap_t cap; ++ ssize_t rc; ++ ++ rc = tpm_getcap(dev, TPM_CAP_PROP_OWNER, &cap, ++ "attempting to determine the owner state"); ++ if (rc) ++ return 0; ++ ++ rc = sprintf(buf, "%d\n", cap.owned); ++ return rc; ++} ++EXPORT_SYMBOL_GPL(tpm_show_owned); ++ ++ssize_t tpm_show_temp_deactivated(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ cap_t cap; ++ ssize_t rc; ++ ++ rc = tpm_getcap(dev, TPM_CAP_FLAG_VOL, &cap, ++ "attempting to determine the temporary state"); ++ if (rc) ++ return 0; ++ ++ rc = sprintf(buf, "%d\n", cap.stclear_flags.deactivated); ++ return rc; ++} ++EXPORT_SYMBOL_GPL(tpm_show_temp_deactivated); ++ ++/* ++ * tpm_chip_find_get - return tpm_chip for given chip number ++ */ ++static struct tpm_chip *tpm_chip_find_get(int chip_num) ++{ ++ struct tpm_chip *pos, *chip = NULL; ++ ++ rcu_read_lock(); ++ list_for_each_entry_rcu(pos, &tpm_chip_list, list) { ++ if (chip_num != TPM_ANY_NUM && chip_num != pos->dev_num) ++ continue; ++ ++ if (try_module_get(pos->dev->driver->owner)) { ++ chip = pos; ++ break; ++ } ++ } ++ rcu_read_unlock(); ++ return chip; ++} ++ ++#define TPM_ORDINAL_PCRREAD cpu_to_be32(21) ++#define READ_PCR_RESULT_SIZE 30 ++static struct tpm_input_header pcrread_header = { ++ .tag = TPM_TAG_RQU_COMMAND, ++ .length = cpu_to_be32(14), ++ .ordinal = TPM_ORDINAL_PCRREAD ++}; ++ ++static int __tpm_pcr_read(struct tpm_chip *chip, int pcr_idx, u8 *res_buf) ++{ ++ int rc; ++ struct tpm_cmd_t cmd; ++ ++ cmd.header.in = pcrread_header; ++ cmd.params.pcrread_in.pcr_idx = cpu_to_be32(pcr_idx); ++ rc = transmit_cmd(chip, &cmd, READ_PCR_RESULT_SIZE, ++ "attempting to read a pcr value"); ++ ++ if (rc == 0) ++ memcpy(res_buf, cmd.params.pcrread_out.pcr_result, ++ TPM_DIGEST_SIZE); ++ return rc; ++} ++ ++/** ++ * tpm_pcr_read - read a pcr value ++ * @chip_num: tpm idx # or ANY ++ * @pcr_idx: pcr idx to retrieve ++ * @res_buf: TPM_PCR value ++ * size of res_buf is 20 bytes (or NULL if you don't care) ++ * ++ * The TPM driver should be built-in, but for whatever reason it ++ * isn't, protect against the chip disappearing, by incrementing ++ * the module usage count. ++ */ ++int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf) ++{ ++ struct tpm_chip *chip; ++ int rc; ++ ++ chip = tpm_chip_find_get(chip_num); ++ if (chip == NULL) ++ return -ENODEV; ++ rc = __tpm_pcr_read(chip, pcr_idx, res_buf); ++ tpm_chip_put(chip); ++ return rc; ++} ++EXPORT_SYMBOL_GPL(tpm_pcr_read); ++ ++/** ++ * tpm_pcr_extend - extend pcr value with hash ++ * @chip_num: tpm idx # or AN& ++ * @pcr_idx: pcr idx to extend ++ * @hash: hash value used to extend pcr value ++ * ++ * The TPM driver should be built-in, but for whatever reason it ++ * isn't, protect against the chip disappearing, by incrementing ++ * the module usage count. ++ */ ++#define TPM_ORD_PCR_EXTEND cpu_to_be32(20) ++#define EXTEND_PCR_RESULT_SIZE 34 ++static struct tpm_input_header pcrextend_header = { ++ .tag = TPM_TAG_RQU_COMMAND, ++ .length = cpu_to_be32(34), ++ .ordinal = TPM_ORD_PCR_EXTEND ++}; ++ ++int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash) ++{ ++ struct tpm_cmd_t cmd; ++ int rc; ++ struct tpm_chip *chip; ++ ++ chip = tpm_chip_find_get(chip_num); ++ if (chip == NULL) ++ return -ENODEV; ++ ++ cmd.header.in = pcrextend_header; ++ cmd.params.pcrextend_in.pcr_idx = cpu_to_be32(pcr_idx); ++ memcpy(cmd.params.pcrextend_in.hash, hash, TPM_DIGEST_SIZE); ++ rc = transmit_cmd(chip, &cmd, EXTEND_PCR_RESULT_SIZE, ++ "attempting extend a PCR value"); ++ ++ tpm_chip_put(chip); ++ return rc; ++} ++EXPORT_SYMBOL_GPL(tpm_pcr_extend); ++ ++/** ++ * tpm_do_selftest - have the TPM continue its selftest and wait until it ++ * can receive further commands ++ * @chip: TPM chip to use ++ * ++ * Returns 0 on success, < 0 in case of fatal error or a value > 0 representing ++ * a TPM error code. ++ */ ++int tpm_do_selftest(struct tpm_chip *chip) ++{ ++ int rc; ++ unsigned int loops; ++ unsigned int delay_msec = 100; ++ unsigned long duration; ++ struct tpm_cmd_t cmd; ++ ++ duration = tpm_calc_ordinal_duration(chip, TPM_ORD_CONTINUE_SELFTEST); ++ ++ loops = jiffies_to_msecs(duration) / delay_msec; ++ ++ rc = tpm_continue_selftest(chip); ++ /* This may fail if there was no TPM driver during a suspend/resume ++ * cycle; some may return 10 (BAD_ORDINAL), others 28 (FAILEDSELFTEST) ++ */ ++ if (rc) ++ return rc; ++ ++ do { ++ /* Attempt to read a PCR value */ ++ cmd.header.in = pcrread_header; ++ cmd.params.pcrread_in.pcr_idx = cpu_to_be32(0); ++ rc = tpm_transmit(chip, (u8 *) &cmd, READ_PCR_RESULT_SIZE); ++ /* Some buggy TPMs will not respond to tpm_tis_ready() for ++ * around 300ms while the self test is ongoing, keep trying ++ * until the self test duration expires. */ ++ if (rc == -ETIME) { ++ dev_info(chip->dev, HW_ERR "TPM command timed out during continue self test"); ++ msleep(delay_msec); ++ continue; ++ } ++ ++ if (rc < TPM_HEADER_SIZE) ++ return -EFAULT; ++ ++ rc = be32_to_cpu(cmd.header.out.return_code); ++ if (rc == TPM_ERR_DISABLED || rc == TPM_ERR_DEACTIVATED) { ++ dev_info(chip->dev, ++ "TPM is disabled/deactivated (0x%X)\n", rc); ++ /* TPM is disabled and/or deactivated; driver can ++ * proceed and TPM does handle commands for ++ * suspend/resume correctly ++ */ ++ return 0; ++ } ++ if (rc != TPM_WARN_DOING_SELFTEST) ++ return rc; ++ msleep(delay_msec); ++ } while (--loops > 0); ++ ++ return rc; ++} ++EXPORT_SYMBOL_GPL(tpm_do_selftest); ++ ++int tpm_send(u32 chip_num, void *cmd, size_t buflen) ++{ ++ struct tpm_chip *chip; ++ int rc; ++ ++ chip = tpm_chip_find_get(chip_num); ++ if (chip == NULL) ++ return -ENODEV; ++ ++ rc = transmit_cmd(chip, cmd, buflen, "attempting tpm_cmd"); ++ ++ tpm_chip_put(chip); ++ return rc; ++} ++EXPORT_SYMBOL_GPL(tpm_send); ++ ++ssize_t tpm_show_pcrs(struct device *dev, struct device_attribute *attr, ++ char *buf) ++{ ++ cap_t cap; ++ u8 digest[TPM_DIGEST_SIZE]; ++ ssize_t rc; ++ int i, j, num_pcrs; ++ char *str = buf; ++ struct tpm_chip *chip = dev_get_drvdata(dev); ++ ++ rc = tpm_getcap(dev, TPM_CAP_PROP_PCR, &cap, ++ "attempting to determine the number of PCRS"); ++ if (rc) ++ return 0; ++ ++ num_pcrs = be32_to_cpu(cap.num_pcrs); ++ for (i = 0; i < num_pcrs; i++) { ++ rc = __tpm_pcr_read(chip, i, digest); ++ if (rc) ++ break; ++ str += sprintf(str, "PCR-%02d: ", i); ++ for (j = 0; j < TPM_DIGEST_SIZE; j++) ++ str += sprintf(str, "%02X ", digest[j]); ++ str += sprintf(str, "\n"); ++ } ++ return str - buf; ++} ++EXPORT_SYMBOL_GPL(tpm_show_pcrs); ++ ++#define READ_PUBEK_RESULT_SIZE 314 ++#define TPM_ORD_READPUBEK cpu_to_be32(124) ++static struct tpm_input_header tpm_readpubek_header = { ++ .tag = TPM_TAG_RQU_COMMAND, ++ .length = cpu_to_be32(30), ++ .ordinal = TPM_ORD_READPUBEK ++}; ++ ++ssize_t tpm_show_pubek(struct device *dev, struct device_attribute *attr, ++ char *buf) ++{ ++ u8 *data; ++ struct tpm_cmd_t tpm_cmd; ++ ssize_t err; ++ int i, rc; ++ char *str = buf; ++ ++ struct tpm_chip *chip = dev_get_drvdata(dev); ++ ++ tpm_cmd.header.in = tpm_readpubek_header; ++ err = transmit_cmd(chip, &tpm_cmd, READ_PUBEK_RESULT_SIZE, ++ "attempting to read the PUBEK"); ++ if (err) ++ goto out; ++ ++ /* ++ ignore header 10 bytes ++ algorithm 32 bits (1 == RSA ) ++ encscheme 16 bits ++ sigscheme 16 bits ++ parameters (RSA 12->bytes: keybit, #primes, expbit) ++ keylenbytes 32 bits ++ 256 byte modulus ++ ignore checksum 20 bytes ++ */ ++ data = tpm_cmd.params.readpubek_out_buffer; ++ str += ++ sprintf(str, ++ "Algorithm: %02X %02X %02X %02X\n" ++ "Encscheme: %02X %02X\n" ++ "Sigscheme: %02X %02X\n" ++ "Parameters: %02X %02X %02X %02X " ++ "%02X %02X %02X %02X " ++ "%02X %02X %02X %02X\n" ++ "Modulus length: %d\n" ++ "Modulus:\n", ++ data[0], data[1], data[2], data[3], ++ data[4], data[5], ++ data[6], data[7], ++ data[12], data[13], data[14], data[15], ++ data[16], data[17], data[18], data[19], ++ data[20], data[21], data[22], data[23], ++ be32_to_cpu(*((__be32 *) (data + 24)))); ++ ++ for (i = 0; i < 256; i++) { ++ str += sprintf(str, "%02X ", data[i + 28]); ++ if ((i + 1) % 16 == 0) ++ str += sprintf(str, "\n"); ++ } ++out: ++ rc = str - buf; ++ return rc; ++} ++EXPORT_SYMBOL_GPL(tpm_show_pubek); ++ ++ ++ssize_t tpm_show_caps(struct device *dev, struct device_attribute *attr, ++ char *buf) ++{ ++ cap_t cap; ++ ssize_t rc; ++ char *str = buf; ++ ++ rc = tpm_getcap(dev, TPM_CAP_PROP_MANUFACTURER, &cap, ++ "attempting to determine the manufacturer"); ++ if (rc) ++ return 0; ++ str += sprintf(str, "Manufacturer: 0x%x\n", ++ be32_to_cpu(cap.manufacturer_id)); ++ ++ /* Try to get a TPM version 1.2 TPM_CAP_VERSION_INFO */ ++ rc = tpm_getcap(dev, CAP_VERSION_1_2, &cap, ++ "attempting to determine the 1.2 version"); ++ if (!rc) { ++ str += sprintf(str, ++ "TCG version: %d.%d\nFirmware version: %d.%d\n", ++ cap.tpm_version_1_2.Major, ++ cap.tpm_version_1_2.Minor, ++ cap.tpm_version_1_2.revMajor, ++ cap.tpm_version_1_2.revMinor); ++ } else { ++ /* Otherwise just use TPM_STRUCT_VER */ ++ rc = tpm_getcap(dev, CAP_VERSION_1_1, &cap, ++ "attempting to determine the 1.1 version"); ++ if (rc) ++ return 0; ++ str += sprintf(str, ++ "TCG version: %d.%d\nFirmware version: %d.%d\n", ++ cap.tpm_version.Major, ++ cap.tpm_version.Minor, ++ cap.tpm_version.revMajor, ++ cap.tpm_version.revMinor); ++ } ++ ++ return str - buf; ++} ++EXPORT_SYMBOL_GPL(tpm_show_caps); ++ ++ssize_t tpm_show_durations(struct device *dev, struct device_attribute *attr, ++ char *buf) ++{ ++ struct tpm_chip *chip = dev_get_drvdata(dev); ++ ++ if (chip->vendor.duration[TPM_LONG] == 0) ++ return 0; ++ ++ return sprintf(buf, "%d %d %d [%s]\n", ++ jiffies_to_usecs(chip->vendor.duration[TPM_SHORT]), ++ jiffies_to_usecs(chip->vendor.duration[TPM_MEDIUM]), ++ jiffies_to_usecs(chip->vendor.duration[TPM_LONG]), ++ chip->vendor.duration_adjusted ++ ? "adjusted" : "original"); ++} ++EXPORT_SYMBOL_GPL(tpm_show_durations); ++ ++ssize_t tpm_show_timeouts(struct device *dev, struct device_attribute *attr, ++ char *buf) ++{ ++ struct tpm_chip *chip = dev_get_drvdata(dev); ++ ++ return sprintf(buf, "%d %d %d %d [%s]\n", ++ jiffies_to_usecs(chip->vendor.timeout_a), ++ jiffies_to_usecs(chip->vendor.timeout_b), ++ jiffies_to_usecs(chip->vendor.timeout_c), ++ jiffies_to_usecs(chip->vendor.timeout_d), ++ chip->vendor.timeout_adjusted ++ ? "adjusted" : "original"); ++} ++EXPORT_SYMBOL_GPL(tpm_show_timeouts); ++ ++ssize_t tpm_store_cancel(struct device *dev, struct device_attribute *attr, ++ const char *buf, size_t count) ++{ ++ struct tpm_chip *chip = dev_get_drvdata(dev); ++ if (chip == NULL) ++ return 0; ++ ++ chip->vendor.cancel(chip); ++ return count; ++} ++EXPORT_SYMBOL_GPL(tpm_store_cancel); ++ ++static bool wait_for_tpm_stat_cond(struct tpm_chip *chip, u8 mask, ++ bool check_cancel, bool *canceled) ++{ ++ u8 status = chip->vendor.status(chip); ++ ++ *canceled = false; ++ if ((status & mask) == mask) ++ return true; ++ if (check_cancel && chip->vendor.req_canceled(chip, status)) { ++ *canceled = true; ++ return true; ++ } ++ return false; ++} ++ ++int wait_for_tpm_stat(struct tpm_chip *chip, u8 mask, unsigned long timeout, ++ wait_queue_head_t *queue, bool check_cancel) ++{ ++ unsigned long stop; ++ long rc; ++ u8 status; ++ bool canceled = false; ++ ++ /* check current status */ ++ status = chip->vendor.status(chip); ++ if ((status & mask) == mask) ++ return 0; ++ ++ stop = jiffies + timeout; ++ ++ if (chip->vendor.irq) { ++again: ++ timeout = stop - jiffies; ++ if ((long)timeout <= 0) ++ return -ETIME; ++ rc = wait_event_interruptible_timeout(*queue, ++ wait_for_tpm_stat_cond(chip, mask, check_cancel, ++ &canceled), ++ timeout); ++ if (rc > 0) { ++ if (canceled) ++ return -ECANCELED; ++ return 0; ++ } ++ if (rc == -ERESTARTSYS && freezing(current)) { ++ clear_thread_flag(TIF_SIGPENDING); ++ goto again; ++ } ++ } else { ++ do { ++ msleep(TPM_TIMEOUT); ++ status = chip->vendor.status(chip); ++ if ((status & mask) == mask) ++ return 0; ++ } while (time_before(jiffies, stop)); ++ } ++ return -ETIME; ++} ++EXPORT_SYMBOL_GPL(wait_for_tpm_stat); ++/* ++ * Device file system interface to the TPM ++ * ++ * It's assured that the chip will be opened just once, ++ * by the check of is_open variable, which is protected ++ * by driver_lock. ++ */ ++int tpm_open(struct inode *inode, struct file *file) ++{ ++ struct miscdevice *misc = file->private_data; ++ struct tpm_chip *chip = container_of(misc, struct tpm_chip, ++ vendor.miscdev); ++ ++ if (test_and_set_bit(0, &chip->is_open)) { ++ dev_dbg(chip->dev, "Another process owns this TPM\n"); ++ return -EBUSY; ++ } ++ ++ chip->data_buffer = kzalloc(TPM_BUFSIZE, GFP_KERNEL); ++ if (chip->data_buffer == NULL) { ++ clear_bit(0, &chip->is_open); ++ return -ENOMEM; ++ } ++ ++ atomic_set(&chip->data_pending, 0); ++ ++ file->private_data = chip; ++ get_device(chip->dev); ++ return 0; ++} ++EXPORT_SYMBOL_GPL(tpm_open); ++ ++/* ++ * Called on file close ++ */ ++int tpm_release(struct inode *inode, struct file *file) ++{ ++ struct tpm_chip *chip = file->private_data; ++ ++ del_singleshot_timer_sync(&chip->user_read_timer); ++ flush_work(&chip->work); ++ file->private_data = NULL; ++ atomic_set(&chip->data_pending, 0); ++ kzfree(chip->data_buffer); ++ clear_bit(0, &chip->is_open); ++ put_device(chip->dev); ++ return 0; ++} ++EXPORT_SYMBOL_GPL(tpm_release); ++ ++ssize_t tpm_write(struct file *file, const char __user *buf, ++ size_t size, loff_t *off) ++{ ++ struct tpm_chip *chip = file->private_data; ++ size_t in_size = size; ++ ssize_t out_size; ++ ++ /* cannot perform a write until the read has cleared ++ either via tpm_read or a user_read_timer timeout. ++ This also prevents splitted buffered writes from blocking here. ++ */ ++ if (atomic_read(&chip->data_pending) != 0) ++ return -EBUSY; ++ ++ if (in_size > TPM_BUFSIZE) ++ return -E2BIG; ++ ++ mutex_lock(&chip->buffer_mutex); ++ ++ if (copy_from_user ++ (chip->data_buffer, (void __user *) buf, in_size)) { ++ mutex_unlock(&chip->buffer_mutex); ++ return -EFAULT; ++ } ++ ++ /* atomic tpm command send and result receive */ ++ out_size = tpm_transmit(chip, chip->data_buffer, TPM_BUFSIZE); ++ if (out_size < 0) { ++ mutex_unlock(&chip->buffer_mutex); ++ return out_size; ++ } ++ ++ atomic_set(&chip->data_pending, out_size); ++ mutex_unlock(&chip->buffer_mutex); ++ ++ /* Set a timeout by which the reader must come claim the result */ ++ mod_timer(&chip->user_read_timer, jiffies + (60 * HZ)); ++ ++ return in_size; ++} ++EXPORT_SYMBOL_GPL(tpm_write); ++ ++ssize_t tpm_read(struct file *file, char __user *buf, ++ size_t size, loff_t *off) ++{ ++ struct tpm_chip *chip = file->private_data; ++ ssize_t ret_size; ++ int rc; ++ ++ del_singleshot_timer_sync(&chip->user_read_timer); ++ flush_work(&chip->work); ++ ret_size = atomic_read(&chip->data_pending); ++ if (ret_size > 0) { /* relay data */ ++ ssize_t orig_ret_size = ret_size; ++ if (size < ret_size) ++ ret_size = size; ++ ++ mutex_lock(&chip->buffer_mutex); ++ rc = copy_to_user(buf, chip->data_buffer, ret_size); ++ memset(chip->data_buffer, 0, orig_ret_size); ++ if (rc) ++ ret_size = -EFAULT; ++ ++ mutex_unlock(&chip->buffer_mutex); ++ } ++ ++ atomic_set(&chip->data_pending, 0); ++ ++ return ret_size; ++} ++EXPORT_SYMBOL_GPL(tpm_read); ++ ++void tpm_remove_hardware(struct device *dev) ++{ ++ struct tpm_chip *chip = dev_get_drvdata(dev); ++ ++ if (chip == NULL) { ++ dev_err(dev, "No device data found\n"); ++ return; ++ } ++ ++ spin_lock(&driver_lock); ++ list_del_rcu(&chip->list); ++ spin_unlock(&driver_lock); ++ synchronize_rcu(); ++ ++ misc_deregister(&chip->vendor.miscdev); ++ sysfs_remove_group(&dev->kobj, chip->vendor.attr_group); ++ tpm_remove_ppi(&dev->kobj); ++ tpm_bios_log_teardown(chip->bios_dir); ++ ++ /* write it this way to be explicit (chip->dev == dev) */ ++ put_device(chip->dev); ++} ++EXPORT_SYMBOL_GPL(tpm_remove_hardware); ++ ++#define TPM_ORD_SAVESTATE cpu_to_be32(152) ++#define SAVESTATE_RESULT_SIZE 10 ++ ++static struct tpm_input_header savestate_header = { ++ .tag = TPM_TAG_RQU_COMMAND, ++ .length = cpu_to_be32(10), ++ .ordinal = TPM_ORD_SAVESTATE ++}; ++ ++/* ++ * We are about to suspend. Save the TPM state ++ * so that it can be restored. ++ */ ++int tpm_pm_suspend(struct device *dev) ++{ ++ struct tpm_chip *chip = dev_get_drvdata(dev); ++ struct tpm_cmd_t cmd; ++ int rc, try; ++ ++ u8 dummy_hash[TPM_DIGEST_SIZE] = { 0 }; ++ ++ if (chip == NULL) ++ return -ENODEV; ++ ++ /* for buggy tpm, flush pcrs with extend to selected dummy */ ++ if (tpm_suspend_pcr) { ++ cmd.header.in = pcrextend_header; ++ cmd.params.pcrextend_in.pcr_idx = cpu_to_be32(tpm_suspend_pcr); ++ memcpy(cmd.params.pcrextend_in.hash, dummy_hash, ++ TPM_DIGEST_SIZE); ++ rc = transmit_cmd(chip, &cmd, EXTEND_PCR_RESULT_SIZE, ++ "extending dummy pcr before suspend"); ++ } ++ ++ /* now do the actual savestate */ ++ for (try = 0; try < TPM_RETRY; try++) { ++ cmd.header.in = savestate_header; ++ rc = transmit_cmd(chip, &cmd, SAVESTATE_RESULT_SIZE, NULL); ++ ++ /* ++ * If the TPM indicates that it is too busy to respond to ++ * this command then retry before giving up. It can take ++ * several seconds for this TPM to be ready. ++ * ++ * This can happen if the TPM has already been sent the ++ * SaveState command before the driver has loaded. TCG 1.2 ++ * specification states that any communication after SaveState ++ * may cause the TPM to invalidate previously saved state. ++ */ ++ if (rc != TPM_WARN_RETRY) ++ break; ++ msleep(TPM_TIMEOUT_RETRY); ++ } ++ ++ if (rc) ++ dev_err(chip->dev, ++ "Error (%d) sending savestate before suspend\n", rc); ++ else if (try > 0) ++ dev_warn(chip->dev, "TPM savestate took %dms\n", ++ try * TPM_TIMEOUT_RETRY); ++ ++ return rc; ++} ++EXPORT_SYMBOL_GPL(tpm_pm_suspend); ++ ++/* ++ * Resume from a power safe. The BIOS already restored ++ * the TPM state. ++ */ ++int tpm_pm_resume(struct device *dev) ++{ ++ struct tpm_chip *chip = dev_get_drvdata(dev); ++ ++ if (chip == NULL) ++ return -ENODEV; ++ ++ return 0; ++} ++EXPORT_SYMBOL_GPL(tpm_pm_resume); ++ ++#define TPM_GETRANDOM_RESULT_SIZE 18 ++static struct tpm_input_header tpm_getrandom_header = { ++ .tag = TPM_TAG_RQU_COMMAND, ++ .length = cpu_to_be32(14), ++ .ordinal = TPM_ORD_GET_RANDOM ++}; ++ ++/** ++ * tpm_get_random() - Get random bytes from the tpm's RNG ++ * @chip_num: A specific chip number for the request or TPM_ANY_NUM ++ * @out: destination buffer for the random bytes ++ * @max: the max number of bytes to write to @out ++ * ++ * Returns < 0 on error and the number of bytes read on success ++ */ ++int tpm_get_random(u32 chip_num, u8 *out, size_t max) ++{ ++ struct tpm_chip *chip; ++ struct tpm_cmd_t tpm_cmd; ++ u32 recd, num_bytes = min_t(u32, max, TPM_MAX_RNG_DATA); ++ int err, total = 0, retries = 5; ++ u8 *dest = out; ++ ++ chip = tpm_chip_find_get(chip_num); ++ if (chip == NULL) ++ return -ENODEV; ++ ++ if (!out || !num_bytes || max > TPM_MAX_RNG_DATA) ++ return -EINVAL; ++ ++ do { ++ tpm_cmd.header.in = tpm_getrandom_header; ++ tpm_cmd.params.getrandom_in.num_bytes = cpu_to_be32(num_bytes); ++ ++ err = transmit_cmd(chip, &tpm_cmd, ++ TPM_GETRANDOM_RESULT_SIZE + num_bytes, ++ "attempting get random"); ++ if (err) ++ break; ++ ++ recd = be32_to_cpu(tpm_cmd.params.getrandom_out.rng_data_len); ++ memcpy(dest, tpm_cmd.params.getrandom_out.rng_data, recd); ++ ++ dest += recd; ++ total += recd; ++ num_bytes -= recd; ++ } while (retries-- && total < max); ++ ++ return total ? total : -EIO; ++} ++EXPORT_SYMBOL_GPL(tpm_get_random); ++ ++/* In case vendor provided release function, call it too.*/ ++ ++void tpm_dev_vendor_release(struct tpm_chip *chip) ++{ ++ if (!chip) ++ return; ++ ++ if (chip->vendor.release) ++ chip->vendor.release(chip->dev); ++ ++ clear_bit(chip->dev_num, dev_mask); ++} ++EXPORT_SYMBOL_GPL(tpm_dev_vendor_release); ++ ++ ++/* ++ * Once all references to platform device are down to 0, ++ * release all allocated structures. ++ */ ++void tpm_dev_release(struct device *dev) ++{ ++ struct tpm_chip *chip = dev_get_drvdata(dev); ++ ++ if (!chip) ++ return; ++ ++ tpm_dev_vendor_release(chip); ++ ++ chip->release(dev); ++ kfree(chip); ++} ++EXPORT_SYMBOL_GPL(tpm_dev_release); ++ ++/* ++ * Called from tpm_.c probe function only for devices ++ * the driver has determined it should claim. Prior to calling ++ * this function the specific probe function has called pci_enable_device ++ * upon errant exit from this function specific probe function should call ++ * pci_disable_device ++ */ ++struct tpm_chip *tpm_register_hardware(struct device *dev, ++ const struct tpm_vendor_specific *entry) ++{ ++ struct tpm_chip *chip; ++ ++ /* Driver specific per-device data */ ++ chip = kzalloc(sizeof(*chip), GFP_KERNEL); ++ ++ if (chip == NULL) ++ return NULL; ++ ++ mutex_init(&chip->buffer_mutex); ++ mutex_init(&chip->tpm_mutex); ++ INIT_LIST_HEAD(&chip->list); ++ ++ INIT_WORK(&chip->work, timeout_work); ++ ++ setup_timer(&chip->user_read_timer, user_reader_timeout, ++ (unsigned long)chip); ++ ++ memcpy(&chip->vendor, entry, sizeof(struct tpm_vendor_specific)); ++ ++ chip->dev_num = find_first_zero_bit(dev_mask, TPM_NUM_DEVICES); ++ ++ if (chip->dev_num >= TPM_NUM_DEVICES) { ++ dev_err(dev, "No available tpm device numbers\n"); ++ goto out_free; ++ } else if (chip->dev_num == 0) ++ chip->vendor.miscdev.minor = TPM_MINOR; ++ else ++ chip->vendor.miscdev.minor = MISC_DYNAMIC_MINOR; ++ ++ set_bit(chip->dev_num, dev_mask); ++ ++ scnprintf(chip->devname, sizeof(chip->devname), "%s%d", "tpm", ++ chip->dev_num); ++ chip->vendor.miscdev.name = chip->devname; ++ ++ chip->vendor.miscdev.parent = dev; ++ chip->dev = get_device(dev); ++ chip->release = dev->release; ++ dev->release = tpm_dev_release; ++ dev_set_drvdata(dev, chip); ++ ++ if (misc_register(&chip->vendor.miscdev)) { ++ dev_err(chip->dev, ++ "unable to misc_register %s, minor %d\n", ++ chip->vendor.miscdev.name, ++ chip->vendor.miscdev.minor); ++ goto put_device; ++ } ++ ++ if (sysfs_create_group(&dev->kobj, chip->vendor.attr_group)) { ++ misc_deregister(&chip->vendor.miscdev); ++ goto put_device; ++ } ++ ++ if (tpm_add_ppi(&dev->kobj)) { ++ misc_deregister(&chip->vendor.miscdev); ++ goto put_device; ++ } ++ ++ chip->bios_dir = tpm_bios_log_setup(chip->devname); ++ ++ /* Make chip available */ ++ spin_lock(&driver_lock); ++ list_add_rcu(&chip->list, &tpm_chip_list); ++ spin_unlock(&driver_lock); ++ ++ return chip; ++ ++put_device: ++ put_device(chip->dev); ++out_free: ++ kfree(chip); ++ return NULL; ++} ++EXPORT_SYMBOL_GPL(tpm_register_hardware); ++ ++MODULE_AUTHOR("Leendert van Doorn (leendert@watson.ibm.com)"); ++MODULE_DESCRIPTION("TPM Driver"); ++MODULE_VERSION("2.0"); ++MODULE_LICENSE("GPL"); +diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c +deleted file mode 100644 +index ba780b7..0000000 +--- a/drivers/char/tpm/tpm.c ++++ /dev/null +@@ -1,1536 +0,0 @@ +-/* +- * Copyright (C) 2004 IBM Corporation +- * +- * Authors: +- * Leendert van Doorn +- * Dave Safford +- * Reiner Sailer +- * Kylene Hall +- * +- * Maintained by: +- * +- * Device driver for TCG/TCPA TPM (trusted platform module). +- * Specifications at www.trustedcomputinggroup.org +- * +- * 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, version 2 of the +- * License. +- * +- * Note, the TPM chip is not interrupt driven (only polling) +- * and can have very long timeouts (minutes!). Hence the unusual +- * calls to msleep. +- * +- */ +- +-#include +-#include +-#include +-#include +-#include +- +-#include "tpm.h" +-#include "tpm_eventlog.h" +- +-enum tpm_duration { +- TPM_SHORT = 0, +- TPM_MEDIUM = 1, +- TPM_LONG = 2, +- TPM_UNDEFINED, +-}; +- +-#define TPM_MAX_ORDINAL 243 +-#define TPM_MAX_PROTECTED_ORDINAL 12 +-#define TPM_PROTECTED_ORDINAL_MASK 0xFF +- +-/* +- * Bug workaround - some TPM's don't flush the most +- * recently changed pcr on suspend, so force the flush +- * with an extend to the selected _unused_ non-volatile pcr. +- */ +-static int tpm_suspend_pcr; +-module_param_named(suspend_pcr, tpm_suspend_pcr, uint, 0644); +-MODULE_PARM_DESC(suspend_pcr, +- "PCR to use for dummy writes to faciltate flush on suspend."); +- +-static LIST_HEAD(tpm_chip_list); +-static DEFINE_SPINLOCK(driver_lock); +-static DECLARE_BITMAP(dev_mask, TPM_NUM_DEVICES); +- +-/* +- * Array with one entry per ordinal defining the maximum amount +- * of time the chip could take to return the result. The ordinal +- * designation of short, medium or long is defined in a table in +- * TCG Specification TPM Main Part 2 TPM Structures Section 17. The +- * values of the SHORT, MEDIUM, and LONG durations are retrieved +- * from the chip during initialization with a call to tpm_get_timeouts. +- */ +-static const u8 tpm_protected_ordinal_duration[TPM_MAX_PROTECTED_ORDINAL] = { +- TPM_UNDEFINED, /* 0 */ +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, /* 5 */ +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_SHORT, /* 10 */ +- TPM_SHORT, +-}; +- +-static const u8 tpm_ordinal_duration[TPM_MAX_ORDINAL] = { +- TPM_UNDEFINED, /* 0 */ +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, /* 5 */ +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_SHORT, /* 10 */ +- TPM_SHORT, +- TPM_MEDIUM, +- TPM_LONG, +- TPM_LONG, +- TPM_MEDIUM, /* 15 */ +- TPM_SHORT, +- TPM_SHORT, +- TPM_MEDIUM, +- TPM_LONG, +- TPM_SHORT, /* 20 */ +- TPM_SHORT, +- TPM_MEDIUM, +- TPM_MEDIUM, +- TPM_MEDIUM, +- TPM_SHORT, /* 25 */ +- TPM_SHORT, +- TPM_MEDIUM, +- TPM_SHORT, +- TPM_SHORT, +- TPM_MEDIUM, /* 30 */ +- TPM_LONG, +- TPM_MEDIUM, +- TPM_SHORT, +- TPM_SHORT, +- TPM_SHORT, /* 35 */ +- TPM_MEDIUM, +- TPM_MEDIUM, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_MEDIUM, /* 40 */ +- TPM_LONG, +- TPM_MEDIUM, +- TPM_SHORT, +- TPM_SHORT, +- TPM_SHORT, /* 45 */ +- TPM_SHORT, +- TPM_SHORT, +- TPM_SHORT, +- TPM_LONG, +- TPM_MEDIUM, /* 50 */ +- TPM_MEDIUM, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, /* 55 */ +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_MEDIUM, /* 60 */ +- TPM_MEDIUM, +- TPM_MEDIUM, +- TPM_SHORT, +- TPM_SHORT, +- TPM_MEDIUM, /* 65 */ +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_SHORT, /* 70 */ +- TPM_SHORT, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, /* 75 */ +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_LONG, /* 80 */ +- TPM_UNDEFINED, +- TPM_MEDIUM, +- TPM_LONG, +- TPM_SHORT, +- TPM_UNDEFINED, /* 85 */ +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_SHORT, /* 90 */ +- TPM_SHORT, +- TPM_SHORT, +- TPM_SHORT, +- TPM_SHORT, +- TPM_UNDEFINED, /* 95 */ +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_MEDIUM, /* 100 */ +- TPM_SHORT, +- TPM_SHORT, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, /* 105 */ +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_SHORT, /* 110 */ +- TPM_SHORT, +- TPM_SHORT, +- TPM_SHORT, +- TPM_SHORT, +- TPM_SHORT, /* 115 */ +- TPM_SHORT, +- TPM_SHORT, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_LONG, /* 120 */ +- TPM_LONG, +- TPM_MEDIUM, +- TPM_UNDEFINED, +- TPM_SHORT, +- TPM_SHORT, /* 125 */ +- TPM_SHORT, +- TPM_LONG, +- TPM_SHORT, +- TPM_SHORT, +- TPM_SHORT, /* 130 */ +- TPM_MEDIUM, +- TPM_UNDEFINED, +- TPM_SHORT, +- TPM_MEDIUM, +- TPM_UNDEFINED, /* 135 */ +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_SHORT, /* 140 */ +- TPM_SHORT, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, /* 145 */ +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_SHORT, /* 150 */ +- TPM_MEDIUM, +- TPM_MEDIUM, +- TPM_SHORT, +- TPM_SHORT, +- TPM_UNDEFINED, /* 155 */ +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_SHORT, /* 160 */ +- TPM_SHORT, +- TPM_SHORT, +- TPM_SHORT, +- TPM_UNDEFINED, +- TPM_UNDEFINED, /* 165 */ +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_LONG, /* 170 */ +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, /* 175 */ +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_MEDIUM, /* 180 */ +- TPM_SHORT, +- TPM_MEDIUM, +- TPM_MEDIUM, +- TPM_MEDIUM, +- TPM_MEDIUM, /* 185 */ +- TPM_SHORT, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, /* 190 */ +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, /* 195 */ +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_SHORT, /* 200 */ +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_SHORT, +- TPM_SHORT, /* 205 */ +- TPM_SHORT, +- TPM_SHORT, +- TPM_SHORT, +- TPM_SHORT, +- TPM_MEDIUM, /* 210 */ +- TPM_UNDEFINED, +- TPM_MEDIUM, +- TPM_MEDIUM, +- TPM_MEDIUM, +- TPM_UNDEFINED, /* 215 */ +- TPM_MEDIUM, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_SHORT, +- TPM_SHORT, /* 220 */ +- TPM_SHORT, +- TPM_SHORT, +- TPM_SHORT, +- TPM_SHORT, +- TPM_UNDEFINED, /* 225 */ +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_SHORT, /* 230 */ +- TPM_LONG, +- TPM_MEDIUM, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, /* 235 */ +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_UNDEFINED, +- TPM_SHORT, /* 240 */ +- TPM_UNDEFINED, +- TPM_MEDIUM, +-}; +- +-static void user_reader_timeout(unsigned long ptr) +-{ +- struct tpm_chip *chip = (struct tpm_chip *) ptr; +- +- schedule_work(&chip->work); +-} +- +-static void timeout_work(struct work_struct *work) +-{ +- struct tpm_chip *chip = container_of(work, struct tpm_chip, work); +- +- mutex_lock(&chip->buffer_mutex); +- atomic_set(&chip->data_pending, 0); +- memset(chip->data_buffer, 0, TPM_BUFSIZE); +- mutex_unlock(&chip->buffer_mutex); +-} +- +-/* +- * Returns max number of jiffies to wait +- */ +-unsigned long tpm_calc_ordinal_duration(struct tpm_chip *chip, +- u32 ordinal) +-{ +- int duration_idx = TPM_UNDEFINED; +- int duration = 0; +- +- if (ordinal < TPM_MAX_ORDINAL) +- duration_idx = tpm_ordinal_duration[ordinal]; +- else if ((ordinal & TPM_PROTECTED_ORDINAL_MASK) < +- TPM_MAX_PROTECTED_ORDINAL) +- duration_idx = +- tpm_protected_ordinal_duration[ordinal & +- TPM_PROTECTED_ORDINAL_MASK]; +- +- if (duration_idx != TPM_UNDEFINED) +- duration = chip->vendor.duration[duration_idx]; +- if (duration <= 0) +- return 2 * 60 * HZ; +- else +- return duration; +-} +-EXPORT_SYMBOL_GPL(tpm_calc_ordinal_duration); +- +-/* +- * Internal kernel interface to transmit TPM commands +- */ +-static ssize_t tpm_transmit(struct tpm_chip *chip, const char *buf, +- size_t bufsiz) +-{ +- ssize_t rc; +- u32 count, ordinal; +- unsigned long stop; +- +- if (bufsiz > TPM_BUFSIZE) +- bufsiz = TPM_BUFSIZE; +- +- count = be32_to_cpu(*((__be32 *) (buf + 2))); +- ordinal = be32_to_cpu(*((__be32 *) (buf + 6))); +- if (count == 0) +- return -ENODATA; +- if (count > bufsiz) { +- dev_err(chip->dev, +- "invalid count value %x %zx \n", count, bufsiz); +- return -E2BIG; +- } +- +- mutex_lock(&chip->tpm_mutex); +- +- if ((rc = chip->vendor.send(chip, (u8 *) buf, count)) < 0) { +- dev_err(chip->dev, +- "tpm_transmit: tpm_send: error %zd\n", rc); +- goto out; +- } +- +- if (chip->vendor.irq) +- goto out_recv; +- +- stop = jiffies + tpm_calc_ordinal_duration(chip, ordinal); +- do { +- u8 status = chip->vendor.status(chip); +- if ((status & chip->vendor.req_complete_mask) == +- chip->vendor.req_complete_val) +- goto out_recv; +- +- if ((status == chip->vendor.req_canceled)) { +- dev_err(chip->dev, "Operation Canceled\n"); +- rc = -ECANCELED; +- goto out; +- } +- +- msleep(TPM_TIMEOUT); /* CHECK */ +- rmb(); +- } while (time_before(jiffies, stop)); +- +- chip->vendor.cancel(chip); +- dev_err(chip->dev, "Operation Timed out\n"); +- rc = -ETIME; +- goto out; +- +-out_recv: +- rc = chip->vendor.recv(chip, (u8 *) buf, bufsiz); +- if (rc < 0) +- dev_err(chip->dev, +- "tpm_transmit: tpm_recv: error %zd\n", rc); +-out: +- mutex_unlock(&chip->tpm_mutex); +- return rc; +-} +- +-#define TPM_DIGEST_SIZE 20 +-#define TPM_RET_CODE_IDX 6 +- +-enum tpm_capabilities { +- TPM_CAP_FLAG = cpu_to_be32(4), +- TPM_CAP_PROP = cpu_to_be32(5), +- CAP_VERSION_1_1 = cpu_to_be32(0x06), +- CAP_VERSION_1_2 = cpu_to_be32(0x1A) +-}; +- +-enum tpm_sub_capabilities { +- TPM_CAP_PROP_PCR = cpu_to_be32(0x101), +- TPM_CAP_PROP_MANUFACTURER = cpu_to_be32(0x103), +- TPM_CAP_FLAG_PERM = cpu_to_be32(0x108), +- TPM_CAP_FLAG_VOL = cpu_to_be32(0x109), +- TPM_CAP_PROP_OWNER = cpu_to_be32(0x111), +- TPM_CAP_PROP_TIS_TIMEOUT = cpu_to_be32(0x115), +- TPM_CAP_PROP_TIS_DURATION = cpu_to_be32(0x120), +- +-}; +- +-static ssize_t transmit_cmd(struct tpm_chip *chip, struct tpm_cmd_t *cmd, +- int len, const char *desc) +-{ +- int err; +- +- len = tpm_transmit(chip,(u8 *) cmd, len); +- if (len < 0) +- return len; +- else if (len < TPM_HEADER_SIZE) +- return -EFAULT; +- +- err = be32_to_cpu(cmd->header.out.return_code); +- if (err != 0) +- dev_err(chip->dev, "A TPM error (%d) occurred %s\n", err, desc); +- +- return err; +-} +- +-#define TPM_INTERNAL_RESULT_SIZE 200 +-#define TPM_TAG_RQU_COMMAND cpu_to_be16(193) +-#define TPM_ORD_GET_CAP cpu_to_be32(101) +-#define TPM_ORD_GET_RANDOM cpu_to_be32(70) +- +-static const struct tpm_input_header tpm_getcap_header = { +- .tag = TPM_TAG_RQU_COMMAND, +- .length = cpu_to_be32(22), +- .ordinal = TPM_ORD_GET_CAP +-}; +- +-ssize_t tpm_getcap(struct device *dev, __be32 subcap_id, cap_t *cap, +- const char *desc) +-{ +- struct tpm_cmd_t tpm_cmd; +- int rc; +- struct tpm_chip *chip = dev_get_drvdata(dev); +- +- tpm_cmd.header.in = tpm_getcap_header; +- if (subcap_id == CAP_VERSION_1_1 || subcap_id == CAP_VERSION_1_2) { +- tpm_cmd.params.getcap_in.cap = subcap_id; +- /*subcap field not necessary */ +- tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(0); +- tpm_cmd.header.in.length -= cpu_to_be32(sizeof(__be32)); +- } else { +- if (subcap_id == TPM_CAP_FLAG_PERM || +- subcap_id == TPM_CAP_FLAG_VOL) +- tpm_cmd.params.getcap_in.cap = TPM_CAP_FLAG; +- else +- tpm_cmd.params.getcap_in.cap = TPM_CAP_PROP; +- tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(4); +- tpm_cmd.params.getcap_in.subcap = subcap_id; +- } +- rc = transmit_cmd(chip, &tpm_cmd, TPM_INTERNAL_RESULT_SIZE, desc); +- if (!rc) +- *cap = tpm_cmd.params.getcap_out.cap; +- return rc; +-} +- +-void tpm_gen_interrupt(struct tpm_chip *chip) +-{ +- struct tpm_cmd_t tpm_cmd; +- ssize_t rc; +- +- tpm_cmd.header.in = tpm_getcap_header; +- tpm_cmd.params.getcap_in.cap = TPM_CAP_PROP; +- tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(4); +- tpm_cmd.params.getcap_in.subcap = TPM_CAP_PROP_TIS_TIMEOUT; +- +- rc = transmit_cmd(chip, &tpm_cmd, TPM_INTERNAL_RESULT_SIZE, +- "attempting to determine the timeouts"); +-} +-EXPORT_SYMBOL_GPL(tpm_gen_interrupt); +- +-int tpm_get_timeouts(struct tpm_chip *chip) +-{ +- struct tpm_cmd_t tpm_cmd; +- struct timeout_t *timeout_cap; +- struct duration_t *duration_cap; +- ssize_t rc; +- u32 timeout; +- unsigned int scale = 1; +- +- tpm_cmd.header.in = tpm_getcap_header; +- tpm_cmd.params.getcap_in.cap = TPM_CAP_PROP; +- tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(4); +- tpm_cmd.params.getcap_in.subcap = TPM_CAP_PROP_TIS_TIMEOUT; +- +- rc = transmit_cmd(chip, &tpm_cmd, TPM_INTERNAL_RESULT_SIZE, +- "attempting to determine the timeouts"); +- if (rc) +- goto duration; +- +- if (be32_to_cpu(tpm_cmd.header.out.return_code) != 0 || +- be32_to_cpu(tpm_cmd.header.out.length) +- != sizeof(tpm_cmd.header.out) + sizeof(u32) + 4 * sizeof(u32)) +- return -EINVAL; +- +- timeout_cap = &tpm_cmd.params.getcap_out.cap.timeout; +- /* Don't overwrite default if value is 0 */ +- timeout = be32_to_cpu(timeout_cap->a); +- if (timeout && timeout < 1000) { +- /* timeouts in msec rather usec */ +- scale = 1000; +- chip->vendor.timeout_adjusted = true; +- } +- if (timeout) +- chip->vendor.timeout_a = usecs_to_jiffies(timeout * scale); +- timeout = be32_to_cpu(timeout_cap->b); +- if (timeout) +- chip->vendor.timeout_b = usecs_to_jiffies(timeout * scale); +- timeout = be32_to_cpu(timeout_cap->c); +- if (timeout) +- chip->vendor.timeout_c = usecs_to_jiffies(timeout * scale); +- timeout = be32_to_cpu(timeout_cap->d); +- if (timeout) +- chip->vendor.timeout_d = usecs_to_jiffies(timeout * scale); +- +-duration: +- tpm_cmd.header.in = tpm_getcap_header; +- tpm_cmd.params.getcap_in.cap = TPM_CAP_PROP; +- tpm_cmd.params.getcap_in.subcap_size = cpu_to_be32(4); +- tpm_cmd.params.getcap_in.subcap = TPM_CAP_PROP_TIS_DURATION; +- +- rc = transmit_cmd(chip, &tpm_cmd, TPM_INTERNAL_RESULT_SIZE, +- "attempting to determine the durations"); +- if (rc) +- return rc; +- +- if (be32_to_cpu(tpm_cmd.header.out.return_code) != 0 || +- be32_to_cpu(tpm_cmd.header.out.length) +- != sizeof(tpm_cmd.header.out) + sizeof(u32) + 3 * sizeof(u32)) +- return -EINVAL; +- +- duration_cap = &tpm_cmd.params.getcap_out.cap.duration; +- chip->vendor.duration[TPM_SHORT] = +- usecs_to_jiffies(be32_to_cpu(duration_cap->tpm_short)); +- chip->vendor.duration[TPM_MEDIUM] = +- usecs_to_jiffies(be32_to_cpu(duration_cap->tpm_medium)); +- chip->vendor.duration[TPM_LONG] = +- usecs_to_jiffies(be32_to_cpu(duration_cap->tpm_long)); +- +- /* The Broadcom BCM0102 chipset in a Dell Latitude D820 gets the above +- * value wrong and apparently reports msecs rather than usecs. So we +- * fix up the resulting too-small TPM_SHORT value to make things work. +- * We also scale the TPM_MEDIUM and -_LONG values by 1000. +- */ +- if (chip->vendor.duration[TPM_SHORT] < (HZ / 100)) { +- chip->vendor.duration[TPM_SHORT] = HZ; +- chip->vendor.duration[TPM_MEDIUM] *= 1000; +- chip->vendor.duration[TPM_LONG] *= 1000; +- chip->vendor.duration_adjusted = true; +- dev_info(chip->dev, "Adjusting TPM timeout parameters."); +- } +- return 0; +-} +-EXPORT_SYMBOL_GPL(tpm_get_timeouts); +- +-#define TPM_ORD_CONTINUE_SELFTEST 83 +-#define CONTINUE_SELFTEST_RESULT_SIZE 10 +- +-static struct tpm_input_header continue_selftest_header = { +- .tag = TPM_TAG_RQU_COMMAND, +- .length = cpu_to_be32(10), +- .ordinal = cpu_to_be32(TPM_ORD_CONTINUE_SELFTEST), +-}; +- +-/** +- * tpm_continue_selftest -- run TPM's selftest +- * @chip: TPM chip to use +- * +- * Returns 0 on success, < 0 in case of fatal error or a value > 0 representing +- * a TPM error code. +- */ +-static int tpm_continue_selftest(struct tpm_chip *chip) +-{ +- int rc; +- struct tpm_cmd_t cmd; +- +- cmd.header.in = continue_selftest_header; +- rc = transmit_cmd(chip, &cmd, CONTINUE_SELFTEST_RESULT_SIZE, +- "continue selftest"); +- return rc; +-} +- +-ssize_t tpm_show_enabled(struct device * dev, struct device_attribute * attr, +- char *buf) +-{ +- cap_t cap; +- ssize_t rc; +- +- rc = tpm_getcap(dev, TPM_CAP_FLAG_PERM, &cap, +- "attempting to determine the permanent enabled state"); +- if (rc) +- return 0; +- +- rc = sprintf(buf, "%d\n", !cap.perm_flags.disable); +- return rc; +-} +-EXPORT_SYMBOL_GPL(tpm_show_enabled); +- +-ssize_t tpm_show_active(struct device * dev, struct device_attribute * attr, +- char *buf) +-{ +- cap_t cap; +- ssize_t rc; +- +- rc = tpm_getcap(dev, TPM_CAP_FLAG_PERM, &cap, +- "attempting to determine the permanent active state"); +- if (rc) +- return 0; +- +- rc = sprintf(buf, "%d\n", !cap.perm_flags.deactivated); +- return rc; +-} +-EXPORT_SYMBOL_GPL(tpm_show_active); +- +-ssize_t tpm_show_owned(struct device * dev, struct device_attribute * attr, +- char *buf) +-{ +- cap_t cap; +- ssize_t rc; +- +- rc = tpm_getcap(dev, TPM_CAP_PROP_OWNER, &cap, +- "attempting to determine the owner state"); +- if (rc) +- return 0; +- +- rc = sprintf(buf, "%d\n", cap.owned); +- return rc; +-} +-EXPORT_SYMBOL_GPL(tpm_show_owned); +- +-ssize_t tpm_show_temp_deactivated(struct device * dev, +- struct device_attribute * attr, char *buf) +-{ +- cap_t cap; +- ssize_t rc; +- +- rc = tpm_getcap(dev, TPM_CAP_FLAG_VOL, &cap, +- "attempting to determine the temporary state"); +- if (rc) +- return 0; +- +- rc = sprintf(buf, "%d\n", cap.stclear_flags.deactivated); +- return rc; +-} +-EXPORT_SYMBOL_GPL(tpm_show_temp_deactivated); +- +-/* +- * tpm_chip_find_get - return tpm_chip for given chip number +- */ +-static struct tpm_chip *tpm_chip_find_get(int chip_num) +-{ +- struct tpm_chip *pos, *chip = NULL; +- +- rcu_read_lock(); +- list_for_each_entry_rcu(pos, &tpm_chip_list, list) { +- if (chip_num != TPM_ANY_NUM && chip_num != pos->dev_num) +- continue; +- +- if (try_module_get(pos->dev->driver->owner)) { +- chip = pos; +- break; +- } +- } +- rcu_read_unlock(); +- return chip; +-} +- +-#define TPM_ORDINAL_PCRREAD cpu_to_be32(21) +-#define READ_PCR_RESULT_SIZE 30 +-static struct tpm_input_header pcrread_header = { +- .tag = TPM_TAG_RQU_COMMAND, +- .length = cpu_to_be32(14), +- .ordinal = TPM_ORDINAL_PCRREAD +-}; +- +-static int __tpm_pcr_read(struct tpm_chip *chip, int pcr_idx, u8 *res_buf) +-{ +- int rc; +- struct tpm_cmd_t cmd; +- +- cmd.header.in = pcrread_header; +- cmd.params.pcrread_in.pcr_idx = cpu_to_be32(pcr_idx); +- rc = transmit_cmd(chip, &cmd, READ_PCR_RESULT_SIZE, +- "attempting to read a pcr value"); +- +- if (rc == 0) +- memcpy(res_buf, cmd.params.pcrread_out.pcr_result, +- TPM_DIGEST_SIZE); +- return rc; +-} +- +-/** +- * tpm_pcr_read - read a pcr value +- * @chip_num: tpm idx # or ANY +- * @pcr_idx: pcr idx to retrieve +- * @res_buf: TPM_PCR value +- * size of res_buf is 20 bytes (or NULL if you don't care) +- * +- * The TPM driver should be built-in, but for whatever reason it +- * isn't, protect against the chip disappearing, by incrementing +- * the module usage count. +- */ +-int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf) +-{ +- struct tpm_chip *chip; +- int rc; +- +- chip = tpm_chip_find_get(chip_num); +- if (chip == NULL) +- return -ENODEV; +- rc = __tpm_pcr_read(chip, pcr_idx, res_buf); +- tpm_chip_put(chip); +- return rc; +-} +-EXPORT_SYMBOL_GPL(tpm_pcr_read); +- +-/** +- * tpm_pcr_extend - extend pcr value with hash +- * @chip_num: tpm idx # or AN& +- * @pcr_idx: pcr idx to extend +- * @hash: hash value used to extend pcr value +- * +- * The TPM driver should be built-in, but for whatever reason it +- * isn't, protect against the chip disappearing, by incrementing +- * the module usage count. +- */ +-#define TPM_ORD_PCR_EXTEND cpu_to_be32(20) +-#define EXTEND_PCR_RESULT_SIZE 34 +-static struct tpm_input_header pcrextend_header = { +- .tag = TPM_TAG_RQU_COMMAND, +- .length = cpu_to_be32(34), +- .ordinal = TPM_ORD_PCR_EXTEND +-}; +- +-int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash) +-{ +- struct tpm_cmd_t cmd; +- int rc; +- struct tpm_chip *chip; +- +- chip = tpm_chip_find_get(chip_num); +- if (chip == NULL) +- return -ENODEV; +- +- cmd.header.in = pcrextend_header; +- cmd.params.pcrextend_in.pcr_idx = cpu_to_be32(pcr_idx); +- memcpy(cmd.params.pcrextend_in.hash, hash, TPM_DIGEST_SIZE); +- rc = transmit_cmd(chip, &cmd, EXTEND_PCR_RESULT_SIZE, +- "attempting extend a PCR value"); +- +- tpm_chip_put(chip); +- return rc; +-} +-EXPORT_SYMBOL_GPL(tpm_pcr_extend); +- +-/** +- * tpm_do_selftest - have the TPM continue its selftest and wait until it +- * can receive further commands +- * @chip: TPM chip to use +- * +- * Returns 0 on success, < 0 in case of fatal error or a value > 0 representing +- * a TPM error code. +- */ +-int tpm_do_selftest(struct tpm_chip *chip) +-{ +- int rc; +- unsigned int loops; +- unsigned int delay_msec = 1000; +- unsigned long duration; +- struct tpm_cmd_t cmd; +- +- duration = tpm_calc_ordinal_duration(chip, +- TPM_ORD_CONTINUE_SELFTEST); +- +- loops = jiffies_to_msecs(duration) / delay_msec; +- +- rc = tpm_continue_selftest(chip); +- /* This may fail if there was no TPM driver during a suspend/resume +- * cycle; some may return 10 (BAD_ORDINAL), others 28 (FAILEDSELFTEST) +- */ +- if (rc) +- return rc; +- +- do { +- /* Attempt to read a PCR value */ +- cmd.header.in = pcrread_header; +- cmd.params.pcrread_in.pcr_idx = cpu_to_be32(0); +- rc = tpm_transmit(chip, (u8 *) &cmd, READ_PCR_RESULT_SIZE); +- +- if (rc < TPM_HEADER_SIZE) +- return -EFAULT; +- +- rc = be32_to_cpu(cmd.header.out.return_code); +- if (rc == TPM_ERR_DISABLED || rc == TPM_ERR_DEACTIVATED) { +- dev_info(chip->dev, +- "TPM is disabled/deactivated (0x%X)\n", rc); +- /* TPM is disabled and/or deactivated; driver can +- * proceed and TPM does handle commands for +- * suspend/resume correctly +- */ +- return 0; +- } +- if (rc != TPM_WARN_DOING_SELFTEST) +- return rc; +- msleep(delay_msec); +- } while (--loops > 0); +- +- return rc; +-} +-EXPORT_SYMBOL_GPL(tpm_do_selftest); +- +-int tpm_send(u32 chip_num, void *cmd, size_t buflen) +-{ +- struct tpm_chip *chip; +- int rc; +- +- chip = tpm_chip_find_get(chip_num); +- if (chip == NULL) +- return -ENODEV; +- +- rc = transmit_cmd(chip, cmd, buflen, "attempting tpm_cmd"); +- +- tpm_chip_put(chip); +- return rc; +-} +-EXPORT_SYMBOL_GPL(tpm_send); +- +-ssize_t tpm_show_pcrs(struct device *dev, struct device_attribute *attr, +- char *buf) +-{ +- cap_t cap; +- u8 digest[TPM_DIGEST_SIZE]; +- ssize_t rc; +- int i, j, num_pcrs; +- char *str = buf; +- struct tpm_chip *chip = dev_get_drvdata(dev); +- +- rc = tpm_getcap(dev, TPM_CAP_PROP_PCR, &cap, +- "attempting to determine the number of PCRS"); +- if (rc) +- return 0; +- +- num_pcrs = be32_to_cpu(cap.num_pcrs); +- for (i = 0; i < num_pcrs; i++) { +- rc = __tpm_pcr_read(chip, i, digest); +- if (rc) +- break; +- str += sprintf(str, "PCR-%02d: ", i); +- for (j = 0; j < TPM_DIGEST_SIZE; j++) +- str += sprintf(str, "%02X ", digest[j]); +- str += sprintf(str, "\n"); +- } +- return str - buf; +-} +-EXPORT_SYMBOL_GPL(tpm_show_pcrs); +- +-#define READ_PUBEK_RESULT_SIZE 314 +-#define TPM_ORD_READPUBEK cpu_to_be32(124) +-static struct tpm_input_header tpm_readpubek_header = { +- .tag = TPM_TAG_RQU_COMMAND, +- .length = cpu_to_be32(30), +- .ordinal = TPM_ORD_READPUBEK +-}; +- +-ssize_t tpm_show_pubek(struct device *dev, struct device_attribute *attr, +- char *buf) +-{ +- u8 *data; +- struct tpm_cmd_t tpm_cmd; +- ssize_t err; +- int i, rc; +- char *str = buf; +- +- struct tpm_chip *chip = dev_get_drvdata(dev); +- +- tpm_cmd.header.in = tpm_readpubek_header; +- err = transmit_cmd(chip, &tpm_cmd, READ_PUBEK_RESULT_SIZE, +- "attempting to read the PUBEK"); +- if (err) +- goto out; +- +- /* +- ignore header 10 bytes +- algorithm 32 bits (1 == RSA ) +- encscheme 16 bits +- sigscheme 16 bits +- parameters (RSA 12->bytes: keybit, #primes, expbit) +- keylenbytes 32 bits +- 256 byte modulus +- ignore checksum 20 bytes +- */ +- data = tpm_cmd.params.readpubek_out_buffer; +- str += +- sprintf(str, +- "Algorithm: %02X %02X %02X %02X\n" +- "Encscheme: %02X %02X\n" +- "Sigscheme: %02X %02X\n" +- "Parameters: %02X %02X %02X %02X " +- "%02X %02X %02X %02X " +- "%02X %02X %02X %02X\n" +- "Modulus length: %d\n" +- "Modulus:\n", +- data[0], data[1], data[2], data[3], +- data[4], data[5], +- data[6], data[7], +- data[12], data[13], data[14], data[15], +- data[16], data[17], data[18], data[19], +- data[20], data[21], data[22], data[23], +- be32_to_cpu(*((__be32 *) (data + 24)))); +- +- for (i = 0; i < 256; i++) { +- str += sprintf(str, "%02X ", data[i + 28]); +- if ((i + 1) % 16 == 0) +- str += sprintf(str, "\n"); +- } +-out: +- rc = str - buf; +- return rc; +-} +-EXPORT_SYMBOL_GPL(tpm_show_pubek); +- +- +-ssize_t tpm_show_caps(struct device *dev, struct device_attribute *attr, +- char *buf) +-{ +- cap_t cap; +- ssize_t rc; +- char *str = buf; +- +- rc = tpm_getcap(dev, TPM_CAP_PROP_MANUFACTURER, &cap, +- "attempting to determine the manufacturer"); +- if (rc) +- return 0; +- str += sprintf(str, "Manufacturer: 0x%x\n", +- be32_to_cpu(cap.manufacturer_id)); +- +- rc = tpm_getcap(dev, CAP_VERSION_1_1, &cap, +- "attempting to determine the 1.1 version"); +- if (rc) +- return 0; +- str += sprintf(str, +- "TCG version: %d.%d\nFirmware version: %d.%d\n", +- cap.tpm_version.Major, cap.tpm_version.Minor, +- cap.tpm_version.revMajor, cap.tpm_version.revMinor); +- return str - buf; +-} +-EXPORT_SYMBOL_GPL(tpm_show_caps); +- +-ssize_t tpm_show_caps_1_2(struct device * dev, +- struct device_attribute * attr, char *buf) +-{ +- cap_t cap; +- ssize_t rc; +- char *str = buf; +- +- rc = tpm_getcap(dev, TPM_CAP_PROP_MANUFACTURER, &cap, +- "attempting to determine the manufacturer"); +- if (rc) +- return 0; +- str += sprintf(str, "Manufacturer: 0x%x\n", +- be32_to_cpu(cap.manufacturer_id)); +- rc = tpm_getcap(dev, CAP_VERSION_1_2, &cap, +- "attempting to determine the 1.2 version"); +- if (rc) +- return 0; +- str += sprintf(str, +- "TCG version: %d.%d\nFirmware version: %d.%d\n", +- cap.tpm_version_1_2.Major, cap.tpm_version_1_2.Minor, +- cap.tpm_version_1_2.revMajor, +- cap.tpm_version_1_2.revMinor); +- return str - buf; +-} +-EXPORT_SYMBOL_GPL(tpm_show_caps_1_2); +- +-ssize_t tpm_show_durations(struct device *dev, struct device_attribute *attr, +- char *buf) +-{ +- struct tpm_chip *chip = dev_get_drvdata(dev); +- +- if (chip->vendor.duration[TPM_LONG] == 0) +- return 0; +- +- return sprintf(buf, "%d %d %d [%s]\n", +- jiffies_to_usecs(chip->vendor.duration[TPM_SHORT]), +- jiffies_to_usecs(chip->vendor.duration[TPM_MEDIUM]), +- jiffies_to_usecs(chip->vendor.duration[TPM_LONG]), +- chip->vendor.duration_adjusted +- ? "adjusted" : "original"); +-} +-EXPORT_SYMBOL_GPL(tpm_show_durations); +- +-ssize_t tpm_show_timeouts(struct device *dev, struct device_attribute *attr, +- char *buf) +-{ +- struct tpm_chip *chip = dev_get_drvdata(dev); +- +- return sprintf(buf, "%d %d %d %d [%s]\n", +- jiffies_to_usecs(chip->vendor.timeout_a), +- jiffies_to_usecs(chip->vendor.timeout_b), +- jiffies_to_usecs(chip->vendor.timeout_c), +- jiffies_to_usecs(chip->vendor.timeout_d), +- chip->vendor.timeout_adjusted +- ? "adjusted" : "original"); +-} +-EXPORT_SYMBOL_GPL(tpm_show_timeouts); +- +-ssize_t tpm_store_cancel(struct device *dev, struct device_attribute *attr, +- const char *buf, size_t count) +-{ +- struct tpm_chip *chip = dev_get_drvdata(dev); +- if (chip == NULL) +- return 0; +- +- chip->vendor.cancel(chip); +- return count; +-} +-EXPORT_SYMBOL_GPL(tpm_store_cancel); +- +-int wait_for_tpm_stat(struct tpm_chip *chip, u8 mask, unsigned long timeout, +- wait_queue_head_t *queue) +-{ +- unsigned long stop; +- long rc; +- u8 status; +- +- /* check current status */ +- status = chip->vendor.status(chip); +- if ((status & mask) == mask) +- return 0; +- +- stop = jiffies + timeout; +- +- if (chip->vendor.irq) { +-again: +- timeout = stop - jiffies; +- if ((long)timeout <= 0) +- return -ETIME; +- rc = wait_event_interruptible_timeout(*queue, +- ((chip->vendor.status(chip) +- & mask) == mask), +- timeout); +- if (rc > 0) +- return 0; +- if (rc == -ERESTARTSYS && freezing(current)) { +- clear_thread_flag(TIF_SIGPENDING); +- goto again; +- } +- } else { +- do { +- msleep(TPM_TIMEOUT); +- status = chip->vendor.status(chip); +- if ((status & mask) == mask) +- return 0; +- } while (time_before(jiffies, stop)); +- } +- return -ETIME; +-} +-EXPORT_SYMBOL_GPL(wait_for_tpm_stat); +-/* +- * Device file system interface to the TPM +- * +- * It's assured that the chip will be opened just once, +- * by the check of is_open variable, which is protected +- * by driver_lock. +- */ +-int tpm_open(struct inode *inode, struct file *file) +-{ +- int minor = iminor(inode); +- struct tpm_chip *chip = NULL, *pos; +- +- rcu_read_lock(); +- list_for_each_entry_rcu(pos, &tpm_chip_list, list) { +- if (pos->vendor.miscdev.minor == minor) { +- chip = pos; +- get_device(chip->dev); +- break; +- } +- } +- rcu_read_unlock(); +- +- if (!chip) +- return -ENODEV; +- +- if (test_and_set_bit(0, &chip->is_open)) { +- dev_dbg(chip->dev, "Another process owns this TPM\n"); +- put_device(chip->dev); +- return -EBUSY; +- } +- +- chip->data_buffer = kzalloc(TPM_BUFSIZE, GFP_KERNEL); +- if (chip->data_buffer == NULL) { +- clear_bit(0, &chip->is_open); +- put_device(chip->dev); +- return -ENOMEM; +- } +- +- atomic_set(&chip->data_pending, 0); +- +- file->private_data = chip; +- return 0; +-} +-EXPORT_SYMBOL_GPL(tpm_open); +- +-/* +- * Called on file close +- */ +-int tpm_release(struct inode *inode, struct file *file) +-{ +- struct tpm_chip *chip = file->private_data; +- +- del_singleshot_timer_sync(&chip->user_read_timer); +- flush_work(&chip->work); +- file->private_data = NULL; +- atomic_set(&chip->data_pending, 0); +- kzfree(chip->data_buffer); +- clear_bit(0, &chip->is_open); +- put_device(chip->dev); +- return 0; +-} +-EXPORT_SYMBOL_GPL(tpm_release); +- +-ssize_t tpm_write(struct file *file, const char __user *buf, +- size_t size, loff_t *off) +-{ +- struct tpm_chip *chip = file->private_data; +- size_t in_size = size; +- ssize_t out_size; +- +- /* cannot perform a write until the read has cleared +- either via tpm_read or a user_read_timer timeout. +- This also prevents splitted buffered writes from blocking here. +- */ +- if (atomic_read(&chip->data_pending) != 0) +- return -EBUSY; +- +- if (in_size > TPM_BUFSIZE) +- return -E2BIG; +- +- mutex_lock(&chip->buffer_mutex); +- +- if (copy_from_user +- (chip->data_buffer, (void __user *) buf, in_size)) { +- mutex_unlock(&chip->buffer_mutex); +- return -EFAULT; +- } +- +- /* atomic tpm command send and result receive */ +- out_size = tpm_transmit(chip, chip->data_buffer, TPM_BUFSIZE); +- if (out_size < 0) { +- mutex_unlock(&chip->buffer_mutex); +- return out_size; +- } +- +- atomic_set(&chip->data_pending, out_size); +- mutex_unlock(&chip->buffer_mutex); +- +- /* Set a timeout by which the reader must come claim the result */ +- mod_timer(&chip->user_read_timer, jiffies + (60 * HZ)); +- +- return in_size; +-} +-EXPORT_SYMBOL_GPL(tpm_write); +- +-ssize_t tpm_read(struct file *file, char __user *buf, +- size_t size, loff_t *off) +-{ +- struct tpm_chip *chip = file->private_data; +- ssize_t ret_size; +- int rc; +- +- del_singleshot_timer_sync(&chip->user_read_timer); +- flush_work(&chip->work); +- ret_size = atomic_read(&chip->data_pending); +- if (ret_size > 0) { /* relay data */ +- ssize_t orig_ret_size = ret_size; +- if (size < ret_size) +- ret_size = size; +- +- mutex_lock(&chip->buffer_mutex); +- rc = copy_to_user(buf, chip->data_buffer, ret_size); +- memset(chip->data_buffer, 0, orig_ret_size); +- if (rc) +- ret_size = -EFAULT; +- +- mutex_unlock(&chip->buffer_mutex); +- } +- +- atomic_set(&chip->data_pending, 0); +- +- return ret_size; +-} +-EXPORT_SYMBOL_GPL(tpm_read); +- +-void tpm_remove_hardware(struct device *dev) +-{ +- struct tpm_chip *chip = dev_get_drvdata(dev); +- +- if (chip == NULL) { +- dev_err(dev, "No device data found\n"); +- return; +- } +- +- spin_lock(&driver_lock); +- list_del_rcu(&chip->list); +- spin_unlock(&driver_lock); +- synchronize_rcu(); +- +- misc_deregister(&chip->vendor.miscdev); +- sysfs_remove_group(&dev->kobj, chip->vendor.attr_group); +- tpm_remove_ppi(&dev->kobj); +- tpm_bios_log_teardown(chip->bios_dir); +- +- /* write it this way to be explicit (chip->dev == dev) */ +- put_device(chip->dev); +-} +-EXPORT_SYMBOL_GPL(tpm_remove_hardware); +- +-#define TPM_ORD_SAVESTATE cpu_to_be32(152) +-#define SAVESTATE_RESULT_SIZE 10 +- +-static struct tpm_input_header savestate_header = { +- .tag = TPM_TAG_RQU_COMMAND, +- .length = cpu_to_be32(10), +- .ordinal = TPM_ORD_SAVESTATE +-}; +- +-/* +- * We are about to suspend. Save the TPM state +- * so that it can be restored. +- */ +-int tpm_pm_suspend(struct device *dev) +-{ +- struct tpm_chip *chip = dev_get_drvdata(dev); +- struct tpm_cmd_t cmd; +- int rc, try; +- +- u8 dummy_hash[TPM_DIGEST_SIZE] = { 0 }; +- +- if (chip == NULL) +- return -ENODEV; +- +- /* for buggy tpm, flush pcrs with extend to selected dummy */ +- if (tpm_suspend_pcr) { +- cmd.header.in = pcrextend_header; +- cmd.params.pcrextend_in.pcr_idx = cpu_to_be32(tpm_suspend_pcr); +- memcpy(cmd.params.pcrextend_in.hash, dummy_hash, +- TPM_DIGEST_SIZE); +- rc = transmit_cmd(chip, &cmd, EXTEND_PCR_RESULT_SIZE, +- "extending dummy pcr before suspend"); +- } +- +- /* now do the actual savestate */ +- for (try = 0; try < TPM_RETRY; try++) { +- cmd.header.in = savestate_header; +- rc = transmit_cmd(chip, &cmd, SAVESTATE_RESULT_SIZE, NULL); +- +- /* +- * If the TPM indicates that it is too busy to respond to +- * this command then retry before giving up. It can take +- * several seconds for this TPM to be ready. +- * +- * This can happen if the TPM has already been sent the +- * SaveState command before the driver has loaded. TCG 1.2 +- * specification states that any communication after SaveState +- * may cause the TPM to invalidate previously saved state. +- */ +- if (rc != TPM_WARN_RETRY) +- break; +- msleep(TPM_TIMEOUT_RETRY); +- } +- +- if (rc) +- dev_err(chip->dev, +- "Error (%d) sending savestate before suspend\n", rc); +- else if (try > 0) +- dev_warn(chip->dev, "TPM savestate took %dms\n", +- try * TPM_TIMEOUT_RETRY); +- +- return rc; +-} +-EXPORT_SYMBOL_GPL(tpm_pm_suspend); +- +-/* +- * Resume from a power safe. The BIOS already restored +- * the TPM state. +- */ +-int tpm_pm_resume(struct device *dev) +-{ +- struct tpm_chip *chip = dev_get_drvdata(dev); +- +- if (chip == NULL) +- return -ENODEV; +- +- return 0; +-} +-EXPORT_SYMBOL_GPL(tpm_pm_resume); +- +-#define TPM_GETRANDOM_RESULT_SIZE 18 +-static struct tpm_input_header tpm_getrandom_header = { +- .tag = TPM_TAG_RQU_COMMAND, +- .length = cpu_to_be32(14), +- .ordinal = TPM_ORD_GET_RANDOM +-}; +- +-/** +- * tpm_get_random() - Get random bytes from the tpm's RNG +- * @chip_num: A specific chip number for the request or TPM_ANY_NUM +- * @out: destination buffer for the random bytes +- * @max: the max number of bytes to write to @out +- * +- * Returns < 0 on error and the number of bytes read on success +- */ +-int tpm_get_random(u32 chip_num, u8 *out, size_t max) +-{ +- struct tpm_chip *chip; +- struct tpm_cmd_t tpm_cmd; +- u32 recd, num_bytes = min_t(u32, max, TPM_MAX_RNG_DATA); +- int err, total = 0, retries = 5; +- u8 *dest = out; +- +- chip = tpm_chip_find_get(chip_num); +- if (chip == NULL) +- return -ENODEV; +- +- if (!out || !num_bytes || max > TPM_MAX_RNG_DATA) +- return -EINVAL; +- +- do { +- tpm_cmd.header.in = tpm_getrandom_header; +- tpm_cmd.params.getrandom_in.num_bytes = cpu_to_be32(num_bytes); +- +- err = transmit_cmd(chip, &tpm_cmd, +- TPM_GETRANDOM_RESULT_SIZE + num_bytes, +- "attempting get random"); +- if (err) +- break; +- +- recd = be32_to_cpu(tpm_cmd.params.getrandom_out.rng_data_len); +- memcpy(dest, tpm_cmd.params.getrandom_out.rng_data, recd); +- +- dest += recd; +- total += recd; +- num_bytes -= recd; +- } while (retries-- && total < max); +- +- return total ? total : -EIO; +-} +-EXPORT_SYMBOL_GPL(tpm_get_random); +- +-/* In case vendor provided release function, call it too.*/ +- +-void tpm_dev_vendor_release(struct tpm_chip *chip) +-{ +- if (!chip) +- return; +- +- if (chip->vendor.release) +- chip->vendor.release(chip->dev); +- +- clear_bit(chip->dev_num, dev_mask); +- kfree(chip->vendor.miscdev.name); +-} +-EXPORT_SYMBOL_GPL(tpm_dev_vendor_release); +- +- +-/* +- * Once all references to platform device are down to 0, +- * release all allocated structures. +- */ +-static void tpm_dev_release(struct device *dev) +-{ +- struct tpm_chip *chip = dev_get_drvdata(dev); +- +- if (!chip) +- return; +- +- tpm_dev_vendor_release(chip); +- +- chip->release(dev); +- kfree(chip); +-} +-EXPORT_SYMBOL_GPL(tpm_dev_release); +- +-/* +- * Called from tpm_.c probe function only for devices +- * the driver has determined it should claim. Prior to calling +- * this function the specific probe function has called pci_enable_device +- * upon errant exit from this function specific probe function should call +- * pci_disable_device +- */ +-struct tpm_chip *tpm_register_hardware(struct device *dev, +- const struct tpm_vendor_specific *entry) +-{ +-#define DEVNAME_SIZE 7 +- +- char *devname; +- struct tpm_chip *chip; +- +- /* Driver specific per-device data */ +- chip = kzalloc(sizeof(*chip), GFP_KERNEL); +- devname = kmalloc(DEVNAME_SIZE, GFP_KERNEL); +- +- if (chip == NULL || devname == NULL) +- goto out_free; +- +- mutex_init(&chip->buffer_mutex); +- mutex_init(&chip->tpm_mutex); +- INIT_LIST_HEAD(&chip->list); +- +- INIT_WORK(&chip->work, timeout_work); +- +- setup_timer(&chip->user_read_timer, user_reader_timeout, +- (unsigned long)chip); +- +- memcpy(&chip->vendor, entry, sizeof(struct tpm_vendor_specific)); +- +- chip->dev_num = find_first_zero_bit(dev_mask, TPM_NUM_DEVICES); +- +- if (chip->dev_num >= TPM_NUM_DEVICES) { +- dev_err(dev, "No available tpm device numbers\n"); +- goto out_free; +- } else if (chip->dev_num == 0) +- chip->vendor.miscdev.minor = TPM_MINOR; +- else +- chip->vendor.miscdev.minor = MISC_DYNAMIC_MINOR; +- +- set_bit(chip->dev_num, dev_mask); +- +- scnprintf(devname, DEVNAME_SIZE, "%s%d", "tpm", chip->dev_num); +- chip->vendor.miscdev.name = devname; +- +- chip->vendor.miscdev.parent = dev; +- chip->dev = get_device(dev); +- chip->release = dev->release; +- dev->release = tpm_dev_release; +- dev_set_drvdata(dev, chip); +- +- if (misc_register(&chip->vendor.miscdev)) { +- dev_err(chip->dev, +- "unable to misc_register %s, minor %d\n", +- chip->vendor.miscdev.name, +- chip->vendor.miscdev.minor); +- goto put_device; +- } +- +- if (sysfs_create_group(&dev->kobj, chip->vendor.attr_group)) { +- misc_deregister(&chip->vendor.miscdev); +- goto put_device; +- } +- +- if (tpm_add_ppi(&dev->kobj)) { +- misc_deregister(&chip->vendor.miscdev); +- goto put_device; +- } +- +- chip->bios_dir = tpm_bios_log_setup(devname); +- +- /* Make chip available */ +- spin_lock(&driver_lock); +- list_add_rcu(&chip->list, &tpm_chip_list); +- spin_unlock(&driver_lock); +- +- return chip; +- +-put_device: +- put_device(chip->dev); +-out_free: +- kfree(chip); +- kfree(devname); +- return NULL; +-} +-EXPORT_SYMBOL_GPL(tpm_register_hardware); +- +-MODULE_AUTHOR("Leendert van Doorn (leendert@watson.ibm.com)"); +-MODULE_DESCRIPTION("TPM Driver"); +-MODULE_VERSION("2.0"); +-MODULE_LICENSE("GPL"); +diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h +index 9c12a52..f328478 100644 +--- a/drivers/char/tpm/tpm.h ++++ b/drivers/char/tpm/tpm.h +@@ -50,6 +50,7 @@ enum tpm_addr { + #define TPM_WARN_DOING_SELFTEST 0x802 + #define TPM_ERR_DEACTIVATED 0x6 + #define TPM_ERR_DISABLED 0x7 ++#define TPM_ERR_INVALID_POSTINIT 38 + + #define TPM_HEADER_SIZE 10 + extern ssize_t tpm_show_pubek(struct device *, struct device_attribute *attr, +@@ -58,8 +59,6 @@ extern ssize_t tpm_show_pcrs(struct device *, struct device_attribute *attr, + char *); + extern ssize_t tpm_show_caps(struct device *, struct device_attribute *attr, + char *); +-extern ssize_t tpm_show_caps_1_2(struct device *, struct device_attribute *attr, +- char *); + extern ssize_t tpm_store_cancel(struct device *, struct device_attribute *attr, + const char *, size_t); + extern ssize_t tpm_show_enabled(struct device *, struct device_attribute *attr, +@@ -80,7 +79,7 @@ struct tpm_chip; + struct tpm_vendor_specific { + const u8 req_complete_mask; + const u8 req_complete_val; +- const u8 req_canceled; ++ bool (*req_canceled)(struct tpm_chip *chip, u8 status); + void __iomem *iobase; /* ioremapped address */ + unsigned long base; /* TPM base address */ + +@@ -103,18 +102,25 @@ struct tpm_vendor_specific { + bool timeout_adjusted; + unsigned long duration[3]; /* jiffies */ + bool duration_adjusted; +- void *data; ++ void *priv; + + wait_queue_head_t read_queue; + wait_queue_head_t int_queue; ++ ++ u16 manufacturer_id; + }; + ++#define TPM_VPRIV(c) (c)->vendor.priv ++ + #define TPM_VID_INTEL 0x8086 ++#define TPM_VID_WINBOND 0x1050 ++#define TPM_VID_STM 0x104A + + struct tpm_chip { + struct device *dev; /* Device stuff */ + + int dev_num; /* /dev/tpm# */ ++ char devname[7]; + unsigned long is_open; /* only one allowed */ + int time_expired; + +@@ -157,13 +163,13 @@ struct tpm_input_header { + __be16 tag; + __be32 length; + __be32 ordinal; +-}__attribute__((packed)); ++} __packed; + + struct tpm_output_header { + __be16 tag; + __be32 length; + __be32 return_code; +-}__attribute__((packed)); ++} __packed; + + struct stclear_flags_t { + __be16 tag; +@@ -172,14 +178,14 @@ struct stclear_flags_t { + u8 physicalPresence; + u8 physicalPresenceLock; + u8 bGlobalLock; +-}__attribute__((packed)); ++} __packed; + + struct tpm_version_t { + u8 Major; + u8 Minor; + u8 revMajor; + u8 revMinor; +-}__attribute__((packed)); ++} __packed; + + struct tpm_version_1_2_t { + __be16 tag; +@@ -187,20 +193,20 @@ struct tpm_version_1_2_t { + u8 Minor; + u8 revMajor; + u8 revMinor; +-}__attribute__((packed)); ++} __packed; + + struct timeout_t { + __be32 a; + __be32 b; + __be32 c; + __be32 d; +-}__attribute__((packed)); ++} __packed; + + struct duration_t { + __be32 tpm_short; + __be32 tpm_medium; + __be32 tpm_long; +-}__attribute__((packed)); ++} __packed; + + struct permanent_flags_t { + __be16 tag; +@@ -224,7 +230,7 @@ struct permanent_flags_t { + u8 tpmEstablished; + u8 maintenanceDone; + u8 disableFullDALogicInfo; +-}__attribute__((packed)); ++} __packed; + + typedef union { + struct permanent_flags_t perm_flags; +@@ -242,12 +248,12 @@ struct tpm_getcap_params_in { + __be32 cap; + __be32 subcap_size; + __be32 subcap; +-}__attribute__((packed)); ++} __packed; + + struct tpm_getcap_params_out { + __be32 cap_size; + cap_t cap; +-}__attribute__((packed)); ++} __packed; + + struct tpm_readpubek_params_out { + u8 algorithm[4]; +@@ -258,26 +264,25 @@ struct tpm_readpubek_params_out { + __be32 keysize; + u8 modulus[256]; + u8 checksum[20]; +-}__attribute__((packed)); ++} __packed; + + typedef union { + struct tpm_input_header in; + struct tpm_output_header out; + } tpm_cmd_header; + +-#define TPM_DIGEST_SIZE 20 + struct tpm_pcrread_out { + u8 pcr_result[TPM_DIGEST_SIZE]; +-}__attribute__((packed)); ++} __packed; + + struct tpm_pcrread_in { + __be32 pcr_idx; +-}__attribute__((packed)); ++} __packed; + + struct tpm_pcrextend_in { + __be32 pcr_idx; + u8 hash[TPM_DIGEST_SIZE]; +-}__attribute__((packed)); ++} __packed; + + /* 128 bytes is an arbitrary cap. This could be as large as TPM_BUFSIZE - 18 + * bytes, but 128 is still a relatively large number of random bytes and +@@ -288,11 +293,15 @@ struct tpm_pcrextend_in { + struct tpm_getrandom_out { + __be32 rng_data_len; + u8 rng_data[TPM_MAX_RNG_DATA]; +-}__attribute__((packed)); ++} __packed; + + struct tpm_getrandom_in { + __be32 num_bytes; +-}__attribute__((packed)); ++} __packed; ++ ++struct tpm_startup_in { ++ __be16 startup_type; ++} __packed; + + typedef union { + struct tpm_getcap_params_out getcap_out; +@@ -304,12 +313,13 @@ typedef union { + struct tpm_pcrextend_in pcrextend_in; + struct tpm_getrandom_in getrandom_in; + struct tpm_getrandom_out getrandom_out; ++ struct tpm_startup_in startup_in; + } tpm_cmd_params; + + struct tpm_cmd_t { + tpm_cmd_header header; + tpm_cmd_params params; +-}__attribute__((packed)); ++} __packed; + + ssize_t tpm_getcap(struct device *, __be32, cap_t *, const char *); + +@@ -321,6 +331,7 @@ extern struct tpm_chip* tpm_register_hardware(struct device *, + const struct tpm_vendor_specific *); + extern int tpm_open(struct inode *, struct file *); + extern int tpm_release(struct inode *, struct file *); ++extern void tpm_dev_release(struct device *dev); + extern void tpm_dev_vendor_release(struct tpm_chip *); + extern ssize_t tpm_write(struct file *, const char __user *, size_t, + loff_t *); +@@ -329,7 +340,7 @@ extern void tpm_remove_hardware(struct device *); + extern int tpm_pm_suspend(struct device *); + extern int tpm_pm_resume(struct device *); + extern int wait_for_tpm_stat(struct tpm_chip *, u8, unsigned long, +- wait_queue_head_t *); ++ wait_queue_head_t *, bool); + + #ifdef CONFIG_ACPI + extern int tpm_add_ppi(struct kobject *); +diff --git a/drivers/char/tpm/tpm_acpi.c b/drivers/char/tpm/tpm_acpi.c +index 56051d0..64420b3 100644 +--- a/drivers/char/tpm/tpm_acpi.c ++++ b/drivers/char/tpm/tpm_acpi.c +@@ -33,13 +33,13 @@ struct acpi_tcpa { + u16 platform_class; + union { + struct client_hdr { +- u32 log_max_len __attribute__ ((packed)); +- u64 log_start_addr __attribute__ ((packed)); ++ u32 log_max_len __packed; ++ u64 log_start_addr __packed; + } client; + struct server_hdr { + u16 reserved; +- u64 log_max_len __attribute__ ((packed)); +- u64 log_start_addr __attribute__ ((packed)); ++ u64 log_max_len __packed; ++ u64 log_start_addr __packed; + } server; + }; + }; +diff --git a/drivers/char/tpm/tpm_atmel.c b/drivers/char/tpm/tpm_atmel.c +index 678d570..c9a528d 100644 +--- a/drivers/char/tpm/tpm_atmel.c ++++ b/drivers/char/tpm/tpm_atmel.c +@@ -116,6 +116,11 @@ static u8 tpm_atml_status(struct tpm_chip *chip) + return ioread8(chip->vendor.iobase + 1); + } + ++static bool tpm_atml_req_canceled(struct tpm_chip *chip, u8 status) ++{ ++ return (status == ATML_STATUS_READY); ++} ++ + static const struct file_operations atmel_ops = { + .owner = THIS_MODULE, + .llseek = no_llseek, +@@ -147,7 +152,7 @@ static const struct tpm_vendor_specific tpm_atmel = { + .status = tpm_atml_status, + .req_complete_mask = ATML_STATUS_BUSY | ATML_STATUS_DATA_AVAIL, + .req_complete_val = ATML_STATUS_DATA_AVAIL, +- .req_canceled = ATML_STATUS_READY, ++ .req_canceled = tpm_atml_req_canceled, + .attr_group = &atmel_attr_grp, + .miscdev = { .fops = &atmel_ops, }, + }; +@@ -197,7 +202,7 @@ static int __init init_atmel(void) + + have_region = + (atmel_request_region +- (tpm_atmel.base, region_size, "tpm_atmel0") == NULL) ? 0 : 1; ++ (base, region_size, "tpm_atmel0") == NULL) ? 0 : 1; + + pdev = platform_device_register_simple("tpm_atmel", -1, NULL, 0); + if (IS_ERR(pdev)) { +diff --git a/drivers/char/tpm/tpm_eventlog.c b/drivers/char/tpm/tpm_eventlog.c +index 84ddc55..59f7cb2 100644 +--- a/drivers/char/tpm/tpm_eventlog.c ++++ b/drivers/char/tpm/tpm_eventlog.c +@@ -406,7 +406,6 @@ out_tpm: + out: + return NULL; + } +-EXPORT_SYMBOL_GPL(tpm_bios_log_setup); + + void tpm_bios_log_teardown(struct dentry **lst) + { +@@ -415,5 +414,3 @@ void tpm_bios_log_teardown(struct dentry **lst) + for (i = 0; i < 3; i++) + securityfs_remove(lst[i]); + } +-EXPORT_SYMBOL_GPL(tpm_bios_log_teardown); +-MODULE_LICENSE("GPL"); +diff --git a/drivers/char/tpm/tpm_i2c_atmel.c b/drivers/char/tpm/tpm_i2c_atmel.c +new file mode 100644 +index 0000000..c3cd7fe +--- /dev/null ++++ b/drivers/char/tpm/tpm_i2c_atmel.c +@@ -0,0 +1,284 @@ ++/* ++ * ATMEL I2C TPM AT97SC3204T ++ * ++ * Copyright (C) 2012 V Lab Technologies ++ * Teddy Reed ++ * Copyright (C) 2013, Obsidian Research Corp. ++ * Jason Gunthorpe ++ * Device driver for ATMEL I2C TPMs. ++ * ++ * Teddy Reed determined the basic I2C command flow, unlike other I2C TPM ++ * devices the raw TCG formatted TPM command data is written via I2C and then ++ * raw TCG formatted TPM command data is returned via I2C. ++ * ++ * TGC status/locality/etc functions seen in the LPC implementation do not ++ * seem to be present. ++ * ++ * 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. ++ * ++ * 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 http://www.gnu.org/licenses/>. ++ */ ++#include ++#include ++#include ++#include ++#include ++#include "tpm.h" ++ ++#define I2C_DRIVER_NAME "tpm_i2c_atmel" ++ ++#define TPM_I2C_SHORT_TIMEOUT 750 /* ms */ ++#define TPM_I2C_LONG_TIMEOUT 2000 /* 2 sec */ ++ ++#define ATMEL_STS_OK 1 ++ ++struct priv_data { ++ size_t len; ++ /* This is the amount we read on the first try. 25 was chosen to fit a ++ * fair number of read responses in the buffer so a 2nd retry can be ++ * avoided in small message cases. */ ++ u8 buffer[sizeof(struct tpm_output_header) + 25]; ++}; ++ ++static int i2c_atmel_send(struct tpm_chip *chip, u8 *buf, size_t len) ++{ ++ struct priv_data *priv = chip->vendor.priv; ++ struct i2c_client *client = to_i2c_client(chip->dev); ++ s32 status; ++ ++ priv->len = 0; ++ ++ if (len <= 2) ++ return -EIO; ++ ++ status = i2c_master_send(client, buf, len); ++ ++ dev_dbg(chip->dev, ++ "%s(buf=%*ph len=%0zx) -> sts=%d\n", __func__, ++ (int)min_t(size_t, 64, len), buf, len, status); ++ return status; ++} ++ ++static int i2c_atmel_recv(struct tpm_chip *chip, u8 *buf, size_t count) ++{ ++ struct priv_data *priv = chip->vendor.priv; ++ struct i2c_client *client = to_i2c_client(chip->dev); ++ struct tpm_output_header *hdr = ++ (struct tpm_output_header *)priv->buffer; ++ u32 expected_len; ++ int rc; ++ ++ if (priv->len == 0) ++ return -EIO; ++ ++ /* Get the message size from the message header, if we didn't get the ++ * whole message in read_status then we need to re-read the ++ * message. */ ++ expected_len = be32_to_cpu(hdr->length); ++ if (expected_len > count) ++ return -ENOMEM; ++ ++ if (priv->len >= expected_len) { ++ dev_dbg(chip->dev, ++ "%s early(buf=%*ph count=%0zx) -> ret=%d\n", __func__, ++ (int)min_t(size_t, 64, expected_len), buf, count, ++ expected_len); ++ memcpy(buf, priv->buffer, expected_len); ++ return expected_len; ++ } ++ ++ rc = i2c_master_recv(client, buf, expected_len); ++ dev_dbg(chip->dev, ++ "%s reread(buf=%*ph count=%0zx) -> ret=%d\n", __func__, ++ (int)min_t(size_t, 64, expected_len), buf, count, ++ expected_len); ++ return rc; ++} ++ ++static void i2c_atmel_cancel(struct tpm_chip *chip) ++{ ++ dev_err(chip->dev, "TPM operation cancellation was requested, but is not supported"); ++} ++ ++static u8 i2c_atmel_read_status(struct tpm_chip *chip) ++{ ++ struct priv_data *priv = chip->vendor.priv; ++ struct i2c_client *client = to_i2c_client(chip->dev); ++ int rc; ++ ++ /* The TPM fails the I2C read until it is ready, so we do the entire ++ * transfer here and buffer it locally. This way the common code can ++ * properly handle the timeouts. */ ++ priv->len = 0; ++ memset(priv->buffer, 0, sizeof(priv->buffer)); ++ ++ ++ /* Once the TPM has completed the command the command remains readable ++ * until another command is issued. */ ++ rc = i2c_master_recv(client, priv->buffer, sizeof(priv->buffer)); ++ dev_dbg(chip->dev, ++ "%s: sts=%d", __func__, rc); ++ if (rc <= 0) ++ return 0; ++ ++ priv->len = rc; ++ ++ return ATMEL_STS_OK; ++} ++ ++static const struct file_operations i2c_atmel_ops = { ++ .owner = THIS_MODULE, ++ .llseek = no_llseek, ++ .open = tpm_open, ++ .read = tpm_read, ++ .write = tpm_write, ++ .release = tpm_release, ++}; ++ ++static DEVICE_ATTR(pubek, S_IRUGO, tpm_show_pubek, NULL); ++static DEVICE_ATTR(pcrs, S_IRUGO, tpm_show_pcrs, NULL); ++static DEVICE_ATTR(enabled, S_IRUGO, tpm_show_enabled, NULL); ++static DEVICE_ATTR(active, S_IRUGO, tpm_show_active, NULL); ++static DEVICE_ATTR(owned, S_IRUGO, tpm_show_owned, NULL); ++static DEVICE_ATTR(temp_deactivated, S_IRUGO, tpm_show_temp_deactivated, NULL); ++static DEVICE_ATTR(caps, S_IRUGO, tpm_show_caps, NULL); ++static DEVICE_ATTR(cancel, S_IWUSR | S_IWGRP, NULL, tpm_store_cancel); ++static DEVICE_ATTR(durations, S_IRUGO, tpm_show_durations, NULL); ++static DEVICE_ATTR(timeouts, S_IRUGO, tpm_show_timeouts, NULL); ++ ++static struct attribute *i2c_atmel_attrs[] = { ++ &dev_attr_pubek.attr, ++ &dev_attr_pcrs.attr, ++ &dev_attr_enabled.attr, ++ &dev_attr_active.attr, ++ &dev_attr_owned.attr, ++ &dev_attr_temp_deactivated.attr, ++ &dev_attr_caps.attr, ++ &dev_attr_cancel.attr, ++ &dev_attr_durations.attr, ++ &dev_attr_timeouts.attr, ++ NULL, ++}; ++ ++static struct attribute_group i2c_atmel_attr_grp = { ++ .attrs = i2c_atmel_attrs ++}; ++ ++static bool i2c_atmel_req_canceled(struct tpm_chip *chip, u8 status) ++{ ++ return 0; ++} ++ ++static const struct tpm_vendor_specific i2c_atmel = { ++ .status = i2c_atmel_read_status, ++ .recv = i2c_atmel_recv, ++ .send = i2c_atmel_send, ++ .cancel = i2c_atmel_cancel, ++ .req_complete_mask = ATMEL_STS_OK, ++ .req_complete_val = ATMEL_STS_OK, ++ .req_canceled = i2c_atmel_req_canceled, ++ .attr_group = &i2c_atmel_attr_grp, ++ .miscdev.fops = &i2c_atmel_ops, ++}; ++ ++static int i2c_atmel_probe(struct i2c_client *client, ++ const struct i2c_device_id *id) ++{ ++ int rc; ++ struct tpm_chip *chip; ++ struct device *dev = &client->dev; ++ ++ if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) ++ return -ENODEV; ++ ++ chip = tpm_register_hardware(dev, &i2c_atmel); ++ if (!chip) { ++ dev_err(dev, "%s() error in tpm_register_hardware\n", __func__); ++ return -ENODEV; ++ } ++ ++ chip->vendor.priv = devm_kzalloc(dev, sizeof(struct priv_data), ++ GFP_KERNEL); ++ ++ /* Default timeouts */ ++ chip->vendor.timeout_a = msecs_to_jiffies(TPM_I2C_SHORT_TIMEOUT); ++ chip->vendor.timeout_b = msecs_to_jiffies(TPM_I2C_LONG_TIMEOUT); ++ chip->vendor.timeout_c = msecs_to_jiffies(TPM_I2C_SHORT_TIMEOUT); ++ chip->vendor.timeout_d = msecs_to_jiffies(TPM_I2C_SHORT_TIMEOUT); ++ chip->vendor.irq = 0; ++ ++ /* There is no known way to probe for this device, and all version ++ * information seems to be read via TPM commands. Thus we rely on the ++ * TPM startup process in the common code to detect the device. */ ++ if (tpm_get_timeouts(chip)) { ++ rc = -ENODEV; ++ goto out_err; ++ } ++ ++ if (tpm_do_selftest(chip)) { ++ rc = -ENODEV; ++ goto out_err; ++ } ++ ++ return 0; ++ ++out_err: ++ tpm_dev_vendor_release(chip); ++ tpm_remove_hardware(chip->dev); ++ return rc; ++} ++ ++static int i2c_atmel_remove(struct i2c_client *client) ++{ ++ struct device *dev = &(client->dev); ++ struct tpm_chip *chip = dev_get_drvdata(dev); ++ ++ if (chip) ++ tpm_dev_vendor_release(chip); ++ tpm_remove_hardware(dev); ++ kfree(chip); ++ return 0; ++} ++ ++static const struct i2c_device_id i2c_atmel_id[] = { ++ {I2C_DRIVER_NAME, 0}, ++ {} ++}; ++MODULE_DEVICE_TABLE(i2c, i2c_atmel_id); ++ ++#ifdef CONFIG_OF ++static const struct of_device_id i2c_atmel_of_match[] = { ++ {.compatible = "atmel,at97sc3204t"}, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, i2c_atmel_of_match); ++#endif ++ ++static SIMPLE_DEV_PM_OPS(i2c_atmel_pm_ops, tpm_pm_suspend, tpm_pm_resume); ++ ++static struct i2c_driver i2c_atmel_driver = { ++ .id_table = i2c_atmel_id, ++ .probe = i2c_atmel_probe, ++ .remove = i2c_atmel_remove, ++ .driver = { ++ .name = I2C_DRIVER_NAME, ++ .owner = THIS_MODULE, ++ .pm = &i2c_atmel_pm_ops, ++ .of_match_table = of_match_ptr(i2c_atmel_of_match), ++ }, ++}; ++ ++module_i2c_driver(i2c_atmel_driver); ++ ++MODULE_AUTHOR("Jason Gunthorpe "); ++MODULE_DESCRIPTION("Atmel TPM I2C Driver"); ++MODULE_LICENSE("GPL"); +diff --git a/drivers/char/tpm/tpm_i2c_infineon.c b/drivers/char/tpm/tpm_i2c_infineon.c +index fb447bd..fefd2aa 100644 +--- a/drivers/char/tpm/tpm_i2c_infineon.c ++++ b/drivers/char/tpm/tpm_i2c_infineon.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (C) 2012 Infineon Technologies ++ * Copyright (C) 2012,2013 Infineon Technologies + * + * Authors: + * Peter Huewe +@@ -24,7 +24,6 @@ + #include + #include + #include +-#include + #include + #include "tpm.h" + +@@ -56,17 +55,24 @@ + #define TPM_TIMEOUT_US_HI (TPM_TIMEOUT_US_LOW + 2000) + + /* expected value for DIDVID register */ +-#define TPM_TIS_I2C_DID_VID 0x000b15d1L ++#define TPM_TIS_I2C_DID_VID_9635 0xd1150b00L ++#define TPM_TIS_I2C_DID_VID_9645 0x001a15d1L ++ ++enum i2c_chip_type { ++ SLB9635, ++ SLB9645, ++ UNKNOWN, ++}; + + /* Structure to store I2C TPM specific stuff */ + struct tpm_inf_dev { + struct i2c_client *client; + u8 buf[TPM_BUFSIZE + sizeof(u8)]; /* max. buffer size + addr */ + struct tpm_chip *chip; ++ enum i2c_chip_type chip_type; + }; + + static struct tpm_inf_dev tpm_dev; +-static struct i2c_driver tpm_tis_i2c_driver; + + /* + * iic_tpm_read() - read from TPM register +@@ -90,10 +96,20 @@ static struct i2c_driver tpm_tis_i2c_driver; + static int iic_tpm_read(u8 addr, u8 *buffer, size_t len) + { + +- struct i2c_msg msg1 = { tpm_dev.client->addr, 0, 1, &addr }; +- struct i2c_msg msg2 = { tpm_dev.client->addr, I2C_M_RD, len, buffer }; ++ struct i2c_msg msg1 = { ++ .addr = tpm_dev.client->addr, ++ .len = 1, ++ .buf = &addr ++ }; ++ struct i2c_msg msg2 = { ++ .addr = tpm_dev.client->addr, ++ .flags = I2C_M_RD, ++ .len = len, ++ .buf = buffer ++ }; ++ struct i2c_msg msgs[] = {msg1, msg2}; + +- int rc; ++ int rc = 0; + int count; + + /* Lock the adapter for the duration of the whole sequence. */ +@@ -101,30 +117,53 @@ static int iic_tpm_read(u8 addr, u8 *buffer, size_t len) + return -EOPNOTSUPP; + i2c_lock_adapter(tpm_dev.client->adapter); + +- for (count = 0; count < MAX_COUNT; count++) { +- rc = __i2c_transfer(tpm_dev.client->adapter, &msg1, 1); +- if (rc > 0) +- break; /* break here to skip sleep */ +- +- usleep_range(SLEEP_DURATION_LOW, SLEEP_DURATION_HI); +- } +- +- if (rc <= 0) +- goto out; +- +- /* After the TPM has successfully received the register address it needs +- * some time, thus we're sleeping here again, before retrieving the data +- */ +- for (count = 0; count < MAX_COUNT; count++) { +- usleep_range(SLEEP_DURATION_LOW, SLEEP_DURATION_HI); +- rc = __i2c_transfer(tpm_dev.client->adapter, &msg2, 1); +- if (rc > 0) +- break; ++ if (tpm_dev.chip_type == SLB9645) { ++ /* use a combined read for newer chips ++ * unfortunately the smbus functions are not suitable due to ++ * the 32 byte limit of the smbus. ++ * retries should usually not be needed, but are kept just to ++ * be on the safe side. ++ */ ++ for (count = 0; count < MAX_COUNT; count++) { ++ rc = __i2c_transfer(tpm_dev.client->adapter, msgs, 2); ++ if (rc > 0) ++ break; /* break here to skip sleep */ ++ usleep_range(SLEEP_DURATION_LOW, SLEEP_DURATION_HI); ++ } ++ } else { ++ /* slb9635 protocol should work in all cases */ ++ for (count = 0; count < MAX_COUNT; count++) { ++ rc = __i2c_transfer(tpm_dev.client->adapter, &msg1, 1); ++ if (rc > 0) ++ break; /* break here to skip sleep */ ++ ++ usleep_range(SLEEP_DURATION_LOW, SLEEP_DURATION_HI); ++ } + ++ if (rc <= 0) ++ goto out; ++ ++ /* After the TPM has successfully received the register address ++ * it needs some time, thus we're sleeping here again, before ++ * retrieving the data ++ */ ++ for (count = 0; count < MAX_COUNT; count++) { ++ usleep_range(SLEEP_DURATION_LOW, SLEEP_DURATION_HI); ++ rc = __i2c_transfer(tpm_dev.client->adapter, &msg2, 1); ++ if (rc > 0) ++ break; ++ } + } + + out: + i2c_unlock_adapter(tpm_dev.client->adapter); ++ /* take care of 'guard time' */ ++ usleep_range(SLEEP_DURATION_LOW, SLEEP_DURATION_HI); ++ ++ /* __i2c_transfer returns the number of successfully transferred ++ * messages. ++ * So rc should be greater than 0 here otherwise we have an error. ++ */ + if (rc <= 0) + return -EIO; + +@@ -138,7 +177,11 @@ static int iic_tpm_write_generic(u8 addr, u8 *buffer, size_t len, + int rc = -EIO; + int count; + +- struct i2c_msg msg1 = { tpm_dev.client->addr, 0, len + 1, tpm_dev.buf }; ++ struct i2c_msg msg1 = { ++ .addr = tpm_dev.client->addr, ++ .len = len + 1, ++ .buf = tpm_dev.buf ++ }; + + if (len > TPM_BUFSIZE) + return -EINVAL; +@@ -154,16 +197,24 @@ static int iic_tpm_write_generic(u8 addr, u8 *buffer, size_t len, + /* + * NOTE: We have to use these special mechanisms here and unfortunately + * cannot rely on the standard behavior of i2c_transfer. ++ * Even for newer chips the smbus functions are not ++ * suitable due to the 32 byte limit of the smbus. + */ + for (count = 0; count < max_count; count++) { + rc = __i2c_transfer(tpm_dev.client->adapter, &msg1, 1); + if (rc > 0) + break; +- + usleep_range(sleep_low, sleep_hi); + } + + i2c_unlock_adapter(tpm_dev.client->adapter); ++ /* take care of 'guard time' */ ++ usleep_range(SLEEP_DURATION_LOW, SLEEP_DURATION_HI); ++ ++ /* __i2c_transfer returns the number of successfully transferred ++ * messages. ++ * So rc should be greater than 0 here otherwise we have an error. ++ */ + if (rc <= 0) + return -EIO; + +@@ -283,11 +334,18 @@ static int request_locality(struct tpm_chip *chip, int loc) + static u8 tpm_tis_i2c_status(struct tpm_chip *chip) + { + /* NOTE: since I2C read may fail, return 0 in this case --> time-out */ +- u8 buf; +- if (iic_tpm_read(TPM_STS(chip->vendor.locality), &buf, 1) < 0) +- return 0; +- else +- return buf; ++ u8 buf = 0xFF; ++ u8 i = 0; ++ ++ do { ++ if (iic_tpm_read(TPM_STS(chip->vendor.locality), &buf, 1) < 0) ++ return 0; ++ ++ i++; ++ /* if locallity is set STS should not be 0xFF */ ++ } while ((buf == 0xFF) && i < 10); ++ ++ return buf; + } + + static void tpm_tis_i2c_ready(struct tpm_chip *chip) +@@ -328,7 +386,7 @@ static int wait_for_stat(struct tpm_chip *chip, u8 mask, unsigned long timeout, + + /* check current status */ + *status = tpm_tis_i2c_status(chip); +- if ((*status & mask) == mask) ++ if ((*status != 0xFF) && (*status & mask) == mask) + return 0; + + stop = jiffies + timeout; +@@ -372,7 +430,6 @@ static int recv_data(struct tpm_chip *chip, u8 *buf, size_t count) + /* avoid endless loop in case of broken HW */ + if (retries > MAX_COUNT_LONG) + return -EIO; +- + } + return size; + } +@@ -480,7 +537,6 @@ static int tpm_tis_i2c_send(struct tpm_chip *chip, u8 *buf, size_t len) + rc = -EIO; + goto out_err; + } +- + } + + /* write last byte */ +@@ -505,6 +561,11 @@ out_err: + return rc; + } + ++static bool tpm_tis_i2c_req_canceled(struct tpm_chip *chip, u8 status) ++{ ++ return (status == TPM_STS_COMMAND_READY); ++} ++ + static const struct file_operations tis_ops = { + .owner = THIS_MODULE, + .llseek = no_llseek, +@@ -520,7 +581,7 @@ static DEVICE_ATTR(enabled, S_IRUGO, tpm_show_enabled, NULL); + static DEVICE_ATTR(active, S_IRUGO, tpm_show_active, NULL); + static DEVICE_ATTR(owned, S_IRUGO, tpm_show_owned, NULL); + static DEVICE_ATTR(temp_deactivated, S_IRUGO, tpm_show_temp_deactivated, NULL); +-static DEVICE_ATTR(caps, S_IRUGO, tpm_show_caps_1_2, NULL); ++static DEVICE_ATTR(caps, S_IRUGO, tpm_show_caps, NULL); + static DEVICE_ATTR(cancel, S_IWUSR | S_IWGRP, NULL, tpm_store_cancel); + static DEVICE_ATTR(durations, S_IRUGO, tpm_show_durations, NULL); + static DEVICE_ATTR(timeouts, S_IRUGO, tpm_show_timeouts, NULL); +@@ -550,7 +611,7 @@ static struct tpm_vendor_specific tpm_tis_i2c = { + .cancel = tpm_tis_i2c_ready, + .req_complete_mask = TPM_STS_DATA_AVAIL | TPM_STS_VALID, + .req_complete_val = TPM_STS_DATA_AVAIL | TPM_STS_VALID, +- .req_canceled = TPM_STS_COMMAND_READY, ++ .req_canceled = tpm_tis_i2c_req_canceled, + .attr_group = &tis_attr_grp, + .miscdev.fops = &tis_ops, + }; +@@ -563,6 +624,7 @@ static int tpm_tis_i2c_init(struct device *dev) + + chip = tpm_register_hardware(dev, &tpm_tis_i2c); + if (!chip) { ++ dev_err(dev, "could not register hardware\n"); + rc = -ENODEV; + goto out_err; + } +@@ -577,20 +639,24 @@ static int tpm_tis_i2c_init(struct device *dev) + chip->vendor.timeout_d = msecs_to_jiffies(TIS_SHORT_TIMEOUT); + + if (request_locality(chip, 0) != 0) { ++ dev_err(dev, "could not request locality\n"); + rc = -ENODEV; + goto out_vendor; + } + + /* read four bytes from DID_VID register */ + if (iic_tpm_read(TPM_DID_VID(0), (u8 *)&vendor, 4) < 0) { ++ dev_err(dev, "could not read vendor id\n"); + rc = -EIO; + goto out_release; + } + +- /* create DID_VID register value, after swapping to little-endian */ +- vendor = be32_to_cpu((__be32) vendor); +- +- if (vendor != TPM_TIS_I2C_DID_VID) { ++ if (vendor == TPM_TIS_I2C_DID_VID_9645) { ++ tpm_dev.chip_type = SLB9645; ++ } else if (vendor == TPM_TIS_I2C_DID_VID_9635) { ++ tpm_dev.chip_type = SLB9635; ++ } else { ++ dev_err(dev, "vendor id did not match! ID was %08x\n", vendor); + rc = -ENODEV; + goto out_release; + } +@@ -619,37 +685,65 @@ out_vendor: + chip->dev->release = NULL; + chip->release = NULL; + tpm_dev.client = NULL; +- dev_set_drvdata(chip->dev, chip); + out_err: + return rc; + } + + static const struct i2c_device_id tpm_tis_i2c_table[] = { + {"tpm_i2c_infineon", 0}, ++ {"slb9635tt", 0}, ++ {"slb9645tt", 1}, + {}, + }; + + MODULE_DEVICE_TABLE(i2c, tpm_tis_i2c_table); ++ ++#ifdef CONFIG_OF ++static const struct of_device_id tpm_tis_i2c_of_match[] = { ++ { ++ .name = "tpm_i2c_infineon", ++ .type = "tpm", ++ .compatible = "infineon,tpm_i2c_infineon", ++ .data = (void *)0 ++ }, ++ { ++ .name = "slb9635tt", ++ .type = "tpm", ++ .compatible = "infineon,slb9635tt", ++ .data = (void *)0 ++ }, ++ { ++ .name = "slb9645tt", ++ .type = "tpm", ++ .compatible = "infineon,slb9645tt", ++ .data = (void *)1 ++ }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, tpm_tis_i2c_of_match); ++#endif ++ + static SIMPLE_DEV_PM_OPS(tpm_tis_i2c_ops, tpm_pm_suspend, tpm_pm_resume); + + static int tpm_tis_i2c_probe(struct i2c_client *client, + const struct i2c_device_id *id) + { + int rc; +- if (tpm_dev.client != NULL) ++ struct device *dev = &(client->dev); ++ ++ if (tpm_dev.client != NULL) { ++ dev_err(dev, "This driver only supports one client at a time\n"); + return -EBUSY; /* We only support one client */ ++ } + + if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { +- dev_err(&client->dev, +- "no algorithms associated to the i2c bus\n"); ++ dev_err(dev, "no algorithms associated to the i2c bus\n"); + return -ENODEV; + } + +- client->driver = &tpm_tis_i2c_driver; + tpm_dev.client = client; + rc = tpm_tis_i2c_init(&client->dev); + if (rc != 0) { +- client->driver = NULL; + tpm_dev.client = NULL; + rc = -ENODEV; + } +@@ -671,13 +765,11 @@ static int tpm_tis_i2c_remove(struct i2c_client *client) + chip->dev->release = NULL; + chip->release = NULL; + tpm_dev.client = NULL; +- dev_set_drvdata(chip->dev, chip); + + return 0; + } + + static struct i2c_driver tpm_tis_i2c_driver = { +- + .id_table = tpm_tis_i2c_table, + .probe = tpm_tis_i2c_probe, + .remove = tpm_tis_i2c_remove, +@@ -685,11 +777,12 @@ static struct i2c_driver tpm_tis_i2c_driver = { + .name = "tpm_i2c_infineon", + .owner = THIS_MODULE, + .pm = &tpm_tis_i2c_ops, ++ .of_match_table = of_match_ptr(tpm_tis_i2c_of_match), + }, + }; + + module_i2c_driver(tpm_tis_i2c_driver); + MODULE_AUTHOR("Peter Huewe "); + MODULE_DESCRIPTION("TPM TIS I2C Infineon Driver"); +-MODULE_VERSION("2.1.5"); ++MODULE_VERSION("2.2.0"); + MODULE_LICENSE("GPL"); +diff --git a/drivers/char/tpm/tpm_ibmvtpm.c b/drivers/char/tpm/tpm_ibmvtpm.c +index 9978609..2783a42 100644 +--- a/drivers/char/tpm/tpm_ibmvtpm.c ++++ b/drivers/char/tpm/tpm_ibmvtpm.c +@@ -64,7 +64,7 @@ static struct ibmvtpm_dev *ibmvtpm_get_data(const struct device *dev) + { + struct tpm_chip *chip = dev_get_drvdata(dev); + if (chip) +- return (struct ibmvtpm_dev *)chip->vendor.data; ++ return (struct ibmvtpm_dev *)TPM_VPRIV(chip); + return NULL; + } + +@@ -83,7 +83,7 @@ static int tpm_ibmvtpm_recv(struct tpm_chip *chip, u8 *buf, size_t count) + u16 len; + int sig; + +- ibmvtpm = (struct ibmvtpm_dev *)chip->vendor.data; ++ ibmvtpm = (struct ibmvtpm_dev *)TPM_VPRIV(chip); + + if (!ibmvtpm->rtce_buf) { + dev_err(ibmvtpm->dev, "ibmvtpm device is not ready\n"); +@@ -98,7 +98,7 @@ static int tpm_ibmvtpm_recv(struct tpm_chip *chip, u8 *buf, size_t count) + + if (count < len) { + dev_err(ibmvtpm->dev, +- "Invalid size in recv: count=%ld, crq_size=%d\n", ++ "Invalid size in recv: count=%zd, crq_size=%d\n", + count, len); + return -EIO; + } +@@ -127,7 +127,7 @@ static int tpm_ibmvtpm_send(struct tpm_chip *chip, u8 *buf, size_t count) + u64 *word = (u64 *) &crq; + int rc; + +- ibmvtpm = (struct ibmvtpm_dev *)chip->vendor.data; ++ ibmvtpm = (struct ibmvtpm_dev *)TPM_VPRIV(chip); + + if (!ibmvtpm->rtce_buf) { + dev_err(ibmvtpm->dev, "ibmvtpm device is not ready\n"); +@@ -136,7 +136,7 @@ static int tpm_ibmvtpm_send(struct tpm_chip *chip, u8 *buf, size_t count) + + if (count > ibmvtpm->rtce_size) { + dev_err(ibmvtpm->dev, +- "Invalid size in send: count=%ld, rtce_size=%d\n", ++ "Invalid size in send: count=%zd, rtce_size=%d\n", + count, ibmvtpm->rtce_size); + return -EIO; + } +@@ -398,6 +398,11 @@ static int tpm_ibmvtpm_resume(struct device *dev) + return rc; + } + ++static bool tpm_ibmvtpm_req_canceled(struct tpm_chip *chip, u8 status) ++{ ++ return (status == 0); ++} ++ + static const struct file_operations ibmvtpm_ops = { + .owner = THIS_MODULE, + .llseek = no_llseek, +@@ -414,7 +419,7 @@ static DEVICE_ATTR(active, S_IRUGO, tpm_show_active, NULL); + static DEVICE_ATTR(owned, S_IRUGO, tpm_show_owned, NULL); + static DEVICE_ATTR(temp_deactivated, S_IRUGO, tpm_show_temp_deactivated, + NULL); +-static DEVICE_ATTR(caps, S_IRUGO, tpm_show_caps_1_2, NULL); ++static DEVICE_ATTR(caps, S_IRUGO, tpm_show_caps, NULL); + static DEVICE_ATTR(cancel, S_IWUSR | S_IWGRP, NULL, tpm_store_cancel); + static DEVICE_ATTR(durations, S_IRUGO, tpm_show_durations, NULL); + static DEVICE_ATTR(timeouts, S_IRUGO, tpm_show_timeouts, NULL); +@@ -441,7 +446,7 @@ static const struct tpm_vendor_specific tpm_ibmvtpm = { + .status = tpm_ibmvtpm_status, + .req_complete_mask = 0, + .req_complete_val = 0, +- .req_canceled = 0, ++ .req_canceled = tpm_ibmvtpm_req_canceled, + .attr_group = &ibmvtpm_attr_grp, + .miscdev = { .fops = &ibmvtpm_ops, }, + }; +@@ -647,7 +652,7 @@ static int tpm_ibmvtpm_probe(struct vio_dev *vio_dev, + + ibmvtpm->dev = dev; + ibmvtpm->vdev = vio_dev; +- chip->vendor.data = (void *)ibmvtpm; ++ TPM_VPRIV(chip) = (void *)ibmvtpm; + + spin_lock_init(&ibmvtpm->rtce_lock); + +diff --git a/drivers/char/tpm/tpm_nsc.c b/drivers/char/tpm/tpm_nsc.c +index 640c9a4..770c46f 100644 +--- a/drivers/char/tpm/tpm_nsc.c ++++ b/drivers/char/tpm/tpm_nsc.c +@@ -227,6 +227,11 @@ static u8 tpm_nsc_status(struct tpm_chip *chip) + return inb(chip->vendor.base + NSC_STATUS); + } + ++static bool tpm_nsc_req_canceled(struct tpm_chip *chip, u8 status) ++{ ++ return (status == NSC_STATUS_RDY); ++} ++ + static const struct file_operations nsc_ops = { + .owner = THIS_MODULE, + .llseek = no_llseek, +@@ -258,7 +263,7 @@ static const struct tpm_vendor_specific tpm_nsc = { + .status = tpm_nsc_status, + .req_complete_mask = NSC_STATUS_OBF, + .req_complete_val = NSC_STATUS_OBF, +- .req_canceled = NSC_STATUS_RDY, ++ .req_canceled = tpm_nsc_req_canceled, + .attr_group = &nsc_attr_grp, + .miscdev = { .fops = &nsc_ops, }, + }; +diff --git a/drivers/char/tpm/tpm_ppi.c b/drivers/char/tpm/tpm_ppi.c +index 720ebcf..2db4419 100644 +--- a/drivers/char/tpm/tpm_ppi.c ++++ b/drivers/char/tpm/tpm_ppi.c +@@ -27,15 +27,18 @@ static char *tpm_device_name = "TPM"; + static acpi_status ppi_callback(acpi_handle handle, u32 level, void *context, + void **return_value) + { +- acpi_status status; ++ acpi_status status = AE_OK; + struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; +- status = acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer); +- if (strstr(buffer.pointer, context) != NULL) { +- *return_value = handle; ++ ++ if (ACPI_SUCCESS(acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer))) { ++ if (strstr(buffer.pointer, context) != NULL) { ++ *return_value = handle; ++ status = AE_CTRL_TERMINATE; ++ } + kfree(buffer.pointer); +- return AE_CTRL_TERMINATE; + } +- return AE_OK; ++ ++ return status; + } + + static inline void ppi_assign_params(union acpi_object params[4], +@@ -158,9 +161,9 @@ static ssize_t tpm_store_ppi_request(struct device *dev, + ACPI_TYPE_STRING); + if (ACPI_FAILURE(status)) + return -ENOMEM; +- strncpy(version, ++ strlcpy(version, + ((union acpi_object *)output.pointer)->string.pointer, +- PPI_VERSION_LEN); ++ PPI_VERSION_LEN + 1); + kfree(output.pointer); + output.length = ACPI_ALLOCATE_BUFFER; + output.pointer = NULL; +@@ -169,7 +172,7 @@ static ssize_t tpm_store_ppi_request(struct device *dev, + * is updated with function index from SUBREQ to SUBREQ2 since PPI + * version 1.1 + */ +- if (strcmp(version, "1.1") == -1) ++ if (strcmp(version, "1.1") < 0) + params[2].integer.value = TPM_PPI_FN_SUBREQ; + else + params[2].integer.value = TPM_PPI_FN_SUBREQ2; +@@ -179,7 +182,7 @@ static ssize_t tpm_store_ppi_request(struct device *dev, + * string/package type. For PPI version 1.0 and 1.1, use buffer type + * for compatibility, and use package type since 1.2 according to spec. + */ +- if (strcmp(version, "1.2") == -1) { ++ if (strcmp(version, "1.2") < 0) { + params[3].type = ACPI_TYPE_BUFFER; + params[3].buffer.length = sizeof(req); + sscanf(buf, "%d", &req); +@@ -237,15 +240,15 @@ static ssize_t tpm_show_ppi_transition_action(struct device *dev, + ACPI_TYPE_STRING); + if (ACPI_FAILURE(status)) + return -ENOMEM; +- strncpy(version, ++ strlcpy(version, + ((union acpi_object *)output.pointer)->string.pointer, +- PPI_VERSION_LEN); ++ PPI_VERSION_LEN + 1); + /* + * PPI spec defines params[3].type as empty package, but some platforms + * (e.g. Capella with PPI 1.0) need integer/string/buffer type, so for + * compatibility, define params[3].type as buffer, if PPI version < 1.2 + */ +- if (strcmp(version, "1.2") == -1) { ++ if (strcmp(version, "1.2") < 0) { + params[3].type = ACPI_TYPE_BUFFER; + params[3].buffer.length = 0; + params[3].buffer.pointer = NULL; +@@ -351,7 +354,7 @@ cleanup: + static ssize_t show_ppi_operations(char *buf, u32 start, u32 end) + { + char *str = buf; +- char version[PPI_VERSION_LEN]; ++ char version[PPI_VERSION_LEN + 1]; + acpi_handle handle; + acpi_status status; + struct acpi_object_list input; +@@ -381,13 +384,13 @@ static ssize_t show_ppi_operations(char *buf, u32 start, u32 end) + if (ACPI_FAILURE(status)) + return -ENOMEM; + +- strncpy(version, ++ strlcpy(version, + ((union acpi_object *)output.pointer)->string.pointer, +- PPI_VERSION_LEN); ++ PPI_VERSION_LEN + 1); + kfree(output.pointer); + output.length = ACPI_ALLOCATE_BUFFER; + output.pointer = NULL; +- if (strcmp(version, "1.2") == -1) ++ if (strcmp(version, "1.2") < 0) + return -EPERM; + + params[2].integer.value = TPM_PPI_FN_GETOPR; +@@ -452,12 +455,8 @@ int tpm_add_ppi(struct kobject *parent) + { + return sysfs_create_group(parent, &ppi_attr_grp); + } +-EXPORT_SYMBOL_GPL(tpm_add_ppi); + + void tpm_remove_ppi(struct kobject *parent) + { + sysfs_remove_group(parent, &ppi_attr_grp); + } +-EXPORT_SYMBOL_GPL(tpm_remove_ppi); +- +-MODULE_LICENSE("GPL"); +diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c +index ea31daf..1b74459 100644 +--- a/drivers/char/tpm/tpm_tis.c ++++ b/drivers/char/tpm/tpm_tis.c +@@ -84,6 +84,9 @@ static int is_itpm(struct pnp_dev *dev) + struct acpi_device *acpi = pnp_acpi_device(dev); + struct acpi_hardware_id *id; + ++ if (!acpi) ++ return 0; ++ + list_for_each_entry(id, &acpi->pnp.ids, list) { + if (!strcmp("INTC0102", id->id)) + return 1; +@@ -98,6 +101,22 @@ static inline int is_itpm(struct pnp_dev *dev) + } + #endif + ++/* Before we attempt to access the TPM we must see that the valid bit is set. ++ * The specification says that this bit is 0 at reset and remains 0 until the ++ * 'TPM has gone through its self test and initialization and has established ++ * correct values in the other bits.' */ ++static int wait_startup(struct tpm_chip *chip, int l) ++{ ++ unsigned long stop = jiffies + chip->vendor.timeout_a; ++ do { ++ if (ioread8(chip->vendor.iobase + TPM_ACCESS(l)) & ++ TPM_ACCESS_VALID) ++ return 0; ++ msleep(TPM_TIMEOUT); ++ } while (time_before(jiffies, stop)); ++ return -1; ++} ++ + static int check_locality(struct tpm_chip *chip, int l) + { + if ((ioread8(chip->vendor.iobase + TPM_ACCESS(l)) & +@@ -198,7 +217,7 @@ static int recv_data(struct tpm_chip *chip, u8 *buf, size_t count) + wait_for_tpm_stat(chip, + TPM_STS_DATA_AVAIL | TPM_STS_VALID, + chip->vendor.timeout_c, +- &chip->vendor.read_queue) ++ &chip->vendor.read_queue, true) + == 0) { + burstcnt = get_burstcount(chip); + for (; burstcnt > 0 && size < count; burstcnt--) +@@ -241,7 +260,7 @@ static int tpm_tis_recv(struct tpm_chip *chip, u8 *buf, size_t count) + } + + wait_for_tpm_stat(chip, TPM_STS_VALID, chip->vendor.timeout_c, +- &chip->vendor.int_queue); ++ &chip->vendor.int_queue, false); + status = tpm_tis_status(chip); + if (status & TPM_STS_DATA_AVAIL) { /* retry? */ + dev_err(chip->dev, "Error left over data\n"); +@@ -277,7 +296,7 @@ static int tpm_tis_send_data(struct tpm_chip *chip, u8 *buf, size_t len) + tpm_tis_ready(chip); + if (wait_for_tpm_stat + (chip, TPM_STS_COMMAND_READY, chip->vendor.timeout_b, +- &chip->vendor.int_queue) < 0) { ++ &chip->vendor.int_queue, false) < 0) { + rc = -ETIME; + goto out_err; + } +@@ -292,7 +311,7 @@ static int tpm_tis_send_data(struct tpm_chip *chip, u8 *buf, size_t len) + } + + wait_for_tpm_stat(chip, TPM_STS_VALID, chip->vendor.timeout_c, +- &chip->vendor.int_queue); ++ &chip->vendor.int_queue, false); + status = tpm_tis_status(chip); + if (!itpm && (status & TPM_STS_DATA_EXPECT) == 0) { + rc = -EIO; +@@ -304,7 +323,7 @@ static int tpm_tis_send_data(struct tpm_chip *chip, u8 *buf, size_t len) + iowrite8(buf[count], + chip->vendor.iobase + TPM_DATA_FIFO(chip->vendor.locality)); + wait_for_tpm_stat(chip, TPM_STS_VALID, chip->vendor.timeout_c, +- &chip->vendor.int_queue); ++ &chip->vendor.int_queue, false); + status = tpm_tis_status(chip); + if ((status & TPM_STS_DATA_EXPECT) != 0) { + rc = -EIO; +@@ -342,7 +361,7 @@ static int tpm_tis_send(struct tpm_chip *chip, u8 *buf, size_t len) + if (wait_for_tpm_stat + (chip, TPM_STS_DATA_AVAIL | TPM_STS_VALID, + tpm_calc_ordinal_duration(chip, ordinal), +- &chip->vendor.read_queue) < 0) { ++ &chip->vendor.read_queue, false) < 0) { + rc = -ETIME; + goto out_err; + } +@@ -374,7 +393,7 @@ static int probe_itpm(struct tpm_chip *chip) + if (vendor != TPM_VID_INTEL) + return 0; + +- itpm = 0; ++ itpm = false; + + rc = tpm_tis_send_data(chip, cmd_getticks, len); + if (rc == 0) +@@ -383,7 +402,7 @@ static int probe_itpm(struct tpm_chip *chip) + tpm_tis_ready(chip); + release_locality(chip, chip->vendor.locality, 0); + +- itpm = 1; ++ itpm = true; + + rc = tpm_tis_send_data(chip, cmd_getticks, len); + if (rc == 0) { +@@ -400,6 +419,19 @@ out: + return rc; + } + ++static bool tpm_tis_req_canceled(struct tpm_chip *chip, u8 status) ++{ ++ switch (chip->vendor.manufacturer_id) { ++ case TPM_VID_WINBOND: ++ return ((status == TPM_STS_VALID) || ++ (status == (TPM_STS_VALID | TPM_STS_COMMAND_READY))); ++ case TPM_VID_STM: ++ return (status == (TPM_STS_VALID | TPM_STS_COMMAND_READY)); ++ default: ++ return (status == TPM_STS_COMMAND_READY); ++ } ++} ++ + static const struct file_operations tis_ops = { + .owner = THIS_MODULE, + .llseek = no_llseek, +@@ -416,7 +448,7 @@ static DEVICE_ATTR(active, S_IRUGO, tpm_show_active, NULL); + static DEVICE_ATTR(owned, S_IRUGO, tpm_show_owned, NULL); + static DEVICE_ATTR(temp_deactivated, S_IRUGO, tpm_show_temp_deactivated, + NULL); +-static DEVICE_ATTR(caps, S_IRUGO, tpm_show_caps_1_2, NULL); ++static DEVICE_ATTR(caps, S_IRUGO, tpm_show_caps, NULL); + static DEVICE_ATTR(cancel, S_IWUSR | S_IWGRP, NULL, tpm_store_cancel); + static DEVICE_ATTR(durations, S_IRUGO, tpm_show_durations, NULL); + static DEVICE_ATTR(timeouts, S_IRUGO, tpm_show_timeouts, NULL); +@@ -445,7 +477,7 @@ static struct tpm_vendor_specific tpm_tis = { + .cancel = tpm_tis_ready, + .req_complete_mask = TPM_STS_DATA_AVAIL | TPM_STS_VALID, + .req_complete_val = TPM_STS_DATA_AVAIL | TPM_STS_VALID, +- .req_canceled = TPM_STS_COMMAND_READY, ++ .req_canceled = tpm_tis_req_canceled, + .attr_group = &tis_attr_grp, + .miscdev = { + .fops = &tis_ops,}, +@@ -502,7 +534,7 @@ static irqreturn_t tis_int_handler(int dummy, void *dev_id) + return IRQ_HANDLED; + } + +-static bool interrupts = 1; ++static bool interrupts = true; + module_param(interrupts, bool, 0444); + MODULE_PARM_DESC(interrupts, "Enable interrupts"); + +@@ -528,12 +560,18 @@ static int tpm_tis_init(struct device *dev, resource_size_t start, + chip->vendor.timeout_c = msecs_to_jiffies(TIS_SHORT_TIMEOUT); + chip->vendor.timeout_d = msecs_to_jiffies(TIS_SHORT_TIMEOUT); + ++ if (wait_startup(chip, 0) != 0) { ++ rc = -ENODEV; ++ goto out_err; ++ } ++ + if (request_locality(chip, 0) != 0) { + rc = -ENODEV; + goto out_err; + } + + vendor = ioread32(chip->vendor.iobase + TPM_DID_VID(0)); ++ chip->vendor.manufacturer_id = vendor; + + dev_info(dev, + "1.2 TPM (device-id 0x%X, rev-id %d)\n", +@@ -545,7 +583,7 @@ static int tpm_tis_init(struct device *dev, resource_size_t start, + rc = -ENODEV; + goto out_err; + } +- itpm = (probe == 0) ? 0 : 1; ++ itpm = !!probe; + } + + if (itpm) +@@ -728,6 +766,25 @@ static void tpm_tis_reenable_interrupts(struct tpm_chip *chip) + } + #endif + ++#ifdef CONFIG_PM_SLEEP ++static int tpm_tis_resume(struct device *dev) ++{ ++ struct tpm_chip *chip = dev_get_drvdata(dev); ++ int ret; ++ ++ if (chip->vendor.irq) ++ tpm_tis_reenable_interrupts(chip); ++ ++ ret = tpm_pm_resume(dev); ++ if (!ret) ++ tpm_do_selftest(chip); ++ ++ return ret; ++} ++#endif ++ ++static SIMPLE_DEV_PM_OPS(tpm_tis_pm, tpm_pm_suspend, tpm_tis_resume); ++ + #ifdef CONFIG_PNP + static int tpm_tis_pnp_init(struct pnp_dev *pnp_dev, + const struct pnp_device_id *pnp_id) +@@ -741,34 +798,14 @@ static int tpm_tis_pnp_init(struct pnp_dev *pnp_dev, + if (pnp_irq_valid(pnp_dev, 0)) + irq = pnp_irq(pnp_dev, 0); + else +- interrupts = 0; ++ interrupts = false; + + if (is_itpm(pnp_dev)) +- itpm = 1; ++ itpm = true; + + return tpm_tis_init(&pnp_dev->dev, start, len, irq); + } + +-static int tpm_tis_pnp_suspend(struct pnp_dev *dev, pm_message_t msg) +-{ +- return tpm_pm_suspend(&dev->dev); +-} +- +-static int tpm_tis_pnp_resume(struct pnp_dev *dev) +-{ +- struct tpm_chip *chip = pnp_get_drvdata(dev); +- int ret; +- +- if (chip->vendor.irq) +- tpm_tis_reenable_interrupts(chip); +- +- ret = tpm_pm_resume(&dev->dev); +- if (!ret) +- tpm_do_selftest(chip); +- +- return ret; +-} +- + static struct pnp_device_id tpm_pnp_tbl[] = { + {"PNP0C31", 0}, /* TPM */ + {"ATM1200", 0}, /* Atmel */ +@@ -797,9 +834,12 @@ static struct pnp_driver tis_pnp_driver = { + .name = "tpm_tis", + .id_table = tpm_pnp_tbl, + .probe = tpm_tis_pnp_init, +- .suspend = tpm_tis_pnp_suspend, +- .resume = tpm_tis_pnp_resume, + .remove = tpm_tis_pnp_remove, ++#ifdef CONFIG_PM_SLEEP ++ .driver = { ++ .pm = &tpm_tis_pm, ++ }, ++#endif + }; + + #define TIS_HID_USR_IDX sizeof(tpm_pnp_tbl)/sizeof(struct pnp_device_id) -2 +@@ -808,20 +848,6 @@ module_param_string(hid, tpm_pnp_tbl[TIS_HID_USR_IDX].id, + MODULE_PARM_DESC(hid, "Set additional specific HID for this driver to probe"); + #endif + +-#ifdef CONFIG_PM_SLEEP +-static int tpm_tis_resume(struct device *dev) +-{ +- struct tpm_chip *chip = dev_get_drvdata(dev); +- +- if (chip->vendor.irq) +- tpm_tis_reenable_interrupts(chip); +- +- return tpm_pm_resume(dev); +-} +-#endif +- +-static SIMPLE_DEV_PM_OPS(tpm_tis_pm, tpm_pm_suspend, tpm_tis_resume); +- + static struct platform_driver tis_drv = { + .driver = { + .name = "tpm_tis", +@@ -846,12 +872,19 @@ static int __init init_tis(void) + rc = platform_driver_register(&tis_drv); + if (rc < 0) + return rc; +- if (IS_ERR(pdev=platform_device_register_simple("tpm_tis", -1, NULL, 0))) +- return PTR_ERR(pdev); +- if((rc=tpm_tis_init(&pdev->dev, TIS_MEM_BASE, TIS_MEM_LEN, 0)) != 0) { +- platform_device_unregister(pdev); +- platform_driver_unregister(&tis_drv); ++ pdev = platform_device_register_simple("tpm_tis", -1, NULL, 0); ++ if (IS_ERR(pdev)) { ++ rc = PTR_ERR(pdev); ++ goto err_dev; + } ++ rc = tpm_tis_init(&pdev->dev, TIS_MEM_BASE, TIS_MEM_LEN, 0); ++ if (rc) ++ goto err_init; ++ return 0; ++err_init: ++ platform_device_unregister(pdev); ++err_dev: ++ platform_driver_unregister(&tis_drv); + return rc; + } + +diff --git a/include/linux/tpm.h b/include/linux/tpm.h +index fcb627f..9a9051b 100644 +--- a/include/linux/tpm.h ++++ b/include/linux/tpm.h +@@ -22,6 +22,8 @@ + #ifndef __LINUX_TPM_H__ + #define __LINUX_TPM_H__ + ++#define TPM_DIGEST_SIZE 20 /* Max TPM v1.2 PCR size */ ++ + /* + * Chip num is this value or a valid tpm idx + */ +-- +1.9.0 + diff --git a/patches/btrfs/0001-decompressor-add-LZ4-decompressor-module.patch b/patches/btrfs/0001-decompressor-add-LZ4-decompressor-module.patch new file mode 100644 index 00000000..df8b987e --- /dev/null +++ b/patches/btrfs/0001-decompressor-add-LZ4-decompressor-module.patch @@ -0,0 +1,567 @@ +From be41c7dd44a8952992f1138a8e64416d9af1a809 Mon Sep 17 00:00:00 2001 +From: Kyungsik Lee +Date: Mon, 8 Jul 2013 16:01:45 -0700 +Subject: [PATCH 01/11] decompressor: add LZ4 decompressor module + +Add support for LZ4 decompression in the Linux Kernel. LZ4 Decompression +APIs for kernel are based on LZ4 implementation by Yann Collet. + +Benchmark Results(PATCH v3) +Compiler: Linaro ARM gcc 4.6.2 + +1. ARMv7, 1.5GHz based board + Kernel: linux 3.4 + Uncompressed Kernel Size: 14MB + Compressed Size Decompression Speed + LZO 6.7MB 20.1MB/s, 25.2MB/s(UA) + LZ4 7.3MB 29.1MB/s, 45.6MB/s(UA) + +2. ARMv7, 1.7GHz based board + Kernel: linux 3.7 + Uncompressed Kernel Size: 14MB + Compressed Size Decompression Speed + LZO 6.0MB 34.1MB/s, 52.2MB/s(UA) + LZ4 6.5MB 86.7MB/s +- UA: Unaligned memory Access support +- Latest patch set for LZO applied + +This patch set is for adding support for LZ4-compressed Kernel. LZ4 is a +very fast lossless compression algorithm and it also features an extremely +fast decoder [1]. + +But we have five of decompressors already and one question which does +arise, however, is that of where do we stop adding new ones? This issue +had been discussed and came to the conclusion [2]. + +Russell King said that we should have: + + - one decompressor which is the fastest + - one decompressor for the highest compression ratio + - one popular decompressor (eg conventional gzip) + +If we have a replacement one for one of these, then it should do exactly +that: replace it. + +The benchmark shows that an 8% increase in image size vs a 66% increase +in decompression speed compared to LZO(which has been known as the +fastest decompressor in the Kernel). Therefore the "fast but may not be +small" compression title has clearly been taken by LZ4 [3]. + +[1] http://code.google.com/p/lz4/ +[2] http://thread.gmane.org/gmane.linux.kbuild.devel/9157 +[3] http://thread.gmane.org/gmane.linux.kbuild.devel/9347 + +LZ4 homepage: http://fastcompression.blogspot.com/p/lz4.html +LZ4 source repository: http://code.google.com/p/lz4/ + +Signed-off-by: Kyungsik Lee +Signed-off-by: Yann Collet +Cc: "H. Peter Anvin" +Cc: Ingo Molnar +Cc: Thomas Gleixner +Cc: Russell King +Cc: Borislav Petkov +Cc: Florian Fainelli +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +--- + include/linux/lz4.h | 51 ++++++++ + lib/lz4/lz4_decompress.c | 326 +++++++++++++++++++++++++++++++++++++++++++++++ + lib/lz4/lz4defs.h | 94 ++++++++++++++ + 3 files changed, 471 insertions(+) + create mode 100644 include/linux/lz4.h + create mode 100644 lib/lz4/lz4_decompress.c + create mode 100644 lib/lz4/lz4defs.h + +diff --git a/include/linux/lz4.h b/include/linux/lz4.h +new file mode 100644 +index 0000000..7f6c75a +--- /dev/null ++++ b/include/linux/lz4.h +@@ -0,0 +1,51 @@ ++#ifndef __LZ4_H__ ++#define __LZ4_H__ ++/* ++ * LZ4 Kernel Interface ++ * ++ * Copyright (C) 2013, LG Electronics, Kyungsik Lee ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++/* ++ * lz4_compressbound() ++ * Provides the maximum size that LZ4 may output in a "worst case" scenario ++ * (input data not compressible) ++ */ ++static inline size_t lz4_compressbound(size_t isize) ++{ ++ return isize + (isize / 255) + 16; ++} ++ ++/* ++ * lz4_decompress() ++ * src : source address of the compressed data ++ * src_len : is the input size, whcih is returned after decompress done ++ * dest : output buffer address of the decompressed data ++ * actual_dest_len: is the size of uncompressed data, supposing it's known ++ * return : Success if return 0 ++ * Error if return (< 0) ++ * note : Destination buffer must be already allocated. ++ * slightly faster than lz4_decompress_unknownoutputsize() ++ */ ++int lz4_decompress(const char *src, size_t *src_len, char *dest, ++ size_t actual_dest_len); ++ ++/* ++ * lz4_decompress_unknownoutputsize() ++ * src : source address of the compressed data ++ * src_len : is the input size, therefore the compressed size ++ * dest : output buffer address of the decompressed data ++ * dest_len: is the max size of the destination buffer, which is ++ * returned with actual size of decompressed data after ++ * decompress done ++ * return : Success if return 0 ++ * Error if return (< 0) ++ * note : Destination buffer must be already allocated. ++ */ ++int lz4_decompress_unknownoutputsize(const char *src, size_t src_len, ++ char *dest, size_t *dest_len); ++#endif +diff --git a/lib/lz4/lz4_decompress.c b/lib/lz4/lz4_decompress.c +new file mode 100644 +index 0000000..dcc8975 +--- /dev/null ++++ b/lib/lz4/lz4_decompress.c +@@ -0,0 +1,326 @@ ++/* ++ * LZ4 Decompressor for Linux kernel ++ * ++ * Copyright (C) 2013 LG Electronics Co., Ltd. (http://www.lge.com/) ++ * ++ * Based on LZ4 implementation by Yann Collet. ++ * ++ * LZ4 - Fast LZ compression algorithm ++ * Copyright (C) 2011-2012, Yann Collet. ++ * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are ++ * met: ++ * ++ * * Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * * Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following disclaimer ++ * in the documentation and/or other materials provided with the ++ * distribution. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * You can contact the author at : ++ * - LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html ++ * - LZ4 source repository : http://code.google.com/p/lz4/ ++ */ ++ ++#ifndef STATIC ++#include ++#include ++#endif ++#include ++ ++#include ++ ++#include "lz4defs.h" ++ ++static int lz4_uncompress(const char *source, char *dest, int osize) ++{ ++ const BYTE *ip = (const BYTE *) source; ++ const BYTE *ref; ++ BYTE *op = (BYTE *) dest; ++ BYTE * const oend = op + osize; ++ BYTE *cpy; ++ unsigned token; ++ size_t length; ++ size_t dec32table[] = {0, 3, 2, 3, 0, 0, 0, 0}; ++#if LZ4_ARCH64 ++ size_t dec64table[] = {0, 0, 0, -1, 0, 1, 2, 3}; ++#endif ++ ++ while (1) { ++ ++ /* get runlength */ ++ token = *ip++; ++ length = (token >> ML_BITS); ++ if (length == RUN_MASK) { ++ size_t len; ++ ++ len = *ip++; ++ for (; len == 255; length += 255) ++ len = *ip++; ++ length += len; ++ } ++ ++ /* copy literals */ ++ cpy = op + length; ++ if (unlikely(cpy > oend - COPYLENGTH)) { ++ /* ++ * Error: not enough place for another match ++ * (min 4) + 5 literals ++ */ ++ if (cpy != oend) ++ goto _output_error; ++ ++ memcpy(op, ip, length); ++ ip += length; ++ break; /* EOF */ ++ } ++ LZ4_WILDCOPY(ip, op, cpy); ++ ip -= (op - cpy); ++ op = cpy; ++ ++ /* get offset */ ++ LZ4_READ_LITTLEENDIAN_16(ref, cpy, ip); ++ ip += 2; ++ ++ /* Error: offset create reference outside destination buffer */ ++ if (unlikely(ref < (BYTE *const) dest)) ++ goto _output_error; ++ ++ /* get matchlength */ ++ length = token & ML_MASK; ++ if (length == ML_MASK) { ++ for (; *ip == 255; length += 255) ++ ip++; ++ length += *ip++; ++ } ++ ++ /* copy repeated sequence */ ++ if (unlikely((op - ref) < STEPSIZE)) { ++#if LZ4_ARCH64 ++ size_t dec64 = dec64table[op - ref]; ++#else ++ const int dec64 = 0; ++#endif ++ op[0] = ref[0]; ++ op[1] = ref[1]; ++ op[2] = ref[2]; ++ op[3] = ref[3]; ++ op += 4; ++ ref += 4; ++ ref -= dec32table[op-ref]; ++ PUT4(ref, op); ++ op += STEPSIZE - 4; ++ ref -= dec64; ++ } else { ++ LZ4_COPYSTEP(ref, op); ++ } ++ cpy = op + length - (STEPSIZE - 4); ++ if (cpy > (oend - COPYLENGTH)) { ++ ++ /* Error: request to write beyond destination buffer */ ++ if (cpy > oend) ++ goto _output_error; ++ LZ4_SECURECOPY(ref, op, (oend - COPYLENGTH)); ++ while (op < cpy) ++ *op++ = *ref++; ++ op = cpy; ++ /* ++ * Check EOF (should never happen, since last 5 bytes ++ * are supposed to be literals) ++ */ ++ if (op == oend) ++ goto _output_error; ++ continue; ++ } ++ LZ4_SECURECOPY(ref, op, cpy); ++ op = cpy; /* correction */ ++ } ++ /* end of decoding */ ++ return (int) (((char *)ip) - source); ++ ++ /* write overflow error detected */ ++_output_error: ++ return (int) (-(((char *)ip) - source)); ++} ++ ++static int lz4_uncompress_unknownoutputsize(const char *source, char *dest, ++ int isize, size_t maxoutputsize) ++{ ++ const BYTE *ip = (const BYTE *) source; ++ const BYTE *const iend = ip + isize; ++ const BYTE *ref; ++ ++ ++ BYTE *op = (BYTE *) dest; ++ BYTE * const oend = op + maxoutputsize; ++ BYTE *cpy; ++ ++ size_t dec32table[] = {0, 3, 2, 3, 0, 0, 0, 0}; ++#if LZ4_ARCH64 ++ size_t dec64table[] = {0, 0, 0, -1, 0, 1, 2, 3}; ++#endif ++ ++ /* Main Loop */ ++ while (ip < iend) { ++ ++ unsigned token; ++ size_t length; ++ ++ /* get runlength */ ++ token = *ip++; ++ length = (token >> ML_BITS); ++ if (length == RUN_MASK) { ++ int s = 255; ++ while ((ip < iend) && (s == 255)) { ++ s = *ip++; ++ length += s; ++ } ++ } ++ /* copy literals */ ++ cpy = op + length; ++ if ((cpy > oend - COPYLENGTH) || ++ (ip + length > iend - COPYLENGTH)) { ++ ++ if (cpy > oend) ++ goto _output_error;/* writes beyond buffer */ ++ ++ if (ip + length != iend) ++ goto _output_error;/* ++ * Error: LZ4 format requires ++ * to consume all input ++ * at this stage ++ */ ++ memcpy(op, ip, length); ++ op += length; ++ break;/* Necessarily EOF, due to parsing restrictions */ ++ } ++ LZ4_WILDCOPY(ip, op, cpy); ++ ip -= (op - cpy); ++ op = cpy; ++ ++ /* get offset */ ++ LZ4_READ_LITTLEENDIAN_16(ref, cpy, ip); ++ ip += 2; ++ if (ref < (BYTE * const) dest) ++ goto _output_error; ++ /* ++ * Error : offset creates reference ++ * outside of destination buffer ++ */ ++ ++ /* get matchlength */ ++ length = (token & ML_MASK); ++ if (length == ML_MASK) { ++ while (ip < iend) { ++ int s = *ip++; ++ length += s; ++ if (s == 255) ++ continue; ++ break; ++ } ++ } ++ ++ /* copy repeated sequence */ ++ if (unlikely((op - ref) < STEPSIZE)) { ++#if LZ4_ARCH64 ++ size_t dec64 = dec64table[op - ref]; ++#else ++ const int dec64 = 0; ++#endif ++ op[0] = ref[0]; ++ op[1] = ref[1]; ++ op[2] = ref[2]; ++ op[3] = ref[3]; ++ op += 4; ++ ref += 4; ++ ref -= dec32table[op - ref]; ++ PUT4(ref, op); ++ op += STEPSIZE - 4; ++ ref -= dec64; ++ } else { ++ LZ4_COPYSTEP(ref, op); ++ } ++ cpy = op + length - (STEPSIZE-4); ++ if (cpy > oend - COPYLENGTH) { ++ if (cpy > oend) ++ goto _output_error; /* write outside of buf */ ++ ++ LZ4_SECURECOPY(ref, op, (oend - COPYLENGTH)); ++ while (op < cpy) ++ *op++ = *ref++; ++ op = cpy; ++ /* ++ * Check EOF (should never happen, since last 5 bytes ++ * are supposed to be literals) ++ */ ++ if (op == oend) ++ goto _output_error; ++ continue; ++ } ++ LZ4_SECURECOPY(ref, op, cpy); ++ op = cpy; /* correction */ ++ } ++ /* end of decoding */ ++ return (int) (((char *) op) - dest); ++ ++ /* write overflow error detected */ ++_output_error: ++ return (int) (-(((char *) ip) - source)); ++} ++ ++int lz4_decompress(const char *src, size_t *src_len, char *dest, ++ size_t actual_dest_len) ++{ ++ int ret = -1; ++ int input_len = 0; ++ ++ input_len = lz4_uncompress(src, dest, actual_dest_len); ++ if (input_len < 0) ++ goto exit_0; ++ *src_len = input_len; ++ ++ return 0; ++exit_0: ++ return ret; ++} ++#ifndef STATIC ++EXPORT_SYMBOL_GPL(lz4_decompress); ++#endif ++ ++int lz4_decompress_unknownoutputsize(const char *src, size_t src_len, ++ char *dest, size_t *dest_len) ++{ ++ int ret = -1; ++ int out_len = 0; ++ ++ out_len = lz4_uncompress_unknownoutputsize(src, dest, src_len, ++ *dest_len); ++ if (out_len < 0) ++ goto exit_0; ++ *dest_len = out_len; ++ ++ return 0; ++exit_0: ++ return ret; ++} ++#ifndef STATIC ++EXPORT_SYMBOL_GPL(lz4_decompress_unknownoutputsize); ++ ++MODULE_LICENSE("GPL"); ++MODULE_DESCRIPTION("LZ4 Decompressor"); ++#endif +diff --git a/lib/lz4/lz4defs.h b/lib/lz4/lz4defs.h +new file mode 100644 +index 0000000..43ac31d +--- /dev/null ++++ b/lib/lz4/lz4defs.h +@@ -0,0 +1,94 @@ ++/* ++ * lz4defs.h -- architecture specific defines ++ * ++ * Copyright (C) 2013, LG Electronics, Kyungsik Lee ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++/* ++ * Detects 64 bits mode ++ */ ++#if (defined(__x86_64__) || defined(__x86_64) || defined(__amd64__) \ ++ || defined(__ppc64__) || defined(__LP64__)) ++#define LZ4_ARCH64 1 ++#else ++#define LZ4_ARCH64 0 ++#endif ++ ++/* ++ * Architecture-specific macros ++ */ ++#define BYTE u8 ++#if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) \ ++ || defined(CONFIG_ARM) && __LINUX_ARM_ARCH__ >= 6 \ ++ && defined(ARM_EFFICIENT_UNALIGNED_ACCESS) ++typedef struct _U32_S { u32 v; } U32_S; ++typedef struct _U64_S { u64 v; } U64_S; ++ ++#define A32(x) (((U32_S *)(x))->v) ++#define A64(x) (((U64_S *)(x))->v) ++ ++#define PUT4(s, d) (A32(d) = A32(s)) ++#define PUT8(s, d) (A64(d) = A64(s)) ++#else /* CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS */ ++ ++#define PUT4(s, d) \ ++ put_unaligned(get_unaligned((const u32 *) s), (u32 *) d) ++#define PUT8(s, d) \ ++ put_unaligned(get_unaligned((const u64 *) s), (u64 *) d) ++#endif ++ ++#define COPYLENGTH 8 ++#define ML_BITS 4 ++#define ML_MASK ((1U << ML_BITS) - 1) ++#define RUN_BITS (8 - ML_BITS) ++#define RUN_MASK ((1U << RUN_BITS) - 1) ++ ++#if LZ4_ARCH64/* 64-bit */ ++#define STEPSIZE 8 ++ ++#define LZ4_COPYSTEP(s, d) \ ++ do { \ ++ PUT8(s, d); \ ++ d += 8; \ ++ s += 8; \ ++ } while (0) ++ ++#define LZ4_COPYPACKET(s, d) LZ4_COPYSTEP(s, d) ++ ++#define LZ4_SECURECOPY(s, d, e) \ ++ do { \ ++ if (d < e) { \ ++ LZ4_WILDCOPY(s, d, e); \ ++ } \ ++ } while (0) ++ ++#else /* 32-bit */ ++#define STEPSIZE 4 ++ ++#define LZ4_COPYSTEP(s, d) \ ++ do { \ ++ PUT4(s, d); \ ++ d += 4; \ ++ s += 4; \ ++ } while (0) ++ ++#define LZ4_COPYPACKET(s, d) \ ++ do { \ ++ LZ4_COPYSTEP(s, d); \ ++ LZ4_COPYSTEP(s, d); \ ++ } while (0) ++ ++#define LZ4_SECURECOPY LZ4_WILDCOPY ++#endif ++ ++#define LZ4_READ_LITTLEENDIAN_16(d, s, p) \ ++ (d = s - get_unaligned_le16(p)) ++ ++#define LZ4_WILDCOPY(s, d, e) \ ++ do { \ ++ LZ4_COPYPACKET(s, d); \ ++ } while (d < e) +-- +1.9.0 + diff --git a/patches/btrfs/0002-lib-add-support-for-LZ4-compressed-kernel.patch b/patches/btrfs/0002-lib-add-support-for-LZ4-compressed-kernel.patch new file mode 100644 index 00000000..c48134f2 --- /dev/null +++ b/patches/btrfs/0002-lib-add-support-for-LZ4-compressed-kernel.patch @@ -0,0 +1,415 @@ +From 4db5092f822513104af9e35ad9c7733da69f109d Mon Sep 17 00:00:00 2001 +From: Kyungsik Lee +Date: Mon, 8 Jul 2013 16:01:46 -0700 +Subject: [PATCH 02/11] lib: add support for LZ4-compressed kernel + +Add support for extracting LZ4-compressed kernel images, as well as +LZ4-compressed ramdisk images in the kernel boot process. + +Signed-off-by: Kyungsik Lee +Cc: "H. Peter Anvin" +Cc: Ingo Molnar +Cc: Thomas Gleixner +Cc: Russell King +Cc: Borislav Petkov +Cc: Florian Fainelli +Cc: Yann Collet +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +--- + include/linux/decompress/unlz4.h | 10 +++ + init/Kconfig | 17 +++- + lib/Kconfig | 7 ++ + lib/Makefile | 2 + + lib/decompress.c | 5 ++ + lib/decompress_unlz4.c | 187 +++++++++++++++++++++++++++++++++++++++ + lib/lz4/Makefile | 1 + + lib/lz4/lz4_decompress.c | 2 +- + scripts/Makefile.lib | 5 ++ + usr/Kconfig | 9 ++ + 10 files changed, 243 insertions(+), 2 deletions(-) + create mode 100644 include/linux/decompress/unlz4.h + create mode 100644 lib/decompress_unlz4.c + create mode 100644 lib/lz4/Makefile + +diff --git a/include/linux/decompress/unlz4.h b/include/linux/decompress/unlz4.h +new file mode 100644 +index 0000000..d5b68bf +--- /dev/null ++++ b/include/linux/decompress/unlz4.h +@@ -0,0 +1,10 @@ ++#ifndef DECOMPRESS_UNLZ4_H ++#define DECOMPRESS_UNLZ4_H ++ ++int unlz4(unsigned char *inbuf, int len, ++ int(*fill)(void*, unsigned int), ++ int(*flush)(void*, unsigned int), ++ unsigned char *output, ++ int *pos, ++ void(*error)(char *x)); ++#endif +diff --git a/init/Kconfig b/init/Kconfig +index be8b7f5..fc8eb1f 100644 +--- a/init/Kconfig ++++ b/init/Kconfig +@@ -133,10 +133,13 @@ config HAVE_KERNEL_XZ + config HAVE_KERNEL_LZO + bool + ++config HAVE_KERNEL_LZ4 ++ bool ++ + choice + prompt "Kernel compression mode" + default KERNEL_GZIP +- depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_XZ || HAVE_KERNEL_LZO ++ depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_XZ || HAVE_KERNEL_LZO || HAVE_KERNEL_LZ4 + help + The linux kernel is a kind of self-extracting executable. + Several compression algorithms are available, which differ +@@ -203,6 +206,18 @@ config KERNEL_LZO + size is about 10% bigger than gzip; however its speed + (both compression and decompression) is the fastest. + ++config KERNEL_LZ4 ++ bool "LZ4" ++ depends on HAVE_KERNEL_LZ4 ++ help ++ LZ4 is an LZ77-type compressor with a fixed, byte-oriented encoding. ++ A preliminary version of LZ4 de/compression tool is available at ++ . ++ ++ Its compression ratio is worse than LZO. The size of the kernel ++ is about 8% bigger than LZO. But the decompression speed is ++ faster than LZO. ++ + endchoice + + config DEFAULT_HOSTNAME +diff --git a/lib/Kconfig b/lib/Kconfig +index 75cdb77..b108047 100644 +--- a/lib/Kconfig ++++ b/lib/Kconfig +@@ -189,6 +189,9 @@ config LZO_COMPRESS + config LZO_DECOMPRESS + tristate + ++config LZ4_DECOMPRESS ++ tristate ++ + source "lib/xz/Kconfig" + + # +@@ -213,6 +216,10 @@ config DECOMPRESS_LZO + select LZO_DECOMPRESS + tristate + ++config DECOMPRESS_LZ4 ++ select LZ4_DECOMPRESS ++ tristate ++ + # + # Generic allocator support is selected if needed + # +diff --git a/lib/Makefile b/lib/Makefile +index 02ed6c0..c2073bf 100644 +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -72,6 +72,7 @@ obj-$(CONFIG_REED_SOLOMON) += reed_solomon/ + obj-$(CONFIG_BCH) += bch.o + obj-$(CONFIG_LZO_COMPRESS) += lzo/ + obj-$(CONFIG_LZO_DECOMPRESS) += lzo/ ++obj-$(CONFIG_LZ4_DECOMPRESS) += lz4/ + obj-$(CONFIG_XZ_DEC) += xz/ + obj-$(CONFIG_RAID6_PQ) += raid6/ + +@@ -80,6 +81,7 @@ lib-$(CONFIG_DECOMPRESS_BZIP2) += decompress_bunzip2.o + lib-$(CONFIG_DECOMPRESS_LZMA) += decompress_unlzma.o + lib-$(CONFIG_DECOMPRESS_XZ) += decompress_unxz.o + lib-$(CONFIG_DECOMPRESS_LZO) += decompress_unlzo.o ++lib-$(CONFIG_DECOMPRESS_LZ4) += decompress_unlz4.o + + obj-$(CONFIG_TEXTSEARCH) += textsearch.o + obj-$(CONFIG_TEXTSEARCH_KMP) += ts_kmp.o +diff --git a/lib/decompress.c b/lib/decompress.c +index 31a8042..c70810e 100644 +--- a/lib/decompress.c ++++ b/lib/decompress.c +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -31,6 +32,9 @@ + #ifndef CONFIG_DECOMPRESS_LZO + # define unlzo NULL + #endif ++#ifndef CONFIG_DECOMPRESS_LZ4 ++# define unlz4 NULL ++#endif + + struct compress_format { + unsigned char magic[2]; +@@ -45,6 +49,7 @@ static const struct compress_format compressed_formats[] __initdata = { + { {0x5d, 0x00}, "lzma", unlzma }, + { {0xfd, 0x37}, "xz", unxz }, + { {0x89, 0x4c}, "lzo", unlzo }, ++ { {0x02, 0x21}, "lz4", unlz4 }, + { {0, 0}, NULL, NULL } + }; + +diff --git a/lib/decompress_unlz4.c b/lib/decompress_unlz4.c +new file mode 100644 +index 0000000..3e67cfa +--- /dev/null ++++ b/lib/decompress_unlz4.c +@@ -0,0 +1,187 @@ ++/* ++ * Wrapper for decompressing LZ4-compressed kernel, initramfs, and initrd ++ * ++ * Copyright (C) 2013, LG Electronics, Kyungsik Lee ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#ifdef STATIC ++#define PREBOOT ++#include "lz4/lz4_decompress.c" ++#else ++#include ++#endif ++#include ++#include ++#include ++#include ++ ++#include ++ ++/* ++ * Note: Uncompressed chunk size is used in the compressor side ++ * (userspace side for compression). ++ * It is hardcoded because there is not proper way to extract it ++ * from the binary stream which is generated by the preliminary ++ * version of LZ4 tool so far. ++ */ ++#define LZ4_DEFAULT_UNCOMPRESSED_CHUNK_SIZE (8 << 20) ++#define ARCHIVE_MAGICNUMBER 0x184C2102 ++ ++STATIC inline int INIT unlz4(u8 *input, int in_len, ++ int (*fill) (void *, unsigned int), ++ int (*flush) (void *, unsigned int), ++ u8 *output, int *posp, ++ void (*error) (char *x)) ++{ ++ int ret = -1; ++ size_t chunksize = 0; ++ size_t uncomp_chunksize = LZ4_DEFAULT_UNCOMPRESSED_CHUNK_SIZE; ++ u8 *inp; ++ u8 *inp_start; ++ u8 *outp; ++ int size = in_len; ++#ifdef PREBOOT ++ size_t out_len = get_unaligned_le32(input + in_len); ++#endif ++ size_t dest_len; ++ ++ ++ if (output) { ++ outp = output; ++ } else if (!flush) { ++ error("NULL output pointer and no flush function provided"); ++ goto exit_0; ++ } else { ++ outp = large_malloc(uncomp_chunksize); ++ if (!outp) { ++ error("Could not allocate output buffer"); ++ goto exit_0; ++ } ++ } ++ ++ if (input && fill) { ++ error("Both input pointer and fill function provided,"); ++ goto exit_1; ++ } else if (input) { ++ inp = input; ++ } else if (!fill) { ++ error("NULL input pointer and missing fill function"); ++ goto exit_1; ++ } else { ++ inp = large_malloc(lz4_compressbound(uncomp_chunksize)); ++ if (!inp) { ++ error("Could not allocate input buffer"); ++ goto exit_1; ++ } ++ } ++ inp_start = inp; ++ ++ if (posp) ++ *posp = 0; ++ ++ if (fill) ++ fill(inp, 4); ++ ++ chunksize = get_unaligned_le32(inp); ++ if (chunksize == ARCHIVE_MAGICNUMBER) { ++ inp += 4; ++ size -= 4; ++ } else { ++ error("invalid header"); ++ goto exit_2; ++ } ++ ++ if (posp) ++ *posp += 4; ++ ++ for (;;) { ++ ++ if (fill) ++ fill(inp, 4); ++ ++ chunksize = get_unaligned_le32(inp); ++ if (chunksize == ARCHIVE_MAGICNUMBER) { ++ inp += 4; ++ size -= 4; ++ if (posp) ++ *posp += 4; ++ continue; ++ } ++ inp += 4; ++ size -= 4; ++ ++ if (posp) ++ *posp += 4; ++ ++ if (fill) { ++ if (chunksize > lz4_compressbound(uncomp_chunksize)) { ++ error("chunk length is longer than allocated"); ++ goto exit_2; ++ } ++ fill(inp, chunksize); ++ } ++#ifdef PREBOOT ++ if (out_len >= uncomp_chunksize) { ++ dest_len = uncomp_chunksize; ++ out_len -= dest_len; ++ } else ++ dest_len = out_len; ++ ret = lz4_decompress(inp, &chunksize, outp, dest_len); ++#else ++ dest_len = uncomp_chunksize; ++ ret = lz4_decompress_unknownoutputsize(inp, chunksize, outp, ++ &dest_len); ++#endif ++ if (ret < 0) { ++ error("Decoding failed"); ++ goto exit_2; ++ } ++ ++ if (flush && flush(outp, dest_len) != dest_len) ++ goto exit_2; ++ if (output) ++ outp += dest_len; ++ if (posp) ++ *posp += chunksize; ++ ++ size -= chunksize; ++ ++ if (size == 0) ++ break; ++ else if (size < 0) { ++ error("data corrupted"); ++ goto exit_2; ++ } ++ ++ inp += chunksize; ++ if (fill) ++ inp = inp_start; ++ } ++ ++ ret = 0; ++exit_2: ++ if (!input) ++ large_free(inp_start); ++exit_1: ++ if (!output) ++ large_free(outp); ++exit_0: ++ return ret; ++} ++ ++#ifdef PREBOOT ++STATIC int INIT decompress(unsigned char *buf, int in_len, ++ int(*fill)(void*, unsigned int), ++ int(*flush)(void*, unsigned int), ++ unsigned char *output, ++ int *posp, ++ void(*error)(char *x) ++ ) ++{ ++ return unlz4(buf, in_len - 4, fill, flush, output, posp, error); ++} ++#endif +diff --git a/lib/lz4/Makefile b/lib/lz4/Makefile +new file mode 100644 +index 0000000..7f548c6 +--- /dev/null ++++ b/lib/lz4/Makefile +@@ -0,0 +1 @@ ++obj-$(CONFIG_LZ4_DECOMPRESS) += lz4_decompress.o +diff --git a/lib/lz4/lz4_decompress.c b/lib/lz4/lz4_decompress.c +index dcc8975..d3414ea 100644 +--- a/lib/lz4/lz4_decompress.c ++++ b/lib/lz4/lz4_decompress.c +@@ -1,7 +1,7 @@ + /* + * LZ4 Decompressor for Linux kernel + * +- * Copyright (C) 2013 LG Electronics Co., Ltd. (http://www.lge.com/) ++ * Copyright (C) 2013, LG Electronics, Kyungsik Lee + * + * Based on LZ4 implementation by Yann Collet. + * +diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib +index 72ac3eb..b07ca69 100644 +--- a/scripts/Makefile.lib ++++ b/scripts/Makefile.lib +@@ -311,6 +311,11 @@ cmd_lzo = (cat $(filter-out FORCE,$^) | \ + lzop -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ + (rm -f $@ ; false) + ++quiet_cmd_lz4 = LZ4 $@ ++cmd_lz4 = (cat $(filter-out FORCE,$^) | \ ++ lz4c -l -c1 stdin stdout && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ ++ (rm -f $@ ; false) ++ + # U-Boot mkimage + # --------------------------------------------------------------------------- + +diff --git a/usr/Kconfig b/usr/Kconfig +index 085872b..642f503 100644 +--- a/usr/Kconfig ++++ b/usr/Kconfig +@@ -90,6 +90,15 @@ config RD_LZO + Support loading of a LZO encoded initial ramdisk or cpio buffer + If unsure, say N. + ++config RD_LZ4 ++ bool "Support initial ramdisks compressed using LZ4" if EXPERT ++ default !EXPERT ++ depends on BLK_DEV_INITRD ++ select DECOMPRESS_LZ4 ++ help ++ Support loading of a LZ4 encoded initial ramdisk or cpio buffer ++ If unsure, say N. ++ + choice + prompt "Built-in initramfs compression mode" if INITRAMFS_SOURCE!="" + help +-- +1.9.0 + diff --git a/patches/btrfs/0003-lib-add-lz4-compressor-module.patch b/patches/btrfs/0003-lib-add-lz4-compressor-module.patch new file mode 100644 index 00000000..bbe514af --- /dev/null +++ b/patches/btrfs/0003-lib-add-lz4-compressor-module.patch @@ -0,0 +1,1271 @@ +From 1d0b2acfb22bc943fd546178be4aac41cca83b04 Mon Sep 17 00:00:00 2001 +From: Chanho Min +Date: Mon, 8 Jul 2013 16:01:49 -0700 +Subject: [PATCH 03/11] lib: add lz4 compressor module + +This patchset is for supporting LZ4 compression and the crypto API using +it. + +As shown below, the size of data is a little bit bigger but compressing +speed is faster under the enabled unaligned memory access. We can use +lz4 de/compression through crypto API as well. Also, It will be useful +for another potential user of lz4 compression. + +lz4 Compression Benchmark: +Compiler: ARM gcc 4.6.4 +ARMv7, 1 GHz based board + Kernel: linux 3.4 + Uncompressed data Size: 101 MB + Compressed Size compression Speed + LZO 72.1MB 32.1MB/s, 33.0MB/s(UA) + LZ4 75.1MB 30.4MB/s, 35.9MB/s(UA) + LZ4HC 59.8MB 2.4MB/s, 2.5MB/s(UA) +- UA: Unaligned memory Access support +- Latest patch set for LZO applied + +This patch: + +Add support for LZ4 compression in the Linux Kernel. LZ4 Compression APIs +for kernel are based on LZ4 implementation by Yann Collet and were changed +for kernel coding style. + +LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html +LZ4 source repository : http://code.google.com/p/lz4/ +svn revision : r90 + +Two APIs are added: + +lz4_compress() support basic lz4 compression whereas lz4hc_compress() +support high compression or CPU performance get lower but compression +ratio get higher. Also, we require the pre-allocated working memory with +the defined size and destination buffer must be allocated with the size of +lz4_compressbound. + +[akpm@linux-foundation.org: make lz4_compresshcctx() static] +Signed-off-by: Chanho Min +Cc: "Darrick J. Wong" +Cc: Bob Pearson +Cc: Richard Weinberger +Cc: Herbert Xu +Cc: Yann Collet +Cc: Kyungsik Lee +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +--- + include/linux/lz4.h | 36 ++++ + lib/Kconfig | 6 + + lib/Makefile | 2 + + lib/lz4/Makefile | 2 + + lib/lz4/lz4_compress.c | 443 ++++++++++++++++++++++++++++++++++++++ + lib/lz4/lz4defs.h | 66 +++++- + lib/lz4/lz4hc_compress.c | 539 +++++++++++++++++++++++++++++++++++++++++++++++ + 7 files changed, 1092 insertions(+), 2 deletions(-) + create mode 100644 lib/lz4/lz4_compress.c + create mode 100644 lib/lz4/lz4hc_compress.c + +diff --git a/include/linux/lz4.h b/include/linux/lz4.h +index 7f6c75a..d21c13f 100644 +--- a/include/linux/lz4.h ++++ b/include/linux/lz4.h +@@ -9,6 +9,8 @@ + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ ++#define LZ4_MEM_COMPRESS (4096 * sizeof(unsigned char *)) ++#define LZ4HC_MEM_COMPRESS (65538 * sizeof(unsigned char *)) + + /* + * lz4_compressbound() +@@ -21,6 +23,40 @@ static inline size_t lz4_compressbound(size_t isize) + } + + /* ++ * lz4_compress() ++ * src : source address of the original data ++ * src_len : size of the original data ++ * dst : output buffer address of the compressed data ++ * This requires 'dst' of size LZ4_COMPRESSBOUND. ++ * dst_len : is the output size, which is returned after compress done ++ * workmem : address of the working memory. ++ * This requires 'workmem' of size LZ4_MEM_COMPRESS. ++ * return : Success if return 0 ++ * Error if return (< 0) ++ * note : Destination buffer and workmem must be already allocated with ++ * the defined size. ++ */ ++int lz4_compress(const unsigned char *src, size_t src_len, ++ unsigned char *dst, size_t *dst_len, void *wrkmem); ++ ++ /* ++ * lz4hc_compress() ++ * src : source address of the original data ++ * src_len : size of the original data ++ * dst : output buffer address of the compressed data ++ * This requires 'dst' of size LZ4_COMPRESSBOUND. ++ * dst_len : is the output size, which is returned after compress done ++ * workmem : address of the working memory. ++ * This requires 'workmem' of size LZ4HC_MEM_COMPRESS. ++ * return : Success if return 0 ++ * Error if return (< 0) ++ * note : Destination buffer and workmem must be already allocated with ++ * the defined size. ++ */ ++int lz4hc_compress(const unsigned char *src, size_t src_len, ++ unsigned char *dst, size_t *dst_len, void *wrkmem); ++ ++/* + * lz4_decompress() + * src : source address of the compressed data + * src_len : is the input size, whcih is returned after decompress done +diff --git a/lib/Kconfig b/lib/Kconfig +index b108047..b686870 100644 +--- a/lib/Kconfig ++++ b/lib/Kconfig +@@ -189,6 +189,12 @@ config LZO_COMPRESS + config LZO_DECOMPRESS + tristate + ++config LZ4_COMPRESS ++ tristate ++ ++config LZ4HC_COMPRESS ++ tristate ++ + config LZ4_DECOMPRESS + tristate + +diff --git a/lib/Makefile b/lib/Makefile +index c2073bf..0ad3245 100644 +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -72,6 +72,8 @@ obj-$(CONFIG_REED_SOLOMON) += reed_solomon/ + obj-$(CONFIG_BCH) += bch.o + obj-$(CONFIG_LZO_COMPRESS) += lzo/ + obj-$(CONFIG_LZO_DECOMPRESS) += lzo/ ++obj-$(CONFIG_LZ4_COMPRESS) += lz4/ ++obj-$(CONFIG_LZ4HC_COMPRESS) += lz4/ + obj-$(CONFIG_LZ4_DECOMPRESS) += lz4/ + obj-$(CONFIG_XZ_DEC) += xz/ + obj-$(CONFIG_RAID6_PQ) += raid6/ +diff --git a/lib/lz4/Makefile b/lib/lz4/Makefile +index 7f548c6..8085d04 100644 +--- a/lib/lz4/Makefile ++++ b/lib/lz4/Makefile +@@ -1 +1,3 @@ ++obj-$(CONFIG_LZ4_COMPRESS) += lz4_compress.o ++obj-$(CONFIG_LZ4HC_COMPRESS) += lz4hc_compress.o + obj-$(CONFIG_LZ4_DECOMPRESS) += lz4_decompress.o +diff --git a/lib/lz4/lz4_compress.c b/lib/lz4/lz4_compress.c +new file mode 100644 +index 0000000..fd94058 +--- /dev/null ++++ b/lib/lz4/lz4_compress.c +@@ -0,0 +1,443 @@ ++/* ++ * LZ4 - Fast LZ compression algorithm ++ * Copyright (C) 2011-2012, Yann Collet. ++ * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) ++ ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are ++ * met: ++ * ++ * * Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * * Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following disclaimer ++ * in the documentation and/or other materials provided with the ++ * distribution. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * You can contact the author at : ++ * - LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html ++ * - LZ4 source repository : http://code.google.com/p/lz4/ ++ * ++ * Changed for kernel use by: ++ * Chanho Min ++ */ ++ ++#include ++#include ++#include ++#include ++#include "lz4defs.h" ++ ++/* ++ * LZ4_compressCtx : ++ * ----------------- ++ * Compress 'isize' bytes from 'source' into an output buffer 'dest' of ++ * maximum size 'maxOutputSize'. * If it cannot achieve it, compression ++ * will stop, and result of the function will be zero. ++ * return : the number of bytes written in buffer 'dest', or 0 if the ++ * compression fails ++ */ ++static inline int lz4_compressctx(void *ctx, ++ const char *source, ++ char *dest, ++ int isize, ++ int maxoutputsize) ++{ ++ HTYPE *hashtable = (HTYPE *)ctx; ++ const u8 *ip = (u8 *)source; ++#if LZ4_ARCH64 ++ const BYTE * const base = ip; ++#else ++ const int base = 0; ++#endif ++ const u8 *anchor = ip; ++ const u8 *const iend = ip + isize; ++ const u8 *const mflimit = iend - MFLIMIT; ++ #define MATCHLIMIT (iend - LASTLITERALS) ++ ++ u8 *op = (u8 *) dest; ++ u8 *const oend = op + maxoutputsize; ++ int length; ++ const int skipstrength = SKIPSTRENGTH; ++ u32 forwardh; ++ int lastrun; ++ ++ /* Init */ ++ if (isize < MINLENGTH) ++ goto _last_literals; ++ ++ memset((void *)hashtable, 0, LZ4_MEM_COMPRESS); ++ ++ /* First Byte */ ++ hashtable[LZ4_HASH_VALUE(ip)] = ip - base; ++ ip++; ++ forwardh = LZ4_HASH_VALUE(ip); ++ ++ /* Main Loop */ ++ for (;;) { ++ int findmatchattempts = (1U << skipstrength) + 3; ++ const u8 *forwardip = ip; ++ const u8 *ref; ++ u8 *token; ++ ++ /* Find a match */ ++ do { ++ u32 h = forwardh; ++ int step = findmatchattempts++ >> skipstrength; ++ ip = forwardip; ++ forwardip = ip + step; ++ ++ if (unlikely(forwardip > mflimit)) ++ goto _last_literals; ++ ++ forwardh = LZ4_HASH_VALUE(forwardip); ++ ref = base + hashtable[h]; ++ hashtable[h] = ip - base; ++ } while ((ref < ip - MAX_DISTANCE) || (A32(ref) != A32(ip))); ++ ++ /* Catch up */ ++ while ((ip > anchor) && (ref > (u8 *)source) && ++ unlikely(ip[-1] == ref[-1])) { ++ ip--; ++ ref--; ++ } ++ ++ /* Encode Literal length */ ++ length = (int)(ip - anchor); ++ token = op++; ++ /* check output limit */ ++ if (unlikely(op + length + (2 + 1 + LASTLITERALS) + ++ (length >> 8) > oend)) ++ return 0; ++ ++ if (length >= (int)RUN_MASK) { ++ int len; ++ *token = (RUN_MASK << ML_BITS); ++ len = length - RUN_MASK; ++ for (; len > 254 ; len -= 255) ++ *op++ = 255; ++ *op++ = (u8)len; ++ } else ++ *token = (length << ML_BITS); ++ ++ /* Copy Literals */ ++ LZ4_BLINDCOPY(anchor, op, length); ++_next_match: ++ /* Encode Offset */ ++ LZ4_WRITE_LITTLEENDIAN_16(op, (u16)(ip - ref)); ++ ++ /* Start Counting */ ++ ip += MINMATCH; ++ /* MinMatch verified */ ++ ref += MINMATCH; ++ anchor = ip; ++ while (likely(ip < MATCHLIMIT - (STEPSIZE - 1))) { ++ #if LZ4_ARCH64 ++ u64 diff = A64(ref) ^ A64(ip); ++ #else ++ u32 diff = A32(ref) ^ A32(ip); ++ #endif ++ if (!diff) { ++ ip += STEPSIZE; ++ ref += STEPSIZE; ++ continue; ++ } ++ ip += LZ4_NBCOMMONBYTES(diff); ++ goto _endcount; ++ } ++ #if LZ4_ARCH64 ++ if ((ip < (MATCHLIMIT - 3)) && (A32(ref) == A32(ip))) { ++ ip += 4; ++ ref += 4; ++ } ++ #endif ++ if ((ip < (MATCHLIMIT - 1)) && (A16(ref) == A16(ip))) { ++ ip += 2; ++ ref += 2; ++ } ++ if ((ip < MATCHLIMIT) && (*ref == *ip)) ++ ip++; ++_endcount: ++ /* Encode MatchLength */ ++ length = (int)(ip - anchor); ++ /* Check output limit */ ++ if (unlikely(op + (1 + LASTLITERALS) + (length >> 8) > oend)) ++ return 0; ++ if (length >= (int)ML_MASK) { ++ *token += ML_MASK; ++ length -= ML_MASK; ++ for (; length > 509 ; length -= 510) { ++ *op++ = 255; ++ *op++ = 255; ++ } ++ if (length > 254) { ++ length -= 255; ++ *op++ = 255; ++ } ++ *op++ = (u8)length; ++ } else ++ *token += length; ++ ++ /* Test end of chunk */ ++ if (ip > mflimit) { ++ anchor = ip; ++ break; ++ } ++ ++ /* Fill table */ ++ hashtable[LZ4_HASH_VALUE(ip-2)] = ip - 2 - base; ++ ++ /* Test next position */ ++ ref = base + hashtable[LZ4_HASH_VALUE(ip)]; ++ hashtable[LZ4_HASH_VALUE(ip)] = ip - base; ++ if ((ref > ip - (MAX_DISTANCE + 1)) && (A32(ref) == A32(ip))) { ++ token = op++; ++ *token = 0; ++ goto _next_match; ++ } ++ ++ /* Prepare next loop */ ++ anchor = ip++; ++ forwardh = LZ4_HASH_VALUE(ip); ++ } ++ ++_last_literals: ++ /* Encode Last Literals */ ++ lastrun = (int)(iend - anchor); ++ if (((char *)op - dest) + lastrun + 1 ++ + ((lastrun + 255 - RUN_MASK) / 255) > (u32)maxoutputsize) ++ return 0; ++ ++ if (lastrun >= (int)RUN_MASK) { ++ *op++ = (RUN_MASK << ML_BITS); ++ lastrun -= RUN_MASK; ++ for (; lastrun > 254 ; lastrun -= 255) ++ *op++ = 255; ++ *op++ = (u8)lastrun; ++ } else ++ *op++ = (lastrun << ML_BITS); ++ memcpy(op, anchor, iend - anchor); ++ op += iend - anchor; ++ ++ /* End */ ++ return (int)(((char *)op) - dest); ++} ++ ++static inline int lz4_compress64kctx(void *ctx, ++ const char *source, ++ char *dest, ++ int isize, ++ int maxoutputsize) ++{ ++ u16 *hashtable = (u16 *)ctx; ++ const u8 *ip = (u8 *) source; ++ const u8 *anchor = ip; ++ const u8 *const base = ip; ++ const u8 *const iend = ip + isize; ++ const u8 *const mflimit = iend - MFLIMIT; ++ #define MATCHLIMIT (iend - LASTLITERALS) ++ ++ u8 *op = (u8 *) dest; ++ u8 *const oend = op + maxoutputsize; ++ int len, length; ++ const int skipstrength = SKIPSTRENGTH; ++ u32 forwardh; ++ int lastrun; ++ ++ /* Init */ ++ if (isize < MINLENGTH) ++ goto _last_literals; ++ ++ memset((void *)hashtable, 0, LZ4_MEM_COMPRESS); ++ ++ /* First Byte */ ++ ip++; ++ forwardh = LZ4_HASH64K_VALUE(ip); ++ ++ /* Main Loop */ ++ for (;;) { ++ int findmatchattempts = (1U << skipstrength) + 3; ++ const u8 *forwardip = ip; ++ const u8 *ref; ++ u8 *token; ++ ++ /* Find a match */ ++ do { ++ u32 h = forwardh; ++ int step = findmatchattempts++ >> skipstrength; ++ ip = forwardip; ++ forwardip = ip + step; ++ ++ if (forwardip > mflimit) ++ goto _last_literals; ++ ++ forwardh = LZ4_HASH64K_VALUE(forwardip); ++ ref = base + hashtable[h]; ++ hashtable[h] = (u16)(ip - base); ++ } while (A32(ref) != A32(ip)); ++ ++ /* Catch up */ ++ while ((ip > anchor) && (ref > (u8 *)source) ++ && (ip[-1] == ref[-1])) { ++ ip--; ++ ref--; ++ } ++ ++ /* Encode Literal length */ ++ length = (int)(ip - anchor); ++ token = op++; ++ /* Check output limit */ ++ if (unlikely(op + length + (2 + 1 + LASTLITERALS) ++ + (length >> 8) > oend)) ++ return 0; ++ if (length >= (int)RUN_MASK) { ++ *token = (RUN_MASK << ML_BITS); ++ len = length - RUN_MASK; ++ for (; len > 254 ; len -= 255) ++ *op++ = 255; ++ *op++ = (u8)len; ++ } else ++ *token = (length << ML_BITS); ++ ++ /* Copy Literals */ ++ LZ4_BLINDCOPY(anchor, op, length); ++ ++_next_match: ++ /* Encode Offset */ ++ LZ4_WRITE_LITTLEENDIAN_16(op, (u16)(ip - ref)); ++ ++ /* Start Counting */ ++ ip += MINMATCH; ++ /* MinMatch verified */ ++ ref += MINMATCH; ++ anchor = ip; ++ ++ while (ip < MATCHLIMIT - (STEPSIZE - 1)) { ++ #if LZ4_ARCH64 ++ u64 diff = A64(ref) ^ A64(ip); ++ #else ++ u32 diff = A32(ref) ^ A32(ip); ++ #endif ++ ++ if (!diff) { ++ ip += STEPSIZE; ++ ref += STEPSIZE; ++ continue; ++ } ++ ip += LZ4_NBCOMMONBYTES(diff); ++ goto _endcount; ++ } ++ #if LZ4_ARCH64 ++ if ((ip < (MATCHLIMIT - 3)) && (A32(ref) == A32(ip))) { ++ ip += 4; ++ ref += 4; ++ } ++ #endif ++ if ((ip < (MATCHLIMIT - 1)) && (A16(ref) == A16(ip))) { ++ ip += 2; ++ ref += 2; ++ } ++ if ((ip < MATCHLIMIT) && (*ref == *ip)) ++ ip++; ++_endcount: ++ ++ /* Encode MatchLength */ ++ len = (int)(ip - anchor); ++ /* Check output limit */ ++ if (unlikely(op + (1 + LASTLITERALS) + (len >> 8) > oend)) ++ return 0; ++ if (len >= (int)ML_MASK) { ++ *token += ML_MASK; ++ len -= ML_MASK; ++ for (; len > 509 ; len -= 510) { ++ *op++ = 255; ++ *op++ = 255; ++ } ++ if (len > 254) { ++ len -= 255; ++ *op++ = 255; ++ } ++ *op++ = (u8)len; ++ } else ++ *token += len; ++ ++ /* Test end of chunk */ ++ if (ip > mflimit) { ++ anchor = ip; ++ break; ++ } ++ ++ /* Fill table */ ++ hashtable[LZ4_HASH64K_VALUE(ip-2)] = (u16)(ip - 2 - base); ++ ++ /* Test next position */ ++ ref = base + hashtable[LZ4_HASH64K_VALUE(ip)]; ++ hashtable[LZ4_HASH64K_VALUE(ip)] = (u16)(ip - base); ++ if (A32(ref) == A32(ip)) { ++ token = op++; ++ *token = 0; ++ goto _next_match; ++ } ++ ++ /* Prepare next loop */ ++ anchor = ip++; ++ forwardh = LZ4_HASH64K_VALUE(ip); ++ } ++ ++_last_literals: ++ /* Encode Last Literals */ ++ lastrun = (int)(iend - anchor); ++ if (op + lastrun + 1 + (lastrun - RUN_MASK + 255) / 255 > oend) ++ return 0; ++ if (lastrun >= (int)RUN_MASK) { ++ *op++ = (RUN_MASK << ML_BITS); ++ lastrun -= RUN_MASK; ++ for (; lastrun > 254 ; lastrun -= 255) ++ *op++ = 255; ++ *op++ = (u8)lastrun; ++ } else ++ *op++ = (lastrun << ML_BITS); ++ memcpy(op, anchor, iend - anchor); ++ op += iend - anchor; ++ /* End */ ++ return (int)(((char *)op) - dest); ++} ++ ++int lz4_compress(const unsigned char *src, size_t src_len, ++ unsigned char *dst, size_t *dst_len, void *wrkmem) ++{ ++ int ret = -1; ++ int out_len = 0; ++ ++ if (src_len < LZ4_64KLIMIT) ++ out_len = lz4_compress64kctx(wrkmem, src, dst, src_len, ++ lz4_compressbound(src_len)); ++ else ++ out_len = lz4_compressctx(wrkmem, src, dst, src_len, ++ lz4_compressbound(src_len)); ++ ++ if (out_len < 0) ++ goto exit; ++ ++ *dst_len = out_len; ++ ++ return 0; ++exit: ++ return ret; ++} ++EXPORT_SYMBOL_GPL(lz4_compress); ++ ++MODULE_LICENSE("GPL"); ++MODULE_DESCRIPTION("LZ4 compressor"); +diff --git a/lib/lz4/lz4defs.h b/lib/lz4/lz4defs.h +index 43ac31d..abcecdc 100644 +--- a/lib/lz4/lz4defs.h ++++ b/lib/lz4/lz4defs.h +@@ -22,23 +22,40 @@ + * Architecture-specific macros + */ + #define BYTE u8 ++typedef struct _U16_S { u16 v; } U16_S; ++typedef struct _U32_S { u32 v; } U32_S; ++typedef struct _U64_S { u64 v; } U64_S; + #if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) \ + || defined(CONFIG_ARM) && __LINUX_ARM_ARCH__ >= 6 \ + && defined(ARM_EFFICIENT_UNALIGNED_ACCESS) +-typedef struct _U32_S { u32 v; } U32_S; +-typedef struct _U64_S { u64 v; } U64_S; + ++#define A16(x) (((U16_S *)(x))->v) + #define A32(x) (((U32_S *)(x))->v) + #define A64(x) (((U64_S *)(x))->v) + + #define PUT4(s, d) (A32(d) = A32(s)) + #define PUT8(s, d) (A64(d) = A64(s)) ++#define LZ4_WRITE_LITTLEENDIAN_16(p, v) \ ++ do { \ ++ A16(p) = v; \ ++ p += 2; \ ++ } while (0) + #else /* CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS */ + ++#define A64(x) get_unaligned((u64 *)&(((U16_S *)(x))->v)) ++#define A32(x) get_unaligned((u32 *)&(((U16_S *)(x))->v)) ++#define A16(x) get_unaligned((u16 *)&(((U16_S *)(x))->v)) ++ + #define PUT4(s, d) \ + put_unaligned(get_unaligned((const u32 *) s), (u32 *) d) + #define PUT8(s, d) \ + put_unaligned(get_unaligned((const u64 *) s), (u64 *) d) ++ ++#define LZ4_WRITE_LITTLEENDIAN_16(p, v) \ ++ do { \ ++ put_unaligned(v, (u16 *)(p)); \ ++ p += 2; \ ++ } while (0) + #endif + + #define COPYLENGTH 8 +@@ -46,6 +63,29 @@ typedef struct _U64_S { u64 v; } U64_S; + #define ML_MASK ((1U << ML_BITS) - 1) + #define RUN_BITS (8 - ML_BITS) + #define RUN_MASK ((1U << RUN_BITS) - 1) ++#define MEMORY_USAGE 14 ++#define MINMATCH 4 ++#define SKIPSTRENGTH 6 ++#define LASTLITERALS 5 ++#define MFLIMIT (COPYLENGTH + MINMATCH) ++#define MINLENGTH (MFLIMIT + 1) ++#define MAXD_LOG 16 ++#define MAXD (1 << MAXD_LOG) ++#define MAXD_MASK (u32)(MAXD - 1) ++#define MAX_DISTANCE (MAXD - 1) ++#define HASH_LOG (MAXD_LOG - 1) ++#define HASHTABLESIZE (1 << HASH_LOG) ++#define MAX_NB_ATTEMPTS 256 ++#define OPTIMAL_ML (int)((ML_MASK-1)+MINMATCH) ++#define LZ4_64KLIMIT ((1<<16) + (MFLIMIT - 1)) ++#define HASHLOG64K ((MEMORY_USAGE - 2) + 1) ++#define HASH64KTABLESIZE (1U << HASHLOG64K) ++#define LZ4_HASH_VALUE(p) (((A32(p)) * 2654435761U) >> \ ++ ((MINMATCH * 8) - (MEMORY_USAGE-2))) ++#define LZ4_HASH64K_VALUE(p) (((A32(p)) * 2654435761U) >> \ ++ ((MINMATCH * 8) - HASHLOG64K)) ++#define HASH_VALUE(p) (((A32(p)) * 2654435761U) >> \ ++ ((MINMATCH * 8) - HASH_LOG)) + + #if LZ4_ARCH64/* 64-bit */ + #define STEPSIZE 8 +@@ -65,6 +105,13 @@ typedef struct _U64_S { u64 v; } U64_S; + LZ4_WILDCOPY(s, d, e); \ + } \ + } while (0) ++#define HTYPE u32 ++ ++#ifdef __BIG_ENDIAN ++#define LZ4_NBCOMMONBYTES(val) (__builtin_clzll(val) >> 3) ++#else ++#define LZ4_NBCOMMONBYTES(val) (__builtin_ctzll(val) >> 3) ++#endif + + #else /* 32-bit */ + #define STEPSIZE 4 +@@ -83,6 +130,14 @@ typedef struct _U64_S { u64 v; } U64_S; + } while (0) + + #define LZ4_SECURECOPY LZ4_WILDCOPY ++#define HTYPE const u8* ++ ++#ifdef __BIG_ENDIAN ++#define LZ4_NBCOMMONBYTES(val) (__builtin_clz(val) >> 3) ++#else ++#define LZ4_NBCOMMONBYTES(val) (__builtin_ctz(val) >> 3) ++#endif ++ + #endif + + #define LZ4_READ_LITTLEENDIAN_16(d, s, p) \ +@@ -92,3 +147,10 @@ typedef struct _U64_S { u64 v; } U64_S; + do { \ + LZ4_COPYPACKET(s, d); \ + } while (d < e) ++ ++#define LZ4_BLINDCOPY(s, d, l) \ ++ do { \ ++ u8 *e = (d) + l; \ ++ LZ4_WILDCOPY(s, d, e); \ ++ d = e; \ ++ } while (0) +diff --git a/lib/lz4/lz4hc_compress.c b/lib/lz4/lz4hc_compress.c +new file mode 100644 +index 0000000..eb1a74f +--- /dev/null ++++ b/lib/lz4/lz4hc_compress.c +@@ -0,0 +1,539 @@ ++/* ++ * LZ4 HC - High Compression Mode of LZ4 ++ * Copyright (C) 2011-2012, Yann Collet. ++ * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are ++ * met: ++ * ++ * * Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * * Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following disclaimer ++ * in the documentation and/or other materials provided with the ++ * distribution. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * You can contact the author at : ++ * - LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html ++ * - LZ4 source repository : http://code.google.com/p/lz4/ ++ * ++ * Changed for kernel use by: ++ * Chanho Min ++ */ ++ ++#include ++#include ++#include ++#include ++#include "lz4defs.h" ++ ++struct lz4hc_data { ++ const u8 *base; ++ HTYPE hashtable[HASHTABLESIZE]; ++ u16 chaintable[MAXD]; ++ const u8 *nexttoupdate; ++} __attribute__((__packed__)); ++ ++static inline int lz4hc_init(struct lz4hc_data *hc4, const u8 *base) ++{ ++ memset((void *)hc4->hashtable, 0, sizeof(hc4->hashtable)); ++ memset(hc4->chaintable, 0xFF, sizeof(hc4->chaintable)); ++ ++#if LZ4_ARCH64 ++ hc4->nexttoupdate = base + 1; ++#else ++ hc4->nexttoupdate = base; ++#endif ++ hc4->base = base; ++ return 1; ++} ++ ++/* Update chains up to ip (excluded) */ ++static inline void lz4hc_insert(struct lz4hc_data *hc4, const u8 *ip) ++{ ++ u16 *chaintable = hc4->chaintable; ++ HTYPE *hashtable = hc4->hashtable; ++#if LZ4_ARCH64 ++ const BYTE * const base = hc4->base; ++#else ++ const int base = 0; ++#endif ++ ++ while (hc4->nexttoupdate < ip) { ++ const u8 *p = hc4->nexttoupdate; ++ size_t delta = p - (hashtable[HASH_VALUE(p)] + base); ++ if (delta > MAX_DISTANCE) ++ delta = MAX_DISTANCE; ++ chaintable[(size_t)(p) & MAXD_MASK] = (u16)delta; ++ hashtable[HASH_VALUE(p)] = (p) - base; ++ hc4->nexttoupdate++; ++ } ++} ++ ++static inline size_t lz4hc_commonlength(const u8 *p1, const u8 *p2, ++ const u8 *const matchlimit) ++{ ++ const u8 *p1t = p1; ++ ++ while (p1t < matchlimit - (STEPSIZE - 1)) { ++#if LZ4_ARCH64 ++ u64 diff = A64(p2) ^ A64(p1t); ++#else ++ u32 diff = A32(p2) ^ A32(p1t); ++#endif ++ if (!diff) { ++ p1t += STEPSIZE; ++ p2 += STEPSIZE; ++ continue; ++ } ++ p1t += LZ4_NBCOMMONBYTES(diff); ++ return p1t - p1; ++ } ++#if LZ4_ARCH64 ++ if ((p1t < (matchlimit-3)) && (A32(p2) == A32(p1t))) { ++ p1t += 4; ++ p2 += 4; ++ } ++#endif ++ ++ if ((p1t < (matchlimit - 1)) && (A16(p2) == A16(p1t))) { ++ p1t += 2; ++ p2 += 2; ++ } ++ if ((p1t < matchlimit) && (*p2 == *p1t)) ++ p1t++; ++ return p1t - p1; ++} ++ ++static inline int lz4hc_insertandfindbestmatch(struct lz4hc_data *hc4, ++ const u8 *ip, const u8 *const matchlimit, const u8 **matchpos) ++{ ++ u16 *const chaintable = hc4->chaintable; ++ HTYPE *const hashtable = hc4->hashtable; ++ const u8 *ref; ++#if LZ4_ARCH64 ++ const BYTE * const base = hc4->base; ++#else ++ const int base = 0; ++#endif ++ int nbattempts = MAX_NB_ATTEMPTS; ++ size_t repl = 0, ml = 0; ++ u16 delta; ++ ++ /* HC4 match finder */ ++ lz4hc_insert(hc4, ip); ++ ref = hashtable[HASH_VALUE(ip)] + base; ++ ++ /* potential repetition */ ++ if (ref >= ip-4) { ++ /* confirmed */ ++ if (A32(ref) == A32(ip)) { ++ delta = (u16)(ip-ref); ++ repl = ml = lz4hc_commonlength(ip + MINMATCH, ++ ref + MINMATCH, matchlimit) + MINMATCH; ++ *matchpos = ref; ++ } ++ ref -= (size_t)chaintable[(size_t)(ref) & MAXD_MASK]; ++ } ++ ++ while ((ref >= ip - MAX_DISTANCE) && nbattempts) { ++ nbattempts--; ++ if (*(ref + ml) == *(ip + ml)) { ++ if (A32(ref) == A32(ip)) { ++ size_t mlt = ++ lz4hc_commonlength(ip + MINMATCH, ++ ref + MINMATCH, matchlimit) + MINMATCH; ++ if (mlt > ml) { ++ ml = mlt; ++ *matchpos = ref; ++ } ++ } ++ } ++ ref -= (size_t)chaintable[(size_t)(ref) & MAXD_MASK]; ++ } ++ ++ /* Complete table */ ++ if (repl) { ++ const BYTE *ptr = ip; ++ const BYTE *end; ++ end = ip + repl - (MINMATCH-1); ++ /* Pre-Load */ ++ while (ptr < end - delta) { ++ chaintable[(size_t)(ptr) & MAXD_MASK] = delta; ++ ptr++; ++ } ++ do { ++ chaintable[(size_t)(ptr) & MAXD_MASK] = delta; ++ /* Head of chain */ ++ hashtable[HASH_VALUE(ptr)] = (ptr) - base; ++ ptr++; ++ } while (ptr < end); ++ hc4->nexttoupdate = end; ++ } ++ ++ return (int)ml; ++} ++ ++static inline int lz4hc_insertandgetwidermatch(struct lz4hc_data *hc4, ++ const u8 *ip, const u8 *startlimit, const u8 *matchlimit, int longest, ++ const u8 **matchpos, const u8 **startpos) ++{ ++ u16 *const chaintable = hc4->chaintable; ++ HTYPE *const hashtable = hc4->hashtable; ++#if LZ4_ARCH64 ++ const BYTE * const base = hc4->base; ++#else ++ const int base = 0; ++#endif ++ const u8 *ref; ++ int nbattempts = MAX_NB_ATTEMPTS; ++ int delta = (int)(ip - startlimit); ++ ++ /* First Match */ ++ lz4hc_insert(hc4, ip); ++ ref = hashtable[HASH_VALUE(ip)] + base; ++ ++ while ((ref >= ip - MAX_DISTANCE) && (ref >= hc4->base) ++ && (nbattempts)) { ++ nbattempts--; ++ if (*(startlimit + longest) == *(ref - delta + longest)) { ++ if (A32(ref) == A32(ip)) { ++ const u8 *reft = ref + MINMATCH; ++ const u8 *ipt = ip + MINMATCH; ++ const u8 *startt = ip; ++ ++ while (ipt < matchlimit-(STEPSIZE - 1)) { ++ #if LZ4_ARCH64 ++ u64 diff = A64(reft) ^ A64(ipt); ++ #else ++ u32 diff = A32(reft) ^ A32(ipt); ++ #endif ++ ++ if (!diff) { ++ ipt += STEPSIZE; ++ reft += STEPSIZE; ++ continue; ++ } ++ ipt += LZ4_NBCOMMONBYTES(diff); ++ goto _endcount; ++ } ++ #if LZ4_ARCH64 ++ if ((ipt < (matchlimit - 3)) ++ && (A32(reft) == A32(ipt))) { ++ ipt += 4; ++ reft += 4; ++ } ++ ipt += 2; ++ #endif ++ if ((ipt < (matchlimit - 1)) ++ && (A16(reft) == A16(ipt))) { ++ reft += 2; ++ } ++ if ((ipt < matchlimit) && (*reft == *ipt)) ++ ipt++; ++_endcount: ++ reft = ref; ++ ++ while ((startt > startlimit) ++ && (reft > hc4->base) ++ && (startt[-1] == reft[-1])) { ++ startt--; ++ reft--; ++ } ++ ++ if ((ipt - startt) > longest) { ++ longest = (int)(ipt - startt); ++ *matchpos = reft; ++ *startpos = startt; ++ } ++ } ++ } ++ ref -= (size_t)chaintable[(size_t)(ref) & MAXD_MASK]; ++ } ++ return longest; ++} ++ ++static inline int lz4_encodesequence(const u8 **ip, u8 **op, const u8 **anchor, ++ int ml, const u8 *ref) ++{ ++ int length, len; ++ u8 *token; ++ ++ /* Encode Literal length */ ++ length = (int)(*ip - *anchor); ++ token = (*op)++; ++ if (length >= (int)RUN_MASK) { ++ *token = (RUN_MASK << ML_BITS); ++ len = length - RUN_MASK; ++ for (; len > 254 ; len -= 255) ++ *(*op)++ = 255; ++ *(*op)++ = (u8)len; ++ } else ++ *token = (length << ML_BITS); ++ ++ /* Copy Literals */ ++ LZ4_BLINDCOPY(*anchor, *op, length); ++ ++ /* Encode Offset */ ++ LZ4_WRITE_LITTLEENDIAN_16(*op, (u16)(*ip - ref)); ++ ++ /* Encode MatchLength */ ++ len = (int)(ml - MINMATCH); ++ if (len >= (int)ML_MASK) { ++ *token += ML_MASK; ++ len -= ML_MASK; ++ for (; len > 509 ; len -= 510) { ++ *(*op)++ = 255; ++ *(*op)++ = 255; ++ } ++ if (len > 254) { ++ len -= 255; ++ *(*op)++ = 255; ++ } ++ *(*op)++ = (u8)len; ++ } else ++ *token += len; ++ ++ /* Prepare next loop */ ++ *ip += ml; ++ *anchor = *ip; ++ ++ return 0; ++} ++ ++static int lz4_compresshcctx(struct lz4hc_data *ctx, ++ const char *source, ++ char *dest, ++ int isize) ++{ ++ const u8 *ip = (const u8 *)source; ++ const u8 *anchor = ip; ++ const u8 *const iend = ip + isize; ++ const u8 *const mflimit = iend - MFLIMIT; ++ const u8 *const matchlimit = (iend - LASTLITERALS); ++ ++ u8 *op = (u8 *)dest; ++ ++ int ml, ml2, ml3, ml0; ++ const u8 *ref = NULL; ++ const u8 *start2 = NULL; ++ const u8 *ref2 = NULL; ++ const u8 *start3 = NULL; ++ const u8 *ref3 = NULL; ++ const u8 *start0; ++ const u8 *ref0; ++ int lastrun; ++ ++ ip++; ++ ++ /* Main Loop */ ++ while (ip < mflimit) { ++ ml = lz4hc_insertandfindbestmatch(ctx, ip, matchlimit, (&ref)); ++ if (!ml) { ++ ip++; ++ continue; ++ } ++ ++ /* saved, in case we would skip too much */ ++ start0 = ip; ++ ref0 = ref; ++ ml0 = ml; ++_search2: ++ if (ip+ml < mflimit) ++ ml2 = lz4hc_insertandgetwidermatch(ctx, ip + ml - 2, ++ ip + 1, matchlimit, ml, &ref2, &start2); ++ else ++ ml2 = ml; ++ /* No better match */ ++ if (ml2 == ml) { ++ lz4_encodesequence(&ip, &op, &anchor, ml, ref); ++ continue; ++ } ++ ++ if (start0 < ip) { ++ /* empirical */ ++ if (start2 < ip + ml0) { ++ ip = start0; ++ ref = ref0; ++ ml = ml0; ++ } ++ } ++ /* ++ * Here, start0==ip ++ * First Match too small : removed ++ */ ++ if ((start2 - ip) < 3) { ++ ml = ml2; ++ ip = start2; ++ ref = ref2; ++ goto _search2; ++ } ++ ++_search3: ++ /* ++ * Currently we have : ++ * ml2 > ml1, and ++ * ip1+3 <= ip2 (usually < ip1+ml1) ++ */ ++ if ((start2 - ip) < OPTIMAL_ML) { ++ int correction; ++ int new_ml = ml; ++ if (new_ml > OPTIMAL_ML) ++ new_ml = OPTIMAL_ML; ++ if (ip + new_ml > start2 + ml2 - MINMATCH) ++ new_ml = (int)(start2 - ip) + ml2 - MINMATCH; ++ correction = new_ml - (int)(start2 - ip); ++ if (correction > 0) { ++ start2 += correction; ++ ref2 += correction; ++ ml2 -= correction; ++ } ++ } ++ /* ++ * Now, we have start2 = ip+new_ml, ++ * with new_ml=min(ml, OPTIMAL_ML=18) ++ */ ++ if (start2 + ml2 < mflimit) ++ ml3 = lz4hc_insertandgetwidermatch(ctx, ++ start2 + ml2 - 3, start2, matchlimit, ++ ml2, &ref3, &start3); ++ else ++ ml3 = ml2; ++ ++ /* No better match : 2 sequences to encode */ ++ if (ml3 == ml2) { ++ /* ip & ref are known; Now for ml */ ++ if (start2 < ip+ml) ++ ml = (int)(start2 - ip); ++ ++ /* Now, encode 2 sequences */ ++ lz4_encodesequence(&ip, &op, &anchor, ml, ref); ++ ip = start2; ++ lz4_encodesequence(&ip, &op, &anchor, ml2, ref2); ++ continue; ++ } ++ ++ /* Not enough space for match 2 : remove it */ ++ if (start3 < ip + ml + 3) { ++ /* ++ * can write Seq1 immediately ==> Seq2 is removed, ++ * so Seq3 becomes Seq1 ++ */ ++ if (start3 >= (ip + ml)) { ++ if (start2 < ip + ml) { ++ int correction = ++ (int)(ip + ml - start2); ++ start2 += correction; ++ ref2 += correction; ++ ml2 -= correction; ++ if (ml2 < MINMATCH) { ++ start2 = start3; ++ ref2 = ref3; ++ ml2 = ml3; ++ } ++ } ++ ++ lz4_encodesequence(&ip, &op, &anchor, ml, ref); ++ ip = start3; ++ ref = ref3; ++ ml = ml3; ++ ++ start0 = start2; ++ ref0 = ref2; ++ ml0 = ml2; ++ goto _search2; ++ } ++ ++ start2 = start3; ++ ref2 = ref3; ++ ml2 = ml3; ++ goto _search3; ++ } ++ ++ /* ++ * OK, now we have 3 ascending matches; let's write at least ++ * the first one ip & ref are known; Now for ml ++ */ ++ if (start2 < ip + ml) { ++ if ((start2 - ip) < (int)ML_MASK) { ++ int correction; ++ if (ml > OPTIMAL_ML) ++ ml = OPTIMAL_ML; ++ if (ip + ml > start2 + ml2 - MINMATCH) ++ ml = (int)(start2 - ip) + ml2 ++ - MINMATCH; ++ correction = ml - (int)(start2 - ip); ++ if (correction > 0) { ++ start2 += correction; ++ ref2 += correction; ++ ml2 -= correction; ++ } ++ } else ++ ml = (int)(start2 - ip); ++ } ++ lz4_encodesequence(&ip, &op, &anchor, ml, ref); ++ ++ ip = start2; ++ ref = ref2; ++ ml = ml2; ++ ++ start2 = start3; ++ ref2 = ref3; ++ ml2 = ml3; ++ ++ goto _search3; ++ } ++ ++ /* Encode Last Literals */ ++ lastrun = (int)(iend - anchor); ++ if (lastrun >= (int)RUN_MASK) { ++ *op++ = (RUN_MASK << ML_BITS); ++ lastrun -= RUN_MASK; ++ for (; lastrun > 254 ; lastrun -= 255) ++ *op++ = 255; ++ *op++ = (u8) lastrun; ++ } else ++ *op++ = (lastrun << ML_BITS); ++ memcpy(op, anchor, iend - anchor); ++ op += iend - anchor; ++ /* End */ ++ return (int) (((char *)op) - dest); ++} ++ ++int lz4hc_compress(const unsigned char *src, size_t src_len, ++ unsigned char *dst, size_t *dst_len, void *wrkmem) ++{ ++ int ret = -1; ++ int out_len = 0; ++ ++ struct lz4hc_data *hc4 = (struct lz4hc_data *)wrkmem; ++ lz4hc_init(hc4, (const u8 *)src); ++ out_len = lz4_compresshcctx((struct lz4hc_data *)hc4, (const u8 *)src, ++ (char *)dst, (int)src_len); ++ ++ if (out_len < 0) ++ goto exit; ++ ++ *dst_len = out_len; ++ return 0; ++ ++exit: ++ return ret; ++} ++EXPORT_SYMBOL_GPL(lz4hc_compress); ++ ++MODULE_LICENSE("GPL"); ++MODULE_DESCRIPTION("LZ4HC compressor"); +-- +1.9.0 + diff --git a/patches/btrfs/0004-lib-lz4-correct-the-LZ4-license.patch b/patches/btrfs/0004-lib-lz4-correct-the-LZ4-license.patch new file mode 100644 index 00000000..7b2ccfff --- /dev/null +++ b/patches/btrfs/0004-lib-lz4-correct-the-LZ4-license.patch @@ -0,0 +1,76 @@ +From 8ff39ecf8f01e8da68d190fa18f00685b0a1b3a1 Mon Sep 17 00:00:00 2001 +From: Richard Laager +Date: Thu, 22 Aug 2013 16:35:47 -0700 +Subject: [PATCH 04/11] lib/lz4: correct the LZ4 license + +The LZ4 code is listed as using the "BSD 2-Clause License". + +Signed-off-by: Richard Laager +Acked-by: Kyungsik Lee +Cc: Chanho Min +Cc: Richard Yao +Signed-off-by: Andrew Morton +[ The 2-clause BSD can be just converted into GPL, but that's rude and + pointless, so don't do it - Linus ] +Signed-off-by: Linus Torvalds +--- + lib/lz4/lz4_compress.c | 4 ++-- + lib/lz4/lz4_decompress.c | 6 +++--- + lib/lz4/lz4hc_compress.c | 4 ++-- + 3 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/lib/lz4/lz4_compress.c b/lib/lz4/lz4_compress.c +index fd94058..28321d8 100644 +--- a/lib/lz4/lz4_compress.c ++++ b/lib/lz4/lz4_compress.c +@@ -437,7 +437,7 @@ int lz4_compress(const unsigned char *src, size_t src_len, + exit: + return ret; + } +-EXPORT_SYMBOL_GPL(lz4_compress); ++EXPORT_SYMBOL(lz4_compress); + +-MODULE_LICENSE("GPL"); ++MODULE_LICENSE("Dual BSD/GPL"); + MODULE_DESCRIPTION("LZ4 compressor"); +diff --git a/lib/lz4/lz4_decompress.c b/lib/lz4/lz4_decompress.c +index d3414ea..411be80 100644 +--- a/lib/lz4/lz4_decompress.c ++++ b/lib/lz4/lz4_decompress.c +@@ -299,7 +299,7 @@ exit_0: + return ret; + } + #ifndef STATIC +-EXPORT_SYMBOL_GPL(lz4_decompress); ++EXPORT_SYMBOL(lz4_decompress); + #endif + + int lz4_decompress_unknownoutputsize(const char *src, size_t src_len, +@@ -319,8 +319,8 @@ exit_0: + return ret; + } + #ifndef STATIC +-EXPORT_SYMBOL_GPL(lz4_decompress_unknownoutputsize); ++EXPORT_SYMBOL(lz4_decompress_unknownoutputsize); + +-MODULE_LICENSE("GPL"); ++MODULE_LICENSE("Dual BSD/GPL"); + MODULE_DESCRIPTION("LZ4 Decompressor"); + #endif +diff --git a/lib/lz4/lz4hc_compress.c b/lib/lz4/lz4hc_compress.c +index eb1a74f..f344f76 100644 +--- a/lib/lz4/lz4hc_compress.c ++++ b/lib/lz4/lz4hc_compress.c +@@ -533,7 +533,7 @@ int lz4hc_compress(const unsigned char *src, size_t src_len, + exit: + return ret; + } +-EXPORT_SYMBOL_GPL(lz4hc_compress); ++EXPORT_SYMBOL(lz4hc_compress); + +-MODULE_LICENSE("GPL"); ++MODULE_LICENSE("Dual BSD/GPL"); + MODULE_DESCRIPTION("LZ4HC compressor"); +-- +1.9.0 + diff --git a/patches/btrfs/0005-lz4-fix-compression-decompression-signedness-mismatc.patch b/patches/btrfs/0005-lz4-fix-compression-decompression-signedness-mismatc.patch new file mode 100644 index 00000000..8cd7d6af --- /dev/null +++ b/patches/btrfs/0005-lz4-fix-compression-decompression-signedness-mismatc.patch @@ -0,0 +1,75 @@ +From 557f6709017d7c38f28167f28ade3f2668ba5f7b Mon Sep 17 00:00:00 2001 +From: Sergey Senozhatsky +Date: Wed, 11 Sep 2013 14:26:32 -0700 +Subject: [PATCH 05/11] lz4: fix compression/decompression signedness mismatch + +LZ4 compression and decompression functions require different in +signedness input/output parameters: unsigned char for compression and +signed char for decompression. + +Change decompression API to require "(const) unsigned char *". + +Signed-off-by: Sergey Senozhatsky +Cc: Kyungsik Lee +Cc: Geert Uytterhoeven +Cc: Yann Collet +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +--- + include/linux/lz4.h | 8 ++++---- + lib/lz4/lz4_decompress.c | 8 ++++---- + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/include/linux/lz4.h b/include/linux/lz4.h +index d21c13f..4356686 100644 +--- a/include/linux/lz4.h ++++ b/include/linux/lz4.h +@@ -67,8 +67,8 @@ int lz4hc_compress(const unsigned char *src, size_t src_len, + * note : Destination buffer must be already allocated. + * slightly faster than lz4_decompress_unknownoutputsize() + */ +-int lz4_decompress(const char *src, size_t *src_len, char *dest, +- size_t actual_dest_len); ++int lz4_decompress(const unsigned char *src, size_t *src_len, ++ unsigned char *dest, size_t actual_dest_len); + + /* + * lz4_decompress_unknownoutputsize() +@@ -82,6 +82,6 @@ int lz4_decompress(const char *src, size_t *src_len, char *dest, + * Error if return (< 0) + * note : Destination buffer must be already allocated. + */ +-int lz4_decompress_unknownoutputsize(const char *src, size_t src_len, +- char *dest, size_t *dest_len); ++int lz4_decompress_unknownoutputsize(const unsigned char *src, size_t src_len, ++ unsigned char *dest, size_t *dest_len); + #endif +diff --git a/lib/lz4/lz4_decompress.c b/lib/lz4/lz4_decompress.c +index 411be80..df6839e 100644 +--- a/lib/lz4/lz4_decompress.c ++++ b/lib/lz4/lz4_decompress.c +@@ -283,8 +283,8 @@ _output_error: + return (int) (-(((char *) ip) - source)); + } + +-int lz4_decompress(const char *src, size_t *src_len, char *dest, +- size_t actual_dest_len) ++int lz4_decompress(const unsigned char *src, size_t *src_len, ++ unsigned char *dest, size_t actual_dest_len) + { + int ret = -1; + int input_len = 0; +@@ -302,8 +302,8 @@ exit_0: + EXPORT_SYMBOL(lz4_decompress); + #endif + +-int lz4_decompress_unknownoutputsize(const char *src, size_t src_len, +- char *dest, size_t *dest_len) ++int lz4_decompress_unknownoutputsize(const unsigned char *src, size_t src_len, ++ unsigned char *dest, size_t *dest_len) + { + int ret = -1; + int out_len = 0; +-- +1.9.0 + diff --git a/patches/btrfs/0006-btrfs-prepare-incompat-flags-for-more-compression-me.patch b/patches/btrfs/0006-btrfs-prepare-incompat-flags-for-more-compression-me.patch new file mode 100644 index 00000000..9b48a36a --- /dev/null +++ b/patches/btrfs/0006-btrfs-prepare-incompat-flags-for-more-compression-me.patch @@ -0,0 +1,123 @@ +From b6a9b6766e8748145923087cd05efb86ee29fcf6 Mon Sep 17 00:00:00 2001 +From: David Sterba +Date: Wed, 25 Jan 2012 00:08:06 +0100 +Subject: [PATCH 06/11] btrfs: prepare incompat flags for more compression + methods + +Signed-off-by: David Sterba + +Conflicts: + fs/btrfs/ctree.h +--- + fs/btrfs/ctree.h | 16 ++++++---------- + fs/btrfs/disk-io.c | 2 ++ + fs/btrfs/ioctl.c | 3 +++ + fs/btrfs/super.c | 16 +++++++++++++++- + 4 files changed, 26 insertions(+), 11 deletions(-) + +diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h +index 547b7b0..192d5aa 100644 +--- a/fs/btrfs/ctree.h ++++ b/fs/btrfs/ctree.h +@@ -487,13 +487,7 @@ struct btrfs_super_block { + #define BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL (1ULL << 1) + #define BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS (1ULL << 2) + #define BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO (1ULL << 3) +-/* +- * some patches floated around with a second compression method +- * lets save that incompat here for when they do get in +- * Note we don't actually support it, we're just reserving the +- * number +- */ +-#define BTRFS_FEATURE_INCOMPAT_COMPRESS_LZOv2 (1ULL << 4) ++#define BTRFS_FEATURE_INCOMPAT_COMPRESS_LZ4 (1ULL << 4) + + /* + * older kernels tried to do bigger metadata blocks, but the +@@ -511,7 +505,8 @@ struct btrfs_super_block { + BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS | \ + BTRFS_FEATURE_INCOMPAT_BIG_METADATA | \ + BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO | \ +- BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF) ++ BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF | \ ++ BTRFS_FEATURE_INCOMPAT_COMPRESS_LZ4) + + /* + * A leaf is full of items. offset and size tell us where to find +@@ -676,8 +671,9 @@ enum btrfs_compression_type { + BTRFS_COMPRESS_NONE = 0, + BTRFS_COMPRESS_ZLIB = 1, + BTRFS_COMPRESS_LZO = 2, +- BTRFS_COMPRESS_TYPES = 2, +- BTRFS_COMPRESS_LAST = 3, ++ BTRFS_COMPRESS_LZ4 = 3, ++ BTRFS_COMPRESS_TYPES = 4, ++ BTRFS_COMPRESS_LAST = 4, + }; + + struct btrfs_inode_item { +diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c +index a8f652d..b72d3ce 100644 +--- a/fs/btrfs/disk-io.c ++++ b/fs/btrfs/disk-io.c +@@ -2246,6 +2246,8 @@ int open_ctree(struct super_block *sb, + features |= BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF; + if (tree_root->fs_info->compress_type == BTRFS_COMPRESS_LZO) + features |= BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO; ++ if (tree_root->fs_info->compress_type == BTRFS_COMPRESS_LZ4) ++ features |= BTRFS_FEATURE_INCOMPAT_COMPRESS_LZ4; + + /* + * flag our filesystem as having big metadata blocks if +diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c +index 338f259..2efe487 100644 +--- a/fs/btrfs/ioctl.c ++++ b/fs/btrfs/ioctl.c +@@ -1304,6 +1304,9 @@ int btrfs_defrag_file(struct inode *inode, struct file *file, + if (range->compress_type == BTRFS_COMPRESS_LZO) { + btrfs_set_fs_incompat(root->fs_info, COMPRESS_LZO); + } ++ if (range->compress_type == BTRFS_COMPRESS_LZ4) { ++ btrfs_set_fs_incompat(root->fs_info, COMPRESS_LZ4); ++ } + + ret = defrag_count; + +diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c +index d8982e9..43c5d79 100644 +--- a/fs/btrfs/super.c ++++ b/fs/btrfs/super.c +@@ -461,6 +461,16 @@ int btrfs_parse_options(struct btrfs_root *root, char *options) + btrfs_clear_opt(info->mount_opt, COMPRESS); + btrfs_clear_opt(info->mount_opt, FORCE_COMPRESS); + compress_force = false; ++ } else if (strcmp(args[0].from, "lz4") == 0) { ++ compress_type = "lz4"; ++ info->compress_type = BTRFS_COMPRESS_LZ4; ++ btrfs_set_opt(info->mount_opt, COMPRESS); ++ btrfs_clear_opt(info->mount_opt, NODATACOW); ++ btrfs_clear_opt(info->mount_opt, NODATASUM); ++ btrfs_set_fs_incompat(info, COMPRESS_LZ4); ++ /* remove when implemented */ ++ ret = -EINVAL; ++ goto out; + } else { + ret = -EINVAL; + goto out; +@@ -912,8 +922,12 @@ static int btrfs_show_options(struct seq_file *seq, struct dentry *dentry) + if (btrfs_test_opt(root, COMPRESS)) { + if (info->compress_type == BTRFS_COMPRESS_ZLIB) + compress_type = "zlib"; +- else ++ else if (info->compress_type == BTRFS_COMPRESS_LZ4) ++ compress_type = "lz4"; ++ else if (info->compress_type == BTRFS_COMPRESS_LZO) + compress_type = "lzo"; ++ else ++ compress_type = "none"; + if (btrfs_test_opt(root, FORCE_COMPRESS)) + seq_printf(seq, ",compress-force=%s", compress_type); + else +-- +1.9.0 + diff --git a/patches/btrfs/0007-btrfs-lz4-add-wrapper-functions-and-enable-it.patch b/patches/btrfs/0007-btrfs-lz4-add-wrapper-functions-and-enable-it.patch new file mode 100644 index 00000000..d7be212f --- /dev/null +++ b/patches/btrfs/0007-btrfs-lz4-add-wrapper-functions-and-enable-it.patch @@ -0,0 +1,510 @@ +From f7b9d5a5971f814eb73a9af6bbcc1427b77e0fe1 Mon Sep 17 00:00:00 2001 +From: David Sterba +Date: Mon, 13 Feb 2012 20:05:37 +0100 +Subject: [PATCH 07/11] btrfs: lz4: add wrapper functions and enable it + +Signed-off-by: David Sterba + +Conflicts: + fs/btrfs/Makefile +--- + fs/btrfs/Makefile | 3 +- + fs/btrfs/compression.c | 1 + + fs/btrfs/compression.h | 1 + + fs/btrfs/lz4_wrapper.c | 432 +++++++++++++++++++++++++++++++++++++++++++++++++ + fs/btrfs/super.c | 3 - + 5 files changed, 436 insertions(+), 4 deletions(-) + create mode 100644 fs/btrfs/lz4_wrapper.c + +diff --git a/fs/btrfs/Makefile b/fs/btrfs/Makefile +index 7df3e0f..ee3b13b 100644 +--- a/fs/btrfs/Makefile ++++ b/fs/btrfs/Makefile +@@ -8,7 +8,8 @@ btrfs-y += super.o ctree.o extent-tree.o print-tree.o root-tree.o dir-item.o \ + extent_io.o volumes.o async-thread.o ioctl.o locking.o orphan.o \ + export.o tree-log.o free-space-cache.o zlib.o lzo.o \ + compression.o delayed-ref.o relocation.o delayed-inode.o scrub.o \ +- reada.o backref.o ulist.o qgroup.o send.o dev-replace.o ++ reada.o backref.o ulist.o qgroup.o send.o dev-replace.o \ ++ lz4_wrapper.o + + btrfs-$(CONFIG_BTRFS_FS_POSIX_ACL) += acl.o + btrfs-$(CONFIG_BTRFS_FS_CHECK_INTEGRITY) += check-integrity.o +diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c +index 94ab2f8..32b2693 100644 +--- a/fs/btrfs/compression.c ++++ b/fs/btrfs/compression.c +@@ -742,6 +742,7 @@ static wait_queue_head_t comp_workspace_wait[BTRFS_COMPRESS_TYPES]; + struct btrfs_compress_op *btrfs_compress_op[] = { + &btrfs_zlib_compress, + &btrfs_lzo_compress, ++ &btrfs_lz4_compress, + }; + + void __init btrfs_init_compress(void) +diff --git a/fs/btrfs/compression.h b/fs/btrfs/compression.h +index 9afb0a6..12387ab 100644 +--- a/fs/btrfs/compression.h ++++ b/fs/btrfs/compression.h +@@ -79,5 +79,6 @@ struct btrfs_compress_op { + + extern struct btrfs_compress_op btrfs_zlib_compress; + extern struct btrfs_compress_op btrfs_lzo_compress; ++extern struct btrfs_compress_op btrfs_lz4_compress; + + #endif +diff --git a/fs/btrfs/lz4_wrapper.c b/fs/btrfs/lz4_wrapper.c +new file mode 100644 +index 0000000..6aa90a4 +--- /dev/null ++++ b/fs/btrfs/lz4_wrapper.c +@@ -0,0 +1,432 @@ ++/* ++ * Copyright (C) 2008 Oracle. All rights reserved. ++ * Copyright (C) 2013 SUSE. All rights reserved. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public ++ * License v2 as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public ++ * License along with this program; if not, write to the ++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ * Boston, MA 021110-1307, USA. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "compression.h" ++ ++#define LZ4_LEN 4 ++#define LZ4_CHUNK_SIZE (4096) ++#define LZ4_MAX_WORKBUF 2*LZ4_CHUNK_SIZE ++ ++struct workspace { ++ void *mem; /* work memory for compression */ ++ void *buf; /* where compressed data goes */ ++ void *cbuf; /* where decompressed data goes */ ++ struct list_head list; ++}; ++ ++static void lz4_free_workspace(struct list_head *ws) ++{ ++ struct workspace *workspace = list_entry(ws, struct workspace, list); ++ ++ vfree(workspace->buf); ++ vfree(workspace->cbuf); ++ vfree(workspace->mem); ++ kfree(workspace); ++} ++ ++static struct list_head *lz4_alloc_workspace(void) ++{ ++ struct workspace *workspace; ++ ++ workspace = kzalloc(sizeof(*workspace), GFP_NOFS); ++ if (!workspace) ++ return ERR_PTR(-ENOMEM); ++ ++ workspace->mem = vmalloc(LZ4_MEM_COMPRESS); ++ workspace->buf = vmalloc(LZ4_MAX_WORKBUF); ++ workspace->cbuf = vmalloc(LZ4_MAX_WORKBUF); ++ if (!workspace->mem || !workspace->buf || !workspace->cbuf) ++ goto fail; ++ ++ INIT_LIST_HEAD(&workspace->list); ++ ++ return &workspace->list; ++fail: ++ lz4_free_workspace(&workspace->list); ++ return ERR_PTR(-ENOMEM); ++} ++ ++static inline void write_compress_length(char *buf, size_t len) ++{ ++ __le32 dlen; ++ ++ dlen = cpu_to_le32(len); ++ memcpy(buf, &dlen, LZ4_LEN); ++} ++ ++static inline size_t read_compress_length(char *buf) ++{ ++ __le32 dlen; ++ ++ memcpy(&dlen, buf, LZ4_LEN); ++ return le32_to_cpu(dlen); ++} ++ ++static int lz4_compress_pages(struct list_head *ws, ++ struct address_space *mapping, ++ u64 start, unsigned long len, ++ struct page **pages, ++ unsigned long nr_dest_pages, ++ unsigned long *out_pages, ++ unsigned long *total_in, ++ unsigned long *total_out, ++ unsigned long max_out) ++{ ++ struct workspace *workspace = list_entry(ws, struct workspace, list); ++ int ret = 0; ++ char *data_in; ++ char *cpage_out; ++ int nr_pages = 0; ++ struct page *in_page = NULL; ++ struct page *out_page = NULL; ++ unsigned long bytes_left; ++ ++ size_t in_len; ++ size_t out_len; ++ char *buf; ++ unsigned long tot_in = 0; ++ unsigned long tot_out = 0; ++ unsigned long pg_bytes_left; ++ unsigned long out_offset; ++ unsigned long bytes; ++ ++ *out_pages = 0; ++ *total_out = 0; ++ *total_in = 0; ++ ++ in_page = find_get_page(mapping, start >> PAGE_CACHE_SHIFT); ++ data_in = kmap(in_page); ++ ++ /* ++ * store the size of all chunks of compressed data in ++ * the first 4 bytes ++ */ ++ out_page = alloc_page(GFP_NOFS | __GFP_HIGHMEM); ++ if (out_page == NULL) { ++ ret = -ENOMEM; ++ goto out; ++ } ++ cpage_out = kmap(out_page); ++ out_offset = LZ4_LEN; ++ tot_out = LZ4_LEN; ++ pages[0] = out_page; ++ nr_pages = 1; ++ pg_bytes_left = PAGE_CACHE_SIZE - LZ4_LEN; ++ ++ /* compress at most one page of data each time */ ++ in_len = min(len, PAGE_CACHE_SIZE); ++ while (tot_in < len) { ++ ret = lz4_compress(data_in, in_len, workspace->cbuf, &out_len, ++ workspace->mem); ++ if (ret < 0) { ++ printk(KERN_DEBUG ++ "btrfs: lz4 compress in loop returned %d\n", ++ ret); ++ ret = -1; ++ goto out; ++ } ++ ++ /* store the size of this chunk of compressed data */ ++ write_compress_length(cpage_out + out_offset, out_len); ++ tot_out += LZ4_LEN; ++ out_offset += LZ4_LEN; ++ pg_bytes_left -= LZ4_LEN; ++ ++ tot_in += in_len; ++ tot_out += out_len; ++ ++ /* copy bytes from the working buffer into the pages */ ++ buf = workspace->cbuf; ++ while (out_len) { ++ bytes = min_t(unsigned long, pg_bytes_left, out_len); ++ ++ memcpy(cpage_out + out_offset, buf, bytes); ++ ++ out_len -= bytes; ++ pg_bytes_left -= bytes; ++ buf += bytes; ++ out_offset += bytes; ++ ++ /* ++ * we need another page for writing out. ++ * ++ * Note if there's less than 4 bytes left, we just ++ * skip to a new page. ++ */ ++ if ((out_len == 0 && pg_bytes_left < LZ4_LEN) || ++ pg_bytes_left == 0) { ++ if (pg_bytes_left) { ++ memset(cpage_out + out_offset, 0, ++ pg_bytes_left); ++ tot_out += pg_bytes_left; ++ } ++ ++ /* we're done, don't allocate new page */ ++ if (out_len == 0 && tot_in >= len) ++ break; ++ ++ kunmap(out_page); ++ if (nr_pages == nr_dest_pages) { ++ out_page = NULL; ++ ret = -1; ++ goto out; ++ } ++ ++ out_page = alloc_page(GFP_NOFS | __GFP_HIGHMEM); ++ if (out_page == NULL) { ++ ret = -ENOMEM; ++ goto out; ++ } ++ cpage_out = kmap(out_page); ++ pages[nr_pages++] = out_page; ++ ++ pg_bytes_left = PAGE_CACHE_SIZE; ++ out_offset = 0; ++ } ++ } ++ ++ /* we're making it bigger, give up */ ++ if (tot_in > 8192 && tot_in < tot_out) ++ goto out; ++ ++ /* we're all done */ ++ if (tot_in >= len) ++ break; ++ ++ if (tot_out > max_out) ++ break; ++ ++ bytes_left = len - tot_in; ++ kunmap(in_page); ++ page_cache_release(in_page); ++ ++ start += PAGE_CACHE_SIZE; ++ in_page = find_get_page(mapping, start >> PAGE_CACHE_SHIFT); ++ data_in = kmap(in_page); ++ in_len = min(bytes_left, PAGE_CACHE_SIZE); ++ } ++ ++ if (tot_out > tot_in) ++ goto out; ++ ++ /* store the size of all chunks of compressed data */ ++ cpage_out = kmap(pages[0]); ++ write_compress_length(cpage_out, tot_out); ++ ++ kunmap(pages[0]); ++ ++ ret = 0; ++ *total_out = tot_out; ++ *total_in = tot_in; ++out: ++ *out_pages = nr_pages; ++ if (out_page) ++ kunmap(out_page); ++ ++ if (in_page) { ++ kunmap(in_page); ++ page_cache_release(in_page); ++ } ++ ++ return ret; ++} ++ ++static int lz4_decompress_biovec(struct list_head *ws, ++ struct page **pages_in, ++ u64 disk_start, ++ struct bio_vec *bvec, ++ int vcnt, ++ size_t srclen) ++{ ++ struct workspace *workspace = list_entry(ws, struct workspace, list); ++ int ret = 0, ret2; ++ char *data_in; ++ unsigned long page_in_index = 0; ++ unsigned long page_out_index = 0; ++ unsigned long total_pages_in = (srclen + PAGE_CACHE_SIZE - 1) / ++ PAGE_CACHE_SIZE; ++ unsigned long buf_start; ++ unsigned long buf_offset = 0; ++ unsigned long bytes; ++ unsigned long working_bytes; ++ unsigned long pg_offset; ++ ++ size_t in_len; ++ size_t out_len; ++ unsigned long in_offset; ++ unsigned long in_page_bytes_left; ++ unsigned long tot_in; ++ unsigned long tot_out; ++ unsigned long tot_len; ++ char *buf; ++ bool may_late_unmap, need_unmap; ++ ++ data_in = kmap(pages_in[0]); ++ tot_len = read_compress_length(data_in); ++ ++ tot_in = LZ4_LEN; ++ in_offset = LZ4_LEN; ++ tot_len = min_t(size_t, srclen, tot_len); ++ in_page_bytes_left = PAGE_CACHE_SIZE - LZ4_LEN; ++ ++ tot_out = 0; ++ pg_offset = 0; ++ ++ while (tot_in < tot_len) { ++ in_len = read_compress_length(data_in + in_offset); ++ in_page_bytes_left -= LZ4_LEN; ++ in_offset += LZ4_LEN; ++ tot_in += LZ4_LEN; ++ ++ tot_in += in_len; ++ working_bytes = in_len; ++ may_late_unmap = need_unmap = false; ++ ++ /* fast path: avoid using the working buffer */ ++ if (in_page_bytes_left >= in_len) { ++ buf = data_in + in_offset; ++ bytes = in_len; ++ may_late_unmap = true; ++ goto cont; ++ } ++ ++ /* copy bytes from the pages into the working buffer */ ++ buf = workspace->cbuf; ++ buf_offset = 0; ++ while (working_bytes) { ++ bytes = min(working_bytes, in_page_bytes_left); ++ ++ memcpy(buf + buf_offset, data_in + in_offset, bytes); ++ buf_offset += bytes; ++cont: ++ working_bytes -= bytes; ++ in_page_bytes_left -= bytes; ++ in_offset += bytes; ++ ++ /* check if we need to pick another page */ ++ if ((working_bytes == 0 && in_page_bytes_left < LZ4_LEN) ++ || in_page_bytes_left == 0) { ++ tot_in += in_page_bytes_left; ++ ++ if (working_bytes == 0 && tot_in >= tot_len) ++ break; ++ ++ if (page_in_index + 1 >= total_pages_in) { ++ ret = -1; ++ goto done; ++ } ++ ++ if (may_late_unmap) ++ need_unmap = true; ++ else ++ kunmap(pages_in[page_in_index]); ++ ++ data_in = kmap(pages_in[++page_in_index]); ++ ++ in_page_bytes_left = PAGE_CACHE_SIZE; ++ in_offset = 0; ++ } ++ } ++ ++ out_len = LZ4_CHUNK_SIZE; ++ ret = lz4_decompress_unknownoutputsize(buf, in_len, workspace->buf, ++ &out_len); ++ if (need_unmap) ++ kunmap(pages_in[page_in_index - 1]); ++ if (ret < 0) { ++ printk(KERN_WARNING "btrfs: lz4 decompress failed\n"); ++ ret = -1; ++ break; ++ } ++ ++ buf_start = tot_out; ++ tot_out += out_len; ++ ++ ret2 = btrfs_decompress_buf2page(workspace->buf, buf_start, ++ tot_out, disk_start, ++ bvec, vcnt, ++ &page_out_index, &pg_offset); ++ if (ret2 == 0) ++ break; ++ } ++done: ++ kunmap(pages_in[page_in_index]); ++ return ret; ++} ++ ++static int lz4_decompress_wrapper(struct list_head *ws, unsigned char *data_in, ++ struct page *dest_page, ++ unsigned long start_byte, ++ size_t srclen, size_t destlen) ++{ ++ struct workspace *workspace = list_entry(ws, struct workspace, list); ++ size_t in_len; ++ size_t out_len; ++ size_t tot_len; ++ int ret = 0; ++ char *kaddr; ++ unsigned long bytes; ++ ++ BUG_ON(srclen < LZ4_LEN); ++ ++ tot_len = read_compress_length(data_in); ++ data_in += LZ4_LEN; ++ ++ in_len = read_compress_length(data_in); ++ data_in += LZ4_LEN; ++ ++ out_len = LZ4_CHUNK_SIZE; ++ ret = lz4_decompress_unknownoutputsize(data_in, in_len, workspace->buf, ++ &out_len); ++ if (ret < 0) { ++ printk(KERN_WARNING "btrfs: lz4 decompress failed\n"); ++ ret = -1; ++ goto out; ++ } ++ ++ if (out_len < start_byte) { ++ ret = -1; ++ goto out; ++ } ++ ++ bytes = min_t(unsigned long, destlen, out_len - start_byte); ++ ++ kaddr = kmap_atomic(dest_page); ++ memcpy(kaddr, workspace->buf + start_byte, bytes); ++ kunmap_atomic(kaddr); ++out: ++ return ret; ++} ++ ++struct btrfs_compress_op btrfs_lz4_compress = { ++ .alloc_workspace = lz4_alloc_workspace, ++ .free_workspace = lz4_free_workspace, ++ .compress_pages = lz4_compress_pages, ++ .decompress_biovec = lz4_decompress_biovec, ++ .decompress = lz4_decompress_wrapper, ++}; +diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c +index 43c5d79..b577699 100644 +--- a/fs/btrfs/super.c ++++ b/fs/btrfs/super.c +@@ -468,9 +468,6 @@ int btrfs_parse_options(struct btrfs_root *root, char *options) + btrfs_clear_opt(info->mount_opt, NODATACOW); + btrfs_clear_opt(info->mount_opt, NODATASUM); + btrfs_set_fs_incompat(info, COMPRESS_LZ4); +- /* remove when implemented */ +- ret = -EINVAL; +- goto out; + } else { + ret = -EINVAL; + goto out; +-- +1.9.0 + diff --git a/patches/btrfs/0008-btrfs-add-lz4hc-incompat-bits.patch b/patches/btrfs/0008-btrfs-add-lz4hc-incompat-bits.patch new file mode 100644 index 00000000..e876f4e2 --- /dev/null +++ b/patches/btrfs/0008-btrfs-add-lz4hc-incompat-bits.patch @@ -0,0 +1,91 @@ +From 28b2cede446e68adb6caf3b808960110509a9c2c Mon Sep 17 00:00:00 2001 +From: David Sterba +Date: Tue, 24 Apr 2012 12:00:04 +0200 +Subject: [PATCH 08/11] btrfs: add lz4hc incompat bits + +Signed-off-by: David Sterba +--- + fs/btrfs/ctree.h | 5 +++-- + fs/btrfs/disk-io.c | 4 +++- + fs/btrfs/ioctl.c | 3 ++- + fs/btrfs/super.c | 12 ++++++++++++ + 4 files changed, 20 insertions(+), 4 deletions(-) + +diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h +index 192d5aa..9f8bfb9 100644 +--- a/fs/btrfs/ctree.h ++++ b/fs/btrfs/ctree.h +@@ -672,8 +672,9 @@ enum btrfs_compression_type { + BTRFS_COMPRESS_ZLIB = 1, + BTRFS_COMPRESS_LZO = 2, + BTRFS_COMPRESS_LZ4 = 3, +- BTRFS_COMPRESS_TYPES = 4, +- BTRFS_COMPRESS_LAST = 4, ++ BTRFS_COMPRESS_LZ4HC = 4, ++ BTRFS_COMPRESS_TYPES = 5, ++ BTRFS_COMPRESS_LAST = 5, + }; + + struct btrfs_inode_item { +diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c +index b72d3ce..3870a763 100644 +--- a/fs/btrfs/disk-io.c ++++ b/fs/btrfs/disk-io.c +@@ -2246,7 +2246,9 @@ int open_ctree(struct super_block *sb, + features |= BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF; + if (tree_root->fs_info->compress_type == BTRFS_COMPRESS_LZO) + features |= BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO; +- if (tree_root->fs_info->compress_type == BTRFS_COMPRESS_LZ4) ++ ++ if (tree_root->fs_info->compress_type == BTRFS_COMPRESS_LZ4 || ++ tree_root->fs_info->compress_type == BTRFS_COMPRESS_LZ4HC) + features |= BTRFS_FEATURE_INCOMPAT_COMPRESS_LZ4; + + /* +diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c +index 2efe487..caf305e 100644 +--- a/fs/btrfs/ioctl.c ++++ b/fs/btrfs/ioctl.c +@@ -1304,7 +1304,8 @@ int btrfs_defrag_file(struct inode *inode, struct file *file, + if (range->compress_type == BTRFS_COMPRESS_LZO) { + btrfs_set_fs_incompat(root->fs_info, COMPRESS_LZO); + } +- if (range->compress_type == BTRFS_COMPRESS_LZ4) { ++ if (range->compress_type == BTRFS_COMPRESS_LZ4 || ++ range->compress_type == BTRFS_COMPRESS_LZ4HC) { + btrfs_set_fs_incompat(root->fs_info, COMPRESS_LZ4); + } + +diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c +index b577699..363148d 100644 +--- a/fs/btrfs/super.c ++++ b/fs/btrfs/super.c +@@ -468,6 +468,16 @@ int btrfs_parse_options(struct btrfs_root *root, char *options) + btrfs_clear_opt(info->mount_opt, NODATACOW); + btrfs_clear_opt(info->mount_opt, NODATASUM); + btrfs_set_fs_incompat(info, COMPRESS_LZ4); ++ } else if (strcmp(args[0].from, "lz4hc") == 0) { ++ compress_type = "lz4hc"; ++ info->compress_type = BTRFS_COMPRESS_LZ4HC; ++ btrfs_set_opt(info->mount_opt, COMPRESS); ++ btrfs_clear_opt(info->mount_opt, NODATACOW); ++ btrfs_clear_opt(info->mount_opt, NODATASUM); ++ btrfs_set_fs_incompat(info, COMPRESS_LZ4); ++ /* Remove when enabled */ ++ ret = -EINVAL; ++ goto out; + } else { + ret = -EINVAL; + goto out; +@@ -921,6 +931,8 @@ static int btrfs_show_options(struct seq_file *seq, struct dentry *dentry) + compress_type = "zlib"; + else if (info->compress_type == BTRFS_COMPRESS_LZ4) + compress_type = "lz4"; ++ else if (info->compress_type == BTRFS_COMPRESS_LZ4HC) ++ compress_type = "lz4hc"; + else if (info->compress_type == BTRFS_COMPRESS_LZO) + compress_type = "lzo"; + else +-- +1.9.0 + diff --git a/patches/btrfs/0009-btrfs-add-lz4hc-wrapper-and-enable-it.patch b/patches/btrfs/0009-btrfs-add-lz4hc-wrapper-and-enable-it.patch new file mode 100644 index 00000000..98945937 --- /dev/null +++ b/patches/btrfs/0009-btrfs-add-lz4hc-wrapper-and-enable-it.patch @@ -0,0 +1,274 @@ +From 1a050f0d42c7214a620b3d2d6e052767cdc537dd Mon Sep 17 00:00:00 2001 +From: David Sterba +Date: Tue, 24 Apr 2012 13:41:45 +0200 +Subject: [PATCH 09/11] btrfs: add lz4hc wrapper and enable it + +Signed-off-by: David Sterba +--- + fs/btrfs/compression.c | 1 + + fs/btrfs/compression.h | 1 + + fs/btrfs/lz4_wrapper.c | 199 +++++++++++++++++++++++++++++++++++++++++++++++++ + fs/btrfs/super.c | 3 - + 4 files changed, 201 insertions(+), 3 deletions(-) + +diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c +index 32b2693..bb3bf65 100644 +--- a/fs/btrfs/compression.c ++++ b/fs/btrfs/compression.c +@@ -743,6 +743,7 @@ struct btrfs_compress_op *btrfs_compress_op[] = { + &btrfs_zlib_compress, + &btrfs_lzo_compress, + &btrfs_lz4_compress, ++ &btrfs_lz4hc_compress, + }; + + void __init btrfs_init_compress(void) +diff --git a/fs/btrfs/compression.h b/fs/btrfs/compression.h +index 12387ab..2a43913 100644 +--- a/fs/btrfs/compression.h ++++ b/fs/btrfs/compression.h +@@ -80,5 +80,6 @@ struct btrfs_compress_op { + extern struct btrfs_compress_op btrfs_zlib_compress; + extern struct btrfs_compress_op btrfs_lzo_compress; + extern struct btrfs_compress_op btrfs_lz4_compress; ++extern struct btrfs_compress_op btrfs_lz4hc_compress; + + #endif +diff --git a/fs/btrfs/lz4_wrapper.c b/fs/btrfs/lz4_wrapper.c +index 6aa90a4..b9d3273 100644 +--- a/fs/btrfs/lz4_wrapper.c ++++ b/fs/btrfs/lz4_wrapper.c +@@ -71,6 +71,28 @@ fail: + return ERR_PTR(-ENOMEM); + } + ++static struct list_head *lz4hc_alloc_workspace(void) ++{ ++ struct workspace *workspace; ++ ++ workspace = kzalloc(sizeof(*workspace), GFP_NOFS); ++ if (!workspace) ++ return ERR_PTR(-ENOMEM); ++ ++ workspace->mem = vmalloc(LZ4HC_MEM_COMPRESS); ++ workspace->buf = vmalloc(LZ4_MAX_WORKBUF); ++ workspace->cbuf = vmalloc(LZ4_MAX_WORKBUF); ++ if (!workspace->mem || !workspace->buf || !workspace->cbuf) ++ goto fail; ++ ++ INIT_LIST_HEAD(&workspace->list); ++ ++ return &workspace->list; ++fail: ++ lz4_free_workspace(&workspace->list); ++ return ERR_PTR(-ENOMEM); ++} ++ + static inline void write_compress_length(char *buf, size_t len) + { + __le32 dlen; +@@ -255,6 +277,175 @@ out: + + return ret; + } ++static int lz4hc_compress_pages(struct list_head *ws, ++ struct address_space *mapping, ++ u64 start, unsigned long len, ++ struct page **pages, ++ unsigned long nr_dest_pages, ++ unsigned long *out_pages, ++ unsigned long *total_in, ++ unsigned long *total_out, ++ unsigned long max_out) ++{ ++ struct workspace *workspace = list_entry(ws, struct workspace, list); ++ int ret = 0; ++ char *data_in; ++ char *cpage_out; ++ int nr_pages = 0; ++ struct page *in_page = NULL; ++ struct page *out_page = NULL; ++ unsigned long bytes_left; ++ ++ size_t in_len; ++ size_t out_len; ++ char *buf; ++ unsigned long tot_in = 0; ++ unsigned long tot_out = 0; ++ unsigned long pg_bytes_left; ++ unsigned long out_offset; ++ unsigned long bytes; ++ ++ *out_pages = 0; ++ *total_out = 0; ++ *total_in = 0; ++ ++ in_page = find_get_page(mapping, start >> PAGE_CACHE_SHIFT); ++ data_in = kmap(in_page); ++ ++ /* ++ * store the size of all chunks of compressed data in ++ * the first 4 bytes ++ */ ++ out_page = alloc_page(GFP_NOFS | __GFP_HIGHMEM); ++ if (out_page == NULL) { ++ ret = -ENOMEM; ++ goto out; ++ } ++ cpage_out = kmap(out_page); ++ out_offset = LZ4_LEN; ++ tot_out = LZ4_LEN; ++ pages[0] = out_page; ++ nr_pages = 1; ++ pg_bytes_left = PAGE_CACHE_SIZE - LZ4_LEN; ++ ++ /* compress at most one page of data each time */ ++ in_len = min(len, PAGE_CACHE_SIZE); ++ while (tot_in < len) { ++ out_len = LZ4_CHUNK_SIZE; ++ ret = lz4hc_compress(data_in, in_len, workspace->cbuf, ++ &out_len, workspace->mem); ++ if (ret < 0) { ++ printk(KERN_DEBUG ++ "btrfs: lz4hc compress in loop returned %d\n", ++ ret); ++ ret = -1; ++ goto out; ++ } ++ ++ /* store the size of this chunk of compressed data */ ++ write_compress_length(cpage_out + out_offset, out_len); ++ tot_out += LZ4_LEN; ++ out_offset += LZ4_LEN; ++ pg_bytes_left -= LZ4_LEN; ++ ++ tot_in += in_len; ++ tot_out += out_len; ++ ++ /* copy bytes from the working buffer into the pages */ ++ buf = workspace->cbuf; ++ while (out_len) { ++ bytes = min_t(unsigned long, pg_bytes_left, out_len); ++ ++ memcpy(cpage_out + out_offset, buf, bytes); ++ ++ out_len -= bytes; ++ pg_bytes_left -= bytes; ++ buf += bytes; ++ out_offset += bytes; ++ ++ /* ++ * we need another page for writing out. ++ * ++ * Note if there's less than 4 bytes left, we just ++ * skip to a new page. ++ */ ++ if ((out_len == 0 && pg_bytes_left < LZ4_LEN) || ++ pg_bytes_left == 0) { ++ if (pg_bytes_left) { ++ memset(cpage_out + out_offset, 0, ++ pg_bytes_left); ++ tot_out += pg_bytes_left; ++ } ++ ++ /* we're done, don't allocate new page */ ++ if (out_len == 0 && tot_in >= len) ++ break; ++ ++ kunmap(out_page); ++ if (nr_pages == nr_dest_pages) { ++ out_page = NULL; ++ ret = -1; ++ goto out; ++ } ++ ++ out_page = alloc_page(GFP_NOFS | __GFP_HIGHMEM); ++ if (out_page == NULL) { ++ ret = -ENOMEM; ++ goto out; ++ } ++ cpage_out = kmap(out_page); ++ pages[nr_pages++] = out_page; ++ ++ pg_bytes_left = PAGE_CACHE_SIZE; ++ out_offset = 0; ++ } ++ } ++ ++ /* we're making it bigger, give up */ ++ if (tot_in > 8192 && tot_in < tot_out) ++ goto out; ++ ++ /* we're all done */ ++ if (tot_in >= len) ++ break; ++ ++ if (tot_out > max_out) ++ break; ++ ++ bytes_left = len - tot_in; ++ kunmap(in_page); ++ page_cache_release(in_page); ++ ++ start += PAGE_CACHE_SIZE; ++ in_page = find_get_page(mapping, start >> PAGE_CACHE_SHIFT); ++ data_in = kmap(in_page); ++ in_len = min(bytes_left, PAGE_CACHE_SIZE); ++ } ++ ++ if (tot_out > tot_in) ++ goto out; ++ ++ /* store the size of all chunks of compressed data */ ++ cpage_out = kmap(pages[0]); ++ write_compress_length(cpage_out, tot_out); ++ ++ kunmap(pages[0]); ++ ++ ret = 0; ++ *total_out = tot_out; ++ *total_in = tot_in; ++out: ++ *out_pages = nr_pages; ++ if (out_page) ++ kunmap(out_page); ++ ++ if (in_page) { ++ kunmap(in_page); ++ page_cache_release(in_page); ++ } ++ ++ return ret; ++} + + static int lz4_decompress_biovec(struct list_head *ws, + struct page **pages_in, +@@ -430,3 +621,11 @@ struct btrfs_compress_op btrfs_lz4_compress = { + .decompress_biovec = lz4_decompress_biovec, + .decompress = lz4_decompress_wrapper, + }; ++ ++struct btrfs_compress_op btrfs_lz4hc_compress = { ++ .alloc_workspace = lz4hc_alloc_workspace, ++ .free_workspace = lz4_free_workspace, ++ .compress_pages = lz4hc_compress_pages, ++ .decompress_biovec = lz4_decompress_biovec, ++ .decompress = lz4_decompress_wrapper, ++}; +diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c +index 363148d..e3e1d50 100644 +--- a/fs/btrfs/super.c ++++ b/fs/btrfs/super.c +@@ -475,9 +475,6 @@ int btrfs_parse_options(struct btrfs_root *root, char *options) + btrfs_clear_opt(info->mount_opt, NODATACOW); + btrfs_clear_opt(info->mount_opt, NODATASUM); + btrfs_set_fs_incompat(info, COMPRESS_LZ4); +- /* Remove when enabled */ +- ret = -EINVAL; +- goto out; + } else { + ret = -EINVAL; + goto out; +-- +1.9.0 + diff --git a/patches/btrfs/0010-btrfs-reduce-duplicate-code-in-lz4_wrapper.c.patch b/patches/btrfs/0010-btrfs-reduce-duplicate-code-in-lz4_wrapper.c.patch new file mode 100644 index 00000000..abda86f9 --- /dev/null +++ b/patches/btrfs/0010-btrfs-reduce-duplicate-code-in-lz4_wrapper.c.patch @@ -0,0 +1,301 @@ +From c53e88a0a8c33ded82a7449ba66e70a7be1306fd Mon Sep 17 00:00:00 2001 +From: Andrew Mahone +Date: Fri, 1 Jun 2012 21:17:18 -0400 +Subject: [PATCH 10/11] btrfs: reduce duplicate code in lz4_wrapper.c + +Add generic functions for compress_pages and alloc that accept an argument to +enable high compression, and replace the lz4/lz4hc variants of both with +wrappers for these. + +Signed-off-by: Andrew Mahone +Signed-off-by: David Sterba +--- + fs/btrfs/lz4_wrapper.c | 220 +++++++++---------------------------------------- + 1 file changed, 38 insertions(+), 182 deletions(-) + +diff --git a/fs/btrfs/lz4_wrapper.c b/fs/btrfs/lz4_wrapper.c +index b9d3273..919fb10 100644 +--- a/fs/btrfs/lz4_wrapper.c ++++ b/fs/btrfs/lz4_wrapper.c +@@ -49,7 +49,7 @@ static void lz4_free_workspace(struct list_head *ws) + kfree(workspace); + } + +-static struct list_head *lz4_alloc_workspace(void) ++static struct list_head *lz4_alloc_workspace_generic(int hi) + { + struct workspace *workspace; + +@@ -57,7 +57,10 @@ static struct list_head *lz4_alloc_workspace(void) + if (!workspace) + return ERR_PTR(-ENOMEM); + +- workspace->mem = vmalloc(LZ4_MEM_COMPRESS); ++ if (hi) ++ workspace->mem = vmalloc(LZ4HC_MEM_COMPRESS); ++ else ++ workspace->mem = vmalloc(LZ4_MEM_COMPRESS); + workspace->buf = vmalloc(LZ4_MAX_WORKBUF); + workspace->cbuf = vmalloc(LZ4_MAX_WORKBUF); + if (!workspace->mem || !workspace->buf || !workspace->cbuf) +@@ -71,26 +74,14 @@ fail: + return ERR_PTR(-ENOMEM); + } + +-static struct list_head *lz4hc_alloc_workspace(void) ++static struct list_head *lz4_alloc_workspace(void) + { +- struct workspace *workspace; +- +- workspace = kzalloc(sizeof(*workspace), GFP_NOFS); +- if (!workspace) +- return ERR_PTR(-ENOMEM); +- +- workspace->mem = vmalloc(LZ4HC_MEM_COMPRESS); +- workspace->buf = vmalloc(LZ4_MAX_WORKBUF); +- workspace->cbuf = vmalloc(LZ4_MAX_WORKBUF); +- if (!workspace->mem || !workspace->buf || !workspace->cbuf) +- goto fail; +- +- INIT_LIST_HEAD(&workspace->list); ++ return lz4_alloc_workspace_generic(0); ++} + +- return &workspace->list; +-fail: +- lz4_free_workspace(&workspace->list); +- return ERR_PTR(-ENOMEM); ++static struct list_head *lz4hc_alloc_workspace(void) ++{ ++ return lz4_alloc_workspace_generic(1); + } + + static inline void write_compress_length(char *buf, size_t len) +@@ -109,7 +100,7 @@ static inline size_t read_compress_length(char *buf) + return le32_to_cpu(dlen); + } + +-static int lz4_compress_pages(struct list_head *ws, ++static int lz4_compress_pages_generic(struct list_head *ws, + struct address_space *mapping, + u64 start, unsigned long len, + struct page **pages, +@@ -117,7 +108,7 @@ static int lz4_compress_pages(struct list_head *ws, + unsigned long *out_pages, + unsigned long *total_in, + unsigned long *total_out, +- unsigned long max_out) ++ unsigned long max_out, int hi) + { + struct workspace *workspace = list_entry(ws, struct workspace, list); + int ret = 0; +@@ -163,8 +154,12 @@ static int lz4_compress_pages(struct list_head *ws, + /* compress at most one page of data each time */ + in_len = min(len, PAGE_CACHE_SIZE); + while (tot_in < len) { +- ret = lz4_compress(data_in, in_len, workspace->cbuf, &out_len, +- workspace->mem); ++ if (hi) ++ ret = lz4hc_compress(data_in, in_len, workspace->cbuf, ++ &out_len, workspace->mem); ++ else ++ ret = lz4_compress(data_in, in_len, workspace->cbuf, &out_len, ++ workspace->mem); + if (ret < 0) { + printk(KERN_DEBUG + "btrfs: lz4 compress in loop returned %d\n", +@@ -277,7 +272,8 @@ out: + + return ret; + } +-static int lz4hc_compress_pages(struct list_head *ws, ++ ++static int lz4_compress_pages(struct list_head *ws, + struct address_space *mapping, + u64 start, unsigned long len, + struct page **pages, +@@ -287,164 +283,24 @@ static int lz4hc_compress_pages(struct list_head *ws, + unsigned long *total_out, + unsigned long max_out) + { +- struct workspace *workspace = list_entry(ws, struct workspace, list); +- int ret = 0; +- char *data_in; +- char *cpage_out; +- int nr_pages = 0; +- struct page *in_page = NULL; +- struct page *out_page = NULL; +- unsigned long bytes_left; +- +- size_t in_len; +- size_t out_len; +- char *buf; +- unsigned long tot_in = 0; +- unsigned long tot_out = 0; +- unsigned long pg_bytes_left; +- unsigned long out_offset; +- unsigned long bytes; +- +- *out_pages = 0; +- *total_out = 0; +- *total_in = 0; +- +- in_page = find_get_page(mapping, start >> PAGE_CACHE_SHIFT); +- data_in = kmap(in_page); +- +- /* +- * store the size of all chunks of compressed data in +- * the first 4 bytes +- */ +- out_page = alloc_page(GFP_NOFS | __GFP_HIGHMEM); +- if (out_page == NULL) { +- ret = -ENOMEM; +- goto out; +- } +- cpage_out = kmap(out_page); +- out_offset = LZ4_LEN; +- tot_out = LZ4_LEN; +- pages[0] = out_page; +- nr_pages = 1; +- pg_bytes_left = PAGE_CACHE_SIZE - LZ4_LEN; +- +- /* compress at most one page of data each time */ +- in_len = min(len, PAGE_CACHE_SIZE); +- while (tot_in < len) { +- out_len = LZ4_CHUNK_SIZE; +- ret = lz4hc_compress(data_in, in_len, workspace->cbuf, +- &out_len, workspace->mem); +- if (ret < 0) { +- printk(KERN_DEBUG +- "btrfs: lz4hc compress in loop returned %d\n", +- ret); +- ret = -1; +- goto out; +- } +- +- /* store the size of this chunk of compressed data */ +- write_compress_length(cpage_out + out_offset, out_len); +- tot_out += LZ4_LEN; +- out_offset += LZ4_LEN; +- pg_bytes_left -= LZ4_LEN; +- +- tot_in += in_len; +- tot_out += out_len; +- +- /* copy bytes from the working buffer into the pages */ +- buf = workspace->cbuf; +- while (out_len) { +- bytes = min_t(unsigned long, pg_bytes_left, out_len); +- +- memcpy(cpage_out + out_offset, buf, bytes); +- +- out_len -= bytes; +- pg_bytes_left -= bytes; +- buf += bytes; +- out_offset += bytes; +- +- /* +- * we need another page for writing out. +- * +- * Note if there's less than 4 bytes left, we just +- * skip to a new page. +- */ +- if ((out_len == 0 && pg_bytes_left < LZ4_LEN) || +- pg_bytes_left == 0) { +- if (pg_bytes_left) { +- memset(cpage_out + out_offset, 0, +- pg_bytes_left); +- tot_out += pg_bytes_left; +- } +- +- /* we're done, don't allocate new page */ +- if (out_len == 0 && tot_in >= len) +- break; +- +- kunmap(out_page); +- if (nr_pages == nr_dest_pages) { +- out_page = NULL; +- ret = -1; +- goto out; +- } +- +- out_page = alloc_page(GFP_NOFS | __GFP_HIGHMEM); +- if (out_page == NULL) { +- ret = -ENOMEM; +- goto out; +- } +- cpage_out = kmap(out_page); +- pages[nr_pages++] = out_page; +- +- pg_bytes_left = PAGE_CACHE_SIZE; +- out_offset = 0; +- } +- } +- +- /* we're making it bigger, give up */ +- if (tot_in > 8192 && tot_in < tot_out) +- goto out; +- +- /* we're all done */ +- if (tot_in >= len) +- break; +- +- if (tot_out > max_out) +- break; +- +- bytes_left = len - tot_in; +- kunmap(in_page); +- page_cache_release(in_page); +- +- start += PAGE_CACHE_SIZE; +- in_page = find_get_page(mapping, start >> PAGE_CACHE_SHIFT); +- data_in = kmap(in_page); +- in_len = min(bytes_left, PAGE_CACHE_SIZE); +- } +- +- if (tot_out > tot_in) +- goto out; +- +- /* store the size of all chunks of compressed data */ +- cpage_out = kmap(pages[0]); +- write_compress_length(cpage_out, tot_out); +- +- kunmap(pages[0]); +- +- ret = 0; +- *total_out = tot_out; +- *total_in = tot_in; +-out: +- *out_pages = nr_pages; +- if (out_page) +- kunmap(out_page); +- +- if (in_page) { +- kunmap(in_page); +- page_cache_release(in_page); +- } ++ return lz4_compress_pages_generic(ws, mapping, start, len, pages, ++ nr_dest_pages, out_pages, total_in, total_out, ++ max_out, 0); ++} + +- return ret; ++static int lz4hc_compress_pages(struct list_head *ws, ++ struct address_space *mapping, ++ u64 start, unsigned long len, ++ struct page **pages, ++ unsigned long nr_dest_pages, ++ unsigned long *out_pages, ++ unsigned long *total_in, ++ unsigned long *total_out, ++ unsigned long max_out) ++{ ++ return lz4_compress_pages_generic(ws, mapping, start, len, pages, ++ nr_dest_pages, out_pages, total_in, total_out, ++ max_out, 1); + } + + static int lz4_decompress_biovec(struct list_head *ws, +-- +1.9.0 + diff --git a/patches/btrfs/0011-btrfs-select-LZ4-HC-libs.patch b/patches/btrfs/0011-btrfs-select-LZ4-HC-libs.patch new file mode 100644 index 00000000..28577087 --- /dev/null +++ b/patches/btrfs/0011-btrfs-select-LZ4-HC-libs.patch @@ -0,0 +1,28 @@ +From 8646fdcb04d9ea272cd269c8eff87c78ba857823 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Tue, 24 Dec 2013 21:34:19 +0100 +Subject: [PATCH 11/11] btrfs: select LZ4(HC) libs + +Signed-off-by: Koen Kooi +--- + fs/btrfs/Kconfig | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/fs/btrfs/Kconfig b/fs/btrfs/Kconfig +index d33f01c..2ca44d9 100644 +--- a/fs/btrfs/Kconfig ++++ b/fs/btrfs/Kconfig +@@ -6,6 +6,10 @@ config BTRFS_FS + select ZLIB_DEFLATE + select LZO_COMPRESS + select LZO_DECOMPRESS ++ select LZ4_COMPRESS ++ select LZ4_DECOMPRESS ++ select LZ4HC_COMPRESS ++ select LZ4HC_DECOMPRESS + help + Btrfs is a new filesystem with extents, writable snapshotting, + support for multiple devices and many more features. +-- +1.9.0 + diff --git a/patches/build/0001-ARM-force-march-armv7a-for-thumb2-builds-http-lists..patch b/patches/build/0001-ARM-force-march-armv7a-for-thumb2-builds-http-lists..patch index df9f5201..ad882166 100644 --- a/patches/build/0001-ARM-force-march-armv7a-for-thumb2-builds-http-lists..patch +++ b/patches/build/0001-ARM-force-march-armv7a-for-thumb2-builds-http-lists..patch @@ -1,4 +1,4 @@ -From e8bc6c171e36914eba0e708f01ca88ecd7c5e28f Mon Sep 17 00:00:00 2001 +From 8604ce4a118fa7200ec79009c6db5144e3015b5b Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 3 Apr 2013 09:36:21 +0200 Subject: [PATCH 1/4] ARM: force -march=armv7a for thumb2 builds - @@ -6,7 +6,7 @@ Subject: [PATCH 1/4] ARM: force -march=armv7a for thumb2 builds - Signed-off-by: Koen Kooi --- - arch/arm/boot/compressed/Makefile | 2 +- + arch/arm/boot/compressed/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile @@ -23,5 +23,5 @@ index 5cad8a6..12edc8c 100644 # Supply kernel BSS size to the decompressor via a linker symbol. KBSS_SZ = $(shell $(CROSS_COMPILE)size $(obj)/../../../../vmlinux | \ -- -1.7.9.5 +1.9.0 diff --git a/patches/build/0002-headers_install-Fix-build-failures-on-deep-directory.patch b/patches/build/0002-headers_install-Fix-build-failures-on-deep-directory.patch index 1a3ae76c..6a6dd1da 100644 --- a/patches/build/0002-headers_install-Fix-build-failures-on-deep-directory.patch +++ b/patches/build/0002-headers_install-Fix-build-failures-on-deep-directory.patch @@ -1,4 +1,4 @@ -From 09e1ca60deab0081a7aa3986acc4f4e46a3aa73c Mon Sep 17 00:00:00 2001 +From d9518fd8cd0ae97290965d620f0e08162f97910b Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Mon, 8 Apr 2013 19:45:48 +0000 Subject: [PATCH 2/4] headers_install: Fix build failures on deep directory @@ -9,7 +9,7 @@ Fix using intermediate file lists in /tmp + xargs (but crud is left in /tmp) Signed-off-by: Pantelis Antoniou --- - scripts/Makefile.headersinst | 18 ++++++++++++------ + scripts/Makefile.headersinst | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst @@ -56,5 +56,5 @@ index e253917..c399133 100644 PHONY += __headersinst __headerscheck -- -1.7.9.5 +1.9.0 diff --git a/patches/build/0003-libtraceevent-Remove-hard-coded-include-to-usr-local.patch b/patches/build/0003-libtraceevent-Remove-hard-coded-include-to-usr-local.patch index f0dbd5cb..fbae7933 100644 --- a/patches/build/0003-libtraceevent-Remove-hard-coded-include-to-usr-local.patch +++ b/patches/build/0003-libtraceevent-Remove-hard-coded-include-to-usr-local.patch @@ -1,4 +1,4 @@ -From e5350c2252ec0ee4cd6702e25a0ec9facc0c15d3 Mon Sep 17 00:00:00 2001 +From 9829d6ba2dde17e2a17f8b2624746e89cfe5b6c9 Mon Sep 17 00:00:00 2001 From: Jack Mitchell Date: Fri, 8 Mar 2013 11:21:52 +0000 Subject: [PATCH 3/4] libtraceevent: Remove hard coded include to @@ -16,7 +16,7 @@ Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1362741712-21308-1-git-send-email-ml@communistcode.co.uk Signed-off-by: Arnaldo Carvalho de Melo --- - tools/lib/traceevent/Makefile | 2 +- + tools/lib/traceevent/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile @@ -33,5 +33,5 @@ index a20e320..0b0a907 100644 # Set compile option CFLAGS if not set elsewhere CFLAGS ?= -g -Wall -- -1.7.9.5 +1.9.0 diff --git a/patches/build/0004-Make-single-.dtb-targets-also-with-DTC_FLAGS.patch b/patches/build/0004-Make-single-.dtb-targets-also-with-DTC_FLAGS.patch index 379932f5..85bddc35 100644 --- a/patches/build/0004-Make-single-.dtb-targets-also-with-DTC_FLAGS.patch +++ b/patches/build/0004-Make-single-.dtb-targets-also-with-DTC_FLAGS.patch @@ -1,10 +1,10 @@ -From 5b329d94f63cb40ed122a729572ca81c56b06d34 Mon Sep 17 00:00:00 2001 +From ac153f6f2f9ce06e48cbbf85e2df9d9b35b5551d Mon Sep 17 00:00:00 2001 From: Phil Eichinger Date: Wed, 5 Jun 2013 15:32:04 +0200 Subject: [PATCH 4/4] Make single .dtb targets also with DTC_FLAGS --- - arch/arm/Makefile | 2 +- + arch/arm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/Makefile b/arch/arm/Makefile @@ -21,5 +21,5 @@ index e9729a4..d5935c0 100644 dtbs: scripts $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) DTC_FLAGS=$(DTC_FLAGS) dtbs -- -1.7.9.5 +1.9.0 diff --git a/patches/camera/0001-soc_camera-QL-mt9l112-camera-driver-for-the-beaglebo.patch b/patches/camera/0001-soc_camera-QL-mt9l112-camera-driver-for-the-beaglebo.patch index 9295f4e4..4470da76 100644 --- a/patches/camera/0001-soc_camera-QL-mt9l112-camera-driver-for-the-beaglebo.patch +++ b/patches/camera/0001-soc_camera-QL-mt9l112-camera-driver-for-the-beaglebo.patch @@ -1,24 +1,23 @@ -From ce75378696601abd9efe9b7a247f81de0c8b6413 Mon Sep 17 00:00:00 2001 +From 56c53229111cf2ea5f817352ccfdb836a9c86f00 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 1 May 2013 17:43:32 +0300 -Subject: [PATCH 01/10] soc_camera: QL/mt9l112 camera driver for the - beaglebone +Subject: [PATCH 01/10] soc_camera: QL/mt9l112 camera driver for the beaglebone Driver for the Quicklogic camera cape. Signed-off-by: Pantelis Antoniou --- - drivers/media/platform/soc_camera/Kconfig | 7 + + drivers/media/platform/soc_camera/Kconfig | 6 + drivers/media/platform/soc_camera/Makefile | 1 + - drivers/media/platform/soc_camera/cssp_camera.c | 1560 +++++++++++++++++++++++ - 3 files changed, 1568 insertions(+) + drivers/media/platform/soc_camera/cssp_camera.c | 1559 +++++++++++++++++++++++ + 3 files changed, 1566 insertions(+) create mode 100644 drivers/media/platform/soc_camera/cssp_camera.c diff --git a/drivers/media/platform/soc_camera/Kconfig b/drivers/media/platform/soc_camera/Kconfig -index cb6791e..06baabf 100644 +index cb6791e..d1e5759 100644 --- a/drivers/media/platform/soc_camera/Kconfig +++ b/drivers/media/platform/soc_camera/Kconfig -@@ -86,3 +86,10 @@ config VIDEO_ATMEL_ISI +@@ -86,3 +86,9 @@ config VIDEO_ATMEL_ISI This module makes the ATMEL Image Sensor Interface available as a v4l2 device. @@ -28,7 +27,6 @@ index cb6791e..06baabf 100644 + select VIDEOBUF2_DMA_CONTIG + ---help--- + This is a v4l2 driver for the QuickLogic CAMIF controller. -+ diff --git a/drivers/media/platform/soc_camera/Makefile b/drivers/media/platform/soc_camera/Makefile index 136b7f8..d7ba0eb 100644 --- a/drivers/media/platform/soc_camera/Makefile @@ -42,10 +40,10 @@ index 136b7f8..d7ba0eb 100644 ccflags-y += -I$(srctree)/drivers/media/i2c/soc_camera diff --git a/drivers/media/platform/soc_camera/cssp_camera.c b/drivers/media/platform/soc_camera/cssp_camera.c new file mode 100644 -index 0000000..41de42e +index 0000000..1a57055 --- /dev/null +++ b/drivers/media/platform/soc_camera/cssp_camera.c -@@ -0,0 +1,1560 @@ +@@ -0,0 +1,1559 @@ +/* + * cssp-camera driver + * @@ -1605,7 +1603,6 @@ index 0000000..41de42e +MODULE_LICENSE("GPLv2"); +MODULE_AUTHOR("Dan Aizenstros, Damian Eppel, Przemek Szewczyk"); +MODULE_DESCRIPTION("QuickLogic Camera Interface driver"); -+ -- -1.7.9.5 +1.9.0 diff --git a/patches/camera/0002-capes-Add-BB-BONE-CAM3-cape.patch b/patches/camera/0002-capes-Add-BB-BONE-CAM3-cape.patch index ef6d0129..0b365189 100644 --- a/patches/camera/0002-capes-Add-BB-BONE-CAM3-cape.patch +++ b/patches/camera/0002-capes-Add-BB-BONE-CAM3-cape.patch @@ -1,4 +1,4 @@ -From a8d2d1046394d9650b2ddf73913425663c7ba9aa Mon Sep 17 00:00:00 2001 +From 5c40942782bf48120c55f92b3bbb658365d60bde Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 1 May 2013 16:51:56 +0300 Subject: [PATCH 02/10] capes: Add BB-BONE-CAM3 cape @@ -7,7 +7,7 @@ Add the cape definition for the CAM3 cape Signed-off-by: Pantelis Antoniou --- - firmware/capes/BB-BONE-CAM3-01-00A2.dts | 184 +++++++++++++++++++++++++++++++ + firmware/capes/BB-BONE-CAM3-01-00A2.dts | 184 ++++++++++++++++++++++++++++++++ 1 file changed, 184 insertions(+) create mode 100644 firmware/capes/BB-BONE-CAM3-01-00A2.dts @@ -202,5 +202,5 @@ index 0000000..97bdcfd + +}; -- -1.7.9.5 +1.9.0 diff --git a/patches/camera/0003-cssp_camera-Correct-license-identifier.patch b/patches/camera/0003-cssp_camera-Correct-license-identifier.patch index dcaba111..b6cd0418 100644 --- a/patches/camera/0003-cssp_camera-Correct-license-identifier.patch +++ b/patches/camera/0003-cssp_camera-Correct-license-identifier.patch @@ -1,4 +1,4 @@ -From c9a1395918308a0bd133b2ec565626fc74005d0c Mon Sep 17 00:00:00 2001 +From 5af3050e27fe834e7d3cb9926764a528a16bd3df Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 1 May 2013 20:49:48 +0300 Subject: [PATCH 03/10] cssp_camera: Correct license identifier @@ -7,14 +7,14 @@ GPLv2 != GPL v2 for license reasons Signed-off-by: Pantelis Antoniou --- - drivers/media/platform/soc_camera/cssp_camera.c | 2 +- + drivers/media/platform/soc_camera/cssp_camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/soc_camera/cssp_camera.c b/drivers/media/platform/soc_camera/cssp_camera.c -index 41de42e..0bc6a28 100644 +index 1a57055..e1bc1e5 100644 --- a/drivers/media/platform/soc_camera/cssp_camera.c +++ b/drivers/media/platform/soc_camera/cssp_camera.c -@@ -1554,7 +1554,7 @@ module_platform_driver(cssp_cam_driver); +@@ -1554,6 +1554,6 @@ module_platform_driver(cssp_cam_driver); /* * Macros sets license, author and description */ @@ -22,7 +22,6 @@ index 41de42e..0bc6a28 100644 +MODULE_LICENSE("GPL v2"); MODULE_AUTHOR("Dan Aizenstros, Damian Eppel, Przemek Szewczyk"); MODULE_DESCRIPTION("QuickLogic Camera Interface driver"); - -- -1.7.9.5 +1.9.0 diff --git a/patches/camera/0004-cssp_camera-increase-delays-make-sensor-detection-wo.patch b/patches/camera/0004-cssp_camera-increase-delays-make-sensor-detection-wo.patch index 832009ac..910535a3 100644 --- a/patches/camera/0004-cssp_camera-increase-delays-make-sensor-detection-wo.patch +++ b/patches/camera/0004-cssp_camera-increase-delays-make-sensor-detection-wo.patch @@ -1,16 +1,16 @@ -From c743b0446eae317138b06e215cb7f3f769418053 Mon Sep 17 00:00:00 2001 +From 9ad5fcdc3554d5cbb6611e0c342121fc76b8b992 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 2 May 2013 12:06:12 +0200 -Subject: [PATCH 04/10] cssp_camera: increase delays make sensor detection - work better +Subject: [PATCH 04/10] cssp_camera: increase delays make sensor detection work + better Signed-off-by: Koen Kooi --- - drivers/media/platform/soc_camera/cssp_camera.c | 4 ++-- + drivers/media/platform/soc_camera/cssp_camera.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/soc_camera/cssp_camera.c b/drivers/media/platform/soc_camera/cssp_camera.c -index 0bc6a28..0a0cd8f 100644 +index e1bc1e5..4202096 100644 --- a/drivers/media/platform/soc_camera/cssp_camera.c +++ b/drivers/media/platform/soc_camera/cssp_camera.c @@ -471,7 +471,7 @@ static int configure_camera_sensor(struct cssp_cam_dev *cam) @@ -32,5 +32,5 @@ index 0bc6a28..0a0cd8f 100644 v4l2_subdev_call(cam->subdev, video, s_stream, 1); -- -1.7.9.5 +1.9.0 diff --git a/patches/camera/0005-mt9t112-forward-port-optimizations-from-Angstrom-3.2.patch b/patches/camera/0005-mt9t112-forward-port-optimizations-from-Angstrom-3.2.patch index 48871b9d..86260992 100644 --- a/patches/camera/0005-mt9t112-forward-port-optimizations-from-Angstrom-3.2.patch +++ b/patches/camera/0005-mt9t112-forward-port-optimizations-from-Angstrom-3.2.patch @@ -1,4 +1,4 @@ -From f15e79980c2154b0ade90efd49140004a3e6ae51 Mon Sep 17 00:00:00 2001 +From 068cba75eb8dc336976b224cdb22e533bcc8b9ff Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 2 May 2013 12:06:27 +0200 Subject: [PATCH 05/10] mt9t112: forward port optimizations from Angstrom 3.2 @@ -6,8 +6,8 @@ Subject: [PATCH 05/10] mt9t112: forward port optimizations from Angstrom 3.2 Signed-off-by: Koen Kooi --- - drivers/media/i2c/soc_camera/mt9t112.c | 502 +++++++++++++++++++++++++++++++- - include/media/mt9t112.h | 2 + + drivers/media/i2c/soc_camera/mt9t112.c | 502 ++++++++++++++++++++++++++++++++- + include/media/mt9t112.h | 2 + 2 files changed, 502 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/soc_camera/mt9t112.c b/drivers/media/i2c/soc_camera/mt9t112.c @@ -586,5 +586,5 @@ index a43c74a..bab2746 100644 struct mt9t112_pll_divider { u8 m, n; -- -1.7.9.5 +1.9.0 diff --git a/patches/camera/0006-cssp_camera-Use-flip-if-available.patch b/patches/camera/0006-cssp_camera-Use-flip-if-available.patch index fa35b86f..c9ca5550 100644 --- a/patches/camera/0006-cssp_camera-Use-flip-if-available.patch +++ b/patches/camera/0006-cssp_camera-Use-flip-if-available.patch @@ -1,15 +1,15 @@ -From f987bdcc03cd3dbbe9f5a7562b606811192c0a0e Mon Sep 17 00:00:00 2001 +From 3393f4822a61f55746badbb472fbfc2dc839fee6 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Thu, 2 May 2013 14:16:40 +0300 Subject: [PATCH 06/10] cssp_camera: Use flip if available. Signed-off-by: Pantelis Antoniou --- - drivers/media/platform/soc_camera/cssp_camera.c | 19 ++++++++----------- + drivers/media/platform/soc_camera/cssp_camera.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/media/platform/soc_camera/cssp_camera.c b/drivers/media/platform/soc_camera/cssp_camera.c -index 0a0cd8f..788acc4 100644 +index 4202096..ece8b39 100644 --- a/drivers/media/platform/soc_camera/cssp_camera.c +++ b/drivers/media/platform/soc_camera/cssp_camera.c @@ -16,7 +16,7 @@ @@ -35,10 +35,10 @@ index 0a0cd8f..788acc4 100644 - * val &= ~MT9T112_FLAG_VFLIP - */ +#ifdef MT9T112_FLAG_VFLIP -+ if (ret) -+ val |= MT9T112_FLAG_VFLIP; -+ else -+ val &= ~MT9T112_FLAG_VFLIP; ++ if (ret) ++ val |= MT9T112_FLAG_VFLIP; ++ else ++ val &= ~MT9T112_FLAG_VFLIP; +#endif } pstore->mt9t111_cam_info.flags = val; @@ -53,5 +53,5 @@ index 0a0cd8f..788acc4 100644 devm_kfree(dev, pstore); -- -1.7.9.5 +1.9.0 diff --git a/patches/camera/0007-cssp_camera-Fix-it-for-small-resolutions.patch b/patches/camera/0007-cssp_camera-Fix-it-for-small-resolutions.patch index ae69d74e..08177366 100644 --- a/patches/camera/0007-cssp_camera-Fix-it-for-small-resolutions.patch +++ b/patches/camera/0007-cssp_camera-Fix-it-for-small-resolutions.patch @@ -1,4 +1,4 @@ -From 3d2af27387ce9a7372c466be65ce5eced9a1e2cb Mon Sep 17 00:00:00 2001 +From ef350600cf4b94250f116aa21611cec410948081 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Thu, 9 May 2013 23:01:53 +0300 Subject: [PATCH 07/10] cssp_camera: Fix it for small resolutions @@ -7,11 +7,11 @@ This should make it work reliably for resolutions up to 1024x768 1280x960 and higher hang, or crash.. --- - drivers/media/platform/soc_camera/cssp_camera.c | 567 +++++++++++++++++------ + drivers/media/platform/soc_camera/cssp_camera.c | 567 +++++++++++++++++------- 1 file changed, 415 insertions(+), 152 deletions(-) diff --git a/drivers/media/platform/soc_camera/cssp_camera.c b/drivers/media/platform/soc_camera/cssp_camera.c -index 788acc4..62d8702 100644 +index ece8b39..c0f3e6e 100644 --- a/drivers/media/platform/soc_camera/cssp_camera.c +++ b/drivers/media/platform/soc_camera/cssp_camera.c @@ -53,13 +53,12 @@ static unsigned int vid_limit = 6; @@ -255,7 +255,7 @@ index 788acc4..62d8702 100644 + + // dump_slot(dev, ch, "q"); + -+ /* ++ /* + param->a_b_cnt = ACNT(dev->dma_req_len) | BCNT(bytesperline / dev->dma_req_len); + param->src_dst_bidx = SRCBIDX(0) | DSTBIDX(dev->dma_req_len); + param->link_bcntrld = BCNTRLD(bytesperline / dev->dma_req_len) | LINK(0xffff); @@ -922,7 +922,7 @@ index 788acc4..62d8702 100644 dev_err(&pdev->dev, "Loaded OK.\n"); return 0; -@@ -1551,7 +1814,7 @@ module_platform_driver(cssp_cam_driver); +@@ -1551,6 +1814,6 @@ module_platform_driver(cssp_cam_driver); /* * Macros sets license, author and description */ @@ -930,7 +930,6 @@ index 788acc4..62d8702 100644 +MODULE_LICENSE("GPLv2"); MODULE_AUTHOR("Dan Aizenstros, Damian Eppel, Przemek Szewczyk"); MODULE_DESCRIPTION("QuickLogic Camera Interface driver"); - -- -1.7.9.5 +1.9.0 diff --git a/patches/camera/0008-cssp_camera-Increase-delay-after-enabling-clocks-to-.patch b/patches/camera/0008-cssp_camera-Increase-delay-after-enabling-clocks-to-.patch index 8ce49be7..28b5853e 100644 --- a/patches/camera/0008-cssp_camera-Increase-delay-after-enabling-clocks-to-.patch +++ b/patches/camera/0008-cssp_camera-Increase-delay-after-enabling-clocks-to-.patch @@ -1,15 +1,15 @@ -From 741efc4ba2a60d4770da339a48247ef29b82722b Mon Sep 17 00:00:00 2001 +From b85f1906b60a1dbb9e8c04aa022b85110cbad12f Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Fri, 10 May 2013 09:27:26 +0300 Subject: [PATCH 08/10] cssp_camera: Increase delay after enabling clocks to 100ms --- - drivers/media/platform/soc_camera/cssp_camera.c | 4 ++-- + drivers/media/platform/soc_camera/cssp_camera.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/soc_camera/cssp_camera.c b/drivers/media/platform/soc_camera/cssp_camera.c -index 62d8702..2c10f61 100644 +index c0f3e6e..8c4d5ff 100644 --- a/drivers/media/platform/soc_camera/cssp_camera.c +++ b/drivers/media/platform/soc_camera/cssp_camera.c @@ -657,7 +657,7 @@ static int configure_camera_sensor(struct cssp_cam_dev *cam) @@ -31,5 +31,5 @@ index 62d8702..2c10f61 100644 fillup_dma(dev); -- -1.7.9.5 +1.9.0 diff --git a/patches/camera/0009-Debugging-camera-stuff.patch b/patches/camera/0009-Debugging-camera-stuff.patch index df8f1f89..5f4305c9 100644 --- a/patches/camera/0009-Debugging-camera-stuff.patch +++ b/patches/camera/0009-Debugging-camera-stuff.patch @@ -1,11 +1,11 @@ -From 9e68717603aaf32950fb93ed8f53d5ff7f8f815d Mon Sep 17 00:00:00 2001 +From cd39c3bc3e6a6ebbeb230bd9a7f1ab0aedb88665 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Fri, 10 May 2013 10:41:45 +0300 Subject: [PATCH 09/10] Debugging camera stuff --- - drivers/media/i2c/soc_camera/mt9t112.c | 4 ++-- - drivers/media/platform/soc_camera/cssp_camera.c | 16 +++------------- + drivers/media/i2c/soc_camera/mt9t112.c | 4 ++-- + drivers/media/platform/soc_camera/cssp_camera.c | 16 +++------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/drivers/media/i2c/soc_camera/mt9t112.c b/drivers/media/i2c/soc_camera/mt9t112.c @@ -31,7 +31,7 @@ index d83d217..3154c1f 100644 //#define TEST_PATTERN diff --git a/drivers/media/platform/soc_camera/cssp_camera.c b/drivers/media/platform/soc_camera/cssp_camera.c -index 2c10f61..7c8d40e 100644 +index 8c4d5ff..12d78bd 100644 --- a/drivers/media/platform/soc_camera/cssp_camera.c +++ b/drivers/media/platform/soc_camera/cssp_camera.c @@ -544,8 +544,8 @@ static void dma_callback(unsigned lch, u16 ch_status, void *data) @@ -93,5 +93,5 @@ index 2c10f61..7c8d40e 100644 res = vb2_poll(q, file, wait); if (v4l2_event_pending(fh)) -- -1.7.9.5 +1.9.0 diff --git a/patches/camera/0010-cssp_camera-Make-it-work-with-Beaglebone-black.patch b/patches/camera/0010-cssp_camera-Make-it-work-with-Beaglebone-black.patch index b4a864b8..e51d52d9 100644 --- a/patches/camera/0010-cssp_camera-Make-it-work-with-Beaglebone-black.patch +++ b/patches/camera/0010-cssp_camera-Make-it-work-with-Beaglebone-black.patch @@ -1,4 +1,4 @@ -From 1924e06985e76faa9d921739bd0b46b91a822780 Mon Sep 17 00:00:00 2001 +From f2058a9203cb8aea5b546d51bdadef80c8c5587c Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Fri, 10 May 2013 14:07:49 +0300 Subject: [PATCH 10/10] cssp_camera: Make it work with Beaglebone black @@ -6,12 +6,12 @@ Subject: [PATCH 10/10] cssp_camera: Make it work with Beaglebone black Using the reset control framework, the camera works on the black. I love it when a plan comes together... --- - drivers/media/platform/soc_camera/cssp_camera.c | 25 +++++++++++++++++++++-- - firmware/capes/BB-BONE-CAM3-01-00A2.dts | 5 +++++ + drivers/media/platform/soc_camera/cssp_camera.c | 25 +++++++++++++++++++++++-- + firmware/capes/BB-BONE-CAM3-01-00A2.dts | 5 +++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/soc_camera/cssp_camera.c b/drivers/media/platform/soc_camera/cssp_camera.c -index 7c8d40e..119c432 100644 +index 12d78bd..9cee142 100644 --- a/drivers/media/platform/soc_camera/cssp_camera.c +++ b/drivers/media/platform/soc_camera/cssp_camera.c @@ -45,6 +45,8 @@ @@ -112,5 +112,5 @@ index 97bdcfd..e546f08 100644 }; -- -1.7.9.5 +1.9.0 diff --git a/patches/capebus/0001-gpio-keys-Pinctrl-fy.patch b/patches/capebus/0001-gpio-keys-Pinctrl-fy.patch index 3965a62b..46d85169 100644 --- a/patches/capebus/0001-gpio-keys-Pinctrl-fy.patch +++ b/patches/capebus/0001-gpio-keys-Pinctrl-fy.patch @@ -1,10 +1,10 @@ -From 717a3bfac38be42bb176ed913333b15b2e4f718e Mon Sep 17 00:00:00 2001 +From 5346e004a675683176f96fbbb33f2ae5c27325a2 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 17 Oct 2012 20:17:36 +0300 Subject: [PATCH 1/7] gpio-keys: Pinctrl-fy --- - drivers/input/keyboard/gpio_keys.c | 14 ++++++++++++++ + drivers/input/keyboard/gpio_keys.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c @@ -47,5 +47,5 @@ index b29ca65..97d7e05 100644 return 0; -- -1.7.9.5 +1.9.0 diff --git a/patches/capebus/0002-tps65217-Allow-placement-elsewhere-than-parent-mfd-d.patch b/patches/capebus/0002-tps65217-Allow-placement-elsewhere-than-parent-mfd-d.patch index e54463d5..9203710e 100644 --- a/patches/capebus/0002-tps65217-Allow-placement-elsewhere-than-parent-mfd-d.patch +++ b/patches/capebus/0002-tps65217-Allow-placement-elsewhere-than-parent-mfd-d.patch @@ -1,4 +1,4 @@ -From 46b891c40c120a19725a351c67fda8dc946636e2 Mon Sep 17 00:00:00 2001 +From 5f12d3722a3d93de0f4699509f9937f734c4763c Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 17 Oct 2012 20:17:57 +0300 Subject: [PATCH 2/7] tps65217: Allow placement elsewhere than parent mfd @@ -7,7 +7,7 @@ Subject: [PATCH 2/7] tps65217: Allow placement elsewhere than parent mfd The current code expect the configuration of the backlight to stay constant after initialization. This patch allows to move it around. --- - drivers/video/backlight/tps65217_bl.c | 103 +++++++++++++++++++++++++++++---- + drivers/video/backlight/tps65217_bl.c | 103 ++++++++++++++++++++++++++++++---- 1 file changed, 92 insertions(+), 11 deletions(-) diff --git a/drivers/video/backlight/tps65217_bl.c b/drivers/video/backlight/tps65217_bl.c @@ -195,5 +195,5 @@ index 7088163..69c1dfe 100644 }; -- -1.7.9.5 +1.9.0 diff --git a/patches/capebus/0003-pwm-backlight-Pinctrl-fy.patch b/patches/capebus/0003-pwm-backlight-Pinctrl-fy.patch index 8085558b..080c8a97 100644 --- a/patches/capebus/0003-pwm-backlight-Pinctrl-fy.patch +++ b/patches/capebus/0003-pwm-backlight-Pinctrl-fy.patch @@ -1,10 +1,10 @@ -From c88079e0468295d38631870310adbf441613ab5b Mon Sep 17 00:00:00 2001 +From 143485f07ff8dc3d2854e1c9807f28707a2ee75d Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Tue, 23 Oct 2012 11:48:58 +0300 Subject: [PATCH 3/7] pwm-backlight: Pinctrl-fy --- - drivers/video/backlight/pwm_bl.c | 7 +++++++ + drivers/video/backlight/pwm_bl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c @@ -36,5 +36,5 @@ index 0c91023..f3b6194 100644 ret = pwm_backlight_parse_dt(&pdev->dev, &defdata); if (ret < 0) { -- -1.7.9.5 +1.9.0 diff --git a/patches/capebus/0004-ARM-CUSTOM-Build-a-uImage-with-dtb-already-appended.patch b/patches/capebus/0004-ARM-CUSTOM-Build-a-uImage-with-dtb-already-appended.patch index 5040a961..82617ced 100644 --- a/patches/capebus/0004-ARM-CUSTOM-Build-a-uImage-with-dtb-already-appended.patch +++ b/patches/capebus/0004-ARM-CUSTOM-Build-a-uImage-with-dtb-already-appended.patch @@ -1,4 +1,4 @@ -From 1d2a980478ede51fe3e5e0aad88b1756cd237dc6 Mon Sep 17 00:00:00 2001 +From 48a8cc934fe39da96b713cee06fa42a662611a59 Mon Sep 17 00:00:00 2001 From: Grant Likely Date: Tue, 2 Aug 2011 15:30:09 +0100 Subject: [PATCH 4/7] ARM: CUSTOM: Build a uImage with dtb already appended @@ -12,8 +12,8 @@ Conflicts: arch/arm/Makefile --- - arch/arm/Makefile | 3 +++ - arch/arm/boot/Makefile | 7 +++++++ + arch/arm/Makefile | 3 +++ + arch/arm/boot/Makefile | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/arch/arm/Makefile b/arch/arm/Makefile @@ -56,5 +56,5 @@ index abfce28..131558f 100644 $(Q)$(MAKE) $(build)=$(obj)/bootp $@ @: -- -1.7.9.5 +1.9.0 diff --git a/patches/capebus/0005-beaglebone-create-a-shared-dtsi-for-beaglebone-based.patch b/patches/capebus/0005-beaglebone-create-a-shared-dtsi-for-beaglebone-based.patch index 99705c69..826c7d95 100644 --- a/patches/capebus/0005-beaglebone-create-a-shared-dtsi-for-beaglebone-based.patch +++ b/patches/capebus/0005-beaglebone-create-a-shared-dtsi-for-beaglebone-based.patch @@ -1,4 +1,4 @@ -From 25d97a3e1da97f73ba30721930aac71bff65069c Mon Sep 17 00:00:00 2001 +From 3579d8f963fad0a8b57008efe7409c9df1feca70 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Fri, 18 Jan 2013 09:19:38 +0100 Subject: [PATCH 5/7] beaglebone: create a shared dtsi for beaglebone based @@ -6,11 +6,11 @@ Subject: [PATCH 5/7] beaglebone: create a shared dtsi for beaglebone based Signed-off-by: Koen Kooi --- - arch/arm/boot/dts/Makefile | 3 +- - arch/arm/boot/dts/am335x-bone-common.dtsi | 290 +++++++++++++++++++++++++++++ - arch/arm/boot/dts/am335x-bone.dts | 281 +--------------------------- - arch/arm/boot/dts/am335x-boneblack.dts | 20 ++ - 4 files changed, 313 insertions(+), 281 deletions(-) + arch/arm/boot/dts/Makefile | 3 +- + arch/arm/boot/dts/am335x-bone-common.dtsi | 290 ++++++++++++++++++++++++++++++ + arch/arm/boot/dts/am335x-bone.dts | 281 +---------------------------- + arch/arm/boot/dts/am335x-boneblack.dts | 19 ++ + 4 files changed, 312 insertions(+), 281 deletions(-) create mode 100644 arch/arm/boot/dts/am335x-bone-common.dtsi create mode 100644 arch/arm/boot/dts/am335x-boneblack.dts @@ -30,7 +30,7 @@ index 5ebb44f..8f8c0c8 100644 dtb-$(CONFIG_ARCH_U8500) += snowball.dtb \ diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi new file mode 100644 -index 0000000..9a7be8a +index 0000000..ae1d0a1 --- /dev/null +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi @@ -0,0 +1,290 @@ @@ -206,7 +206,7 @@ index 0000000..9a7be8a + compatible = "at,24c256"; + reg = <0x50>; + }; -+ ++ +}; + +&i2c2 { @@ -325,7 +325,7 @@ index 0000000..9a7be8a + status = "okay"; +}; diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts -index bf87ceb..9abc1f3 100644 +index 8e62bd5..9abc1f3 100644 --- a/arch/arm/boot/dts/am335x-bone.dts +++ b/arch/arm/boot/dts/am335x-bone.dts @@ -9,283 +9,4 @@ @@ -494,7 +494,7 @@ index bf87ceb..9abc1f3 100644 - compatible = "at,24c256"; - reg = <0x50>; - }; -- +- -}; - -&i2c2 { @@ -615,10 +615,10 @@ index bf87ceb..9abc1f3 100644 +/include/ "am335x-bone-common.dtsi" diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts new file mode 100644 -index 0000000..cdc3dd0 +index 0000000..ab5af7f --- /dev/null +++ b/arch/arm/boot/dts/am335x-boneblack.dts -@@ -0,0 +1,20 @@ +@@ -0,0 +1,19 @@ +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + * @@ -638,7 +638,6 @@ index 0000000..cdc3dd0 + ti,non-removable; + status = "okay"; +}; -+ -- -1.7.9.5 +1.9.0 diff --git a/patches/capebus/0006-beaglebone-enable-emmc-for-bonelt.patch b/patches/capebus/0006-beaglebone-enable-emmc-for-bonelt.patch index bca25652..7de7ae5e 100644 --- a/patches/capebus/0006-beaglebone-enable-emmc-for-bonelt.patch +++ b/patches/capebus/0006-beaglebone-enable-emmc-for-bonelt.patch @@ -1,16 +1,16 @@ -From 7ccbc7d54f02b84153b6505d447281187d51586e Mon Sep 17 00:00:00 2001 +From bf260aa850d9b4e6917537ec10ab19faaff01016 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 24 Oct 2012 11:47:13 +0200 Subject: [PATCH 6/7] beaglebone: enable emmc for bonelt Signed-off-by: Koen Kooi --- - arch/arm/boot/dts/am335x-bone-common.dtsi | 1 + - arch/arm/boot/dts/am335x-boneblack.dts | 15 +++++++++++++++ + arch/arm/boot/dts/am335x-bone-common.dtsi | 1 + + arch/arm/boot/dts/am335x-boneblack.dts | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi -index 9a7be8a..8295b30 100644 +index ae1d0a1..e1a126a 100644 --- a/arch/arm/boot/dts/am335x-bone-common.dtsi +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi @@ -112,6 +112,7 @@ @@ -22,7 +22,7 @@ index 9a7be8a..8295b30 100644 }; diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts -index cdc3dd0..6cb2a51 100644 +index ab5af7f..755892e 100644 --- a/arch/arm/boot/dts/am335x-boneblack.dts +++ b/arch/arm/boot/dts/am335x-boneblack.dts @@ -11,6 +11,21 @@ @@ -48,5 +48,5 @@ index cdc3dd0..6cb2a51 100644 vmmc-supply = <&ldo3_reg>; bus-width = <4>; -- -1.7.9.5 +1.9.0 diff --git a/patches/capebus/0007-Fix-appended-dtb-rule.patch b/patches/capebus/0007-Fix-appended-dtb-rule.patch index bd001188..c68a1278 100644 --- a/patches/capebus/0007-Fix-appended-dtb-rule.patch +++ b/patches/capebus/0007-Fix-appended-dtb-rule.patch @@ -1,12 +1,12 @@ -From 7f9a503a9da32161c2c44dd1e914f5d676e788d9 Mon Sep 17 00:00:00 2001 +From 0c4a8f8fb2b478ff04c7f3d7b47f02a50249b92a Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Sun, 30 Dec 2012 14:53:19 +0100 Subject: [PATCH 7/7] Fix appended dtb rule Signed-off-by: Koen Kooi --- - arch/arm/Makefile | 2 +- - arch/arm/boot/Makefile | 2 +- + arch/arm/Makefile | 2 +- + arch/arm/boot/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/Makefile b/arch/arm/Makefile @@ -36,5 +36,5 @@ index 131558f..e37ebb5 100644 endif -- -1.7.9.5 +1.9.0 diff --git a/patches/capes/0001-capes-Add-bacon-cape.patch b/patches/capes/0001-capes-Add-bacon-cape.patch index 0a79b95b..6df7764e 100644 --- a/patches/capes/0001-capes-Add-bacon-cape.patch +++ b/patches/capes/0001-capes-Add-bacon-cape.patch @@ -1,12 +1,12 @@ -From e59d225b000c285de0977ef2fa45f4f1f8ba680f Mon Sep 17 00:00:00 2001 +From 72d2c10078cbbfce178fa803276750fc25555c12 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 10 Jul 2013 23:51:05 +0300 -Subject: [PATCH 1/8] capes: Add bacon cape +Subject: [PATCH 01/40] capes: Add bacon cape This is the full Linux driver enable bacon cape definition. --- - firmware/Makefile | 3 +- - firmware/capes/BB-BONE-BACON-00A0.dts | 216 +++++++++++++++++++++++++++++++++ + firmware/Makefile | 3 +- + firmware/capes/BB-BONE-BACON-00A0.dts | 216 ++++++++++++++++++++++++++++++++++ 2 files changed, 218 insertions(+), 1 deletion(-) create mode 100644 firmware/capes/BB-BONE-BACON-00A0.dts @@ -247,5 +247,5 @@ index 0000000..87f5f01 + +}; -- -1.7.9.5 +1.9.0 diff --git a/patches/capes/0002-cape-bacon-Cosmetic-change-of-the-adc-helper-name.patch b/patches/capes/0002-cape-bacon-Cosmetic-change-of-the-adc-helper-name.patch index 959353ae..7a78b1ee 100644 --- a/patches/capes/0002-cape-bacon-Cosmetic-change-of-the-adc-helper-name.patch +++ b/patches/capes/0002-cape-bacon-Cosmetic-change-of-the-adc-helper-name.patch @@ -1,10 +1,10 @@ -From a9b2ef198eb675d9963e2ed2f3de6585cd797a43 Mon Sep 17 00:00:00 2001 +From 22068ef92071b800cd7d8768a3ab938e37a7d49d Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Thu, 11 Jul 2013 10:01:50 +0300 -Subject: [PATCH 2/8] cape: bacon: Cosmetic change of the adc helper name +Subject: [PATCH 02/40] cape: bacon: Cosmetic change of the adc helper name --- - firmware/capes/BB-BONE-BACON-00A0.dts | 2 +- + firmware/capes/BB-BONE-BACON-00A0.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/capes/BB-BONE-BACON-00A0.dts b/firmware/capes/BB-BONE-BACON-00A0.dts @@ -21,5 +21,5 @@ index 87f5f01..d25c1baa 100644 vsense-name = "AIN0", "AIN1", "AIN2", "AIN3", "AIN4", "AIN5", "AIN6", "AIN7"; /* report micro-volts */ -- -1.7.9.5 +1.9.0 diff --git a/patches/capes/0003-cape-bacon-educational-edition.patch b/patches/capes/0003-cape-bacon-educational-edition.patch index 0cd4f234..31a9e5f5 100644 --- a/patches/capes/0003-cape-bacon-educational-edition.patch +++ b/patches/capes/0003-cape-bacon-educational-edition.patch @@ -1,11 +1,11 @@ -From 9dc297ebebbe9509483f665ed70ded90900a139c Mon Sep 17 00:00:00 2001 +From 1dc9eb8956ef755f17cd3efdd6ead4f9349c6fb5 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Thu, 11 Jul 2013 10:04:22 +0300 -Subject: [PATCH 3/8] cape: bacon: educational edition +Subject: [PATCH 03/40] cape: bacon: educational edition --- - firmware/Makefile | 3 +- - firmware/capes/BB-BONE-BACONE-00A0.dts | 169 ++++++++++++++++++++++++++++++++ + firmware/Makefile | 3 +- + firmware/capes/BB-BONE-BACONE-00A0.dts | 169 +++++++++++++++++++++++++++++++++ 2 files changed, 171 insertions(+), 1 deletion(-) create mode 100644 firmware/capes/BB-BONE-BACONE-00A0.dts @@ -199,5 +199,5 @@ index 0000000..a02173d + }; +}; -- -1.7.9.5 +1.9.0 diff --git a/patches/capes/0004-capes-bacon-Update-with-new-ADC-driver-method.patch b/patches/capes/0004-capes-bacon-Update-with-new-ADC-driver-method.patch index cbe83e7c..cd7c4816 100644 --- a/patches/capes/0004-capes-bacon-Update-with-new-ADC-driver-method.patch +++ b/patches/capes/0004-capes-bacon-Update-with-new-ADC-driver-method.patch @@ -1,11 +1,11 @@ -From da4071e3fd02687183d523e626f67b6c487d2d0c Mon Sep 17 00:00:00 2001 +From 928088a2886c3a1435af6c9208360bd3f6eabb92 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Thu, 11 Jul 2013 20:03:56 +0300 -Subject: [PATCH 4/8] capes: bacon: Update with new ADC driver method +Subject: [PATCH 04/40] capes: bacon: Update with new ADC driver method --- - firmware/capes/BB-BONE-BACON-00A0.dts | 2 +- - firmware/capes/BB-BONE-BACONE-00A0.dts | 2 +- + firmware/capes/BB-BONE-BACON-00A0.dts | 2 +- + firmware/capes/BB-BONE-BACONE-00A0.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/capes/BB-BONE-BACON-00A0.dts b/firmware/capes/BB-BONE-BACON-00A0.dts @@ -35,5 +35,5 @@ index a02173d..07fa753 100644 }; -- -1.7.9.5 +1.9.0 diff --git a/patches/capes/0005-capes-BACON-Educational-cape-with-free-form-muxing.patch b/patches/capes/0005-capes-BACON-Educational-cape-with-free-form-muxing.patch index a34b204f..e5752d42 100644 --- a/patches/capes/0005-capes-BACON-Educational-cape-with-free-form-muxing.patch +++ b/patches/capes/0005-capes-BACON-Educational-cape-with-free-form-muxing.patch @@ -1,11 +1,11 @@ -From f3a2fb3ed3180ebcdf5a98b1dc3695cc8357db47 Mon Sep 17 00:00:00 2001 +From 39c80987b31b0b5a5cc1d7e2982f6bdd7d5364d4 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Mon, 15 Jul 2013 23:00:35 +0300 -Subject: [PATCH 5/8] capes: BACON Educational cape with free form muxing +Subject: [PATCH 05/40] capes: BACON Educational cape with free form muxing --- - firmware/Makefile | 3 +- - firmware/capes/BB-BONE-BACONE2-00A0.dts | 204 +++++++++++++++++++++++++++++++ + firmware/Makefile | 3 +- + firmware/capes/BB-BONE-BACONE2-00A0.dts | 204 ++++++++++++++++++++++++++++++++ 2 files changed, 206 insertions(+), 1 deletion(-) create mode 100644 firmware/capes/BB-BONE-BACONE2-00A0.dts @@ -234,5 +234,5 @@ index 0000000..5118f71 + }; +}; -- -1.7.9.5 +1.9.0 diff --git a/patches/capes/0006-firmware-add-BeBoPr-cape.patch b/patches/capes/0006-firmware-add-BeBoPr-cape.patch index 7c42224a..4447f08d 100644 --- a/patches/capes/0006-firmware-add-BeBoPr-cape.patch +++ b/patches/capes/0006-firmware-add-BeBoPr-cape.patch @@ -1,12 +1,12 @@ -From 278f86e82be391cbb053d1caa425c90ccf8358d4 Mon Sep 17 00:00:00 2001 +From ccae883df13bc3ccc394ee101669af9c4f44c4ff Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 17 Jul 2013 09:05:27 +0200 -Subject: [PATCH 6/8] firmware: add BeBoPr cape +Subject: [PATCH 06/40] firmware: add BeBoPr cape Signed-off-by: Koen Kooi --- - firmware/Makefile | 1 + - firmware/capes/2191-R2.dts | 417 ++++++++++++++++++++++++++++++++++++++++++++ + firmware/Makefile | 1 + + firmware/capes/2191-R2.dts | 417 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 418 insertions(+) create mode 100644 firmware/capes/2191-R2.dts @@ -24,7 +24,7 @@ index cea34e6..677d634 100644 cape-bone-dvi-00A0.dtbo \ diff --git a/firmware/capes/2191-R2.dts b/firmware/capes/2191-R2.dts new file mode 100644 -index 0000000..d179b05 +index 0000000..8451deb --- /dev/null +++ b/firmware/capes/2191-R2.dts @@ -0,0 +1,417 @@ @@ -291,7 +291,7 @@ index 0000000..d179b05 + 0xec 5 /* #E_STP, pr1_pru1_pru_r30_11, P8_30, gpio2.25, mode5 out */ + >; + }; -+ }; ++ }; + }; + + @@ -446,5 +446,5 @@ index 0000000..d179b05 + +}; -- -1.7.9.5 +1.9.0 diff --git a/patches/capes/0007-Add-support-for-Beaglebone-Audio-Amplifier-Cape.patch b/patches/capes/0007-Add-support-for-Beaglebone-Audio-Amplifier-Cape.patch index e8e691b1..89a90611 100644 --- a/patches/capes/0007-Add-support-for-Beaglebone-Audio-Amplifier-Cape.patch +++ b/patches/capes/0007-Add-support-for-Beaglebone-Audio-Amplifier-Cape.patch @@ -1,12 +1,12 @@ -From 76e34cd07586201fe698b790b6e3d4e0f47a2be9 Mon Sep 17 00:00:00 2001 +From a8c75be88be25b813aa8a9b500c35ddd18c41ed9 Mon Sep 17 00:00:00 2001 From: Daniel Nilsson Date: Wed, 17 Jul 2013 22:13:18 +0200 -Subject: [PATCH 7/8] Add support for Beaglebone Audio Amplifier Cape +Subject: [PATCH 07/40] Add support for Beaglebone Audio Amplifier Cape Signed-off-by: Daniel Nilsson --- - firmware/Makefile | 3 +- - firmware/capes/DNIL-AMPCAPE-1-00R1.dts | 142 ++++++++++++++++++++++++++++++++ + firmware/Makefile | 3 +- + firmware/capes/DNIL-AMPCAPE-1-00R1.dts | 142 +++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 firmware/capes/DNIL-AMPCAPE-1-00R1.dts @@ -26,14 +26,14 @@ index 677d634..f4331ff 100644 fw-shipped-$(CONFIG_CAPE_BEAGLEBONE_GEIGER) += \ diff --git a/firmware/capes/DNIL-AMPCAPE-1-00R1.dts b/firmware/capes/DNIL-AMPCAPE-1-00R1.dts new file mode 100644 -index 0000000..f7110fb +index 0000000..573a8c6 --- /dev/null +++ b/firmware/capes/DNIL-AMPCAPE-1-00R1.dts @@ -0,0 +1,142 @@ +/* + * Device Tree Overlay for DNIL Electronic Audio Amplifier Cape. + * Copyright (C) 2013 DNIL Electronic - http://www.dnil.se -+ * ++ * + * Work based on Beagle Board Toys Audio Cape; + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + * @@ -173,5 +173,5 @@ index 0000000..f7110fb + }; +}; -- -1.7.9.5 +1.9.0 diff --git a/patches/capes/0008-capemgr-Priority-on-capemgr.enable_partno-option.patch b/patches/capes/0008-capemgr-Priority-on-capemgr.enable_partno-option.patch index 8c31b115..fc3756e1 100644 --- a/patches/capes/0008-capemgr-Priority-on-capemgr.enable_partno-option.patch +++ b/patches/capes/0008-capemgr-Priority-on-capemgr.enable_partno-option.patch @@ -1,7 +1,7 @@ -From 461a6a448e242404c4e9a92e283194c8cc76d69a Mon Sep 17 00:00:00 2001 +From f84c6f152cc5f208d34f42149ac8a62641acfbd4 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 24 Jul 2013 18:30:43 +0300 -Subject: [PATCH 8/8] capemgr: Priority on capemgr.enable_partno option +Subject: [PATCH 08/40] capemgr: Priority on capemgr.enable_partno option When booting from a device that's providing the rootfs via a cape fragment, you face the following problem as it appears @@ -30,14 +30,14 @@ capemgr.enable_partno=foo:00A0:10 Signed-off-by: Pantelis Antoniou --- - drivers/misc/cape/beaglebone/capemgr.c | 44 ++++++++++++++++++++++---------- + drivers/misc/cape/beaglebone/capemgr.c | 44 +++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/drivers/misc/cape/beaglebone/capemgr.c b/drivers/misc/cape/beaglebone/capemgr.c -index b1a8b65..4b88cee 100644 +index b2d5edb..0f6673a 100644 --- a/drivers/misc/cape/beaglebone/capemgr.c +++ b/drivers/misc/cape/beaglebone/capemgr.c -@@ -175,7 +175,7 @@ static int bone_slot_fill_override(struct bone_cape_slot *slot, +@@ -178,7 +178,7 @@ static int bone_slot_fill_override(struct bone_cape_slot *slot, const char *part_number, const char *version); static struct bone_cape_slot *bone_capemgr_add_slot( struct bone_capemgr_info *info, struct device_node *node, @@ -46,7 +46,7 @@ index b1a8b65..4b88cee 100644 static int bone_capemgr_remove_slot_no_lock(struct bone_cape_slot *slot); static int bone_capemgr_remove_slot(struct bone_cape_slot *slot); static int bone_capemgr_load(struct bone_cape_slot *slot); -@@ -1083,7 +1083,7 @@ found: +@@ -1086,7 +1086,7 @@ found: } slot = bone_capemgr_add_slot(info, node, @@ -55,7 +55,7 @@ index b1a8b65..4b88cee 100644 if (IS_ERR(slot)) { dev_err(&pdev->dev, "Failed to add slot #%d\n", atomic_read(&info->next_slot_nr) - 1); -@@ -1101,7 +1101,7 @@ found: +@@ -1104,7 +1104,7 @@ found: /* no specific slot found, try immediate */ if (!slot) slot = bone_capemgr_add_slot(info, NULL, @@ -64,7 +64,7 @@ index b1a8b65..4b88cee 100644 if (IS_ERR_OR_NULL(slot)) { dev_err(&pdev->dev, "Failed to add slot #%d\n", -@@ -1613,7 +1613,7 @@ static int bone_slot_fill_override(struct bone_cape_slot *slot, +@@ -1618,7 +1618,7 @@ static int bone_slot_fill_override(struct bone_cape_slot *slot, static struct bone_cape_slot * bone_capemgr_add_slot(struct bone_capemgr_info *info, struct device_node *node, @@ -73,7 +73,7 @@ index b1a8b65..4b88cee 100644 { struct device_node *eeprom_node; struct bone_cape_slot *slot; -@@ -1632,6 +1632,7 @@ bone_capemgr_add_slot(struct bone_capemgr_info *info, struct device_node *node, +@@ -1637,6 +1637,7 @@ bone_capemgr_add_slot(struct bone_capemgr_info *info, struct device_node *node, } slot->info = info; slot->slotno = slotno; @@ -81,7 +81,7 @@ index b1a8b65..4b88cee 100644 if (node && !of_property_read_bool(node, "ti,cape-override")) { ret = of_property_read_u32(node, "eeprom", -@@ -1823,7 +1824,8 @@ bone_capemgr_probe(struct platform_device *pdev) +@@ -1894,7 +1895,8 @@ bone_capemgr_probe(struct platform_device *pdev) const char *board_name; const char *compatible_name; struct bone_capemap *capemap; @@ -91,7 +91,7 @@ index b1a8b65..4b88cee 100644 char *wbuf, *s, *p, *e; /* we don't use platform_data at all; we require OF */ -@@ -1992,7 +1994,7 @@ bone_capemgr_probe(struct platform_device *pdev) +@@ -2063,7 +2065,7 @@ bone_capemgr_probe(struct platform_device *pdev) continue; slot = bone_capemgr_add_slot(info, node, @@ -100,7 +100,7 @@ index b1a8b65..4b88cee 100644 if (IS_ERR(slot)) { dev_err(&pdev->dev, "Failed to add slot #%d\n", atomic_read(&info->next_slot_nr)); -@@ -2019,7 +2021,7 @@ bone_capemgr_probe(struct platform_device *pdev) +@@ -2090,7 +2092,7 @@ bone_capemgr_probe(struct platform_device *pdev) /* add any enable_partno capes */ s = enable_partno; while (*s) { @@ -109,7 +109,7 @@ index b1a8b65..4b88cee 100644 p = strchr(s, ','); if (p == NULL) e = s + strlen(s); -@@ -2036,20 +2038,34 @@ bone_capemgr_probe(struct platform_device *pdev) +@@ -2107,20 +2109,34 @@ bone_capemgr_probe(struct platform_device *pdev) /* move to the next */ s = *e ? e + 1 : e; @@ -135,7 +135,7 @@ index b1a8b65..4b88cee 100644 + prio = val; + } + } - + - part_number = wbuf; - version = p; @@ -152,5 +152,5 @@ index b1a8b65..4b88cee 100644 /* we continue even in case of an error */ if (IS_ERR_OR_NULL(slot)) { -- -1.7.9.5 +1.9.0 diff --git a/patches/capes/0009-bone-add-protocape-GPS.patch b/patches/capes/0009-bone-add-protocape-GPS.patch index 04d7902d..4aed3619 100644 --- a/patches/capes/0009-bone-add-protocape-GPS.patch +++ b/patches/capes/0009-bone-add-protocape-GPS.patch @@ -1,7 +1,7 @@ -From 3d9be97485bb74d51b2348d11fc704dd3c00a1a3 Mon Sep 17 00:00:00 2001 +From 17420c9c64d68bcbd42dd76542e97396002bb372 Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Sun, 4 Aug 2013 22:25:08 +0000 -Subject: [PATCH 9/9] bone: add protocape GPS +Subject: [PATCH 09/40] bone: add protocape GPS Add prototype GPS cape with UART and pps-gpio fragments @@ -14,7 +14,7 @@ Signed-off-by: Matt Ranostay create mode 100644 firmware/capes/BB-BONE-GPS-00A0.dts diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi -index a42608e..d71c578 100644 +index 1e86cd5..f144957 100644 --- a/arch/arm/boot/dts/am335x-bone-common.dtsi +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi @@ -202,6 +202,15 @@ @@ -32,7 +32,7 @@ index a42608e..d71c578 100644 + /* Beaglebone black has it soldered on */ slot@100 { - ti,cape-override; + ti,cape-override; @@ -366,8 +375,17 @@ }; }; @@ -130,5 +130,5 @@ index 0000000..83103d6 + }; +}; -- -1.8.2.1 +1.9.0 diff --git a/patches/capes/0010-capes-make-SPI-overlays-SPIDEV-by-default.patch b/patches/capes/0010-capes-make-SPI-overlays-SPIDEV-by-default.patch index 6f375872..464e8819 100644 --- a/patches/capes/0010-capes-make-SPI-overlays-SPIDEV-by-default.patch +++ b/patches/capes/0010-capes-make-SPI-overlays-SPIDEV-by-default.patch @@ -1,7 +1,7 @@ -From 4c1bca5d871b13004b207016085cc71c85a1df64 Mon Sep 17 00:00:00 2001 +From 3273fd7bf2c55ed1ea37505eb4a363f9ba2fbafb Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Fri, 9 Aug 2013 06:06:23 +0000 -Subject: [PATCH 10/16] capes: make SPI overlays SPIDEV by default +Subject: [PATCH 10/40] capes: make SPI overlays SPIDEV by default Since beaglebone black requires the overlays to be compiled into the kernel due to eMMC dependency the SPI should be enabled in the @@ -214,14 +214,14 @@ index 1ead983..0000000 -}; diff --git a/firmware/capes/BB-SPI1A1-00A0.dts b/firmware/capes/BB-SPI1A1-00A0.dts deleted file mode 100644 -index ba98e73..0000000 +index 0deb259..0000000 --- a/firmware/capes/BB-SPI1A1-00A0.dts +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (C) 2013 CircuitCo - * -- * Virtual cape for SPI1 (ALT #1) on connector pins +- * Virtual cape for SPI1 (ALT #1) on connector pins - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as @@ -557,5 +557,5 @@ index 0000000..71da452 + }; +}; -- -1.8.2.1 +1.9.0 diff --git a/patches/capes/0011-Removed-old-wrong-BeBoPr-2191-R2-overlay.patch b/patches/capes/0011-Removed-old-wrong-BeBoPr-2191-R2-overlay.patch index df8eebce..a0452693 100644 --- a/patches/capes/0011-Removed-old-wrong-BeBoPr-2191-R2-overlay.patch +++ b/patches/capes/0011-Removed-old-wrong-BeBoPr-2191-R2-overlay.patch @@ -1,7 +1,7 @@ -From 0c438e491cccc1cf833051c1f73d55349ffa6f13 Mon Sep 17 00:00:00 2001 +From 690d393004a6563044a2a689100707b66856bd66 Mon Sep 17 00:00:00 2001 From: Bas Laarhoven Date: Sun, 11 Aug 2013 17:51:40 +0200 -Subject: [PATCH 11/16] Removed old (wrong) BeBoPr 2191-R2 overlay. +Subject: [PATCH 11/40] Removed old (wrong) BeBoPr 2191-R2 overlay. Signed-off-by: Bas Laarhoven --- @@ -24,7 +24,7 @@ index 9aabdee..79c7ac1 100644 cape-bone-dvi-00A0.dtbo \ diff --git a/firmware/capes/2191-R2.dts b/firmware/capes/2191-R2.dts deleted file mode 100644 -index d179b05..0000000 +index 8451deb..0000000 --- a/firmware/capes/2191-R2.dts +++ /dev/null @@ -1,417 +0,0 @@ @@ -291,7 +291,7 @@ index d179b05..0000000 - 0xec 5 /* #E_STP, pr1_pru1_pru_r30_11, P8_30, gpio2.25, mode5 out */ - >; - }; -- }; +- }; - }; - - @@ -446,5 +446,5 @@ index d179b05..0000000 - -}; -- -1.8.2.1 +1.9.0 diff --git a/patches/capes/0012-Workaround-for-bug-in-tscadc-code-that-oopses-with-B.patch b/patches/capes/0012-Workaround-for-bug-in-tscadc-code-that-oopses-with-B.patch index f170d8d5..47201547 100644 --- a/patches/capes/0012-Workaround-for-bug-in-tscadc-code-that-oopses-with-B.patch +++ b/patches/capes/0012-Workaround-for-bug-in-tscadc-code-that-oopses-with-B.patch @@ -1,7 +1,7 @@ -From 0efecafe9a4a65d6046a31c83ad339c5e81c5b60 Mon Sep 17 00:00:00 2001 +From e80c0f98e5223d37722cbedd539ca426830cf9fa Mon Sep 17 00:00:00 2001 From: Bas Laarhoven Date: Sun, 11 Aug 2013 17:55:09 +0200 -Subject: [PATCH 12/16] Workaround for bug in tscadc code that oopses with +Subject: [PATCH 12/40] Workaround for bug in tscadc code that oopses with BeagleBone (white) and device tree configuration. Signed-off-by: Bas Laarhoven @@ -10,7 +10,7 @@ Signed-off-by: Bas Laarhoven 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c -index 408e859..a38de26 100644 +index addd23d..893ce96 100644 --- a/drivers/mfd/ti_am335x_tscadc.c +++ b/drivers/mfd/ti_am335x_tscadc.c @@ -210,9 +210,7 @@ static int ti_tscadc_probe(struct platform_device *pdev) @@ -25,5 +25,5 @@ index 408e859..a38de26 100644 /* TSCADC_CLKDIV needs to be configured to the value minus 1 */ clk_value = clk_value - 1; -- -1.8.2.1 +1.9.0 diff --git a/patches/capes/0013-DT-overlay-for-BeBoPr-and-BeagleBone-white-.-Loaded-.patch b/patches/capes/0013-DT-overlay-for-BeBoPr-and-BeagleBone-white-.-Loaded-.patch index 322fde08..03ad3214 100644 --- a/patches/capes/0013-DT-overlay-for-BeBoPr-and-BeagleBone-white-.-Loaded-.patch +++ b/patches/capes/0013-DT-overlay-for-BeBoPr-and-BeagleBone-white-.-Loaded-.patch @@ -1,7 +1,7 @@ -From ada3903dfb3ad7c95732fdd34460cb5832243467 Mon Sep 17 00:00:00 2001 +From dec6b9fdede53580d48c2869c6a02872042cc167 Mon Sep 17 00:00:00 2001 From: Bas Laarhoven Date: Sun, 11 Aug 2013 17:59:43 +0200 -Subject: [PATCH 13/16] DT overlay for BeBoPr and BeagleBone (white). Loaded by +Subject: [PATCH 13/40] DT overlay for BeBoPr and BeagleBone (white). Loaded by new "cape-bebopr" board id. Signed-off-by: Bas Laarhoven @@ -25,7 +25,7 @@ index 79c7ac1..b5aec1a 100644 cape-bone-dvi-00A0.dtbo \ diff --git a/firmware/capes/cape-bebopr-R2.dts b/firmware/capes/cape-bebopr-R2.dts new file mode 100644 -index 0000000..250c9a1 +index 0000000..531e802 --- /dev/null +++ b/firmware/capes/cape-bebopr-R2.dts @@ -0,0 +1,563 @@ @@ -309,7 +309,7 @@ index 0000000..250c9a1 + 0xec 5 /* #E_STP, pr1_pru1_pru_r30_11, P8_30, gpio2.25, mode5 out */ + >; + }; -+ }; ++ }; + }; + + fragment@22 { @@ -515,7 +515,7 @@ index 0000000..250c9a1 + target = <&am33xx_pinmux>; + __overlay__ { + -+ bebopr_led_pins: pinmux_bebopr_led_pins { ++ bebopr_led_pins: pinmux_bebopr_led_pins { + pinctrl-single,pins = < + 0x000 0x07 /* P8-25 GPIO1_0 gpmc_ad0 .gpio1[0] */ + >; @@ -559,33 +559,33 @@ index 0000000..250c9a1 + compatible = "ti,ads1015"; + status = "okay"; + -+ #address-cells = <1>; ++ #address-cells = <1>; + #size-cells = <0>; + reg = <0x48>; + + hi_res = <1>; + + channel@1 { -+ reg = <4>; -+ ti,gain = <2>; -+ ti,datarate = <2>; -+ }; ++ reg = <4>; ++ ti,gain = <2>; ++ ti,datarate = <2>; ++ }; + channel@2 { -+ reg = <5>; -+ ti,gain = <2>; -+ ti,datarate = <2>; -+ }; ++ reg = <5>; ++ ti,gain = <2>; ++ ti,datarate = <2>; ++ }; + channel@3 { -+ reg = <6>; -+ ti,gain = <2>; -+ ti,datarate = <2>; -+ }; ++ reg = <6>; ++ ti,gain = <2>; ++ ti,datarate = <2>; ++ }; + channel@4 { -+ reg = <0>; -+ ti,gain = <3>; -+ ti,datarate = <2>; -+ }; -+ }; ++ reg = <0>; ++ ti,gain = <3>; ++ ti,datarate = <2>; ++ }; ++ }; + }; + + }; @@ -593,5 +593,5 @@ index 0000000..250c9a1 + +}; -- -1.8.2.1 +1.9.0 diff --git a/patches/capes/0014-Added-alias-for-BeBoPrs-with-old-EEPROM-device-id-21.patch b/patches/capes/0014-Added-alias-for-BeBoPrs-with-old-EEPROM-device-id-21.patch index 9db54bd5..c364ac5b 100644 --- a/patches/capes/0014-Added-alias-for-BeBoPrs-with-old-EEPROM-device-id-21.patch +++ b/patches/capes/0014-Added-alias-for-BeBoPrs-with-old-EEPROM-device-id-21.patch @@ -1,7 +1,7 @@ -From fdc40db8198fd49da8714778d8b9d2701671d1ed Mon Sep 17 00:00:00 2001 +From 61946a2c9f68d91ccae7cee82c85fb8efee31f1a Mon Sep 17 00:00:00 2001 From: Bas Laarhoven Date: Sun, 11 Aug 2013 18:02:03 +0200 -Subject: [PATCH 14/16] Added alias for BeBoPrs with old EEPROM device id +Subject: [PATCH 14/40] Added alias for BeBoPrs with old EEPROM device id '2191'. Signed-off-by: Bas Laarhoven @@ -10,7 +10,7 @@ Signed-off-by: Bas Laarhoven 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi -index d71c578..81d95306 100644 +index f144957..f6c639a 100644 --- a/arch/arm/boot/dts/am335x-bone-common.dtsi +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi @@ -393,6 +393,15 @@ @@ -30,5 +30,5 @@ index d71c578..81d95306 100644 }; -- -1.8.2.1 +1.9.0 diff --git a/patches/capes/0015-DT-overlay-for-BeBoPr-with-enable-patch-and-BeagleBo.patch b/patches/capes/0015-DT-overlay-for-BeBoPr-with-enable-patch-and-BeagleBo.patch index f040d4d4..aa1d4f40 100644 --- a/patches/capes/0015-DT-overlay-for-BeBoPr-with-enable-patch-and-BeagleBo.patch +++ b/patches/capes/0015-DT-overlay-for-BeBoPr-with-enable-patch-and-BeagleBo.patch @@ -1,7 +1,7 @@ -From a349b82de999cf6086ff7e7f8d0ea31f610f66dd Mon Sep 17 00:00:00 2001 +From dbf70348c7354bf1e0c482ad083e0cdcb952db35 Mon Sep 17 00:00:00 2001 From: Bas Laarhoven Date: Sun, 11 Aug 2013 18:04:08 +0200 -Subject: [PATCH 15/16] DT overlay for BeBoPr with enable patch and BeagleBone +Subject: [PATCH 15/40] DT overlay for BeBoPr with enable patch and BeagleBone (any colour). Load with manual override after disabling HDMI,HDMIN,EMMC. Signed-off-by: Bas Laarhoven @@ -25,7 +25,7 @@ index b5aec1a..d27408f 100644 cape-bone-dvi-00A0.dtbo \ diff --git a/firmware/capes/cape-bebopr-ena-R2.dts b/firmware/capes/cape-bebopr-ena-R2.dts new file mode 100644 -index 0000000..3bb0545 +index 0000000..b553ed9 --- /dev/null +++ b/firmware/capes/cape-bebopr-ena-R2.dts @@ -0,0 +1,561 @@ @@ -307,7 +307,7 @@ index 0000000..3bb0545 + 0xec 5 /* #E_STP, pr1_pru1_pru_r30_11, P8_30, gpio2.25, mode5 out */ + >; + }; -+ }; ++ }; + }; + + fragment@22 { @@ -513,7 +513,7 @@ index 0000000..3bb0545 + target = <&am33xx_pinmux>; + __overlay__ { + -+ bebopr_led_pins: pinmux_bebopr_led_pins { ++ bebopr_led_pins: pinmux_bebopr_led_pins { + pinctrl-single,pins = < + 0x000 0x07 /* P8-25 GPIO1_0 gpmc_ad0 .gpio1[0] */ + >; @@ -557,33 +557,33 @@ index 0000000..3bb0545 + compatible = "ti,ads1015"; + status = "okay"; + -+ #address-cells = <1>; ++ #address-cells = <1>; + #size-cells = <0>; + reg = <0x48>; + + hi_res = <1>; + + channel@1 { -+ reg = <4>; -+ ti,gain = <2>; -+ ti,datarate = <2>; -+ }; ++ reg = <4>; ++ ti,gain = <2>; ++ ti,datarate = <2>; ++ }; + channel@2 { -+ reg = <5>; -+ ti,gain = <2>; -+ ti,datarate = <2>; -+ }; ++ reg = <5>; ++ ti,gain = <2>; ++ ti,datarate = <2>; ++ }; + channel@3 { -+ reg = <6>; -+ ti,gain = <2>; -+ ti,datarate = <2>; -+ }; ++ reg = <6>; ++ ti,gain = <2>; ++ ti,datarate = <2>; ++ }; + channel@4 { -+ reg = <0>; -+ ti,gain = <3>; -+ ti,datarate = <2>; -+ }; -+ }; ++ reg = <0>; ++ ti,gain = <3>; ++ ti,datarate = <2>; ++ }; ++ }; + }; + + }; @@ -591,5 +591,5 @@ index 0000000..3bb0545 + +}; -- -1.8.2.1 +1.9.0 diff --git a/patches/capes/0016-DT-overlay-for-BeBoPr-Bridge-and-BeagleBone-any-colo.patch b/patches/capes/0016-DT-overlay-for-BeBoPr-Bridge-and-BeagleBone-any-colo.patch index 5bfd199f..3d037aab 100644 --- a/patches/capes/0016-DT-overlay-for-BeBoPr-Bridge-and-BeagleBone-any-colo.patch +++ b/patches/capes/0016-DT-overlay-for-BeBoPr-Bridge-and-BeagleBone-any-colo.patch @@ -1,7 +1,7 @@ -From ef58acb68e52fef7928a763d75fc2a7c2cfdbb6d Mon Sep 17 00:00:00 2001 +From 4ba754ffae6a42ee47296d545f580b148715ac6e Mon Sep 17 00:00:00 2001 From: Bas Laarhoven Date: Sun, 11 Aug 2013 18:05:12 +0200 -Subject: [PATCH 16/16] DT overlay for BeBoPr + Bridge and BeagleBone (any +Subject: [PATCH 16/40] DT overlay for BeBoPr + Bridge and BeagleBone (any color). Loaded by "cape-bebopr-brdg" board id or via manual override. Signed-off-by: Bas Laarhoven @@ -25,7 +25,7 @@ index d27408f..b93c558 100644 cape-bone-dvi-00A0.dtbo \ diff --git a/firmware/capes/cape-bebopr-brdg-R2.dts b/firmware/capes/cape-bebopr-brdg-R2.dts new file mode 100644 -index 0000000..b99e0f0 +index 0000000..c2d2f35 --- /dev/null +++ b/firmware/capes/cape-bebopr-brdg-R2.dts @@ -0,0 +1,541 @@ @@ -50,7 +50,7 @@ index 0000000..b99e0f0 + part-number = "cape-bebopr-brdg"; + version = "R2"; + -+ exclusive-use = ++ exclusive-use = + /* state the resources this cape uses */ + + /* ------ IO POWER ------ */ @@ -75,7 +75,7 @@ index 0000000..b99e0f0 + "P8.15", /* gpio1.15 #Y_DIR */ + "P9.17", /* gpio0.5 #Y_ENA */ + "P9.15", /* gpio1.16 #Z_STP */ -+ "P9.23", /* gpio1.17 #Z_DIR */ ++ "P9.23", /* gpio1.17 #Z_DIR */ + "P9.26", /* gpio0.14 #Z_ENA */ + "P9.22", /* gpio0.2 #E_STP */ + "P9.21", /* gpio0.3 #E_DIR */ @@ -103,7 +103,7 @@ index 0000000..b99e0f0 + + "P8.26"; /* gpio1.29 LED */ + -+ ++ + + /* ----------- IO ENABLE ------------ */ + @@ -288,7 +288,7 @@ index 0000000..b99e0f0 + 0x184 0x07 /* #E_ENA, P9_24, gpio0.15, mode7 out */ + >; + }; -+ }; ++ }; + }; + + fragment@22 { @@ -405,7 +405,7 @@ index 0000000..b99e0f0 + 0x8c 0x2f /* #Z_MAX, P8_18, gpio2.1, mode7 in */ + >; + }; -+ }; ++ }; + }; + + fragment@33 { @@ -494,7 +494,7 @@ index 0000000..b99e0f0 + target = <&am33xx_pinmux>; + __overlay__ { + -+ bebopr_led_pins: pinmux_bebopr_led_pins { ++ bebopr_led_pins: pinmux_bebopr_led_pins { + pinctrl-single,pins = < + 0x07c 0x07 /* P8-26 GPIO1_29 gpmc_csn0.gpio1[29] */ + >; @@ -537,33 +537,33 @@ index 0000000..b99e0f0 + compatible = "ti,ads1015"; + status = "okay"; + -+ #address-cells = <1>; ++ #address-cells = <1>; + #size-cells = <0>; + reg = <0x48>; + + hi_res = <1>; + + channel@1 { -+ reg = <4>; -+ ti,gain = <2>; -+ ti,datarate = <2>; -+ }; ++ reg = <4>; ++ ti,gain = <2>; ++ ti,datarate = <2>; ++ }; + channel@2 { -+ reg = <5>; -+ ti,gain = <2>; -+ ti,datarate = <2>; -+ }; ++ reg = <5>; ++ ti,gain = <2>; ++ ti,datarate = <2>; ++ }; + channel@3 { -+ reg = <6>; -+ ti,gain = <2>; -+ ti,datarate = <2>; -+ }; ++ reg = <6>; ++ ti,gain = <2>; ++ ti,datarate = <2>; ++ }; + channel@4 { -+ reg = <0>; -+ ti,gain = <3>; -+ ti,datarate = <2>; -+ }; -+ }; ++ reg = <0>; ++ ti,gain = <3>; ++ ti,datarate = <2>; ++ }; ++ }; + }; + + }; @@ -571,5 +571,5 @@ index 0000000..b99e0f0 + +}; -- -1.8.2.1 +1.9.0 diff --git a/patches/capes/0017-Removed-Whitelist-and-Blacklist-Modes-From-HDMI-Devi.patch b/patches/capes/0017-Removed-Whitelist-and-Blacklist-Modes-From-HDMI-Devi.patch index a938c0e5..f0332592 100644 --- a/patches/capes/0017-Removed-Whitelist-and-Blacklist-Modes-From-HDMI-Devi.patch +++ b/patches/capes/0017-Removed-Whitelist-and-Blacklist-Modes-From-HDMI-Devi.patch @@ -1,18 +1,18 @@ -From e5e09e771f4dde8ad74db788fd042b287e5ecd76 Mon Sep 17 00:00:00 2001 +From b6d796d9e8a4d5331026d478dd9d89101331d9eb Mon Sep 17 00:00:00 2001 From: Cody Lacey Date: Thu, 8 Aug 2013 10:11:22 -0500 -Subject: [PATCH 17/17] Removed Whitelist and Blacklist Modes From HDMI +Subject: [PATCH 17/40] Removed Whitelist and Blacklist Modes From HDMI Devicetree Because sync generation was fixed whitelist and blacklist devicetree properties are no longer needed for HDMI. --- - firmware/capes/cape-boneblack-hdmi-00A0.dts | 11 ----------- - firmware/capes/cape-boneblack-hdmin-00A0.dts | 11 ----------- + firmware/capes/cape-boneblack-hdmi-00A0.dts | 11 ----------- + firmware/capes/cape-boneblack-hdmin-00A0.dts | 11 ----------- 2 files changed, 22 deletions(-) diff --git a/firmware/capes/cape-boneblack-hdmi-00A0.dts b/firmware/capes/cape-boneblack-hdmi-00A0.dts -index 04b7b54..8d1f295 100644 +index ce60528..0cc9227 100644 --- a/firmware/capes/cape-boneblack-hdmi-00A0.dts +++ b/firmware/capes/cape-boneblack-hdmi-00A0.dts @@ -111,17 +111,6 @@ @@ -34,7 +34,7 @@ index 04b7b54..8d1f295 100644 bpp = <16>; ac-bias = <255>; diff --git a/firmware/capes/cape-boneblack-hdmin-00A0.dts b/firmware/capes/cape-boneblack-hdmin-00A0.dts -index ad55c4d..e193426 100644 +index b4305b0..1feb013 100644 --- a/firmware/capes/cape-boneblack-hdmin-00A0.dts +++ b/firmware/capes/cape-boneblack-hdmin-00A0.dts @@ -96,17 +96,6 @@ @@ -56,5 +56,5 @@ index ad55c4d..e193426 100644 bpp = <16>; ac-bias = <255>; -- -1.7.9.5 +1.9.0 diff --git a/patches/capes/0018-beaglebone-capes-add-replicape-A2-and-A3-support.patch b/patches/capes/0018-beaglebone-capes-add-replicape-A2-and-A3-support.patch index 51606c52..81cc875e 100644 --- a/patches/capes/0018-beaglebone-capes-add-replicape-A2-and-A3-support.patch +++ b/patches/capes/0018-beaglebone-capes-add-replicape-A2-and-A3-support.patch @@ -1,7 +1,7 @@ -From 96593cf8ac3870ba622ca26b64b49233065e324c Mon Sep 17 00:00:00 2001 +From 470b5dd94da5d05950da192463ff1504b035c197 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Mon, 9 Sep 2013 14:24:49 +0200 -Subject: [PATCH 18/18] beaglebone capes: add replicape A2 and A3 support +Subject: [PATCH 18/40] beaglebone capes: add replicape A2 and A3 support Signed-off-by: Koen Kooi --- @@ -29,7 +29,7 @@ index b93c558..bff3bb1 100644 fw-shipped-$(CONFIG_CAPE_BEAGLEBONE_GEIGER) += \ diff --git a/firmware/capes/cape-bone-replicape-00A2.dts b/firmware/capes/cape-bone-replicape-00A2.dts new file mode 100644 -index 0000000..ca53b3b +index 0000000..1c023f3 --- /dev/null +++ b/firmware/capes/cape-bone-replicape-00A2.dts @@ -0,0 +1,251 @@ @@ -84,8 +84,8 @@ index 0000000..ca53b3b + "P9.36", /* AIN5 */ + "P9.42", /* SPI1_CS1 */ + /* Hardware IP cores in use */ -+ "spi1", -+ "pruss"; ++ "spi1", ++ "pruss"; + + fragment@0 { + target = <&am33xx_pinmux>; @@ -95,30 +95,30 @@ index 0000000..ca53b3b + 0x190 0x13 /* P9_31 = mcasp0_aclkx.spi1_sclk , OUTPUT_PULLUP | MODE3 */ + 0x194 0x33 /* P9_29 = mcasp0_fsx.spi1_d0 , INPUT_PULLUP | MODE3 */ + 0x198 0x13 /* P9_30 = mcasp0_axr0.spi1_d1 , OUTPUT_PULLUP | MODE3 */ -+ 0x19c 0x13 /* P9_28 = mcasp0_ahclkr.spi1_cs0 , OUTPUT_PULLUP | MODE3 */ ++ 0x19c 0x13 /* P9_28 = mcasp0_ahclkr.spi1_cs0 , OUTPUT_PULLUP | MODE3 */ + 0x164 0x12 /* P9_42 = GPIO0_7 = eCAP0_in_PWM0_out.gpio0[7] , OUTPUT_PULLUP | MODE2 */ + >; -+ }; ++ }; + pruicss_stepper_pins: pinmux_pruicss_stepper_pins{ + pinctrl-single,pins = < + 0x038 0x07 // P8_16 (3) = DIR_EXT_2 = GPIO1_14 + 0x03C 0x07 // P8_15 (4) = DIR_EXT_1 = GPIO1_15 + 0x028 0x07 // P8_14 (5) = DIR_Z = GPIO0_26 + 0x02C 0x07 // P8_17 (6) = STEP_X = GPIO0_27 -+ 0x034 0x07 // P8_11 (22) = step_ext_2 = GPIO1_13 ++ 0x034 0x07 // P8_11 (22) = step_ext_2 = GPIO1_13 + 0x030 0x07 // P8_12 (23) = Step_y = GPIO1_12 + 0x024 0x07 // P8_13 (24) = Step_z = GPIO0_23 + 0x020 0x07 // P8_19 (25) = Dir_y = GPIO0_22 + 0x07C 0x07 // P8_26 = Dir_x = GPIO1_29 + 0x078 0x07 // P9_12 = step ext 1 = GPIO1_28 + >; -+ }; -+ ++ }; ++ + stepper_fault_pins: pinmux_stepper_fault_pins{ + pinctrl-single,pins = < -+ 0x094 0x37 // P8_8 = Fault Ext 2 = GPIO2_2 gpmc_oen_ren.gpio2[3] ++ 0x094 0x37 // P8_8 = Fault Ext 2 = GPIO2_2 gpmc_oen_ren.gpio2[3] + 0x09C 0x37 // P8_9 = FAYLT Y = GPIO2_5 -+ 0x098 0x37 // P8_10 = FAULT X = GPIO2_4 gpmc_wen.gpio2[4] ++ 0x098 0x37 // P8_10 = FAULT X = GPIO2_4 gpmc_wen.gpio2[4] + 0x08C 0x37 // P8_18 = Fault_ext 1 = GPIO2_1 + 0x184 0x37 // P9_24 = Fault Z = GPIO0_15 + >; @@ -144,7 +144,7 @@ index 0000000..ca53b3b + #size-cells = <0>; + status = "okay"; + pinctrl-names = "default"; -+ pinctrl-0 = <&bone_replicape_spi1_pins>; ++ pinctrl-0 = <&bone_replicape_spi1_pins>; + cs-gpios = <&gpio4 17 0>, <&gpio1 7 0>; + + stepper_control{ @@ -162,7 +162,7 @@ index 0000000..ca53b3b + compatible = "spidev"; + reg = <1>; + spi-max-frequency = <16000000>; -+ // Stepper current has mode 0 (CPOL = 0, CPHA = 0) ++ // Stepper current has mode 0 (CPOL = 0, CPHA = 0) + }; + }; + }; @@ -175,44 +175,44 @@ index 0000000..ca53b3b + pinctrl-0 = <&pruicss_stepper_pins>; + + stepper_x{ -+ pin-names = "Replic:pru-step_x", "Replic:pru-dir_x"; ++ pin-names = "Replic:pru-step_x", "Replic:pru-dir_x"; + gpios = <&gpio1 27 0 -+ &gpio2 29 0>; -+ }; ++ &gpio2 29 0>; ++ }; + stepper_y{ -+ pin-names = "Replic:pru-step_y", "Replic:pru-dir_y"; ++ pin-names = "Replic:pru-step_y", "Replic:pru-dir_y"; + gpios =<&gpio2 12 0 -+ &gpio1 22 0>; ++ &gpio1 22 0>; + }; + stepper_z{ -+ pin-names = "Replic:pru-step_z", "Replic:pru-dir_z"; ++ pin-names = "Replic:pru-step_z", "Replic:pru-dir_z"; + gpios = <&gpio1 23 0 -+ &gpio1 26 0>; ++ &gpio1 26 0>; + }; + stepper_ext_1{ -+ pin-names = "Replic:pru-step_ext_1", "Replic:pru-dir_ext_1"; ++ pin-names = "Replic:pru-step_ext_1", "Replic:pru-dir_ext_1"; + gpios = <&gpio2 28 0 -+ &gpio2 15 0>; ++ &gpio2 15 0>; + }; + stepper_ext_2{ -+ pin-names = "Replic:pru-step_ext_2", "Replic:pru-dir_ext_2"; ++ pin-names = "Replic:pru-step_ext_2", "Replic:pru-dir_ext_2"; + gpios = <&gpio2 13 0 -+ &gpio2 14 0>; ++ &gpio2 14 0>; + }; + }; + }; + + fragment@3 { + target = <&ocp>; -+ __overlay__ { ++ __overlay__ { + #address-cells = <1>; -+ #size-cells = <1>; ++ #size-cells = <1>; + + tscadc { + compatible = "ti,ti-tscadc"; + reg = <0x44e0d000 0x1000>; + -+ interrupt-parent = <&intc>; ++ interrupt-parent = <&intc>; + interrupts = <16>; + ti,hwmods = "adc_tsc"; + status = "okay"; @@ -244,7 +244,7 @@ index 0000000..ca53b3b + linux,code = <1>; + gpios = <&gpio3 2 0x5>; + gpio-key,wakeup; -+ }; ++ }; + switch_x2 { + label = "End-stop-X2"; + debounce_interval = <50>; @@ -258,35 +258,35 @@ index 0000000..ca53b3b + linux,code = <3>; + gpios = <&gpio1 30 0x5>; + gpio-key,wakeup; -+ }; ++ }; + switch_y2 { + label = "End-stop-Y2"; + debounce_interval = <50>; + linux,code = <4>; + gpios = <&gpio4 21 0x5>; + gpio-key,wakeup; -+ }; ++ }; + switch_z1 { + label = "End-stop-Z1"; + debounce_interval = <50>; + linux,code = <5>; + gpios = <&gpio1 31 0x5>; + gpio-key,wakeup; -+ }; ++ }; + switch_z2 { + label = "End-stop-Z2"; + debounce_interval = <50>; + linux,code = <6>; + gpios = <&gpio1 4 0x5>; + gpio-key,wakeup; -+ }; ++ }; + }; + }; + }; +}; diff --git a/firmware/capes/cape-bone-replicape-00A3.dts b/firmware/capes/cape-bone-replicape-00A3.dts new file mode 100644 -index 0000000..76253d6 +index 0000000..8cb299f --- /dev/null +++ b/firmware/capes/cape-bone-replicape-00A3.dts @@ -0,0 +1,291 @@ @@ -342,8 +342,8 @@ index 0000000..76253d6 + "P9.36", /* AIN5 */ + "P9.42", /* SPI1_CS1 */ + /* Hardware IP cores in use */ -+ "spi1", -+ "pruss"; ++ "spi1", ++ "pruss"; + + fragment@0 { + target = <&am33xx_pinmux>; @@ -353,30 +353,30 @@ index 0000000..76253d6 + 0x190 0x13 /* P9_31 = mcasp0_aclkx.spi1_sclk , OUTPUT_PULLUP | MODE3 */ + 0x194 0x33 /* P9_29 = mcasp0_fsx.spi1_d0 , INPUT_PULLUP | MODE3 */ + 0x198 0x13 /* P9_30 = mcasp0_axr0.spi1_d1 , OUTPUT_PULLUP | MODE3 */ -+ 0x19c 0x13 /* P9_28 = mcasp0_ahclkr.spi1_cs0 , OUTPUT_PULLUP | MODE3 */ ++ 0x19c 0x13 /* P9_28 = mcasp0_ahclkr.spi1_cs0 , OUTPUT_PULLUP | MODE3 */ + 0x164 0x12 /* P9_42 = GPIO0_7 = eCAP0_in_PWM0_out.gpio0[7] , OUTPUT_PULLUP | MODE2 */ + >; -+ }; ++ }; + pruicss_stepper_pins: pinmux_pruicss_stepper_pins{ + pinctrl-single,pins = < + 0x038 0x07 // P8_16 (3) = DIR_EXT_2 = GPIO1_14 + 0x03C 0x07 // P8_15 (4) = DIR_EXT_1 = GPIO1_15 + 0x028 0x07 // P8_14 (5) = DIR_Z = GPIO0_26 + 0x02C 0x07 // P8_17 (6) = STEP_X = GPIO0_27 -+ 0x034 0x07 // P8_11 (22) = step_ext_2 = GPIO1_13 ++ 0x034 0x07 // P8_11 (22) = step_ext_2 = GPIO1_13 + 0x030 0x07 // P8_12 (23) = Step_y = GPIO1_12 + 0x024 0x07 // P8_13 (24) = Step_z = GPIO0_23 + 0x020 0x07 // P8_19 (25) = Dir_y = GPIO0_22 + 0x07C 0x07 // P8_26 = Dir_x = GPIO1_29 + 0x078 0x07 // P9_12 = step ext 1 = GPIO1_28 + >; -+ }; -+ ++ }; ++ + stepper_fault_pins: pinmux_stepper_fault_pins{ + pinctrl-single,pins = < -+ 0x094 0x37 // P8_8 = Fault Ext 2 = GPIO2_3 gpmc_oen_ren.gpio2[3] ++ 0x094 0x37 // P8_8 = Fault Ext 2 = GPIO2_3 gpmc_oen_ren.gpio2[3] + 0x09C 0x37 // P8_9 = FAYLT Y = GPIO2_5 -+ 0x098 0x37 // P8_10 = FAULT X = GPIO2_4 gpmc_wen.gpio2[4] ++ 0x098 0x37 // P8_10 = FAULT X = GPIO2_4 gpmc_wen.gpio2[4] + 0x08C 0x37 // P8_18 = Fault_ext 1 = GPIO2_1 + 0x184 0x37 // P9_24 = Fault Z = GPIO0_15 + >; @@ -407,7 +407,7 @@ index 0000000..76253d6 + #size-cells = <0>; + status = "okay"; + pinctrl-names = "default"; -+ pinctrl-0 = <&bone_replicape_spi1_pins>; ++ pinctrl-0 = <&bone_replicape_spi1_pins>; + cs-gpios = <&gpio4 17 0>, <&gpio1 7 0>; + + stepper_control{ @@ -425,7 +425,7 @@ index 0000000..76253d6 + compatible = "spidev"; + reg = <1>; + spi-max-frequency = <16000000>; -+ // Stepper current has mode 0 (CPOL = 0, CPHA = 0) ++ // Stepper current has mode 0 (CPOL = 0, CPHA = 0) + }; + }; + }; @@ -438,38 +438,38 @@ index 0000000..76253d6 + pinctrl-0 = <&pruicss_stepper_pins>; + + stepper_x{ -+ pin-names = "Replic:pru-step_x", "Replic:pru-dir_x"; ++ pin-names = "Replic:pru-step_x", "Replic:pru-dir_x"; + gpios = <&gpio1 27 0 -+ &gpio2 29 0>; -+ }; ++ &gpio2 29 0>; ++ }; + stepper_y{ -+ pin-names = "Replic:pru-step_y", "Replic:pru-dir_y"; ++ pin-names = "Replic:pru-step_y", "Replic:pru-dir_y"; + gpios =<&gpio2 12 0 -+ &gpio1 22 0>; ++ &gpio1 22 0>; + }; + stepper_z{ -+ pin-names = "Replic:pru-step_z", "Replic:pru-dir_z"; ++ pin-names = "Replic:pru-step_z", "Replic:pru-dir_z"; + gpios = <&gpio1 23 0 -+ &gpio1 26 0>; ++ &gpio1 26 0>; + }; + stepper_ext_1{ -+ pin-names = "Replic:pru-step_ext_1", "Replic:pru-dir_ext_1"; ++ pin-names = "Replic:pru-step_ext_1", "Replic:pru-dir_ext_1"; + gpios = <&gpio2 28 0 -+ &gpio2 15 0>; ++ &gpio2 15 0>; + }; + stepper_ext_2{ -+ pin-names = "Replic:pru-step_ext_2", "Replic:pru-dir_ext_2"; ++ pin-names = "Replic:pru-step_ext_2", "Replic:pru-dir_ext_2"; + gpios = <&gpio2 13 0 -+ &gpio2 14 0>; ++ &gpio2 14 0>; + }; + }; + }; + + fragment@3 { + target = <&ocp>; -+ __overlay__ { ++ __overlay__ { + #address-cells = <1>; -+ #size-cells = <1>; ++ #size-cells = <1>; + + tscadc { + compatible = "ti,ti-tscadc"; @@ -499,7 +499,7 @@ index 0000000..76253d6 + linux,code = <1>; + gpios = <&gpio3 2 0x5>; + gpio-key,wakeup; -+ }; ++ }; + switch_x2 { + label = "End-stop-X2"; + debounce_interval = <50>; @@ -513,62 +513,62 @@ index 0000000..76253d6 + linux,code = <3>; + gpios = <&gpio1 30 0x5>; + gpio-key,wakeup; -+ }; ++ }; + switch_y2 { + label = "End-stop-Y2"; + debounce_interval = <50>; + linux,code = <4>; + gpios = <&gpio4 21 0x5>; + gpio-key,wakeup; -+ }; ++ }; + switch_z1 { + label = "End-stop-Z1"; + debounce_interval = <50>; + linux,code = <5>; + gpios = <&gpio1 31 0x5>; + gpio-key,wakeup; -+ }; ++ }; + switch_z2 { + label = "End-stop-Z2"; + debounce_interval = <50>; + linux,code = <6>; + gpios = <&gpio1 4 0x5>; + gpio-key,wakeup; -+ }; ++ }; + fault_x { + label = "Fault-X"; + debounce_interval = <50>; + linux,code = <7>; + gpios = <&gpio3 4 0x5>; -+ gpio-key,wakeup; ++ gpio-key,wakeup; + }; + fault_y { + label = "Fault-Y"; + debounce_interval = <50>; + linux,code = <8>; + gpios = <&gpio3 5 0x5>; -+ gpio-key,wakeup; ++ gpio-key,wakeup; + }; + fault_z { + label = "Fault-Z"; + debounce_interval = <50>; + linux,code = <9>; + gpios = <&gpio1 15 0x5>; -+ gpio-key,wakeup; ++ gpio-key,wakeup; + }; + fault_ext_1 { + label = "Fault-Ext-1"; + debounce_interval = <50>; + linux,code = <10>; + gpios = <&gpio3 1 0x5>; -+ gpio-key,wakeup; ++ gpio-key,wakeup; + }; + fault_ext_2 { + label = "Fault-Ext-2"; + debounce_interval = <50>; + linux,code = <11>; + gpios = <&gpio3 3 0x5>; -+ gpio-key,wakeup; ++ gpio-key,wakeup; + }; + }; + onewire@0 { @@ -582,5 +582,5 @@ index 0000000..76253d6 + }; +}; -- -1.8.2.1 +1.9.0 diff --git a/patches/capes/0019-Added-camera-cape-support-for-Beaglebone-Black.patch b/patches/capes/0019-Added-camera-cape-support-for-Beaglebone-Black.patch new file mode 100644 index 00000000..d58cab5e --- /dev/null +++ b/patches/capes/0019-Added-camera-cape-support-for-Beaglebone-Black.patch @@ -0,0 +1,1407 @@ +From 3c2a1877a1728c8880334f0d3bfc8a77c5a11c92 Mon Sep 17 00:00:00 2001 +From: vvdn +Date: Sat, 23 Nov 2013 08:24:37 -0500 +Subject: [PATCH 19/40] Added camera cape support for Beaglebone Black + +--- + drivers/media/i2c/soc_camera/Kconfig | 6 + + drivers/media/i2c/soc_camera/Makefile | 1 + + drivers/media/i2c/soc_camera/mt9m114.c | 1056 +++++++++++++++++++++++ + drivers/media/platform/soc_camera/cssp_camera.c | 15 + + firmware/Makefile | 1 + + firmware/capes/BB-BONE-CAM-VVDN-00A0.dts | 230 +++++ + include/media/v4l2-chip-ident.h | 1 + + 7 files changed, 1310 insertions(+) + create mode 100644 drivers/media/i2c/soc_camera/mt9m114.c + create mode 100644 firmware/capes/BB-BONE-CAM-VVDN-00A0.dts + +diff --git a/drivers/media/i2c/soc_camera/Kconfig b/drivers/media/i2c/soc_camera/Kconfig +index 6dff2b7..de56e5a 100644 +--- a/drivers/media/i2c/soc_camera/Kconfig ++++ b/drivers/media/i2c/soc_camera/Kconfig +@@ -21,6 +21,12 @@ config SOC_CAMERA_MT9M111 + This driver supports MT9M111, MT9M112 and MT9M131 cameras from + Micron/Aptina + ++config SOC_CAMERA_MT9M114 ++ tristate "Aptina MT9M114 sensor support" ++ depends on VIDEO_V4L2 && I2C ++ ---help--- ++ This driver supports MT9TM114 cameras from Aptina. ++ + config SOC_CAMERA_MT9T031 + tristate "mt9t031 support" + depends on SOC_CAMERA && I2C +diff --git a/drivers/media/i2c/soc_camera/Makefile b/drivers/media/i2c/soc_camera/Makefile +index d0421fe..664fbb0 100644 +--- a/drivers/media/i2c/soc_camera/Makefile ++++ b/drivers/media/i2c/soc_camera/Makefile +@@ -1,6 +1,7 @@ + obj-$(CONFIG_SOC_CAMERA_IMX074) += imx074.o + obj-$(CONFIG_SOC_CAMERA_MT9M001) += mt9m001.o + obj-$(CONFIG_SOC_CAMERA_MT9M111) += mt9m111.o ++obj-$(CONFIG_SOC_CAMERA_MT9M114) += mt9m114.o + obj-$(CONFIG_SOC_CAMERA_MT9T031) += mt9t031.o + obj-$(CONFIG_SOC_CAMERA_MT9T112) += mt9t112.o + obj-$(CONFIG_SOC_CAMERA_MT9V022) += mt9v022.o +diff --git a/drivers/media/i2c/soc_camera/mt9m114.c b/drivers/media/i2c/soc_camera/mt9m114.c +new file mode 100644 +index 0000000..6eab204 +--- /dev/null ++++ b/drivers/media/i2c/soc_camera/mt9m114.c +@@ -0,0 +1,1056 @@ ++/* ++ * mt9m114.c Aptina MT9M114 sensor driver ++ * ++ * Copyright (c) 2013 VVDN Technologies ++ * Copyright (c) 2012 Analog Devices Inc. ++ * ++ * refer to: SoC Camera driver by Andrew Chew ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++/* Sysctl registers */ ++#define MT9M114_CHIP_ID 0x0000 ++#define MT9M114_COMMAND_REGISTER 0x0080 ++#define MT9M114_COMMAND_REGISTER_APPLY_PATCH (1 << 0) ++#define MT9M114_COMMAND_REGISTER_SET_STATE (1 << 1) ++#define MT9M114_COMMAND_REGISTER_REFRESH (1 << 2) ++#define MT9M114_COMMAND_REGISTER_WAIT_FOR_EVENT (1 << 3) ++#define MT9M114_COMMAND_REGISTER_OK (1 << 15) ++#define MT9M114_SOFT_RESET 0x001a ++#define MT9M114_PAD_SLEW 0x001e ++#define MT9M114_PAD_CONTROL 0x0032 ++ ++/* XDMA registers */ ++#define MT9M114_ACCESS_CTL_STAT 0x0982 ++#define MT9M114_PHYSICAL_ADDRESS_ACCESS 0x098a ++#define MT9M114_LOGICAL_ADDRESS_ACCESS 0x098e ++ ++/* Core registers */ ++#define MT9M114_RESET_REGISTER 0x301a ++#define MT9M114_FLASH 0x3046 ++#define MT9M114_CUSTOMER_REV 0x31fe ++ ++/* Camera Control registers */ ++#define MT9M114_CAM_SENSOR_CFG_Y_ADDR_START 0xc800 ++#define MT9M114_CAM_SENSOR_CFG_X_ADDR_START 0xc802 ++#define MT9M114_CAM_SENSOR_CFG_Y_ADDR_END 0xc804 ++#define MT9M114_CAM_SENSOR_CFG_X_ADDR_END 0xc806 ++#define MT9M114_CAM_SENSOR_CFG_PIXCLK 0xc808 ++#define MT9M114_CAM_SENSOR_CFG_ROW_SPEED 0xc80c ++#define MT9M114_CAM_SENSOR_CFG_FINE_INTEG_TIME_MIN 0xc80e ++#define MT9M114_CAM_SENSOR_CFG_FINE_INTEG_TIME_MAX 0xc810 ++#define MT9M114_CAM_SENSOR_CFG_FRAME_LENGTH_LINES 0xc812 ++#define MT9M114_CAM_SENSOR_CFG_LINE_LENGTH_PCK 0xc814 ++#define MT9M114_CAM_SENSOR_CFG_FINE_CORRECTION 0xc816 ++#define MT9M114_CAM_SENSOR_CFG_CPIPE_LAST_ROW 0xc818 ++#define MT9M114_CAM_SENSOR_CFG_REG_0_DATA 0xc826 ++#define MT9M114_CAM_SENSOR_CONTROL_READ_MODE 0xc834 ++#define MT9M114_CAM_CROP_WINDOW_XOFFSET 0xc854 ++#define MT9M114_CAM_CROP_WINDOW_YOFFSET 0xc856 ++#define MT9M114_CAM_CROP_WINDOW_WIDTH 0xc858 ++#define MT9M114_CAM_CROP_WINDOW_HEIGHT 0xc85a ++#define MT9M114_CAM_CROP_CROPMODE 0xc85c ++#define MT9M114_CAM_OUTPUT_WIDTH 0xc868 ++#define MT9M114_CAM_OUTPUT_HEIGHT 0xc86a ++#define MT9M114_CAM_OUTPUT_FORMAT 0xc86c ++#define MT9M114_CAM_AET_AEMODE 0xc878 ++#define MT9M114_CAM_AET_MAX_FRAME_RATE 0xc88c ++#define MT9M114_CAM_AET_MIN_FRAME_RATE 0xc88e ++#define MT9M114_CAM_AWB_AWB_XSCALE 0xc8f2 ++#define MT9M114_CAM_AWB_AWB_YSCALE 0xc8f3 ++#define MT9M114_CAM_AWB_AWB_XSHIFT_PRE_ADJ 0xc904 ++#define MT9M114_CAM_AWB_AWB_YSHIFT_PRE_ADJ 0xc906 ++#define MT9M114_CAM_STAT_AWB_CLIP_WINDOW_XSTART 0xc914 ++#define MT9M114_CAM_STAT_AWB_CLIP_WINDOW_YSTART 0xc916 ++#define MT9M114_CAM_STAT_AWB_CLIP_WINDOW_XEND 0xc918 ++#define MT9M114_CAM_STAT_AWB_CLIP_WINDOW_YEND 0xc91a ++#define MT9M114_CAM_STAT_AE_INITIAL_WINDOW_XSTART 0xc91c ++#define MT9M114_CAM_STAT_AE_INITIAL_WINDOW_YSTART 0xc91e ++#define MT9M114_CAM_STAT_AE_INITIAL_WINDOW_XEND 0xc920 ++#define MT9M114_CAM_STAT_AE_INITIAL_WINDOW_YEND 0xc922 ++#define MT9M114_CAM_SYSCTL_PLL_ENABLE 0xc97e ++#define MT9M114_CAM_SYSCTL_PLL_DIVIDER_M_N 0xc980 ++#define MT9M114_CAM_SYSCTL_PLL_DIVIDER_P 0xc982 ++#define MT9M114_CAM_PORT_OUTPUT_CONTROL 0xc984 ++ ++/* System Manager registers */ ++#define MT9M114_SYSMGR_NEXT_STATE 0xdc00 ++#define MT9M114_SYSMGR_CURRENT_STATE 0xdc01 ++#define MT9M114_SYSMGR_CMD_STATUS 0xdc02 ++ ++/* Patch Loader registers */ ++#define MT9M114_PATCHLDR_LOADER_ADDRESS 0xe000 ++#define MT9M114_PATCHLDR_PATCH_ID 0xe002 ++#define MT9M114_PATCHLDR_FIRMWARE_ID 0xe004 ++#define MT9M114_PATCHLDR_APPLY_STATUS 0xe008 ++#define MT9M114_PATCHLDR_NUM_PATCHES 0xe009 ++#define MT9M114_PATCHLDR_PATCH_ID_0 0xe00a ++#define MT9M114_PATCHLDR_PATCH_ID_1 0xe00c ++#define MT9M114_PATCHLDR_PATCH_ID_2 0xe00e ++#define MT9M114_PATCHLDR_PATCH_ID_3 0xe010 ++#define MT9M114_PATCHLDR_PATCH_ID_4 0xe012 ++#define MT9M114_PATCHLDR_PATCH_ID_5 0xe014 ++#define MT9M114_PATCHLDR_PATCH_ID_6 0xe016 ++#define MT9M114_PATCHLDR_PATCH_ID_7 0xe018 ++ ++/* SYS_STATE values (for SYSMGR_NEXT_STATE and SYSMGR_CURRENT_STATE) */ ++#define MT9M114_SYS_STATE_ENTER_CONFIG_CHANGE 0x28 ++#define MT9M114_SYS_STATE_STREAMING 0x31 ++#define MT9M114_SYS_STATE_START_STREAMING 0x34 ++#define MT9M114_SYS_STATE_ENTER_SUSPEND 0x40 ++#define MT9M114_SYS_STATE_SUSPENDED 0x41 ++#define MT9M114_SYS_STATE_ENTER_STANDBY 0x50 ++#define MT9M114_SYS_STATE_STANDBY 0x52 ++#define MT9M114_SYS_STATE_LEAVE_STANDBY 0x54 ++ ++/* Result status of last SET_STATE comamnd */ ++#define MT9M114_SET_STATE_RESULT_ENOERR 0x00 ++#define MT9M114_SET_STATE_RESULT_EINVAL 0x0c ++#define MT9M114_SET_STATE_RESULT_ENOSPC 0x0d ++ ++#define MAX_FRAME_RATE 30 ++ ++struct mt9m114 { ++ struct v4l2_subdev sd; ++ struct v4l2_ctrl_handler hdl; ++ struct v4l2_fract frame_rate; ++ struct v4l2_mbus_framefmt fmt; ++}; ++ ++struct mt9m114_reg { ++ u16 reg; ++ u32 val; ++ int width; ++}; ++ ++enum { ++ MT9M114_QVGA, ++ MT9M114_VGA, ++ MT9M114_WVGA, ++ MT9M114_720P, ++}; ++ ++struct mt9m114_resolution { ++ unsigned int width; ++ unsigned int height; ++}; ++ ++static const struct mt9m114_resolution mt9m114_resolutions[] = { ++ [MT9M114_QVGA] = { ++ .width = 320, ++ .height = 240, ++ }, ++ [MT9M114_VGA] = { ++ .width = 640, ++ .height = 480, ++ }, ++ [MT9M114_WVGA] = { ++ .width = 800, ++ .height = 480, ++ }, ++ [MT9M114_720P] = { ++ .width = 1280, ++ .height = 720, ++ }, ++}; ++ ++static const struct mt9m114_reg mt9m114_init[] = { ++ { MT9M114_RESET_REGISTER, 0x0218, 2 }, ++ ++ /* PLL settings */ ++ { MT9M114_LOGICAL_ADDRESS_ACCESS, 0x0000, 2 }, ++ { MT9M114_CAM_SYSCTL_PLL_ENABLE, 0x01, 1 }, ++ { MT9M114_CAM_SYSCTL_PLL_DIVIDER_M_N, 0x0118, 2 }, ++ { MT9M114_CAM_SYSCTL_PLL_DIVIDER_P, 0x0700, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_PIXCLK, 0x2DC6C00, 4 }, ++ ++ /* Sensor optimization */ ++ { 0x316A, 0x8270, 2 }, ++ { 0x316C, 0x8270, 2 }, ++ { 0x3ED0, 0x2305, 2 }, ++ { 0x3ED2, 0x77CF, 2 }, ++ { 0x316E, 0x8202, 2 }, ++ { 0x3180, 0x87FF, 2 }, ++ { 0x30D4, 0x6080, 2 }, ++ { 0xA802, 0x0008, 2 }, ++ ++ { 0x3E14, 0xFF39, 2 }, ++ ++ /* APGA */ ++ { 0xC95E, 0x0000, 2 }, ++ ++ /* Camera control module */ ++ { 0xC892, 0x0267, 2 }, ++ { 0xC894, 0xFF1A, 2 }, ++ { 0xC896, 0xFFB3, 2 }, ++ { 0xC898, 0xFF80, 2 }, ++ { 0xC89A, 0x0166, 2 }, ++ { 0xC89C, 0x0003, 2 }, ++ { 0xC89E, 0xFF9A, 2 }, ++ { 0xC8A0, 0xFEB4, 2 }, ++ { 0xC8A2, 0x024D, 2 }, ++ { 0xC8A4, 0x01BF, 2 }, ++ { 0xC8A6, 0xFF01, 2 }, ++ { 0xC8A8, 0xFFF3, 2 }, ++ { 0xC8AA, 0xFF75, 2 }, ++ { 0xC8AC, 0x0198, 2 }, ++ { 0xC8AE, 0xFFFD, 2 }, ++ { 0xC8B0, 0xFF9A, 2 }, ++ { 0xC8B2, 0xFEE7, 2 }, ++ { 0xC8B4, 0x02A8, 2 }, ++ { 0xC8B6, 0x01D9, 2 }, ++ { 0xC8B8, 0xFF26, 2 }, ++ { 0xC8BA, 0xFFF3, 2 }, ++ { 0xC8BC, 0xFFB3, 2 }, ++ { 0xC8BE, 0x0132, 2 }, ++ { 0xC8C0, 0xFFE8, 2 }, ++ { 0xC8C2, 0xFFDA, 2 }, ++ { 0xC8C4, 0xFECD, 2 }, ++ { 0xC8C6, 0x02C2, 2 }, ++ { 0xC8C8, 0x0075, 2 }, ++ { 0xC8CA, 0x011C, 2 }, ++ { 0xC8CC, 0x009A, 2 }, ++ { 0xC8CE, 0x0105, 2 }, ++ { 0xC8D0, 0x00A4, 2 }, ++ { 0xC8D2, 0x00AC, 2 }, ++ { 0xC8D4, 0x0A8C, 2 }, ++ { 0xC8D6, 0x0F0A, 2 }, ++ { 0xC8D8, 0x1964, 2 }, ++ ++ /* Automatic White balance */ ++ { MT9M114_CAM_AWB_AWB_XSHIFT_PRE_ADJ, 0x0033, 2 }, ++ { MT9M114_CAM_AWB_AWB_YSHIFT_PRE_ADJ, 0x003C, 2 }, ++ { MT9M114_CAM_AWB_AWB_XSCALE, 0x03, 1 }, ++ { MT9M114_CAM_AWB_AWB_YSCALE, 0x02, 1 }, ++ { 0xC8F4, 0x0000, 2 }, ++ { 0xC8F6, 0x0000, 2 }, ++ { 0xC8F8, 0x0000, 2 }, ++ { 0xC8FA, 0xE724, 2 }, ++ { 0xC8FC, 0x1583, 2 }, ++ { 0xC8FE, 0x2045, 2 }, ++ { 0xC900, 0x03FF, 2 }, ++ { 0xC902, 0x007C, 2 }, ++ { 0xC90C, 0x80, 1 }, ++ { 0xC90D, 0x80, 1 }, ++ { 0xC90E, 0x80, 1 }, ++ { 0xC90F, 0x88, 1 }, ++ { 0xC910, 0x80, 1 }, ++ { 0xC911, 0x80, 1 }, ++ ++ /* CPIPE Preference */ ++ { 0xC926, 0x0020, 2 }, ++ { 0xC928, 0x009A, 2 }, ++ { 0xC946, 0x0070, 2 }, ++ { 0xC948, 0x00F3, 2 }, ++ { 0xC944, 0x20, 1 }, ++ { 0xC945, 0x9A, 1 }, ++ { 0xC92A, 0x80, 1 }, ++ { 0xC92B, 0x4B, 1 }, ++ { 0xC92C, 0x00, 1 }, ++ { 0xC92D, 0xFF, 1 }, ++ { 0xC92E, 0x3C, 1 }, ++ { 0xC92F, 0x02, 1 }, ++ { 0xC930, 0x06, 1 }, ++ { 0xC931, 0x64, 1 }, ++ { 0xC932, 0x01, 1 }, ++ { 0xC933, 0x0C, 1 }, ++ { 0xC934, 0x3C, 1 }, ++ { 0xC935, 0x3C, 1 }, ++ { 0xC936, 0x3C, 1 }, ++ { 0xC937, 0x0F, 1 }, ++ { 0xC938, 0x64, 1 }, ++ { 0xC939, 0x64, 1 }, ++ { 0xC93A, 0x64, 1 }, ++ { 0xC93B, 0x32, 1 }, ++ { 0xC93C, 0x0020, 2 }, ++ { 0xC93E, 0x009A, 2 }, ++ { 0xC940, 0x00DC, 2 }, ++ { 0xC942, 0x38, 1 }, ++ { 0xC943, 0x30, 1 }, ++ { 0xC944, 0x50, 1 }, ++ { 0xC945, 0x19, 1 }, ++ { 0xC94A, 0x0230, 2 }, ++ { 0xC94C, 0x0010, 2 }, ++ { 0xC94E, 0x01CD, 2 }, ++ { 0xC950, 0x05, 1 }, ++ { 0xC951, 0x40, 1 }, ++ { 0xC87B, 0x1B, 1 }, ++ { MT9M114_CAM_AET_AEMODE, 0x0E, 1 }, ++ { 0xC890, 0x0080, 2 }, ++ { 0xC886, 0x0100, 2 }, ++ { 0xC87C, 0x005A, 2 }, ++ { 0xB42A, 0x05, 1 }, ++ { 0xA80A, 0x20, 1 }, ++ ++ { MT9M114_LOGICAL_ADDRESS_ACCESS, 0x0000, 2 }, ++ { MT9M114_CAM_PORT_OUTPUT_CONTROL, 0x8040, 2 }, ++ { MT9M114_PAD_SLEW, 0x0777, 2 }, ++}; ++ ++static const struct mt9m114_reg mt9m114_regs_qvga[] = { ++ { MT9M114_LOGICAL_ADDRESS_ACCESS, 0x1000, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_Y_ADDR_START, 0x0000, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_X_ADDR_START, 0x0000, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_Y_ADDR_END, 0x03CD, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_X_ADDR_END, 0x050D, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_ROW_SPEED, 0x0001, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_FINE_INTEG_TIME_MIN, 0x01C3, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_FINE_INTEG_TIME_MAX, 0x03F7, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_FRAME_LENGTH_LINES, 0x0500, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_LINE_LENGTH_PCK, 0x04E2, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_FINE_CORRECTION, 0x00E0, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_CPIPE_LAST_ROW, 0x01E3, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_REG_0_DATA, 0x0020, 2 }, ++ { MT9M114_CAM_CROP_WINDOW_XOFFSET, 0x0000, 2 }, ++ { MT9M114_CAM_CROP_WINDOW_YOFFSET, 0x0000, 2 }, ++ { MT9M114_CAM_CROP_WINDOW_WIDTH, 0x0280, 2 }, ++ { MT9M114_CAM_CROP_WINDOW_HEIGHT, 0x01E0, 2 }, ++ { MT9M114_CAM_CROP_CROPMODE, 0x03, 1 }, ++ { MT9M114_CAM_OUTPUT_WIDTH, 0x0140, 2 }, ++ { MT9M114_CAM_OUTPUT_HEIGHT, 0x00F0, 2 }, ++ { MT9M114_CAM_AET_AEMODE, 0x00, 1 }, ++ { MT9M114_CAM_STAT_AWB_CLIP_WINDOW_XSTART, 0x0000, 2 }, ++ { MT9M114_CAM_STAT_AWB_CLIP_WINDOW_YSTART, 0x0000, 2 }, ++ { MT9M114_CAM_STAT_AWB_CLIP_WINDOW_XEND, 0x013F, 2 }, ++ { MT9M114_CAM_STAT_AWB_CLIP_WINDOW_YEND, 0x00EF, 2 }, ++ { MT9M114_CAM_STAT_AE_INITIAL_WINDOW_XSTART, 0x0000, 2 }, ++ { MT9M114_CAM_STAT_AE_INITIAL_WINDOW_YSTART, 0x0000, 2 }, ++ { MT9M114_CAM_STAT_AE_INITIAL_WINDOW_XEND, 0x003F, 2 }, ++ { MT9M114_CAM_STAT_AE_INITIAL_WINDOW_YEND, 0x002F, 2 }, ++}; ++ ++static const struct mt9m114_reg mt9m114_regs_vga[] = { ++ { MT9M114_LOGICAL_ADDRESS_ACCESS, 0x1000, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_Y_ADDR_START, 0x0000, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_X_ADDR_START, 0x0000, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_Y_ADDR_END, 0x03CD, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_X_ADDR_END, 0x050D, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_ROW_SPEED, 0x0001, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_FINE_INTEG_TIME_MIN, 0x01C3, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_FINE_INTEG_TIME_MAX, 0x03F7, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_FRAME_LENGTH_LINES, 0x0500, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_LINE_LENGTH_PCK, 0x04E2, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_FINE_CORRECTION, 0x00E0, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_CPIPE_LAST_ROW, 0x01E3, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_REG_0_DATA, 0x0020, 2 }, ++ { MT9M114_CAM_CROP_WINDOW_XOFFSET, 0x0000, 2 }, ++ { MT9M114_CAM_CROP_WINDOW_YOFFSET, 0x0000, 2 }, ++ { MT9M114_CAM_CROP_WINDOW_WIDTH, 0x0280, 2 }, ++ { MT9M114_CAM_CROP_WINDOW_HEIGHT, 0x01E0, 2 }, ++ { MT9M114_CAM_CROP_CROPMODE, 0x03, 1 }, ++ { MT9M114_CAM_OUTPUT_WIDTH, 0x0280, 2 }, ++ { MT9M114_CAM_OUTPUT_HEIGHT, 0x01E0, 2 }, ++ { MT9M114_CAM_AET_AEMODE, 0x00, 1 }, ++ { MT9M114_CAM_STAT_AWB_CLIP_WINDOW_XSTART, 0x0000, 2 }, ++ { MT9M114_CAM_STAT_AWB_CLIP_WINDOW_YSTART, 0x0000, 2 }, ++ { MT9M114_CAM_STAT_AWB_CLIP_WINDOW_XEND, 0x027F, 2 }, ++ { MT9M114_CAM_STAT_AWB_CLIP_WINDOW_YEND, 0x01DF, 2 }, ++ { MT9M114_CAM_STAT_AE_INITIAL_WINDOW_XSTART, 0x0000, 2 }, ++ { MT9M114_CAM_STAT_AE_INITIAL_WINDOW_YSTART, 0x0000, 2 }, ++ { MT9M114_CAM_STAT_AE_INITIAL_WINDOW_XEND, 0x007F, 2 }, ++ { MT9M114_CAM_STAT_AE_INITIAL_WINDOW_YEND, 0x005F, 2 }, ++}; ++ ++static const struct mt9m114_reg mt9m114_regs_wvga[] = { ++ { MT9M114_LOGICAL_ADDRESS_ACCESS, 0x1000, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_Y_ADDR_START, 0x00F4, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_X_ADDR_START, 0x00F4, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_Y_ADDR_END, 0x02DB, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_X_ADDR_END, 0x041B, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_ROW_SPEED, 0x0001, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_FINE_INTEG_TIME_MIN, 0x00DB, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_FINE_INTEG_TIME_MAX, 0x045F, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_FRAME_LENGTH_LINES, 0x0500, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_LINE_LENGTH_PCK, 0x04E2, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_FINE_CORRECTION, 0x0060, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_CPIPE_LAST_ROW, 0x01E3, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_REG_0_DATA, 0x0020, 2 }, ++ { MT9M114_CAM_CROP_WINDOW_XOFFSET, 0x0000, 2 }, ++ { MT9M114_CAM_CROP_WINDOW_YOFFSET, 0x0000, 2 }, ++ { MT9M114_CAM_CROP_WINDOW_WIDTH, 0x0320, 2 }, ++ { MT9M114_CAM_CROP_WINDOW_HEIGHT, 0x01E0, 2 }, ++ { MT9M114_CAM_CROP_CROPMODE, 0x03, 1 }, ++ { MT9M114_CAM_OUTPUT_WIDTH, 0x0320, 2 }, ++ { MT9M114_CAM_OUTPUT_HEIGHT, 0x01E0, 2 }, ++ { MT9M114_CAM_AET_AEMODE, 0x00, 1 }, ++ { MT9M114_CAM_STAT_AWB_CLIP_WINDOW_XSTART, 0x0000, 2 }, ++ { MT9M114_CAM_STAT_AWB_CLIP_WINDOW_YSTART, 0x0000, 2 }, ++ { MT9M114_CAM_STAT_AWB_CLIP_WINDOW_XEND, 0x031F, 2 }, ++ { MT9M114_CAM_STAT_AWB_CLIP_WINDOW_YEND, 0x01DF, 2 }, ++ { MT9M114_CAM_STAT_AE_INITIAL_WINDOW_XSTART, 0x0000, 2 }, ++ { MT9M114_CAM_STAT_AE_INITIAL_WINDOW_YSTART, 0x0000, 2 }, ++ { MT9M114_CAM_STAT_AE_INITIAL_WINDOW_XEND, 0x009F, 2 }, ++ { MT9M114_CAM_STAT_AE_INITIAL_WINDOW_YEND, 0x005F, 2 }, ++}; ++ ++static const struct mt9m114_reg mt9m114_regs_720p[] = { ++ { MT9M114_LOGICAL_ADDRESS_ACCESS, 0x1000, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_Y_ADDR_START, 0x0004, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_X_ADDR_START, 0x0004, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_Y_ADDR_END, 0x03CB, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_X_ADDR_END, 0x050B, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_ROW_SPEED, 0x0001, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_FINE_INTEG_TIME_MIN, 0x00DB, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_FINE_INTEG_TIME_MAX, 0x05B3, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_FRAME_LENGTH_LINES, 0x03EE, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_LINE_LENGTH_PCK, 0x0636, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_FINE_CORRECTION, 0x0060, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_CPIPE_LAST_ROW, 0x03C3, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_REG_0_DATA, 0x0020, 2 }, ++ { MT9M114_CAM_CROP_WINDOW_XOFFSET, 0x0000, 2 }, ++ { MT9M114_CAM_CROP_WINDOW_YOFFSET, 0x0000, 2 }, ++ { MT9M114_CAM_CROP_WINDOW_WIDTH, 0x0500, 2 }, ++ { MT9M114_CAM_CROP_WINDOW_HEIGHT, 0x03C0, 2 }, ++ { MT9M114_CAM_CROP_CROPMODE, 0x03, 1 }, ++ { MT9M114_CAM_OUTPUT_WIDTH, 0x0500, 2 }, ++ { MT9M114_CAM_OUTPUT_HEIGHT, 0x02D0, 2 }, ++ { MT9M114_CAM_AET_AEMODE, 0x00, 1 }, ++ { MT9M114_CAM_STAT_AWB_CLIP_WINDOW_XSTART, 0x0000, 2 }, ++ { MT9M114_CAM_STAT_AWB_CLIP_WINDOW_YSTART, 0x0000, 2 }, ++ { MT9M114_CAM_STAT_AWB_CLIP_WINDOW_XEND, 0x04FF, 2 }, ++ { MT9M114_CAM_STAT_AWB_CLIP_WINDOW_YEND, 0x02CF, 2 }, ++ { MT9M114_CAM_STAT_AE_INITIAL_WINDOW_XSTART, 0x0000, 2 }, ++ { MT9M114_CAM_STAT_AE_INITIAL_WINDOW_YSTART, 0x0000, 2 }, ++ { MT9M114_CAM_STAT_AE_INITIAL_WINDOW_XEND, 0x00FF, 2 }, ++ { MT9M114_CAM_STAT_AE_INITIAL_WINDOW_YEND, 0x008F, 2 }, ++}; ++ ++static const struct mt9m114_format { ++ enum v4l2_mbus_pixelcode mbus_code; ++ enum v4l2_colorspace colorspace; ++} mt9m114_formats[] = { ++ { ++ .mbus_code = V4L2_MBUS_FMT_UYVY8_2X8, ++ .colorspace = V4L2_COLORSPACE_JPEG, ++ }, ++ { ++ .mbus_code = V4L2_MBUS_FMT_YUYV8_2X8, ++ .colorspace = V4L2_COLORSPACE_JPEG, ++ }, ++ { ++ .mbus_code = V4L2_MBUS_FMT_RGB565_2X8_LE, ++ .colorspace = V4L2_COLORSPACE_SRGB, ++ }, ++}; ++ ++static inline struct mt9m114 *to_mt9m114(struct v4l2_subdev *sd) ++{ ++ return container_of(sd, struct mt9m114, sd); ++} ++static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl *ctrl) ++{ ++ return &container_of(ctrl->handler, struct mt9m114, hdl)->sd; ++} ++ ++static int mt9m114_write8(struct i2c_client *client, u16 reg, u8 val) ++{ ++ int ret; ++ struct { ++ u16 reg; ++ u8 val; ++ } __packed buf; ++ struct i2c_msg msg = { ++ .addr = client->addr, ++ .flags = 0, ++ .len = 3, ++ .buf = (u8 *)&buf, ++ }; ++ buf.reg = swab16(reg); ++ buf.val = val; ++ ++ ret = i2c_transfer(client->adapter, &msg, 1); ++ if (ret < 0) { ++ v4l_err(client, "Failed to write register 0x%04x!\n", reg); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int mt9m114_read16(struct i2c_client *client, u16 reg, u16 *val) ++{ ++ int ret; ++ u16 rval; ++ struct i2c_msg msg[] = { ++ { ++ .addr = client->addr, ++ .flags = 0, ++ .len = 2, ++ .buf = (u8 *)®, ++ }, ++ { ++ .addr = client->addr, ++ .flags = I2C_M_RD, ++ .len = 2, ++ .buf = (u8 *)&rval, ++ }, ++ }; ++ ++ reg = swab16(reg); ++ ++ ret = i2c_transfer(client->adapter, msg, 2); ++ if (ret < 0) { ++ v4l_err(client, "Failed to read register 0x%04x!\n", reg); ++ return ret; ++ } ++ *val = swab16(rval); ++ ++ return 0; ++} ++ ++static int mt9m114_write16(struct i2c_client *client, u16 reg, u16 val) ++{ ++ int ret; ++ struct { ++ u16 reg; ++ u16 val; ++ } __packed buf; ++ struct i2c_msg msg = { ++ .addr = client->addr, ++ .flags = 0, ++ .len = 4, ++ .buf = (u8 *)&buf, ++ }; ++ buf.reg = swab16(reg); ++ buf.val = swab16(val); ++ ++ ret = i2c_transfer(client->adapter, &msg, 1); ++ if (ret < 0) { ++ v4l_err(client, "Failed to write register 0x%04x!\n", reg); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int mt9m114_write32(struct i2c_client *client, u16 reg, u32 val) ++{ ++ int ret; ++ struct { ++ u16 reg; ++ u32 val; ++ } __packed buf; ++ struct i2c_msg msg = { ++ .addr = client->addr, ++ .flags = 0, ++ .len = 6, ++ .buf = (u8 *)&buf, ++ }; ++ buf.reg = swab16(reg); ++ buf.val = swab32(val); ++ ++ ret = i2c_transfer(client->adapter, &msg, 1); ++ if (ret < 0) { ++ v4l_err(client, "Failed to write register 0x%04x!\n", reg); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int mt9m114_writeregs(struct i2c_client *client, ++ const struct mt9m114_reg *regs, int len) ++{ ++ int i, ret; ++ ++ for (i = 0; i < len; i++) { ++ switch (regs[i].width) { ++ case 1: ++ ret = mt9m114_write8(client, ++ regs[i].reg, regs[i].val); ++ break; ++ case 2: ++ ret = mt9m114_write16(client, ++ regs[i].reg, regs[i].val); ++ break; ++ case 4: ++ ret = mt9m114_write32(client, ++ regs[i].reg, regs[i].val); ++ break; ++ default: ++ ret = -EINVAL; ++ break; ++ } ++ if (ret < 0) ++ return ret; ++ } ++ return 0; ++} ++ ++static void mt9m114_res_roundup(u32 *width, u32 *height) ++{ ++ int i; ++ ++ for (i = 0; i < ARRAY_SIZE(mt9m114_resolutions); i++) ++ if ((mt9m114_resolutions[i].width >= *width) && ++ (mt9m114_resolutions[i].height >= *height)) { ++ *width = mt9m114_resolutions[i].width; ++ *height = mt9m114_resolutions[i].height; ++ return; ++ } ++ *width = mt9m114_resolutions[MT9M114_720P].width; ++ *height = mt9m114_resolutions[MT9M114_720P].height; ++} ++ ++static int mt9m114_set_res(struct i2c_client *client, u32 width, u32 height) ++{ ++ u16 read_mode; ++ ++ if ((width == mt9m114_resolutions[MT9M114_QVGA].width) ++ && (height == mt9m114_resolutions[MT9M114_QVGA].height)) { ++ mt9m114_writeregs(client, mt9m114_regs_qvga, ++ ARRAY_SIZE(mt9m114_regs_qvga)); ++ mt9m114_read16(client, ++ MT9M114_CAM_SENSOR_CONTROL_READ_MODE, &read_mode); ++ read_mode = (read_mode & 0xfccf) | 0x0330; ++ mt9m114_write16(client, ++ MT9M114_CAM_SENSOR_CONTROL_READ_MODE, read_mode); ++ } else if ((width == mt9m114_resolutions[MT9M114_VGA].width) ++ && (height == mt9m114_resolutions[MT9M114_VGA].height)) { ++ mt9m114_writeregs(client, mt9m114_regs_vga, ++ ARRAY_SIZE(mt9m114_regs_vga)); ++ mt9m114_read16(client, ++ MT9M114_CAM_SENSOR_CONTROL_READ_MODE, &read_mode); ++ read_mode = (read_mode & 0xfccf) | 0x0330; ++ mt9m114_write16(client, ++ MT9M114_CAM_SENSOR_CONTROL_READ_MODE, read_mode); ++ } else if ((width == mt9m114_resolutions[MT9M114_WVGA].width) ++ && (height == mt9m114_resolutions[MT9M114_WVGA].height)) { ++ mt9m114_writeregs(client, mt9m114_regs_wvga, ++ ARRAY_SIZE(mt9m114_regs_wvga)); ++ mt9m114_read16(client, ++ MT9M114_CAM_SENSOR_CONTROL_READ_MODE, &read_mode); ++ read_mode &= 0xfccf; ++ mt9m114_write16(client, ++ MT9M114_CAM_SENSOR_CONTROL_READ_MODE, read_mode); ++ } else if ((width == mt9m114_resolutions[MT9M114_720P].width) ++ && (height == mt9m114_resolutions[MT9M114_720P].height)) { ++ mt9m114_writeregs(client, mt9m114_regs_720p, ++ ARRAY_SIZE(mt9m114_regs_720p)); ++ mt9m114_read16(client, ++ MT9M114_CAM_SENSOR_CONTROL_READ_MODE, &read_mode); ++ read_mode &= 0xfccf; ++ mt9m114_write16(client, ++ MT9M114_CAM_SENSOR_CONTROL_READ_MODE, read_mode); ++ } else { ++ v4l_err(client, "Failed to select resolution!\n"); ++ return -EINVAL; ++ } ++ return 0; ++} ++ ++static int mt9m114_set_state(struct i2c_client *client, u8 next_state) ++{ ++ int timeout = 100, ret; ++ u16 command; ++ ++ /* set the next desired state */ ++ ret = mt9m114_write8(client, MT9M114_SYSMGR_NEXT_STATE, next_state); ++ if (ret < 0) ++ return ret; ++ ++ /* start state transition */ ++ ret = mt9m114_write16(client, MT9M114_COMMAND_REGISTER, ++ (MT9M114_COMMAND_REGISTER_OK ++ | MT9M114_COMMAND_REGISTER_SET_STATE)); ++ if (ret < 0) ++ return ret; ++ ++ /* wait for the state transition to complete */ ++ while (timeout) { ++ ret = mt9m114_read16(client, ++ MT9M114_COMMAND_REGISTER, &command); ++ if (ret < 0) ++ return ret; ++ if (!(command & MT9M114_COMMAND_REGISTER_SET_STATE)) ++ break; ++ msleep(10); ++ timeout--; ++ } ++ if (!timeout) { ++ v4l_err(client, "Failed to poll command register\n"); ++ return -ETIMEDOUT; ++ } ++ ++ /* check if the command is successful */ ++ ret = mt9m114_read16(client, ++ MT9M114_COMMAND_REGISTER, &command); ++ if (ret < 0) ++ return ret; ++ if (command & MT9M114_COMMAND_REGISTER_OK) ++ return 0; ++ else ++ return -EFAULT; ++} ++ ++static int mt9m114_s_ctrl(struct v4l2_ctrl *ctrl) ++{ ++ struct v4l2_subdev *sd = to_sd(ctrl); ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ ++ switch (ctrl->id) { ++ case V4L2_CID_HFLIP: ++ { ++ u16 read_mode; ++ mt9m114_read16(client, ++ MT9M114_CAM_SENSOR_CONTROL_READ_MODE, &read_mode); ++ read_mode = (read_mode & 0xfffe) | ctrl->val; ++ mt9m114_write16(client, ++ MT9M114_CAM_SENSOR_CONTROL_READ_MODE, read_mode); ++ break; ++ } ++ case V4L2_CID_VFLIP: ++ { ++ u16 read_mode; ++ mt9m114_read16(client, ++ MT9M114_CAM_SENSOR_CONTROL_READ_MODE, &read_mode); ++ read_mode = (read_mode & 0xfffd) | (ctrl->val << 1); ++ mt9m114_write16(client, ++ MT9M114_CAM_SENSOR_CONTROL_READ_MODE, read_mode); ++ break; ++ } ++ default: ++ return -EINVAL; ++ } ++ ++ return 0; ++} ++ ++static int mt9m114_enum_mbus_fmt(struct v4l2_subdev *sd, unsigned index, ++ enum v4l2_mbus_pixelcode *code) ++{ ++ if (index >= ARRAY_SIZE(mt9m114_formats)) ++ return -EINVAL; ++ ++ *code = mt9m114_formats[index].mbus_code; ++ return 0; ++} ++ ++static int mt9m114_try_mbus_fmt(struct v4l2_subdev *sd, ++ struct v4l2_mbus_framefmt *fmt) ++{ ++ int index; ++ ++ for (index = 0; index < ARRAY_SIZE(mt9m114_formats); index++) ++ if (mt9m114_formats[index].mbus_code == fmt->code) ++ break; ++ if (index >= ARRAY_SIZE(mt9m114_formats)) { ++ /* default to first format */ ++ index = 0; ++ fmt->code = mt9m114_formats[0].mbus_code; ++ } ++ mt9m114_res_roundup(&fmt->width, &fmt->height); ++ ++ fmt->field = V4L2_FIELD_NONE; ++ fmt->colorspace = mt9m114_formats[index].colorspace; ++ return 0; ++} ++ ++static int mt9m114_s_mbus_fmt(struct v4l2_subdev *sd, ++ struct v4l2_mbus_framefmt *fmt) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct mt9m114 *sensor = to_mt9m114(sd); ++ u16 output_fmt; ++ int ret; ++ ++ mt9m114_try_mbus_fmt(sd, fmt); ++ ++ /* set image size */ ++ ret = mt9m114_set_res(client, fmt->width, fmt->height); ++ if (ret < 0) ++ return ret; ++ ++ /* set image format */ ++ ret = mt9m114_read16(client, MT9M114_CAM_OUTPUT_FORMAT, &output_fmt); ++ if (ret < 0) ++ return ret; ++ output_fmt &= 0xc0fc; ++ switch (fmt->code) { ++ case V4L2_MBUS_FMT_UYVY8_2X8: ++ output_fmt |= 0x0002; ++ break; ++ case V4L2_MBUS_FMT_YUYV8_2X8: ++ break; ++ case V4L2_MBUS_FMT_RGB565_2X8_LE: ++ output_fmt |= 0x0102; ++ break; ++ case V4L2_MBUS_FMT_RGB565_2X8_BE: ++ output_fmt |= 0x0100; ++ break; ++ default: ++ return -EINVAL; ++ } ++ ret = mt9m114_write16(client, MT9M114_CAM_OUTPUT_FORMAT, output_fmt); ++ if (ret < 0) ++ return ret; ++ ++ sensor->fmt = *fmt; ++ ++ return 0; ++} ++ ++static int mt9m114_g_mbus_fmt(struct v4l2_subdev *sd, ++ struct v4l2_mbus_framefmt *fmt) ++{ ++ struct mt9m114 *sensor = to_mt9m114(sd); ++ ++ *fmt = sensor->fmt; ++ return 0; ++} ++ ++static int mt9m114_g_parm(struct v4l2_subdev *sd, ++ struct v4l2_streamparm *parms) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct v4l2_captureparm *cp = &parms->parm.capture; ++ u16 frame_rate; ++ ++ if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ++ return -EINVAL; ++ ++ memset(cp, 0, sizeof(*cp)); ++ cp->capability = V4L2_CAP_TIMEPERFRAME; ++ cp->timeperframe.numerator = 1; ++ mt9m114_read16(client, MT9M114_CAM_AET_MAX_FRAME_RATE, &frame_rate); ++ cp->timeperframe.denominator = frame_rate >> 8; ++ return 0; ++} ++ ++static int mt9m114_s_parm(struct v4l2_subdev *sd, ++ struct v4l2_streamparm *parms) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ struct v4l2_captureparm *cp = &parms->parm.capture; ++ struct v4l2_fract *tpf = &cp->timeperframe; ++ u16 frame_rate; ++ ++ if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ++ return -EINVAL; ++ if (cp->extendedmode != 0) ++ return -EINVAL; ++ ++ if (tpf->numerator == 0 || tpf->denominator == 0 ++ || (tpf->denominator > tpf->numerator * MAX_FRAME_RATE)) { ++ /* reset to max frame rate */ ++ tpf->numerator = 1; ++ tpf->denominator = MAX_FRAME_RATE; ++ } ++ frame_rate = (tpf->denominator / tpf->numerator) << 8; ++ mt9m114_write16(client, MT9M114_CAM_AET_MAX_FRAME_RATE, frame_rate); ++ mt9m114_write16(client, MT9M114_CAM_AET_MIN_FRAME_RATE, frame_rate); ++ return 0; ++} ++ ++static int mt9m114_s_stream(struct v4l2_subdev *sd, int enable) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ int ret; ++ ++ ret = mt9m114_set_state(client, ++ MT9M114_SYS_STATE_ENTER_CONFIG_CHANGE); ++ if (ret < 0) ++ return ret; ++ if (enable) ++ ret = mt9m114_set_state(client, ++ MT9M114_SYS_STATE_START_STREAMING); ++ else ++ ret = mt9m114_set_state(client, ++ MT9M114_SYS_STATE_ENTER_SUSPEND); ++ return ret; ++} ++ ++static int mt9m114_g_chip_ident(struct v4l2_subdev *sd, ++ struct v4l2_dbg_chip_ident *chip) ++{ ++ u16 rev; ++ struct i2c_client *client = v4l2_get_subdevdata(sd); ++ ++ mt9m114_read16(client, MT9M114_CUSTOMER_REV, &rev); ++ ++ return v4l2_chip_ident_i2c_client(client, chip, ++ V4L2_IDENT_MT9M114, rev); ++} ++ ++static const struct v4l2_ctrl_ops mt9m114_ctrl_ops = { ++ .s_ctrl = mt9m114_s_ctrl, ++}; ++ ++static const struct v4l2_subdev_core_ops mt9m114_core_ops = { ++ .g_chip_ident = mt9m114_g_chip_ident, ++}; ++ ++static const struct v4l2_subdev_video_ops mt9m114_video_ops = { ++ .enum_mbus_fmt = mt9m114_enum_mbus_fmt, ++ .try_mbus_fmt = mt9m114_try_mbus_fmt, ++ .s_mbus_fmt = mt9m114_s_mbus_fmt, ++ .g_mbus_fmt = mt9m114_g_mbus_fmt, ++ .s_parm = mt9m114_s_parm, ++ .g_parm = mt9m114_g_parm, ++ .s_stream = mt9m114_s_stream, ++}; ++ ++static const struct v4l2_subdev_ops mt9m114_ops = { ++ .core = &mt9m114_core_ops, ++ .video = &mt9m114_video_ops, ++}; ++ ++static int mt9m114_probe(struct i2c_client *client, ++ const struct i2c_device_id *id) ++{ ++ struct mt9m114 *sensor; ++ struct v4l2_subdev *sd; ++ struct v4l2_ctrl_handler *hdl; ++ u16 chip_id, command, output_control; ++ struct v4l2_mbus_framefmt default_fmt; ++ int ret; ++ ++ /* check if the adapter supports the needed features */ ++ if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) ++ return -EIO; ++ ++ ret = mt9m114_read16(client, MT9M114_CHIP_ID, &chip_id); ++ if (ret < 0) { ++ v4l_err(client, "Failed to get chip id\n"); ++ return -ENODEV; ++ } ++ if (chip_id != 0x2481) { ++ v4l_err(client, "chip id 0x%04x mismatch\n", chip_id); ++ return -ENODEV; ++ } ++ ++ /* reset the sensor */ ++ ret = mt9m114_write16(client, MT9M114_SOFT_RESET, 0x0001); ++ if (ret < 0) { ++ v4l_err(client, "Failed to reset the sensor\n"); ++ return ret; ++ } ++ mt9m114_write16(client, MT9M114_SOFT_RESET, 0x0000); ++ mdelay(50); ++ ++ do { ++ ret = mt9m114_read16(client, ++ MT9M114_COMMAND_REGISTER, &command); ++ if (ret < 0) ++ return ret; ++ } while (command & MT9M114_COMMAND_REGISTER_SET_STATE); ++ ret = mt9m114_writeregs(client, mt9m114_init, ++ ARRAY_SIZE(mt9m114_init)); ++ if (ret < 0) { ++ v4l_err(client, "Failed to initialize the sensor\n"); ++ return ret; ++ } ++ ++ /* set the sensor in parallel data output mode */ ++ mt9m114_read16(client, MT9M114_CAM_PORT_OUTPUT_CONTROL, ++ &output_control); ++ output_control &= 0xfff8; ++ mt9m114_write16(client, MT9M114_CAM_PORT_OUTPUT_CONTROL, ++ output_control); ++ mt9m114_set_state(client, MT9M114_SYS_STATE_ENTER_CONFIG_CHANGE); ++ ++ sensor = kzalloc(sizeof(*sensor), GFP_KERNEL); ++ if (sensor == NULL) ++ return -ENOMEM; ++ ++ sd = &sensor->sd; ++ v4l2_i2c_subdev_init(sd, client, &mt9m114_ops); ++ ++ default_fmt.width = mt9m114_resolutions[MT9M114_VGA].width; ++ default_fmt.height = mt9m114_resolutions[MT9M114_VGA].height; ++ default_fmt.code = V4L2_MBUS_FMT_YUYV8_2X8; ++ ret = mt9m114_s_mbus_fmt(sd, &default_fmt); ++ if (ret < 0) { ++ v4l_err(client, "Failed to set default format\n"); ++ kfree(sensor); ++ return -EFAULT; ++ } ++ ++ v4l_info(client, "chip found @ 0x%02x (%s)\n", ++ client->addr << 1, client->adapter->name); ++ ++ hdl = &sensor->hdl; ++ v4l2_ctrl_handler_init(hdl, 2); ++ v4l2_ctrl_new_std(hdl, &mt9m114_ctrl_ops, ++ V4L2_CID_HFLIP, 0, 1, 1, 0); ++ v4l2_ctrl_new_std(hdl, &mt9m114_ctrl_ops, ++ V4L2_CID_VFLIP, 0, 1, 1, 0); ++ /* hook the control handler into the driver */ ++ sd->ctrl_handler = hdl; ++ if (hdl->error) { ++ int err = hdl->error; ++ ++ v4l2_ctrl_handler_free(hdl); ++ kfree(sensor); ++ return err; ++ } ++ ++ /* initialize the hardware to the default control values */ ++ ret = v4l2_ctrl_handler_setup(hdl); ++ if (ret) { ++ v4l2_ctrl_handler_free(hdl); ++ kfree(sensor); ++ } ++ ++ return ret; ++} ++ ++static int mt9m114_remove(struct i2c_client *client) ++{ ++ struct v4l2_subdev *sd = i2c_get_clientdata(client); ++ struct mt9m114 *sensor = to_mt9m114(sd); ++ ++ v4l2_device_unregister_subdev(sd); ++ v4l2_ctrl_handler_free(sd->ctrl_handler); ++ kfree(sensor); ++ return 0; ++} ++ ++static const struct i2c_device_id mt9m114_id[] = { ++ {"mt9m114", 0}, ++ {}, ++}; ++ ++MODULE_DEVICE_TABLE(i2c, mt9m114_id); ++ ++static struct i2c_driver mt9m114_driver = { ++ .driver = { ++ .owner = THIS_MODULE, ++ .name = "mt9m114", ++ }, ++ .probe = mt9m114_probe, ++ .remove = mt9m114_remove, ++ .id_table = mt9m114_id, ++}; ++ ++module_i2c_driver(mt9m114_driver); ++ ++MODULE_DESCRIPTION("Aptina MT9M114 sensor driver"); ++MODULE_AUTHOR("Scott Jiang "); ++MODULE_LICENSE("GPL v2"); +diff --git a/drivers/media/platform/soc_camera/cssp_camera.c b/drivers/media/platform/soc_camera/cssp_camera.c +index 9cee142..743b1cd 100644 +--- a/drivers/media/platform/soc_camera/cssp_camera.c ++++ b/drivers/media/platform/soc_camera/cssp_camera.c +@@ -1093,9 +1093,18 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv, + dev_dbg(&dev->pdev->dev, "width=%u height=%u byteperline=%u\n", + dev->width, dev->height, dev->bytesperline); + ++ /* Enable sensor clock before setting format */ ++ ret = clk_prepare_enable(dev->camera_clk); ++ if (ret != 0) { ++ dev_err(&dev->pdev->dev, "%s: clk_enable failed\n", ++ __func__); ++ return ret; ++ } ++ msleep(100); /* let the clock stabilize */ + /* Set the sensor into the new format */ + v4l2_fill_mbus_format(&mbus_fmt, pix, dev->fmt->code); + v4l2_subdev_call(dev->subdev, video, s_mbus_fmt, &mbus_fmt); ++ clk_disable_unprepare(dev->camera_clk); + + return 0; + } +@@ -1532,6 +1541,12 @@ of_get_cssp_platform_data(struct platform_device *pdev) + sizeof(pstore->i2c_camera.type)); + found = 1; + break; ++ } else if (of_device_is_compatible(npc, "aptina,mt9m114")) { ++ /* Add support for mt9m114 sensor VVDN */ ++ strncpy(pstore->i2c_camera.type, "mt9m114", ++ sizeof(pstore->i2c_camera.type)); ++ found = 1; ++ break; + } + } + +diff --git a/firmware/Makefile b/firmware/Makefile +index bff3bb1..67a0fcf 100644 +--- a/firmware/Makefile ++++ b/firmware/Makefile +@@ -189,6 +189,7 @@ fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \ + BB-BONE-RST-00A0.dtbo \ + BB-BONE-RST2-00A0.dtbo \ + BB-BONE-CAM3-01-00A2.dtbo \ ++ BB-BONE-CAM-VVDN-00A0.dtbo \ + TT3201-001-01.dtbo \ + BB-BONE-SERL-03-00A1.dtbo \ + BB-BONE-BACON-00A0.dtbo \ +diff --git a/firmware/capes/BB-BONE-CAM-VVDN-00A0.dts b/firmware/capes/BB-BONE-CAM-VVDN-00A0.dts +new file mode 100644 +index 0000000..b64c7f2 +--- /dev/null ++++ b/firmware/capes/BB-BONE-CAM-VVDN-00A0.dts +@@ -0,0 +1,230 @@ ++/* ++ * Copyright (C) 2013 VVDN Technologies ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "ti,beaglebone", "ti,beaglebone-black"; ++ ++ /* identification */ ++ part-number = "BB-BONE-APTU-CAM"; ++ version = "00A0", "A0"; ++ ++ /* state the resources this cape uses */ ++ exclusive-use = ++ /* the pin header uses */ ++ "P8.25", /* gpmc: gpmc_ad0 */ ++ "P8.24", /* gpmc: gpmc_ad1 */ ++ "P8.5", /* gpmc: gpmc_ad2 */ ++ "P8.6", /* gpmc: gpmc_ad3 */ ++ "P8.23", /* gpmc: gpmc_ad4 */ ++ "P8.22", /* gpmc: gpmc_ad5 */ ++ "P8.3", /* gpmc: gpmc_ad6 */ ++ "P8.4", /* gpmc: gpmc_ad7 */ ++ "P8.19", /* gpmc: gpmc_ad8 */ ++ "P8.13", /* gpmc: gpmc_ad9 */ ++ "P8.14", /* gpmc: gpmc_ad10 */ ++ "P8.17", /* gpmc: gpmc_ad11 */ ++ "P8.12", /* gpmc: gpmc_ad12 */ ++ "P8.11", /* gpmc: gpmc_ad13 */ ++ "P8.16", /* gpmc: gpmc_ad14 */ ++ "P8.15", /* gpmc: gpmc_ad15 */ ++ "P9.13", /* gpmc: gpmc_wpn */ ++ "P8.21", /* gpmc: gpmc_csn1 */ ++ "P8.18", /* gpmc: gpmc_clk */ ++ "P8.7", /* gpmc: gpmc_advn_ale */ ++ "P8.8", /* gpmc: gpmc_oen_ren */ ++ "P8.10", /* gpmc: gpmc_wen */ ++ "P8.9", /* gpmc: gpmc_ben0_cle */ ++ "P9.41", /* cssp: clkout2 */ ++ "P9.42", /* cssp: xdma_event_intr2 */ ++ "P9.18", /* cssp: gpio0_4 */ ++ "P9.17", /* cssp: gpio0_5 */ ++ "P9.11", /* cssp: gpio0_30 */ ++ ++ /* the hardware IP uses */ ++ "gpio0_4", ++ "gpio0_5", ++ "gpio0_30", ++ "gpmc", ++ "clkout2", ++ /* the reset pin */ ++ "eMMC_RSTn"; ++ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ fragment@0 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ ++ gpmc_pins: pinmux_gpmc_pins { ++ pinctrl-single,pins = < ++ 0x000 0x30 /* gpmc_ad0.gpmc_ad0 MODE0 | INPUT | PULLUP */ ++ 0x004 0x30 /* gpmc_ad1.gpmc_ad1 MODE0 | INPUT | PULLUP */ ++ 0x008 0x30 /* gpmc_ad2.gpmc_ad2 MODE0 | INPUT | PULLUP */ ++ 0x00C 0x30 /* gpmc_ad3.gpmc_ad3 MODE0 | INPUT | PULLUP */ ++ 0x010 0x30 /* gpmc_ad4.gpmc_ad4 MODE0 | INPUT | PULLUP */ ++ 0x014 0x30 /* gpmc_ad5.gpmc_ad5 MODE0 | INPUT | PULLUP */ ++ 0x018 0x30 /* gpmc_ad6.gpmc_ad6 MODE0 | INPUT | PULLUP */ ++ 0x01C 0x30 /* gpmc_ad7.gpmc_ad7 MODE0 | INPUT | PULLUP */ ++ 0x020 0x30 /* gpmc_ad8.gpmc_ad8 MODE0 | INPUT | PULLUP */ ++ 0x024 0x30 /* gpmc_ad9.gpmc_ad9 MODE0 | INPUT | PULLUP */ ++ 0x028 0x30 /* gpmc_ad10.gpmc_ad10 MODE0 | INPUT | PULLUP */ ++ 0x02C 0x30 /* gpmc_ad11.gpmc_ad11 MODE0 | INPUT | PULLUP */ ++ 0x030 0x30 /* gpmc_ad12.gpmc_ad12 MODE0 | INPUT | PULLUP */ ++ 0x034 0x30 /* gpmc_ad13.gpmc_ad13 MODE0 | INPUT | PULLUP */ ++ 0x038 0x30 /* gpmc_ad14.gpmc_ad14 MODE0 | INPUT | PULLUP */ ++ 0x03C 0x30 /* gpmc_ad15.gpmc_ad15 MODE0 | INPUT | PULLUP */ ++ 0x074 0x30 /* gpmc_wpn.gpmc_wpn MODE0 | INPUT | PULLUP */ /* WAS MODE 7 */ ++ 0x080 0x08 /* gpmc_cscn1.gpmc_cscn1 MODE0 | OUTPUT */ ++ 0x08C 0x28 /* gpmc_clk.gpmc_clk MODE0 | INPUT */ ++ 0x090 0x08 /* gpmc_advn_ale.gpmc_advn_ale MODE0 | OUTPUT */ ++ 0x094 0x08 /* gpmc_oen_ren.gpmc_oen_ren MODE0 | OUTPUT */ ++ 0x098 0x08 /* gpmc_wen.gpmc_wen MODE0 | OUTPUT */ ++ 0x09C 0x08 /* gpmc_ben0_cle.gpmc_ben0_cle MODE0 | OUTPUT */ ++ >; ++ }; ++ cssp_camera_pins: pinmux_cssp_camera_pins { ++ pinctrl-single,pins = < ++ /* clkout2 */ ++ 0x1B4 0x03 /* xdma_event_intr1.clkout2 MODE3 | OUTPUT clkout2 */ ++ ++ /* dmar */ ++ 0x164 0x2e /* ecap0_in_pwm0_out.xdma_event_intr2 MODE6 | INPUT */ ++ ++ /* cssp camera */ ++ 0x158 0x07 /* spi0_d1.gpio0_4 MODE7 | OUTPUT, QL CSSP and Camera Sensor Reset */ ++ 0x15C 0x17 /* spi0_cs0.gpio0_5 MODE7 | OUTPUT | PULLUP, 1V8 and 2V8 Power Enable */ ++ 0x070 0x2f /* gpmc_wait0.gpio0_30 MODE0 | INPUT | PULLUPDIS, Sensor orientation detect: low -> frontfacing, high -> backfacing */ ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&gpmc>; ++ depth = <1>; /* only create devices on depth 1 */ ++ ++ /* stupid warnings */ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges; ++ ++ __overlay__ { ++ ++ status = "okay"; ++ ++ #address-cells = <2>; ++ #size-cells = <1>; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&gpmc_pins>; ++ ++ /* chip select ranges */ ++ ranges = <0 0 0x08000000 0x10000000>, /* bootloader has this enabled */ ++ <1 0 0x18000000 0x08000000>, ++ <2 0 0x20000000 0x08000000>, ++ <3 0 0x28000000 0x08000000>, ++ <4 0 0x30000000 0x08000000>, ++ <5 0 0x38000000 0x04000000>, ++ <6 0 0x3c000000 0x04000000>; ++ ++ /* ++ * This is complete and utter cr*p ++ * It doesn't belong here, but we don't ++ * have a memory controller abstraction. ++ * So we muddle along... ++ */ ++ camera { ++ compatible = "cssp-camera"; ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&cssp_camera_pins>; ++ ++ reg = <1 0 0x01000000>; /* CS1 */ ++ ++ bank-width = <2>; /* GPMC_CONFIG1_DEVICESIZE(1) */ ++ ++ gpmc,burst-read; /* GPMC_CONFIG1_READMULTIPLE_SUPP */ ++ gpmc,sync-read; /* GPMC_CONFIG1_READTYPE_SYNC */ ++ gpmc,sync-write; /* GPMC_CONFIG1_WRITETYPE_SYNC */ ++ gpmc,clk-activation-ns = <20>; /* GPMC_CONFIG1_CLKACTIVATIONTIME(2) */ ++ gpmc,burst-length = <16>; /* GPMC_CONFIG1_PAGE_LEN(2) */ ++ gpmc,mux-add-data = <2>; /* GPMC_CONFIG1_MUXTYPE(2) */ ++ ++ gpmc,sync-clk-ps = <20000>; /* CONFIG2 */ ++ ++ gpmc,cs-on-ns = <1>; ++ gpmc,cs-rd-off-ns = <160>; ++ gpmc,cs-wr-off-ns = <310>; ++ ++ gpmc,adv-on-ns = <0>; /* CONFIG3 */ ++ gpmc,adv-rd-off-ns = <40>; ++ gpmc,adv-wr-off-ns = <40>; ++ ++ gpmc,we-on-ns = <60>; /* CONFIG4 */ ++ gpmc,we-off-ns = <310>; ++ gpmc,oe-on-ns = <60>; ++ gpmc,oe-off-ns = <160>; ++ ++ gpmc,page-burst-access-ns = <20>; /* CONFIG 5 */ ++ gpmc,access-ns = <140>; ++ gpmc,rd-cycle-ns = <160>; ++ gpmc,wr-cycle-ns = <310>; ++ ++ gpmc,wr-access-ns = <100>; /* CONFIG 6 */ ++ gpmc,wr-data-mux-bus-ns = <60>; ++ ++ gpmc,bus-turnaround-ns = <40>; /* CONFIG6:3:0 = 4 */ ++ gpmc,cycle2cycle-samecsen; /* CONFIG6:7 = 1 */ ++ gpmc,cycle2cycle-delay-ns = <40>; /* CONFIG6:11:8 = 4 */ ++ ++ /* not using dma engine yet, but we can get the channel number here */ ++ dmas = <&edma 20>; ++ dma-names = "cssp"; ++ ++ /* clocks */ ++ cssp,camera-clk-name = "adjustable_clkout2_ck"; ++ cssp,camera-clk-rate = <32000000>; ++ ++ /* reset */ ++ reset-gpio = <&gpio1 4 0>; ++ ++ /* orientation; -> MT9T112_FLAG_VFLIP */ ++ orientation-gpio = <&gpio1 30 0>; ++ ++ /* reset controller (for the black) */ ++ reset = <&rstctl 0 0>; ++ reset-names = "eMMC_RSTn-CAM3"; ++ ++ /* camera sensor */ ++ cssp,sensor { ++ i2c-adapter = <&i2c2>; ++ ++ /* need it to stop the whinning */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ /* i2c device node */ ++ m59t112 { ++ compatible = "aptina,mt9m114"; ++ reg = <0x48>; ++ ++ /* dummy pll flags m, n, p1-7, PLL hardcoded in Driver */ ++ flags = <0>; ++ pll-divider = <0 0 0 0 0 0 0 0 0>; ++ }; ++ }; ++ ++ }; ++ ++ }; ++ }; ++ ++}; +diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h +index 4ee125b..210737b 100644 +--- a/include/media/v4l2-chip-ident.h ++++ b/include/media/v4l2-chip-ident.h +@@ -304,6 +304,7 @@ enum { + V4L2_IDENT_MT9M001C12STM = 45005, + V4L2_IDENT_MT9M111 = 45007, + V4L2_IDENT_MT9M112 = 45008, ++ V4L2_IDENT_MT9M114 = 45009, + V4L2_IDENT_MT9V022IX7ATC = 45010, /* No way to detect "normal" I77ATx */ + V4L2_IDENT_MT9V022IX7ATM = 45015, /* and "lead free" IA7ATx chips */ + V4L2_IDENT_MT9T031 = 45020, +-- +1.9.0 + diff --git a/patches/capes/0020-capes-Add-midi-cape-support.patch b/patches/capes/0020-capes-Add-midi-cape-support.patch new file mode 100644 index 00000000..1e677778 --- /dev/null +++ b/patches/capes/0020-capes-Add-midi-cape-support.patch @@ -0,0 +1,119 @@ +From 58e35f17ad3b65f0261865e7204f924df4d0da99 Mon Sep 17 00:00:00 2001 +From: Matt Ranostay +Date: Fri, 11 Oct 2013 16:21:40 -0700 +Subject: [PATCH 20/40] capes: Add midi cape support + +Enable UART1 for MIDI cape using DT overlays. + +Signed-off-by: Matt Ranostay +--- + arch/arm/boot/dts/am335x-bone-common.dtsi | 19 +++++++++++++ + firmware/Makefile | 1 + + firmware/capes/BB-BONE-MIDI-00A0.dts | 46 +++++++++++++++++++++++++++++++ + 3 files changed, 66 insertions(+) + create mode 100644 firmware/capes/BB-BONE-MIDI-00A0.dts + +diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi +index f6c639a..58b388d 100644 +--- a/arch/arm/boot/dts/am335x-bone-common.dtsi ++++ b/arch/arm/boot/dts/am335x-bone-common.dtsi +@@ -211,6 +211,16 @@ + part-number = "BB-BONE-GPS-01"; + }; + ++ ++ slot@16 { ++ compatible = "kernel-command-line", "runtime"; ++ board-name = "BB-BONE-MIDI"; ++ version = "00A0"; ++ manufacturer = "Ranostay Industries"; ++ part-number = "BB-BONE-MIDI-01"; ++ }; ++ ++ + /* Beaglebone black has it soldered on */ + slot@100 { + ti,cape-override; +@@ -402,6 +412,15 @@ + }; + }; + ++ cape@16 { ++ part-number = "BB-BONE-MIDI-01"; ++ version@00A0 { ++ version = "00A0"; ++ dtbo = "BB-BONE-MIDI-00A0.dtbo"; ++ }; ++ ++ }; ++ + }; + }; + +diff --git a/firmware/Makefile b/firmware/Makefile +index 67a0fcf..81a2785 100644 +--- a/firmware/Makefile ++++ b/firmware/Makefile +@@ -157,6 +157,7 @@ fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \ + BB-BONE-LCD7-01-00A4.dtbo \ + BB-BONE-eMMC1-01-00A0.dtbo \ + BB-BONE-GPEVT-00A0.dtbo \ ++ BB-BONE-MIDI-00A0.dtbo \ + BB-BONE-RTC-00A0.dtbo \ + BB-BONE-GPS-00A0.dtbo \ + BB-BONE-RS232-00A0.dtbo \ +diff --git a/firmware/capes/BB-BONE-MIDI-00A0.dts b/firmware/capes/BB-BONE-MIDI-00A0.dts +new file mode 100644 +index 0000000..d2c62e4 +--- /dev/null ++++ b/firmware/capes/BB-BONE-MIDI-00A0.dts +@@ -0,0 +1,46 @@ ++/* ++ * Copyright (C) 2013 Matt Ranostay ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "ti,beaglebone", "ti,beaglebone-black"; ++ ++ /* identification */ ++ part-number = "BB-BONE-MIDI"; ++ version = "00A0"; ++ ++ /* state the resources this cape uses */ ++ exclusive-use = ++ /* the pin header uses */ ++ "P9.24", /* uart1_txd */ ++ "P9.26", /* uart1_rxd */ ++ /* the hardware ip uses */ ++ "uart1"; ++ ++ fragment@0 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ uart_pins: pinmux_uart_pins { ++ pinctrl-single,pins = < ++ 0x184 0x20 /* P9.24 uart1_txd.uart1_txd OUTPUT */ ++ 0x180 0x20 /* P9.26 uart1_rxd.uart1_rxd INPUT */ ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&uart2>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart_pins>; ++ }; ++ }; ++}; +-- +1.9.0 + diff --git a/patches/capes/0021-remoteproc-PRU-lighting-remoteproc-support.patch b/patches/capes/0021-remoteproc-PRU-lighting-remoteproc-support.patch new file mode 100644 index 00000000..d9f3bcd9 --- /dev/null +++ b/patches/capes/0021-remoteproc-PRU-lighting-remoteproc-support.patch @@ -0,0 +1,368 @@ +From 254378ef5c75a8efa39523d73e105dd31ba4e120 Mon Sep 17 00:00:00 2001 +From: Matt Ranostay +Date: Sat, 7 Dec 2013 13:29:43 -0800 +Subject: [PATCH 21/40] remoteproc: PRU lighting remoteproc support + +Multiple downcalls, ioctls, and spidev support to allow driving +of WS281x LEDS via remoteproc PRU firmware. + +Signed-off-by: Matt Ranostay +--- + drivers/remoteproc/pru_rproc.c | 283 ++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 277 insertions(+), 6 deletions(-) + +diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c +index 6e42db6..36d2ad5 100644 +--- a/drivers/remoteproc/pru_rproc.c ++++ b/drivers/remoteproc/pru_rproc.c +@@ -28,9 +28,13 @@ + #include + #include + #include ++#include + #include + + #include ++#include ++#include ++#include + + #include "remoteproc_internal.h" + +@@ -87,6 +91,35 @@ struct pruproc_core; + /* maximum PWMs */ + #define PRU_PWM_MAX 32 + ++ ++struct pru_led_single_value { ++ __u8 universe; ++ __u8 slot; ++ __u32 data; ++}; ++ ++#define LED_DATA_PRU 0 ++#define LED_DATA_OFFSET 0x1000 ++#define LED_CONF_OFFSET 0x0800 ++#define MAX_BUFFER (12*1024) ++#define MAX_SLOTS 256 ++#define MAX_UNIVERSES 12 ++ ++struct pru_led_array { ++ __u8 universe; ++ __u32 data[MAX_SLOTS]; ++}; ++ ++ ++/* down call IDs */ ++ ++#define IOCTL_LED_BLANK _IOW('L', 0, int) ++#define IOCTL_LED_WRITE _IOW('L', 1, struct pru_led_single_value) ++#define IOCTL_LED_WRITE_BURST _IOW('L', 2, struct pru_led_array) ++#define IOCTL_LED_LATCH _IO('L', 3) ++ ++static struct pruproc *pp_led; ++ + struct pru_vring_info { + struct fw_rsc_vdev_vring *rsc; + struct vring vr; +@@ -138,6 +171,7 @@ struct pruproc_core { + + /* downcall lock */ + struct mutex dc_lock; ++ struct mutex io_lock; + wait_queue_head_t dc_waitq; + unsigned long dc_flags; + #define PRU_DCF_DOWNCALL_REQ 0 +@@ -189,6 +223,11 @@ struct pruproc { + int controller; + u32 dc_ids[DC_PWM_MAX]; + } pwm; ++ ++ struct { ++ struct pru_led_array array; ++ u8 *buffer; ++ } led; + }; + + /* global memory map (for am33xx) (almost the same as local) */ +@@ -1337,6 +1376,7 @@ static int pruproc_remove(struct platform_device *pdev) + + device_remove_file(dev, &dev_attr_reset); + device_remove_file(dev, &dev_attr_load); ++ kfree(pp->led.buffer); + + /* Unregister as remoteproc device */ + for (i = pp->num_prus - 1; i >= 0; i--) { +@@ -1641,7 +1681,8 @@ static int pru_downcall(struct pruproc_core *ppc, + ret = (int)intr; + dev_err(dev, "PRU#%d error waiting for downcall ready (%d)\n", + ppc->idx, ret); +- goto ret_call_failed; ++ if (pp_led == NULL) ++ goto ret_call_failed; + } + if (intr == 0) { + dev_err(dev, "PRU#%d failed to issue downcall ready in 100ms\n", +@@ -1683,7 +1724,8 @@ static int pru_downcall(struct pruproc_core *ppc, + ret = (int)intr; + dev_err(dev, "PRU#%d error waiting for downcall done (%d)\n", + ppc->idx, ret); +- goto ret_call_failed; ++ if (pp_led == NULL) ++ goto ret_call_failed; + } + if (intr == 0) { + dev_err(dev, "PRU#%d failed to issue downcall done in 100ms\n", +@@ -2334,16 +2376,245 @@ static int pruproc_create_pwm_devices(struct pruproc *pp) + return 0; + } + +-/* after all is configured create the linux devices */ +-static int pruproc_create_devices(struct pruproc *pp) ++ ++static long ioctl_blank(struct pruproc *pp, int uni) + { +- int ret; ++ pru_downcall_idx(pp, 0, 0, uni, 0, 0, 0, 0); ++ ++ return 0; ++} ++ ++static long ioctl_write(struct pruproc *pp, int uni, int slot, u32 val) ++{ ++ pru_downcall_idx(pp, 0, 1, uni, slot, val, 0, 0); ++ ++ return 0; ++} ++ ++static long ioctl_write_burst(struct pruproc *pp, void *arg) ++{ ++ ++ struct pru_led_array *d = (struct pru_led_array *) arg; ++ void __iomem *va; ++ ++ if (d->universe > (MAX_UNIVERSES - 1)) { ++ printk(KERN_ERR "over the max universe count"); ++ return -EINVAL; ++ } ++ ++ va = pru_d_da_to_va(pp->pru_to_pruc[LED_DATA_PRU], LED_DATA_OFFSET, NULL); ++ memset(va, 0, MAX_SLOTS); ++ memcpy(va, (void *)&d->data, sizeof(d->data)); ++ ++ pru_downcall_idx(pp, 0, 2, d->universe, 0, 0, 0, 0); ++ return 0; ++} ++ ++static long ioctl_latch(struct pruproc *pp) ++{ ++ pru_downcall_idx(pp, 0, 3, 0, 0, 0, 0, 0); ++ ++ return 0; ++} ++ ++ ++static long get_max_slots(struct pruproc *pp) ++{ ++ void __iomem *va; ++ va = pru_d_da_to_va(pp->pru_to_pruc[LED_DATA_PRU], LED_CONF_OFFSET, NULL); ++ ++ return *((u32 *)va) & 0xff; ++} ++ ++static long ioctl_spiwrite_burst(struct pruproc *pp, struct spi_ioc_transfer *spi) ++{ ++ struct pru_led_array *array = &pp->led.array; ++ u8 *d = (u8 *) pp->led.buffer; ++ int i, slot = 0, uni = 0; ++ int max_slots = get_max_slots(pp); ++ ++ if (spi->len > MAX_BUFFER) ++ return -ENOMEM; ++ ++ memset(d, 0, MAX_BUFFER); ++ if (copy_from_user(d, (const u8 __user *) (uintptr_t) spi->tx_buf, spi->len)) ++ return -ENOMEM; ++ ++ array->universe = 0; ++ memset(array->data, 0, MAX_SLOTS * 4); ++ ++ for (i = 0; i < (spi->len / 3); i++) { ++ u32 val = *(d++) << 0; ++ val |= *(d++) << 8; ++ val |= *(d++) << 16; ++ ++ array->data[slot] = val; ++ if (++slot > max_slots) { ++ slot = 0; ++ array->universe = uni++; ++ ++ if (array->universe >= MAX_UNIVERSES) ++ break; ++ ++ ioctl_write_burst(pp, array); ++ memset(array->data, 0, MAX_SLOTS * 4); ++ } ++ } ++ ++ if (slot > 0) { ++ array->universe = uni; ++ ioctl_write_burst(pp, array); ++ } ++ ++ ioctl_latch(pp); ++ ++ return 0; ++} ++ ++static int led_pru_open(struct inode *inode, struct file *filp) ++{ ++ filp->private_data = pp_led; ++ ++ return 0; ++} ++ ++ ++static long led_pru_ioctl(struct file *filp, unsigned int cmd, ++ unsigned long arg) ++ ++{ ++ struct pruproc *pp = filp->private_data; ++ struct pruproc_core *ppc = pp->pru_to_pruc[LED_DATA_PRU]; ++ struct spi_ioc_transfer *ioc; ++ unsigned n_ioc; ++ int ret = 0, tmp; ++ ++ mutex_lock(&ppc->io_lock); ++ ++ switch (cmd) { ++ case IOCTL_LED_BLANK: ++ ioctl_blank(pp, (int) arg); ++ break; ++ case IOCTL_LED_WRITE: { ++ struct pru_led_single_value *d; ++ d = (struct pru_led_single_value *) arg; ++ ++ ioctl_write(pp, d->universe, d->slot, d->data); ++ break; ++ } ++ case IOCTL_LED_WRITE_BURST: ++ ioctl_write_burst(pp, (void *) arg); ++ break; ++ case IOCTL_LED_LATCH: ++ ioctl_latch(pp); ++ break; ++ ++ case SPI_IOC_RD_MODE: ++ case SPI_IOC_WR_MODE: ++ case SPI_IOC_RD_LSB_FIRST: ++ case SPI_IOC_WR_LSB_FIRST: ++ case SPI_IOC_RD_BITS_PER_WORD: ++ case SPI_IOC_WR_BITS_PER_WORD: ++ case SPI_IOC_RD_MAX_SPEED_HZ: ++ case SPI_IOC_WR_MAX_SPEED_HZ: ++ break; ++ default: ++ /* segmented and/or full-duplex I/O request */ ++ if (_IOC_NR(cmd) != _IOC_NR(SPI_IOC_MESSAGE(0)) ++ || _IOC_DIR(cmd) != _IOC_WRITE) { ++ ret = -ENOTTY; ++ break; ++ } ++ ++ tmp = _IOC_SIZE(cmd); ++ if ((tmp % sizeof(struct spi_ioc_transfer)) != 0) { ++ ret = -EINVAL; ++ break; ++ } ++ n_ioc = tmp / sizeof(struct spi_ioc_transfer); ++ if (n_ioc == 0) ++ break; ++ ++ /* copy into scratch area */ ++ ioc = kmalloc(tmp, GFP_KERNEL); ++ if (!ioc) { ++ ret = -ENOMEM; ++ break; ++ } ++ if (copy_from_user(ioc, (void __user *)arg, tmp)) { ++ kfree(ioc); ++ ret = -EFAULT; ++ break; ++ } ++ ++ ret = ioctl_spiwrite_burst(pp, ioc); + +- ret = pruproc_create_pwm_devices(pp); ++ kfree(ioc); ++ } ++ mutex_unlock(&ppc->io_lock); + + return ret; + } + ++ ++static const struct file_operations led_cmd_ops = { ++ .owner = THIS_MODULE, ++ .open = led_pru_open, ++ .unlocked_ioctl = led_pru_ioctl, ++}; ++ ++static struct miscdevice leds_miscdev = { ++ .minor = MISC_DYNAMIC_MINOR, ++ .name = "pru_leds", ++ .fops = &led_cmd_ops, ++}; ++ ++static int pruproc_create_leds_devices(struct pruproc *pp) ++{ ++ struct platform_device *pdev = pp->pdev; ++ struct pruproc_core *ppc = pp->pru_to_pruc[LED_DATA_PRU]; ++ struct device *dev = &pdev->dev; ++ struct device_node *np = dev->of_node; ++ struct property *prop; ++ int err, ret, proplen; ++ ++ /* find property */ ++ prop = of_find_property(np, "pru-led-enabled", &proplen); ++ if (prop == NULL) ++ return 0; ++ ++ err = misc_register(&leds_miscdev); ++ if (err) { ++ dev_err(dev, "cannot register "); ++ ret = -EINVAL; ++ goto quit1; ++ } ++ pp_led = pp; ++ pp_led->led.buffer = devm_kzalloc(dev, MAX_BUFFER, GFP_KERNEL); ++ ++ if (pp_led->led.buffer == NULL) { ++ dev_err(dev, "cannot alloc buffer"); ++ ret = -EINVAL; ++ goto quit2; ++ } ++ ++ mutex_init(&ppc->io_lock); ++ ++ return 0; ++ ++quit2: ++ misc_deregister(&leds_miscdev); ++quit1: ++ return -EINVAL; ++} ++ ++/* after all is configured create the linux devices */ ++static void pruproc_create_devices(struct pruproc *pp) ++{ ++ pruproc_create_pwm_devices(pp); ++ pruproc_create_leds_devices(pp); ++} ++ + static int pruproc_probe(struct platform_device *pdev) + { + struct device *dev = &pdev->dev; +-- +1.9.0 + diff --git a/patches/capes/0022-Add-PRU-DTS-for-lighting-cape.patch b/patches/capes/0022-Add-PRU-DTS-for-lighting-cape.patch new file mode 100644 index 00000000..822aeb00 --- /dev/null +++ b/patches/capes/0022-Add-PRU-DTS-for-lighting-cape.patch @@ -0,0 +1,299 @@ +From 8e37b1bc26a9a3e4c1a5fd1cf5e75c4b69c4eb9a Mon Sep 17 00:00:00 2001 +From: Matt Ranostay +Date: Sun, 15 Dec 2013 00:44:35 -0800 +Subject: [PATCH 22/40] Add PRU DTS for lighting cape + +Signed-off-by: Matt Ranostay +--- + firmware/Makefile | 1 + + firmware/capes/BB-BONE-PRU-05-00A0.dts | 266 +++++++++++++++++++++++++++++++++ + 2 files changed, 267 insertions(+) + create mode 100644 firmware/capes/BB-BONE-PRU-05-00A0.dts + +diff --git a/firmware/Makefile b/firmware/Makefile +index 81a2785..2492651 100644 +--- a/firmware/Makefile ++++ b/firmware/Makefile +@@ -187,6 +187,7 @@ fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \ + BB-BONE-PRU-02-00A0.dtbo \ + BB-BONE-PRU-03-00A0.dtbo \ + BB-BONE-PRU-04-00A0.dtbo \ ++ BB-BONE-PRU-05-00A0.dtbo \ + BB-BONE-RST-00A0.dtbo \ + BB-BONE-RST2-00A0.dtbo \ + BB-BONE-CAM3-01-00A2.dtbo \ +diff --git a/firmware/capes/BB-BONE-PRU-05-00A0.dts b/firmware/capes/BB-BONE-PRU-05-00A0.dts +new file mode 100644 +index 0000000..7734822 +--- /dev/null ++++ b/firmware/capes/BB-BONE-PRU-05-00A0.dts +@@ -0,0 +1,266 @@ ++/* ++* Copyright (C) 2013 Matt Ranostay ++* ++* Based on original work of Pantelis Antoniou ++* ++* This program is free software; you can redistribute it and/or modify ++* it under the terms of the GNU General Public License version 2 as ++* published by the Free Software Foundation. ++*/ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "ti,beaglebone", "ti,beaglebone-black"; ++ ++ /* identification */ ++ part-number = "BB-BONE-PRU-04"; ++ version = "00A0"; ++ ++ /* state the resources this cape uses */ ++ exclusive-use = ++ /* the pin header uses */ ++ //"P8.20", /* pru1: pr1_pru1_pru_r30_13 */ ++ ++ //"P8.21", /* pru1: pr1_pru1_pru_r30_12 */ ++ "P8.27", /* pru1: pr1_pru1_pru_r30_8 */ ++ "P8.28", /* pru1: pr1_pru1_pru_r30_10 */ ++ "P8.29", /* pru1: pr1_pru1_pru_r30_9 */ ++ "P8.30", /* pru1: pr1_pru1_pru_r30_11 */ ++ "P8.39", /* pru1: pr1_pru1_pru_r30_6 */ ++ "P8.40", /* pru1: pr1_pru1_pru_r30_7 */ ++ "P8.41", /* pru1: pr1_pru1_pru_r30_4 */ ++ "P8.42", /* pru1: pr1_pru1_pru_r30_5 */ ++ "P8.43", /* pru1: pr1_pru1_pru_r30_2 */ ++ "P8.44", /* pru1: pr1_pru1_pru_r30_3 */ ++ "P8.45", /* pru1: pr1_pru1_pru_r30_0 */ ++ "P8.46", /* pru1: pr1_pru1_pru_r30_1 */ ++ /* pru1: pr1_pru1_pru_r30_14 is on UART0_RXD */ ++ /* pru1: pr1_pru1_pru_r30_15 is on UART0_TXD */ ++ /* the hardware IP uses */ ++ "pru0", ++ "pru1"; ++ ++ fragment@0 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ ++ pru_gpio_pins: pinmux_pru_gpio_pins { ++ pinctrl-single,pins = < ++ 0x1a4 0x0f /* P9 27 GPIO3_19: mcasp0_fsr.gpio3[19] | MODE7 | OUTPUT */ ++ >; ++ }; ++ ++ pru_pru_pins: pinmux_pru_pru_pins { ++ pinctrl-single,pins = < ++ //0x084 0x25 /* gpmc_csn2.pr1_pru1_pru_r30_13, MODE5 | OUTPUT | PRU */ ++ //0x080 0x25 /* gpmc_csn1.pr1_pru1_pru_r30_12, MODE5 | OUTPUT | PRU */ ++ 0x0e0 0x25 /* lcd_vsync.pr1_pru1_pru_r30_8, MODE5 | OUTPUT | PRU */ ++ 0x0e8 0x25 /* lcd_pclk.pr1_pru1_pru_r30_10, MODE5 | OUTPUT | PRU */ ++ 0x0e4 0x25 /* lcd_hsync.pr1_pru1_pru_r30_9, MODE5 | OUTPUT | PRU */ ++ 0x0ec 0x25 /* lcd_ac_bias_en.pr1_pru1_pru_r30_11, MODE5 | OUTPUT | PRU */ ++ 0x0bc 0x25 /* lcd_data7.pr1_pru1_pru_r30_7, MODE5 | OUTPUT | PRU */ ++ 0x0b0 0x25 /* lcd_data4.pr1_pru1_pru_r30_4, MODE5 | OUTPUT | PRU */ ++ 0x0b4 0x25 /* lcd_data5.pr1_pru1_pru_r30_5, MODE5 | OUTPUT | PRU */ ++ 0x0ac 0x25 /* lcd_data3.pr1_pru1_pru_r30_3, MODE5 | OUTPUT | PRU */ ++ 0x0a0 0x25 /* lcd_data0.pr1_pru1_pru_r30_0, MODE5 | OUTPUT | PRU */ ++ 0x0a4 0x25 /* lcd_data1.pr1_pru1_pru_r30_1, MODE5 | OUTPUT | PRU */ ++ 0x0a8 0x25 /* lcd_data2.pr1_pru1_pru_r30_2, MODE5 | OUTPUT | PRU */ ++ 0x0b8 0x25 /* lcd_data6.pr1_pru1_pru_r30_6, MODE5 | OUTPUT | PRU */ ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&ocp>; ++ ++ __overlay__ { ++ ++ /* avoid stupid warning */ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ prurproc { ++ compatible = "ti,pru-rproc"; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pru_pru_pins>; ++ ++ reg = <0x4a300000 0x080000>; ++ ++ status = "okay"; ++ ++ ti,hwmods = "pruss"; ++ ti,deassert-hard-reset = "pruss", "pruss"; ++ interrupt-parent = <&intc>; ++ ++ /* interrupts on the host */ ++ interrupts = <20 21 22 23 24 25 26 27>; ++ ++ /* events these interrupts map to (host interrupt) */ ++ events = <2 3 4 5 6 7 8 9>; ++ ++ /* PRU interrupt controller offset */ ++ pintc = <0x20000>; ++ ++ /* 12K Shared Data RAM global, size, local */ ++ pdram = <0x10000 0x03000 0x10000>; ++ ++ /* ++ * SYSEVENT ids ++ * ++ * - PRU/ARM communication ++ * PRU0_PRU1 17 ++ * PRU1_PRU0 18 ++ * PRU0_ARM 19 ++ * PRU1_ARM 20 ++ * ARM_PRU0 21 ++ * ARM_PRU1 22 ++ * ++ * Full SYSEVENT list ++ * ++ * parity_err_intr_pend 0 ++ * pru0_r31_status_cnt16 1 ++ * pru1_r31_status_cnt16 2 ++ * uart_urxevt_intr_req 4 ++ * uart_utxevt_intr_req 5 ++ * uart_uint_intr_req 6 ++ * iep_tim_cap_cmp_pend 7 ++ * ecap_intr_req 15 ++ * pru_mst_intr[0-15]_intr_req 16-31 ++ * nirq 32 (UART1) ++ * mcasp_x_intr_pend 33 (MCASP1) ++ * mcasp_r_intr_pend 34 (MCASP1) ++ * ecap_intr_intr_pend 35 (ECAP1) ++ * ecap_intr_intr_pend 36 (ECAP2) ++ * epwm_intr_intr_pend 37 (eHRPWM2) ++ * dcan_uerr 38 (DCAN0) ++ * dcan_int1 39 (DCAN0) ++ * dcan_intr 40 (DCAN0) ++ * POINTRPEND 41 (I2C0) ++ * ecap_intr_intr_pend 42 (ECAP0) ++ * epwm_intr_intr_pend 43 (eHRPWM0) ++ * SINTERRUPTN 44 (McSPI0) ++ * eqep_intr_intr_pend 45 (eQEP0) ++ * epwm_intr_intr_pend 46 (eHRPWM1) ++ * c0_misc_pend 47 3PGSW (GEMAC) ++ * c0_tx_pend 48 3PGSW (GEMAC) ++ * c0_rx_pend 49 3PGSW (GEMAC) ++ * c0_rx_thresh_pend 50 3PGSW (GEMAC) ++ * nirq 51 (UART0) ++ * nirq 52 (UART2) ++ * gen_intr_pend 53 (ADC_TSC) ++ * mcasp_r_intr_pend 54 (McASP0) ++ * mcasp_x_intr_pend 55 (McASP1) ++ * pwm_trip_zone 56 (eHRPWM0/eHRPWM1/eHRP WM2) ++ * POINTRPEND1 57 (GPIO0) ++ * Emulation Suspend Signal 58 (Debugss) ++ * initiator_sinterrupt_q_n2 59 (Mbox0 - mail_u2_irq (mailbox interrupt for pru1)) ++ * initiator_sinterrupt_q_n1 60 (Mbox0 - mail_u1_irq (mailbox interrupt for pru0)) ++ * tptc_erint_pend_po 61 (TPTC0 (EDMA)) ++ * tpcc_errint_pend_po 62 (TPCC (EDMA)) ++ * tpcc_int_pend_po1 63 (TPCC (EDMA)) ++ * ++ * HOST interrupt ids ++ * ++ * PRU0 0 ++ * PRU1 1 ++ * EVTOUT0-7 2-9 ++ */ ++ ++ /* sysevent map to intc channel */ ++ sysevent-to-channel-map = ++ <17 1>, /* PRU0_PRU1 -> CH1 */ ++ <18 0>, /* PRU1_PRU0 -> CH0 */ ++ <19 2>, /* PRU0_ARM -> CH2 */ ++ <20 3>, /* PRU1_ARM -> CH3 */ ++ <21 0>, /* ARM_PRU0 -> CH0 */ ++ <22 1>, /* ARM_PRU1 -> CH1 */ ++ <24 4>, /* VRING Host->PRU0 -> CH4 */ ++ <25 5>, /* VRING PRU0->Host -> CH5 */ ++ <26 6>, /* VRING Host->PRU1 -> CH6 */ ++ <27 7>; /* VRING PRU1->Host -> CH7 */ ++ ++ /* channel to host interrupt map */ ++ channel-to-host-interrupt-map = ++ <0 0>, /* CH0 -> PRU0 */ ++ <1 1>, /* CH1 -> PRU1 */ ++ <2 2>, /* CH2 -> EVTOUT0 */ ++ <3 3>, /* CH3 -> EVTOUT1 */ ++ <4 0>, /* CH4 -> PRU0 */ ++ <5 6>, /* CH5 -> EVTOUT4 */ ++ <6 1>, /* CH6 -> PRU1 */ ++ <7 7>; /* CH7 -> EVTOUT5 */ ++ ++ /* indices are ARM=0, PRU0=1, PRU1=2 */ ++ target-to-sysevent-map = ++ <0xffffffff 21 22>, /* ARM: DONTCARE, ARM_PRU0, ARM_PRU1 */ ++ < 19 0xffffffff 17>, /* PRU0: PRU0_ARM, DONTCARE, PRU0_PRU1 */ ++ < 20 18 0xffffffff>; /* PRU1: PRU1_ARM, PRU1_PRU0, DONTCARE */ ++ ++ /* both the PRUs have 200MHz frequency so period is 5ns */ ++ clock-freq = <200000000>; ++ ++ pru-led-enabled; ++ ++ /* definition for the first PRU */ ++ pru0 { ++ pru-index = <0>; ++ ++ /* offset, size, local */ ++ iram = <0x34000 0x02000 0x00000>; /* code ram (8K) */ ++ ++ /* offset, size, local, other */ ++ dram = <0x00000 0x02000 0x00000 0x10000>; /* data ram (8K) */ ++ ++ pctrl = <0x22000>; ++ pdbg = <0x22400>; ++ ++ firmware-elf; ++ firmware = "ws28xx-pru0"; ++ ++ /* sysevents signaling ring activity (host, pru)*/ ++ vring-sysev = <24 25>; ++ ++ resource_table { ++ resource-table; ++ version = <1>; ++ ++ pru0_rproc_serial: pru0_vdev_rproc_serial { ++ vdev-rproc-serial; ++ ++ /* notification IDs are totally bogus */ ++ /* rproc will idr_alloc anyway */ ++ ++ notifyid = <8>; /* <- bogus */ ++ /* da align num notifyid */ ++ vring-0 = <0 16 8 0>; ++ vring-1 = <0 16 8 0>; ++ }; ++ ++ }; ++ }; ++ ++ /* definition for the second PRU */ ++ pru1 { ++ pru-index = <1>; ++ ++ /* offset, size, local */ ++ iram = <0x38000 0x02000 0x00000>; /* code ram (8K) */ ++ ++ /* offset, size, local, other */ ++ dram = <0x02000 0x02000 0x00000 0x10000>; /* data ram (8K) */ ++ ++ pctrl = <0x24000>; ++ pdbg = <0x24400>; ++ ++ firmware-elf; ++ firmware = "ws28xx-pru1"; ++ ++ /* NOTE: no resource table, no vrings for this one */ ++ }; ++ }; ++ }; ++ }; ++}; +-- +1.9.0 + diff --git a/patches/capes/0023-beaglebone-capes-Added-overlays-for-CBB-Serial-cape.patch b/patches/capes/0023-beaglebone-capes-Added-overlays-for-CBB-Serial-cape.patch new file mode 100644 index 00000000..3ed0eccd --- /dev/null +++ b/patches/capes/0023-beaglebone-capes-Added-overlays-for-CBB-Serial-cape.patch @@ -0,0 +1,278 @@ +From 6ff4c5fa0f6b8777117f59e0ef146b8b9519257e Mon Sep 17 00:00:00 2001 +From: Alexander Hiam +Date: Thu, 30 Jan 2014 11:44:05 -0500 +Subject: [PATCH 23/40] beaglebone capes: Added overlays for CBB-Serial cape + +Added main overaly for CBB-Serial BeagleBone cape, as well as separate +overlays to mux the AM335x UART2 and UART4 RTS and CTS pins to the 3.8 +branch. + +Signed-off-by: Alexander Hiam +--- + firmware/Makefile | 6 ++ + firmware/capes/BB-UART2-RTSCTS-00A0.dts | 57 +++++++++++++++++ + firmware/capes/BB-UART4-RTSCTS-00A0.dts | 57 +++++++++++++++++ + firmware/capes/cape-CBB-Serial-r01.dts | 106 ++++++++++++++++++++++++++++++++ + 4 files changed, 226 insertions(+) + create mode 100644 firmware/capes/BB-UART2-RTSCTS-00A0.dts + create mode 100644 firmware/capes/BB-UART4-RTSCTS-00A0.dts + create mode 100644 firmware/capes/cape-CBB-Serial-r01.dts + +diff --git a/firmware/Makefile b/firmware/Makefile +index 2492651..b35d176 100644 +--- a/firmware/Makefile ++++ b/firmware/Makefile +@@ -219,6 +219,12 @@ fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \ + # the Tester cape (tester-side) + fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += cape-bone-tester-00A0.dtbo + ++# the CBB-Serial cape (tester-side) ++fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \ ++ cape-CBB-Serial-r01.dtbo \ ++ BB-UART2-RTSCTS-00A0.dtbo \ ++ BB-UART4-RTSCTS-00A0.dtbo ++ + # the virtual peripheral capes for the UARTs + # UART3 is not routed to the connectors, no cape for it + fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \ +diff --git a/firmware/capes/BB-UART2-RTSCTS-00A0.dts b/firmware/capes/BB-UART2-RTSCTS-00A0.dts +new file mode 100644 +index 0000000..bef5fff +--- /dev/null ++++ b/firmware/capes/BB-UART2-RTSCTS-00A0.dts +@@ -0,0 +1,57 @@ ++/* BB-UART2-RTSCTS-00A0.dts ++ * Written by Alexander Hiam ++ * for Logic Supply - http://logicsupply.com ++ * Jan 28, 2014 ++ * ++ * This overlay enables RTS/CTS flow control for UART2. ++ * HDMI must be disabled before enabling this overlay, see: ++ * http://www.logicsupply.com/blog/2013/07/18/disabling-the-beaglebone-black-hdmi-cape/ ++ * ++ * Copyright (c) 2014 - Logic Supply (http://logicsupply.com) ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++/dts-v1/; ++/plugin/; ++ ++/{ ++ compatible = "ti,beaglebone", "ti,beaglebone-black"; ++ ++ part-number = "BB-UART2-RTSCTS"; ++ version = "00A0"; ++ ++ exclusive-use = ++ "P8.38", /* uart2 rts */ ++ "P8.37"; /* uart2 cts */ ++ ++ fragment@0 { ++ /* Sets pinmux for flow control pins. */ ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ u2_rtscts_pins: pinmux_u2_rtscts_pins { ++ pinctrl-single,pins = < ++ 0x0c4 0x0e /* lcd_data9 - pullup | mode 6 (uart2_rtsn) */ ++ 0x0c0 0x36 /* lcd_data8 - rx enable | pullup | mode 6 (uart2_ctsn) */ ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ /* Enable pinmux-helper driver for setting mux configuration. */ ++ target = <&ocp>; /* On-Chip Peripherals */ ++ __overlay__ { ++ uart2-rtscts-pinmux { ++ compatible = "bone-pinmux-helper"; /* Use the pinmux helper */ ++ status="okay"; ++ /* Define custom names for indexes in pinctrl array: */ ++ pinctrl-names = "default"; ++ /* Set the elements of the pinctrl array to the pinmux overlays ++ defined above: */ ++ pinctrl-0 = <&u2_rtscts_pins>; ++ }; ++ }; ++ }; ++}; +diff --git a/firmware/capes/BB-UART4-RTSCTS-00A0.dts b/firmware/capes/BB-UART4-RTSCTS-00A0.dts +new file mode 100644 +index 0000000..a8f8e98 +--- /dev/null ++++ b/firmware/capes/BB-UART4-RTSCTS-00A0.dts +@@ -0,0 +1,57 @@ ++/* BB-UART4-RTSCTS-00A0.dts ++ * Written by Alexander Hiam ++ * for Logic Supply - http://logicsupply.com ++ * Jan 28, 2014 ++ * ++ * This overlay enables RTS/CTS flow control for UART4. ++ * HDMI must be disabled before enabling this overlay, see: ++ * http://www.logicsupply.com/blog/2013/07/18/disabling-the-beaglebone-black-hdmi-cape/ ++ * ++ * Copyright (c) 2014 - Logic Supply (http://logicsupply.com) ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++/dts-v1/; ++/plugin/; ++ ++/{ ++ compatible = "ti,beaglebone", "ti,beaglebone-black"; ++ ++ part-number = "BB-UART4-RTSCTS"; ++ version = "00A0"; ++ ++ exclusive-use = ++ "P8.33", /* uart4 rts */ ++ "P8.35"; /* uart4 cts */ ++ ++ fragment@0 { ++ /* Sets pinmux for flow control pins. */ ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ u4_rtscts_pins: pinmux_u4_rtscts_pins { ++ pinctrl-single,pins = < ++ 0x0d4 0x0e /* lcd_data13 - pullup | mode 6 (uart4_rtsn) */ ++ 0x0d0 0x36 /* lcd_data12 - rx enable | pullup | mode 6 (uart4_ctsn) */ ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ /* Enable pinmux-helper driver for setting mux configuration. */ ++ target = <&ocp>; /* On-Chip Peripherals */ ++ __overlay__ { ++ uart4-rtscts-pinmux { ++ compatible = "bone-pinmux-helper"; /* Use the pinmux helper */ ++ status="okay"; ++ /* Define custom names for indexes in pinctrl array: */ ++ pinctrl-names = "default"; ++ /* Set the elements of the pinctrl array to the pinmux overlays ++ defined above: */ ++ pinctrl-0 = <&u4_rtscts_pins>; ++ }; ++ }; ++ }; ++}; +diff --git a/firmware/capes/cape-CBB-Serial-r01.dts b/firmware/capes/cape-CBB-Serial-r01.dts +new file mode 100644 +index 0000000..0309bd2 +--- /dev/null ++++ b/firmware/capes/cape-CBB-Serial-r01.dts +@@ -0,0 +1,106 @@ ++/* cape-CBB-Serial-r01.dts ++ * Written by Alexander Hiam ++ * for Logic Supply - http://logicsupply.com ++ * Jan 28, 2014 ++ * ++ * This is the Device Tree overlay for the CBB-Serial BeagleBone and ++ * BeagleBone Black cape. It will enable the UART2, UART4 and DCAN1 ++ * interfaces, as well as mux GPIO1_16 for userspace control for ++ * using software control of the RS485 receiver/driver enable. ++ * ++ * Note: the BeagleBone Black has GPIO1_16 tied to GPIO2_0 (which ++ * is not exposed on the header), so this overlay muxes and controls ++ * both pins. ++ * ++ * Copyright (c) 2014 - Logic Supply (http://logicsupply.com) ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++/dts-v1/; ++/plugin/; ++ ++/{ ++ compatible = "ti,beaglebone", "ti,beaglebone-black"; ++ ++ part-number = "cape-CBB-Serial"; ++ version = "r01"; ++ ++ /* state the resources this cape uses */ ++ exclusive-use = ++ /* the pin header uses */ ++ "P9.15", /* GPIO1_16 */ ++ ++ "P9.21", /* uart2_txd */ ++ "P9.22", /* uart2_rxd */ ++ ++ "P9.13", /* uart4_txd */ ++ "P9.11", /* uart4_rxd */ ++ ++ "P9.24", /* dcan1_rx */ ++ "P9.26", /* dcan1_tx */ ++ ++ /* the hardware IP uses */ ++ "gpio1_16", ++ "gpio2_0", ++ "uart2", ++ "uart4", ++ "dcan1"; ++ ++ fragment@0 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ ++ cbb_serial_uart2_pins: pinmux_cbb_serial_uart2_pins { ++ pinctrl-single,pins = < ++ 0x150 0x21 /* spi0_sclk - RX_ENABLED | MODE6 (UART2 RX) */ ++ 0x154 0x01 /* spi0_d0 - MODE6 (UART2 TX) */ ++ >; ++ }; ++ ++ cbb_serial_uart4_pins: pinmux_cbb_serial_uart4_pins { ++ pinctrl-single,pins = < ++ 0x070 0x26 /* gpmc_wait0 - RX_ENABLED | MODE6 (UART4 RX) */ ++ 0x074 0x06 /* gpmc_wpn - MODE6 (UART4 TX) */ ++ 0x040 0x2f /* gpmc_a0 - pull disabled | MODE7 (GPIO1_16) */ ++ 0x088 0x2f /* gpmc_csn3 - pull disabled | MODE7 (GPIO2_0) */ ++ >; ++ }; ++ ++ cbb_serial_dcan1_pins: pinmux_cbb_serial_dcan1_pins { ++ pinctrl-single,pins = < ++ 0x180 0x12 /* uart1_rxd - PULLUP | MODE2 (DCAN TX) */ ++ 0x184 0x32 /* uart1_txd - RX_ENABLED | PULLUP | MODE2 (DCAN1 RX) */ ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&uart3>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&cbb_serial_uart2_pins>; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&uart5>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&cbb_serial_uart4_pins>; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&dcan1>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&cbb_serial_dcan1_pins>; ++ }; ++ }; ++}; +-- +1.9.0 + diff --git a/patches/capes/0024-apply-htu21-patch.patch b/patches/capes/0024-apply-htu21-patch.patch new file mode 100644 index 00000000..099994b6 --- /dev/null +++ b/patches/capes/0024-apply-htu21-patch.patch @@ -0,0 +1,308 @@ +From 751b040366cfe316b99410412d92248561f4d0db Mon Sep 17 00:00:00 2001 +From: Hieu Duong +Date: Thu, 20 Mar 2014 16:21:45 -0500 +Subject: [PATCH 24/40] apply htu21 patch + +Signed-off-by: Hieu Duong +--- + Documentation/hwmon/htu21 | 46 +++++++++++ + drivers/hwmon/Kconfig | 10 +++ + drivers/hwmon/Makefile | 1 + + drivers/hwmon/htu21.c | 199 ++++++++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 256 insertions(+) + create mode 100644 Documentation/hwmon/htu21 + create mode 100644 drivers/hwmon/htu21.c + +diff --git a/Documentation/hwmon/htu21 b/Documentation/hwmon/htu21 +new file mode 100644 +index 0000000..f39a215 +--- /dev/null ++++ b/Documentation/hwmon/htu21 +@@ -0,0 +1,46 @@ ++Kernel driver htu21 ++=================== ++ ++Supported chips: ++ * Measurement Specialties HTU21D ++ Prefix: 'htu21' ++ Addresses scanned: none ++ Datasheet: Publicly available at the Measurement Specialties website ++ http://www.meas-spec.com/downloads/HTU21D.pdf ++ ++ ++Author: ++ William Markezana ++ ++Description ++----------- ++ ++The HTU21D is a humidity and temperature sensor in a DFN package of ++only 3 x 3 mm footprint and 0.9 mm height. ++ ++The devices communicate with the I2C protocol. All sensors are set to the ++same I2C address 0x40, so an entry with I2C_BOARD_INFO("htu21", 0x40) can ++be used in the board setup code. ++ ++This driver does not auto-detect devices. You will have to instantiate the ++devices explicitly. Please see Documentation/i2c/instantiating-devices ++for details. ++ ++sysfs-Interface ++--------------- ++ ++temp1_input - temperature input ++humidity1_input - humidity input ++ ++Notes ++----- ++ ++The driver uses the default resolution settings of 12 bit for humidity and 14 ++bit for temperature, which results in typical measurement times of 11 ms for ++humidity and 44 ms for temperature. To keep self heating below 0.1 degree ++Celsius, the device should not be active for more than 10% of the time. For ++this reason, the driver performs no more than two measurements per second and ++reports cached information if polled more frequently. ++ ++Different resolutions, the on-chip heater, using the CRC checksum and reading ++the serial number are not supported yet. +diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig +index 80bc9a5c20..4156f5e 100644 +--- a/drivers/hwmon/Kconfig ++++ b/drivers/hwmon/Kconfig +@@ -470,6 +470,16 @@ config SENSORS_HIH6130 + This driver can also be built as a module. If so, the module + will be called hih6130. + ++config SENSORS_HTU21 ++ tristate "Measurement Specialties HTU21D humidity/temperature sensors" ++ depends on I2C ++ help ++ If you say yes here you get support for the Measurement Specialties ++ HTU21D humidity and temperature sensors. ++ ++ This driver can also be built as a module. If so, the module ++ will be called htu21. ++ + config SENSORS_CORETEMP + tristate "Intel Core/Core2/Atom temperature sensor" + depends on X86 +diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile +index d8738f8..16b6d65 100644 +--- a/drivers/hwmon/Makefile ++++ b/drivers/hwmon/Makefile +@@ -62,6 +62,7 @@ obj-$(CONFIG_SENSORS_GL518SM) += gl518sm.o + obj-$(CONFIG_SENSORS_GL520SM) += gl520sm.o + obj-$(CONFIG_SENSORS_GPIO_FAN) += gpio-fan.o + obj-$(CONFIG_SENSORS_HIH6130) += hih6130.o ++obj-$(CONFIG_SENSORS_HTU21) += htu21.o + obj-$(CONFIG_SENSORS_ULTRA45) += ultra45_env.o + obj-$(CONFIG_SENSORS_I5K_AMB) += i5k_amb.o + obj-$(CONFIG_SENSORS_IBMAEM) += ibmaem.o +diff --git a/drivers/hwmon/htu21.c b/drivers/hwmon/htu21.c +new file mode 100644 +index 0000000..839086e +--- /dev/null ++++ b/drivers/hwmon/htu21.c +@@ -0,0 +1,199 @@ ++/* ++ * Measurement Specialties HTU21D humidity and temperature sensor driver ++ * ++ * Copyright (C) 2013 William Markezana ++ * ++ * 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. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* HTU21 Commands */ ++#define HTU21_T_MEASUREMENT_HM 0xE3 ++#define HTU21_RH_MEASUREMENT_HM 0xE5 ++ ++struct htu21 { ++ struct device *hwmon_dev; ++ struct mutex lock; ++ bool valid; ++ unsigned long last_update; ++ int temperature; ++ int humidity; ++}; ++ ++static inline int htu21_temp_ticks_to_millicelsius(int ticks) ++{ ++ ticks &= ~0x0003; /* clear status bits */ ++ /* ++ * Formula T = -46.85 + 175.72 * ST / 2^16 from datasheet p14, ++ * optimized for integer fixed point (3 digits) arithmetic ++ */ ++ return ((21965 * ticks) >> 13) - 46850; ++} ++ ++static inline int htu21_rh_ticks_to_per_cent_mille(int ticks) ++{ ++ ticks &= ~0x0003; /* clear status bits */ ++ /* ++ * Formula RH = -6 + 125 * SRH / 2^16 from datasheet p14, ++ * optimized for integer fixed point (3 digits) arithmetic ++ */ ++ return ((15625 * ticks) >> 13) - 6000; ++} ++ ++static int htu21_update_measurements(struct i2c_client *client) ++{ ++ int ret = 0; ++ struct htu21 *htu21 = i2c_get_clientdata(client); ++ ++ mutex_lock(&htu21->lock); ++ ++ if (time_after(jiffies, htu21->last_update + HZ / 2) || ++ !htu21->valid) { ++ ret = i2c_smbus_read_word_swapped(client, ++ HTU21_T_MEASUREMENT_HM); ++ if (ret < 0) ++ goto out; ++ htu21->temperature = htu21_temp_ticks_to_millicelsius(ret); ++ ret = i2c_smbus_read_word_swapped(client, ++ HTU21_RH_MEASUREMENT_HM); ++ if (ret < 0) ++ goto out; ++ htu21->humidity = htu21_rh_ticks_to_per_cent_mille(ret); ++ htu21->last_update = jiffies; ++ htu21->valid = true; ++ } ++out: ++ mutex_unlock(&htu21->lock); ++ ++ return ret >= 0 ? 0 : ret; ++} ++ ++static ssize_t htu21_show_temperature(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct i2c_client *client = to_i2c_client(dev); ++ struct htu21 *htu21 = i2c_get_clientdata(client); ++ int ret = htu21_update_measurements(client); ++ if (ret < 0) ++ return ret; ++ return sprintf(buf, "%d\n", htu21->temperature); ++} ++ ++static ssize_t htu21_show_humidity(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct i2c_client *client = to_i2c_client(dev); ++ struct htu21 *htu21 = i2c_get_clientdata(client); ++ int ret = htu21_update_measurements(client); ++ if (ret < 0) ++ return ret; ++ return sprintf(buf, "%d\n", htu21->humidity); ++} ++ ++static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, ++ htu21_show_temperature, NULL, 0); ++static SENSOR_DEVICE_ATTR(humidity1_input, S_IRUGO, ++ htu21_show_humidity, NULL, 0); ++ ++static struct attribute *htu21_attributes[] = { ++ &sensor_dev_attr_temp1_input.dev_attr.attr, ++ &sensor_dev_attr_humidity1_input.dev_attr.attr, ++ NULL ++}; ++ ++static const struct attribute_group htu21_group = { ++ .attrs = htu21_attributes, ++}; ++ ++static int htu21_probe(struct i2c_client *client, ++ const struct i2c_device_id *id) ++{ ++ struct htu21 *htu21; ++ int err; ++ ++ if (!i2c_check_functionality(client->adapter, ++ I2C_FUNC_SMBUS_READ_WORD_DATA)) { ++ dev_err(&client->dev, ++ "adapter does not support SMBus word transactions\n"); ++ return -ENODEV; ++ } ++ ++ htu21 = devm_kzalloc(&client->dev, sizeof(*htu21), GFP_KERNEL); ++ if (!htu21) ++ return -ENOMEM; ++ ++ i2c_set_clientdata(client, htu21); ++ ++ mutex_init(&htu21->lock); ++ ++ err = sysfs_create_group(&client->dev.kobj, &htu21_group); ++ if (err) { ++ dev_dbg(&client->dev, "could not create sysfs files\n"); ++ return err; ++ } ++ htu21->hwmon_dev = hwmon_device_register(&client->dev); ++ if (IS_ERR(htu21->hwmon_dev)) { ++ dev_dbg(&client->dev, "unable to register hwmon device\n"); ++ err = PTR_ERR(htu21->hwmon_dev); ++ goto error; ++ } ++ ++ dev_info(&client->dev, "initialized\n"); ++ ++ return 0; ++ ++error: ++ sysfs_remove_group(&client->dev.kobj, &htu21_group); ++ return err; ++} ++ ++static int htu21_remove(struct i2c_client *client) ++{ ++ struct htu21 *htu21 = i2c_get_clientdata(client); ++ ++ hwmon_device_unregister(htu21->hwmon_dev); ++ sysfs_remove_group(&client->dev.kobj, &htu21_group); ++ ++ return 0; ++} ++ ++static const struct i2c_device_id htu21_id[] = { ++ { "htu21", 0 }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, htu21_id); ++ ++static struct i2c_driver htu21_driver = { ++ .class = I2C_CLASS_HWMON, ++ .driver = { ++ .name = "htu21", ++ }, ++ .probe = htu21_probe, ++ .remove = htu21_remove, ++ .id_table = htu21_id, ++}; ++ ++module_i2c_driver(htu21_driver); ++ ++MODULE_AUTHOR("William Markezana "); ++MODULE_DESCRIPTION("MEAS HTU21D humidity and temperature sensor driver"); ++MODULE_LICENSE("GPL"); +-- +1.9.0 + diff --git a/patches/capes/0025-capes-reorder-from-GRB-to-RGB-for-Lighting-cape.patch b/patches/capes/0025-capes-reorder-from-GRB-to-RGB-for-Lighting-cape.patch new file mode 100644 index 00000000..f75286ec --- /dev/null +++ b/patches/capes/0025-capes-reorder-from-GRB-to-RGB-for-Lighting-cape.patch @@ -0,0 +1,30 @@ +From 4287973d87c99fe966126998db3ee42ed7593513 Mon Sep 17 00:00:00 2001 +From: Matt Ranostay +Date: Sat, 21 Dec 2013 22:27:48 -0800 +Subject: [PATCH 25/40] capes: reorder from GRB to RGB for Lighting cape + +Signed-off-by: Matt Ranostay +--- + drivers/remoteproc/pru_rproc.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c +index 36d2ad5..bc3900f 100644 +--- a/drivers/remoteproc/pru_rproc.c ++++ b/drivers/remoteproc/pru_rproc.c +@@ -2444,9 +2444,9 @@ static long ioctl_spiwrite_burst(struct pruproc *pp, struct spi_ioc_transfer *sp + memset(array->data, 0, MAX_SLOTS * 4); + + for (i = 0; i < (spi->len / 3); i++) { +- u32 val = *(d++) << 0; +- val |= *(d++) << 8; +- val |= *(d++) << 16; ++ u32 val = *(d++) << 8; /* Red */ ++ val |= *(d++) << 16; /* Green */ ++ val |= *(d++) << 0; /* Blue */ + + array->data[slot] = val; + if (++slot > max_slots) { +-- +1.9.0 + diff --git a/patches/capes/0026-add-support-for-weather-cape-rev-b.patch b/patches/capes/0026-add-support-for-weather-cape-rev-b.patch new file mode 100644 index 00000000..ff19a03b --- /dev/null +++ b/patches/capes/0026-add-support-for-weather-cape-rev-b.patch @@ -0,0 +1,128 @@ +From d117ad3f452f179bf916209211110b648b39ec25 Mon Sep 17 00:00:00 2001 +From: Hieu Duong +Date: Thu, 20 Mar 2014 16:31:36 -0500 +Subject: [PATCH 26/40] add support for weather cape rev b + +Signed-off-by: Hieu Duong +--- + arch/arm/boot/dts/am335x-bone-common.dtsi | 4 ++ + firmware/Makefile | 4 +- + firmware/capes/cape-bone-weather-00B0.dts | 76 +++++++++++++++++++++++++++++++ + 3 files changed, 83 insertions(+), 1 deletion(-) + create mode 100644 firmware/capes/cape-bone-weather-00B0.dts + +diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi +index 58b388d..a349b27 100644 +--- a/arch/arm/boot/dts/am335x-bone-common.dtsi ++++ b/arch/arm/boot/dts/am335x-bone-common.dtsi +@@ -319,6 +319,10 @@ + version = "00A0"; + dtbo = "cape-bone-weather-00A0.dtbo"; + }; ++ version@00B0 { ++ version = "00B0"; ++ dtbo = "cape-bone-weather-00B0.dtbo"; ++ }; + }; + + /* beaglebone black hdmi on board */ +diff --git a/firmware/Makefile b/firmware/Makefile +index b35d176..aa734d9 100644 +--- a/firmware/Makefile ++++ b/firmware/Makefile +@@ -210,7 +210,9 @@ fw-shipped-$(CONFIG_CAPE_BEAGLEBONE_NIXIE) += \ + cape-bone-nixie-00A0.dtbo + + # the weather cape +-fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += cape-bone-weather-00A0.dtbo ++fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \ ++ cape-bone-weather-00A0.dtbo \ ++ cape-bone-weather-00B0.dtbo + + # the HDMI virtual capes on the beaglebone-black + fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \ +diff --git a/firmware/capes/cape-bone-weather-00B0.dts b/firmware/capes/cape-bone-weather-00B0.dts +new file mode 100644 +index 0000000..e399cf3 +--- /dev/null ++++ b/firmware/capes/cape-bone-weather-00B0.dts +@@ -0,0 +1,76 @@ ++/* ++* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ ++* ++* This program is free software; you can redistribute it and/or modify ++* it under the terms of the GNU General Public License version 2 as ++* published by the Free Software Foundation. ++*/ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "ti,beaglebone", "ti,beaglebone-black"; ++ ++ part-number = "BB-BONE-WTHR-01"; ++ version = "00B0"; ++ ++ /* state the resources this cape uses */ ++ exclusive-use = ++ /* the pin header uses */ ++ "P8.6", /* gpio1_3 */ ++ /* the hardware IP uses */ ++ "gpio1_3"; ++ ++ fragment@0 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ weather_cape_w1_pins: pinmux_weather_cape_w1_pins { ++ pinctrl-single,pins = < ++ 0x0c 0x37 /* gpmc_ad3.gpio1_3, OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE7 - w1-gpio */ ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c2>; ++ ++ __overlay__ { ++ /* needed to avoid gripping by DTC */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ /* Ambient light sensor */ ++ tsl2550@39 { ++ compatible = "tsl,tsl2550"; ++ reg = <0x39>; ++ }; ++ ++ /* Humidity Sensor */ ++ htu21@40 { ++ compatible = "meas-spec,htu21"; ++ reg = <0x40>; ++ }; ++ ++ /* Barometric pressure sensor */ ++ bmp085@77 { ++ compatible = "bosch,bmp085"; ++ reg = <0x77>; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&ocp>; ++ __overlay__ { ++ onewire@0 { ++ compatible = "w1-gpio"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&weather_cape_w1_pins>; ++ status = "okay"; ++ ++ gpios = <&gpio2 3 0>; ++ }; ++ }; ++ }; ++}; +-- +1.9.0 + diff --git a/patches/capes/0027-capes-return-written-bytes-for-faux-spidev-device.patch b/patches/capes/0027-capes-return-written-bytes-for-faux-spidev-device.patch new file mode 100644 index 00000000..60751193 --- /dev/null +++ b/patches/capes/0027-capes-return-written-bytes-for-faux-spidev-device.patch @@ -0,0 +1,28 @@ +From 4ff6d4445a8694aadab69e2f383eb96827f5b492 Mon Sep 17 00:00:00 2001 +From: Matt Ranostay +Date: Sun, 22 Dec 2013 16:15:51 -0800 +Subject: [PATCH 27/40] capes: return written bytes for faux spidev device + +To quiet OLA not getting confirmation of written bytes. + +Signed-off-by: Matt Ranostay +--- + drivers/remoteproc/pru_rproc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/remoteproc/pru_rproc.c b/drivers/remoteproc/pru_rproc.c +index bc3900f..8f4f91f 100644 +--- a/drivers/remoteproc/pru_rproc.c ++++ b/drivers/remoteproc/pru_rproc.c +@@ -2468,7 +2468,7 @@ static long ioctl_spiwrite_burst(struct pruproc *pp, struct spi_ioc_transfer *sp + + ioctl_latch(pp); + +- return 0; ++ return spi->len; + } + + static int led_pru_open(struct inode *inode, struct file *filp) +-- +1.9.0 + diff --git a/patches/capes/0028-capes-Add-cape-universal-overlay-files-More-details-.patch b/patches/capes/0028-capes-Add-cape-universal-overlay-files-More-details-.patch new file mode 100644 index 00000000..bc326e2f --- /dev/null +++ b/patches/capes/0028-capes-Add-cape-universal-overlay-files-More-details-.patch @@ -0,0 +1,3766 @@ +From de0ddc6421914ea13ae20b97de328f542da507b9 Mon Sep 17 00:00:00 2001 +From: Charles Steinkuehler +Date: Sun, 23 Mar 2014 20:13:44 +0100 +Subject: [PATCH 28/40] capes: Add cape-universal overlay files More details + and full source can be found at: + https://github.com/cdsteinkuehler/beaglebone-universal-io + +Signed-off-by: Charles Steinkuehler +--- + firmware/Makefile | 5 +- + firmware/capes/cape-univ-emmc-00A0.dts | 372 +++++++ + firmware/capes/cape-universal-00A0.dts | 1730 +++++++++++++++++++++++++++++++ + firmware/capes/cape-universaln-00A0.dts | 1609 ++++++++++++++++++++++++++++ + 4 files changed, 3715 insertions(+), 1 deletion(-) + create mode 100644 firmware/capes/cape-univ-emmc-00A0.dts + create mode 100644 firmware/capes/cape-universal-00A0.dts + create mode 100644 firmware/capes/cape-universaln-00A0.dts + +diff --git a/firmware/Makefile b/firmware/Makefile +index aa734d9..31941af 100644 +--- a/firmware/Makefile ++++ b/firmware/Makefile +@@ -199,7 +199,10 @@ fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \ + BB-BONE-BACONE2-00A0.dtbo \ + DNIL-AMPCAPE-1-00R1.dtbo \ + cape-bone-replicape-00A2.dtbo \ +- cape-bone-replicape-00A3.dtbo ++ cape-bone-replicape-00A3.dtbo \ ++ cape-univ-emmc-00A0.dtbo \ ++ cape-universal-00A0.dtbo \ ++ cape-universaln-00A0.dtbo + + # the geiger cape + fw-shipped-$(CONFIG_CAPE_BEAGLEBONE_GEIGER) += \ +diff --git a/firmware/capes/cape-univ-emmc-00A0.dts b/firmware/capes/cape-univ-emmc-00A0.dts +new file mode 100644 +index 0000000..f4822a7 +--- /dev/null ++++ b/firmware/capes/cape-univ-emmc-00A0.dts +@@ -0,0 +1,372 @@ ++// Copyright 2013 ++// Charles Steinkuehler ++// ++// 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. ++// ++// 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, write to the Free Software ++// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "ti,beaglebone", "ti,beaglebone-black"; ++ ++ /* identification */ ++ part-number = "cape-bone-universal"; ++ version = "00A0"; ++ ++ /* state the resources this cape uses */ ++ exclusive-use = ++ ++ "P8.3", /* emmc */ ++ "P8.4", /* emmc */ ++ "P8.5", /* emmc */ ++ "P8.6", /* emmc */ ++ "P8.20", /* emmc */ ++ "P8.21", /* emmc */ ++ "P8.22", /* emmc */ ++ "P8.23", /* emmc */ ++ "P8.24", /* emmc */ ++ "P8.25"; /* emmc */ ++ ++ fragment@0 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ ++ /************************/ ++ /* P8 Header */ ++ /************************/ ++ ++ /* P8_01 GND */ ++ /* P8_02 GND */ ++ /* P8_03 (ZCZ ball R9 ) emmc */ ++ P8_03_default_pin: pinmux_P8_03_default_pin { ++ pinctrl-single,pins = <0x018 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_03_gpio_pin: pinmux_P8_03_gpio_pin { ++ pinctrl-single,pins = <0x018 0x2F>; }; /* Mode 7, RxActive */ ++ P8_03_gpio_pu_pin: pinmux_P8_03_gpio_pu_pin { ++ pinctrl-single,pins = <0x018 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_03_gpio_pd_pin: pinmux_P8_03_gpio_pd_pin { ++ pinctrl-single,pins = <0x018 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ ++ /* P8_04 (ZCZ ball T9 ) emmc */ ++ P8_04_default_pin: pinmux_P8_04_default_pin { ++ pinctrl-single,pins = <0x01c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_04_gpio_pin: pinmux_P8_04_gpio_pin { ++ pinctrl-single,pins = <0x01c 0x2F>; }; /* Mode 7, RxActive */ ++ P8_04_gpio_pu_pin: pinmux_P8_04_gpio_pu_pin { ++ pinctrl-single,pins = <0x01c 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_04_gpio_pd_pin: pinmux_P8_04_gpio_pd_pin { ++ pinctrl-single,pins = <0x01c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ ++ /* P8_05 (ZCZ ball R8 ) emmc */ ++ P8_05_default_pin: pinmux_P8_05_default_pin { ++ pinctrl-single,pins = <0x008 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_05_gpio_pin: pinmux_P8_05_gpio_pin { ++ pinctrl-single,pins = <0x008 0x2F>; }; /* Mode 7, RxActive */ ++ P8_05_gpio_pu_pin: pinmux_P8_05_gpio_pu_pin { ++ pinctrl-single,pins = <0x008 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_05_gpio_pd_pin: pinmux_P8_05_gpio_pd_pin { ++ pinctrl-single,pins = <0x008 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ ++ /* P8_06 (ZCZ ball T8 ) emmc */ ++ P8_06_default_pin: pinmux_P8_06_default_pin { ++ pinctrl-single,pins = <0x00c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_06_gpio_pin: pinmux_P8_06_gpio_pin { ++ pinctrl-single,pins = <0x00c 0x2F>; }; /* Mode 7, RxActive */ ++ P8_06_gpio_pu_pin: pinmux_P8_06_gpio_pu_pin { ++ pinctrl-single,pins = <0x00c 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_06_gpio_pd_pin: pinmux_P8_06_gpio_pd_pin { ++ pinctrl-single,pins = <0x00c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ ++ ++ /* P8_20 (ZCZ ball V9 ) emmc */ ++ P8_20_default_pin: pinmux_P8_20_default_pin { ++ pinctrl-single,pins = <0x084 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_20_gpio_pin: pinmux_P8_20_gpio_pin { ++ pinctrl-single,pins = <0x084 0x2F>; }; /* Mode 7, RxActive */ ++ P8_20_gpio_pu_pin: pinmux_P8_20_gpio_pu_pin { ++ pinctrl-single,pins = <0x084 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_20_gpio_pd_pin: pinmux_P8_20_gpio_pd_pin { ++ pinctrl-single,pins = <0x084 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_20_pruout_pin: pinmux_P8_20_pruout_pin { ++ pinctrl-single,pins = <0x084 0x25>; }; /* Mode 5, Pull-Down, RxActive */ ++ P8_20_pruin_pin: pinmux_P8_20_pruin_pin { ++ pinctrl-single,pins = <0x084 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ ++ ++ /* P8_21 (ZCZ ball U9 ) emmc */ ++ P8_21_default_pin: pinmux_P8_21_default_pin { ++ pinctrl-single,pins = <0x080 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_21_gpio_pin: pinmux_P8_21_gpio_pin { ++ pinctrl-single,pins = <0x080 0x2F>; }; /* Mode 7, RxActive */ ++ P8_21_gpio_pu_pin: pinmux_P8_21_gpio_pu_pin { ++ pinctrl-single,pins = <0x080 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_21_gpio_pd_pin: pinmux_P8_21_gpio_pd_pin { ++ pinctrl-single,pins = <0x080 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_21_pruout_pin: pinmux_P8_21_pruout_pin { ++ pinctrl-single,pins = <0x080 0x25>; }; /* Mode 5, Pull-Down, RxActive */ ++ P8_21_pruin_pin: pinmux_P8_21_pruin_pin { ++ pinctrl-single,pins = <0x080 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ ++ /* P8_22 (ZCZ ball V8 ) emmc */ ++ P8_22_default_pin: pinmux_P8_22_default_pin { ++ pinctrl-single,pins = <0x014 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_22_gpio_pin: pinmux_P8_22_gpio_pin { ++ pinctrl-single,pins = <0x014 0x2F>; }; /* Mode 7, RxActive */ ++ P8_22_gpio_pu_pin: pinmux_P8_22_gpio_pu_pin { ++ pinctrl-single,pins = <0x014 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_22_gpio_pd_pin: pinmux_P8_22_gpio_pd_pin { ++ pinctrl-single,pins = <0x014 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ ++ /* P8_23 (ZCZ ball U8 ) emmc */ ++ P8_23_default_pin: pinmux_P8_23_default_pin { ++ pinctrl-single,pins = <0x010 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_23_gpio_pin: pinmux_P8_23_gpio_pin { ++ pinctrl-single,pins = <0x010 0x2F>; }; /* Mode 7, RxActive */ ++ P8_23_gpio_pu_pin: pinmux_P8_23_gpio_pu_pin { ++ pinctrl-single,pins = <0x010 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_23_gpio_pd_pin: pinmux_P8_23_gpio_pd_pin { ++ pinctrl-single,pins = <0x010 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ ++ /* P8_24 (ZCZ ball V7 ) emmc */ ++ P8_24_default_pin: pinmux_P8_24_default_pin { ++ pinctrl-single,pins = <0x004 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_24_gpio_pin: pinmux_P8_24_gpio_pin { ++ pinctrl-single,pins = <0x004 0x2F>; }; /* Mode 7, RxActive */ ++ P8_24_gpio_pu_pin: pinmux_P8_24_gpio_pu_pin { ++ pinctrl-single,pins = <0x004 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_24_gpio_pd_pin: pinmux_P8_24_gpio_pd_pin { ++ pinctrl-single,pins = <0x004 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ ++ /* P8_25 (ZCZ ball U7 ) emmc */ ++ P8_25_default_pin: pinmux_P8_25_default_pin { ++ pinctrl-single,pins = <0x000 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_25_gpio_pin: pinmux_P8_25_gpio_pin { ++ pinctrl-single,pins = <0x000 0x2F>; }; /* Mode 7, RxActive */ ++ P8_25_gpio_pu_pin: pinmux_P8_25_gpio_pu_pin { ++ pinctrl-single,pins = <0x000 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_25_gpio_pd_pin: pinmux_P8_25_gpio_pd_pin { ++ pinctrl-single,pins = <0x000 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ ++ }; ++ }; ++ ++ ++ /************************/ ++ /* Pin Multiplexing */ ++ /************************/ ++ ++ fragment@1 { ++ target = <&ocp>; ++ __overlay__ { ++ ++ /************************/ ++ /* P8 Header */ ++ /************************/ ++ ++ P8_03_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd"; ++ pinctrl-0 = <&P8_03_default_pin>; ++ pinctrl-1 = <&P8_03_gpio_pin>; ++ pinctrl-2 = <&P8_03_gpio_pu_pin>; ++ pinctrl-3 = <&P8_03_gpio_pd_pin>; ++ }; ++ ++ P8_04_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd"; ++ pinctrl-0 = <&P8_04_default_pin>; ++ pinctrl-1 = <&P8_04_gpio_pin>; ++ pinctrl-2 = <&P8_04_gpio_pu_pin>; ++ pinctrl-3 = <&P8_04_gpio_pd_pin>; ++ }; ++ ++ P8_05_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd"; ++ pinctrl-0 = <&P8_05_default_pin>; ++ pinctrl-1 = <&P8_05_gpio_pin>; ++ pinctrl-2 = <&P8_05_gpio_pu_pin>; ++ pinctrl-3 = <&P8_05_gpio_pd_pin>; ++ }; ++ ++ P8_06_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd"; ++ pinctrl-0 = <&P8_06_default_pin>; ++ pinctrl-1 = <&P8_06_gpio_pin>; ++ pinctrl-2 = <&P8_06_gpio_pu_pin>; ++ pinctrl-3 = <&P8_06_gpio_pd_pin>; ++ }; ++ ++ P8_20_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pruout", "pruin"; ++ pinctrl-0 = <&P8_20_default_pin>; ++ pinctrl-1 = <&P8_20_gpio_pin>; ++ pinctrl-2 = <&P8_20_gpio_pu_pin>; ++ pinctrl-3 = <&P8_20_gpio_pd_pin>; ++ pinctrl-4 = <&P8_20_pruout_pin>; ++ pinctrl-5 = <&P8_20_pruin_pin>; ++ }; ++ ++ P8_21_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pruout", "pruin"; ++ pinctrl-0 = <&P8_21_default_pin>; ++ pinctrl-1 = <&P8_21_gpio_pin>; ++ pinctrl-2 = <&P8_21_gpio_pu_pin>; ++ pinctrl-3 = <&P8_21_gpio_pd_pin>; ++ pinctrl-4 = <&P8_21_pruout_pin>; ++ pinctrl-5 = <&P8_21_pruin_pin>; ++ }; ++ ++ P8_22_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd"; ++ pinctrl-0 = <&P8_22_default_pin>; ++ pinctrl-1 = <&P8_22_gpio_pin>; ++ pinctrl-2 = <&P8_22_gpio_pu_pin>; ++ pinctrl-3 = <&P8_22_gpio_pd_pin>; ++ }; ++ ++ P8_23_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd"; ++ pinctrl-0 = <&P8_23_default_pin>; ++ pinctrl-1 = <&P8_23_gpio_pin>; ++ pinctrl-2 = <&P8_23_gpio_pu_pin>; ++ pinctrl-3 = <&P8_23_gpio_pd_pin>; ++ }; ++ ++ P8_24_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd"; ++ pinctrl-0 = <&P8_24_default_pin>; ++ pinctrl-1 = <&P8_24_gpio_pin>; ++ pinctrl-2 = <&P8_24_gpio_pu_pin>; ++ pinctrl-3 = <&P8_24_gpio_pd_pin>; ++ }; ++ ++ P8_25_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd"; ++ pinctrl-0 = <&P8_25_default_pin>; ++ pinctrl-1 = <&P8_25_gpio_pin>; ++ pinctrl-2 = <&P8_25_gpio_pu_pin>; ++ pinctrl-3 = <&P8_25_gpio_pd_pin>; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&ocp>; ++ __overlay__ { ++ ++ // !!!WARNING!!! ++ // gpio-of-helper &gpio pointers are off-by-one vs. the hardware: ++ // hardware GPIO bank 0 = &gpio1 ++ cape-universal { ++ compatible = "gpio-of-helper"; ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ ++ P8_03 { ++ gpio-name = "P8_03"; ++ gpio = <&gpio2 6 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_04 { ++ gpio-name = "P8_04"; ++ gpio = <&gpio2 7 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_05 { ++ gpio-name = "P8_05"; ++ gpio = <&gpio2 2 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_06 { ++ gpio-name = "P8_06"; ++ gpio = <&gpio2 3 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_20 { ++ gpio-name = "P8_20"; ++ gpio = <&gpio2 31 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_21 { ++ gpio-name = "P8_21"; ++ gpio = <&gpio2 30 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_22 { ++ gpio-name = "P8_22"; ++ gpio = <&gpio2 5 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_23 { ++ gpio-name = "P8_23"; ++ gpio = <&gpio2 4 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_24 { ++ gpio-name = "P8_24"; ++ gpio = <&gpio2 1 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_25 { ++ gpio-name = "P8_25"; ++ gpio = <&gpio2 0 0>; ++ input; ++ dir-changeable; ++ }; ++ ++ }; ++ }; ++ }; ++ ++}; +diff --git a/firmware/capes/cape-universal-00A0.dts b/firmware/capes/cape-universal-00A0.dts +new file mode 100644 +index 0000000..e0f4e13 +--- /dev/null ++++ b/firmware/capes/cape-universal-00A0.dts +@@ -0,0 +1,1730 @@ ++// Copyright 2013 ++// Charles Steinkuehler ++// ++// 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. ++// ++// 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, write to the Free Software ++// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "ti,beaglebone", "ti,beaglebone-black"; ++ ++ /* identification */ ++ part-number = "cape-bone-universal"; ++ version = "00A0"; ++ ++ /* state the resources this cape uses */ ++ exclusive-use = ++ ++/* "P8.1", GND */ ++/* "P8.2", GND */ ++/* "P8.3", emmc */ ++/* "P8.4", emmc */ ++/* "P8.5", emmc */ ++/* "P8.6", emmc */ ++ "P8.7", ++ "P8.8", ++ "P8.9", ++ "P8.10", ++ "P8.11", ++ "P8.12", ++ "P8.13", ++ "P8.14", ++ "P8.15", ++ "P8.16", ++ "P8.17", ++ "P8.18", ++ "P8.19", ++/* "P8.20", emmc */ ++/* "P8.21", emmc */ ++/* "P8.22", emmc */ ++/* "P8.23", emmc */ ++/* "P8.24", emmc */ ++/* "P8.25", emmc */ ++ "P8.26", ++/* "P8.27", hdmi */ ++/* "P8.28", hdmi */ ++/* "P8.29", hdmi */ ++/* "P8.30", hdmi */ ++/* "P8.31", hdmi */ ++/* "P8.32", hdmi */ ++/* "P8.33", hdmi */ ++/* "P8.34", hdmi */ ++/* "P8.35", hdmi */ ++/* "P8.36", hdmi */ ++/* "P8.37", hdmi */ ++/* "P8.38", hdmi */ ++/* "P8.39", hdmi */ ++/* "P8.40", hdmi */ ++/* "P8.41", hdmi */ ++/* "P8.42", hdmi */ ++/* "P8.43", hdmi */ ++/* "P8.44", hdmi */ ++/* "P8.45", hdmi */ ++/* "P8.46", hdmi */ ++ ++/* "P9.1", GND */ ++/* "P9.2", GND */ ++/* "P9.3", 3.3V */ ++/* "P9.4", 3.3V */ ++/* "P9.5", VDD_5V */ ++/* "P9.6", VDD_5V */ ++/* "P9.7", SYS_5V */ ++/* "P9.8", SYS_5V */ ++/* "P9.9", PWR_BUT */ ++/* "P9.10", RESETn */ ++ "P9.11", ++ "P9.12", ++ "P9.13", ++ "P9.14", ++ "P9.15", ++ "P9.16", ++ "P9.17", ++ "P9.18", ++/* "P9.19", I2C */ ++/* "P9.20", I2C */ ++ "P9.21", ++ "P9.22", ++ "P9.23", ++ "P9.24", ++ "P9.25", ++ "P9.26", ++ "P9.27", ++ "P9.28", ++ "P9.29", ++ "P9.30", ++ "P9.31", ++/* "P9.32", VADC */ ++/* "P9.33", AIN4 */ ++/* "P9.34", AGND */ ++/* "P9.35", AIN6 */ ++/* "P9.36", AIN5 */ ++/* "P9.37", AIN2 */ ++/* "P9.38", AIN3 */ ++/* "P9.39", AIN0 */ ++/* "P9.40", AIN1 */ ++ "P9.41", ++ "P9.41.1", ++ "P9.42", ++ "P9.42.1", ++/* "P9.43", GND */ ++/* "P9.44", GND */ ++/* "P9.45", GND */ ++/* "P9.46", GND */ ++ ++ "uart1", ++ "uart2", ++ "uart4", ++// "uart5", /* Conflicts with HDMI */ ++ ++ "ehrpwm0A", ++ "ehrpwm0B", ++ "ehrpwm1A", ++ "ehrpwm1B", ++ "ehrpwm2A", ++ "ehrpwm2B", ++ ++// "epwmss0", ++// "ehrpwm0", ++// "ecap0", ++// "epwmss1", ++// "ehrpwm1", ++// "epwmss2", ++// "ehrpwm2", ++// "ecap2", ++ ++ "i2c1", ++ "spi1", ++ "spi0", ++ "dcan0", ++ "dcan1", ++ ++ "pru0", ++ "pru1", ++ "pruss"; ++ ++ fragment@0 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ ++ /************************/ ++ /* P8 Header */ ++ /************************/ ++ ++ /* P8_01 GND */ ++ /* P8_02 GND */ ++ /* P8_03 (ZCZ ball R9 ) emmc */ ++ /* P8_04 (ZCZ ball T9 ) emmc */ ++ /* P8_05 (ZCZ ball R8 ) emmc */ ++ /* P8_06 (ZCZ ball T8 ) emmc */ ++ ++ /* P8_07 (ZCZ ball R7 ) */ ++ P8_07_default_pin: pinmux_P8_07_default_pin { ++ pinctrl-single,pins = <0x090 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_07_gpio_pin: pinmux_P8_07_gpio_pin { ++ pinctrl-single,pins = <0x090 0x2F>; }; /* Mode 7, RxActive */ ++ P8_07_gpio_pu_pin: pinmux_P8_07_gpio_pu_pin { ++ pinctrl-single,pins = <0x090 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_07_gpio_pd_pin: pinmux_P8_07_gpio_pd_pin { ++ pinctrl-single,pins = <0x090 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_07_timer_pin: pinmux_P8_07_timer_pin { ++ pinctrl-single,pins = <0x090 0x32>; }; /* Mode 2, Pull-Up, RxActive */ ++ ++ /* P8_08 (ZCZ ball T7 ) */ ++ P8_08_default_pin: pinmux_P8_08_default_pin { ++ pinctrl-single,pins = <0x094 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_08_gpio_pin: pinmux_P8_08_gpio_pin { ++ pinctrl-single,pins = <0x094 0x2F>; }; /* Mode 7, RxActive */ ++ P8_08_gpio_pu_pin: pinmux_P8_08_gpio_pu_pin { ++ pinctrl-single,pins = <0x094 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_08_gpio_pd_pin: pinmux_P8_08_gpio_pd_pin { ++ pinctrl-single,pins = <0x094 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_08_timer_pin: pinmux_P8_08_timer_pin { ++ pinctrl-single,pins = <0x094 0x32>; }; /* Mode 2, Pull-Up, RxActive */ ++ ++ /* P8_09 (ZCZ ball T6 ) */ ++ P8_09_default_pin: pinmux_P8_09_default_pin { ++ pinctrl-single,pins = <0x09c 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_09_gpio_pin: pinmux_P8_09_gpio_pin { ++ pinctrl-single,pins = <0x09c 0x2F>; }; /* Mode 7, RxActive */ ++ P8_09_gpio_pu_pin: pinmux_P8_09_gpio_pu_pin { ++ pinctrl-single,pins = <0x09c 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_09_gpio_pd_pin: pinmux_P8_09_gpio_pd_pin { ++ pinctrl-single,pins = <0x09c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_09_timer_pin: pinmux_P8_09_timer_pin { ++ pinctrl-single,pins = <0x09c 0x32>; }; /* Mode 2, Pull-Up, RxActive */ ++ ++ /* P8_10 (ZCZ ball U6 ) */ ++ P8_10_default_pin: pinmux_P8_10_default_pin { ++ pinctrl-single,pins = <0x098 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_10_gpio_pin: pinmux_P8_10_gpio_pin { ++ pinctrl-single,pins = <0x098 0x2F>; }; /* Mode 7, RxActive */ ++ P8_10_gpio_pu_pin: pinmux_P8_10_gpio_pu_pin { ++ pinctrl-single,pins = <0x098 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_10_gpio_pd_pin: pinmux_P8_10_gpio_pd_pin { ++ pinctrl-single,pins = <0x098 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_10_timer_pin: pinmux_P8_10_timer_pin { ++ pinctrl-single,pins = <0x098 0x32>; }; /* Mode 2, Pull-Up, RxActive */ ++ ++ /* P8_11 (ZCZ ball R12) */ ++ P8_11_default_pin: pinmux_P8_11_default_pin { ++ pinctrl-single,pins = <0x034 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_11_gpio_pin: pinmux_P8_11_gpio_pin { ++ pinctrl-single,pins = <0x034 0x2F>; }; /* Mode 7, RxActive */ ++ P8_11_gpio_pu_pin: pinmux_P8_11_gpio_pu_pin { ++ pinctrl-single,pins = <0x034 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_11_gpio_pd_pin: pinmux_P8_11_gpio_pd_pin { ++ pinctrl-single,pins = <0x034 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_11_pruout_pin: pinmux_P8_11_pruout_pin { ++ pinctrl-single,pins = <0x034 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ P8_11_qep_pin: pinmux_P8_11_qep_pin { ++ pinctrl-single,pins = <0x034 0x24>; }; /* Mode 4, Pull-Down, RxActive */ ++ ++ /* P8_12 (ZCZ ball T12) */ ++ P8_12_default_pin: pinmux_P8_12_default_pin { ++ pinctrl-single,pins = <0x030 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_12_gpio_pin: pinmux_P8_12_gpio_pin { ++ pinctrl-single,pins = <0x030 0x2F>; }; /* Mode 7, RxActive */ ++ P8_12_gpio_pu_pin: pinmux_P8_12_gpio_pu_pin { ++ pinctrl-single,pins = <0x030 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_12_gpio_pd_pin: pinmux_P8_12_gpio_pd_pin { ++ pinctrl-single,pins = <0x030 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_12_pruout_pin: pinmux_P8_12_pruout_pin { ++ pinctrl-single,pins = <0x030 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ P8_12_qep_pin: pinmux_P8_12_qep_pin { ++ pinctrl-single,pins = <0x030 0x24>; }; /* Mode 4, Pull-Down, RxActive */ ++ ++ /* P8_13 (ZCZ ball T10) */ ++ P8_13_default_pin: pinmux_P8_13_default_pin { ++ pinctrl-single,pins = <0x024 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_13_gpio_pin: pinmux_P8_13_gpio_pin { ++ pinctrl-single,pins = <0x024 0x2F>; }; /* Mode 7, RxActive */ ++ P8_13_gpio_pu_pin: pinmux_P8_13_gpio_pu_pin { ++ pinctrl-single,pins = <0x024 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_13_gpio_pd_pin: pinmux_P8_13_gpio_pd_pin { ++ pinctrl-single,pins = <0x024 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_13_pwm_pin: pinmux_P8_13_pwm_pin { ++ pinctrl-single,pins = <0x024 0x24>; }; /* Mode 4, Pull-Down, RxActive */ ++ ++ /* P8_14 (ZCZ ball T11) */ ++ P8_14_default_pin: pinmux_P8_14_default_pin { ++ pinctrl-single,pins = <0x028 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_14_gpio_pin: pinmux_P8_14_gpio_pin { ++ pinctrl-single,pins = <0x028 0x2F>; }; /* Mode 7, RxActive */ ++ P8_14_gpio_pu_pin: pinmux_P8_14_gpio_pu_pin { ++ pinctrl-single,pins = <0x028 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_14_gpio_pd_pin: pinmux_P8_14_gpio_pd_pin { ++ pinctrl-single,pins = <0x028 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_14_pwm_pin: pinmux_P8_14_pwm_pin { ++ pinctrl-single,pins = <0x028 0x24>; }; /* Mode 4, Pull-Down, RxActive */ ++ ++ /* P8_15 (ZCZ ball U13) */ ++ P8_15_default_pin: pinmux_P8_15_default_pin { ++ pinctrl-single,pins = <0x03c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_15_gpio_pin: pinmux_P8_15_gpio_pin { ++ pinctrl-single,pins = <0x03c 0x2F>; }; /* Mode 7, RxActive */ ++ P8_15_gpio_pu_pin: pinmux_P8_15_gpio_pu_pin { ++ pinctrl-single,pins = <0x03c 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_15_gpio_pd_pin: pinmux_P8_15_gpio_pd_pin { ++ pinctrl-single,pins = <0x03c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_15_pruin_pin: pinmux_P8_15_pruin_pin { ++ pinctrl-single,pins = <0x03c 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ P8_15_qep_pin: pinmux_P8_15_qep_pin { ++ pinctrl-single,pins = <0x03c 0x24>; }; /* Mode 4, Pull-Down, RxActive */ ++ ++ /* P8_16 (ZCZ ball V13) */ ++ P8_16_default_pin: pinmux_P8_16_default_pin { ++ pinctrl-single,pins = <0x038 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_16_gpio_pin: pinmux_P8_16_gpio_pin { ++ pinctrl-single,pins = <0x038 0x2F>; }; /* Mode 7, RxActive */ ++ P8_16_gpio_pu_pin: pinmux_P8_16_gpio_pu_pin { ++ pinctrl-single,pins = <0x038 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_16_gpio_pd_pin: pinmux_P8_16_gpio_pd_pin { ++ pinctrl-single,pins = <0x038 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_16_pruin_pin: pinmux_P8_16_pruin_pin { ++ pinctrl-single,pins = <0x038 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ P8_16_qep_pin: pinmux_P8_16_qep_pin { ++ pinctrl-single,pins = <0x038 0x24>; }; /* Mode 4, Pull-Down, RxActive */ ++ ++ /* P8_17 (ZCZ ball U12) */ ++ P8_17_default_pin: pinmux_P8_17_default_pin { ++ pinctrl-single,pins = <0x02c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_17_gpio_pin: pinmux_P8_17_gpio_pin { ++ pinctrl-single,pins = <0x02c 0x2F>; }; /* Mode 7, RxActive */ ++ P8_17_gpio_pu_pin: pinmux_P8_17_gpio_pu_pin { ++ pinctrl-single,pins = <0x02c 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_17_gpio_pd_pin: pinmux_P8_17_gpio_pd_pin { ++ pinctrl-single,pins = <0x02c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_17_pwm_pin: pinmux_P8_17_pwm_pin { ++ pinctrl-single,pins = <0x02c 0x24>; }; /* Mode 4, Pull-Down, RxActive */ ++ ++ /* P8_18 (ZCZ ball V12) */ ++ P8_18_default_pin: pinmux_P8_18_default_pin { ++ pinctrl-single,pins = <0x08c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_18_gpio_pin: pinmux_P8_18_gpio_pin { ++ pinctrl-single,pins = <0x08c 0x2F>; }; /* Mode 7, RxActive */ ++ P8_18_gpio_pu_pin: pinmux_P8_18_gpio_pu_pin { ++ pinctrl-single,pins = <0x08c 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_18_gpio_pd_pin: pinmux_P8_18_gpio_pd_pin { ++ pinctrl-single,pins = <0x08c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ ++ /* P8_19 (ZCZ ball U10) */ ++ P8_19_default_pin: pinmux_P8_19_default_pin { ++ pinctrl-single,pins = <0x020 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_19_gpio_pin: pinmux_P8_19_gpio_pin { ++ pinctrl-single,pins = <0x020 0x2F>; }; /* Mode 7, RxActive */ ++ P8_19_gpio_pu_pin: pinmux_P8_19_gpio_pu_pin { ++ pinctrl-single,pins = <0x020 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_19_gpio_pd_pin: pinmux_P8_19_gpio_pd_pin { ++ pinctrl-single,pins = <0x020 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_19_pwm_pin: pinmux_P8_19_pwm_pin { ++ pinctrl-single,pins = <0x020 0x24>; }; /* Mode 4, Pull-Down, RxActive */ ++ ++ /* P8_20 (ZCZ ball V9 ) emmc */ ++ /* P8_21 (ZCZ ball U9 ) emmc */ ++ /* P8_22 (ZCZ ball V8 ) emmc */ ++ /* P8_23 (ZCZ ball U8 ) emmc */ ++ /* P8_24 (ZCZ ball V7 ) emmc */ ++ /* P8_25 (ZCZ ball U7 ) emmc */ ++ ++ /* P8_26 (ZCZ ball V6 ) */ ++ P8_26_default_pin: pinmux_P8_26_default_pin { ++ pinctrl-single,pins = <0x07c 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_26_gpio_pin: pinmux_P8_26_gpio_pin { ++ pinctrl-single,pins = <0x07c 0x2F>; }; /* Mode 7, RxActive */ ++ P8_26_gpio_pu_pin: pinmux_P8_26_gpio_pu_pin { ++ pinctrl-single,pins = <0x07c 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_26_gpio_pd_pin: pinmux_P8_26_gpio_pd_pin { ++ pinctrl-single,pins = <0x07c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ ++ /* P8_27 (ZCZ ball U5 ) hdmi */ ++ /* P8_28 (ZCZ ball V5 ) hdmi */ ++ /* P8_29 (ZCZ ball R5 ) hdmi */ ++ /* P8_30 (ZCZ ball R6 ) hdmi */ ++ /* P8_31 (ZCZ ball V4 ) hdmi */ ++ /* P8_32 (ZCZ ball T5 ) hdmi */ ++ /* P8_33 (ZCZ ball V3 ) hdmi */ ++ /* P8_34 (ZCZ ball U4 ) hdmi */ ++ /* P8_35 (ZCZ ball V2 ) hdmi */ ++ /* P8_36 (ZCZ ball U3 ) hdmi */ ++ /* P8_37 (ZCZ ball U1 ) hdmi */ ++ /* P8_38 (ZCZ ball U2 ) hdmi */ ++ /* P8_39 (ZCZ ball T3 ) hdmi */ ++ /* P8_40 (ZCZ ball T4 ) hdmi */ ++ /* P8_41 (ZCZ ball T1 ) hdmi */ ++ /* P8_42 (ZCZ ball T2 ) hdmi */ ++ /* P8_43 (ZCZ ball R3 ) hdmi */ ++ /* P8_44 (ZCZ ball R4 ) hdmi */ ++ /* P8_45 (ZCZ ball R1 ) hdmi */ ++ /* P8_46 (ZCZ ball R2 ) hdmi */ ++ ++ ++ /************************/ ++ /* P9 Header */ ++ /************************/ ++ ++ /* P9_01 GND */ ++ /* P9_02 GND */ ++ /* P9_03 3.3V */ ++ /* P9_04 3.3V */ ++ /* P9_05 VDD_5V */ ++ /* P9_06 VDD_5V */ ++ /* P9_07 SYS_5V */ ++ /* P9_08 SYS_5V */ ++ /* P9_09 PWR_BUT */ ++ /* P9_10 (ZCZ ball A10) RESETn */ ++ ++ /* P9_11 (ZCZ ball T17) */ ++ P9_11_default_pin: pinmux_P9_11_default_pin { ++ pinctrl-single,pins = <0x070 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_11_gpio_pin: pinmux_P9_11_gpio_pin { ++ pinctrl-single,pins = <0x070 0x2F>; }; /* Mode 7, RxActive */ ++ P9_11_gpio_pu_pin: pinmux_P9_11_gpio_pu_pin { ++ pinctrl-single,pins = <0x070 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_11_gpio_pd_pin: pinmux_P9_11_gpio_pd_pin { ++ pinctrl-single,pins = <0x070 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_11_uart_pin: pinmux_P9_11_uart_pin { ++ pinctrl-single,pins = <0x070 0x36>; }; /* Mode 6, Pull-Up, RxActive */ ++ ++ /* P9_12 (ZCZ ball U18) */ ++ P9_12_default_pin: pinmux_P9_12_default_pin { ++ pinctrl-single,pins = <0x078 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_12_gpio_pin: pinmux_P9_12_gpio_pin { ++ pinctrl-single,pins = <0x078 0x2F>; }; /* Mode 7, RxActive */ ++ P9_12_gpio_pu_pin: pinmux_P9_12_gpio_pu_pin { ++ pinctrl-single,pins = <0x078 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_12_gpio_pd_pin: pinmux_P9_12_gpio_pd_pin { ++ pinctrl-single,pins = <0x078 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ ++ /* P9_13 (ZCZ ball U17) */ ++ P9_13_default_pin: pinmux_P9_13_default_pin { ++ pinctrl-single,pins = <0x074 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_13_gpio_pin: pinmux_P9_13_gpio_pin { ++ pinctrl-single,pins = <0x074 0x2F>; }; /* Mode 7, RxActive */ ++ P9_13_gpio_pu_pin: pinmux_P9_13_gpio_pu_pin { ++ pinctrl-single,pins = <0x074 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_13_gpio_pd_pin: pinmux_P9_13_gpio_pd_pin { ++ pinctrl-single,pins = <0x074 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_13_uart_pin: pinmux_P9_13_uart_pin { ++ pinctrl-single,pins = <0x074 0x36>; }; /* Mode 6, Pull-Up, RxActive */ ++ ++ /* P9_14 (ZCZ ball U14) */ ++ P9_14_default_pin: pinmux_P9_14_default_pin { ++ pinctrl-single,pins = <0x048 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_14_gpio_pin: pinmux_P9_14_gpio_pin { ++ pinctrl-single,pins = <0x048 0x2F>; }; /* Mode 7, RxActive */ ++ P9_14_gpio_pu_pin: pinmux_P9_14_gpio_pu_pin { ++ pinctrl-single,pins = <0x048 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_14_gpio_pd_pin: pinmux_P9_14_gpio_pd_pin { ++ pinctrl-single,pins = <0x048 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_14_pwm_pin: pinmux_P9_14_pwm_pin { ++ pinctrl-single,pins = <0x048 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ ++ /* P9_15 (ZCZ ball R13) */ ++ P9_15_default_pin: pinmux_P9_15_default_pin { ++ pinctrl-single,pins = <0x040 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_15_gpio_pin: pinmux_P9_15_gpio_pin { ++ pinctrl-single,pins = <0x040 0x2F>; }; /* Mode 7, RxActive */ ++ P9_15_gpio_pu_pin: pinmux_P9_15_gpio_pu_pin { ++ pinctrl-single,pins = <0x040 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_15_gpio_pd_pin: pinmux_P9_15_gpio_pd_pin { ++ pinctrl-single,pins = <0x040 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_15_pwm_pin: pinmux_P9_15_pwm_pin { ++ pinctrl-single,pins = <0x040 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ ++ /* P9_16 (ZCZ ball T14) */ ++ P9_16_default_pin: pinmux_P9_16_default_pin { ++ pinctrl-single,pins = <0x04c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_16_gpio_pin: pinmux_P9_16_gpio_pin { ++ pinctrl-single,pins = <0x04c 0x2F>; }; /* Mode 7, RxActive */ ++ P9_16_gpio_pu_pin: pinmux_P9_16_gpio_pu_pin { ++ pinctrl-single,pins = <0x04c 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_16_gpio_pd_pin: pinmux_P9_16_gpio_pd_pin { ++ pinctrl-single,pins = <0x04c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_16_pwm_pin: pinmux_P9_16_pwm_pin { ++ pinctrl-single,pins = <0x04c 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ ++ /* P9_17 (ZCZ ball A16) */ ++ P9_17_default_pin: pinmux_P9_17_default_pin { ++ pinctrl-single,pins = <0x15c 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_17_gpio_pin: pinmux_P9_17_gpio_pin { ++ pinctrl-single,pins = <0x15c 0x2F>; }; /* Mode 7, RxActive */ ++ P9_17_gpio_pu_pin: pinmux_P9_17_gpio_pu_pin { ++ pinctrl-single,pins = <0x15c 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_17_gpio_pd_pin: pinmux_P9_17_gpio_pd_pin { ++ pinctrl-single,pins = <0x15c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_17_spi_pin: pinmux_P9_17_spi_pin { ++ pinctrl-single,pins = <0x15c 0x30>; }; /* Mode 0, Pull-Up, RxActive */ ++ P9_17_i2c_pin: pinmux_P9_17_i2c_pin { ++ pinctrl-single,pins = <0x15c 0x32>; }; /* Mode 2, Pull-Up, RxActive */ ++ P9_17_pwm_pin: pinmux_P9_17_pwm_pin { ++ pinctrl-single,pins = <0x15c 0x33>; }; /* Mode 3, Pull-Up, RxActive */ ++ ++ /* P9_18 (ZCZ ball B16) */ ++ P9_18_default_pin: pinmux_P9_18_default_pin { ++ pinctrl-single,pins = <0x158 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_18_gpio_pin: pinmux_P9_18_gpio_pin { ++ pinctrl-single,pins = <0x158 0x2F>; }; /* Mode 7, RxActive */ ++ P9_18_gpio_pu_pin: pinmux_P9_18_gpio_pu_pin { ++ pinctrl-single,pins = <0x158 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_18_gpio_pd_pin: pinmux_P9_18_gpio_pd_pin { ++ pinctrl-single,pins = <0x158 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_18_spi_pin: pinmux_P9_18_spi_pin { ++ pinctrl-single,pins = <0x158 0x30>; }; /* Mode 0, Pull-Up, RxActive */ ++ P9_18_i2c_pin: pinmux_P9_18_i2c_pin { ++ pinctrl-single,pins = <0x158 0x32>; }; /* Mode 2, Pull-Up, RxActive */ ++ P9_18_pwm_pin: pinmux_P9_18_pwm_pin { ++ pinctrl-single,pins = <0x158 0x33>; }; /* Mode 3, Pull-Up, RxActive */ ++ ++ // Leave the cape I2C EEPROM bus alone ++ /* P9_19 (ZCZ ball D17) I2C */ ++ /* P9_20 (ZCZ ball D18) I2C */ ++ ++ /* P9_21 (ZCZ ball B17) */ ++ P9_21_default_pin: pinmux_P9_21_default_pin { ++ pinctrl-single,pins = <0x154 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_21_gpio_pin: pinmux_P9_21_gpio_pin { ++ pinctrl-single,pins = <0x154 0x2F>; }; /* Mode 7, RxActive */ ++ P9_21_gpio_pu_pin: pinmux_P9_21_gpio_pu_pin { ++ pinctrl-single,pins = <0x154 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_21_gpio_pd_pin: pinmux_P9_21_gpio_pd_pin { ++ pinctrl-single,pins = <0x154 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_21_spi_pin: pinmux_P9_21_spi_pin { ++ pinctrl-single,pins = <0x154 0x30>; }; /* Mode 0, Pull-Up, RxActive */ ++ P9_21_uart_pin: pinmux_P9_21_uart_pin { ++ pinctrl-single,pins = <0x154 0x31>; }; /* Mode 1, Pull-Up, RxActive */ ++ P9_21_i2c_pin: pinmux_P9_21_i2c_pin { ++ pinctrl-single,pins = <0x154 0x32>; }; /* Mode 2, Pull-Up, RxActive */ ++ P9_21_pwm_pin: pinmux_P9_21_pwm_pin { ++ pinctrl-single,pins = <0x154 0x33>; }; /* Mode 3, Pull-Up, RxActive */ ++ ++ /* P9_22 (ZCZ ball A17) */ ++ P9_22_default_pin: pinmux_P9_22_default_pin { ++ pinctrl-single,pins = <0x150 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_22_gpio_pin: pinmux_P9_22_gpio_pin { ++ pinctrl-single,pins = <0x150 0x2F>; }; /* Mode 7, RxActive */ ++ P9_22_gpio_pu_pin: pinmux_P9_22_gpio_pu_pin { ++ pinctrl-single,pins = <0x150 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_22_gpio_pd_pin: pinmux_P9_22_gpio_pd_pin { ++ pinctrl-single,pins = <0x150 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_22_spi_pin: pinmux_P9_22_spi_pin { ++ pinctrl-single,pins = <0x150 0x30>; }; /* Mode 0, Pull-Up, RxActive */ ++ P9_22_uart_pin: pinmux_P9_22_uart_pin { ++ pinctrl-single,pins = <0x150 0x31>; }; /* Mode 1, Pull-Up, RxActive */ ++ P9_22_i2c_pin: pinmux_P9_22_i2c_pin { ++ pinctrl-single,pins = <0x150 0x32>; }; /* Mode 2, Pull-Up, RxActive */ ++ P9_22_pwm_pin: pinmux_P9_22_pwm_pin { ++ pinctrl-single,pins = <0x150 0x33>; }; /* Mode 3, Pull-Up, RxActive */ ++ ++ /* P9_23 (ZCZ ball V14) */ ++ P9_23_default_pin: pinmux_P9_23_default_pin { ++ pinctrl-single,pins = <0x044 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_23_gpio_pin: pinmux_P9_23_gpio_pin { ++ pinctrl-single,pins = <0x044 0x2F>; }; /* Mode 7, RxActive */ ++ P9_23_gpio_pu_pin: pinmux_P9_23_gpio_pu_pin { ++ pinctrl-single,pins = <0x044 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_23_gpio_pd_pin: pinmux_P9_23_gpio_pd_pin { ++ pinctrl-single,pins = <0x044 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_23_pwm_pin: pinmux_P9_23_pwm_pin { ++ pinctrl-single,pins = <0x044 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ ++ /* P9_24 (ZCZ ball D15) */ ++ P9_24_default_pin: pinmux_P9_24_default_pin { ++ pinctrl-single,pins = <0x184 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_24_gpio_pin: pinmux_P9_24_gpio_pin { ++ pinctrl-single,pins = <0x184 0x2F>; }; /* Mode 7, RxActive */ ++ P9_24_gpio_pu_pin: pinmux_P9_24_gpio_pu_pin { ++ pinctrl-single,pins = <0x184 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_24_gpio_pd_pin: pinmux_P9_24_gpio_pd_pin { ++ pinctrl-single,pins = <0x184 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_24_uart_pin: pinmux_P9_24_uart_pin { ++ pinctrl-single,pins = <0x184 0x30>; }; /* Mode 0, Pull-Up, RxActive */ ++ P9_24_can_pin: pinmux_P9_24_can_pin { ++ pinctrl-single,pins = <0x184 0x32>; }; /* Mode 2, Pull-Up, RxActive */ ++ P9_24_i2c_pin: pinmux_P9_24_i2c_pin { ++ pinctrl-single,pins = <0x184 0x33>; }; /* Mode 3, Pull-Up, RxActive */ ++ P9_24_pruin_pin: pinmux_P9_24_pruin_pin { ++ pinctrl-single,pins = <0x184 0x36>; }; /* Mode 6, Pull-Up, RxActive */ ++ ++ /* P9_25 (ZCZ ball A14) Audio */ ++ P9_25_default_pin: pinmux_P9_25_default_pin { ++ pinctrl-single,pins = <0x1ac 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_25_gpio_pin: pinmux_P9_25_gpio_pin { ++ pinctrl-single,pins = <0x1ac 0x2F>; }; /* Mode 7, RxActive */ ++ P9_25_gpio_pu_pin: pinmux_P9_25_gpio_pu_pin { ++ pinctrl-single,pins = <0x1ac 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_25_gpio_pd_pin: pinmux_P9_25_gpio_pd_pin { ++ pinctrl-single,pins = <0x1ac 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_25_qep_pin: pinmux_P9_25_qep_pin { ++ pinctrl-single,pins = <0x1ac 0x21>; }; /* Mode 1, Pull-Down, RxActive */ ++ P9_25_pruout_pin: pinmux_P9_25_pruout_pin { ++ pinctrl-single,pins = <0x1ac 0x25>; }; /* Mode 5, Pull-Down, RxActive */ ++ P9_25_pruin_pin: pinmux_P9_25_pruin_pin { ++ pinctrl-single,pins = <0x1ac 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ ++ /* P9_26 (ZCZ ball D16) */ ++ P9_26_default_pin: pinmux_P9_26_default_pin { ++ pinctrl-single,pins = <0x180 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_26_gpio_pin: pinmux_P9_26_gpio_pin { ++ pinctrl-single,pins = <0x180 0x2F>; }; /* Mode 7, RxActive */ ++ P9_26_gpio_pu_pin: pinmux_P9_26_gpio_pu_pin { ++ pinctrl-single,pins = <0x180 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_26_gpio_pd_pin: pinmux_P9_26_gpio_pd_pin { ++ pinctrl-single,pins = <0x180 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_26_uart_pin: pinmux_P9_26_uart_pin { ++ pinctrl-single,pins = <0x180 0x30>; }; /* Mode 0, Pull-Up, RxActive */ ++ P9_26_can_pin: pinmux_P9_26_can_pin { ++ pinctrl-single,pins = <0x180 0x32>; }; /* Mode 2, Pull-Up, RxActive */ ++ P9_26_i2c_pin: pinmux_P9_26_i2c_pin { ++ pinctrl-single,pins = <0x180 0x33>; }; /* Mode 3, Pull-Up, RxActive */ ++ P9_26_pruin_pin: pinmux_P9_26_pruin_pin { ++ pinctrl-single,pins = <0x180 0x36>; }; /* Mode 6, Pull-Up, RxActive */ ++ ++ /* P9_27 (ZCZ ball C13) */ ++ P9_27_default_pin: pinmux_P9_27_default_pin { ++ pinctrl-single,pins = <0x1a4 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_27_gpio_pin: pinmux_P9_27_gpio_pin { ++ pinctrl-single,pins = <0x1a4 0x2F>; }; /* Mode 7, RxActive */ ++ P9_27_gpio_pu_pin: pinmux_P9_27_gpio_pu_pin { ++ pinctrl-single,pins = <0x1a4 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_27_gpio_pd_pin: pinmux_P9_27_gpio_pd_pin { ++ pinctrl-single,pins = <0x1a4 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_27_qep_pin: pinmux_P9_27_qep_pin { ++ pinctrl-single,pins = <0x1a4 0x21>; }; /* Mode 1, Pull-Down, RxActive */ ++ P9_27_pruout_pin: pinmux_P9_27_pruout_pin { ++ pinctrl-single,pins = <0x1a4 0x25>; }; /* Mode 5, Pull-Down, RxActive */ ++ P9_27_pruin_pin: pinmux_P9_27_pruin_pin { ++ pinctrl-single,pins = <0x1a4 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ ++ /* P9_28 (ZCZ ball C12) Audio */ ++ P9_28_default_pin: pinmux_P9_28_default_pin { ++ pinctrl-single,pins = <0x19c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_28_gpio_pin: pinmux_P9_28_gpio_pin { ++ pinctrl-single,pins = <0x19c 0x2F>; }; /* Mode 7, RxActive */ ++ P9_28_gpio_pu_pin: pinmux_P9_28_gpio_pu_pin { ++ pinctrl-single,pins = <0x19c 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_28_gpio_pd_pin: pinmux_P9_28_gpio_pd_pin { ++ pinctrl-single,pins = <0x19c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_28_pwm_pin: pinmux_P9_28_pwm_pin { ++ pinctrl-single,pins = <0x19c 0x21>; }; /* Mode 1, Pull-Down, RxActive */ ++ P9_28_spi_pin: pinmux_P9_28_spi_pin { ++ pinctrl-single,pins = <0x19c 0x23>; }; /* Mode 3, Pull-Down, RxActive */ ++ P9_28_pwm2_pin: pinmux_P9_28_pwm2_pin { ++ pinctrl-single,pins = <0x19c 0x24>; }; /* Mode 4, Pull-Down, RxActive */ ++ P9_28_pruout_pin: pinmux_P9_28_pruout_pin { ++ pinctrl-single,pins = <0x19c 0x25>; }; /* Mode 5, Pull-Down, RxActive */ ++ P9_28_pruin_pin: pinmux_P9_28_pruin_pin { ++ pinctrl-single,pins = <0x19c 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ ++ /* P9_29 (ZCZ ball B13) Audio */ ++ P9_29_default_pin: pinmux_P9_29_default_pin { ++ pinctrl-single,pins = <0x194 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_29_gpio_pin: pinmux_P9_29_gpio_pin { ++ pinctrl-single,pins = <0x194 0x2F>; }; /* Mode 7, RxActive */ ++ P9_29_gpio_pu_pin: pinmux_P9_29_gpio_pu_pin { ++ pinctrl-single,pins = <0x194 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_29_gpio_pd_pin: pinmux_P9_29_gpio_pd_pin { ++ pinctrl-single,pins = <0x194 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_29_pwm_pin: pinmux_P9_29_pwm_pin { ++ pinctrl-single,pins = <0x194 0x21>; }; /* Mode 1, Pull-Down, RxActive */ ++ P9_29_spi_pin: pinmux_P9_29_spi_pin { ++ pinctrl-single,pins = <0x194 0x23>; }; /* Mode 3, Pull-Down, RxActive */ ++ P9_29_pruout_pin: pinmux_P9_29_pruout_pin { ++ pinctrl-single,pins = <0x194 0x25>; }; /* Mode 5, Pull-Down, RxActive */ ++ P9_29_pruin_pin: pinmux_P9_29_pruin_pin { ++ pinctrl-single,pins = <0x194 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ ++ /* P9_30 (ZCZ ball D12) */ ++ P9_30_default_pin: pinmux_P9_30_default_pin { ++ pinctrl-single,pins = <0x198 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_30_gpio_pin: pinmux_P9_30_gpio_pin { ++ pinctrl-single,pins = <0x198 0x2F>; }; /* Mode 7, RxActive */ ++ P9_30_gpio_pu_pin: pinmux_P9_30_gpio_pu_pin { ++ pinctrl-single,pins = <0x198 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_30_gpio_pd_pin: pinmux_P9_30_gpio_pd_pin { ++ pinctrl-single,pins = <0x198 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_30_pwm_pin: pinmux_P9_30_pwm_pin { ++ pinctrl-single,pins = <0x198 0x21>; }; /* Mode 1, Pull-Down, RxActive */ ++ P9_30_spi_pin: pinmux_P9_30_spi_pin { ++ pinctrl-single,pins = <0x198 0x23>; }; /* Mode 3, Pull-Down, RxActive */ ++ P9_30_pruout_pin: pinmux_P9_30_pruout_pin { ++ pinctrl-single,pins = <0x198 0x25>; }; /* Mode 5, Pull-Down, RxActive */ ++ P9_30_pruin_pin: pinmux_P9_30_pruin_pin { ++ pinctrl-single,pins = <0x198 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ ++ /* P9_31 (ZCZ ball A13) Audio */ ++ P9_31_default_pin: pinmux_P9_31_default_pin { ++ pinctrl-single,pins = <0x190 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_31_gpio_pin: pinmux_P9_31_gpio_pin { ++ pinctrl-single,pins = <0x190 0x2F>; }; /* Mode 7, RxActive */ ++ P9_31_gpio_pu_pin: pinmux_P9_31_gpio_pu_pin { ++ pinctrl-single,pins = <0x190 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_31_gpio_pd_pin: pinmux_P9_31_gpio_pd_pin { ++ pinctrl-single,pins = <0x190 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_31_pwm_pin: pinmux_P9_31_pwm_pin { ++ pinctrl-single,pins = <0x190 0x21>; }; /* Mode 1, Pull-Down, RxActive */ ++ P9_31_spi_pin: pinmux_P9_31_spi_pin { ++ pinctrl-single,pins = <0x190 0x23>; }; /* Mode 3, Pull-Down, RxActive */ ++ P9_31_pruout_pin: pinmux_P9_31_pruout_pin { ++ pinctrl-single,pins = <0x190 0x25>; }; /* Mode 5, Pull-Down, RxActive */ ++ P9_31_pruin_pin: pinmux_P9_31_pruin_pin { ++ pinctrl-single,pins = <0x190 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ ++ /* P9_32 VADC */ ++ /* P9_33 (ZCZ ball C8 ) AIN4 */ ++ /* P9_34 AGND */ ++ /* P9_35 (ZCZ ball A8 ) AIN6 */ ++ /* P9_36 (ZCZ ball B8 ) AIN5 */ ++ /* P9_37 (ZCZ ball B7 ) AIN2 */ ++ /* P9_38 (ZCZ ball A7 ) AIN3 */ ++ /* P9_39 (ZCZ ball B6 ) AIN0 */ ++ /* P9_40 (ZCZ ball C7 ) AIN1 */ ++ ++ /* P9_41 (ZCZ ball D14) */ ++ P9_41_default_pin: pinmux_P9_41_default_pin { ++ pinctrl-single,pins = <0x1b4 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_41_gpio_pin: pinmux_P9_41_gpio_pin { ++ pinctrl-single,pins = <0x1b4 0x2F>; }; /* Mode 7, RxActive */ ++ P9_41_gpio_pu_pin: pinmux_P9_41_gpio_pu_pin { ++ pinctrl-single,pins = <0x1b4 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_41_gpio_pd_pin: pinmux_P9_41_gpio_pd_pin { ++ pinctrl-single,pins = <0x1b4 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_41_timer_pin: pinmux_P9_41_timer_pin { ++ pinctrl-single,pins = <0x1b4 0x24>; }; /* Mode 4, Pull-Down, RxActive */ ++ P9_41_pruin_pin: pinmux_P9_41_pruin_pin { ++ pinctrl-single,pins = <0x1b4 0x25>; }; /* Mode 5, Pull-Down, RxActive */ ++ ++ /* P9_41.1 */ ++ /* P9_91 (ZCZ ball D13) */ ++ P9_91_default_pin: pinmux_P9_91_default_pin { ++ pinctrl-single,pins = <0x1a8 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_91_gpio_pin: pinmux_P9_91_gpio_pin { ++ pinctrl-single,pins = <0x1a8 0x2F>; }; /* Mode 7, RxActive */ ++ P9_91_gpio_pu_pin: pinmux_P9_91_gpio_pu_pin { ++ pinctrl-single,pins = <0x1a8 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_91_gpio_pd_pin: pinmux_P9_91_gpio_pd_pin { ++ pinctrl-single,pins = <0x1a8 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_91_qep_pin: pinmux_P9_91_qep_pin { ++ pinctrl-single,pins = <0x1a8 0x21>; }; /* Mode 1, Pull-Down, RxActive */ ++ P9_91_pruout_pin: pinmux_P9_91_pruout_pin { ++ pinctrl-single,pins = <0x1a8 0x25>; }; /* Mode 5, Pull-Down, RxActive */ ++ P9_91_pruin_pin: pinmux_P9_91_pruin_pin { ++ pinctrl-single,pins = <0x1a8 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ ++ /* P9_42 (ZCZ ball C18) */ ++ P9_42_default_pin: pinmux_P9_42_default_pin { ++ pinctrl-single,pins = <0x164 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_42_gpio_pin: pinmux_P9_42_gpio_pin { ++ pinctrl-single,pins = <0x164 0x2F>; }; /* Mode 7, RxActive */ ++ P9_42_gpio_pu_pin: pinmux_P9_42_gpio_pu_pin { ++ pinctrl-single,pins = <0x164 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_42_gpio_pd_pin: pinmux_P9_42_gpio_pd_pin { ++ pinctrl-single,pins = <0x164 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_42_pwm_pin: pinmux_P9_42_pwm_pin { ++ pinctrl-single,pins = <0x164 0x20>; }; /* Mode 0, Pull-Down, RxActive */ ++ P9_42_uart_pin: pinmux_P9_42_uart_pin { ++ pinctrl-single,pins = <0x164 0x21>; }; /* Mode 1, Pull-Down, RxActive */ ++ P9_42_spics_pin: pinmux_P9_42_spics_pin { ++ pinctrl-single,pins = <0x164 0x22>; }; /* Mode 2, Pull-Down, RxActive */ ++ P9_42_spiclk_pin: pinmux_P9_42_spiclk_pin { ++ pinctrl-single,pins = <0x164 0x24>; }; /* Mode 4, Pull-Down, RxActive */ ++ ++ /* P9_42.1 */ ++ /* P9_92 (ZCZ ball B12) */ ++ P9_92_default_pin: pinmux_P9_92_default_pin { ++ pinctrl-single,pins = <0x1a0 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_92_gpio_pin: pinmux_P9_92_gpio_pin { ++ pinctrl-single,pins = <0x1a0 0x2F>; }; /* Mode 7, RxActive */ ++ P9_92_gpio_pu_pin: pinmux_P9_92_gpio_pu_pin { ++ pinctrl-single,pins = <0x1a0 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_92_gpio_pd_pin: pinmux_P9_92_gpio_pd_pin { ++ pinctrl-single,pins = <0x1a0 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_92_qep_pin: pinmux_P9_92_qep_pin { ++ pinctrl-single,pins = <0x1a0 0x21>; }; /* Mode 1, Pull-Down, RxActive */ ++ P9_92_pruout_pin: pinmux_P9_92_pruout_pin { ++ pinctrl-single,pins = <0x1a0 0x25>; }; /* Mode 5, Pull-Down, RxActive */ ++ P9_92_pruin_pin: pinmux_P9_92_pruin_pin { ++ pinctrl-single,pins = <0x1a0 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ ++ /* P9_43 GND */ ++ /* P9_44 GND */ ++ /* P9_45 GND */ ++ /* P9_46 GND */ ++ ++ }; ++ }; ++ ++ ++ /************************/ ++ /* Pin Multiplexing */ ++ /************************/ ++ ++ fragment@1 { ++ target = <&ocp>; ++ __overlay__ { ++ ++ /************************/ ++ /* P8 Header */ ++ /************************/ ++ ++ P8_07_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "timer"; ++ pinctrl-0 = <&P8_07_default_pin>; ++ pinctrl-1 = <&P8_07_gpio_pin>; ++ pinctrl-2 = <&P8_07_gpio_pu_pin>; ++ pinctrl-3 = <&P8_07_gpio_pd_pin>; ++ pinctrl-4 = <&P8_07_timer_pin>; ++ }; ++ ++ P8_08_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "timer"; ++ pinctrl-0 = <&P8_08_default_pin>; ++ pinctrl-1 = <&P8_08_gpio_pin>; ++ pinctrl-2 = <&P8_08_gpio_pu_pin>; ++ pinctrl-3 = <&P8_08_gpio_pd_pin>; ++ pinctrl-4 = <&P8_08_timer_pin>; ++ }; ++ ++ P8_09_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "timer"; ++ pinctrl-0 = <&P8_09_default_pin>; ++ pinctrl-1 = <&P8_09_gpio_pin>; ++ pinctrl-2 = <&P8_09_gpio_pu_pin>; ++ pinctrl-3 = <&P8_09_gpio_pd_pin>; ++ pinctrl-4 = <&P8_09_timer_pin>; ++ }; ++ ++ P8_10_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "timer"; ++ pinctrl-0 = <&P8_10_default_pin>; ++ pinctrl-1 = <&P8_10_gpio_pin>; ++ pinctrl-2 = <&P8_10_gpio_pu_pin>; ++ pinctrl-3 = <&P8_10_gpio_pd_pin>; ++ pinctrl-4 = <&P8_10_timer_pin>; ++ }; ++ ++ P8_11_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pruout", "qep"; ++ pinctrl-0 = <&P8_11_default_pin>; ++ pinctrl-1 = <&P8_11_gpio_pin>; ++ pinctrl-2 = <&P8_11_gpio_pu_pin>; ++ pinctrl-3 = <&P8_11_gpio_pd_pin>; ++ pinctrl-4 = <&P8_11_pruout_pin>; ++ pinctrl-5 = <&P8_11_qep_pin>; ++ }; ++ ++ P8_12_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pruout", "qep"; ++ pinctrl-0 = <&P8_12_default_pin>; ++ pinctrl-1 = <&P8_12_gpio_pin>; ++ pinctrl-2 = <&P8_12_gpio_pu_pin>; ++ pinctrl-3 = <&P8_12_gpio_pd_pin>; ++ pinctrl-4 = <&P8_12_pruout_pin>; ++ pinctrl-5 = <&P8_12_qep_pin>; ++ }; ++ ++ P8_13_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pwm"; ++ pinctrl-0 = <&P8_13_default_pin>; ++ pinctrl-1 = <&P8_13_gpio_pin>; ++ pinctrl-2 = <&P8_13_gpio_pu_pin>; ++ pinctrl-3 = <&P8_13_gpio_pd_pin>; ++ pinctrl-4 = <&P8_13_pwm_pin>; ++ }; ++ ++ P8_14_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pwm"; ++ pinctrl-0 = <&P8_14_default_pin>; ++ pinctrl-1 = <&P8_14_gpio_pin>; ++ pinctrl-2 = <&P8_14_gpio_pu_pin>; ++ pinctrl-3 = <&P8_14_gpio_pd_pin>; ++ pinctrl-4 = <&P8_14_pwm_pin>; ++ }; ++ ++ P8_15_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pruin", "qep"; ++ pinctrl-0 = <&P8_15_default_pin>; ++ pinctrl-1 = <&P8_15_gpio_pin>; ++ pinctrl-2 = <&P8_15_gpio_pu_pin>; ++ pinctrl-3 = <&P8_15_gpio_pd_pin>; ++ pinctrl-4 = <&P8_15_pruin_pin>; ++ pinctrl-5 = <&P8_15_qep_pin>; ++ }; ++ ++ P8_16_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pruin", "qep"; ++ pinctrl-0 = <&P8_16_default_pin>; ++ pinctrl-1 = <&P8_16_gpio_pin>; ++ pinctrl-2 = <&P8_16_gpio_pu_pin>; ++ pinctrl-3 = <&P8_16_gpio_pd_pin>; ++ pinctrl-4 = <&P8_16_pruin_pin>; ++ pinctrl-5 = <&P8_16_qep_pin>; ++ }; ++ ++ P8_17_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pwm"; ++ pinctrl-0 = <&P8_17_default_pin>; ++ pinctrl-1 = <&P8_17_gpio_pin>; ++ pinctrl-2 = <&P8_17_gpio_pu_pin>; ++ pinctrl-3 = <&P8_17_gpio_pd_pin>; ++ pinctrl-4 = <&P8_17_pwm_pin>; ++ }; ++ ++ P8_18_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio"; ++ pinctrl-0 = <&P8_18_default_pin>; ++ pinctrl-1 = <&P8_18_gpio_pin>; ++ pinctrl-2 = <&P8_18_gpio_pu_pin>; ++ pinctrl-3 = <&P8_18_gpio_pd_pin>; ++ }; ++ ++ P8_19_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pwm"; ++ pinctrl-0 = <&P8_19_default_pin>; ++ pinctrl-1 = <&P8_19_gpio_pin>; ++ pinctrl-2 = <&P8_19_gpio_pu_pin>; ++ pinctrl-3 = <&P8_19_gpio_pd_pin>; ++ pinctrl-4 = <&P8_19_pwm_pin>; ++ }; ++ ++ P8_26_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio"; ++ pinctrl-0 = <&P8_26_default_pin>; ++ pinctrl-1 = <&P8_26_gpio_pin>; ++ pinctrl-2 = <&P8_26_gpio_pu_pin>; ++ pinctrl-3 = <&P8_26_gpio_pd_pin>; ++ }; ++ ++ ++ /************************/ ++ /* P9 Header */ ++ /************************/ ++ ++ P9_11_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "uart"; ++ pinctrl-0 = <&P9_11_default_pin>; ++ pinctrl-1 = <&P9_11_gpio_pin>; ++ pinctrl-2 = <&P9_11_gpio_pu_pin>; ++ pinctrl-3 = <&P9_11_gpio_pd_pin>; ++ pinctrl-4 = <&P9_11_uart_pin>; ++ }; ++ ++ P9_12_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio"; ++ pinctrl-0 = <&P9_12_default_pin>; ++ pinctrl-1 = <&P9_12_gpio_pin>; ++ pinctrl-2 = <&P9_12_gpio_pu_pin>; ++ pinctrl-3 = <&P9_12_gpio_pd_pin>; ++ }; ++ ++ P9_13_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "uart"; ++ pinctrl-0 = <&P9_13_default_pin>; ++ pinctrl-1 = <&P9_13_gpio_pin>; ++ pinctrl-2 = <&P9_13_gpio_pu_pin>; ++ pinctrl-3 = <&P9_13_gpio_pd_pin>; ++ pinctrl-4 = <&P9_13_uart_pin>; ++ }; ++ ++ P9_14_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pwm"; ++ pinctrl-0 = <&P9_14_default_pin>; ++ pinctrl-1 = <&P9_14_gpio_pin>; ++ pinctrl-2 = <&P9_14_gpio_pu_pin>; ++ pinctrl-3 = <&P9_14_gpio_pd_pin>; ++ pinctrl-4 = <&P9_14_pwm_pin>; ++ }; ++ ++ P9_15_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pwm"; ++ pinctrl-0 = <&P9_15_default_pin>; ++ pinctrl-1 = <&P9_15_gpio_pin>; ++ pinctrl-2 = <&P9_15_gpio_pu_pin>; ++ pinctrl-3 = <&P9_15_gpio_pd_pin>; ++ pinctrl-4 = <&P9_15_pwm_pin>; ++ }; ++ ++ P9_16_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pwm"; ++ pinctrl-0 = <&P9_16_default_pin>; ++ pinctrl-1 = <&P9_16_gpio_pin>; ++ pinctrl-2 = <&P9_16_gpio_pu_pin>; ++ pinctrl-3 = <&P9_16_gpio_pd_pin>; ++ pinctrl-4 = <&P9_16_pwm_pin>; ++ }; ++ ++ P9_17_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "spi", "i2c", "pwm"; ++ pinctrl-0 = <&P9_17_default_pin>; ++ pinctrl-1 = <&P9_17_gpio_pin>; ++ pinctrl-2 = <&P9_17_gpio_pu_pin>; ++ pinctrl-3 = <&P9_17_gpio_pd_pin>; ++ pinctrl-4 = <&P9_17_spi_pin>; ++ pinctrl-5 = <&P9_17_i2c_pin>; ++ pinctrl-6 = <&P9_17_pwm_pin>; ++ }; ++ ++ P9_18_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "spi", "i2c", "pwm"; ++ pinctrl-0 = <&P9_18_default_pin>; ++ pinctrl-1 = <&P9_18_gpio_pin>; ++ pinctrl-2 = <&P9_18_gpio_pu_pin>; ++ pinctrl-3 = <&P9_18_gpio_pd_pin>; ++ pinctrl-4 = <&P9_18_spi_pin>; ++ pinctrl-5 = <&P9_18_i2c_pin>; ++ pinctrl-6 = <&P9_18_pwm_pin>; ++ }; ++ ++ // I2C Pins ++ // P9_19_pinmux ++ // P9_20_pinmux ++ ++ P9_21_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "spi", "uart", "i2c", "pwm"; ++ pinctrl-0 = <&P9_21_default_pin>; ++ pinctrl-1 = <&P9_21_gpio_pin>; ++ pinctrl-2 = <&P9_21_gpio_pu_pin>; ++ pinctrl-3 = <&P9_21_gpio_pd_pin>; ++ pinctrl-4 = <&P9_21_spi_pin>; ++ pinctrl-5 = <&P9_21_uart_pin>; ++ pinctrl-6 = <&P9_21_i2c_pin>; ++ pinctrl-7 = <&P9_21_pwm_pin>; ++ }; ++ ++ P9_22_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "spi", "uart", "i2c", "pwm"; ++ pinctrl-0 = <&P9_22_default_pin>; ++ pinctrl-1 = <&P9_22_gpio_pin>; ++ pinctrl-2 = <&P9_22_gpio_pu_pin>; ++ pinctrl-3 = <&P9_22_gpio_pd_pin>; ++ pinctrl-4 = <&P9_22_spi_pin>; ++ pinctrl-5 = <&P9_22_uart_pin>; ++ pinctrl-6 = <&P9_22_i2c_pin>; ++ pinctrl-7 = <&P9_22_pwm_pin>; ++ }; ++ ++ P9_23_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pwm"; ++ pinctrl-0 = <&P9_23_default_pin>; ++ pinctrl-1 = <&P9_23_gpio_pin>; ++ pinctrl-2 = <&P9_23_gpio_pu_pin>; ++ pinctrl-3 = <&P9_23_gpio_pd_pin>; ++ pinctrl-4 = <&P9_23_pwm_pin>; ++ }; ++ ++ P9_24_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "uart", "can", "i2c", "pruin"; ++ pinctrl-0 = <&P9_24_default_pin>; ++ pinctrl-1 = <&P9_24_gpio_pin>; ++ pinctrl-2 = <&P9_24_gpio_pu_pin>; ++ pinctrl-3 = <&P9_24_gpio_pd_pin>; ++ pinctrl-4 = <&P9_24_uart_pin>; ++ pinctrl-5 = <&P9_24_can_pin>; ++ pinctrl-6 = <&P9_24_i2c_pin>; ++ pinctrl-7 = <&P9_24_pruin_pin>; ++ }; ++ ++ P9_25_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "qep", "pruout", "pruin"; ++ pinctrl-0 = <&P9_25_default_pin>; ++ pinctrl-1 = <&P9_25_gpio_pin>; ++ pinctrl-2 = <&P9_25_gpio_pu_pin>; ++ pinctrl-3 = <&P9_25_gpio_pd_pin>; ++ pinctrl-4 = <&P9_25_qep_pin>; ++ pinctrl-5 = <&P9_25_pruout_pin>; ++ pinctrl-6 = <&P9_25_pruin_pin>; ++ }; ++ ++ P9_26_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "uart", "can", "i2c", "pruin"; ++ pinctrl-0 = <&P9_26_default_pin>; ++ pinctrl-1 = <&P9_26_gpio_pin>; ++ pinctrl-2 = <&P9_26_gpio_pu_pin>; ++ pinctrl-3 = <&P9_26_gpio_pd_pin>; ++ pinctrl-4 = <&P9_26_uart_pin>; ++ pinctrl-5 = <&P9_26_can_pin>; ++ pinctrl-6 = <&P9_26_i2c_pin>; ++ pinctrl-7 = <&P9_26_pruin_pin>; ++ }; ++ ++ P9_27_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "qep", "pruout", "pruin"; ++ pinctrl-0 = <&P9_27_default_pin>; ++ pinctrl-1 = <&P9_27_gpio_pin>; ++ pinctrl-2 = <&P9_27_gpio_pu_pin>; ++ pinctrl-3 = <&P9_27_gpio_pd_pin>; ++ pinctrl-4 = <&P9_27_qep_pin>; ++ pinctrl-5 = <&P9_27_pruout_pin>; ++ pinctrl-6 = <&P9_27_pruin_pin>; ++ }; ++ ++ P9_28_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pwm", "spi", "pwm2", "pruout", "pruin"; ++ pinctrl-0 = <&P9_28_default_pin>; ++ pinctrl-1 = <&P9_28_gpio_pin>; ++ pinctrl-2 = <&P9_28_gpio_pu_pin>; ++ pinctrl-3 = <&P9_28_gpio_pd_pin>; ++ pinctrl-4 = <&P9_28_pwm_pin>; ++ pinctrl-5 = <&P9_28_spi_pin>; ++ pinctrl-6 = <&P9_28_pwm2_pin>; ++ pinctrl-7 = <&P9_28_pruout_pin>; ++ pinctrl-8 = <&P9_28_pruin_pin>; ++ }; ++ ++ P9_29_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pwm", "spi", "pruout", "pruin"; ++ pinctrl-0 = <&P9_29_default_pin>; ++ pinctrl-1 = <&P9_29_gpio_pin>; ++ pinctrl-2 = <&P9_29_gpio_pu_pin>; ++ pinctrl-3 = <&P9_29_gpio_pd_pin>; ++ pinctrl-4 = <&P9_29_pwm_pin>; ++ pinctrl-5 = <&P9_29_spi_pin>; ++ pinctrl-6 = <&P9_29_pruout_pin>; ++ pinctrl-7 = <&P9_29_pruin_pin>; ++ }; ++ ++ P9_30_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pwm", "spi", "pruout", "pruin"; ++ pinctrl-0 = <&P9_30_default_pin>; ++ pinctrl-1 = <&P9_30_gpio_pin>; ++ pinctrl-2 = <&P9_30_gpio_pu_pin>; ++ pinctrl-3 = <&P9_30_gpio_pd_pin>; ++ pinctrl-4 = <&P9_30_pwm_pin>; ++ pinctrl-5 = <&P9_30_spi_pin>; ++ pinctrl-6 = <&P9_30_pruout_pin>; ++ pinctrl-7 = <&P9_30_pruin_pin>; ++ }; ++ ++ P9_31_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pwm", "spi", "pruout", "pruin"; ++ pinctrl-0 = <&P9_31_default_pin>; ++ pinctrl-1 = <&P9_31_gpio_pin>; ++ pinctrl-2 = <&P9_31_gpio_pu_pin>; ++ pinctrl-3 = <&P9_31_gpio_pd_pin>; ++ pinctrl-4 = <&P9_31_pwm_pin>; ++ pinctrl-5 = <&P9_31_spi_pin>; ++ pinctrl-6 = <&P9_31_pruout_pin>; ++ pinctrl-7 = <&P9_31_pruin_pin>; ++ }; ++ ++ P9_41_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "timer", "pruin"; ++ pinctrl-0 = <&P9_41_default_pin>; ++ pinctrl-1 = <&P9_41_gpio_pin>; ++ pinctrl-2 = <&P9_41_gpio_pu_pin>; ++ pinctrl-3 = <&P9_41_gpio_pd_pin>; ++ pinctrl-4 = <&P9_41_timer_pin>; ++ pinctrl-5 = <&P9_41_pruin_pin>; ++ }; ++ ++ P9_91_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "qep", "pruout", "pruin"; ++ pinctrl-0 = <&P9_91_default_pin>; ++ pinctrl-1 = <&P9_91_gpio_pin>; ++ pinctrl-2 = <&P9_91_gpio_pu_pin>; ++ pinctrl-3 = <&P9_91_gpio_pd_pin>; ++ pinctrl-4 = <&P9_91_qep_pin>; ++ pinctrl-5 = <&P9_91_pruout_pin>; ++ pinctrl-6 = <&P9_91_pruin_pin>; ++ }; ++ ++ P9_42_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pwm", "uart", "spics", "spiclk"; ++ pinctrl-0 = <&P9_42_default_pin>; ++ pinctrl-1 = <&P9_42_gpio_pin>; ++ pinctrl-2 = <&P9_42_gpio_pu_pin>; ++ pinctrl-3 = <&P9_42_gpio_pd_pin>; ++ pinctrl-4 = <&P9_42_pwm_pin>; ++ pinctrl-5 = <&P9_42_uart_pin>; ++ pinctrl-6 = <&P9_42_spics_pin>; ++ pinctrl-7 = <&P9_42_spiclk_pin>; ++ }; ++ ++ P9_92_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "qep", "pruout", "pruin"; ++ pinctrl-0 = <&P9_92_default_pin>; ++ pinctrl-1 = <&P9_92_gpio_pin>; ++ pinctrl-2 = <&P9_92_gpio_pu_pin>; ++ pinctrl-3 = <&P9_92_gpio_pd_pin>; ++ pinctrl-4 = <&P9_92_qep_pin>; ++ pinctrl-5 = <&P9_92_pruout_pin>; ++ pinctrl-6 = <&P9_92_pruin_pin>; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&ocp>; ++ __overlay__ { ++ ++ // !!!WARNING!!! ++ // gpio-of-helper &gpio pointers are off-by-one vs. the hardware: ++ // hardware GPIO bank 0 = &gpio1 ++ cape-universal { ++ compatible = "gpio-of-helper"; ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ ++ P8_07 { ++ gpio-name = "P8_07"; ++ gpio = <&gpio3 2 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_08 { ++ gpio-name = "P8_08"; ++ gpio = <&gpio3 3 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_09 { ++ gpio-name = "P8_09"; ++ gpio = <&gpio3 5 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_10 { ++ gpio-name = "P8_10"; ++ gpio = <&gpio3 4 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_11 { ++ gpio-name = "P8_11"; ++ gpio = <&gpio2 13 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_12 { ++ gpio-name = "P8_12"; ++ gpio = <&gpio2 12 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_13 { ++ gpio-name = "P8_13"; ++ gpio = <&gpio1 23 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_14 { ++ gpio-name = "P8_14"; ++ gpio = <&gpio1 26 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_15 { ++ gpio-name = "P8_15"; ++ gpio = <&gpio2 15 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_16 { ++ gpio-name = "P8_16"; ++ gpio = <&gpio2 14 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_17 { ++ gpio-name = "P8_17"; ++ gpio = <&gpio1 27 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_18 { ++ gpio-name = "P8_18"; ++ gpio = <&gpio3 1 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_19 { ++ gpio-name = "P8_19"; ++ gpio = <&gpio1 22 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_26 { ++ gpio-name = "P8_26"; ++ gpio = <&gpio2 29 0>; ++ input; ++ dir-changeable; ++ }; ++ ++ ++ P9_11 { ++ gpio-name = "P9_11"; ++ gpio = <&gpio1 30 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_12 { ++ gpio-name = "P9_12"; ++ gpio = <&gpio2 28 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_13 { ++ gpio-name = "P9_13"; ++ gpio = <&gpio1 31 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_14 { ++ gpio-name = "P9_14"; ++ gpio = <&gpio2 18 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_15 { ++ gpio-name = "P9_15"; ++ gpio = <&gpio2 16 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_16 { ++ gpio-name = "P9_16"; ++ gpio = <&gpio2 19 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_17 { ++ gpio-name = "P9_17"; ++ gpio = <&gpio1 5 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_18 { ++ gpio-name = "P9_18"; ++ gpio = <&gpio1 4 0>; ++ input; ++ dir-changeable; ++ }; ++ ++ // I2C pins ++ // P9_19 ++ // P9_20 ++ ++ P9_21 { ++ gpio-name = "P9_21"; ++ gpio = <&gpio1 3 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_22 { ++ gpio-name = "P9_22"; ++ gpio = <&gpio1 2 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_23 { ++ gpio-name = "P9_23"; ++ gpio = <&gpio2 17 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_24 { ++ gpio-name = "P9_24"; ++ gpio = <&gpio1 15 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_25 { ++ gpio-name = "P9_25"; ++ gpio = <&gpio4 21 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_26 { ++ gpio-name = "P9_26"; ++ gpio = <&gpio1 14 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_27 { ++ gpio-name = "P9_27"; ++ gpio = <&gpio4 19 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_28 { ++ gpio-name = "P9_28"; ++ gpio = <&gpio4 17 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_29 { ++ gpio-name = "P9_29"; ++ gpio = <&gpio4 15 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_30 { ++ gpio-name = "P9_30"; ++ gpio = <&gpio4 16 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_31 { ++ gpio-name = "P9_31"; ++ gpio = <&gpio4 14 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_41 { ++ gpio-name = "P9_41"; ++ gpio = <&gpio1 20 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_91 { ++ gpio-name = "P9_91"; ++ gpio = <&gpio4 20 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_42 { ++ gpio-name = "P9_42"; ++ gpio = <&gpio1 7 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_92 { ++ gpio-name = "P9_92"; ++ gpio = <&gpio4 18 0>; ++ input; ++ dir-changeable; ++ }; ++ }; ++ }; ++ }; ++ ++ ++ ++ /************************/ ++ /* UARTs */ ++ /************************/ ++ ++ fragment@10 { ++ target = <&uart2>; /* really uart1 */ ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ }; ++ }; ++ ++ fragment@11 { ++ target = <&uart3>; /* really uart2 */ ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ }; ++ }; ++ ++ fragment@12 { ++ target = <&uart5>; /* really uart4 */ ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ }; ++ }; ++ ++// /* UART 5 only available on LCD/HDMI pins */ ++// fragment@13 { ++// target = <&uart6>; /* really uart5 */ ++// __overlay__ { ++// status = "okay"; ++// pinctrl-names = "default"; ++// pinctrl-0 = <>; ++// }; ++// }; ++ ++ /************************/ ++ /* Timers / PWM */ ++ /************************/ ++ ++ fragment@20 { ++ target = <&epwmss0>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@21 { ++ target = <&ehrpwm0>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ }; ++ }; ++ ++ fragment@22 { ++ target = <&ecap0>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ }; ++ }; ++ ++ fragment@23 { ++ target = <&epwmss1>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@24 { ++ target = <&ehrpwm1>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ }; ++ }; ++ ++ fragment@25 { ++ target = <&epwmss2>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@26 { ++ target = <&ehrpwm2>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ }; ++ }; ++ ++ fragment@27 { ++ target = <&ecap2>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ }; ++ }; ++ ++ /************************/ ++ /* I2C / SPI */ ++ /************************/ ++ ++ ++ fragment@30 { ++ target = <&i2c1>; /* i2c1 is numbered correctly */ ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ ++ /* this is the configuration part */ ++ clock-frequency = <100000>; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ /* add any i2c devices on the bus here */ ++ ++ // commented out example of a touchscreen (taken from BB-BONE-LCD7-01-00A4) */ ++ // maxtouch@4a { ++ // compatible = "mXT224"; ++ // reg = <0x4a>; ++ // interrupt-parent = <&gpio4>; ++ // interrupts = <19 0x0>; ++ // atmel,irq-gpio = <&gpio4 19 0>; ++ // }; ++ }; ++ }; ++ ++ fragment@31 { ++ target = <&spi0>; /* spi0 is numbered correctly */ ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ ++ spi0channel@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ compatible = "spidev"; ++ ++ reg = <0>; ++ spi-max-frequency = <16000000>; ++ spi-cpha; ++ }; ++ ++ ++ spi0channel@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ compatible = "spidev"; ++ ++ reg = <1>; ++ spi-max-frequency = <16000000>; ++ }; ++ }; ++ }; ++ ++ fragment@32 { ++ target = <&spi1>; /* spi1 is numbered correctly */ ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ spi1channel@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ compatible = "spidev"; ++ ++ reg = <0>; ++ spi-max-frequency = <16000000>; ++ spi-cpha; ++ }; ++ ++ spi1channel@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ compatible = "spidev"; ++ ++ reg = <1>; ++ spi-max-frequency = <16000000>; ++ }; ++ }; ++ }; ++ ++ fragment@33 { ++ target = <&dcan0>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ }; ++ }; ++ ++ fragment@34 { ++ target = <&dcan1>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ }; ++ }; ++ ++ ++ /************************/ ++ /* PRUSS */ ++ /************************/ ++ ++ fragment@40 { ++ target = <&pruss>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++}; +diff --git a/firmware/capes/cape-universaln-00A0.dts b/firmware/capes/cape-universaln-00A0.dts +new file mode 100644 +index 0000000..a4bdbf0 +--- /dev/null ++++ b/firmware/capes/cape-universaln-00A0.dts +@@ -0,0 +1,1609 @@ ++// Copyright 2013 ++// Charles Steinkuehler ++// ++// 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. ++// ++// 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, write to the Free Software ++// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "ti,beaglebone", "ti,beaglebone-black"; ++ ++ /* identification */ ++ part-number = "cape-bone-universal"; ++ version = "00A0"; ++ ++ /* state the resources this cape uses */ ++ exclusive-use = ++ ++/* "P8.1", GND */ ++/* "P8.2", GND */ ++/* "P8.3", emmc */ ++/* "P8.4", emmc */ ++/* "P8.5", emmc */ ++/* "P8.6", emmc */ ++ "P8.7", ++ "P8.8", ++ "P8.9", ++ "P8.10", ++ "P8.11", ++ "P8.12", ++ "P8.13", ++ "P8.14", ++ "P8.15", ++ "P8.16", ++ "P8.17", ++ "P8.18", ++ "P8.19", ++/* "P8.20", emmc */ ++/* "P8.21", emmc */ ++/* "P8.22", emmc */ ++/* "P8.23", emmc */ ++/* "P8.24", emmc */ ++/* "P8.25", emmc */ ++ "P8.26", ++/* "P8.27", hdmi */ ++/* "P8.28", hdmi */ ++/* "P8.29", hdmi */ ++/* "P8.30", hdmi */ ++/* "P8.31", hdmi */ ++/* "P8.32", hdmi */ ++/* "P8.33", hdmi */ ++/* "P8.34", hdmi */ ++/* "P8.35", hdmi */ ++/* "P8.36", hdmi */ ++/* "P8.37", hdmi */ ++/* "P8.38", hdmi */ ++/* "P8.39", hdmi */ ++/* "P8.40", hdmi */ ++/* "P8.41", hdmi */ ++/* "P8.42", hdmi */ ++/* "P8.43", hdmi */ ++/* "P8.44", hdmi */ ++/* "P8.45", hdmi */ ++/* "P8.46", hdmi */ ++ ++/* "P9.1", GND */ ++/* "P9.2", GND */ ++/* "P9.3", 3.3V */ ++/* "P9.4", 3.3V */ ++/* "P9.5", VDD_5V */ ++/* "P9.6", VDD_5V */ ++/* "P9.7", SYS_5V */ ++/* "P9.8", SYS_5V */ ++/* "P9.9", PWR_BUT */ ++/* "P9.10", RESETn */ ++ "P9.11", ++ "P9.12", ++ "P9.13", ++ "P9.14", ++ "P9.15", ++ "P9.16", ++ "P9.17", ++ "P9.18", ++/* "P9.19", I2C */ ++/* "P9.20", I2C */ ++ "P9.21", ++ "P9.22", ++ "P9.23", ++ "P9.24", ++/* "P9.25", Audio */ ++ "P9.26", ++ "P9.27", ++/* "P9.28", Audio */ ++/* "P9.29", Audio */ ++ "P9.30", ++ "P9.31", ++/* "P9.32", VADC */ ++/* "P9.33", AIN4 */ ++/* "P9.34", AGND */ ++/* "P9.35", AIN6 */ ++/* "P9.36", AIN5 */ ++/* "P9.37", AIN2 */ ++/* "P9.38", AIN3 */ ++/* "P9.39", AIN0 */ ++/* "P9.40", AIN1 */ ++ "P9.41", ++ "P9.41.1", ++ "P9.42", ++ "P9.42.1", ++/* "P9.43", GND */ ++/* "P9.44", GND */ ++/* "P9.45", GND */ ++/* "P9.46", GND */ ++ ++ "uart1", ++ "uart2", ++ "uart4", ++// "uart5", /* Conflicts with HDMI */ ++ ++ "ehrpwm0A", ++ "ehrpwm0B", ++ "ehrpwm1A", ++ "ehrpwm1B", ++ "ehrpwm2A", ++ "ehrpwm2B", ++ ++// "epwmss0", ++// "ehrpwm0", ++// "ecap0", ++// "epwmss1", ++// "ehrpwm1", ++// "epwmss2", ++// "ehrpwm2", ++// "ecap2", ++ ++ "i2c1", ++ "spi1", ++ "spi0", ++ "dcan0", ++ "dcan1", ++ ++ "pru0", ++ "pru1", ++ "pruss"; ++ ++ fragment@0 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ ++ /************************/ ++ /* P8 Header */ ++ /************************/ ++ ++ /* P8_01 GND */ ++ /* P8_02 GND */ ++ /* P8_03 (ZCZ ball R9 ) emmc */ ++ /* P8_04 (ZCZ ball T9 ) emmc */ ++ /* P8_05 (ZCZ ball R8 ) emmc */ ++ /* P8_06 (ZCZ ball T8 ) emmc */ ++ ++ /* P8_07 (ZCZ ball R7 ) */ ++ P8_07_default_pin: pinmux_P8_07_default_pin { ++ pinctrl-single,pins = <0x090 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_07_gpio_pin: pinmux_P8_07_gpio_pin { ++ pinctrl-single,pins = <0x090 0x2F>; }; /* Mode 7, RxActive */ ++ P8_07_gpio_pu_pin: pinmux_P8_07_gpio_pu_pin { ++ pinctrl-single,pins = <0x090 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_07_gpio_pd_pin: pinmux_P8_07_gpio_pd_pin { ++ pinctrl-single,pins = <0x090 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_07_timer_pin: pinmux_P8_07_timer_pin { ++ pinctrl-single,pins = <0x090 0x32>; }; /* Mode 2, Pull-Up, RxActive */ ++ ++ /* P8_08 (ZCZ ball T7 ) */ ++ P8_08_default_pin: pinmux_P8_08_default_pin { ++ pinctrl-single,pins = <0x094 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_08_gpio_pin: pinmux_P8_08_gpio_pin { ++ pinctrl-single,pins = <0x094 0x2F>; }; /* Mode 7, RxActive */ ++ P8_08_gpio_pu_pin: pinmux_P8_08_gpio_pu_pin { ++ pinctrl-single,pins = <0x094 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_08_gpio_pd_pin: pinmux_P8_08_gpio_pd_pin { ++ pinctrl-single,pins = <0x094 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_08_timer_pin: pinmux_P8_08_timer_pin { ++ pinctrl-single,pins = <0x094 0x32>; }; /* Mode 2, Pull-Up, RxActive */ ++ ++ /* P8_09 (ZCZ ball T6 ) */ ++ P8_09_default_pin: pinmux_P8_09_default_pin { ++ pinctrl-single,pins = <0x09c 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_09_gpio_pin: pinmux_P8_09_gpio_pin { ++ pinctrl-single,pins = <0x09c 0x2F>; }; /* Mode 7, RxActive */ ++ P8_09_gpio_pu_pin: pinmux_P8_09_gpio_pu_pin { ++ pinctrl-single,pins = <0x09c 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_09_gpio_pd_pin: pinmux_P8_09_gpio_pd_pin { ++ pinctrl-single,pins = <0x09c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_09_timer_pin: pinmux_P8_09_timer_pin { ++ pinctrl-single,pins = <0x09c 0x32>; }; /* Mode 2, Pull-Up, RxActive */ ++ ++ /* P8_10 (ZCZ ball U6 ) */ ++ P8_10_default_pin: pinmux_P8_10_default_pin { ++ pinctrl-single,pins = <0x098 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_10_gpio_pin: pinmux_P8_10_gpio_pin { ++ pinctrl-single,pins = <0x098 0x2F>; }; /* Mode 7, RxActive */ ++ P8_10_gpio_pu_pin: pinmux_P8_10_gpio_pu_pin { ++ pinctrl-single,pins = <0x098 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_10_gpio_pd_pin: pinmux_P8_10_gpio_pd_pin { ++ pinctrl-single,pins = <0x098 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_10_timer_pin: pinmux_P8_10_timer_pin { ++ pinctrl-single,pins = <0x098 0x32>; }; /* Mode 2, Pull-Up, RxActive */ ++ ++ /* P8_11 (ZCZ ball R12) */ ++ P8_11_default_pin: pinmux_P8_11_default_pin { ++ pinctrl-single,pins = <0x034 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_11_gpio_pin: pinmux_P8_11_gpio_pin { ++ pinctrl-single,pins = <0x034 0x2F>; }; /* Mode 7, RxActive */ ++ P8_11_gpio_pu_pin: pinmux_P8_11_gpio_pu_pin { ++ pinctrl-single,pins = <0x034 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_11_gpio_pd_pin: pinmux_P8_11_gpio_pd_pin { ++ pinctrl-single,pins = <0x034 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_11_pruout_pin: pinmux_P8_11_pruout_pin { ++ pinctrl-single,pins = <0x034 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ P8_11_qep_pin: pinmux_P8_11_qep_pin { ++ pinctrl-single,pins = <0x034 0x24>; }; /* Mode 4, Pull-Down, RxActive */ ++ ++ /* P8_12 (ZCZ ball T12) */ ++ P8_12_default_pin: pinmux_P8_12_default_pin { ++ pinctrl-single,pins = <0x030 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_12_gpio_pin: pinmux_P8_12_gpio_pin { ++ pinctrl-single,pins = <0x030 0x2F>; }; /* Mode 7, RxActive */ ++ P8_12_gpio_pu_pin: pinmux_P8_12_gpio_pu_pin { ++ pinctrl-single,pins = <0x030 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_12_gpio_pd_pin: pinmux_P8_12_gpio_pd_pin { ++ pinctrl-single,pins = <0x030 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_12_pruout_pin: pinmux_P8_12_pruout_pin { ++ pinctrl-single,pins = <0x030 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ P8_12_qep_pin: pinmux_P8_12_qep_pin { ++ pinctrl-single,pins = <0x030 0x24>; }; /* Mode 4, Pull-Down, RxActive */ ++ ++ /* P8_13 (ZCZ ball T10) */ ++ P8_13_default_pin: pinmux_P8_13_default_pin { ++ pinctrl-single,pins = <0x024 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_13_gpio_pin: pinmux_P8_13_gpio_pin { ++ pinctrl-single,pins = <0x024 0x2F>; }; /* Mode 7, RxActive */ ++ P8_13_gpio_pu_pin: pinmux_P8_13_gpio_pu_pin { ++ pinctrl-single,pins = <0x024 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_13_gpio_pd_pin: pinmux_P8_13_gpio_pd_pin { ++ pinctrl-single,pins = <0x024 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_13_pwm_pin: pinmux_P8_13_pwm_pin { ++ pinctrl-single,pins = <0x024 0x24>; }; /* Mode 4, Pull-Down, RxActive */ ++ ++ /* P8_14 (ZCZ ball T11) */ ++ P8_14_default_pin: pinmux_P8_14_default_pin { ++ pinctrl-single,pins = <0x028 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_14_gpio_pin: pinmux_P8_14_gpio_pin { ++ pinctrl-single,pins = <0x028 0x2F>; }; /* Mode 7, RxActive */ ++ P8_14_gpio_pu_pin: pinmux_P8_14_gpio_pu_pin { ++ pinctrl-single,pins = <0x028 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_14_gpio_pd_pin: pinmux_P8_14_gpio_pd_pin { ++ pinctrl-single,pins = <0x028 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_14_pwm_pin: pinmux_P8_14_pwm_pin { ++ pinctrl-single,pins = <0x028 0x24>; }; /* Mode 4, Pull-Down, RxActive */ ++ ++ /* P8_15 (ZCZ ball U13) */ ++ P8_15_default_pin: pinmux_P8_15_default_pin { ++ pinctrl-single,pins = <0x03c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_15_gpio_pin: pinmux_P8_15_gpio_pin { ++ pinctrl-single,pins = <0x03c 0x2F>; }; /* Mode 7, RxActive */ ++ P8_15_gpio_pu_pin: pinmux_P8_15_gpio_pu_pin { ++ pinctrl-single,pins = <0x03c 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_15_gpio_pd_pin: pinmux_P8_15_gpio_pd_pin { ++ pinctrl-single,pins = <0x03c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_15_pruin_pin: pinmux_P8_15_pruin_pin { ++ pinctrl-single,pins = <0x03c 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ P8_15_qep_pin: pinmux_P8_15_qep_pin { ++ pinctrl-single,pins = <0x03c 0x24>; }; /* Mode 4, Pull-Down, RxActive */ ++ ++ /* P8_16 (ZCZ ball V13) */ ++ P8_16_default_pin: pinmux_P8_16_default_pin { ++ pinctrl-single,pins = <0x038 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_16_gpio_pin: pinmux_P8_16_gpio_pin { ++ pinctrl-single,pins = <0x038 0x2F>; }; /* Mode 7, RxActive */ ++ P8_16_gpio_pu_pin: pinmux_P8_16_gpio_pu_pin { ++ pinctrl-single,pins = <0x038 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_16_gpio_pd_pin: pinmux_P8_16_gpio_pd_pin { ++ pinctrl-single,pins = <0x038 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_16_pruin_pin: pinmux_P8_16_pruin_pin { ++ pinctrl-single,pins = <0x038 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ P8_16_qep_pin: pinmux_P8_16_qep_pin { ++ pinctrl-single,pins = <0x038 0x24>; }; /* Mode 4, Pull-Down, RxActive */ ++ ++ /* P8_17 (ZCZ ball U12) */ ++ P8_17_default_pin: pinmux_P8_17_default_pin { ++ pinctrl-single,pins = <0x02c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_17_gpio_pin: pinmux_P8_17_gpio_pin { ++ pinctrl-single,pins = <0x02c 0x2F>; }; /* Mode 7, RxActive */ ++ P8_17_gpio_pu_pin: pinmux_P8_17_gpio_pu_pin { ++ pinctrl-single,pins = <0x02c 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_17_gpio_pd_pin: pinmux_P8_17_gpio_pd_pin { ++ pinctrl-single,pins = <0x02c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_17_pwm_pin: pinmux_P8_17_pwm_pin { ++ pinctrl-single,pins = <0x02c 0x24>; }; /* Mode 4, Pull-Down, RxActive */ ++ ++ /* P8_18 (ZCZ ball V12) */ ++ P8_18_default_pin: pinmux_P8_18_default_pin { ++ pinctrl-single,pins = <0x08c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_18_gpio_pin: pinmux_P8_18_gpio_pin { ++ pinctrl-single,pins = <0x08c 0x2F>; }; /* Mode 7, RxActive */ ++ P8_18_gpio_pu_pin: pinmux_P8_18_gpio_pu_pin { ++ pinctrl-single,pins = <0x08c 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_18_gpio_pd_pin: pinmux_P8_18_gpio_pd_pin { ++ pinctrl-single,pins = <0x08c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ ++ /* P8_19 (ZCZ ball U10) */ ++ P8_19_default_pin: pinmux_P8_19_default_pin { ++ pinctrl-single,pins = <0x020 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_19_gpio_pin: pinmux_P8_19_gpio_pin { ++ pinctrl-single,pins = <0x020 0x2F>; }; /* Mode 7, RxActive */ ++ P8_19_gpio_pu_pin: pinmux_P8_19_gpio_pu_pin { ++ pinctrl-single,pins = <0x020 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_19_gpio_pd_pin: pinmux_P8_19_gpio_pd_pin { ++ pinctrl-single,pins = <0x020 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P8_19_pwm_pin: pinmux_P8_19_pwm_pin { ++ pinctrl-single,pins = <0x020 0x24>; }; /* Mode 4, Pull-Down, RxActive */ ++ ++ /* P8_20 (ZCZ ball V9 ) emmc */ ++ /* P8_21 (ZCZ ball U9 ) emmc */ ++ /* P8_22 (ZCZ ball V8 ) emmc */ ++ /* P8_23 (ZCZ ball U8 ) emmc */ ++ /* P8_24 (ZCZ ball V7 ) emmc */ ++ /* P8_25 (ZCZ ball U7 ) emmc */ ++ ++ /* P8_26 (ZCZ ball V6 ) */ ++ P8_26_default_pin: pinmux_P8_26_default_pin { ++ pinctrl-single,pins = <0x07c 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_26_gpio_pin: pinmux_P8_26_gpio_pin { ++ pinctrl-single,pins = <0x07c 0x2F>; }; /* Mode 7, RxActive */ ++ P8_26_gpio_pu_pin: pinmux_P8_26_gpio_pu_pin { ++ pinctrl-single,pins = <0x07c 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P8_26_gpio_pd_pin: pinmux_P8_26_gpio_pd_pin { ++ pinctrl-single,pins = <0x07c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ ++ /* P8_27 (ZCZ ball U5 ) hdmi */ ++ /* P8_28 (ZCZ ball V5 ) hdmi */ ++ /* P8_29 (ZCZ ball R5 ) hdmi */ ++ /* P8_30 (ZCZ ball R6 ) hdmi */ ++ /* P8_31 (ZCZ ball V4 ) hdmi */ ++ /* P8_32 (ZCZ ball T5 ) hdmi */ ++ /* P8_33 (ZCZ ball V3 ) hdmi */ ++ /* P8_34 (ZCZ ball U4 ) hdmi */ ++ /* P8_35 (ZCZ ball V2 ) hdmi */ ++ /* P8_36 (ZCZ ball U3 ) hdmi */ ++ /* P8_37 (ZCZ ball U1 ) hdmi */ ++ /* P8_38 (ZCZ ball U2 ) hdmi */ ++ /* P8_39 (ZCZ ball T3 ) hdmi */ ++ /* P8_40 (ZCZ ball T4 ) hdmi */ ++ /* P8_41 (ZCZ ball T1 ) hdmi */ ++ /* P8_42 (ZCZ ball T2 ) hdmi */ ++ /* P8_43 (ZCZ ball R3 ) hdmi */ ++ /* P8_44 (ZCZ ball R4 ) hdmi */ ++ /* P8_45 (ZCZ ball R1 ) hdmi */ ++ /* P8_46 (ZCZ ball R2 ) hdmi */ ++ ++ ++ /************************/ ++ /* P9 Header */ ++ /************************/ ++ ++ /* P9_01 GND */ ++ /* P9_02 GND */ ++ /* P9_03 3.3V */ ++ /* P9_04 3.3V */ ++ /* P9_05 VDD_5V */ ++ /* P9_06 VDD_5V */ ++ /* P9_07 SYS_5V */ ++ /* P9_08 SYS_5V */ ++ /* P9_09 PWR_BUT */ ++ /* P9_10 (ZCZ ball A10) RESETn */ ++ ++ /* P9_11 (ZCZ ball T17) */ ++ P9_11_default_pin: pinmux_P9_11_default_pin { ++ pinctrl-single,pins = <0x070 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_11_gpio_pin: pinmux_P9_11_gpio_pin { ++ pinctrl-single,pins = <0x070 0x2F>; }; /* Mode 7, RxActive */ ++ P9_11_gpio_pu_pin: pinmux_P9_11_gpio_pu_pin { ++ pinctrl-single,pins = <0x070 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_11_gpio_pd_pin: pinmux_P9_11_gpio_pd_pin { ++ pinctrl-single,pins = <0x070 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_11_uart_pin: pinmux_P9_11_uart_pin { ++ pinctrl-single,pins = <0x070 0x36>; }; /* Mode 6, Pull-Up, RxActive */ ++ ++ /* P9_12 (ZCZ ball U18) */ ++ P9_12_default_pin: pinmux_P9_12_default_pin { ++ pinctrl-single,pins = <0x078 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_12_gpio_pin: pinmux_P9_12_gpio_pin { ++ pinctrl-single,pins = <0x078 0x2F>; }; /* Mode 7, RxActive */ ++ P9_12_gpio_pu_pin: pinmux_P9_12_gpio_pu_pin { ++ pinctrl-single,pins = <0x078 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_12_gpio_pd_pin: pinmux_P9_12_gpio_pd_pin { ++ pinctrl-single,pins = <0x078 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ ++ /* P9_13 (ZCZ ball U17) */ ++ P9_13_default_pin: pinmux_P9_13_default_pin { ++ pinctrl-single,pins = <0x074 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_13_gpio_pin: pinmux_P9_13_gpio_pin { ++ pinctrl-single,pins = <0x074 0x2F>; }; /* Mode 7, RxActive */ ++ P9_13_gpio_pu_pin: pinmux_P9_13_gpio_pu_pin { ++ pinctrl-single,pins = <0x074 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_13_gpio_pd_pin: pinmux_P9_13_gpio_pd_pin { ++ pinctrl-single,pins = <0x074 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_13_uart_pin: pinmux_P9_13_uart_pin { ++ pinctrl-single,pins = <0x074 0x36>; }; /* Mode 6, Pull-Up, RxActive */ ++ ++ /* P9_14 (ZCZ ball U14) */ ++ P9_14_default_pin: pinmux_P9_14_default_pin { ++ pinctrl-single,pins = <0x048 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_14_gpio_pin: pinmux_P9_14_gpio_pin { ++ pinctrl-single,pins = <0x048 0x2F>; }; /* Mode 7, RxActive */ ++ P9_14_gpio_pu_pin: pinmux_P9_14_gpio_pu_pin { ++ pinctrl-single,pins = <0x048 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_14_gpio_pd_pin: pinmux_P9_14_gpio_pd_pin { ++ pinctrl-single,pins = <0x048 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_14_pwm_pin: pinmux_P9_14_pwm_pin { ++ pinctrl-single,pins = <0x048 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ ++ /* P9_15 (ZCZ ball R13) */ ++ P9_15_default_pin: pinmux_P9_15_default_pin { ++ pinctrl-single,pins = <0x040 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_15_gpio_pin: pinmux_P9_15_gpio_pin { ++ pinctrl-single,pins = <0x040 0x2F>; }; /* Mode 7, RxActive */ ++ P9_15_gpio_pu_pin: pinmux_P9_15_gpio_pu_pin { ++ pinctrl-single,pins = <0x040 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_15_gpio_pd_pin: pinmux_P9_15_gpio_pd_pin { ++ pinctrl-single,pins = <0x040 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_15_pwm_pin: pinmux_P9_15_pwm_pin { ++ pinctrl-single,pins = <0x040 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ ++ /* P9_16 (ZCZ ball T14) */ ++ P9_16_default_pin: pinmux_P9_16_default_pin { ++ pinctrl-single,pins = <0x04c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_16_gpio_pin: pinmux_P9_16_gpio_pin { ++ pinctrl-single,pins = <0x04c 0x2F>; }; /* Mode 7, RxActive */ ++ P9_16_gpio_pu_pin: pinmux_P9_16_gpio_pu_pin { ++ pinctrl-single,pins = <0x04c 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_16_gpio_pd_pin: pinmux_P9_16_gpio_pd_pin { ++ pinctrl-single,pins = <0x04c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_16_pwm_pin: pinmux_P9_16_pwm_pin { ++ pinctrl-single,pins = <0x04c 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ ++ /* P9_17 (ZCZ ball A16) */ ++ P9_17_default_pin: pinmux_P9_17_default_pin { ++ pinctrl-single,pins = <0x15c 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_17_gpio_pin: pinmux_P9_17_gpio_pin { ++ pinctrl-single,pins = <0x15c 0x2F>; }; /* Mode 7, RxActive */ ++ P9_17_gpio_pu_pin: pinmux_P9_17_gpio_pu_pin { ++ pinctrl-single,pins = <0x15c 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_17_gpio_pd_pin: pinmux_P9_17_gpio_pd_pin { ++ pinctrl-single,pins = <0x15c 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_17_spi_pin: pinmux_P9_17_spi_pin { ++ pinctrl-single,pins = <0x15c 0x30>; }; /* Mode 0, Pull-Up, RxActive */ ++ P9_17_i2c_pin: pinmux_P9_17_i2c_pin { ++ pinctrl-single,pins = <0x15c 0x32>; }; /* Mode 2, Pull-Up, RxActive */ ++ P9_17_pwm_pin: pinmux_P9_17_pwm_pin { ++ pinctrl-single,pins = <0x15c 0x33>; }; /* Mode 3, Pull-Up, RxActive */ ++ ++ /* P9_18 (ZCZ ball B16) */ ++ P9_18_default_pin: pinmux_P9_18_default_pin { ++ pinctrl-single,pins = <0x158 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_18_gpio_pin: pinmux_P9_18_gpio_pin { ++ pinctrl-single,pins = <0x158 0x2F>; }; /* Mode 7, RxActive */ ++ P9_18_gpio_pu_pin: pinmux_P9_18_gpio_pu_pin { ++ pinctrl-single,pins = <0x158 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_18_gpio_pd_pin: pinmux_P9_18_gpio_pd_pin { ++ pinctrl-single,pins = <0x158 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_18_spi_pin: pinmux_P9_18_spi_pin { ++ pinctrl-single,pins = <0x158 0x30>; }; /* Mode 0, Pull-Up, RxActive */ ++ P9_18_i2c_pin: pinmux_P9_18_i2c_pin { ++ pinctrl-single,pins = <0x158 0x32>; }; /* Mode 2, Pull-Up, RxActive */ ++ P9_18_pwm_pin: pinmux_P9_18_pwm_pin { ++ pinctrl-single,pins = <0x158 0x33>; }; /* Mode 3, Pull-Up, RxActive */ ++ ++ // Leave the cape I2C EEPROM bus alone ++ /* P9_19 (ZCZ ball D17) I2C */ ++ /* P9_20 (ZCZ ball D18) I2C */ ++ ++ /* P9_21 (ZCZ ball B17) */ ++ P9_21_default_pin: pinmux_P9_21_default_pin { ++ pinctrl-single,pins = <0x154 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_21_gpio_pin: pinmux_P9_21_gpio_pin { ++ pinctrl-single,pins = <0x154 0x2F>; }; /* Mode 7, RxActive */ ++ P9_21_gpio_pu_pin: pinmux_P9_21_gpio_pu_pin { ++ pinctrl-single,pins = <0x154 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_21_gpio_pd_pin: pinmux_P9_21_gpio_pd_pin { ++ pinctrl-single,pins = <0x154 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_21_spi_pin: pinmux_P9_21_spi_pin { ++ pinctrl-single,pins = <0x154 0x30>; }; /* Mode 0, Pull-Up, RxActive */ ++ P9_21_uart_pin: pinmux_P9_21_uart_pin { ++ pinctrl-single,pins = <0x154 0x31>; }; /* Mode 1, Pull-Up, RxActive */ ++ P9_21_i2c_pin: pinmux_P9_21_i2c_pin { ++ pinctrl-single,pins = <0x154 0x32>; }; /* Mode 2, Pull-Up, RxActive */ ++ P9_21_pwm_pin: pinmux_P9_21_pwm_pin { ++ pinctrl-single,pins = <0x154 0x33>; }; /* Mode 3, Pull-Up, RxActive */ ++ ++ /* P9_22 (ZCZ ball A17) */ ++ P9_22_default_pin: pinmux_P9_22_default_pin { ++ pinctrl-single,pins = <0x150 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_22_gpio_pin: pinmux_P9_22_gpio_pin { ++ pinctrl-single,pins = <0x150 0x2F>; }; /* Mode 7, RxActive */ ++ P9_22_gpio_pu_pin: pinmux_P9_22_gpio_pu_pin { ++ pinctrl-single,pins = <0x150 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_22_gpio_pd_pin: pinmux_P9_22_gpio_pd_pin { ++ pinctrl-single,pins = <0x150 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_22_spi_pin: pinmux_P9_22_spi_pin { ++ pinctrl-single,pins = <0x150 0x30>; }; /* Mode 0, Pull-Up, RxActive */ ++ P9_22_uart_pin: pinmux_P9_22_uart_pin { ++ pinctrl-single,pins = <0x150 0x31>; }; /* Mode 1, Pull-Up, RxActive */ ++ P9_22_i2c_pin: pinmux_P9_22_i2c_pin { ++ pinctrl-single,pins = <0x150 0x32>; }; /* Mode 2, Pull-Up, RxActive */ ++ P9_22_pwm_pin: pinmux_P9_22_pwm_pin { ++ pinctrl-single,pins = <0x150 0x33>; }; /* Mode 3, Pull-Up, RxActive */ ++ ++ /* P9_23 (ZCZ ball V14) */ ++ P9_23_default_pin: pinmux_P9_23_default_pin { ++ pinctrl-single,pins = <0x044 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_23_gpio_pin: pinmux_P9_23_gpio_pin { ++ pinctrl-single,pins = <0x044 0x2F>; }; /* Mode 7, RxActive */ ++ P9_23_gpio_pu_pin: pinmux_P9_23_gpio_pu_pin { ++ pinctrl-single,pins = <0x044 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_23_gpio_pd_pin: pinmux_P9_23_gpio_pd_pin { ++ pinctrl-single,pins = <0x044 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_23_pwm_pin: pinmux_P9_23_pwm_pin { ++ pinctrl-single,pins = <0x044 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ ++ /* P9_24 (ZCZ ball D15) */ ++ P9_24_default_pin: pinmux_P9_24_default_pin { ++ pinctrl-single,pins = <0x184 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_24_gpio_pin: pinmux_P9_24_gpio_pin { ++ pinctrl-single,pins = <0x184 0x2F>; }; /* Mode 7, RxActive */ ++ P9_24_gpio_pu_pin: pinmux_P9_24_gpio_pu_pin { ++ pinctrl-single,pins = <0x184 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_24_gpio_pd_pin: pinmux_P9_24_gpio_pd_pin { ++ pinctrl-single,pins = <0x184 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_24_uart_pin: pinmux_P9_24_uart_pin { ++ pinctrl-single,pins = <0x184 0x30>; }; /* Mode 0, Pull-Up, RxActive */ ++ P9_24_can_pin: pinmux_P9_24_can_pin { ++ pinctrl-single,pins = <0x184 0x32>; }; /* Mode 2, Pull-Up, RxActive */ ++ P9_24_i2c_pin: pinmux_P9_24_i2c_pin { ++ pinctrl-single,pins = <0x184 0x33>; }; /* Mode 3, Pull-Up, RxActive */ ++ P9_24_pruin_pin: pinmux_P9_24_pruin_pin { ++ pinctrl-single,pins = <0x184 0x36>; }; /* Mode 6, Pull-Up, RxActive */ ++ ++ /* P9_25 (ZCZ ball A14) Audio */ ++ ++ /* P9_26 (ZCZ ball D16) */ ++ P9_26_default_pin: pinmux_P9_26_default_pin { ++ pinctrl-single,pins = <0x180 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_26_gpio_pin: pinmux_P9_26_gpio_pin { ++ pinctrl-single,pins = <0x180 0x2F>; }; /* Mode 7, RxActive */ ++ P9_26_gpio_pu_pin: pinmux_P9_26_gpio_pu_pin { ++ pinctrl-single,pins = <0x180 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_26_gpio_pd_pin: pinmux_P9_26_gpio_pd_pin { ++ pinctrl-single,pins = <0x180 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_26_uart_pin: pinmux_P9_26_uart_pin { ++ pinctrl-single,pins = <0x180 0x30>; }; /* Mode 0, Pull-Up, RxActive */ ++ P9_26_can_pin: pinmux_P9_26_can_pin { ++ pinctrl-single,pins = <0x180 0x32>; }; /* Mode 2, Pull-Up, RxActive */ ++ P9_26_i2c_pin: pinmux_P9_26_i2c_pin { ++ pinctrl-single,pins = <0x180 0x33>; }; /* Mode 3, Pull-Up, RxActive */ ++ P9_26_pruin_pin: pinmux_P9_26_pruin_pin { ++ pinctrl-single,pins = <0x180 0x36>; }; /* Mode 6, Pull-Up, RxActive */ ++ ++ /* P9_27 (ZCZ ball C13) */ ++ P9_27_default_pin: pinmux_P9_27_default_pin { ++ pinctrl-single,pins = <0x1a4 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_27_gpio_pin: pinmux_P9_27_gpio_pin { ++ pinctrl-single,pins = <0x1a4 0x2F>; }; /* Mode 7, RxActive */ ++ P9_27_gpio_pu_pin: pinmux_P9_27_gpio_pu_pin { ++ pinctrl-single,pins = <0x1a4 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_27_gpio_pd_pin: pinmux_P9_27_gpio_pd_pin { ++ pinctrl-single,pins = <0x1a4 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_27_qep_pin: pinmux_P9_27_qep_pin { ++ pinctrl-single,pins = <0x1a4 0x21>; }; /* Mode 1, Pull-Down, RxActive */ ++ P9_27_pruout_pin: pinmux_P9_27_pruout_pin { ++ pinctrl-single,pins = <0x1a4 0x25>; }; /* Mode 5, Pull-Down, RxActive */ ++ P9_27_pruin_pin: pinmux_P9_27_pruin_pin { ++ pinctrl-single,pins = <0x1a4 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ ++ /* P9_28 (ZCZ ball C12) Audio */ ++ /* P9_29 (ZCZ ball B13) Audio */ ++ ++ /* P9_30 (ZCZ ball D12) */ ++ P9_30_default_pin: pinmux_P9_30_default_pin { ++ pinctrl-single,pins = <0x198 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_30_gpio_pin: pinmux_P9_30_gpio_pin { ++ pinctrl-single,pins = <0x198 0x2F>; }; /* Mode 7, RxActive */ ++ P9_30_gpio_pu_pin: pinmux_P9_30_gpio_pu_pin { ++ pinctrl-single,pins = <0x198 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_30_gpio_pd_pin: pinmux_P9_30_gpio_pd_pin { ++ pinctrl-single,pins = <0x198 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_30_pwm_pin: pinmux_P9_30_pwm_pin { ++ pinctrl-single,pins = <0x198 0x21>; }; /* Mode 1, Pull-Down, RxActive */ ++ P9_30_spi_pin: pinmux_P9_30_spi_pin { ++ pinctrl-single,pins = <0x198 0x23>; }; /* Mode 3, Pull-Down, RxActive */ ++ P9_30_pruout_pin: pinmux_P9_30_pruout_pin { ++ pinctrl-single,pins = <0x198 0x25>; }; /* Mode 5, Pull-Down, RxActive */ ++ P9_30_pruin_pin: pinmux_P9_30_pruin_pin { ++ pinctrl-single,pins = <0x198 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ ++ /* P9_31 (ZCZ ball A13) Audio */ ++ ++ /* P9_32 VADC */ ++ /* P9_33 (ZCZ ball C8 ) AIN4 */ ++ /* P9_34 AGND */ ++ /* P9_35 (ZCZ ball A8 ) AIN6 */ ++ /* P9_36 (ZCZ ball B8 ) AIN5 */ ++ /* P9_37 (ZCZ ball B7 ) AIN2 */ ++ /* P9_38 (ZCZ ball A7 ) AIN3 */ ++ /* P9_39 (ZCZ ball B6 ) AIN0 */ ++ /* P9_40 (ZCZ ball C7 ) AIN1 */ ++ ++ /* P9_41 (ZCZ ball D14) */ ++ P9_41_default_pin: pinmux_P9_41_default_pin { ++ pinctrl-single,pins = <0x1b4 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_41_gpio_pin: pinmux_P9_41_gpio_pin { ++ pinctrl-single,pins = <0x1b4 0x2F>; }; /* Mode 7, RxActive */ ++ P9_41_gpio_pu_pin: pinmux_P9_41_gpio_pu_pin { ++ pinctrl-single,pins = <0x1b4 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_41_gpio_pd_pin: pinmux_P9_41_gpio_pd_pin { ++ pinctrl-single,pins = <0x1b4 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_41_timer_pin: pinmux_P9_41_timer_pin { ++ pinctrl-single,pins = <0x1b4 0x24>; }; /* Mode 4, Pull-Down, RxActive */ ++ P9_41_pruin_pin: pinmux_P9_41_pruin_pin { ++ pinctrl-single,pins = <0x1b4 0x25>; }; /* Mode 5, Pull-Down, RxActive */ ++ ++ /* P9_41.1 */ ++ /* P9_91 (ZCZ ball D13) */ ++ P9_91_default_pin: pinmux_P9_91_default_pin { ++ pinctrl-single,pins = <0x1a8 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_91_gpio_pin: pinmux_P9_91_gpio_pin { ++ pinctrl-single,pins = <0x1a8 0x2F>; }; /* Mode 7, RxActive */ ++ P9_91_gpio_pu_pin: pinmux_P9_91_gpio_pu_pin { ++ pinctrl-single,pins = <0x1a8 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_91_gpio_pd_pin: pinmux_P9_91_gpio_pd_pin { ++ pinctrl-single,pins = <0x1a8 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_91_qep_pin: pinmux_P9_91_qep_pin { ++ pinctrl-single,pins = <0x1a8 0x21>; }; /* Mode 1, Pull-Down, RxActive */ ++ P9_91_pruout_pin: pinmux_P9_91_pruout_pin { ++ pinctrl-single,pins = <0x1a8 0x25>; }; /* Mode 5, Pull-Down, RxActive */ ++ P9_91_pruin_pin: pinmux_P9_91_pruin_pin { ++ pinctrl-single,pins = <0x1a8 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ ++ /* P9_42 (ZCZ ball C18) */ ++ P9_42_default_pin: pinmux_P9_42_default_pin { ++ pinctrl-single,pins = <0x164 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_42_gpio_pin: pinmux_P9_42_gpio_pin { ++ pinctrl-single,pins = <0x164 0x2F>; }; /* Mode 7, RxActive */ ++ P9_42_gpio_pu_pin: pinmux_P9_42_gpio_pu_pin { ++ pinctrl-single,pins = <0x164 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_42_gpio_pd_pin: pinmux_P9_42_gpio_pd_pin { ++ pinctrl-single,pins = <0x164 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_42_pwm_pin: pinmux_P9_42_pwm_pin { ++ pinctrl-single,pins = <0x164 0x20>; }; /* Mode 0, Pull-Down, RxActive */ ++ P9_42_uart_pin: pinmux_P9_42_uart_pin { ++ pinctrl-single,pins = <0x164 0x21>; }; /* Mode 1, Pull-Down, RxActive */ ++ P9_42_spics_pin: pinmux_P9_42_spics_pin { ++ pinctrl-single,pins = <0x164 0x22>; }; /* Mode 2, Pull-Down, RxActive */ ++ P9_42_spiclk_pin: pinmux_P9_42_spiclk_pin { ++ pinctrl-single,pins = <0x164 0x24>; }; /* Mode 4, Pull-Down, RxActive */ ++ ++ /* P9_42.1 */ ++ /* P9_92 (ZCZ ball B12) */ ++ P9_92_default_pin: pinmux_P9_92_default_pin { ++ pinctrl-single,pins = <0x1a0 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_92_gpio_pin: pinmux_P9_92_gpio_pin { ++ pinctrl-single,pins = <0x1a0 0x2F>; }; /* Mode 7, RxActive */ ++ P9_92_gpio_pu_pin: pinmux_P9_92_gpio_pu_pin { ++ pinctrl-single,pins = <0x1a0 0x37>; }; /* Mode 7, Pull-Up, RxActive */ ++ P9_92_gpio_pd_pin: pinmux_P9_92_gpio_pd_pin { ++ pinctrl-single,pins = <0x1a0 0x27>; }; /* Mode 7, Pull-Down, RxActive */ ++ P9_92_qep_pin: pinmux_P9_92_qep_pin { ++ pinctrl-single,pins = <0x1a0 0x21>; }; /* Mode 1, Pull-Down, RxActive */ ++ P9_92_pruout_pin: pinmux_P9_92_pruout_pin { ++ pinctrl-single,pins = <0x1a0 0x25>; }; /* Mode 5, Pull-Down, RxActive */ ++ P9_92_pruin_pin: pinmux_P9_92_pruin_pin { ++ pinctrl-single,pins = <0x1a0 0x26>; }; /* Mode 6, Pull-Down, RxActive */ ++ ++ /* P9_43 GND */ ++ /* P9_44 GND */ ++ /* P9_45 GND */ ++ /* P9_46 GND */ ++ ++ }; ++ }; ++ ++ ++ /************************/ ++ /* Pin Multiplexing */ ++ /************************/ ++ ++ fragment@1 { ++ target = <&ocp>; ++ __overlay__ { ++ ++ /************************/ ++ /* P8 Header */ ++ /************************/ ++ ++ P8_07_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "timer"; ++ pinctrl-0 = <&P8_07_default_pin>; ++ pinctrl-1 = <&P8_07_gpio_pin>; ++ pinctrl-2 = <&P8_07_gpio_pu_pin>; ++ pinctrl-3 = <&P8_07_gpio_pd_pin>; ++ pinctrl-4 = <&P8_07_timer_pin>; ++ }; ++ ++ P8_08_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "timer"; ++ pinctrl-0 = <&P8_08_default_pin>; ++ pinctrl-1 = <&P8_08_gpio_pin>; ++ pinctrl-2 = <&P8_08_gpio_pu_pin>; ++ pinctrl-3 = <&P8_08_gpio_pd_pin>; ++ pinctrl-4 = <&P8_08_timer_pin>; ++ }; ++ ++ P8_09_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "timer"; ++ pinctrl-0 = <&P8_09_default_pin>; ++ pinctrl-1 = <&P8_09_gpio_pin>; ++ pinctrl-2 = <&P8_09_gpio_pu_pin>; ++ pinctrl-3 = <&P8_09_gpio_pd_pin>; ++ pinctrl-4 = <&P8_09_timer_pin>; ++ }; ++ ++ P8_10_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "timer"; ++ pinctrl-0 = <&P8_10_default_pin>; ++ pinctrl-1 = <&P8_10_gpio_pin>; ++ pinctrl-2 = <&P8_10_gpio_pu_pin>; ++ pinctrl-3 = <&P8_10_gpio_pd_pin>; ++ pinctrl-4 = <&P8_10_timer_pin>; ++ }; ++ ++ P8_11_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pruout", "qep"; ++ pinctrl-0 = <&P8_11_default_pin>; ++ pinctrl-1 = <&P8_11_gpio_pin>; ++ pinctrl-2 = <&P8_11_gpio_pu_pin>; ++ pinctrl-3 = <&P8_11_gpio_pd_pin>; ++ pinctrl-4 = <&P8_11_pruout_pin>; ++ pinctrl-5 = <&P8_11_qep_pin>; ++ }; ++ ++ P8_12_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pruout", "qep"; ++ pinctrl-0 = <&P8_12_default_pin>; ++ pinctrl-1 = <&P8_12_gpio_pin>; ++ pinctrl-2 = <&P8_12_gpio_pu_pin>; ++ pinctrl-3 = <&P8_12_gpio_pd_pin>; ++ pinctrl-4 = <&P8_12_pruout_pin>; ++ pinctrl-5 = <&P8_12_qep_pin>; ++ }; ++ ++ P8_13_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pwm"; ++ pinctrl-0 = <&P8_13_default_pin>; ++ pinctrl-1 = <&P8_13_gpio_pin>; ++ pinctrl-2 = <&P8_13_gpio_pu_pin>; ++ pinctrl-3 = <&P8_13_gpio_pd_pin>; ++ pinctrl-4 = <&P8_13_pwm_pin>; ++ }; ++ ++ P8_14_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pwm"; ++ pinctrl-0 = <&P8_14_default_pin>; ++ pinctrl-1 = <&P8_14_gpio_pin>; ++ pinctrl-2 = <&P8_14_gpio_pu_pin>; ++ pinctrl-3 = <&P8_14_gpio_pd_pin>; ++ pinctrl-4 = <&P8_14_pwm_pin>; ++ }; ++ ++ P8_15_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pruin", "qep"; ++ pinctrl-0 = <&P8_15_default_pin>; ++ pinctrl-1 = <&P8_15_gpio_pin>; ++ pinctrl-2 = <&P8_15_gpio_pu_pin>; ++ pinctrl-3 = <&P8_15_gpio_pd_pin>; ++ pinctrl-4 = <&P8_15_pruin_pin>; ++ pinctrl-5 = <&P8_15_qep_pin>; ++ }; ++ ++ P8_16_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pruin", "qep"; ++ pinctrl-0 = <&P8_16_default_pin>; ++ pinctrl-1 = <&P8_16_gpio_pin>; ++ pinctrl-2 = <&P8_16_gpio_pu_pin>; ++ pinctrl-3 = <&P8_16_gpio_pd_pin>; ++ pinctrl-4 = <&P8_16_pruin_pin>; ++ pinctrl-5 = <&P8_16_qep_pin>; ++ }; ++ ++ P8_17_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pwm"; ++ pinctrl-0 = <&P8_17_default_pin>; ++ pinctrl-1 = <&P8_17_gpio_pin>; ++ pinctrl-2 = <&P8_17_gpio_pu_pin>; ++ pinctrl-3 = <&P8_17_gpio_pd_pin>; ++ pinctrl-4 = <&P8_17_pwm_pin>; ++ }; ++ ++ P8_18_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio"; ++ pinctrl-0 = <&P8_18_default_pin>; ++ pinctrl-1 = <&P8_18_gpio_pin>; ++ pinctrl-2 = <&P8_18_gpio_pu_pin>; ++ pinctrl-3 = <&P8_18_gpio_pd_pin>; ++ }; ++ ++ P8_19_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pwm"; ++ pinctrl-0 = <&P8_19_default_pin>; ++ pinctrl-1 = <&P8_19_gpio_pin>; ++ pinctrl-2 = <&P8_19_gpio_pu_pin>; ++ pinctrl-3 = <&P8_19_gpio_pd_pin>; ++ pinctrl-4 = <&P8_19_pwm_pin>; ++ }; ++ ++ P8_26_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio"; ++ pinctrl-0 = <&P8_26_default_pin>; ++ pinctrl-1 = <&P8_26_gpio_pin>; ++ pinctrl-2 = <&P8_26_gpio_pu_pin>; ++ pinctrl-3 = <&P8_26_gpio_pd_pin>; ++ }; ++ ++ ++ /************************/ ++ /* P9 Header */ ++ /************************/ ++ ++ P9_11_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "uart"; ++ pinctrl-0 = <&P9_11_default_pin>; ++ pinctrl-1 = <&P9_11_gpio_pin>; ++ pinctrl-2 = <&P9_11_gpio_pu_pin>; ++ pinctrl-3 = <&P9_11_gpio_pd_pin>; ++ pinctrl-4 = <&P9_11_uart_pin>; ++ }; ++ ++ P9_12_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio"; ++ pinctrl-0 = <&P9_12_default_pin>; ++ pinctrl-1 = <&P9_12_gpio_pin>; ++ pinctrl-2 = <&P9_12_gpio_pu_pin>; ++ pinctrl-3 = <&P9_12_gpio_pd_pin>; ++ }; ++ ++ P9_13_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "uart"; ++ pinctrl-0 = <&P9_13_default_pin>; ++ pinctrl-1 = <&P9_13_gpio_pin>; ++ pinctrl-2 = <&P9_13_gpio_pu_pin>; ++ pinctrl-3 = <&P9_13_gpio_pd_pin>; ++ pinctrl-4 = <&P9_13_uart_pin>; ++ }; ++ ++ P9_14_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pwm"; ++ pinctrl-0 = <&P9_14_default_pin>; ++ pinctrl-1 = <&P9_14_gpio_pin>; ++ pinctrl-2 = <&P9_14_gpio_pu_pin>; ++ pinctrl-3 = <&P9_14_gpio_pd_pin>; ++ pinctrl-4 = <&P9_14_pwm_pin>; ++ }; ++ ++ P9_15_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pwm"; ++ pinctrl-0 = <&P9_15_default_pin>; ++ pinctrl-1 = <&P9_15_gpio_pin>; ++ pinctrl-2 = <&P9_15_gpio_pu_pin>; ++ pinctrl-3 = <&P9_15_gpio_pd_pin>; ++ pinctrl-4 = <&P9_15_pwm_pin>; ++ }; ++ ++ P9_16_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pwm"; ++ pinctrl-0 = <&P9_16_default_pin>; ++ pinctrl-1 = <&P9_16_gpio_pin>; ++ pinctrl-2 = <&P9_16_gpio_pu_pin>; ++ pinctrl-3 = <&P9_16_gpio_pd_pin>; ++ pinctrl-4 = <&P9_16_pwm_pin>; ++ }; ++ ++ P9_17_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "spi", "i2c", "pwm"; ++ pinctrl-0 = <&P9_17_default_pin>; ++ pinctrl-1 = <&P9_17_gpio_pin>; ++ pinctrl-2 = <&P9_17_gpio_pu_pin>; ++ pinctrl-3 = <&P9_17_gpio_pd_pin>; ++ pinctrl-4 = <&P9_17_spi_pin>; ++ pinctrl-5 = <&P9_17_i2c_pin>; ++ pinctrl-6 = <&P9_17_pwm_pin>; ++ }; ++ ++ P9_18_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "spi", "i2c", "pwm"; ++ pinctrl-0 = <&P9_18_default_pin>; ++ pinctrl-1 = <&P9_18_gpio_pin>; ++ pinctrl-2 = <&P9_18_gpio_pu_pin>; ++ pinctrl-3 = <&P9_18_gpio_pd_pin>; ++ pinctrl-4 = <&P9_18_spi_pin>; ++ pinctrl-5 = <&P9_18_i2c_pin>; ++ pinctrl-6 = <&P9_18_pwm_pin>; ++ }; ++ ++ // I2C Pins ++ // P9_19_pinmux ++ // P9_20_pinmux ++ ++ P9_21_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "spi", "uart", "i2c", "pwm"; ++ pinctrl-0 = <&P9_21_default_pin>; ++ pinctrl-1 = <&P9_21_gpio_pin>; ++ pinctrl-2 = <&P9_21_gpio_pu_pin>; ++ pinctrl-3 = <&P9_21_gpio_pd_pin>; ++ pinctrl-4 = <&P9_21_spi_pin>; ++ pinctrl-5 = <&P9_21_uart_pin>; ++ pinctrl-6 = <&P9_21_i2c_pin>; ++ pinctrl-7 = <&P9_21_pwm_pin>; ++ }; ++ ++ P9_22_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "spi", "uart", "i2c", "pwm"; ++ pinctrl-0 = <&P9_22_default_pin>; ++ pinctrl-1 = <&P9_22_gpio_pin>; ++ pinctrl-2 = <&P9_22_gpio_pu_pin>; ++ pinctrl-3 = <&P9_22_gpio_pd_pin>; ++ pinctrl-4 = <&P9_22_spi_pin>; ++ pinctrl-5 = <&P9_22_uart_pin>; ++ pinctrl-6 = <&P9_22_i2c_pin>; ++ pinctrl-7 = <&P9_22_pwm_pin>; ++ }; ++ ++ P9_23_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pwm"; ++ pinctrl-0 = <&P9_23_default_pin>; ++ pinctrl-1 = <&P9_23_gpio_pin>; ++ pinctrl-2 = <&P9_23_gpio_pu_pin>; ++ pinctrl-3 = <&P9_23_gpio_pd_pin>; ++ pinctrl-4 = <&P9_23_pwm_pin>; ++ }; ++ ++ P9_24_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "uart", "can", "i2c", "pruin"; ++ pinctrl-0 = <&P9_24_default_pin>; ++ pinctrl-1 = <&P9_24_gpio_pin>; ++ pinctrl-2 = <&P9_24_gpio_pu_pin>; ++ pinctrl-3 = <&P9_24_gpio_pd_pin>; ++ pinctrl-4 = <&P9_24_uart_pin>; ++ pinctrl-5 = <&P9_24_can_pin>; ++ pinctrl-6 = <&P9_24_i2c_pin>; ++ pinctrl-7 = <&P9_24_pruin_pin>; ++ }; ++ ++ ++ // Audio pin ++ // P9_25_pinmux ++ ++ P9_26_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "uart", "can", "i2c", "pruin"; ++ pinctrl-0 = <&P9_26_default_pin>; ++ pinctrl-1 = <&P9_26_gpio_pin>; ++ pinctrl-2 = <&P9_26_gpio_pu_pin>; ++ pinctrl-3 = <&P9_26_gpio_pd_pin>; ++ pinctrl-4 = <&P9_26_uart_pin>; ++ pinctrl-5 = <&P9_26_can_pin>; ++ pinctrl-6 = <&P9_26_i2c_pin>; ++ pinctrl-7 = <&P9_26_pruin_pin>; ++ }; ++ ++ P9_27_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "qep", "pruout", "pruin"; ++ pinctrl-0 = <&P9_27_default_pin>; ++ pinctrl-1 = <&P9_27_gpio_pin>; ++ pinctrl-2 = <&P9_27_gpio_pu_pin>; ++ pinctrl-3 = <&P9_27_gpio_pd_pin>; ++ pinctrl-4 = <&P9_27_qep_pin>; ++ pinctrl-5 = <&P9_27_pruout_pin>; ++ pinctrl-6 = <&P9_27_pruin_pin>; ++ }; ++ ++ // Audio pins ++ // P9_28_pinmux ++ // P9_29_pinmux ++ ++ P9_30_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pwm", "spi", "pruout", "pruin"; ++ pinctrl-0 = <&P9_30_default_pin>; ++ pinctrl-1 = <&P9_30_gpio_pin>; ++ pinctrl-2 = <&P9_30_gpio_pu_pin>; ++ pinctrl-3 = <&P9_30_gpio_pd_pin>; ++ pinctrl-4 = <&P9_30_pwm_pin>; ++ pinctrl-5 = <&P9_30_spi_pin>; ++ pinctrl-6 = <&P9_30_pruout_pin>; ++ pinctrl-7 = <&P9_30_pruin_pin>; ++ }; ++ ++ // Audio pin ++ // P9_31_pinmux ++ ++ P9_41_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "timer", "pruin"; ++ pinctrl-0 = <&P9_41_default_pin>; ++ pinctrl-1 = <&P9_41_gpio_pin>; ++ pinctrl-2 = <&P9_41_gpio_pu_pin>; ++ pinctrl-3 = <&P9_41_gpio_pd_pin>; ++ pinctrl-4 = <&P9_41_timer_pin>; ++ pinctrl-5 = <&P9_41_pruin_pin>; ++ }; ++ ++ P9_91_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "qep", "pruout", "pruin"; ++ pinctrl-0 = <&P9_91_default_pin>; ++ pinctrl-1 = <&P9_91_gpio_pin>; ++ pinctrl-2 = <&P9_91_gpio_pu_pin>; ++ pinctrl-3 = <&P9_91_gpio_pd_pin>; ++ pinctrl-4 = <&P9_91_qep_pin>; ++ pinctrl-5 = <&P9_91_pruout_pin>; ++ pinctrl-6 = <&P9_91_pruin_pin>; ++ }; ++ ++ P9_42_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "pwm", "uart", "spics", "spiclk"; ++ pinctrl-0 = <&P9_42_default_pin>; ++ pinctrl-1 = <&P9_42_gpio_pin>; ++ pinctrl-2 = <&P9_42_gpio_pu_pin>; ++ pinctrl-3 = <&P9_42_gpio_pd_pin>; ++ pinctrl-4 = <&P9_42_pwm_pin>; ++ pinctrl-5 = <&P9_42_uart_pin>; ++ pinctrl-6 = <&P9_42_spics_pin>; ++ pinctrl-7 = <&P9_42_spiclk_pin>; ++ }; ++ ++ P9_92_pinmux { ++ compatible = "bone-pinmux-helper"; ++ status = "okay"; ++ pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "qep", "pruout", "pruin"; ++ pinctrl-0 = <&P9_92_default_pin>; ++ pinctrl-1 = <&P9_92_gpio_pin>; ++ pinctrl-2 = <&P9_92_gpio_pu_pin>; ++ pinctrl-3 = <&P9_92_gpio_pd_pin>; ++ pinctrl-4 = <&P9_92_qep_pin>; ++ pinctrl-5 = <&P9_92_pruout_pin>; ++ pinctrl-6 = <&P9_92_pruin_pin>; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&ocp>; ++ __overlay__ { ++ ++ // !!!WARNING!!! ++ // gpio-of-helper &gpio pointers are off-by-one vs. the hardware: ++ // hardware GPIO bank 0 = &gpio1 ++ cape-universal { ++ compatible = "gpio-of-helper"; ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ ++ P8_07 { ++ gpio-name = "P8_07"; ++ gpio = <&gpio3 2 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_08 { ++ gpio-name = "P8_08"; ++ gpio = <&gpio3 3 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_09 { ++ gpio-name = "P8_09"; ++ gpio = <&gpio3 5 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_10 { ++ gpio-name = "P8_10"; ++ gpio = <&gpio3 4 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_11 { ++ gpio-name = "P8_11"; ++ gpio = <&gpio2 13 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_12 { ++ gpio-name = "P8_12"; ++ gpio = <&gpio2 12 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_13 { ++ gpio-name = "P8_13"; ++ gpio = <&gpio1 23 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_14 { ++ gpio-name = "P8_14"; ++ gpio = <&gpio1 26 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_15 { ++ gpio-name = "P8_15"; ++ gpio = <&gpio2 15 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_16 { ++ gpio-name = "P8_16"; ++ gpio = <&gpio2 14 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_17 { ++ gpio-name = "P8_17"; ++ gpio = <&gpio1 27 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_18 { ++ gpio-name = "P8_18"; ++ gpio = <&gpio3 1 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_19 { ++ gpio-name = "P8_19"; ++ gpio = <&gpio1 22 0>; ++ input; ++ dir-changeable; ++ }; ++ P8_26 { ++ gpio-name = "P8_26"; ++ gpio = <&gpio2 29 0>; ++ input; ++ dir-changeable; ++ }; ++ ++ ++ P9_11 { ++ gpio-name = "P9_11"; ++ gpio = <&gpio1 30 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_12 { ++ gpio-name = "P9_12"; ++ gpio = <&gpio2 28 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_13 { ++ gpio-name = "P9_13"; ++ gpio = <&gpio1 31 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_14 { ++ gpio-name = "P9_14"; ++ gpio = <&gpio2 18 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_15 { ++ gpio-name = "P9_15"; ++ gpio = <&gpio2 16 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_16 { ++ gpio-name = "P9_16"; ++ gpio = <&gpio2 19 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_17 { ++ gpio-name = "P9_17"; ++ gpio = <&gpio1 5 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_18 { ++ gpio-name = "P9_18"; ++ gpio = <&gpio1 4 0>; ++ input; ++ dir-changeable; ++ }; ++ ++ // I2C pins ++ // P9_19 ++ // P9_20 ++ ++ P9_21 { ++ gpio-name = "P9_21"; ++ gpio = <&gpio1 3 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_22 { ++ gpio-name = "P9_22"; ++ gpio = <&gpio1 2 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_23 { ++ gpio-name = "P9_23"; ++ gpio = <&gpio2 17 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_24 { ++ gpio-name = "P9_24"; ++ gpio = <&gpio1 15 0>; ++ input; ++ dir-changeable; ++ }; ++ ++ // Audio pin ++ // P9_25 ++ ++ P9_26 { ++ gpio-name = "P9_26"; ++ gpio = <&gpio1 14 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_27 { ++ gpio-name = "P9_27"; ++ gpio = <&gpio4 19 0>; ++ input; ++ dir-changeable; ++ }; ++ ++ // Audio pins ++ // P9_28 ++ // P9_29 ++ ++ P9_30 { ++ gpio-name = "P9_30"; ++ gpio = <&gpio4 16 0>; ++ input; ++ dir-changeable; ++ }; ++ ++ // Audio pin ++ // P9_31 ++ ++ P9_41 { ++ gpio-name = "P9_41"; ++ gpio = <&gpio1 20 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_91 { ++ gpio-name = "P9_91"; ++ gpio = <&gpio4 20 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_42 { ++ gpio-name = "P9_42"; ++ gpio = <&gpio1 7 0>; ++ input; ++ dir-changeable; ++ }; ++ P9_92 { ++ gpio-name = "P9_92"; ++ gpio = <&gpio4 18 0>; ++ input; ++ dir-changeable; ++ }; ++ }; ++ }; ++ }; ++ ++ ++ ++ /************************/ ++ /* UARTs */ ++ /************************/ ++ ++ fragment@10 { ++ target = <&uart2>; /* really uart1 */ ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ }; ++ }; ++ ++ fragment@11 { ++ target = <&uart3>; /* really uart2 */ ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ }; ++ }; ++ ++ fragment@12 { ++ target = <&uart5>; /* really uart4 */ ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ }; ++ }; ++ ++// /* UART 5 only available on LCD/HDMI pins */ ++// fragment@13 { ++// target = <&uart6>; /* really uart5 */ ++// __overlay__ { ++// status = "okay"; ++// pinctrl-names = "default"; ++// pinctrl-0 = <>; ++// }; ++// }; ++ ++ /************************/ ++ /* Timers / PWM */ ++ /************************/ ++ ++ fragment@20 { ++ target = <&epwmss0>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@21 { ++ target = <&ehrpwm0>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ }; ++ }; ++ ++ fragment@22 { ++ target = <&ecap0>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ }; ++ }; ++ ++ fragment@23 { ++ target = <&epwmss1>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@24 { ++ target = <&ehrpwm1>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ }; ++ }; ++ ++ fragment@25 { ++ target = <&epwmss2>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@26 { ++ target = <&ehrpwm2>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ }; ++ }; ++ ++ fragment@27 { ++ target = <&ecap2>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ }; ++ }; ++ ++ /************************/ ++ /* I2C / SPI */ ++ /************************/ ++ ++ ++ fragment@30 { ++ target = <&i2c1>; /* i2c1 is numbered correctly */ ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ ++ /* this is the configuration part */ ++ clock-frequency = <100000>; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ /* add any i2c devices on the bus here */ ++ ++ // commented out example of a touchscreen (taken from BB-BONE-LCD7-01-00A4) */ ++ // maxtouch@4a { ++ // compatible = "mXT224"; ++ // reg = <0x4a>; ++ // interrupt-parent = <&gpio4>; ++ // interrupts = <19 0x0>; ++ // atmel,irq-gpio = <&gpio4 19 0>; ++ // }; ++ }; ++ }; ++ ++ fragment@31 { ++ target = <&spi0>; /* spi0 is numbered correctly */ ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ ++ spi0channel@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ compatible = "spidev"; ++ ++ reg = <0>; ++ spi-max-frequency = <16000000>; ++ spi-cpha; ++ }; ++ ++ ++ spi0channel@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ compatible = "spidev"; ++ ++ reg = <1>; ++ spi-max-frequency = <16000000>; ++ }; ++ }; ++ }; ++ ++ fragment@32 { ++ target = <&spi1>; /* spi1 is numbered correctly */ ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ spi1channel@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ compatible = "spidev"; ++ ++ reg = <0>; ++ spi-max-frequency = <16000000>; ++ spi-cpha; ++ }; ++ ++ spi1channel@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ compatible = "spidev"; ++ ++ reg = <1>; ++ spi-max-frequency = <16000000>; ++ }; ++ }; ++ }; ++ ++ fragment@33 { ++ target = <&dcan0>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ }; ++ }; ++ ++ fragment@34 { ++ target = <&dcan1>; ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <>; ++ }; ++ }; ++ ++ ++ /************************/ ++ /* PRUSS */ ++ /************************/ ++ ++ fragment@40 { ++ target = <&pruss>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++}; +-- +1.9.0 + diff --git a/patches/capes/0029-Fix-aspect-ratio-issue-of-720p-in-MT9M114-camera-cap.patch b/patches/capes/0029-Fix-aspect-ratio-issue-of-720p-in-MT9M114-camera-cap.patch new file mode 100644 index 00000000..f95d2021 --- /dev/null +++ b/patches/capes/0029-Fix-aspect-ratio-issue-of-720p-in-MT9M114-camera-cap.patch @@ -0,0 +1,92 @@ +From 209daa388df7d59c6ccb3830f80011524302d92a Mon Sep 17 00:00:00 2001 +From: vvdn +Date: Thu, 2 Jan 2014 15:26:42 +0100 +Subject: [PATCH 29/40] Fix aspect ratio issue of 720p in MT9M114 camera cape + +--- + drivers/media/i2c/soc_camera/mt9m114.c | 34 +++++++++++++++++----------------- + 1 file changed, 17 insertions(+), 17 deletions(-) + +diff --git a/drivers/media/i2c/soc_camera/mt9m114.c b/drivers/media/i2c/soc_camera/mt9m114.c +index 6eab204..77ea15b 100644 +--- a/drivers/media/i2c/soc_camera/mt9m114.c ++++ b/drivers/media/i2c/soc_camera/mt9m114.c +@@ -150,10 +150,10 @@ struct mt9m114_reg { + }; + + enum { +- MT9M114_QVGA, +- MT9M114_VGA, +- MT9M114_WVGA, +- MT9M114_720P, ++ MT9M114_QVGA, ++ MT9M114_VGA, ++ MT9M114_WVGA, ++ MT9M114_720P, + }; + + struct mt9m114_resolution { +@@ -166,15 +166,15 @@ static const struct mt9m114_resolution mt9m114_resolutions[] = { + .width = 320, + .height = 240, + }, +- [MT9M114_VGA] = { ++ [MT9M114_VGA] = { + .width = 640, + .height = 480, + }, +- [MT9M114_WVGA] = { ++ [MT9M114_WVGA] = { + .width = 800, + .height = 480, + }, +- [MT9M114_720P] = { ++ [MT9M114_720P] = { + .width = 1280, + .height = 720, + }, +@@ -411,22 +411,22 @@ static const struct mt9m114_reg mt9m114_regs_wvga[] = { + + static const struct mt9m114_reg mt9m114_regs_720p[] = { + { MT9M114_LOGICAL_ADDRESS_ACCESS, 0x1000, 2 }, +- { MT9M114_CAM_SENSOR_CFG_Y_ADDR_START, 0x0004, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_Y_ADDR_START, 0x007C, 2 }, + { MT9M114_CAM_SENSOR_CFG_X_ADDR_START, 0x0004, 2 }, +- { MT9M114_CAM_SENSOR_CFG_Y_ADDR_END, 0x03CB, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_Y_ADDR_END, 0x0353, 2 }, + { MT9M114_CAM_SENSOR_CFG_X_ADDR_END, 0x050B, 2 }, + { MT9M114_CAM_SENSOR_CFG_ROW_SPEED, 0x0001, 2 }, +- { MT9M114_CAM_SENSOR_CFG_FINE_INTEG_TIME_MIN, 0x00DB, 2 }, +- { MT9M114_CAM_SENSOR_CFG_FINE_INTEG_TIME_MAX, 0x05B3, 2 }, +- { MT9M114_CAM_SENSOR_CFG_FRAME_LENGTH_LINES, 0x03EE, 2 }, +- { MT9M114_CAM_SENSOR_CFG_LINE_LENGTH_PCK, 0x0636, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_FINE_INTEG_TIME_MIN, 0x00A0, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_FINE_INTEG_TIME_MAX, 0x03F7, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_FRAME_LENGTH_LINES, 0x02D5, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_LINE_LENGTH_PCK, 0x060E, 2 }, + { MT9M114_CAM_SENSOR_CFG_FINE_CORRECTION, 0x0060, 2 }, +- { MT9M114_CAM_SENSOR_CFG_CPIPE_LAST_ROW, 0x03C3, 2 }, ++ { MT9M114_CAM_SENSOR_CFG_CPIPE_LAST_ROW, 0x02D3, 2 }, + { MT9M114_CAM_SENSOR_CFG_REG_0_DATA, 0x0020, 2 }, + { MT9M114_CAM_CROP_WINDOW_XOFFSET, 0x0000, 2 }, + { MT9M114_CAM_CROP_WINDOW_YOFFSET, 0x0000, 2 }, + { MT9M114_CAM_CROP_WINDOW_WIDTH, 0x0500, 2 }, +- { MT9M114_CAM_CROP_WINDOW_HEIGHT, 0x03C0, 2 }, ++ { MT9M114_CAM_CROP_WINDOW_HEIGHT, 0x02D0, 2 }, + { MT9M114_CAM_CROP_CROPMODE, 0x03, 1 }, + { MT9M114_CAM_OUTPUT_WIDTH, 0x0500, 2 }, + { MT9M114_CAM_OUTPUT_HEIGHT, 0x02D0, 2 }, +@@ -437,8 +437,8 @@ static const struct mt9m114_reg mt9m114_regs_720p[] = { + { MT9M114_CAM_STAT_AWB_CLIP_WINDOW_YEND, 0x02CF, 2 }, + { MT9M114_CAM_STAT_AE_INITIAL_WINDOW_XSTART, 0x0000, 2 }, + { MT9M114_CAM_STAT_AE_INITIAL_WINDOW_YSTART, 0x0000, 2 }, +- { MT9M114_CAM_STAT_AE_INITIAL_WINDOW_XEND, 0x00FF, 2 }, +- { MT9M114_CAM_STAT_AE_INITIAL_WINDOW_YEND, 0x008F, 2 }, ++ { MT9M114_CAM_STAT_AE_INITIAL_WINDOW_XEND, 0x009F, 2 }, ++ { MT9M114_CAM_STAT_AE_INITIAL_WINDOW_YEND, 0x005F, 2 }, + }; + + static const struct mt9m114_format { +-- +1.9.0 + diff --git a/patches/capes/0030-add-argus-ups-cape-support.patch b/patches/capes/0030-add-argus-ups-cape-support.patch new file mode 100644 index 00000000..62effef9 --- /dev/null +++ b/patches/capes/0030-add-argus-ups-cape-support.patch @@ -0,0 +1,577 @@ +From 5f6ea92cc014af1e739773bb6c08ddc43d8ca12f Mon Sep 17 00:00:00 2001 +From: Dave Lambert +Date: Thu, 12 Dec 2013 12:02:16 -0600 +Subject: [PATCH 30/40] add argus ups cape support + +Signed-off-by: Dave Lambert +Signed-off-by: Robert Nelson +--- + drivers/misc/cape/beaglebone/Kconfig | 7 + + drivers/misc/cape/beaglebone/Makefile | 1 + + drivers/misc/cape/beaglebone/cape-bone-argus.c | 412 +++++++++++++++++++++++++ + firmware/Makefile | 4 + + firmware/capes/cape-bone-argus-00A0.dts | 90 ++++++ + 5 files changed, 514 insertions(+) + create mode 100644 drivers/misc/cape/beaglebone/cape-bone-argus.c + create mode 100644 firmware/capes/cape-bone-argus-00A0.dts + +diff --git a/drivers/misc/cape/beaglebone/Kconfig b/drivers/misc/cape/beaglebone/Kconfig +index 0f44f7a..ae58216 100644 +--- a/drivers/misc/cape/beaglebone/Kconfig ++++ b/drivers/misc/cape/beaglebone/Kconfig +@@ -31,6 +31,13 @@ config CAPE_BEAGLEBONE_GEIGER + help + Say Y here to include support for the Geiger Cape + ++config CAPE_BEAGLEBONE_ARGUS ++ tristate "Beaglebone Argus UPS Cape" ++ depends on CAPE_BEAGLEBONE ++ default n ++ help ++ Say Y here to include support for the Argus UPS cape ++ + + config CAPE_BEAGLEBONE_NIXIE + tristate "Beaglebone Nixie Cape" +diff --git a/drivers/misc/cape/beaglebone/Makefile b/drivers/misc/cape/beaglebone/Makefile +index e32550d..097e25b 100644 +--- a/drivers/misc/cape/beaglebone/Makefile ++++ b/drivers/misc/cape/beaglebone/Makefile +@@ -7,4 +7,5 @@ obj-$(CONFIG_BEAGLEBONE_IIO_HELPER) += bone-iio-helper.o + + obj-$(CONFIG_CAPE_BEAGLEBONE) += capemgr.o + obj-$(CONFIG_CAPE_BEAGLEBONE_GEIGER) += cape-bone-geiger.o ++obj-$(CONFIG_CAPE_BEAGLEBONE_ARGUS) += cape-bone-argus.o + obj-$(CONFIG_CAPE_BEAGLEBONE_NIXIE) += cape-bone-nixie.o +diff --git a/drivers/misc/cape/beaglebone/cape-bone-argus.c b/drivers/misc/cape/beaglebone/cape-bone-argus.c +new file mode 100644 +index 0000000..b92f561 +--- /dev/null ++++ b/drivers/misc/cape/beaglebone/cape-bone-argus.c +@@ -0,0 +1,412 @@ ++/* -*- linux-c -*- */ ++ ++/* Linux Kernel Module for Breakaway Systems UPS control. ++ * ++ * PUBLIC DOMAIN ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* Module to sync file systems leaving them mounted read-only, ++ * then signal the UPS that it is safe to remove ++ * power, and finally halt the processor. ++ * Also to allow kicking the watchdog from user mode. ++ */ ++ ++#define N_GPIOS 9 /* Total number of GPIOS used */ ++ ++#define REQ_GPIO_IDX 0 /* Indices got GPIOS */ ++#define ACK_GPIO_IDX 1 ++#define WDG_GPIO_IDX 2 ++#define LED1_GREEN_IDX 3 ++#define LED1_RED_IDX 4 ++#define LED2_GREEN_IDX 5 ++#define LED2_RED_IDX 6 ++#define GEN_OUT1_IDX 7 ++#define GEN_OUT2_IDX 8 ++ ++static struct argus_ups_info { /* As there is only one UPS device we can make this static */ ++ struct fasync_struct *async_queue; /* asynchronous readers */ ++ struct platform_device *pdev; ++ struct pwm_device *pwm_dev; ++ struct gpio gpios[N_GPIOS]; ++} info = {NULL, NULL, NULL, /* Some fields filled in by device tree, probe, etc. */ ++ { ++ {-1, GPIOF_IN, "Powerdown request"}, ++ {-1, GPIOF_OUT_INIT_LOW, "Powerdown acknowledge" }, ++ {-1, GPIOF_OUT_INIT_LOW, "Watchdog"}, ++ {-1, GPIOF_OUT_INIT_LOW, "LED 1 Green"}, ++ {-1, GPIOF_OUT_INIT_LOW, "LED 1 Red"}, ++ {-1, GPIOF_OUT_INIT_LOW, "LED 2 Green"}, ++ {-1, GPIOF_OUT_INIT_LOW, "LED 2 Red"}, ++ {-1, GPIOF_OUT_INIT_LOW, "General Output #1"}, ++ {-1, GPIOF_OUT_INIT_LOW, "General Output #2"} ++ }, ++}; ++ ++ ++static const struct of_device_id argus_ups_of_ids[] = { ++ { .compatible = "argus-ups" }, ++ { } ++}; ++ ++static int argus_ups_major; /* Major device number */ ++ ++static struct class *argus_ups_class; /* /sys/class */ ++ ++dev_t argus_ups_dev; /* Device number */ ++ ++static struct cdev *argus_ups_cdev; /* Character device details */ ++ ++static void argus_ups_function(struct work_struct *ignored); /* Work function */ ++ ++static DECLARE_DELAYED_WORK(argus_ups_work, argus_ups_function); /* Kernel workqueue glue */ ++ ++static struct workqueue_struct *argus_ups_workqueue; /* Kernel workqueue */ ++ ++static int debug = 0; ++module_param(debug, int, S_IRUGO); ++MODULE_PARM_DESC(debug, "Debug flag"); ++ ++static int shutdown = 1; ++module_param(shutdown, int, S_IRUGO); ++MODULE_PARM_DESC(shutdown, "Shutdown flag"); ++ ++static char* fs_type_names[] = {"vfat", "ext4"}; /* File system names that may need syncing. */ ++ ++/* Just kick watchdog */ ++ ++static ssize_t argus_ups_write(struct file *filp, const char __user *buf, size_t count, ++ loff_t *f_pos) ++{ ++ int i; ++ if (debug >= 3) { ++ printk("Writing to watchdog - count:%d\n", count); ++ } ++ for (i = 0; i < count; i++) { ++ gpio_set_value(info.gpios[WDG_GPIO_IDX].gpio, 1); /* Set it */ ++ msleep(10); /* Wait */ ++ gpio_set_value(info.gpios[WDG_GPIO_IDX].gpio, 0); /* End clearing it */ ++ msleep(10); ++ } ++ return count; /* Always returns what we sent, regardsless */ ++} ++ ++static long argus_ups_ioctl(struct file *file, ++ unsigned int ioctl, ++ unsigned long param) ++{ ++ if (debug >= 4) { ++ printk(KERN_ERR "ioctl: %d, param: %ld\n", ioctl, param); ++ } ++ switch(ioctl) { ++ case 10001: { ++ debug = param; ++ printk("Debug set to %d\n", debug); ++ break; ++ } ++ case 10002: { ++ unsigned char value = param & 0x0F; ++ unsigned char mask = (param >> 4) & 0x0F; ++ int i; /* Loop iterator */ ++ if (mask == 0) { ++ printk(KERN_ERR "Pointless mask of zero!\n"); ++ } ++ for (i = 0; i < 4; i++) { /* For all four LEDS */ ++ if (mask & (1 << i)) { /* Only masked values */ ++ if (value & (1 << i)) { /* On - so gpio is hi */ ++ if (debug >= 4) { ++ printk("Setting %d hi, ", ++ info.gpios[LED1_GREEN_IDX + i].gpio); ++ } ++ gpio_set_value(info.gpios[LED1_GREEN_IDX + i].gpio, 1); ++ } ++ else { /* Off - so gpio is lo */ ++ if (debug >= 4) { ++ printk("Setting %d lo, ", ++ info.gpios[LED1_GREEN_IDX + i].gpio); ++ } ++ gpio_set_value(info.gpios[LED1_GREEN_IDX + i].gpio, 0); ++ } ++ } ++ } ++ if (debug >= 4) { ++ printk("\n"); ++ } ++ break; ++ } ++ case 10003: { ++ gpio_set_value(info.gpios[GEN_OUT1_IDX].gpio, param & 1); ++ break; ++ } ++ case 10004: { ++ gpio_set_value(info.gpios[GEN_OUT2_IDX].gpio, param & 1); ++ break; ++ } ++ default: ++ { ++ printk(KERN_ERR "Invalid ioctl %d\n", ioctl); ++ return -1; ++ } ++ } ++ return 0; ++} ++ ++static int argus_ups_fasync(int fd, struct file *filp, int mode) ++{ ++ printk(KERN_ERR "In argus_ups_fasync() fd:%d, filp:%p, mode:%d\n", fd, filp, mode); ++ return fasync_helper(fd, filp, mode, &info.async_queue); ++} ++ ++static struct file_operations argus_ups_fops = { /* Only file operation is to kick watchdog via a write */ ++ .owner = THIS_MODULE, ++ .llseek = NULL, ++ .read = NULL, ++ .unlocked_ioctl = argus_ups_ioctl, ++ .write = argus_ups_write, ++ .open = NULL, ++ .release = NULL, ++ .fasync = argus_ups_fasync, ++}; ++ ++ ++static void remount_sb(struct super_block *sb) ++{ ++ int flags = MS_RDONLY; ++ int result = sb->s_op->remount_fs(sb, &flags, ""); ++ if (debug) { ++ printk("Processing superblock %p\n", sb); ++ printk("Remount operation returned %d\n", result); ++ } ++} ++ ++ ++static void argus_ups_function(struct work_struct *ignored) ++{ ++ static int testdata = 0; /* Data for test */ ++ int i; /* Iterator */ ++ testdata++; ++ if (!gpio_get_value(info.gpios[REQ_GPIO_IDX].gpio)) { ++ queue_delayed_work(argus_ups_workqueue, &argus_ups_work, HZ/100); /* Re-queue in 10mS*/ ++ return; ++ } ++ printk(KERN_ERR "Request received\n"); ++ if (debug) { ++ printk("Shutdown request received from UPS\n"); ++ } ++ if (!shutdown) { ++ printk("Shutdown request ignored\n"); ++ return; ++ } ++ ++ if (debug) { ++ printk("Sending async kill SIGIO to %p\n", info.async_queue); ++ } ++ if (info.async_queue) { /* Try and tell usermode to halt system */ ++ kill_fasync(&info.async_queue, SIGIO, POLL_IN); ++ } ++ gpio_set_value(info.gpios[LED1_GREEN_IDX].gpio, 0); /* Turn off green LED1 */ ++ for (i = 0; i < 300; i++) { /* Toggle acknowledge at 10 Hz for 15 seconds */ ++ if (debug >= 2) { ++ printk("Waiting for first shutdown request:%d\n", i); ++ } ++ gpio_set_value(info.gpios[ACK_GPIO_IDX].gpio, i & 1); /* Toggle acknowledge */ ++ gpio_set_value(info.gpios[LED1_RED_IDX].gpio, i & 1); /* and LED1 red */ ++ msleep(50); /* Wait in 50ms increments */ ++ } ++ ++ { ++ char *argv[] = { "/sbin/halt", NULL }; ++ static char *envp[] = { ++ "HOME=/", ++ "TERM=linux", ++ "PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin", NULL }; ++ ++ call_usermodehelper( argv[0], argv, envp, UMH_WAIT_PROC ); ++ } ++ for (i = 0; i < 300; i++) { /* Toggle acknowledge at 10 Hz for 15 more seconds */ ++ if (debug >= 2) { ++ printk("Waiting for second shutdown request:%d\n", i); ++ } ++ gpio_set_value(info.gpios[ACK_GPIO_IDX].gpio, i & 1); /* Toggle acknowledge */ ++ gpio_set_value(info.gpios[LED1_RED_IDX].gpio, i & 1); /* and LED1 red */ ++ msleep(50); /* Wait in 50ms increments */ ++ } ++ printk(KERN_ERR "Usermode failed to halt system\n"); ++ kernel_halt(); /* Last resort - may give some oopss */ ++} ++ ++ ++static int argus_ups_probe(struct platform_device *pdev) /* Entry point */ ++{ ++ struct pinctrl *pinctrl; ++ struct device_node *pnode = pdev->dev.of_node; ++ int i; ++ int ret; ++ printk("Init UPS module - debug=%d, shutdown=%d\n", ++ debug, shutdown); ++ platform_set_drvdata(pdev, &info); ++ info.pdev = pdev; ++ pinctrl = devm_pinctrl_get_select_default(&pdev->dev); ++ if (IS_ERR(pinctrl)) { ++ dev_warn(&pdev->dev, ++ "pins are not configured from the driver\n"); ++ return -1; ++ } ++ ret = of_property_read_u32(pnode, "debug", &debug); ++ if (ret != 0) { ++ dev_err(&pdev->dev, "Unable to read debug parameter\n"); ++ } ++ else { ++ printk("Debug parameter read from DT:%d\n", debug); ++ } ++ ++ ret = of_property_read_u32(pnode, "shutdown", &shutdown); ++ if (ret != 0) { ++ dev_err(&pdev->dev, "Unable to read shutdown parameter\n"); ++ } ++ else { ++ printk("Shutdown parameter read from DT:%d\n", shutdown); ++ } ++ ++ ret = of_gpio_count(pnode); ++ ++ if (ret != N_GPIOS) { ++ printk(KERN_ERR "Wrong number of gpios"); ++ return -1; ++ } ++ ++ for (i = 0; i < of_gpio_count(pnode); i++) { ++ ret = of_get_gpio_flags(pnode, i, NULL); ++ if (debug) { ++ printk("GPIO#%d:%d\n", i, ret); ++ } ++ if (IS_ERR_VALUE(ret)) { ++ dev_err(&pdev->dev, "unable to get GPIO %d\n", i); ++ goto err_no_gpio; ++ } ++ info.gpios[i].gpio = ret; ++ } ++ ++ ++ ret = alloc_chrdev_region(&argus_ups_dev, 0, 2, "argus_ups"); ++ argus_ups_major = MAJOR(argus_ups_dev); ++ if (ret) { ++ printk(KERN_ERR "Error %d adding argus_ups\n", ret); ++ return -1; ++ } ++ if (debug) { ++ printk("argus_ups major: %d\n", argus_ups_major); ++ } ++ argus_ups_cdev = cdev_alloc(); /* Make this a character device */ ++ argus_ups_cdev->ops = &argus_ups_fops; /* File operations */ ++ argus_ups_cdev->owner = THIS_MODULE; /* Top level device */ ++ ret = cdev_add(argus_ups_cdev, argus_ups_dev, 1); /* Add it to the kernel */ ++ if (ret) { ++ printk(KERN_ERR "cdev_add returned %d\n", ret); ++ unregister_chrdev_region(0, 1); ++ return -1; ++ } ++ ret = gpio_request_array(info.gpios, N_GPIOS); ++ if (ret) { ++ printk(KERN_ERR "Error %d requesting GPIOs\n", ret); ++ unregister_chrdev_region(0, 1); ++ return -1; ++ } ++ ++ argus_ups_class = class_create(THIS_MODULE, "argus_ups"); /* /sys/class entry for udev */ ++ if (IS_ERR(argus_ups_class)) { ++ printk(KERN_ERR "Error creating argus_ups_class\n"); ++ unregister_chrdev_region(0, 1); ++ return -1; ++ } ++ device_create(argus_ups_class, NULL, MKDEV(argus_ups_major, 0), NULL, "argus_ups"); ++ argus_ups_workqueue = create_singlethread_workqueue("argus_ups"); ++ INIT_DELAYED_WORK(&argus_ups_work, argus_ups_function); ++ queue_delayed_work(argus_ups_workqueue, &argus_ups_work, 0); /* Start work immediately */ ++ ++ return 0; ++err_no_gpio: ++ return ret; ++ ++} ++ ++ ++static void argus_ups_cleanup(void) ++{ ++ printk("Module cleanup called\n"); ++ while (cancel_delayed_work(&argus_ups_work) == 0) { ++ flush_workqueue(argus_ups_workqueue); /* Make sure all work is completed */ ++ } ++ destroy_workqueue(argus_ups_workqueue); ++ gpio_free_array(info.gpios, N_GPIOS); ++ device_destroy(argus_ups_class, argus_ups_dev); ++ class_destroy(argus_ups_class); ++ unregister_chrdev_region(argus_ups_dev, 1); ++ cdev_del(argus_ups_cdev); ++} ++ ++ ++ ++static int argus_ups_remove(struct platform_device *pdev) ++{ ++ printk("In argus_ups_remove()\n"); ++ argus_ups_cleanup(); ++ printk("After cleanup\n"); ++ return 0; ++} ++ ++#define ARGUS_UPS_PM_OPS NULL ++ ++struct platform_driver argus_ups_driver = { ++ .probe = argus_ups_probe, ++ .remove = argus_ups_remove, ++ .driver = { ++ .name = "argus-ups", ++ .owner = THIS_MODULE, ++ .pm = ARGUS_UPS_PM_OPS, ++ .of_match_table = argus_ups_of_ids, ++ }, ++}; ++ ++ ++static int __init argus_ups_init(void) ++{ ++ return platform_driver_probe(&argus_ups_driver, ++ argus_ups_probe); ++} ++ ++static void __exit argus_ups_exit(void) ++{ ++ platform_driver_unregister(&argus_ups_driver); ++ printk("After driver unregister\n"); ++} ++ ++module_init(argus_ups_init); ++module_exit(argus_ups_exit); ++ ++/* ++ * Get rid of taint message. ++ */ ++MODULE_LICENSE("GPL"); ++MODULE_AUTHOR("David Lambert"); /* Who wrote this module? */ ++MODULE_DESCRIPTION("Argus UPS control"); /* What does this module do */ ++MODULE_ALIAS("platform:argus-ups"); ++MODULE_DEVICE_TABLE(of, argus_ups_of_ids); +diff --git a/firmware/Makefile b/firmware/Makefile +index 31941af..0fa5d8c 100644 +--- a/firmware/Makefile ++++ b/firmware/Makefile +@@ -208,6 +208,10 @@ fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \ + fw-shipped-$(CONFIG_CAPE_BEAGLEBONE_GEIGER) += \ + cape-bone-geiger-00A0.dtbo + ++# the Argus UPS cape ++fw-shipped-$(CONFIG_CAPE_BEAGLEBONE_ARGUS) += \ ++ cape-bone-argus-00A0.dtbo ++ + # the nixie cape + fw-shipped-$(CONFIG_CAPE_BEAGLEBONE_NIXIE) += \ + cape-bone-nixie-00A0.dtbo +diff --git a/firmware/capes/cape-bone-argus-00A0.dts b/firmware/capes/cape-bone-argus-00A0.dts +new file mode 100644 +index 0000000..26ce46e +--- /dev/null ++++ b/firmware/capes/cape-bone-argus-00A0.dts +@@ -0,0 +1,90 @@ ++/* ++ * Copyright (C) 2013 David Lambert - Breakaway Systems LLC> ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ * ++ * This has been, and continues to be very confusing to me!!! ++ * ++ */ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "ti,beaglebone", "ti,beaglebone-black"; ++ ++ /* identification */ ++ part-number = "argus-ups"; ++ version = "00A0"; ++ ++ /* state the resources this cape uses */ ++ exclusive-use = ++ /* the pin header usage */ ++ "P8.11", /* Request from UPS */ ++ "P8.17", /* Acknowledge to UPS */ ++ "P8.18", /* Watchdog to UPS */ ++ "P8.7", /* LED 1 Green */ ++ "P8.8", /* LED 1 Red */ ++ "P8.9", /* LED 2 Green */ ++ "P8.10", /* LED 2 Red */ ++ "P9.41", /* General Output #1 */ ++ "P9.42", /* General Output #2 */ ++ /* the hardware IP usage - note that gpios here need to be numbered 0-n */ ++ /* whereas in the fragments they are numbered 1-(n+1)????? */ ++ "gpio0_30", ++ "gpio0_5", ++ "gpio0_4", ++ "gpio2_2", /* LED 1 Green */ ++ "gpio2_3", /* LED 1 Red */ ++ "gpio2_5", /* LED 2 Green */ ++ "gpio2_4", /* LED 2 Red */ ++ "gpio0_20", /* General Output #1 */ ++ "gpio0_7"; /* General Output #2 */ ++ ++ fragment@0 { /* Deals with the pinmux */ ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ argus_ups_pins: pinmux_argus_ups_pins { /* Set up pinmux */ ++ pinctrl-single,pins = < ++ 0x070 0x27 /* gpmc_wait0.gpio0_30, OMAP_MUX_MODE7 | INPUT_PULLDOWN */ ++ 0x15c 0x17 /* spi0_cs0.gpio0_5, OMAP_MUX_MODE7 | OUTPUT_PULLUP */ ++ 0x158 0x17 /* spi0_d1.gpio0_4, OMAP_MUX_MODE7 | OUTPUT_PULLUP */ ++ 0x090 0x17 /* gpmc_advn_ale.gpio_2 , OMAP_MUX_MODE7 | OUTPUT_PULLUP */ ++ 0x094 0x17 /* gpmc_oen_ren.gpio2_3 , OMAP_MUX_MODE7 | OUTPUT_PULLUP */ ++ 0x09c 0x17 /* gpmc_ben0_cle.gpio2_5 , OMAP_MUX_MODE7 | OUTPUT_PULLUP */ ++ 0x098 0x17 /* gpmc_gpmc_wen.gpio2_4 , OMAP_MUX_MODE7 | OUTPUT_PULLUP */ ++ 0x1b4 0x17 /* xdma_event_intr1.gpio0_20 , OMAP_MUX_MODE7 | OUTPUT_PULLUP */ ++ 0x164 0x17 /* ecap0_in_pwm0_out.gpio0_7 , OMAP_MUX_MODE7 | OUTPUT_PULLUP */ ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&ocp>; ++ __overlay__ { ++ argus-ups { ++ compatible = "argus-ups"; ++ status = "okay"; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&argus_ups_pins>; /* Refer to previous label */ ++ /* This section communicates the gpio numbers to the driver module */ ++ /* Note that gpio controllers appear to be numbered from 1-n here rather than 0-(n-1)????? */ ++ gpios = <&gpio1 30 0>, /* Request */ ++ <&gpio1 5 0>, /* Acknowledge */ ++ <&gpio1 4 0>, /* Watchdog */ ++ <&gpio3 2 0>, /* LED 1 Green */ ++ <&gpio3 3 0>, /* LED 1 Red */ ++ <&gpio3 5 0>, /* LED 2 Green */ ++ <&gpio3 4 0>, /* LED 2 Red */ ++ <&gpio1 20 0>, /* General Output #1 */ ++ <&gpio1 7 0>; /* General Output #2 */ ++ debug = <0>; ++ shutdown = <1>; ++ ++ }; ++ }; ++ }; ++}; +-- +1.9.0 + diff --git a/patches/capes/0031-remove-1-wire-gpio-in-weather-cape-rev-B.patch b/patches/capes/0031-remove-1-wire-gpio-in-weather-cape-rev-B.patch new file mode 100644 index 00000000..48e55c29 --- /dev/null +++ b/patches/capes/0031-remove-1-wire-gpio-in-weather-cape-rev-B.patch @@ -0,0 +1,60 @@ +From 0a97867a2c989388f7e9d71c97bd37f4891cf0a6 Mon Sep 17 00:00:00 2001 +From: Hieu Duong +Date: Thu, 3 Apr 2014 14:49:33 -0500 +Subject: [PATCH 31/40] remove 1-wire gpio in weather cape rev B + +Signed-off-by: Hieu Duong +--- + firmware/capes/cape-bone-weather-00B0.dts | 30 ------------------------------ + 1 file changed, 30 deletions(-) + +diff --git a/firmware/capes/cape-bone-weather-00B0.dts b/firmware/capes/cape-bone-weather-00B0.dts +index e399cf3..29c5b27 100644 +--- a/firmware/capes/cape-bone-weather-00B0.dts ++++ b/firmware/capes/cape-bone-weather-00B0.dts +@@ -15,24 +15,7 @@ + version = "00B0"; + + /* state the resources this cape uses */ +- exclusive-use = +- /* the pin header uses */ +- "P8.6", /* gpio1_3 */ +- /* the hardware IP uses */ +- "gpio1_3"; +- + fragment@0 { +- target = <&am33xx_pinmux>; +- __overlay__ { +- weather_cape_w1_pins: pinmux_weather_cape_w1_pins { +- pinctrl-single,pins = < +- 0x0c 0x37 /* gpmc_ad3.gpio1_3, OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE7 - w1-gpio */ +- >; +- }; +- }; +- }; +- +- fragment@1 { + target = <&i2c2>; + + __overlay__ { +@@ -60,17 +43,4 @@ + }; + }; + +- fragment@2 { +- target = <&ocp>; +- __overlay__ { +- onewire@0 { +- compatible = "w1-gpio"; +- pinctrl-names = "default"; +- pinctrl-0 = <&weather_cape_w1_pins>; +- status = "okay"; +- +- gpios = <&gpio2 3 0>; +- }; +- }; +- }; + }; +-- +1.9.0 + diff --git a/patches/capes/0032-cape-add-cape-bone-ibb-00A0.dts.patch b/patches/capes/0032-cape-add-cape-bone-ibb-00A0.dts.patch new file mode 100644 index 00000000..9d696df8 --- /dev/null +++ b/patches/capes/0032-cape-add-cape-bone-ibb-00A0.dts.patch @@ -0,0 +1,164 @@ +From 097f66e89f5a28dd23eff24d7ebfa8a705a6845f Mon Sep 17 00:00:00 2001 +From: Robert Budde +Date: Mon, 7 Apr 2014 14:19:19 -0500 +Subject: [PATCH 32/40] cape: add cape-bone-ibb-00A0.dts + +Signed-off-by: Robert Budde +Signed-off-by: Robert Nelson +--- + firmware/Makefile | 3 +- + firmware/capes/cape-bone-ibb-00A0.dts | 128 ++++++++++++++++++++++++++++++++++ + 2 files changed, 130 insertions(+), 1 deletion(-) + create mode 100644 firmware/capes/cape-bone-ibb-00A0.dts + +diff --git a/firmware/Makefile b/firmware/Makefile +index 0fa5d8c..a0e83a9 100644 +--- a/firmware/Makefile ++++ b/firmware/Makefile +@@ -202,7 +202,8 @@ fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \ + cape-bone-replicape-00A3.dtbo \ + cape-univ-emmc-00A0.dtbo \ + cape-universal-00A0.dtbo \ +- cape-universaln-00A0.dtbo ++ cape-universaln-00A0.dtbo \ ++ cape-bone-ibb-00A0.dtbo + + # the geiger cape + fw-shipped-$(CONFIG_CAPE_BEAGLEBONE_GEIGER) += \ +diff --git a/firmware/capes/cape-bone-ibb-00A0.dts b/firmware/capes/cape-bone-ibb-00A0.dts +new file mode 100644 +index 0000000..dfd7447 +--- /dev/null ++++ b/firmware/capes/cape-bone-ibb-00A0.dts +@@ -0,0 +1,128 @@ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "ti,beaglebone", "ti,beaglebone-black"; ++ part-number = "cape-bone-ibb"; ++ version = "00A0"; ++ exclusive-use = "P9.24", "P9.26", "uart1", ++ "P9.21", "P9.22", "uart2", ++ "P9.13", "P9.11", "uart4", ++ "P9.15"; ++ ++ fragment@0 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ bb_uart1_pins: pinmux_bb_uart1_pins { ++ pinctrl-single,pins = <0x180 0x20 0x184 0x00>; ++ }; ++ bb_uart2_pins: pinmux_bb_uart2_pins { ++ pinctrl-single,pins = <0x150 0x21 0x154 0x01>; ++ }; ++ bb_uart4_pins: pinmux_bb_uart4_pins { ++ pinctrl-single,pins = <0x70 0x26 0x74 0x06>; ++ }; ++ rtc_int_pin: pinmux_rtc_int_pin { ++ pinctrl-single,pins = <0x40 0x37>; /* GPIO1_16 gpmc_a0 */ ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&uart2>; /* really uart1 */ ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&bb_uart1_pins>; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&uart3>; /* really uart2 */ ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&bb_uart2_pins>; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&uart5>; /* really uart4 */ ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&bb_uart4_pins>; ++ }; ++ }; ++ ++ fragment@4 { ++ target = <&i2c2>; ++ __overlay__ { ++ /* shut up DTC warnings */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ /* DS1307 RTC module */ ++ rtc@68 { ++ compatible = "dallas,ds3231"; ++ reg = <0x68>; ++ }; ++ ++ /* PCA9546 I2C multiplexer */ ++ i2cmux@70 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "nxp,pca9545"; ++ reg = <0x70>; ++ ++ i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "nxp,pca954x-bus"; ++ reg = <0>; ++ deselect_on_exit; ++ }; ++ i2c@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "nxp,pca954x-bus"; ++ reg = <1>; ++ deselect_on_exit; ++ }; ++ i2c@2 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "nxp,pca954x-bus"; ++ reg = <2>; ++ deselect_on_exit; ++ }; ++ i2c@3 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "nxp,pca954x-bus"; ++ reg = <3>; ++ deselect_on_exit; ++ }; ++ }; ++ }; ++ }; ++ ++ fragment@5 { ++ target = <&ocp>; ++ __overlay__ { ++ gpio_keys { ++ compatible = "gpio-keys"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&rtc_int_pin>; ++ int_x1 { ++ label = "RTC-INT"; ++ debounce_interval = <50>; ++ linux,code = <1>; ++ gpios = <&gpio2 16 0x5>; ++ gpio-key,wakeup; ++ }; ++ }; ++ }; ++ }; ++ ++}; +-- +1.9.0 + diff --git a/patches/capes/0033-adds-DTS-for-CryptoCape.patch b/patches/capes/0033-adds-DTS-for-CryptoCape.patch new file mode 100644 index 00000000..da57b9b9 --- /dev/null +++ b/patches/capes/0033-adds-DTS-for-CryptoCape.patch @@ -0,0 +1,150 @@ +From 35a86a048b9d50015febe70f59acf8af3f50303a Mon Sep 17 00:00:00 2001 +From: Josh Datko +Date: Wed, 2 Apr 2014 20:35:11 +0000 +Subject: [PATCH 33/40] adds DTS for CryptoCape + +Signed-off-by: Josh Datko +Signed-off-by: Robert Nelson +--- + firmware/Makefile | 3 +- + firmware/capes/BB-BONE-CRYPTO-00A0.dts | 114 +++++++++++++++++++++++++++++++++ + 2 files changed, 116 insertions(+), 1 deletion(-) + create mode 100644 firmware/capes/BB-BONE-CRYPTO-00A0.dts + +diff --git a/firmware/Makefile b/firmware/Makefile +index a0e83a9..7a26e84 100644 +--- a/firmware/Makefile ++++ b/firmware/Makefile +@@ -203,7 +203,8 @@ fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \ + cape-univ-emmc-00A0.dtbo \ + cape-universal-00A0.dtbo \ + cape-universaln-00A0.dtbo \ +- cape-bone-ibb-00A0.dtbo ++ cape-bone-ibb-00A0.dtbo \ ++ BB-BONE-CRYPTO-00A0.dtbo + + # the geiger cape + fw-shipped-$(CONFIG_CAPE_BEAGLEBONE_GEIGER) += \ +diff --git a/firmware/capes/BB-BONE-CRYPTO-00A0.dts b/firmware/capes/BB-BONE-CRYPTO-00A0.dts +new file mode 100644 +index 0000000..2528ae9 +--- /dev/null ++++ b/firmware/capes/BB-BONE-CRYPTO-00A0.dts +@@ -0,0 +1,114 @@ ++/* ++ * Copyright (C) 2014 Cryptotronix ++ * ++ * Cape support for the CryptoCape ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "ti,beaglebone", "ti,beaglebone-black"; ++ ++ /* identification */ ++ part-number = "BB-BONE-CRYPTO"; ++ version = "00A0"; ++ ++ /* state the resources this cape uses */ ++ exclusive-use = ++ /* the pin header uses */ ++ /* For Flashing the ATmega328p */ ++ "P9.13", /* uart4_txd */ ++ "P9.11", /* uart4_rxd */ ++ "P9.23", /* gpio1_17 */ ++ /* As the AUTHO Input from the AES132 */ ++ "P8.11", /* gpio1_13 */ ++ /* the hardware ip uses */ ++ "uart4", ++ "gpio1_13", ++ "gpio1_17"; ++ ++ fragment@0 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ ++ cryptocape_pins: pinmux_cryptocape_pins { ++ pinctrl-single,pins = < ++ 0x044 0x17 /* gpio1_17 FAST | OUTPUT | PULLUP | MODE7 */ ++ 0x034 0x2F /* gpio1_13 FAST | INPUT | PULLDOWN | MODE7 */ ++ >; ++ }; ++ ++ cryptocape_uart4_pins: pinmux_cryptocape_uart4_pins { ++ pinctrl-single,pins = < ++ 0x070 0x26 /* uart4_rxd | FAST | INPUT | MODE6 */ ++ 0x074 0x06 /* uart4_txd | FAST | OUTPUT | MODE6 */ ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&uart5>; /* uart4 to the BBB hardware */ ++ __overlay__ { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&cryptocape_uart4_pins>; ++ }; ++ }; ++ ++ ++ fragment@2 { ++ target = <&i2c2>; ++ ++ __overlay__ { ++ /* needed to avoid gripping by DTC */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ /* Real Time Clock */ ++ ds1307@68 { ++ compatible = "ds1307"; ++ reg = <0x68>; ++ }; ++ ++ /* TPM - Driver currently only available in 3.13.x */ ++ tpm_i2c_atmel@29 { ++ compatible = "tpm_i2c_atmel"; ++ reg = <0x29>; ++ }; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&ocp>; ++ __overlay__ { ++ ++ cryptocape_gpio_helper { ++ compatible = "gpio-of-helper"; ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&cryptocape_pins>; ++ ++ /* declare your gpios */ ++ atmega_rst { ++ gpio-name = "atmega_rst"; ++ gpio = <&gpio2 17 0x00>; /* gpio2 is gpio1 */ ++ output; ++ init-high; ++ }; ++ ++ ataes132_auth { ++ gpio-name = "test_input"; ++ gpio = <&gpio2 13 0x00>; /* gpio2 is gpio1 */ ++ input; ++ count-rising-edge; ++ count-falling-edge; ++ }; ++ }; ++ }; ++ }; ++}; +-- +1.9.0 + diff --git a/patches/capes/0034-Provides-a-sysfs-interface-to-the-eQEP-hardware-on-t.patch b/patches/capes/0034-Provides-a-sysfs-interface-to-the-eQEP-hardware-on-t.patch new file mode 100644 index 00000000..8834bb70 --- /dev/null +++ b/patches/capes/0034-Provides-a-sysfs-interface-to-the-eQEP-hardware-on-t.patch @@ -0,0 +1,852 @@ +From ba4768388c21de0b06d5e7e00a06d153402a6582 Mon Sep 17 00:00:00 2001 +From: Nathaniel Lewis +Date: Mon, 2 Dec 2013 07:45:03 -0800 +Subject: [PATCH 34/40] Provides a sysfs interface to the eQEP hardware on the + AM33XX series SoCs + +Signed-off-by: Nathaniel Lewis +--- + arch/arm/boot/dts/am33xx.dtsi | 27 ++ + drivers/misc/Kconfig | 11 + + drivers/misc/Makefile | 1 + + drivers/misc/tieqep.c | 744 ++++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 783 insertions(+) + create mode 100644 drivers/misc/tieqep.c + +diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi +index 5791c69..b8c9b33 100644 +--- a/arch/arm/boot/dts/am33xx.dtsi ++++ b/arch/arm/boot/dts/am33xx.dtsi +@@ -539,6 +539,15 @@ + ti,hwmods = "ehrpwm0"; + status = "disabled"; + }; ++ ++ eqep0: eqep@0x48300180 { ++ compatible = "ti,am33xx-eqep"; ++ reg = <0x48300180 0x80>; ++ interrupt-parent = <&intc>; ++ interrupts = <79>; ++ ti,hwmods = "eqep0"; ++ status = "disabled"; ++ }; + }; + + epwmss1: epwmss@48302000 { +@@ -567,6 +576,15 @@ + ti,hwmods = "ehrpwm1"; + status = "disabled"; + }; ++ ++ eqep1: eqep@0x48302180 { ++ compatible = "ti,am33xx-eqep"; ++ reg = <0x48302180 0x80>; ++ interrupt-parent = <&intc>; ++ interrupts = <88>; ++ ti,hwmods = "eqep1"; ++ status = "disabled"; ++ }; + }; + + epwmss2: epwmss@48304000 { +@@ -595,6 +613,15 @@ + ti,hwmods = "ehrpwm2"; + status = "disabled"; + }; ++ ++ eqep2: eqep@0x48304180 { ++ compatible = "ti,am33xx-eqep"; ++ reg = <0x48304180 0x80>; ++ interrupt-parent = <&intc>; ++ interrupts = <89>; ++ ti,hwmods = "eqep2"; ++ status = "disabled"; ++ }; + }; + + sham: sham@53100000 { +diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig +index 3c0cbf6..40a3eb9 100644 +--- a/drivers/misc/Kconfig ++++ b/drivers/misc/Kconfig +@@ -511,6 +511,17 @@ config GROVE_I2C + help + Say Y here to support a minimal Grove I2C Motor Driver + ++config TIEQEP ++ tristate "EQEP Hardware quadrature encoder controller" ++ depends on SOC_AM33XX ++ select PWM_TIPWMSS ++ help ++ Driver support for the EQEP quadrature encoder controller AM33XX ++ TI SOC ++ ++ To compile this driver as a module, choose M here: the module ++ will be called tieqep. ++ + source "drivers/misc/c2port/Kconfig" + source "drivers/misc/eeprom/Kconfig" + source "drivers/misc/cb710/Kconfig" +diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile +index 72aef82..b10c476 100644 +--- a/drivers/misc/Makefile ++++ b/drivers/misc/Makefile +@@ -51,4 +51,5 @@ obj-$(CONFIG_ALTERA_STAPL) +=altera-stapl/ + obj-$(CONFIG_INTEL_MEI) += mei/ + obj-$(CONFIG_GPEVT) += gpevt.o + obj-$(CONFIG_GROVE_I2C) += grove-i2c.o ++obj-$(CONFIG_TIEQEP) += tieqep.o + obj-y += cape/ +diff --git a/drivers/misc/tieqep.c b/drivers/misc/tieqep.c +new file mode 100644 +index 0000000..e0ae946 +--- /dev/null ++++ b/drivers/misc/tieqep.c +@@ -0,0 +1,744 @@ ++/* ++ * TI eQEP driver for AM33xx devices ++ * ++ * Copyright (C) 2013 Nathaniel R. Lewis - http://teknoman117.wordpress.com/ ++ * ++ * 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. ++ * ++ * 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, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ * ++ * sysfs entries ++ * - position = absolute - current position; relative - last latched value ++ * - mode => 0 - absolute; 1 - relative ++ * - period => sampling period for the hardware ++ * - enable => 0 - eQEP disabled, 1 - eQEP enabled ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++// Include the PWMSS subsystem headers, because this unit controls ++// whether our clock source is enabled, and if eQEP is to be ++// enabled, we need to start the clock ++#include "../pwm/pwm-tipwmss.h" ++ ++// eQEP register offsets from its base IO address ++#define QPOSCNT 0x0000 ++#define QPOSINIT 0x0004 ++#define QPOSMAX 0x0008 ++#define QPOSCMP 0x000C ++#define QPOSILAT 0x0010 ++#define QPOSSLAT 0x0014 ++#define QPOSLAT 0x0018 ++#define QUTMR 0x001C ++#define QUPRD 0x0020 ++#define QWDTMR 0x0024 ++#define QWDPRD 0x0026 ++#define QDECCTL 0x0028 ++#define QEPCTL 0x002A ++#define QCAPCTL 0x002C ++#define QPOSCTL 0x002E ++#define QEINT 0x0030 ++#define QFLG 0x0032 ++#define QCLR 0x0034 ++#define QFRC 0x0036 ++#define QEPSTS 0x0038 ++#define QCTMR 0x003A ++#define QCPRD 0x003C ++#define QCTMRLAT 0x003E ++#define QCPRDLAT 0x0040 ++#define QREVID 0x005C ++ ++// Bits for the QDECTL register ++#define QSRC1 (0x0001 << 15) ++#define QSRC0 (0x0001 << 14) ++#define SOEN (0x0001 << 13) ++#define SPSEL (0x0001 << 12) ++#define XCR (0x0001 << 11) ++#define SWAP (0x0001 << 10) ++#define IGATE (0x0001 << 9) ++#define QAP (0x0001 << 8) ++#define QBP (0x0001 << 7) ++#define QIP (0x0001 << 6) ++#define QSP (0x0001 << 5) ++ ++// Bits for the QEPCTL register ++#define FREESOFT1 (0x0001 << 15) ++#define FREESOFT0 (0x0001 << 14) ++#define PCRM1 (0x0001 << 13) ++#define PCRM0 (0x0001 << 12) ++#define SEI1 (0x0001 << 11) ++#define SEI0 (0x0001 << 10) ++#define IEI1 (0x0001 << 9) ++#define IEI0 (0x0001 << 8) ++#define SWI (0x0001 << 7) ++#define SEL (0x0001 << 6) ++#define IEL1 (0x0001 << 5) ++#define IEL0 (0x0001 << 4) ++#define PHEN (0x0001 << 3) ++#define QCLM (0x0001 << 2) ++#define UTE (0x0001 << 1) ++#define WDE (0x0001 << 0) ++ ++// Bits for the QCAPCTL register ++#define CEN (0x0001 << 15) ++#define CCPS2 (0x0001 << 6) ++#define CCPS0 (0x0001 << 5) ++#define CCPS1 (0x0001 << 4) ++#define UPPS3 (0x0001 << 3) ++#define UPPS2 (0x0001 << 2) ++#define UPPS1 (0x0001 << 1) ++#define UPPS0 (0x0001 << 0) ++ ++// Bits for the QPOSCTL register ++#define PCSHDW (0x0001 << 15) ++#define PCLOAD (0x0001 << 14) ++#define PCPOL (0x0001 << 13) ++#define PCE (0x0001 << 12) ++#define PCSPW11 (0x0001 << 11) ++#define PCSPW10 (0x0001 << 10) ++#define PCSPW9 (0x0001 << 9) ++#define PCSPW8 (0x0001 << 8) ++#define PCSPW7 (0x0001 << 7) ++#define PCSPW6 (0x0001 << 6) ++#define PCSPW5 (0x0001 << 5) ++#define PCSPW4 (0x0001 << 4) ++#define PCSPW3 (0x0001 << 3) ++#define PCSPW2 (0x0001 << 2) ++#define PCSPW1 (0x0001 << 1) ++#define PCSPW0 (0x0001 << 0) ++ ++// Bits for the interrupt registers ++#define EQEP_INTERRUPT_MASK (0x0FFF) ++#define UTOF (0x0001 << 11) ++ ++// Bits to control the clock in the PWMSS subsystem ++#define PWMSS_EQEPCLK_EN BIT(4) ++#define PWMSS_EQEPCLK_STOP_REQ BIT(5) ++#define PWMSS_EQEPCLK_EN_ACK BIT(4) ++ ++// Modes for the eQEP unit ++// Absolute - the position entry represents the current position of the encoder. ++// Poll this value and it will be notified every period nanoseconds ++// Relative - the position entry represents the last latched position of the encoder ++// This value is latched every period nanoseconds and the internal counter ++// is subsequenty reset ++#define TIEQEP_MODE_ABSOLUTE 0 ++#define TIEQEP_MODE_RELATIVE 1 ++ ++// Structure defining the characteristics of the eQEP unit ++struct eqep_chip ++{ ++ // Platform device for this eQEP unit ++ struct platform_device *pdev; ++ ++ // Pointer to the base of the memory of the eQEP unit ++ void __iomem *mmio_base; ++ ++ // SYSCLKOUT to the eQEP unit ++ u32 clk_rate; ++ ++ // IRQ for the eQEP unit ++ u16 irq; ++ ++ // Mode of the eQEP unit ++ u8 mode; ++ ++ // work stuct for the notify userspace work ++ struct work_struct notify_work; ++ ++ // Backup for driver suspension ++ u16 prior_qepctl; ++ u16 prior_qeint; ++}; ++ ++// Notify userspace work ++void notify_handler (struct work_struct *work) ++{ ++ // Get a reference to the eQEP driver ++ struct eqep_chip *eqep = container_of(work, struct eqep_chip, notify_work); ++ ++ // Notify the userspace ++ sysfs_notify(&eqep->pdev->dev.kobj, NULL, "position"); ++} ++ ++// eQEP Interrupt handler ++static irqreturn_t eqep_irq_handler(int irq, void *dev_id) ++{ ++ // Get the instance information ++ struct platform_device *pdev = dev_id; ++ struct eqep_chip *eqep = platform_get_drvdata(pdev); ++ ++ // Get the interrupt flags ++ u16 iflags = readw(eqep->mmio_base + QFLG) & EQEP_INTERRUPT_MASK; ++ ++ // Check the interrupt source(s) ++ if(iflags & UTOF) ++ { ++ // Handle the unit timer overflow interrupt by notifying any potential pollers ++ schedule_work(&eqep->notify_work); ++ } ++ ++ // Clear interrupt flags (write back triggered flags to the clear register) ++ writew(iflags, eqep->mmio_base + QCLR); ++ ++ // Return that the IRQ was handled successfully ++ return IRQ_HANDLED; ++} ++ ++// Function to read whether the eQEP unit is enabled or disabled ++static ssize_t eqep_get_enabled(struct device *dev, struct device_attribute *attr, char *buf) ++{ ++ // Get the instance structure ++ struct eqep_chip *eqep = dev_get_drvdata(dev); ++ ++ // Read the qep control register and mask all but the enabled bit ++ u16 enabled = readw(eqep->mmio_base + QEPCTL) & PHEN; ++ ++ // Return the target in string format ++ return sprintf(buf, "%u\n", (enabled) ? 1 : 0); ++} ++ ++// Function to set if the eQEP is enabled ++static ssize_t eqep_set_enabled(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) ++{ ++ // Get the instance structure ++ int rc; ++ u16 val; ++ u8 enabled; ++ struct eqep_chip *eqep = dev_get_drvdata(dev); ++ ++ // Convert the input string to an 8 bit uint ++ if ((rc = kstrtou8(buf, 0, &enabled))) ++ return rc; ++ ++ // Get the existing state of QEPCTL ++ val = readw(eqep->mmio_base + QEPCTL); ++ ++ // If we passed a number that is not 0, enable the eQEP ++ if(enabled) ++ { ++ // Enable the eQEP (Set PHEN in QEPCTL) ++ val = val | PHEN; ++ } else ++ { ++ // Disable the eQEP (Clear PHEN in QEPCTL) ++ val = val & ~PHEN; ++ } ++ ++ // Write flags back to control register ++ writew(val, eqep->mmio_base + QEPCTL); ++ ++ // Return buffer length consumed (all) ++ return count; ++} ++ ++// Function to read the current position of the eQEP ++static ssize_t eqep_get_position(struct device *dev, struct device_attribute *attr, char *buf) ++{ ++ // Get the instance structure ++ struct eqep_chip *eqep = dev_get_drvdata(dev); ++ ++ // A variable to return the position with ++ s32 position = 0; ++ ++ // Check the mode ++ if(eqep->mode == TIEQEP_MODE_ABSOLUTE) ++ { ++ // If we are in absolute mode, we need the current value of the eQEP hardware ++ position = readl(eqep->mmio_base + QPOSCNT); ++ } else if(eqep->mode == TIEQEP_MODE_RELATIVE) ++ { ++ // If we are in relative mode, we need the last latched value of the eQEP hardware ++ position = readl(eqep->mmio_base + QPOSLAT); ++ } ++ ++ // Return the target in string format ++ return sprintf(buf, "%d\n", position); ++} ++ ++// Function to set the position of the eQEP hardware ++static ssize_t eqep_set_position(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) ++{ ++ // Get the instance structure ++ int rc; ++ s32 position; ++ struct eqep_chip *eqep = dev_get_drvdata(dev); ++ ++ // Convert the input string to an 8 bit uint ++ if ((rc = kstrtos32(buf, 0, &position))) ++ return rc; ++ ++ // If we are in absolute mode, set the position of the encoder, discard relative mode because thats pointless ++ if(eqep->mode == TIEQEP_MODE_ABSOLUTE) ++ { ++ // If we are in absolute mode, we need the current value of the eQEP hardware ++ writel(position, eqep->mmio_base + QPOSCNT); ++ } ++ ++ // Return buffer length consumed (all) ++ return count; ++} ++ ++// Function to read the period of the unit time event timer ++static ssize_t eqep_get_timer_period(struct device *dev, struct device_attribute *attr, char *buf) ++{ ++ // Get the instance structure ++ struct eqep_chip *eqep = dev_get_drvdata(dev); ++ u64 period = 0; ++ ++ // Check if the period timer is enabled, if not, return 0 ++ if(!(readw(eqep->mmio_base + QEPCTL) & UTE)) ++ { ++ return sprintf(buf, "0\n"); ++ } ++ ++ // Convert from counts per interrupt back into period_ns ++ period = readl(eqep->mmio_base + QUPRD); ++ period = period * NSEC_PER_SEC; ++ do_div(period, eqep->clk_rate); ++ ++ // Otherwise write out the data ++ return sprintf(buf, "%llu\n", period); ++} ++ ++// Function to set the unit timer period. 0 = off, greater than zero sets the period ++static ssize_t eqep_set_timer_period(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) ++{ ++ int rc; ++ u16 tmp; ++ u64 period; ++ ++ // Get the instance structure ++ struct eqep_chip *eqep = dev_get_drvdata(dev); ++ ++ // Convert the passed string to a 64 bit uint ++ if((rc = kstrtou64(buf, 0, &period))) ++ return rc; ++ ++ // Disable the unit timer before modifying its period register ++ tmp = readw(eqep->mmio_base + QEPCTL); ++ tmp = tmp & ~UTE & ~QCLM; ++ writew(tmp, eqep->mmio_base + QEPCTL); ++ ++ // Zero the unit timer counter register ++ writel(0x0, eqep->mmio_base + QUTMR); ++ ++ // If we want the timer enabled (a period that is non zero has been passed) ++ if(period) ++ { ++ // Otherwise calculate the period ++ period = period * eqep->clk_rate; ++ do_div(period, NSEC_PER_SEC); ++ ++ // Set this period into the unit timer period register ++ writel(period & 0x00000000FFFFFFFF, eqep->mmio_base + QUPRD); ++ ++ // Enable the unit timer, and latch QPOSLAT to QPOSCNT on overflow ++ tmp = readw(eqep->mmio_base + QEPCTL); ++ tmp = tmp | UTE | QCLM; ++ writew(tmp, eqep->mmio_base + QEPCTL); ++ } ++ ++ // Return consumed buffer count ++ return count; ++} ++ ++// Function to read the mode of the eQEP hardware ++static ssize_t eqep_get_mode(struct device *dev, struct device_attribute *attr, char *buf) ++{ ++ // Get the instance structure ++ struct eqep_chip *eqep = dev_get_drvdata(dev); ++ ++ // Return the mode ++ return sprintf(buf, "%u\n", eqep->mode); ++} ++ ++// Function to set the mode of the eQEP hardware ++static ssize_t eqep_set_mode(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) ++{ ++ // Get the instance structure ++ int rc; ++ u16 val; ++ u8 tmp_mode; ++ struct eqep_chip *eqep = dev_get_drvdata(dev); ++ ++ // Convert the input string to an 8 bit uint ++ if ((rc = kstrtou8(buf, 0, &tmp_mode))) ++ return rc; ++ ++ // Get the existing state of QEPCTL ++ val = readw(eqep->mmio_base + QEPCTL); ++ ++ // Check the mode that was passed ++ if(tmp_mode == TIEQEP_MODE_ABSOLUTE) ++ { ++ // In absolute mode, we don't want to reset the intenal hardware based on time, ++ // so disable the unit timer position reset (Set PCRM[1:0] = 0) ++ val = val & ~PCRM1 & ~PCRM0; ++ ++ // Store the mode as absolute ++ eqep->mode = TIEQEP_MODE_ABSOLUTE; ++ } else if(tmp_mode == TIEQEP_MODE_RELATIVE) ++ { ++ // In relative mode, we want to latch the value of the eQEP hardware on the ++ // overflow of the unit timer. So enable the unit timer position reset ++ // (Set PCRM[1:0] = 3) ++ val = val | PCRM1 | PCRM0; ++ ++ // Store the mode as relative ++ eqep->mode = TIEQEP_MODE_RELATIVE; ++ } ++ ++ // Write the new value back to the control register ++ writew(val, eqep->mmio_base + QEPCTL); ++ ++ // Return buffer length consumed (all) ++ return count; ++} ++ ++// Bind read/write functions to sysfs entries ++static DEVICE_ATTR(enabled, 0644, eqep_get_enabled, eqep_set_enabled); ++static DEVICE_ATTR(position, 0644, eqep_get_position, eqep_set_position); ++static DEVICE_ATTR(period, 0644, eqep_get_timer_period, eqep_set_timer_period); ++static DEVICE_ATTR(mode, 0644, eqep_get_mode, eqep_set_mode); ++ ++// Array holding all of the sysfs entries ++static const struct attribute *eqep_attrs[] = { ++ &dev_attr_enabled.attr, ++ &dev_attr_position.attr, ++ &dev_attr_period.attr, ++ &dev_attr_mode.attr, ++ NULL, ++}; ++ ++// Driver function group ++static const struct attribute_group eqep_device_attr_group = { ++ .attrs = (struct attribute **) eqep_attrs, ++}; ++ ++// Driver compatibility list ++static struct of_device_id eqep_of_match[] = ++{ ++ { .compatible = "ti,am33xx-eqep" }, ++ { } ++}; ++ ++// Register our compatibilities for device trees ++MODULE_DEVICE_TABLE(of, eqep_of_match); ++ ++// Create an instance of the eQEP driver ++static int eqep_probe(struct platform_device *pdev) ++{ ++ struct resource *r; ++ struct clk *clk; ++ struct eqep_chip *eqep; ++ struct pinctrl *pinctrl; ++ int ret; ++ u64 period; ++ u16 status; ++ u32 value; ++ ++ // Select any default pins possible provided through the device tree ++ pinctrl = devm_pinctrl_get_select_default(&pdev->dev); ++ if (IS_ERR(pinctrl)) ++ { ++ dev_warn(&pdev->dev, "unable to select pin group\n"); ++ } ++ ++ // Allocate a eqep_driver object ++ eqep = devm_kzalloc(&pdev->dev, sizeof(struct eqep_chip), GFP_KERNEL); ++ if (!eqep) { ++ dev_err(&pdev->dev, "failed to allocate memory\n"); ++ return -ENOMEM; ++ } ++ ++ // Get a handle to the system clock object ++ clk = devm_clk_get(&pdev->dev, "fck"); ++ if (IS_ERR(clk)) { ++ dev_err(&pdev->dev, "failed to get clock\n"); ++ return PTR_ERR(clk); ++ } ++ ++ // Get the frequency of the system clock ++ eqep->clk_rate = clk_get_rate(clk); ++ if (!eqep->clk_rate) { ++ dev_err(&pdev->dev, "failed to get clock rate\n"); ++ return -EINVAL; ++ } ++ ++ // Get a resource containing the IRQ for this eQEP controller ++ r = platform_get_resource(pdev, IORESOURCE_IRQ, 0); ++ if (unlikely(!r)) { ++ dev_err(&pdev->dev, "Invalid IRQ resource\n"); ++ return -ENODEV; ++ } ++ ++ // Store the irq ++ eqep->irq = r->start; ++ ++ // Get a resource containing the requested (from DT) memory address and range of eQEP controller ++ r = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ if (!r) { ++ dev_err(&pdev->dev, "no memory resource defined\n"); ++ return -ENODEV; ++ } ++ ++ // Remap the eQEP controller memory into our own memory space ++ eqep->mmio_base = devm_request_and_ioremap(&pdev->dev, r); ++ if (!eqep->mmio_base) ++ return -EADDRNOTAVAIL; ++ ++ // Store the platform device in our eQEP data structure for later usage ++ eqep->pdev = pdev; ++ ++ // Subscribe to the eQEP interrupt ++ if (request_irq(eqep->irq, eqep_irq_handler, IRQF_IRQPOLL, "eqep_interrupt", pdev)) ++ { ++ dev_err(&pdev->dev, "unable to request irq for eQEP\n"); ++ return -ENODEV; ++ } ++ ++ // Register controls to sysfs ++ if (sysfs_create_group(&pdev->dev.kobj, &eqep_device_attr_group)) ++ { ++ dev_err(&pdev->dev, "sysfs creation failed\n"); ++ return -EINVAL; ++ } ++ ++ // Read decoder control settings ++ status = readw(eqep->mmio_base + QDECCTL); ++ ++ // Quadrature mode or direction mode ++ if(of_property_read_u32(pdev->dev.of_node, "count_mode", &value)) ++ status = status & ~QSRC1 & ~QSRC0; ++ else ++ status = ((value) ? status | QSRC0 : status & ~QSRC0) & ~QSRC1; ++ ++ // Should we invert the qa input ++ if(of_property_read_u32(pdev->dev.of_node, "invert_qa", &value)) ++ status = status & ~QAP; ++ else ++ status = (value) ? status | QAP : status & ~QAP; ++ ++ // Should we invert the qb input ++ if(of_property_read_u32(pdev->dev.of_node, "invert_qb", &value)) ++ status = status & ~QBP; ++ else ++ status = (value) ? status | QBP : status & ~QBP; ++ ++ // Should we invert the index input ++ if(of_property_read_u32(pdev->dev.of_node, "invert_qi", &value)) ++ status = status & ~QIP; ++ else ++ status = (value) ? status | QIP : status & ~QIP; ++ ++ // Should we invert the strobe input ++ if(of_property_read_u32(pdev->dev.of_node, "invert_qs", &value)) ++ status = status & ~QSP; ++ else ++ status = (value) ? status | QSP : status & ~QSP; ++ ++ // Should we swap the cha and chb inputs ++ if(of_property_read_u32(pdev->dev.of_node, "swap_inputs", &value)) ++ status = status & ~SWAP; ++ else ++ status = (value) ? status | SWAP : status & ~SWAP; ++ ++ // Write the decoder control settings back to the control register ++ writew(status, eqep->mmio_base + QDECCTL); ++ ++ // Initialize the position counter to zero ++ writel(0, eqep->mmio_base + QPOSINIT); ++ ++ // This is pretty ingenious if I do say so myself. The eQEP subsystem has a register ++ // that defined the maximum value of the encoder as an unsigned. If the counter is zero ++ // and decrements again, it is set to QPOSMAX. If you cast -1 (signed int) to ++ // to an unsigned, you will notice that -1 == UINT_MAX. So when the counter is set to this ++ // maximum position, when read into a signed int, it will equal -1. Two's complement for ++ // the WIN!! ++ writel(-1, eqep->mmio_base + QPOSMAX); ++ ++ // Enable some interrupts ++ status = readw(eqep->mmio_base + QEINT); ++ status = status | UTOF; ++ // UTOF - Unit Time Period interrupt. This is triggered when the unit timer period expires ++ // ++ writew(status, eqep->mmio_base + QEINT); ++ ++ // Calculate the timer ticks per second ++ period = 1000000000; ++ period = period * eqep->clk_rate; ++ do_div(period, NSEC_PER_SEC); ++ ++ // Set this period into the unit timer period register ++ writel(period & 0x00000000FFFFFFFF, eqep->mmio_base + QUPRD); ++ ++ // Enable the eQEP with basic position counting turned on ++ status = readw(eqep->mmio_base + QEPCTL); ++ status = status | PHEN | IEL0 | SWI | UTE | QCLM; ++ // PHEN - Quadrature position counter enable bit ++ // IEL0 - Latch QPOSILAT on index signal. This can be rising or falling, IEL[1:0] = 0 is reserved ++ // SWI - Software initialization of position count register. Basic set QPOSCNT <= QPOSINIT ++ // UTE - unit timer enable ++ // QCLM - latch QPOSLAT to QPOSCNT upon unit timer overflow ++ writew(status, eqep->mmio_base + QEPCTL); ++ ++ // We default to absolute mode ++ eqep->mode = TIEQEP_MODE_ABSOLUTE; ++ ++ // Enable the power management runtime ++ pm_runtime_enable(&pdev->dev); ++ ++ // Increment the device usage count and run pm_runtime_resume() ++ pm_runtime_get_sync(&pdev->dev); ++ ++ // Enable the clock to the eQEP unit ++ status = pwmss_submodule_state_change(pdev->dev.parent, PWMSS_EQEPCLK_EN); ++ ++ // If we failed to enable the clocks, fail out ++ if (!(status & PWMSS_EQEPCLK_EN_ACK)) ++ { ++ dev_err(&pdev->dev, "PWMSS config space clock enable failed\n"); ++ ret = -EINVAL; ++ goto pwmss_clk_failure; ++ } ++ ++ // Initialize the notify work struture ++ INIT_WORK(&eqep->notify_work, notify_handler); ++ ++ // Decrement the device usage count (twice) and run pm_runtime_idle() if zero ++ pm_runtime_put_sync(&pdev->dev); ++ ++ // Set the platform driver data to the data object we've been creating for the eQEP unit ++ platform_set_drvdata(pdev, eqep); ++ ++ // Success! ++ //printk(KERN_INFO "EQEP irq = %d, system clock = %u\n", eqep->irq, eqep->clk_rate); ++ return 0; ++ ++ // If a failure occurred, stop the runtime power management ++pwmss_clk_failure: ++ pm_runtime_put_sync(&pdev->dev); ++ pm_runtime_disable(&pdev->dev); ++ return ret; ++} ++ ++// Remove an instance of the eQEP driver ++static int eqep_remove(struct platform_device *pdev) ++{ ++ // Get the eQEP driver data from the platform device structure ++ struct eqep_chip *eqep = platform_get_drvdata(pdev); ++ ++ // Cancel work ++ cancel_work_sync(&eqep->notify_work); ++ ++ // Unmap from sysfs ++ sysfs_remove_group(&pdev->dev.kobj, &eqep_device_attr_group); ++ ++ // Release important assets ++ free_irq(eqep->irq, pdev); ++ ++ // Increment the device usage count and run pm_runtime_resume() ++ pm_runtime_get_sync(&pdev->dev); ++ ++ // Disable the eQEP clock ++ pwmss_submodule_state_change(pdev->dev.parent, PWMSS_EQEPCLK_STOP_REQ); ++ ++ // Decrement the device usage count (twice) and run pm_runtime_idle() if zero ++ pm_runtime_put_sync(&pdev->dev); ++ pm_runtime_put_sync(&pdev->dev); ++ ++ // Disable the runtime power management of this device ++ pm_runtime_disable(&pdev->dev); ++ ++ // Return success ++ return 0; ++} ++ ++// Power management suspend device ++static int eqep_suspend(struct device *dev) ++{ ++ // Get the eqep driver information ++ struct eqep_chip *eqep = dev_get_drvdata(dev); ++ u16 tmp; ++ ++ // Shut down interrupts ++ eqep->prior_qeint = readw(eqep->mmio_base + QEINT); ++ tmp = eqep->prior_qeint & ~UTOF; ++ // UTOF - Unit Time Period interrupt. ++ writew(tmp, eqep->mmio_base + QEINT); ++ ++ // Get the existing state of QEPCTL ++ eqep->prior_qepctl = readw(eqep->mmio_base + QEPCTL); ++ ++ // Disable eQEP controller ++ writew(eqep->prior_qepctl & ~PHEN, eqep->mmio_base + QEPCTL); ++ ++ // Decrement the device usage count and run pm_runtime_idle() if zero ++ pm_runtime_put_sync(dev); ++ ++ // Return success ++ return 0; ++} ++ ++// Power management wake device back up ++static int eqep_resume(struct device *dev) ++{ ++ // Get the eqep driver information ++ struct eqep_chip *eqep = dev_get_drvdata(dev); ++ ++ // Restore interrupt enabled register ++ writew(eqep->prior_qeint, eqep->mmio_base + QEINT); ++ ++ // Restore prior qep control register ++ writew(eqep->prior_qepctl, eqep->mmio_base + QEPCTL); ++ ++ // Increment the device usage count and run pm_runtime_resume() ++ pm_runtime_get_sync(dev); ++ ++ // Success ++ return 0; ++} ++ ++// create pm functions object ++static SIMPLE_DEV_PM_OPS(eqep_pm_ops, eqep_suspend, eqep_resume); ++ ++// Platform driver information ++static struct platform_driver eqep_driver = { ++ .driver = { ++ .name = "eqep", ++ .owner = THIS_MODULE, ++ .pm = &eqep_pm_ops, ++ .of_match_table = eqep_of_match, ++ }, ++ .probe = eqep_probe, ++ .remove = eqep_remove, ++}; ++ ++// Register this platform driver ++module_platform_driver(eqep_driver); ++ ++// Module information ++MODULE_DESCRIPTION("TI eQEP driver"); ++MODULE_AUTHOR("Nathaniel R. Lewis"); ++MODULE_LICENSE("GPL"); +-- +1.9.0 + diff --git a/patches/capes/0035-capes-add-bone_eqep-from-https-github.com-Teknoman11.patch b/patches/capes/0035-capes-add-bone_eqep-from-https-github.com-Teknoman11.patch new file mode 100644 index 00000000..06cf865b --- /dev/null +++ b/patches/capes/0035-capes-add-bone_eqep-from-https-github.com-Teknoman11.patch @@ -0,0 +1,226 @@ +From 0acbee080ffac77e9abbdc00e94409913383754b Mon Sep 17 00:00:00 2001 +From: Robert Nelson +Date: Thu, 24 Apr 2014 15:43:04 -0500 +Subject: [PATCH 35/40] capes: add bone_eqep from + https://github.com/Teknoman117/beaglebot/tree/master/encoders/dts + +Signed-off-by: Robert Nelson +--- + firmware/Makefile | 5 +++- + firmware/capes/bone_eqep0-00A0.dts | 58 ++++++++++++++++++++++++++++++++++++++ + firmware/capes/bone_eqep1-00A0.dts | 57 +++++++++++++++++++++++++++++++++++++ + firmware/capes/bone_eqep2-00A0.dts | 57 +++++++++++++++++++++++++++++++++++++ + 4 files changed, 176 insertions(+), 1 deletion(-) + create mode 100644 firmware/capes/bone_eqep0-00A0.dts + create mode 100644 firmware/capes/bone_eqep1-00A0.dts + create mode 100644 firmware/capes/bone_eqep2-00A0.dts + +diff --git a/firmware/Makefile b/firmware/Makefile +index 7a26e84..4812c17 100644 +--- a/firmware/Makefile ++++ b/firmware/Makefile +@@ -204,7 +204,10 @@ fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \ + cape-universal-00A0.dtbo \ + cape-universaln-00A0.dtbo \ + cape-bone-ibb-00A0.dtbo \ +- BB-BONE-CRYPTO-00A0.dtbo ++ BB-BONE-CRYPTO-00A0.dtbo \ ++ bone_eqep0-00A0.dtbo \ ++ bone_eqep1-00A0.dtbo \ ++ bone_eqep2-00A0.dtbo + + # the geiger cape + fw-shipped-$(CONFIG_CAPE_BEAGLEBONE_GEIGER) += \ +diff --git a/firmware/capes/bone_eqep0-00A0.dts b/firmware/capes/bone_eqep0-00A0.dts +new file mode 100644 +index 0000000..d1b7760 +--- /dev/null ++++ b/firmware/capes/bone_eqep0-00A0.dts +@@ -0,0 +1,58 @@ ++/* ++ * Copyright (C) 2013 Nathaniel R. Lewis - http://teknoman117.wordpress.com/ ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ * ++ * Enable eQEP0 on the Beaglebone Black - incompatible with BB White because ++ * most of the eQEP0 pins on Beaglebone white are not broken out. ++ */ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "ti,beaglebone-black"; ++ ++ /* identification */ ++ part-number = "bone_eqep0"; ++ version = "00A0"; ++ ++ fragment@0 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ pinctrl_eqep0: pinctrl_eqep0_pins { ++ pinctrl-single,pins = < ++ 0x1A8 0x21 /* P9_41 = GPIO3_20 = EQEP0_index, MODE1 */ ++ 0x1AC 0x21 /* P9_25 = GPIO3_21 = EQEP0_strobe, MODE1 */ ++ 0x1A0 0x31 /* P9_42 = GPIO3_18 = EQEP0A_in, MODE1 */ ++ 0x1A4 0x31 /* P9_27 = GPIO3_19 = EQEP0B_in, MODE1 */ ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&epwmss0>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&eqep0>; ++ __overlay__ { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_eqep0>; ++ ++ count_mode = <0>; /* 0 - Quadrature mode, normal 90 phase offset cha & chb. 1 - Direction mode. cha input = clock, chb input = direction */ ++ swap_inputs = <0>; /* Are channel A and channel B swapped? (0 - no, 1 - yes) */ ++ invert_qa = <1>; /* Should we invert the channel A input? */ ++ invert_qb = <1>; /* Should we invert the channel B input? I invert these because my encoder outputs drive transistors that pull down the pins */ ++ invert_qi = <0>; /* Should we invert the index input? */ ++ invert_qs = <0>; /* Should we invert the strobe input? */ ++ ++ status = "okay"; ++ }; ++ }; ++}; +diff --git a/firmware/capes/bone_eqep1-00A0.dts b/firmware/capes/bone_eqep1-00A0.dts +new file mode 100644 +index 0000000..1760fce +--- /dev/null ++++ b/firmware/capes/bone_eqep1-00A0.dts +@@ -0,0 +1,57 @@ ++/* ++ * Copyright (C) 2013 Nathaniel R. Lewis - http://teknoman117.wordpress.com/ ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ * ++ * Enable eQEP1 on the Beaglebone White and Black ++ */ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "ti,beaglebone", "ti,beaglebone-black"; ++ ++ /* identification */ ++ part-number = "bone_eqep1"; ++ version = "00A0"; ++ ++ fragment@0 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ pinctrl_eqep1: pinctrl_eqep1_pins { ++ pinctrl-single,pins = < ++ 0x0D8 0x22 /* P8_31 = GPIO0_10 = EQEP1_index, MODE2 */ ++ 0x0DC 0x22 /* P8_32 = GPIO0_11 = EQEP1_strobe, MODE2 */ ++ 0x0D4 0x32 /* P8_33 = GPIO0_9 = EQEP1B_in, MODE2 */ ++ 0x0D0 0x32 /* P8_35 = GPIO0_8 = EQEP1A_in, MODE2 */ ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&epwmss1>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&eqep1>; ++ __overlay__ { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_eqep1>; ++ ++ count_mode = <0>; /* 0 - Quadrature mode, normal 90 phase offset cha & chb. 1 - Direction mode. cha input = clock, chb input = direction */ ++ swap_inputs = <0>; /* Are channel A and channel B swapped? (0 - no, 1 - yes) */ ++ invert_qa = <1>; /* Should we invert the channel A input? */ ++ invert_qb = <1>; /* Should we invert the channel B input? I invert these because my encoder outputs drive transistors that pull down the pins */ ++ invert_qi = <0>; /* Should we invert the index input? */ ++ invert_qs = <0>; /* Should we invert the strobe input? */ ++ ++ status = "okay"; ++ }; ++ }; ++}; +diff --git a/firmware/capes/bone_eqep2-00A0.dts b/firmware/capes/bone_eqep2-00A0.dts +new file mode 100644 +index 0000000..83f9de7 +--- /dev/null ++++ b/firmware/capes/bone_eqep2-00A0.dts +@@ -0,0 +1,57 @@ ++/* ++ * Copyright (C) 2013 Nathaniel R. Lewis - http://teknoman117.wordpress.com/ ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ * ++ * Enable eQEP2 on the Beaglebone White and Black ++ */ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "ti,beaglebone", "ti,beaglebone-black"; ++ ++ /* identification */ ++ part-number = "bone_eqep2"; ++ version = "00A0"; ++ ++ fragment@0 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ pinctrl_eqep2: pinctrl_eqep2_pins { ++ pinctrl-single,pins = < ++ 0x0B8 0x23 /* P8_39 = GPIO2_12 = EQEP2_index, MODE3 */ ++ 0x0BC 0x23 /* P8_40 = GPIO2_13 = EQEP2_strobe, MODE3 */ ++ 0x0B0 0x33 /* P8_41 = GPIO2_10 = EQEP2A_in, MODE3 */ ++ 0x0B4 0x33 /* P8_42 = GPIO2_11 = EQEP2B_in, MODE3 */ ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&epwmss2>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&eqep2>; ++ __overlay__ { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_eqep2>; ++ ++ count_mode = <0>; /* 0 - Quadrature mode, normal 90 phase offset cha & chb. 1 - Direction mode. cha input = clock, chb input = direction */ ++ swap_inputs = <0>; /* Are channel A and channel B swapped? (0 - no, 1 - yes) */ ++ invert_qa = <1>; /* Should we invert the channel A input? */ ++ invert_qb = <1>; /* Should we invert the channel B input? I invert these because my encoder outputs drive transistors that pull down the pins */ ++ invert_qi = <0>; /* Should we invert the index input? */ ++ invert_qs = <0>; /* Should we invert the strobe input? */ ++ ++ status = "okay"; ++ }; ++ }; ++}; +-- +1.9.0 + diff --git a/patches/capes/0036-Adding-Logibone-to-cape-support-list.patch b/patches/capes/0036-Adding-Logibone-to-cape-support-list.patch new file mode 100644 index 00000000..dfd7cf4f --- /dev/null +++ b/patches/capes/0036-Adding-Logibone-to-cape-support-list.patch @@ -0,0 +1,32 @@ +From 7d28760ed71afb0acfa1f4a21f5c24eb7ad6f0bd Mon Sep 17 00:00:00 2001 +From: Jonathan Piat +Date: Mon, 28 Apr 2014 23:14:32 +0200 +Subject: [PATCH 36/40] Adding Logibone to cape support list + +--- + arch/arm/boot/dts/am335x-bone-common.dtsi | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi +index a349b27..b183c7d 100644 +--- a/arch/arm/boot/dts/am335x-bone-common.dtsi ++++ b/arch/arm/boot/dts/am335x-bone-common.dtsi +@@ -425,6 +425,15 @@ + + }; + ++ /* LOGIBONE cape */ ++ cape@17 { ++ part-number = "BB-BONE-LOGIBONE"; ++ version@00R1 { ++ version = "00R1"; ++ dtbo = "BB-BONE-LOGIBONE-00R1.dtbo"; ++ }; ++ }; ++ + }; + }; + +-- +1.9.0 + diff --git a/patches/capes/0037-beaglebone-capes-Added-CBB-Relay-cape-dt-overlay.patch b/patches/capes/0037-beaglebone-capes-Added-CBB-Relay-cape-dt-overlay.patch new file mode 100644 index 00000000..fd952765 --- /dev/null +++ b/patches/capes/0037-beaglebone-capes-Added-CBB-Relay-cape-dt-overlay.patch @@ -0,0 +1,377 @@ +From 6f6b645c9c3f4b10aa7a1d0eb94b0ca2276e7055 Mon Sep 17 00:00:00 2001 +From: Alexander Hiam +Date: Fri, 9 May 2014 13:04:13 -0400 +Subject: [PATCH 37/40] beaglebone capes: Added CBB-Relay cape dt overlay + +Added Device Tree overlay for the CBB-Relay cape and fixed a copy and paste +error in a comment in /firmware/Makefile. + +signed-off-by: Alexander Hiam +--- + firmware/Makefile | 6 +- + firmware/capes/CBB-Relay-00A0.dts | 331 ++++++++++++++++++++++++++++++++++++++ + 2 files changed, 336 insertions(+), 1 deletion(-) + create mode 100644 firmware/capes/CBB-Relay-00A0.dts + +diff --git a/firmware/Makefile b/firmware/Makefile +index 4812c17..42174f7 100644 +--- a/firmware/Makefile ++++ b/firmware/Makefile +@@ -233,12 +233,16 @@ fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \ + # the Tester cape (tester-side) + fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += cape-bone-tester-00A0.dtbo + +-# the CBB-Serial cape (tester-side) ++# the CBB-Serial cape + fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \ + cape-CBB-Serial-r01.dtbo \ + BB-UART2-RTSCTS-00A0.dtbo \ + BB-UART4-RTSCTS-00A0.dtbo + ++# the CBB-Relay cape ++fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \ ++ CBB-Relay-00A0.dtbo ++ + # the virtual peripheral capes for the UARTs + # UART3 is not routed to the connectors, no cape for it + fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \ +diff --git a/firmware/capes/CBB-Relay-00A0.dts b/firmware/capes/CBB-Relay-00A0.dts +new file mode 100644 +index 0000000..f7f4edd +--- /dev/null ++++ b/firmware/capes/CBB-Relay-00A0.dts +@@ -0,0 +1,331 @@ ++/* CBB-Relay-00A0.dts ++ * Logic Supply - http://logicsupply.com ++ * ++ * This is the Device Tree overlay for the CBB-Relay BeagleBone and ++ * BeagleBone Black cape. ++ * ++ * Upon loading, 6 sysfs kernel driver interfaces will be created ++ * (The values of 'X' in the paths below will change depending on ++ * your system): ++ * ++ * - /sys/devices/ocp.X/CBB-Relay-ain.X/ ++ * - AIN1 : Reading this file will give the voltage in mV on AIN0, ++ * accounting for the CBB-Relay's /10 divider ++ * - AIN5 : Reading this file will give the voltage in mV on AIN1 ++ * ++ * - /sys/devices/ocp.X/CBB-Relay-in1-pull.X/ ++ * - state : The following strings may be written to this file ++ * (without quotes): ++ * - "pullup" : enables pullup on in1 (default state) ++ * - "nopull" : disables pullup/pulldown on in1 ++ * ++ * - /sys/devices/ocp.X/CBB-Relay-in2-pull.X/ ++ * - state : See above ++ * ++ * - /sys/devices/ocp.X/CBB-Relay-in3-pull.X/ ++ * - state : See above ++ * ++ * - /sys/devices/ocp.X/CBB-Relay-in4-pull.X/ ++ * - state : See above ++ * ++ * - /sys/devices/ocp.X/CBB-Relay-servo1.X/ ++ * - duty : Write desired pulse width in nanoseconds ++ * (initial value is 1000000 [1ms]) ++ * - period : Write desired period in nanoseconds ++ * (initial value is 20000000 [50Hz]) ++ * - polarity : Write 0 for normally low, 1 for normally high ++ * (initial value is 0) ++ * - run : Write 1 to enable output, 0 to disable ++ * (initial value is 0) ++ * ++ * Copyright (c) 2014 - Logic Supply (http://logicsupply.com) ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++/dts-v1/; ++/plugin/; ++ ++/{ ++ compatible = "ti,beaglebone", "ti,beaglebone-black"; ++ ++ part-number = "CBB-Relay"; ++ version = "00A0"; ++ ++ /* State the resources this cape uses - used to check cape compatibility. */ ++ exclusive-use = ++ /* the pin header uses */ ++ "P8.26", /* Relay K1 - GPIO1_29 */ ++ "P9.27", /* Relay K2 - GPIO3_19 */ ++ ++ "P9.24", /* Blue LED - GPIO0_15 */ ++ ++ "P9.42", /* out1 - GPIO0_7 (eCAP?) */ ++ "P9.22", /* out2 - GPIO0_2 (eCAP?) */ ++ "P9.21", /* out3 - GPIO0_3 (eCAP?) */ ++ "P9.16", /* out4 - GPIO1_19 (eCAP?) */ ++ ++ "P8.11", /* in1 - GPIO1_13 */ ++ "P8.12", /* in2 - GPIO1_12 */ ++ "P8.14", /* in3 - GPIO0_26 */ ++ "P8.15", /* in4 - GPIO1_15 */ ++ ++ "P9.14", /* servo1 */ ++ ++ "P9.40", /* ain1 (/10) */ ++ "P9.36", /* ain5 (pot) */ ++ ++ /* the hardware IP uses */ ++ "tscadc1", ++ "tscadc5", ++ "ehrpwm1A"; ++ ++ /*----- Start pinmux -----*/ ++ ++ fragment@0 { ++ /* Sets pinmux for relays. */ ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ cbb_relay_relay_pins: pinmux_cbb_relay_relay_pins { ++ pinctrl-single,pins = < ++ 0x07c 0x7 /* gpmc_csn0 - MODE7 (GPIO1_29) */ ++ 0x1a4 0x7 /* mcasp0_fsr - MODE7 (GPIO3_19) */ ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ /* Sets pinmux for general purpose outputs. */ ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ cbb_relay_out_pins: pinmux_cbb_relay_out_pins { ++ pinctrl-single,pins = < ++ 0x164 0x7 /* eCAP0_in_PWM0_out - MODE7 (GPIO0_7) */ ++ 0x150 0x7 /* spi0_sclk - MODE7 (GPIO0_2) */ ++ 0x154 0x7 /* spi0_d0 - MODE7 (GPIO0_3) */ ++ 0x04c 0x7 /* gpmc_a3 - MODE7 (GPIO1_19) */ ++ 0x184 0x7 /* uart1_txd - MODE7 (GPIO0_15) - blue LED */ ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ /* Defines pinmux modes for general purpose inputs. */ ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ cbb_relay_in1_nopull: pinmux_cbb_relay_in1_nopull { ++ pinctrl-single,pins = < ++ 0x034 0x2f /* gpmc_ad13 - rx enabled | nopull | - MODE7 (GPIO1_13) */ ++ >; ++ }; ++ cbb_relay_in1_pullup: pinmux_cbb_relay_in1_pullup { ++ pinctrl-single,pins = < ++ 0x034 0x37 /* gpmc_ad13 - rx enabled | pullup | - MODE7 (GPIO1_13) */ ++ >; ++ }; ++ cbb_relay_in1_pulldown: pinmux_cbb_relay_in1_pulldown { ++ pinctrl-single,pins = < ++ 0x034 0x27 /* gpmc_ad13 - rx enabled | pulldown | - MODE7 (GPIO1_13) */ ++ >; ++ }; ++ ++ cbb_relay_in2_nopull: pinmux_cbb_relay_in2_nopull { ++ pinctrl-single,pins = < ++ 0x030 0x2f /* gpmc_ad12 - rx enabled | nopull | - MODE7 (GPIO1_12) */ ++ >; ++ }; ++ cbb_relay_in2_pullup: pinmux_cbb_relay_in2_pullup { ++ pinctrl-single,pins = < ++ 0x030 0x37 /* gpmc_ad12 - rx enabled | pullup | - MODE7 (GPIO1_12) */ ++ >; ++ }; ++ cbb_relay_in2_pulldown: pinmux_cbb_relay_in2_pulldown { ++ pinctrl-single,pins = < ++ 0x030 0x27 /* gpmc_ad12 - rx enabled | pulldown | - MODE7 (GPIO1_12) */ ++ >; ++ }; ++ ++ cbb_relay_in3_nopull: pinmux_cbb_relay_in3_nopull { ++ pinctrl-single,pins = < ++ 0x028 0x2f /* gpmc_ad10 - rx enabled | nopull | - MODE7 (GPIO0_26) */ ++ >; ++ }; ++ cbb_relay_in3_pullup: pinmux_cbb_relay_in3_pullup { ++ pinctrl-single,pins = < ++ 0x028 0x37 /* gpmc_ad10 - rx enabled | pullup | - MODE7 (GPIO0_26) */ ++ >; ++ }; ++ cbb_relay_in3_pulldown: pinmux_cbb_relay_in3_pulldown { ++ pinctrl-single,pins = < ++ 0x028 0x27 /* gpmc_ad10 - rx enabled | pulldown | - MODE7 (GPIO0_26) */ ++ >; ++ }; ++ ++ cbb_relay_in4_nopull: pinmux_cbb_relay_in4_nopull { ++ pinctrl-single,pins = < ++ 0x03c 0x2f /* gpmc_ad15 - rx enabled | nopull | - MODE7 (GPIO1_15) */ ++ >; ++ }; ++ cbb_relay_in4_pullup: pinmux_cbb_relay_in4_pullup { ++ pinctrl-single,pins = < ++ 0x03c 0x37 /* gpmc_ad15 - rx enabled | pullup | - MODE7 (GPIO1_15) */ ++ >; ++ }; ++ cbb_relay_in4_pulldown: pinmux_cbb_relay_in4_pulldown { ++ pinctrl-single,pins = < ++ 0x03c 0x27 /* gpmc_ad15 - rx enabled | pulldown | - MODE7 (GPIO1_15) */ ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@3 { ++ /* Sets pinmux for servo output. */ ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ cbb_relay_servo_pins: pinmux_cbb_relay_servo_pins { ++ pinctrl-single,pins = < ++ 0x048 0x6 /* gpmc_a2 - MODE 6 (EHRPWM1A) */ ++ >; ++ }; ++ }; ++ }; ++ ++ /*----- End pinmux -----*/ ++ ++ /*----- Start subsystem/module enable -----*/ ++ ++ fragment@4 { ++ /* Enable the enhanced resolution PWM 1 sub-system. */ ++ target = <&epwmss1>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@5 { ++ /* Enable the enhanced resolution PWM 1 module. */ ++ target = <&ehrpwm1>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ /*----- End subsystem/module enable -----*/ ++ ++ /*----- Start ocp driver setup -----*/ ++ ++ fragment@6 { ++ /* Enable pinmux-helper driver for setting input pull configuration. */ ++ target = <&ocp>; /* On-Chip Peripherals */ ++ __overlay__ { ++ CBB-Relay-out-pins { ++ compatible = "bone-pinmux-helper"; /* Use the pinmux helper */ ++ status="okay"; ++ /* Define custom names for indexes in pinctrl array: */ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&cbb_relay_out_pins>; ++ }; ++ }; ++ }; ++ ++ ++ fragment@7 { ++ /* Enable pinmux-helper driver for setting input pull configuration. */ ++ target = <&ocp>; /* On-Chip Peripherals */ ++ __overlay__ { ++ CBB-Relay-in1-pull { ++ compatible = "bone-pinmux-helper"; /* Use the pinmux helper */ ++ status="okay"; ++ /* Define custom names for indexes in pinctrl array: */ ++ pinctrl-names = "default", "pullup", "nopull"; ++ /* Set the elements of the pinctrl array to the pinmux overlays ++ defined above: */ ++ pinctrl-0 = <&cbb_relay_in1_pullup>; ++ pinctrl-1 = <&cbb_relay_in1_pullup>; ++ pinctrl-2 = <&cbb_relay_in1_nopull>; ++ }; ++ CBB-Relay-in2-pull { ++ compatible = "bone-pinmux-helper"; /* Use the pinmux helper */ ++ status="okay"; ++ pinctrl-names = "default", "pullup", "nopull"; ++ pinctrl-0 = <&cbb_relay_in2_pullup>; ++ pinctrl-1 = <&cbb_relay_in2_pullup>; ++ pinctrl-2 = <&cbb_relay_in2_nopull>; ++ }; ++ CBB-Relay-in3-pull { ++ compatible = "bone-pinmux-helper"; /* Use the pinmux helper */ ++ status="okay"; ++ pinctrl-names = "default", "pullup", "nopull"; ++ pinctrl-0 = <&cbb_relay_in3_pullup>; ++ pinctrl-1 = <&cbb_relay_in3_pullup>; ++ pinctrl-2 = <&cbb_relay_in3_nopull>; ++ }; ++ CBB-Relay-in4-pull { ++ compatible = "bone-pinmux-helper"; /* Use the pinmux helper */ ++ status="okay"; ++ pinctrl-names = "default", "pullup", "nopull"; ++ pinctrl-0 = <&cbb_relay_in4_pullup>; ++ pinctrl-1 = <&cbb_relay_in4_pullup>; ++ pinctrl-2 = <&cbb_relay_in4_nopull>; ++ }; ++ }; ++ }; ++ ++ ++ fragment@8 { ++ /* Enable the sysfs kernel driver to control ehrpwm1. */ ++ target = <&ocp>; ++ __overlay__ { ++ CBB-Relay-servo1 { ++ compatible = "pwm_test"; /* Use the pwm_test driver. */ ++ status = "okay"; ++ pwms = <&ehrpwm1 0 20000000 0>; ++ /* ehrpwm1 module, channel 0, 2e7 ns period (50Hz) normally low. */ ++ pwm-names = "Servo1"; /* Friendly name - this doesn't seem to be ++ implemented... */ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&cbb_relay_servo_pins>; ++ enabled = <0>; /* Output disabled on boot. */ ++ duty = <1000000>; /* Initial pulse width = 5e5 ns = 0.5ms. */ ++ }; ++ }; ++ }; ++ ++ fragment@9 { ++ /* Enable ADC driver for analog inputs. */ ++ target = <&ocp>; ++ __overlay__ { ++ /* avoid stupid warning */ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ tscadc { ++ compatible = "ti,ti-tscadc"; ++ reg = <0x44e0d000 0x1000>; ++ ++ interrupt-parent = <&intc>; ++ interrupts = <16>; ++ ti,hwmods = "adc_tsc"; ++ status = "okay"; ++ ++ adc { ++ ti,adc-channels = <0 1 2 3 4 5 6 7>; ++ }; ++ }; ++ CBB-Relay-ain { ++ compatible = "bone-iio-helper"; ++ vsense-name = "AIN1", "AIN5"; ++ /* Set scale for voltages - values will be in mV (the CBB-Relay ++ has a /10 divider on AIN1): */ ++ vsense-scale = <1000 100>; ++ status = "okay"; ++ }; ++ }; ++ ++ /*----- End ocp driver setup -----*/ ++ ++ }; ++}; +-- +1.9.0 + diff --git a/patches/capes/0038-Firmware-Update-Replicape-device-tree-overlay-files-.patch b/patches/capes/0038-Firmware-Update-Replicape-device-tree-overlay-files-.patch new file mode 100644 index 00000000..13cc21d3 --- /dev/null +++ b/patches/capes/0038-Firmware-Update-Replicape-device-tree-overlay-files-.patch @@ -0,0 +1,2015 @@ +From b4aa8d3ce86117f3b3c0a62e89de56dd203453cd Mon Sep 17 00:00:00 2001 +From: Charles Steinkuehler +Date: Tue, 13 May 2014 21:13:00 +0000 +Subject: [PATCH 38/40] Firmware: Update Replicape device tree overlay files + Files from: https://bitbucket.org/intelligentagent/replicape + +Committed-by: Charles Steinkuehler +--- + firmware/Makefile | 7 +- + firmware/capes/BB-BONE-REPLICAP-00A1.dts | 233 ++++++++++++++++++++++ + firmware/capes/BB-BONE-REPLICAP-00A2.dts | 285 +++++++++++++++++++++++++++ + firmware/capes/BB-BONE-REPLICAP-00A3.dts | 291 ++++++++++++++++++++++++++++ + firmware/capes/BB-BONE-REPLICAP-00A4.dts | 288 +++++++++++++++++++++++++++ + firmware/capes/BB-BONE-REPLICAP-0A4A.dts | 288 +++++++++++++++++++++++++++ + firmware/capes/cape-bone-replicape-00A2.dts | 251 ------------------------ + firmware/capes/cape-bone-replicape-00A3.dts | 291 ---------------------------- + 8 files changed, 1390 insertions(+), 544 deletions(-) + create mode 100644 firmware/capes/BB-BONE-REPLICAP-00A1.dts + create mode 100644 firmware/capes/BB-BONE-REPLICAP-00A2.dts + create mode 100644 firmware/capes/BB-BONE-REPLICAP-00A3.dts + create mode 100644 firmware/capes/BB-BONE-REPLICAP-00A4.dts + create mode 100644 firmware/capes/BB-BONE-REPLICAP-0A4A.dts + delete mode 100644 firmware/capes/cape-bone-replicape-00A2.dts + delete mode 100644 firmware/capes/cape-bone-replicape-00A3.dts + +diff --git a/firmware/Makefile b/firmware/Makefile +index 42174f7..95ab342 100644 +--- a/firmware/Makefile ++++ b/firmware/Makefile +@@ -198,8 +198,11 @@ fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \ + BB-BONE-BACONE-00A0.dtbo \ + BB-BONE-BACONE2-00A0.dtbo \ + DNIL-AMPCAPE-1-00R1.dtbo \ +- cape-bone-replicape-00A2.dtbo \ +- cape-bone-replicape-00A3.dtbo \ ++ BB-BONE-REPLICAP-00A1.dtbo \ ++ BB-BONE-REPLICAP-00A2.dtbo \ ++ BB-BONE-REPLICAP-00A3.dtbo \ ++ BB-BONE-REPLICAP-00A4.dtbo \ ++ BB-BONE-REPLICAP-0A4A.dtbo \ + cape-univ-emmc-00A0.dtbo \ + cape-universal-00A0.dtbo \ + cape-universaln-00A0.dtbo \ +diff --git a/firmware/capes/BB-BONE-REPLICAP-00A1.dts b/firmware/capes/BB-BONE-REPLICAP-00A1.dts +new file mode 100644 +index 0000000..4f2342e +--- /dev/null ++++ b/firmware/capes/BB-BONE-REPLICAP-00A1.dts +@@ -0,0 +1,233 @@ ++/* ++ * Copyright (C) 2013 Intelligent Agent AS ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "ti,beaglebone", "ti,beaglebone-black"; ++ ++ /* identification */ ++ part-number = "BB-BONE-REPLICAP"; ++ version = "00A1"; ++ ++ fragment@0 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ // From Cameon.net ++ // Bit 5: 1 - Input, 0 - Output ++ // Bit 4: 1 - Pull up, 0 - Pull down ++ // Bit 3: 1 - Pull disabled, 0 - Pull enabled ++ // Bit 2: - Mode ++ // Bit 1: - Mode ++ // Bit 0: - Mode ++ bone_replicape_spi1_pins: pinmux_replicape_spi1_pins { ++ pinctrl-single,pins = < ++ 0x190 0x13 /* P9_31 = mcasp0_aclkx.spi1_sclk , OUTPUT_PULLUP | MODE3 */ ++ 0x194 0x33 /* P9_29 = mcasp0_fsx.spi1_d0 , INPUT_PULLUP | MODE3 */ ++ 0x198 0x13 /* P9_30 = mcasp0_axr0.spi1_d1 , OUTPUT_PULLUP | MODE3 */ ++ 0x19c 0x13 /* P9_28 = mcasp0_ahclkr.spi1_cs0 , OUTPUT_PULLUP | MODE3 */ ++ 0x164 0x12 /* P9_42 = GPIO0_7 = eCAP0_in_PWM0_out.gpio0[7] , OUTPUT_PULLUP | MODE2 */ ++ >; ++ }; ++ pwm_mosfet_ext1_pins: pinmux_pwm_mosfet_ext1_pins { ++ pinctrl-single,pins = < ++ 0x024 0x4 /* P8_13 = gpmc_ad9 = ehrpwm2B = Heater_ext1 | MODE 4 */ ++ >; ++ }; ++ pwm_mosfet_ext2_pins: pinmux_pwm_mosfet_ext2_pins { ++ pinctrl-single,pins = < ++ 0x020 0x4 /* P8_19 = gpmc_ad8 = ehrpwm2A = Heater_ext2 | MODE 4 */ ++ >; ++ }; ++ pruicss_stepper_pins: pinmux_pruicss_stepper_pins{ ++ pinctrl-single,pins = < ++ 0x018 0x07 /* P8_3 = DIR_EXT_2 = GPIO1_6 gpmc_ad6.gpio1[6] */ ++ 0x01C 0x07 /* P8_4 = DIR_EXT_1 = GPIO1_7 gpmc_ad7.gpio1[7] */ ++ 0x008 0x07 /* P8_5 = DIR_Z = GPIO1_2 gpmc_ad2.gpio1[2] */ ++ 0x034 0x07 /* P8_11 = DIR_X = GPIO1_13 gpmc_ad13.gpio1[13] */ ++ 0x030 0x07 /* P8_12 = STEP_X = GPIO1_12 gpmc_ad12.gpio1[12] */ ++ 0x038 0x07 /* P8_16 = STEP_EXT_2 = GPIO1_14 gpmc_ad14.gpio1[14] */ ++ 0x084 0x07 /* P8_20 = STEP_Y = GPIO1_31 gpmc_csn2.gpio1[31] */ ++ 0x080 0x07 /* P8_21 = DIR_Y = GPIO1_30 gpmc_csn1.gpio1[30] */ ++ 0x004 0x07 /* P8_24 = STEP_Z = GPIO1_1 gpmc_ad1 .gpio1[1] */ ++ 0x1AC 0x07 /* P9_25 = STEP_EXT_1 = GPIO3_21 mcasp0_ahclkx.gpio3[21] */ ++ >; ++ }; ++ ++ pwm_mosfet_hbp_pins: pinmux_pwm_mosfet_hbp_pins { ++ pinctrl-single,pins = < ++ 0x150 0x3 /* P9_14 = spi0_sclk = ehrpwm0A = Heater_HBP | MODE 3 */ ++ >; ++ }; ++ ++ pruicss_fault_pins: pinmux_pruicss_fault_pins{ ++ pinctrl-single,pins = < ++ 0x094 0x37 // P8_8 = FAULT_EXT_2 = GPIO2_2 gpmc_oen_ren.gpio2[3] ++ 0x098 0x37 // P8_10 = FAULT_X = GPIO2_4 gpmc_wen.gpio2[4] ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&spi1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&bone_replicape_spi1_pins>; ++ cs-gpios = <&gpio4 17 0>, <&gpio1 7 0>; ++ ++ stepper_control{ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "spidev"; ++ reg = <0>; ++ spi-max-frequency = <16000000>; ++ spi-cpha; // Stepper control has mode 1 (CPOL = 0, CPHA = 1) ++ }; ++ ++ stepper_current{ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "spidev"; ++ reg = <1>; ++ spi-max-frequency = <16000000>; ++ // Stepper current has mode 0 (CPOL = 0, CPHA = 0) ++ }; ++ }; ++ }; ++ fragment@2 { ++ target = <&epwmss2>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&ehrpwm2>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@4 { ++ target = <&epwmss0>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@5 { ++ target = <&ehrpwm0>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@6{ ++ target = <&pruss>; ++ __overlay__{ ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pruicss_stepper_pins>; ++ ++ stepper_x{ ++ pin-names = "Replic:pru-step_x", "Replic:pru-dir_x"; ++ gpios = <&gpio2 12 0 ++ &gpio2 13 0>; ++ }; ++ stepper_y{ ++ pin-names = "Replic:pru-step_y", "Replic:pru-dir_y"; ++ gpios =<&gpio2 31 0 ++ &gpio2 30 0>; ++ }; ++ stepper_z{ ++ pin-names = "Replic:pru-step_z", "Replic:pru-dir_z"; ++ gpios = <&gpio2 1 0 ++ &gpio2 2 0>; ++ }; ++ stepper_ext_1{ ++ pin-names = "Replic:pru-step_ext_1", "Replic:pru-dir_ext_1"; ++ gpios = <&gpio4 21 0 ++ &gpio2 7 0>; ++ }; ++ stepper_ext_2{ ++ pin-names = "Replic:pru-step_ext_2", "Replic:pru-dir_ext_2"; ++ gpios = <&gpio2 14 0 ++ &gpio2 6 0>; ++ }; ++ }; ++ }; ++ ++ fragment@7 { ++ target = <&ocp>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ mosfet_ext1 { ++ compatible = "pwm_test"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pwm_mosfet_ext1_pins>; ++ pwms = <&ehrpwm2 1 500000 1>; ++ pwm-names = "Mosfet_Ext_1"; ++ enabled = <1>; ++ polarity = <1>; // 0 = normal, 1 = inverse ++ duty = <0>; ++ status = "okay"; ++ }; ++ mosfet_ext2 { ++ compatible = "pwm_test"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pwm_mosfet_ext2_pins>; ++ pwms = <&ehrpwm2 0 500000 1>; ++ pwm-names = "Mosfet_Ext_2"; ++ enabled = <1>; ++ duty = <0>; ++ status = "okay"; ++ }; ++ mosfet_hbp { ++ compatible = "pwm_test"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pwm_mosfet_hbp_pins>; ++ pwms = <&ehrpwm0 0 500000 1>; ++ pwm-names = "Mosfet_HBP"; ++ enabled = <1>; ++ duty = <0>; ++ status = "okay"; ++ }; ++ ++ tscadc { ++ compatible = "ti,ti-tscadc"; ++ reg = <0x44e0d000 0x1000>; ++ ++ interrupt-parent = <&intc>; ++ interrupts = <16>; ++ ti,hwmods = "adc_tsc"; ++ status = "okay"; ++ ++ tsc { ++ ti,wires = <4>; ++ }; ++ adc { ++ ti,adc-channels = <4>; ++ }; ++ }; ++ ++ thermistors{ ++ compatible = "bone-iio-helper"; ++ vsense-name = "AIN4", "AIN5", "AIN6", "AIN7"; ++ vsense-scale = <100 100 100 100 >; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++}; +diff --git a/firmware/capes/BB-BONE-REPLICAP-00A2.dts b/firmware/capes/BB-BONE-REPLICAP-00A2.dts +new file mode 100644 +index 0000000..84d33ed +--- /dev/null ++++ b/firmware/capes/BB-BONE-REPLICAP-00A2.dts +@@ -0,0 +1,285 @@ ++/* ++ * Copyright (C) 2013 Intelligent Agent AS ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "ti,beaglebone", "ti,beaglebone-black"; ++ ++ /* identification */ ++ part-number = "BB-BONE-REPLICAP"; ++ version = "00A2"; ++ ++ /* state the resources this cape uses */ ++ exclusive-use = ++ /* the pin header P8 uses */ ++ "P8.16", /* (3) DIR_EXT_2 */ ++ "P8.15", /* (4) DIR_EXT_1 */ ++ "P8.14", /* (5) DIR_Z */ ++ "P8.17", /* (6) STEP_X */ ++ "P8.7", /* END_STOP_Y1 */ ++ "P8.8", /* FAULT_EXT_2 */ ++ "P8.9", /* FAULT_Y */ ++ "P8.10", /* FAULT_x */ ++ "P8.18", /* FAULT_EXT_1 */ ++ "P8.11", /* (22) STEP_EXT_2 */ ++ "P8.12", /* (23) STEP_Y */ ++ "P8.13", /* (24) STEP_Z */ ++ "P8.19", /* (25) DIR_Y */ ++ "P8.26", /* DIR_X */ ++ /* the pin header P9 uses */ ++ "P9.11", /* END_STOP_Z1 */ ++ "P9.12", /* STEP_EXT_1 */ ++ "P9.13", /* END_STOP_X2 */ ++ "P9.18", /* END_STOP_Z2 */ ++ "P9.24", /* FAULT_Z */ ++ "P9.25", /* END_STOP_Y2 */ ++ "P9.26", /* END_STOP_X1 */ ++ "P9.28", /* SPI1_CS0 */ ++ "P9.29", /* SPI1_MISO */ ++ "P9.30", /* SPI1_MOSI */ ++ "P9.31", /* SPI1_SCLK */ ++ "P9.33", /* AIN4 */ ++ "P9.35", /* AIN6 */ ++ "P9.36", /* AIN5 */ ++ "P9.42", /* SPI1_CS1 */ ++ /* Hardware IP cores in use */ ++ "spi1", ++ "pruss"; ++ ++ fragment@0 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ bone_replicape_spi1_pins: pinmux_replicape_spi1_pins { ++ pinctrl-single,pins = < ++ 0x190 0x13 /* P9_31 = mcasp0_aclkx.spi1_sclk , OUTPUT_PULLUP | MODE3 */ ++ 0x194 0x33 /* P9_29 = mcasp0_fsx.spi1_d0 , INPUT_PULLUP | MODE3 */ ++ 0x198 0x13 /* P9_30 = mcasp0_axr0.spi1_d1 , OUTPUT_PULLUP | MODE3 */ ++ 0x19c 0x13 /* P9_28 = mcasp0_ahclkr.spi1_cs0 , OUTPUT_PULLUP | MODE3 */ ++ 0x164 0x12 /* P9_42 = GPIO0_7 = eCAP0_in_PWM0_out.gpio0[7] , OUTPUT_PULLUP | MODE2 */ ++ >; ++ }; ++ pruicss_stepper_pins: pinmux_pruicss_stepper_pins{ ++ pinctrl-single,pins = < ++ 0x038 0x07 // P8_16 (3) = DIR_EXT_2 = GPIO1_14 ++ 0x03C 0x07 // P8_15 (4) = DIR_EXT_1 = GPIO1_15 ++ 0x028 0x07 // P8_14 (5) = DIR_Z = GPIO0_26 ++ 0x02C 0x07 // P8_17 (6) = STEP_X = GPIO0_27 ++ 0x034 0x07 // P8_11 (22) = step_ext_2 = GPIO1_13 ++ 0x030 0x07 // P8_12 (23) = Step_y = GPIO1_12 ++ 0x024 0x07 // P8_13 (24) = Step_z = GPIO0_23 ++ 0x020 0x07 // P8_19 (25) = Dir_y = GPIO0_22 ++ 0x07C 0x07 // P8_26 = Dir_x = GPIO1_29 ++ 0x078 0x07 // P9_12 = step ext 1 = GPIO1_28 ++ >; ++ }; ++ ++ stepper_fault_pins: pinmux_stepper_fault_pins{ ++ pinctrl-single,pins = < ++ 0x094 0x37 // P8_8 = Fault Ext 2 = GPIO2_2 gpmc_oen_ren.gpio2[3] ++ 0x09C 0x37 // P8_9 = FAYLT Y = GPIO2_5 ++ 0x098 0x37 // P8_10 = FAULT X = GPIO2_4 gpmc_wen.gpio2[4] ++ 0x08C 0x37 // P8_18 = Fault_ext 1 = GPIO2_1 ++ 0x184 0x37 // P9_24 = Fault Z = GPIO0_15 ++ >; ++ }; ++ ++ end_stop_pins: pinmux_end_stop_pins{ ++ pinctrl-single,pins = < ++ 0x090 0x37 // P8_7 = End stop X1 = GPIO2_2 ++ 0x070 0x37 // P9_11 = End stop Y1 = GPIO0_30 ++ 0x074 0x37 // P9_13 = End stop Z1 = GPIO0_31 ++ 0x158 0x37 // P9_18 = End stop Z2 = GPIO0_4 ++ 0x1AC 0x37 // P9_25 = End stop Y2 = GPIO3_21 ++ 0x180 0x37 // P9_26 = End stop X2 = GPIO0_14 ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&spi1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&bone_replicape_spi1_pins>; ++ cs-gpios = <&gpio4 17 0>, <&gpio1 7 0>; ++ ++ stepper_control{ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "spidev"; ++ reg = <0>; ++ spi-max-frequency = <16000000>; ++ }; ++ ++ stepper_current{ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "spidev"; ++ reg = <1>; ++ spi-max-frequency = <16000000>; ++ }; ++ }; ++ }; ++ ++ fragment@2{ ++ target = <&pruss>; ++ __overlay__{ ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pruicss_stepper_pins>; ++ ++ stepper_x{ ++ pin-names = "Replic:pru-step_x", "Replic:pru-dir_x"; ++ gpios = <&gpio1 27 0 ++ &gpio2 29 0>; ++ }; ++ stepper_y{ ++ pin-names = "Replic:pru-step_y", "Replic:pru-dir_y"; ++ gpios =<&gpio2 12 0 ++ &gpio1 22 0>; ++ }; ++ stepper_z{ ++ pin-names = "Replic:pru-step_z", "Replic:pru-dir_z"; ++ gpios = <&gpio1 23 0 ++ &gpio1 26 0>; ++ }; ++ stepper_ext_1{ ++ pin-names = "Replic:pru-step_ext_1", "Replic:pru-dir_ext_1"; ++ gpios = <&gpio2 28 0 ++ &gpio2 15 0>; ++ }; ++ stepper_ext_2{ ++ pin-names = "Replic:pru-step_ext_2", "Replic:pru-dir_ext_2"; ++ gpios = <&gpio2 13 0 ++ &gpio2 14 0>; ++ }; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&ocp>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ tscadc { ++ compatible = "ti,ti-tscadc"; ++ reg = <0x44e0d000 0x1000>; ++ ++ interrupt-parent = <&intc>; ++ interrupts = <16>; ++ ti,hwmods = "adc_tsc"; ++ status = "okay"; ++ ++ tsc { ++ ti,wires = <4>; ++ }; ++ adc { ++ ti,adc-channels = <4>; ++ }; ++ }; ++ ++ thermistors{ ++ compatible = "bone-iio-helper"; ++ vsense-name = "AIN4", "AIN5", "AIN6", "AIN7"; ++ vsense-scale = <100 100 100 100 >; ++ status = "okay"; ++ }; ++ gpio_keys { ++ compatible = "gpio-keys"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&end_stop_pins>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ switch_x1 { ++ label = "End-stop-X1"; ++ debounce_interval = <50>; ++ linux,code = <1>; ++ gpios = <&gpio3 2 0x5>; ++ gpio-key,wakeup; ++ }; ++ switch_x2 { ++ label = "End-stop-X2"; ++ debounce_interval = <50>; ++ linux,code = <2>; ++ gpios = <&gpio1 14 0x5>; ++ gpio-key,wakeup; ++ }; ++ switch_y1 { ++ label = "End-stop-Y1"; ++ debounce_interval = <50>; ++ linux,code = <3>; ++ gpios = <&gpio1 30 0x5>; ++ gpio-key,wakeup; ++ }; ++ switch_y2 { ++ label = "End-stop-Y2"; ++ debounce_interval = <50>; ++ linux,code = <4>; ++ gpios = <&gpio4 21 0x5>; ++ gpio-key,wakeup; ++ }; ++ switch_z1 { ++ label = "End-stop-Z1"; ++ debounce_interval = <50>; ++ linux,code = <5>; ++ gpios = <&gpio1 31 0x5>; ++ gpio-key,wakeup; ++ }; ++ switch_z2 { ++ label = "End-stop-Z2"; ++ debounce_interval = <50>; ++ linux,code = <6>; ++ gpios = <&gpio1 4 0x5>; ++ gpio-key,wakeup; ++ }; ++ fault_x { ++ label = "Fault_X"; ++ debounce_interval = <50>; ++ linux,code = <7>; ++ gpios = <&gpio3 4 0x5>; ++ gpio-key,wakeup; ++ }; ++ fault_y { ++ label = "Fault_Y"; ++ debounce_interval = <50>; ++ linux,code = <8>; ++ gpios = <&gpio3 5 0x5>; ++ gpio-key,wakeup; ++ }; ++ fault_z { ++ label = "Fault_Z"; ++ debounce_interval = <50>; ++ linux,code = <9>; ++ gpios = <&gpio1 15 0x5>; ++ gpio-key,wakeup; ++ }; ++ fault_ext1 { ++ label = "Fault_Ext_1"; ++ debounce_interval = <50>; ++ linux,code = <10>; ++ gpios = <&gpio3 1 0x5>; ++ gpio-key,wakeup; ++ }; ++ fault_ext2 { ++ label = "Fault_Ext_2"; ++ debounce_interval = <50>; ++ linux,code = <11>; ++ gpios = <&gpio3 2 0x5>; ++ gpio-key,wakeup; ++ }; ++ ++ }; ++ }; ++ }; ++}; +diff --git a/firmware/capes/BB-BONE-REPLICAP-00A3.dts b/firmware/capes/BB-BONE-REPLICAP-00A3.dts +new file mode 100644 +index 0000000..8cb299f +--- /dev/null ++++ b/firmware/capes/BB-BONE-REPLICAP-00A3.dts +@@ -0,0 +1,291 @@ ++/* ++ * Copyright (C) 2013 Intelligent Agent AS ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "ti,beaglebone", "ti,beaglebone-black"; ++ ++ /* identification */ ++ part-number = "BB-BONE-REPLICAP"; ++ version = "00A3"; ++ ++ /* state the resources this cape uses */ ++ exclusive-use = ++ /* the pin header P8 uses */ ++ "P8.16", /* (3) DIR_EXT_2 */ ++ "P8.15", /* (4) DIR_EXT_1 */ ++ "P8.14", /* (5) DIR_Z */ ++ "P8.17", /* (6) STEP_X */ ++ "P8.7", /* END_STOP_Y1 */ ++ "P8.8", /* FAULT_EXT_2 */ ++ "P8.9", /* FAULT_Y */ ++ "P8.10", /* FAULT_x */ ++ "P8.18", /* FAULT_EXT_1 */ ++ "P8.11", /* (22) STEP_EXT_2 */ ++ "P8.12", /* (23) STEP_Y */ ++ "P8.13", /* (24) STEP_Z */ ++ "P8.19", /* (25) DIR_Y */ ++ "P8.26", /* DIR_X */ ++ /* the pin header P9 uses */ ++ "P9.11", /* END_STOP_Z1 */ ++ "P9.12", /* STEP_EXT_1 */ ++ "P9.13", /* END_STOP_X2 */ ++ "P9.18", /* END_STOP_Z2 */ ++ "P9.22", /* Dallas 1W */ ++ "P9.24", /* FAULT_Z */ ++ "P9.25", /* END_STOP_Y2 */ ++ "P9.26", /* END_STOP_X1 */ ++ "P9.28", /* SPI1_CS0 */ ++ "P9.29", /* SPI1_MISO */ ++ "P9.30", /* SPI1_MOSI */ ++ "P9.31", /* SPI1_SCLK */ ++ "P9.33", /* AIN4 */ ++ "P9.35", /* AIN6 */ ++ "P9.36", /* AIN5 */ ++ "P9.42", /* SPI1_CS1 */ ++ /* Hardware IP cores in use */ ++ "spi1", ++ "pruss"; ++ ++ fragment@0 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ bone_replicape_spi1_pins: pinmux_replicape_spi1_pins { ++ pinctrl-single,pins = < ++ 0x190 0x13 /* P9_31 = mcasp0_aclkx.spi1_sclk , OUTPUT_PULLUP | MODE3 */ ++ 0x194 0x33 /* P9_29 = mcasp0_fsx.spi1_d0 , INPUT_PULLUP | MODE3 */ ++ 0x198 0x13 /* P9_30 = mcasp0_axr0.spi1_d1 , OUTPUT_PULLUP | MODE3 */ ++ 0x19c 0x13 /* P9_28 = mcasp0_ahclkr.spi1_cs0 , OUTPUT_PULLUP | MODE3 */ ++ 0x164 0x12 /* P9_42 = GPIO0_7 = eCAP0_in_PWM0_out.gpio0[7] , OUTPUT_PULLUP | MODE2 */ ++ >; ++ }; ++ pruicss_stepper_pins: pinmux_pruicss_stepper_pins{ ++ pinctrl-single,pins = < ++ 0x038 0x07 // P8_16 (3) = DIR_EXT_2 = GPIO1_14 ++ 0x03C 0x07 // P8_15 (4) = DIR_EXT_1 = GPIO1_15 ++ 0x028 0x07 // P8_14 (5) = DIR_Z = GPIO0_26 ++ 0x02C 0x07 // P8_17 (6) = STEP_X = GPIO0_27 ++ 0x034 0x07 // P8_11 (22) = step_ext_2 = GPIO1_13 ++ 0x030 0x07 // P8_12 (23) = Step_y = GPIO1_12 ++ 0x024 0x07 // P8_13 (24) = Step_z = GPIO0_23 ++ 0x020 0x07 // P8_19 (25) = Dir_y = GPIO0_22 ++ 0x07C 0x07 // P8_26 = Dir_x = GPIO1_29 ++ 0x078 0x07 // P9_12 = step ext 1 = GPIO1_28 ++ >; ++ }; ++ ++ stepper_fault_pins: pinmux_stepper_fault_pins{ ++ pinctrl-single,pins = < ++ 0x094 0x37 // P8_8 = Fault Ext 2 = GPIO2_3 gpmc_oen_ren.gpio2[3] ++ 0x09C 0x37 // P8_9 = FAYLT Y = GPIO2_5 ++ 0x098 0x37 // P8_10 = FAULT X = GPIO2_4 gpmc_wen.gpio2[4] ++ 0x08C 0x37 // P8_18 = Fault_ext 1 = GPIO2_1 ++ 0x184 0x37 // P9_24 = Fault Z = GPIO0_15 ++ >; ++ }; ++ ++ end_stop_pins: pinmux_end_stop_pins{ ++ pinctrl-single,pins = < ++ 0x090 0x37 // P8_7 = End stop X1 = GPIO2_2 ++ 0x070 0x37 // P9_11 = End stop Y1 = GPIO0_30 ++ 0x074 0x37 // P9_13 = End stop Z1 = GPIO0_31 ++ 0x158 0x37 // P9_18 = End stop Z2 = GPIO0_4 ++ 0x1AC 0x37 // P9_25 = End stop Y2 = GPIO3_21 ++ 0x180 0x37 // P9_26 = End stop X2 = GPIO0_14 ++ >; ++ }; ++ dallas_w1_pins: pinmux_dallas_w1_pins { ++ pinctrl-single,pins = < ++ 0x150 0x37 // Dallas 1W ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&spi1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&bone_replicape_spi1_pins>; ++ cs-gpios = <&gpio4 17 0>, <&gpio1 7 0>; ++ ++ stepper_control{ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "spidev"; ++ reg = <0>; ++ spi-max-frequency = <16000000>; ++ spi-cpha; // Stepper control has mode 1 (CPOL = 0, CPHA = 1) ++ }; ++ ++ stepper_current{ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "spidev"; ++ reg = <1>; ++ spi-max-frequency = <16000000>; ++ // Stepper current has mode 0 (CPOL = 0, CPHA = 0) ++ }; ++ }; ++ }; ++ ++ fragment@2{ ++ target = <&pruss>; ++ __overlay__{ ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pruicss_stepper_pins>; ++ ++ stepper_x{ ++ pin-names = "Replic:pru-step_x", "Replic:pru-dir_x"; ++ gpios = <&gpio1 27 0 ++ &gpio2 29 0>; ++ }; ++ stepper_y{ ++ pin-names = "Replic:pru-step_y", "Replic:pru-dir_y"; ++ gpios =<&gpio2 12 0 ++ &gpio1 22 0>; ++ }; ++ stepper_z{ ++ pin-names = "Replic:pru-step_z", "Replic:pru-dir_z"; ++ gpios = <&gpio1 23 0 ++ &gpio1 26 0>; ++ }; ++ stepper_ext_1{ ++ pin-names = "Replic:pru-step_ext_1", "Replic:pru-dir_ext_1"; ++ gpios = <&gpio2 28 0 ++ &gpio2 15 0>; ++ }; ++ stepper_ext_2{ ++ pin-names = "Replic:pru-step_ext_2", "Replic:pru-dir_ext_2"; ++ gpios = <&gpio2 13 0 ++ &gpio2 14 0>; ++ }; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&ocp>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ tscadc { ++ compatible = "ti,ti-tscadc"; ++ reg = <0x44e0d000 0x1000>; ++ ++ interrupt-parent = <&intc>; ++ interrupts = <16>; ++ ti,hwmods = "adc_tsc"; ++ status = "okay"; ++ ++ adc { ++ ti,adc-channels = <4 5 6 7>; ++ }; ++ }; ++ ++ gpio_keys { ++ compatible = "gpio-keys"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&end_stop_pins>; ++ pinctrl-1 = <&stepper_fault_pins>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ switch_x1 { ++ label = "End-stop-X1"; ++ debounce_interval = <50>; ++ linux,code = <1>; ++ gpios = <&gpio3 2 0x5>; ++ gpio-key,wakeup; ++ }; ++ switch_x2 { ++ label = "End-stop-X2"; ++ debounce_interval = <50>; ++ linux,code = <2>; ++ gpios = <&gpio1 14 0x5>; ++ gpio-key,wakeup; ++ }; ++ switch_y1 { ++ label = "End-stop-Y1"; ++ debounce_interval = <50>; ++ linux,code = <3>; ++ gpios = <&gpio1 30 0x5>; ++ gpio-key,wakeup; ++ }; ++ switch_y2 { ++ label = "End-stop-Y2"; ++ debounce_interval = <50>; ++ linux,code = <4>; ++ gpios = <&gpio4 21 0x5>; ++ gpio-key,wakeup; ++ }; ++ switch_z1 { ++ label = "End-stop-Z1"; ++ debounce_interval = <50>; ++ linux,code = <5>; ++ gpios = <&gpio1 31 0x5>; ++ gpio-key,wakeup; ++ }; ++ switch_z2 { ++ label = "End-stop-Z2"; ++ debounce_interval = <50>; ++ linux,code = <6>; ++ gpios = <&gpio1 4 0x5>; ++ gpio-key,wakeup; ++ }; ++ fault_x { ++ label = "Fault-X"; ++ debounce_interval = <50>; ++ linux,code = <7>; ++ gpios = <&gpio3 4 0x5>; ++ gpio-key,wakeup; ++ }; ++ fault_y { ++ label = "Fault-Y"; ++ debounce_interval = <50>; ++ linux,code = <8>; ++ gpios = <&gpio3 5 0x5>; ++ gpio-key,wakeup; ++ }; ++ fault_z { ++ label = "Fault-Z"; ++ debounce_interval = <50>; ++ linux,code = <9>; ++ gpios = <&gpio1 15 0x5>; ++ gpio-key,wakeup; ++ }; ++ fault_ext_1 { ++ label = "Fault-Ext-1"; ++ debounce_interval = <50>; ++ linux,code = <10>; ++ gpios = <&gpio3 1 0x5>; ++ gpio-key,wakeup; ++ }; ++ fault_ext_2 { ++ label = "Fault-Ext-2"; ++ debounce_interval = <50>; ++ linux,code = <11>; ++ gpios = <&gpio3 3 0x5>; ++ gpio-key,wakeup; ++ }; ++ }; ++ onewire@0 { ++ compatible = "w1-gpio"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&dallas_w1_pins>; ++ status = "okay"; ++ gpios = <&gpio1 2 0>; ++ }; ++ }; ++ }; ++}; +diff --git a/firmware/capes/BB-BONE-REPLICAP-00A4.dts b/firmware/capes/BB-BONE-REPLICAP-00A4.dts +new file mode 100644 +index 0000000..1d07e46 +--- /dev/null ++++ b/firmware/capes/BB-BONE-REPLICAP-00A4.dts +@@ -0,0 +1,288 @@ ++/* ++ * Copyright (C) 2013 Intelligent Agent AS ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "ti,beaglebone", "ti,beaglebone-black"; ++ ++ /* identification */ ++ part-number = "BB-BONE-REPLICAP"; ++ version = "00A4"; ++ ++ /* state the resources this cape uses */ ++ exclusive-use = ++ /* the pin header P8 uses */ ++ "P8.8", /* FAULT_EXT_2 */ ++ "P8.9", /* FAULT_Y */ ++ "P8.10", /* FAULT_X */ ++ "P8.11", /* STEP_EXT_2 */ ++ "P8.12", /* STEP_Y */ ++ "P8.13", /* STEP_Z */ ++ "P8.14", /* DIR_Z */ ++ "P8.15", /* DIR_EXT_1 */ ++ "P8.16", /* DIR_EXT_2 */ ++ "P8.17", /* STEP_X */ ++ "P8.18", /* FAULT_EXT_1 */ ++ "P8.19", /* DIR_Y */ ++ "P8.26", /* DIR_X */ ++ /* the pin header P9 uses */ ++ "P9.11", /* END_STOP_X2 */ ++ "P9.12", /* STEP_EXT_1 */ ++ "P9.13", /* END_STOP_Z1 */ ++ "P9.16", /* END_STOP_Y2 */ ++ "P9.18", /* END_STOP_Z2 */ ++ "P9.22", /* Dallas 1W */ ++ "P9.23", /* END_STOP_Y1 */ ++ "P9.24", /* FAULT_Z */ ++ "P9.25", /* END_STOP_X1 */ ++ "P9.28", /* SPI1_CS0 */ ++ "P9.29", /* SPI1_MISO */ ++ "P9.30", /* SPI1_MOSI */ ++ "P9.31", /* SPI1_SCLK */ ++ "P9.33", /* AIN4 */ ++ "P9.35", /* AIN6 */ ++ "P9.36", /* AIN5 */ ++ "P9.42"; /* SPI1_CS1 */ ++ ++ fragment@0 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ bone_replicape_spi1_pins: pinmux_replicape_spi1_pins { ++ pinctrl-single,pins = < ++ 0x190 0x13 /* P9_31 = mcasp0_aclkx.spi1_sclk , OUTPUT_PULLUP | MODE3 */ ++ 0x194 0x33 /* P9_29 = mcasp0_fsx.spi1_d0 , INPUT_PULLUP | MODE3 */ ++ 0x198 0x13 /* P9_30 = mcasp0_axr0.spi1_d1 , OUTPUT_PULLUP | MODE3 */ ++ 0x19c 0x13 /* P9_28 = mcasp0_ahclkr.spi1_cs0 , OUTPUT_PULLUP | MODE3 */ ++ 0x164 0x12 /* P9_42 = GPIO0_7 = eCAP0_in_PWM0_out.gpio0[7] , OUTPUT_PULLUP | MODE2 */ ++ >; ++ }; ++ pruicss_stepper_pins: pinmux_pruicss_stepper_pins{ ++ pinctrl-single,pins = < ++ 0x038 0x07 // P8_16 (3) = DIR_EXT_2 = GPIO1_14 ++ 0x03C 0x07 // P8_15 (4) = DIR_EXT_1 = GPIO1_15 ++ 0x028 0x07 // P8_14 (5) = DIR_Z = GPIO0_26 ++ 0x02C 0x07 // P8_17 (6) = STEP_X = GPIO0_27 ++ 0x034 0x07 // P8_11 (22) = step_ext_2 = GPIO1_13 ++ 0x030 0x07 // P8_12 (23) = Step_y = GPIO1_12 ++ 0x024 0x07 // P8_13 (24) = Step_z = GPIO0_23 ++ 0x020 0x07 // P8_19 (25) = Dir_y = GPIO0_22 ++ 0x07C 0x07 // P8_26 = Dir_x = GPIO1_29 ++ 0x078 0x07 // P9_12 = step ext 1 = GPIO1_28 ++ >; ++ }; ++ ++ stepper_fault_pins: pinmux_stepper_fault_pins{ ++ pinctrl-single,pins = < ++ 0x094 0x37 // P8_8 = Fault Ext 2 = GPIO2_3 gpmc_oen_ren.gpio2[3] ++ 0x09C 0x37 // P8_9 = FAYLT Y = GPIO2_5 ++ 0x098 0x37 // P8_10 = FAULT X = GPIO2_4 gpmc_wen.gpio2[4] ++ 0x08C 0x37 // P8_18 = Fault_ext 1 = GPIO2_1 ++ 0x184 0x37 // P9_24 = Fault Z = GPIO0_15 ++ >; ++ }; ++ ++ end_stop_pins: pinmux_end_stop_pins{ ++ pinctrl-single,pins = < ++ 0x1AC 0x37 // P9_25 = End stop X1 = GPIO3_21 ++ 0x070 0x37 // P9_11 = End stop X2 = GPIO0_30 ++ 0x044 0x37 // P9_23 = End stop Y1 = GPIO1_17 ++ 0x04C 0x37 // P9_16 = End stop Y2 = GPIO1_19 ++ 0x074 0x37 // P9_13 = End stop Z1 = GPIO0_31 ++ 0x158 0x37 // P9_18 = End stop Z2 = GPIO0_4 ++ >; ++ }; ++ dallas_w1_pins: pinmux_dallas_w1_pins { ++ pinctrl-single,pins = < ++ 0x150 0x37 // Dallas 1W ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&spi1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&bone_replicape_spi1_pins>; ++ cs-gpios = <&gpio4 17 0>, <&gpio1 7 0>; ++ ++ stepper_control{ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "spidev"; ++ reg = <0>; ++ spi-max-frequency = <16000000>; ++ spi-cpha; // Stepper control has mode 1 (CPOL = 0, CPHA = 1) ++ }; ++ ++ stepper_current{ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "spidev"; ++ reg = <1>; ++ spi-max-frequency = <16000000>; ++ // Stepper current has mode 0 (CPOL = 0, CPHA = 0) ++ }; ++ }; ++ }; ++ ++ fragment@2{ ++ target = <&pruss>; ++ __overlay__{ ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pruicss_stepper_pins>; ++ ++ stepper_x{ ++ pin-names = "Replic:pru-step_x", "Replic:pru-dir_x"; ++ gpios = <&gpio1 27 0 ++ &gpio2 29 0>; ++ }; ++ stepper_y{ ++ pin-names = "Replic:pru-step_y", "Replic:pru-dir_y"; ++ gpios =<&gpio2 12 0 ++ &gpio1 22 0>; ++ }; ++ stepper_z{ ++ pin-names = "Replic:pru-step_z", "Replic:pru-dir_z"; ++ gpios = <&gpio1 23 0 ++ &gpio1 26 0>; ++ }; ++ stepper_ext_1{ ++ pin-names = "Replic:pru-step_ext_1", "Replic:pru-dir_ext_1"; ++ gpios = <&gpio2 28 0 ++ &gpio2 15 0>; ++ }; ++ stepper_ext_2{ ++ pin-names = "Replic:pru-step_ext_2", "Replic:pru-dir_ext_2"; ++ gpios = <&gpio2 13 0 ++ &gpio2 14 0>; ++ }; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&ocp>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ tscadc { ++ compatible = "ti,ti-tscadc"; ++ reg = <0x44e0d000 0x1000>; ++ ++ interrupt-parent = <&intc>; ++ interrupts = <16>; ++ ti,hwmods = "adc_tsc"; ++ status = "okay"; ++ ++ adc { ++ ti,adc-channels = <4 5 6 7>; ++ }; ++ }; ++ ++ gpio_keys { ++ compatible = "gpio-keys"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&end_stop_pins>; ++ pinctrl-1 = <&stepper_fault_pins>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ switch_x1 { ++ label = "End-stop-X1"; ++ debounce_interval = <50>; ++ linux,code = <112>; ++ gpios = <&gpio4 21 0x5>; ++ gpio-key,wakeup; ++ }; ++ switch_x2 { ++ label = "End-stop-X2"; ++ debounce_interval = <50>; ++ linux,code = <113>; ++ gpios = <&gpio1 30 0x5>; ++ gpio-key,wakeup; ++ }; ++ switch_y1 { ++ label = "End-stop-Y1"; ++ debounce_interval = <50>; ++ linux,code = <114>; ++ gpios = <&gpio2 17 0x5>; ++ gpio-key,wakeup; ++ }; ++ switch_y2 { ++ label = "End-stop-Y2"; ++ debounce_interval = <50>; ++ linux,code = <115>; ++ gpios = <&gpio2 19 0x5>; ++ gpio-key,wakeup; ++ }; ++ switch_z1 { ++ label = "End-stop-Z1"; ++ debounce_interval = <50>; ++ linux,code = <116>; ++ gpios = <&gpio1 31 0x5>; ++ gpio-key,wakeup; ++ }; ++ switch_z2 { ++ label = "End-stop-Z2"; ++ debounce_interval = <50>; ++ linux,code = <117>; ++ gpios = <&gpio1 4 0x5>; ++ gpio-key,wakeup; ++ }; ++ fault_x { ++ label = "Fault-X"; ++ debounce_interval = <50>; ++ linux,code = <90>; ++ gpios = <&gpio3 4 0x5>; ++ gpio-key,wakeup; ++ }; ++ fault_y { ++ label = "Fault-Y"; ++ debounce_interval = <50>; ++ linux,code = <91>; ++ gpios = <&gpio3 5 0x5>; ++ gpio-key,wakeup; ++ }; ++ fault_z { ++ label = "Fault-Z"; ++ debounce_interval = <50>; ++ linux,code = <92>; ++ gpios = <&gpio1 15 0x5>; ++ gpio-key,wakeup; ++ }; ++ fault_ext_1 { ++ label = "Fault-Ext-1"; ++ debounce_interval = <50>; ++ linux,code = <93>; ++ gpios = <&gpio3 1 0x5>; ++ gpio-key,wakeup; ++ }; ++ fault_ext_2 { ++ label = "Fault-Ext-2"; ++ debounce_interval = <50>; ++ linux,code = <94>; ++ gpios = <&gpio3 3 0x5>; ++ gpio-key,wakeup; ++ }; ++ }; ++ onewire@0 { ++ compatible = "w1-gpio"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&dallas_w1_pins>; ++ status = "okay"; ++ gpios = <&gpio1 2 0>; ++ }; ++ }; ++ }; ++}; +diff --git a/firmware/capes/BB-BONE-REPLICAP-0A4A.dts b/firmware/capes/BB-BONE-REPLICAP-0A4A.dts +new file mode 100644 +index 0000000..3becb9c +--- /dev/null ++++ b/firmware/capes/BB-BONE-REPLICAP-0A4A.dts +@@ -0,0 +1,288 @@ ++/* ++ * Copyright (C) 2013 Intelligent Agent AS ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "ti,beaglebone", "ti,beaglebone-black"; ++ ++ /* identification */ ++ part-number = "BB-BONE-REPLICAP"; ++ version = "0A4A"; ++ ++ /* state the resources this cape uses */ ++ exclusive-use = ++ /* the pin header P8 uses */ ++ "P8.8", /* FAULT_EXT_2 */ ++ "P8.9", /* FAULT_Y */ ++ "P8.10", /* FAULT_X */ ++ "P8.11", /* STEP_EXT_2 */ ++ "P8.12", /* STEP_Y */ ++ "P8.13", /* STEP_Z */ ++ "P8.14", /* DIR_Z */ ++ "P8.15", /* DIR_EXT_1 */ ++ "P8.16", /* DIR_EXT_2 */ ++ "P8.17", /* STEP_X */ ++ "P8.18", /* FAULT_EXT_1 */ ++ "P8.19", /* DIR_Y */ ++ "P8.26", /* DIR_X */ ++ /* the pin header P9 uses */ ++ "P9.11", /* END_STOP_X2 */ ++ "P9.12", /* STEP_EXT_1 */ ++ "P9.13", /* END_STOP_Z1 */ ++ "P9.16", /* END_STOP_Y2 */ ++ "P9.18", /* END_STOP_Z2 */ ++ "P9.22", /* Dallas 1W */ ++ "P9.23", /* END_STOP_Y1 */ ++ "P9.24", /* FAULT_Z */ ++ "P9.25", /* END_STOP_X1 */ ++ "P9.28", /* SPI1_CS0 */ ++ "P9.29", /* SPI1_MISO */ ++ "P9.30", /* SPI1_MOSI */ ++ "P9.31", /* SPI1_SCLK */ ++ "P9.33", /* AIN4 */ ++ "P9.35", /* AIN6 */ ++ "P9.36", /* AIN5 */ ++ "P9.42"; /* SPI1_CS1 */ ++ ++ fragment@0 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ bone_replicape_spi1_pins: pinmux_replicape_spi1_pins { ++ pinctrl-single,pins = < ++ 0x190 0x13 /* P9_31 = mcasp0_aclkx.spi1_sclk , OUTPUT_PULLUP | MODE3 */ ++ 0x194 0x33 /* P9_29 = mcasp0_fsx.spi1_d0 , INPUT_PULLUP | MODE3 */ ++ 0x198 0x13 /* P9_30 = mcasp0_axr0.spi1_d1 , OUTPUT_PULLUP | MODE3 */ ++ 0x19c 0x13 /* P9_28 = mcasp0_ahclkr.spi1_cs0 , OUTPUT_PULLUP | MODE3 */ ++ 0x164 0x12 /* P9_42 = GPIO0_7 = eCAP0_in_PWM0_out.gpio0[7] , OUTPUT_PULLUP | MODE2 */ ++ >; ++ }; ++ pruicss_stepper_pins: pinmux_pruicss_stepper_pins{ ++ pinctrl-single,pins = < ++ 0x038 0x07 // P8_16 (3) = DIR_EXT_2 = GPIO1_14 ++ 0x03C 0x07 // P8_15 (4) = DIR_EXT_1 = GPIO1_15 ++ 0x028 0x07 // P8_14 (5) = DIR_Z = GPIO0_26 ++ 0x02C 0x07 // P8_17 (6) = STEP_X = GPIO0_27 ++ 0x034 0x07 // P8_11 (22) = step_ext_2 = GPIO1_13 ++ 0x030 0x07 // P8_12 (23) = Step_y = GPIO1_12 ++ 0x024 0x07 // P8_13 (24) = Step_z = GPIO0_23 ++ 0x020 0x07 // P8_19 (25) = Dir_y = GPIO0_22 ++ 0x07C 0x07 // P8_26 = Dir_x = GPIO1_29 ++ 0x078 0x07 // P9_12 = step ext 1 = GPIO1_28 ++ >; ++ }; ++ ++ stepper_fault_pins: pinmux_stepper_fault_pins{ ++ pinctrl-single,pins = < ++ 0x094 0x37 // P8_8 = Fault Ext 2 = GPIO2_3 gpmc_oen_ren.gpio2[3] ++ 0x09C 0x37 // P8_9 = FAYLT Y = GPIO2_5 ++ 0x098 0x37 // P8_10 = FAULT X = GPIO2_4 gpmc_wen.gpio2[4] ++ 0x08C 0x37 // P8_18 = Fault_ext 1 = GPIO2_1 ++ 0x184 0x37 // P9_24 = Fault Z = GPIO0_15 ++ >; ++ }; ++ ++ end_stop_pins: pinmux_end_stop_pins{ ++ pinctrl-single,pins = < ++ 0x1AC 0x37 // P9_25 = End stop X1 = GPIO3_21 ++ 0x070 0x37 // P9_11 = End stop X2 = GPIO0_30 ++ 0x044 0x37 // P9_23 = End stop Y1 = GPIO1_17 ++ 0x04C 0x37 // P9_16 = End stop Y2 = GPIO1_19 ++ 0x074 0x37 // P9_13 = End stop Z1 = GPIO0_31 ++ 0x158 0x37 // P9_18 = End stop Z2 = GPIO0_4 ++ >; ++ }; ++ dallas_w1_pins: pinmux_dallas_w1_pins { ++ pinctrl-single,pins = < ++ 0x150 0x37 // Dallas 1W ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&spi1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&bone_replicape_spi1_pins>; ++ cs-gpios = <&gpio4 17 0>, <&gpio1 7 0>; ++ ++ stepper_control{ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "spidev"; ++ reg = <0>; ++ spi-max-frequency = <16000000>; ++ spi-cpha; // Stepper control has mode 1 (CPOL = 0, CPHA = 1) ++ }; ++ ++ stepper_current{ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "spidev"; ++ reg = <1>; ++ spi-max-frequency = <16000000>; ++ // Stepper current has mode 0 (CPOL = 0, CPHA = 0) ++ }; ++ }; ++ }; ++ ++ fragment@2{ ++ target = <&pruss>; ++ __overlay__{ ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pruicss_stepper_pins>; ++ ++ stepper_x{ ++ pin-names = "Replic:pru-step_x", "Replic:pru-dir_x"; ++ gpios = <&gpio1 27 0 ++ &gpio2 29 0>; ++ }; ++ stepper_y{ ++ pin-names = "Replic:pru-step_y", "Replic:pru-dir_y"; ++ gpios =<&gpio2 12 0 ++ &gpio1 22 0>; ++ }; ++ stepper_z{ ++ pin-names = "Replic:pru-step_z", "Replic:pru-dir_z"; ++ gpios = <&gpio1 23 0 ++ &gpio1 26 0>; ++ }; ++ stepper_ext_1{ ++ pin-names = "Replic:pru-step_ext_1", "Replic:pru-dir_ext_1"; ++ gpios = <&gpio2 28 0 ++ &gpio2 15 0>; ++ }; ++ stepper_ext_2{ ++ pin-names = "Replic:pru-step_ext_2", "Replic:pru-dir_ext_2"; ++ gpios = <&gpio2 13 0 ++ &gpio2 14 0>; ++ }; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&ocp>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ tscadc { ++ compatible = "ti,ti-tscadc"; ++ reg = <0x44e0d000 0x1000>; ++ ++ interrupt-parent = <&intc>; ++ interrupts = <16>; ++ ti,hwmods = "adc_tsc"; ++ status = "okay"; ++ ++ adc { ++ ti,adc-channels = <4 5 6 7>; ++ }; ++ }; ++ ++ gpio_keys { ++ compatible = "gpio-keys"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&end_stop_pins>; ++ pinctrl-1 = <&stepper_fault_pins>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ switch_x1 { ++ label = "End-stop-X1"; ++ debounce_interval = <50>; ++ linux,code = <112>; ++ gpios = <&gpio4 21 0x5>; ++ gpio-key,wakeup; ++ }; ++ switch_x2 { ++ label = "End-stop-X2"; ++ debounce_interval = <50>; ++ linux,code = <113>; ++ gpios = <&gpio1 30 0x5>; ++ gpio-key,wakeup; ++ }; ++ switch_y1 { ++ label = "End-stop-Y1"; ++ debounce_interval = <50>; ++ linux,code = <114>; ++ gpios = <&gpio2 17 0x5>; ++ gpio-key,wakeup; ++ }; ++ switch_y2 { ++ label = "End-stop-Y2"; ++ debounce_interval = <50>; ++ linux,code = <115>; ++ gpios = <&gpio2 19 0x5>; ++ gpio-key,wakeup; ++ }; ++ switch_z1 { ++ label = "End-stop-Z1"; ++ debounce_interval = <50>; ++ linux,code = <116>; ++ gpios = <&gpio1 31 0x5>; ++ gpio-key,wakeup; ++ }; ++ switch_z2 { ++ label = "End-stop-Z2"; ++ debounce_interval = <50>; ++ linux,code = <117>; ++ gpios = <&gpio1 4 0x5>; ++ gpio-key,wakeup; ++ }; ++ fault_x { ++ label = "Fault-X"; ++ debounce_interval = <50>; ++ linux,code = <90>; ++ gpios = <&gpio3 4 0x5>; ++ gpio-key,wakeup; ++ }; ++ fault_y { ++ label = "Fault-Y"; ++ debounce_interval = <50>; ++ linux,code = <91>; ++ gpios = <&gpio3 5 0x5>; ++ gpio-key,wakeup; ++ }; ++ fault_z { ++ label = "Fault-Z"; ++ debounce_interval = <50>; ++ linux,code = <92>; ++ gpios = <&gpio1 15 0x5>; ++ gpio-key,wakeup; ++ }; ++ fault_ext_1 { ++ label = "Fault-Ext-1"; ++ debounce_interval = <50>; ++ linux,code = <93>; ++ gpios = <&gpio3 1 0x5>; ++ gpio-key,wakeup; ++ }; ++ fault_ext_2 { ++ label = "Fault-Ext-2"; ++ debounce_interval = <50>; ++ linux,code = <94>; ++ gpios = <&gpio3 3 0x5>; ++ gpio-key,wakeup; ++ }; ++ }; ++ onewire@0 { ++ compatible = "w1-gpio"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&dallas_w1_pins>; ++ status = "okay"; ++ gpios = <&gpio1 2 0>; ++ }; ++ }; ++ }; ++}; +diff --git a/firmware/capes/cape-bone-replicape-00A2.dts b/firmware/capes/cape-bone-replicape-00A2.dts +deleted file mode 100644 +index 1c023f3..0000000 +--- a/firmware/capes/cape-bone-replicape-00A2.dts ++++ /dev/null +@@ -1,251 +0,0 @@ +-/* +- * Copyright (C) 2013 Intelligent Agent AS +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License version 2 as +- * published by the Free Software Foundation. +- */ +-/dts-v1/; +-/plugin/; +- +-/ { +- compatible = "ti,beaglebone", "ti,beaglebone-black"; +- +- /* identification */ +- part-number = "BB-BONE-REPLICAP"; +- version = "00A2"; +- +- /* state the resources this cape uses */ +- exclusive-use = +- /* the pin header P8 uses */ +- "P8.16", /* (3) DIR_EXT_2 */ +- "P8.15", /* (4) DIR_EXT_1 */ +- "P8.14", /* (5) DIR_Z */ +- "P8.17", /* (6) STEP_X */ +- "P8.7", /* END_STOP_Y1 */ +- "P8.8", /* FAULT_EXT_2 */ +- "P8.9", /* FAULT_Y */ +- "P8.10", /* FAULT_x */ +- "P8.18", /* FAULT_EXT_1 */ +- "P8.11", /* (22) STEP_EXT_2 */ +- "P8.12", /* (23) STEP_Y */ +- "P8.13", /* (24) STEP_Z */ +- "P8.19", /* (25) DIR_Y */ +- "P8.26", /* DIR_X */ +- /* the pin header P9 uses */ +- "P9.11", /* END_STOP_Z1 */ +- "P9.12", /* STEP_EXT_1 */ +- "P9.13", /* END_STOP_X2 */ +- "P9.18", /* END_STOP_Z2 */ +- "P9.24", /* FAULT_Z */ +- "P9.25", /* END_STOP_Y2 */ +- "P9.26", /* END_STOP_X1 */ +- "P9.28", /* SPI1_CS0 */ +- "P9.29", /* SPI1_MISO */ +- "P9.30", /* SPI1_MOSI */ +- "P9.31", /* SPI1_SCLK */ +- "P9.33", /* AIN4 */ +- "P9.35", /* AIN6 */ +- "P9.36", /* AIN5 */ +- "P9.42", /* SPI1_CS1 */ +- /* Hardware IP cores in use */ +- "spi1", +- "pruss"; +- +- fragment@0 { +- target = <&am33xx_pinmux>; +- __overlay__ { +- bone_replicape_spi1_pins: pinmux_replicape_spi1_pins { +- pinctrl-single,pins = < +- 0x190 0x13 /* P9_31 = mcasp0_aclkx.spi1_sclk , OUTPUT_PULLUP | MODE3 */ +- 0x194 0x33 /* P9_29 = mcasp0_fsx.spi1_d0 , INPUT_PULLUP | MODE3 */ +- 0x198 0x13 /* P9_30 = mcasp0_axr0.spi1_d1 , OUTPUT_PULLUP | MODE3 */ +- 0x19c 0x13 /* P9_28 = mcasp0_ahclkr.spi1_cs0 , OUTPUT_PULLUP | MODE3 */ +- 0x164 0x12 /* P9_42 = GPIO0_7 = eCAP0_in_PWM0_out.gpio0[7] , OUTPUT_PULLUP | MODE2 */ +- >; +- }; +- pruicss_stepper_pins: pinmux_pruicss_stepper_pins{ +- pinctrl-single,pins = < +- 0x038 0x07 // P8_16 (3) = DIR_EXT_2 = GPIO1_14 +- 0x03C 0x07 // P8_15 (4) = DIR_EXT_1 = GPIO1_15 +- 0x028 0x07 // P8_14 (5) = DIR_Z = GPIO0_26 +- 0x02C 0x07 // P8_17 (6) = STEP_X = GPIO0_27 +- 0x034 0x07 // P8_11 (22) = step_ext_2 = GPIO1_13 +- 0x030 0x07 // P8_12 (23) = Step_y = GPIO1_12 +- 0x024 0x07 // P8_13 (24) = Step_z = GPIO0_23 +- 0x020 0x07 // P8_19 (25) = Dir_y = GPIO0_22 +- 0x07C 0x07 // P8_26 = Dir_x = GPIO1_29 +- 0x078 0x07 // P9_12 = step ext 1 = GPIO1_28 +- >; +- }; +- +- stepper_fault_pins: pinmux_stepper_fault_pins{ +- pinctrl-single,pins = < +- 0x094 0x37 // P8_8 = Fault Ext 2 = GPIO2_2 gpmc_oen_ren.gpio2[3] +- 0x09C 0x37 // P8_9 = FAYLT Y = GPIO2_5 +- 0x098 0x37 // P8_10 = FAULT X = GPIO2_4 gpmc_wen.gpio2[4] +- 0x08C 0x37 // P8_18 = Fault_ext 1 = GPIO2_1 +- 0x184 0x37 // P9_24 = Fault Z = GPIO0_15 +- >; +- }; +- +- end_stop_pins: pinmux_end_stop_pins{ +- pinctrl-single,pins = < +- 0x090 0x37 // P8_7 = End stop X1 = GPIO2_2 +- 0x070 0x37 // P9_11 = End stop Y1 = GPIO0_30 +- 0x074 0x37 // P9_13 = End stop Z1 = GPIO0_31 +- 0x158 0x37 // P9_18 = End stop Z2 = GPIO0_4 +- 0x1AC 0x37 // P9_25 = End stop Y2 = GPIO3_21 +- 0x180 0x37 // P9_26 = End stop X2 = GPIO0_14 +- >; +- }; +- }; +- }; +- +- fragment@1 { +- target = <&spi1>; +- __overlay__ { +- #address-cells = <1>; +- #size-cells = <0>; +- status = "okay"; +- pinctrl-names = "default"; +- pinctrl-0 = <&bone_replicape_spi1_pins>; +- cs-gpios = <&gpio4 17 0>, <&gpio1 7 0>; +- +- stepper_control{ +- #address-cells = <1>; +- #size-cells = <0>; +- compatible = "spidev"; +- reg = <0>; +- spi-max-frequency = <16000000>; +- spi-cpha; // Stepper control has mode 1 (CPOL = 0, CPHA = 1) +- }; +- +- stepper_current{ +- #address-cells = <1>; +- #size-cells = <0>; +- compatible = "spidev"; +- reg = <1>; +- spi-max-frequency = <16000000>; +- // Stepper current has mode 0 (CPOL = 0, CPHA = 0) +- }; +- }; +- }; +- +- fragment@2{ +- target = <&pruss>; +- __overlay__{ +- status = "okay"; +- pinctrl-names = "default"; +- pinctrl-0 = <&pruicss_stepper_pins>; +- +- stepper_x{ +- pin-names = "Replic:pru-step_x", "Replic:pru-dir_x"; +- gpios = <&gpio1 27 0 +- &gpio2 29 0>; +- }; +- stepper_y{ +- pin-names = "Replic:pru-step_y", "Replic:pru-dir_y"; +- gpios =<&gpio2 12 0 +- &gpio1 22 0>; +- }; +- stepper_z{ +- pin-names = "Replic:pru-step_z", "Replic:pru-dir_z"; +- gpios = <&gpio1 23 0 +- &gpio1 26 0>; +- }; +- stepper_ext_1{ +- pin-names = "Replic:pru-step_ext_1", "Replic:pru-dir_ext_1"; +- gpios = <&gpio2 28 0 +- &gpio2 15 0>; +- }; +- stepper_ext_2{ +- pin-names = "Replic:pru-step_ext_2", "Replic:pru-dir_ext_2"; +- gpios = <&gpio2 13 0 +- &gpio2 14 0>; +- }; +- }; +- }; +- +- fragment@3 { +- target = <&ocp>; +- __overlay__ { +- #address-cells = <1>; +- #size-cells = <1>; +- +- tscadc { +- compatible = "ti,ti-tscadc"; +- reg = <0x44e0d000 0x1000>; +- +- interrupt-parent = <&intc>; +- interrupts = <16>; +- ti,hwmods = "adc_tsc"; +- status = "okay"; +- +- tsc { +- ti,wires = <4>; +- }; +- adc { +- ti,adc-channels = <4>; +- }; +- }; +- +- thermistors{ +- compatible = "bone-iio-helper"; +- vsense-name = "AIN4", "AIN5", "AIN6", "AIN7"; +- vsense-scale = <100 100 100 100 >; +- status = "okay"; +- }; +- gpio_keys { +- compatible = "gpio-keys"; +- pinctrl-names = "default"; +- pinctrl-0 = <&end_stop_pins>; +- #address-cells = <1>; +- #size-cells = <0>; +- +- switch_x1 { +- label = "End-stop-X1"; +- debounce_interval = <50>; +- linux,code = <1>; +- gpios = <&gpio3 2 0x5>; +- gpio-key,wakeup; +- }; +- switch_x2 { +- label = "End-stop-X2"; +- debounce_interval = <50>; +- linux,code = <2>; +- gpios = <&gpio1 14 0x5>; +- gpio-key,wakeup; +- }; +- switch_y1 { +- label = "End-stop-Y1"; +- debounce_interval = <50>; +- linux,code = <3>; +- gpios = <&gpio1 30 0x5>; +- gpio-key,wakeup; +- }; +- switch_y2 { +- label = "End-stop-Y2"; +- debounce_interval = <50>; +- linux,code = <4>; +- gpios = <&gpio4 21 0x5>; +- gpio-key,wakeup; +- }; +- switch_z1 { +- label = "End-stop-Z1"; +- debounce_interval = <50>; +- linux,code = <5>; +- gpios = <&gpio1 31 0x5>; +- gpio-key,wakeup; +- }; +- switch_z2 { +- label = "End-stop-Z2"; +- debounce_interval = <50>; +- linux,code = <6>; +- gpios = <&gpio1 4 0x5>; +- gpio-key,wakeup; +- }; +- }; +- }; +- }; +-}; +diff --git a/firmware/capes/cape-bone-replicape-00A3.dts b/firmware/capes/cape-bone-replicape-00A3.dts +deleted file mode 100644 +index 8cb299f..0000000 +--- a/firmware/capes/cape-bone-replicape-00A3.dts ++++ /dev/null +@@ -1,291 +0,0 @@ +-/* +- * Copyright (C) 2013 Intelligent Agent AS +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License version 2 as +- * published by the Free Software Foundation. +- */ +-/dts-v1/; +-/plugin/; +- +-/ { +- compatible = "ti,beaglebone", "ti,beaglebone-black"; +- +- /* identification */ +- part-number = "BB-BONE-REPLICAP"; +- version = "00A3"; +- +- /* state the resources this cape uses */ +- exclusive-use = +- /* the pin header P8 uses */ +- "P8.16", /* (3) DIR_EXT_2 */ +- "P8.15", /* (4) DIR_EXT_1 */ +- "P8.14", /* (5) DIR_Z */ +- "P8.17", /* (6) STEP_X */ +- "P8.7", /* END_STOP_Y1 */ +- "P8.8", /* FAULT_EXT_2 */ +- "P8.9", /* FAULT_Y */ +- "P8.10", /* FAULT_x */ +- "P8.18", /* FAULT_EXT_1 */ +- "P8.11", /* (22) STEP_EXT_2 */ +- "P8.12", /* (23) STEP_Y */ +- "P8.13", /* (24) STEP_Z */ +- "P8.19", /* (25) DIR_Y */ +- "P8.26", /* DIR_X */ +- /* the pin header P9 uses */ +- "P9.11", /* END_STOP_Z1 */ +- "P9.12", /* STEP_EXT_1 */ +- "P9.13", /* END_STOP_X2 */ +- "P9.18", /* END_STOP_Z2 */ +- "P9.22", /* Dallas 1W */ +- "P9.24", /* FAULT_Z */ +- "P9.25", /* END_STOP_Y2 */ +- "P9.26", /* END_STOP_X1 */ +- "P9.28", /* SPI1_CS0 */ +- "P9.29", /* SPI1_MISO */ +- "P9.30", /* SPI1_MOSI */ +- "P9.31", /* SPI1_SCLK */ +- "P9.33", /* AIN4 */ +- "P9.35", /* AIN6 */ +- "P9.36", /* AIN5 */ +- "P9.42", /* SPI1_CS1 */ +- /* Hardware IP cores in use */ +- "spi1", +- "pruss"; +- +- fragment@0 { +- target = <&am33xx_pinmux>; +- __overlay__ { +- bone_replicape_spi1_pins: pinmux_replicape_spi1_pins { +- pinctrl-single,pins = < +- 0x190 0x13 /* P9_31 = mcasp0_aclkx.spi1_sclk , OUTPUT_PULLUP | MODE3 */ +- 0x194 0x33 /* P9_29 = mcasp0_fsx.spi1_d0 , INPUT_PULLUP | MODE3 */ +- 0x198 0x13 /* P9_30 = mcasp0_axr0.spi1_d1 , OUTPUT_PULLUP | MODE3 */ +- 0x19c 0x13 /* P9_28 = mcasp0_ahclkr.spi1_cs0 , OUTPUT_PULLUP | MODE3 */ +- 0x164 0x12 /* P9_42 = GPIO0_7 = eCAP0_in_PWM0_out.gpio0[7] , OUTPUT_PULLUP | MODE2 */ +- >; +- }; +- pruicss_stepper_pins: pinmux_pruicss_stepper_pins{ +- pinctrl-single,pins = < +- 0x038 0x07 // P8_16 (3) = DIR_EXT_2 = GPIO1_14 +- 0x03C 0x07 // P8_15 (4) = DIR_EXT_1 = GPIO1_15 +- 0x028 0x07 // P8_14 (5) = DIR_Z = GPIO0_26 +- 0x02C 0x07 // P8_17 (6) = STEP_X = GPIO0_27 +- 0x034 0x07 // P8_11 (22) = step_ext_2 = GPIO1_13 +- 0x030 0x07 // P8_12 (23) = Step_y = GPIO1_12 +- 0x024 0x07 // P8_13 (24) = Step_z = GPIO0_23 +- 0x020 0x07 // P8_19 (25) = Dir_y = GPIO0_22 +- 0x07C 0x07 // P8_26 = Dir_x = GPIO1_29 +- 0x078 0x07 // P9_12 = step ext 1 = GPIO1_28 +- >; +- }; +- +- stepper_fault_pins: pinmux_stepper_fault_pins{ +- pinctrl-single,pins = < +- 0x094 0x37 // P8_8 = Fault Ext 2 = GPIO2_3 gpmc_oen_ren.gpio2[3] +- 0x09C 0x37 // P8_9 = FAYLT Y = GPIO2_5 +- 0x098 0x37 // P8_10 = FAULT X = GPIO2_4 gpmc_wen.gpio2[4] +- 0x08C 0x37 // P8_18 = Fault_ext 1 = GPIO2_1 +- 0x184 0x37 // P9_24 = Fault Z = GPIO0_15 +- >; +- }; +- +- end_stop_pins: pinmux_end_stop_pins{ +- pinctrl-single,pins = < +- 0x090 0x37 // P8_7 = End stop X1 = GPIO2_2 +- 0x070 0x37 // P9_11 = End stop Y1 = GPIO0_30 +- 0x074 0x37 // P9_13 = End stop Z1 = GPIO0_31 +- 0x158 0x37 // P9_18 = End stop Z2 = GPIO0_4 +- 0x1AC 0x37 // P9_25 = End stop Y2 = GPIO3_21 +- 0x180 0x37 // P9_26 = End stop X2 = GPIO0_14 +- >; +- }; +- dallas_w1_pins: pinmux_dallas_w1_pins { +- pinctrl-single,pins = < +- 0x150 0x37 // Dallas 1W +- >; +- }; +- }; +- }; +- +- fragment@1 { +- target = <&spi1>; +- __overlay__ { +- #address-cells = <1>; +- #size-cells = <0>; +- status = "okay"; +- pinctrl-names = "default"; +- pinctrl-0 = <&bone_replicape_spi1_pins>; +- cs-gpios = <&gpio4 17 0>, <&gpio1 7 0>; +- +- stepper_control{ +- #address-cells = <1>; +- #size-cells = <0>; +- compatible = "spidev"; +- reg = <0>; +- spi-max-frequency = <16000000>; +- spi-cpha; // Stepper control has mode 1 (CPOL = 0, CPHA = 1) +- }; +- +- stepper_current{ +- #address-cells = <1>; +- #size-cells = <0>; +- compatible = "spidev"; +- reg = <1>; +- spi-max-frequency = <16000000>; +- // Stepper current has mode 0 (CPOL = 0, CPHA = 0) +- }; +- }; +- }; +- +- fragment@2{ +- target = <&pruss>; +- __overlay__{ +- status = "okay"; +- pinctrl-names = "default"; +- pinctrl-0 = <&pruicss_stepper_pins>; +- +- stepper_x{ +- pin-names = "Replic:pru-step_x", "Replic:pru-dir_x"; +- gpios = <&gpio1 27 0 +- &gpio2 29 0>; +- }; +- stepper_y{ +- pin-names = "Replic:pru-step_y", "Replic:pru-dir_y"; +- gpios =<&gpio2 12 0 +- &gpio1 22 0>; +- }; +- stepper_z{ +- pin-names = "Replic:pru-step_z", "Replic:pru-dir_z"; +- gpios = <&gpio1 23 0 +- &gpio1 26 0>; +- }; +- stepper_ext_1{ +- pin-names = "Replic:pru-step_ext_1", "Replic:pru-dir_ext_1"; +- gpios = <&gpio2 28 0 +- &gpio2 15 0>; +- }; +- stepper_ext_2{ +- pin-names = "Replic:pru-step_ext_2", "Replic:pru-dir_ext_2"; +- gpios = <&gpio2 13 0 +- &gpio2 14 0>; +- }; +- }; +- }; +- +- fragment@3 { +- target = <&ocp>; +- __overlay__ { +- #address-cells = <1>; +- #size-cells = <1>; +- +- tscadc { +- compatible = "ti,ti-tscadc"; +- reg = <0x44e0d000 0x1000>; +- +- interrupt-parent = <&intc>; +- interrupts = <16>; +- ti,hwmods = "adc_tsc"; +- status = "okay"; +- +- adc { +- ti,adc-channels = <4 5 6 7>; +- }; +- }; +- +- gpio_keys { +- compatible = "gpio-keys"; +- pinctrl-names = "default"; +- pinctrl-0 = <&end_stop_pins>; +- pinctrl-1 = <&stepper_fault_pins>; +- #address-cells = <1>; +- #size-cells = <0>; +- +- switch_x1 { +- label = "End-stop-X1"; +- debounce_interval = <50>; +- linux,code = <1>; +- gpios = <&gpio3 2 0x5>; +- gpio-key,wakeup; +- }; +- switch_x2 { +- label = "End-stop-X2"; +- debounce_interval = <50>; +- linux,code = <2>; +- gpios = <&gpio1 14 0x5>; +- gpio-key,wakeup; +- }; +- switch_y1 { +- label = "End-stop-Y1"; +- debounce_interval = <50>; +- linux,code = <3>; +- gpios = <&gpio1 30 0x5>; +- gpio-key,wakeup; +- }; +- switch_y2 { +- label = "End-stop-Y2"; +- debounce_interval = <50>; +- linux,code = <4>; +- gpios = <&gpio4 21 0x5>; +- gpio-key,wakeup; +- }; +- switch_z1 { +- label = "End-stop-Z1"; +- debounce_interval = <50>; +- linux,code = <5>; +- gpios = <&gpio1 31 0x5>; +- gpio-key,wakeup; +- }; +- switch_z2 { +- label = "End-stop-Z2"; +- debounce_interval = <50>; +- linux,code = <6>; +- gpios = <&gpio1 4 0x5>; +- gpio-key,wakeup; +- }; +- fault_x { +- label = "Fault-X"; +- debounce_interval = <50>; +- linux,code = <7>; +- gpios = <&gpio3 4 0x5>; +- gpio-key,wakeup; +- }; +- fault_y { +- label = "Fault-Y"; +- debounce_interval = <50>; +- linux,code = <8>; +- gpios = <&gpio3 5 0x5>; +- gpio-key,wakeup; +- }; +- fault_z { +- label = "Fault-Z"; +- debounce_interval = <50>; +- linux,code = <9>; +- gpios = <&gpio1 15 0x5>; +- gpio-key,wakeup; +- }; +- fault_ext_1 { +- label = "Fault-Ext-1"; +- debounce_interval = <50>; +- linux,code = <10>; +- gpios = <&gpio3 1 0x5>; +- gpio-key,wakeup; +- }; +- fault_ext_2 { +- label = "Fault-Ext-2"; +- debounce_interval = <50>; +- linux,code = <11>; +- gpios = <&gpio3 3 0x5>; +- gpio-key,wakeup; +- }; +- }; +- onewire@0 { +- compatible = "w1-gpio"; +- pinctrl-names = "default"; +- pinctrl-0 = <&dallas_w1_pins>; +- status = "okay"; +- gpios = <&gpio1 2 0>; +- }; +- }; +- }; +-}; +-- +1.9.0 + diff --git a/patches/capes/0039-cape-add-BB-BONE-AUDI-02-00A0-from-http-elinux.org-C.patch b/patches/capes/0039-cape-add-BB-BONE-AUDI-02-00A0-from-http-elinux.org-C.patch new file mode 100644 index 00000000..cf80ad5e --- /dev/null +++ b/patches/capes/0039-cape-add-BB-BONE-AUDI-02-00A0-from-http-elinux.org-C.patch @@ -0,0 +1,145 @@ +From bfdfd039b8563ae9c3f448794951fa4ae4e2b32b Mon Sep 17 00:00:00 2001 +From: Robert Nelson +Date: Wed, 14 May 2014 08:52:25 -0500 +Subject: [PATCH 39/40] cape: add BB-BONE-AUDI-02-00A0 from: + http://elinux.org/CircuitCo:Audio_Cape_RevB + +Signed-off-by: Robert Nelson +--- + firmware/Makefile | 1 + + firmware/capes/BB-BONE-AUDI-02-00A0.dts | 111 ++++++++++++++++++++++++++++++++ + 2 files changed, 112 insertions(+) + create mode 100644 firmware/capes/BB-BONE-AUDI-02-00A0.dts + +diff --git a/firmware/Makefile b/firmware/Makefile +index 95ab342..e364ebb 100644 +--- a/firmware/Makefile ++++ b/firmware/Makefile +@@ -150,6 +150,7 @@ fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \ + cape-bone-lcd3-00A0.dtbo \ + cape-bone-lcd3-00A2.dtbo \ + BB-BONE-AUDI-01-00A0.dtbo \ ++ BB-BONE-AUDI-02-00A0.dtbo \ + BB-BONE-LCD4-01-00A0.dtbo \ + BB-BONE-LCD4-01-00A1.dtbo \ + BB-BONE-LCD7-01-00A2.dtbo \ +diff --git a/firmware/capes/BB-BONE-AUDI-02-00A0.dts b/firmware/capes/BB-BONE-AUDI-02-00A0.dts +new file mode 100644 +index 0000000..0d3b9ec +--- /dev/null ++++ b/firmware/capes/BB-BONE-AUDI-02-00A0.dts +@@ -0,0 +1,111 @@ ++/* ++ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "ti,beaglebone", "ti,beaglebone-black"; ++ ++ /* identification */ ++ part-number = "BB-BONE-AUDI-02"; ++ version = "00A0", "A0"; ++ ++ /* state the resources this cape uses */ ++ exclusive-use = ++ /* the pin header uses */ ++ "P9.31", /* mcasp0: mcasp0_aclkx */ ++ "P9.29", /* mcasp0: mcasp0_fsx */ ++ "P9.28", /* mcasp0: mcasp0_axr2 */ ++ "P9.25", /* mcasp0: mcasp0_ahclkx */ ++ /* the hardware ip uses */ ++ "gpio1_18", "gpio1_19", ++ "mcasp0"; ++ ++ fragment@0 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ ++ i2c2_pins: pinmux_i2c2_pins { ++ pinctrl-single,pins = < ++ 0x150 0x72 /*spi0_scl.i2c2_sda,SLEWCTRL_SLOW | INPUT_PULLUP |MODE2*/ ++ 0x154 0x72 /*spi0_d0.i2c2_scl,SLEWCTRL_SLOW | INPUT_PULLUP | MODE2*/ ++ >; ++ }; ++ ++ bone_audio_cape_audio_pins: pinmux_bone_audio_cape_audio_pins { ++ pinctrl-single,pins = < ++ 0x1ac 0x00 /* mcasp0_ahclkx, MODE0 | INPUT */ ++ 0x19c 0x22 /* mcasp0_ahclkr, */ ++ 0x194 0x20 /* mcasp0_fsx, MODE0 | OUTPUT */ ++ 0x190 0x20 /* mcasp0_aclkr.mcasp0_aclkx, MODE0 | OUTPUT_PULLDOWN */ ++ 0x198 0x20 ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c2>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ clock-frequency = <100000>; ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c2_pins>; ++ ++ ++ tlv320aic3x: tlv320aic3x@18 { ++ compatible = "ti,tlv320aic3x"; ++ reg = <0x18>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&mcasp0>; ++ __overlay__ { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&bone_audio_cape_audio_pins>; ++ ++ status = "okay"; ++ ++ op-mode = <0>; /* MCASP_IIS_MODE */ ++ tdm-slots = <2>; ++ num-serializer = <16>; ++ serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */ ++ 2 0 1 0 ++ 0 0 0 0 ++ 0 0 0 0 ++ 0 0 0 0 ++ >; ++ tx-num-evt = <1>; ++ rx-num-evt = <1>; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&ocp>; ++ __overlay__ { ++ sound { ++ compatible = "ti,da830-evm-audio"; ++ ti,model = "DA830 EVM"; ++ ti,audio-codec = <&tlv320aic3x>; ++ ti,mcasp-controller = <&mcasp0>; ++ ti,codec-clock-rate = <12000000>; ++ ti,audio-routing = ++ "Headphone Jack", "HPLOUT", ++ "Headphone Jack", "HPROUT", ++ "LINE1L", "Line In", ++ "LINE1R", "Line In"; ++ }; ++ }; ++ ++ }; ++}; +-- +1.9.0 + diff --git a/patches/capes/0040-cape-universaln-remove-P9_31.patch b/patches/capes/0040-cape-universaln-remove-P9_31.patch new file mode 100644 index 00000000..66fffc21 --- /dev/null +++ b/patches/capes/0040-cape-universaln-remove-P9_31.patch @@ -0,0 +1,29 @@ +From 521da374e44619300293c17984b21206bf9b9d10 Mon Sep 17 00:00:00 2001 +From: Jason Kridner +Date: Wed, 14 May 2014 22:44:13 -0400 +Subject: [PATCH 40/40] cape-universaln: remove P9_31 + +It looks like one of the entries was missed. + +Signed-off-by: Jason Kridner +Signed-off-by: Robert Nelson +--- + firmware/capes/cape-universaln-00A0.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/firmware/capes/cape-universaln-00A0.dts b/firmware/capes/cape-universaln-00A0.dts +index a4bdbf0..2ecbd1d 100644 +--- a/firmware/capes/cape-universaln-00A0.dts ++++ b/firmware/capes/cape-universaln-00A0.dts +@@ -105,7 +105,7 @@ + /* "P9.28", Audio */ + /* "P9.29", Audio */ + "P9.30", +- "P9.31", ++/* "P9.31", Audio */ + /* "P9.32", VADC */ + /* "P9.33", AIN4 */ + /* "P9.34", AGND */ +-- +1.9.0 + diff --git a/patches/cpufreq/0001-am33xx-DT-add-commented-out-OPP-values-for-ES2.0.patch b/patches/cpufreq/0001-am33xx-DT-add-commented-out-OPP-values-for-ES2.0.patch index 542a0f91..9d919101 100644 --- a/patches/cpufreq/0001-am33xx-DT-add-commented-out-OPP-values-for-ES2.0.patch +++ b/patches/cpufreq/0001-am33xx-DT-add-commented-out-OPP-values-for-ES2.0.patch @@ -1,11 +1,11 @@ -From 06f84f49964ed4dc686c5568cb8c3669f0cddd61 Mon Sep 17 00:00:00 2001 +From 45a680cb90b2d1c858561e03e706407809980716 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 6 Dec 2012 11:55:52 +0100 Subject: [PATCH] am33xx DT: add commented out OPP values for ES2.0 Signed-off-by: Koen Kooi --- - arch/arm/boot/dts/am33xx.dtsi | 4 ++++ + arch/arm/boot/dts/am33xx.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi @@ -24,5 +24,5 @@ index 8fd3648..9059cfc 100644 600000 1225000 500000 1125000 -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0001-ARM-OMAP2xxx-hwmod-Convert-SHAM-crypto-device-data-t.patch b/patches/crypto/0001-ARM-OMAP2xxx-hwmod-Convert-SHAM-crypto-device-data-t.patch index 05fd1962..96cb6138 100644 --- a/patches/crypto/0001-ARM-OMAP2xxx-hwmod-Convert-SHAM-crypto-device-data-t.patch +++ b/patches/crypto/0001-ARM-OMAP2xxx-hwmod-Convert-SHAM-crypto-device-data-t.patch @@ -1,4 +1,4 @@ -From 9c095036a9e73557ec968a49f0f09c217b711fa2 Mon Sep 17 00:00:00 2001 +From a17e0a3a70c086d9dcb5a77f2ec092a4cc634dff Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Mon, 1 Oct 2012 21:03:04 -0700 Subject: [PATCH 01/34] ARM: OMAP2xxx: hwmod: Convert SHAM crypto device data @@ -10,13 +10,13 @@ explicit platform_data to hwmod. CC: Paul Walmsley Signed-off-by: Mark A. Greer --- - arch/arm/mach-omap2/cclock2430_data.c | 1 + - arch/arm/mach-omap2/devices.c | 32 ++++++----------- - arch/arm/mach-omap2/omap_hwmod_2420_data.c | 1 + - arch/arm/mach-omap2/omap_hwmod_2430_data.c | 1 + - .../mach-omap2/omap_hwmod_2xxx_interconnect_data.c | 18 ++++++++++ - arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | 37 ++++++++++++++++++++ - arch/arm/mach-omap2/omap_hwmod_common_data.h | 2 ++ + arch/arm/mach-omap2/cclock2430_data.c | 1 + + arch/arm/mach-omap2/devices.c | 32 +++++++------------ + arch/arm/mach-omap2/omap_hwmod_2420_data.c | 1 + + arch/arm/mach-omap2/omap_hwmod_2430_data.c | 1 + + .../mach-omap2/omap_hwmod_2xxx_interconnect_data.c | 18 +++++++++++ + arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | 37 ++++++++++++++++++++++ + arch/arm/mach-omap2/omap_hwmod_common_data.h | 2 ++ 7 files changed, 71 insertions(+), 21 deletions(-) diff --git a/arch/arm/mach-omap2/cclock2430_data.c b/arch/arm/mach-omap2/cclock2430_data.c @@ -211,5 +211,5 @@ index cfcce29..928acd5 100644 /* Common IP block data */ extern struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[]; -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0002-ARM-OMAP2xxx-hwmod-Add-DMA-support-for-SHAM-module.patch b/patches/crypto/0002-ARM-OMAP2xxx-hwmod-Add-DMA-support-for-SHAM-module.patch index 2698b704..2d2690a8 100644 --- a/patches/crypto/0002-ARM-OMAP2xxx-hwmod-Add-DMA-support-for-SHAM-module.patch +++ b/patches/crypto/0002-ARM-OMAP2xxx-hwmod-Add-DMA-support-for-SHAM-module.patch @@ -1,4 +1,4 @@ -From d670612aa3e5a66f5832ffed7ed827157c656f6e Mon Sep 17 00:00:00 2001 +From 37b0c6b60c67216deb7d929d9217084d8bddc81b Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Fri, 19 Oct 2012 14:10:34 -0700 Subject: [PATCH 02/34] ARM: OMAP2xxx: hwmod: Add DMA support for SHAM module @@ -9,8 +9,8 @@ so add that support so it can use DMA just like OMAP3. CC: Paul Walmsley Signed-off-by: Mark A. Greer --- - .../mach-omap2/omap_hwmod_2xxx_interconnect_data.c | 2 +- - arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | 6 ++++++ + arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c | 2 +- + arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c @@ -45,5 +45,5 @@ index e72132d..ab3305b 100644 .prcm = { .omap2 = { -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0003-ARM-OMAP3xxx-hwmod-Convert-SHAM-crypto-device-data-t.patch b/patches/crypto/0003-ARM-OMAP3xxx-hwmod-Convert-SHAM-crypto-device-data-t.patch index 7e05ea13..f367cb05 100644 --- a/patches/crypto/0003-ARM-OMAP3xxx-hwmod-Convert-SHAM-crypto-device-data-t.patch +++ b/patches/crypto/0003-ARM-OMAP3xxx-hwmod-Convert-SHAM-crypto-device-data-t.patch @@ -1,4 +1,4 @@ -From 916c03c563277b043517384742acfb988dcdf033 Mon Sep 17 00:00:00 2001 +From bda2ecd3f1e752b5e198a569b7c5cdc24945745e Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Tue, 2 Oct 2012 19:54:00 -0700 Subject: [PATCH 03/34] ARM: OMAP3xxx: hwmod: Convert SHAM crypto device data @@ -10,9 +10,9 @@ from explicit platform_data to hwmod. CC: Paul Walmsley Signed-off-by: Mark A. Greer --- - arch/arm/mach-omap2/cclock3xxx_data.c | 1 + - arch/arm/mach-omap2/devices.c | 41 +---------------- - arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 66 ++++++++++++++++++++++++++++ + arch/arm/mach-omap2/cclock3xxx_data.c | 1 + + arch/arm/mach-omap2/devices.c | 41 +------------------ + arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 66 ++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 39 deletions(-) diff --git a/arch/arm/mach-omap2/cclock3xxx_data.c b/arch/arm/mach-omap2/cclock3xxx_data.c @@ -176,5 +176,5 @@ index 8bb2628..122b4dc6 100644 }; -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0004-ARM-OMAP2-Remove-unnecessary-message-when-no-SHA-IP-.patch b/patches/crypto/0004-ARM-OMAP2-Remove-unnecessary-message-when-no-SHA-IP-.patch index 04aa3384..90590a5a 100644 --- a/patches/crypto/0004-ARM-OMAP2-Remove-unnecessary-message-when-no-SHA-IP-.patch +++ b/patches/crypto/0004-ARM-OMAP2-Remove-unnecessary-message-when-no-SHA-IP-.patch @@ -1,4 +1,4 @@ -From 0790881755e6fa433615c704eeb1675796db855c Mon Sep 17 00:00:00 2001 +From 8f2c964c560867e3c756ce6d2efc2a0b3abad1a4 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Fri, 19 Oct 2012 08:45:26 -0700 Subject: [PATCH 04/34] ARM: OMAP2+: Remove unnecessary message when no SHA IP @@ -10,7 +10,7 @@ present to make it consistent with all the other IPs. CC: Paul Walmsley Signed-off-by: Mark A. Greer --- - arch/arm/mach-omap2/devices.c | 19 +++++++------------ + arch/arm/mach-omap2/devices.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c @@ -46,5 +46,5 @@ index 3d1693b..8e89bad 100644 #if defined(CONFIG_CRYPTO_DEV_OMAP_AES) || defined(CONFIG_CRYPTO_DEV_OMAP_AES_MODULE) -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0005-ARM-OMAP2-Only-manually-add-hwmod-data-when-DT-not-u.patch b/patches/crypto/0005-ARM-OMAP2-Only-manually-add-hwmod-data-when-DT-not-u.patch index 0b3deb8a..8a3bda12 100644 --- a/patches/crypto/0005-ARM-OMAP2-Only-manually-add-hwmod-data-when-DT-not-u.patch +++ b/patches/crypto/0005-ARM-OMAP2-Only-manually-add-hwmod-data-when-DT-not-u.patch @@ -1,4 +1,4 @@ -From 8f93c3c820860c11effc4d602f5b75d10c3aff5b Mon Sep 17 00:00:00 2001 +From 329de811d21d06fe117428c73a565035e5e55a66 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Mon, 17 Dec 2012 16:01:15 -0700 Subject: [PATCH 05/34] ARM: OMAP2+: Only manually add hwmod data when DT not @@ -10,7 +10,7 @@ called when there is no device tree present. CC: Paul Walmsley Signed-off-by: Mark A. Greer --- - arch/arm/mach-omap2/devices.c | 2 +- + arch/arm/mach-omap2/devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c @@ -30,5 +30,5 @@ index 8e89bad..62300ec 100644 omap_init_vout(); omap_init_ocp2scp(); -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0006-ARM-AM33XX-Add-sha0-crypto-clock-data.patch b/patches/crypto/0006-ARM-AM33XX-Add-sha0-crypto-clock-data.patch index f82086e8..e426c885 100644 --- a/patches/crypto/0006-ARM-AM33XX-Add-sha0-crypto-clock-data.patch +++ b/patches/crypto/0006-ARM-AM33XX-Add-sha0-crypto-clock-data.patch @@ -1,4 +1,4 @@ -From e4a55e302aede4d3c88e4f10676b93c7487c1176 Mon Sep 17 00:00:00 2001 +From 0beee5a06ffe92eca9040520bf7505d8d163baee Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Mon, 17 Dec 2012 15:57:48 -0700 Subject: [PATCH 06/34] ARM: AM33XX: Add sha0 crypto clock data @@ -9,7 +9,7 @@ on the am33xx SoC. CC: Paul Walmsley Signed-off-by: Mark A. Greer --- - arch/arm/mach-omap2/cclock33xx_data.c | 5 +++++ + arch/arm/mach-omap2/cclock33xx_data.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c @@ -36,5 +36,5 @@ index 2e2d579..e69155d 100644 CLK(NULL, "timer2_fck", &timer2_fck, CK_AM33XX), CLK(NULL, "timer3_fck", &timer3_fck, CK_AM33XX), -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0007-ARM-AM33XX-hwmod-Update-and-uncomment-SHA0-module-da.patch b/patches/crypto/0007-ARM-AM33XX-hwmod-Update-and-uncomment-SHA0-module-da.patch index 9cbd3821..68108cc2 100644 --- a/patches/crypto/0007-ARM-AM33XX-hwmod-Update-and-uncomment-SHA0-module-da.patch +++ b/patches/crypto/0007-ARM-AM33XX-hwmod-Update-and-uncomment-SHA0-module-da.patch @@ -1,4 +1,4 @@ -From 96f1e0015b54f06278b7494b376982a389bcf3c3 Mon Sep 17 00:00:00 2001 +From f02b7337bab297d7e32d07805efce93b907bf716 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Mon, 17 Dec 2012 15:55:45 -0700 Subject: [PATCH 07/34] ARM: AM33XX: hwmod: Update and uncomment SHA0 module @@ -11,7 +11,7 @@ inside so the data is actually available for use. CC: Paul Walmsley Signed-off-by: Mark A. Greer --- - arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 43 ++++++++++++++++++++++++---- + arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 43 +++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c @@ -110,5 +110,5 @@ index e54e7a1..87c7dee 100644 }; -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0008-ARM-dts-Add-SHAM-data-and-documentation-for-AM33XX.patch b/patches/crypto/0008-ARM-dts-Add-SHAM-data-and-documentation-for-AM33XX.patch index e0d5170a..7e977291 100644 --- a/patches/crypto/0008-ARM-dts-Add-SHAM-data-and-documentation-for-AM33XX.patch +++ b/patches/crypto/0008-ARM-dts-Add-SHAM-data-and-documentation-for-AM33XX.patch @@ -1,4 +1,4 @@ -From 472c2e66d7fed23f499f0d437e220654ce505f72 Mon Sep 17 00:00:00 2001 +From e8d880cd49a0f62abef0f7605cad402eeb4fc01d Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Mon, 17 Dec 2012 16:16:27 -0700 Subject: [PATCH 08/34] ARM: dts: Add SHAM data and documentation for AM33XX @@ -11,11 +11,11 @@ for the SHAM module. CC: Paul Walmsley Signed-off-by: Mark A. Greer --- - .../devicetree/bindings/crypto/omap-sham.txt | 35 ++++++++++++++++++++ - arch/arm/boot/dts/am335x-bone.dts | 4 +++ - arch/arm/boot/dts/am335x-evm.dts | 4 +++ - arch/arm/boot/dts/am335x-evmsk.dts | 4 +++ - arch/arm/boot/dts/am33xx.dtsi | 12 +++++++ + .../devicetree/bindings/crypto/omap-sham.txt | 35 ++++++++++++++++++++++ + arch/arm/boot/dts/am335x-bone.dts | 4 +++ + arch/arm/boot/dts/am335x-evm.dts | 4 +++ + arch/arm/boot/dts/am335x-evmsk.dts | 4 +++ + arch/arm/boot/dts/am33xx.dtsi | 12 ++++++++ 5 files changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/crypto/omap-sham.txt @@ -61,7 +61,7 @@ index 0000000..53839cc + dma-names = "rx"; + }; diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts -index 874997b..5254b64 100644 +index 8dd66b4..af0a16d 100644 --- a/arch/arm/boot/dts/am335x-bone.dts +++ b/arch/arm/boot/dts/am335x-bone.dts @@ -281,3 +281,7 @@ @@ -119,5 +119,5 @@ index 0087b13..fa94f6e 100644 }; }; -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0009-ARM-OMAP2xxx-hwmod-Convert-AES-crypto-devcie-data-to.patch b/patches/crypto/0009-ARM-OMAP2xxx-hwmod-Convert-AES-crypto-devcie-data-to.patch index 652f405b..7494b3c6 100644 --- a/patches/crypto/0009-ARM-OMAP2xxx-hwmod-Convert-AES-crypto-devcie-data-to.patch +++ b/patches/crypto/0009-ARM-OMAP2xxx-hwmod-Convert-AES-crypto-devcie-data-to.patch @@ -1,8 +1,8 @@ -From 28fe96184cb91671ebc326ec172be6a49ade3a12 Mon Sep 17 00:00:00 2001 +From 6221127431a544c59d608685789d9184fea729ce Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Wed, 7 Nov 2012 12:16:49 -0700 -Subject: [PATCH 09/34] ARM: OMAP2xxx: hwmod: Convert AES crypto devcie data - to hwmod +Subject: [PATCH 09/34] ARM: OMAP2xxx: hwmod: Convert AES crypto devcie data to + hwmod Convert the device data for the OMAP2 AES crypto IP from explicit platform_data to hwmod. @@ -10,13 +10,13 @@ explicit platform_data to hwmod. CC: Paul Walmsley Signed-off-by: Mark A. Greer --- - arch/arm/mach-omap2/cclock2430_data.c | 3 +- - arch/arm/mach-omap2/devices.c | 36 ++++++------------- - arch/arm/mach-omap2/omap_hwmod_2420_data.c | 1 + - arch/arm/mach-omap2/omap_hwmod_2430_data.c | 1 + - .../mach-omap2/omap_hwmod_2xxx_interconnect_data.c | 18 ++++++++++ - arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | 38 ++++++++++++++++++++ - arch/arm/mach-omap2/omap_hwmod_common_data.h | 2 ++ + arch/arm/mach-omap2/cclock2430_data.c | 3 +- + arch/arm/mach-omap2/devices.c | 36 +++++++------------- + arch/arm/mach-omap2/omap_hwmod_2420_data.c | 1 + + arch/arm/mach-omap2/omap_hwmod_2430_data.c | 1 + + .../mach-omap2/omap_hwmod_2xxx_interconnect_data.c | 18 ++++++++++ + arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | 38 ++++++++++++++++++++++ + arch/arm/mach-omap2/omap_hwmod_common_data.h | 2 ++ 7 files changed, 73 insertions(+), 26 deletions(-) diff --git a/arch/arm/mach-omap2/cclock2430_data.c b/arch/arm/mach-omap2/cclock2430_data.c @@ -218,5 +218,5 @@ index 928acd5..6e04ff7 100644 /* Common IP block data */ extern struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[]; -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0010-ARM-OMAP3xxx-hwmod-Convert-AES-crypto-device-data-to.patch b/patches/crypto/0010-ARM-OMAP3xxx-hwmod-Convert-AES-crypto-device-data-to.patch index 340f4817..1c55d511 100644 --- a/patches/crypto/0010-ARM-OMAP3xxx-hwmod-Convert-AES-crypto-device-data-to.patch +++ b/patches/crypto/0010-ARM-OMAP3xxx-hwmod-Convert-AES-crypto-device-data-to.patch @@ -1,8 +1,8 @@ -From 0de43d72027c5df132e8b7a96fe98b578bcd2713 Mon Sep 17 00:00:00 2001 +From 2bf0361663fadfb30994657dbeb891cef3467667 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Sun, 11 Nov 2012 19:08:24 -0700 -Subject: [PATCH 10/34] ARM: OMAP3xxx: hwmod: Convert AES crypto device data - to hwmod +Subject: [PATCH 10/34] ARM: OMAP3xxx: hwmod: Convert AES crypto device data to + hwmod Convert the device data for the OMAP3 AES crypto IP from explicit platform_data to hwmod. @@ -10,9 +10,9 @@ from explicit platform_data to hwmod. CC: Paul Walmsley Signed-off-by: Mark A. Greer --- - arch/arm/mach-omap2/cclock3xxx_data.c | 3 +- - arch/arm/mach-omap2/devices.c | 42 +------------------ - arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 62 ++++++++++++++++++++++++++++ + arch/arm/mach-omap2/cclock3xxx_data.c | 3 +- + arch/arm/mach-omap2/devices.c | 42 +------------------- + arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 62 ++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 41 deletions(-) diff --git a/arch/arm/mach-omap2/cclock3xxx_data.c b/arch/arm/mach-omap2/cclock3xxx_data.c @@ -176,5 +176,5 @@ index 122b4dc6..85d1b08 100644 }; -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0011-ARM-OMAP2-Remove-unnecessary-message-when-no-AES-IP-.patch b/patches/crypto/0011-ARM-OMAP2-Remove-unnecessary-message-when-no-AES-IP-.patch index 450eb3f8..ce8f6a78 100644 --- a/patches/crypto/0011-ARM-OMAP2-Remove-unnecessary-message-when-no-AES-IP-.patch +++ b/patches/crypto/0011-ARM-OMAP2-Remove-unnecessary-message-when-no-AES-IP-.patch @@ -1,4 +1,4 @@ -From d1b285a3bd840e8fb8db764c840211969456d14f Mon Sep 17 00:00:00 2001 +From da28e04e646d3853e8cb6bdabfbab56d2de8e856 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Sun, 11 Nov 2012 19:56:28 -0700 Subject: [PATCH 11/34] ARM: OMAP2+: Remove unnecessary message when no AES IP @@ -10,7 +10,7 @@ present to make it consistent with all the other IPs. CC: Paul Walmsley Signed-off-by: Mark A. Greer --- - arch/arm/mach-omap2/devices.c | 23 +++++++++-------------- + arch/arm/mach-omap2/devices.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c @@ -48,5 +48,5 @@ index 91e5a21..5f873c2 100644 /*-------------------------------------------------------------------------*/ -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0012-ARM-OMAP2-Only-manually-add-hwmod-data-when-DT-not-u.patch b/patches/crypto/0012-ARM-OMAP2-Only-manually-add-hwmod-data-when-DT-not-u.patch index 05500481..55c00663 100644 --- a/patches/crypto/0012-ARM-OMAP2-Only-manually-add-hwmod-data-when-DT-not-u.patch +++ b/patches/crypto/0012-ARM-OMAP2-Only-manually-add-hwmod-data-when-DT-not-u.patch @@ -1,4 +1,4 @@ -From 061f789e04a416210c440806b753ef841fe911af Mon Sep 17 00:00:00 2001 +From d1af27eb65bf80fd95ef1618f3c946ece41802a4 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Wed, 19 Dec 2012 20:53:38 -0700 Subject: [PATCH 12/34] ARM: OMAP2+: Only manually add hwmod data when DT not @@ -10,7 +10,7 @@ called when there is no device tree present. CC: Paul Walmsley Signed-off-by: Mark A. Greer --- - arch/arm/mach-omap2/devices.c | 2 +- + arch/arm/mach-omap2/devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c @@ -30,5 +30,5 @@ index 5f873c2..a6d8070 100644 omap_init_ocp2scp(); if (soc_is_am33xx()) { -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0013-ARM-AM33XX-Add-aes0-crypto-clock-data.patch b/patches/crypto/0013-ARM-AM33XX-Add-aes0-crypto-clock-data.patch index e93acd0c..1c39cf21 100644 --- a/patches/crypto/0013-ARM-AM33XX-Add-aes0-crypto-clock-data.patch +++ b/patches/crypto/0013-ARM-AM33XX-Add-aes0-crypto-clock-data.patch @@ -1,4 +1,4 @@ -From 9fd049e9e218438e51dd04780cc86cd2e11427dc Mon Sep 17 00:00:00 2001 +From ccc18074f54563a1547ac17431edc94793891283 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Wed, 19 Dec 2012 21:05:46 -0700 Subject: [PATCH 13/34] ARM: AM33XX: Add aes0 crypto clock data @@ -9,7 +9,7 @@ on the am33xx SoC. CC: Paul Walmsley Signed-off-by: Mark A. Greer --- - arch/arm/mach-omap2/cclock33xx_data.c | 5 +++++ + arch/arm/mach-omap2/cclock33xx_data.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c @@ -36,5 +36,5 @@ index e69155d..743dce4 100644 CLK(NULL, "timer2_fck", &timer2_fck, CK_AM33XX), CLK(NULL, "timer3_fck", &timer3_fck, CK_AM33XX), -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0014-ARM-AM33XX-hwmod-Update-and-uncomment-AES0-module-da.patch b/patches/crypto/0014-ARM-AM33XX-hwmod-Update-and-uncomment-AES0-module-da.patch index 3de15a7d..70181b1c 100644 --- a/patches/crypto/0014-ARM-AM33XX-hwmod-Update-and-uncomment-AES0-module-da.patch +++ b/patches/crypto/0014-ARM-AM33XX-hwmod-Update-and-uncomment-AES0-module-da.patch @@ -1,4 +1,4 @@ -From 3464215cc9b2950ca7614f5bd5e8901b3d6a2d7e Mon Sep 17 00:00:00 2001 +From b3834d70b86ff535562d3518c325402a008a98f6 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Wed, 19 Dec 2012 21:17:07 -0700 Subject: [PATCH 14/34] ARM: AM33XX: hwmod: Update and uncomment AES0 module @@ -11,7 +11,7 @@ inside so the data is actually available for use. CC: Paul Walmsley Signed-off-by: Mark A. Greer --- - arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 51 +++++++++++++++++++++++----- + arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 51 ++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c @@ -117,5 +117,5 @@ index 87c7dee..a180336 100644 }; -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0015-ARM-dts-Add-AES-data-and-documentation-for-AM33XX.patch b/patches/crypto/0015-ARM-dts-Add-AES-data-and-documentation-for-AM33XX.patch index f8b9a409..adbaaf09 100644 --- a/patches/crypto/0015-ARM-dts-Add-AES-data-and-documentation-for-AM33XX.patch +++ b/patches/crypto/0015-ARM-dts-Add-AES-data-and-documentation-for-AM33XX.patch @@ -1,4 +1,4 @@ -From d66621211acf3cbe66fdd901840095a7db8ac437 Mon Sep 17 00:00:00 2001 +From 62a33a364b6a5a3480546eda4ac36e01625dbb3d Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Thu, 20 Dec 2012 09:46:13 -0700 Subject: [PATCH 15/34] ARM: dts: Add AES data and documentation for AM33XX @@ -11,11 +11,11 @@ for the AES module. CC: Paul Walmsley Signed-off-by: Mark A. Greer --- - .../devicetree/bindings/crypto/omap-aes.txt | 37 ++++++++++++++++++++ - arch/arm/boot/dts/am335x-bone.dts | 4 +++ - arch/arm/boot/dts/am335x-evm.dts | 4 +++ - arch/arm/boot/dts/am335x-evmsk.dts | 4 +++ - arch/arm/boot/dts/am33xx.dtsi | 13 +++++++ + .../devicetree/bindings/crypto/omap-aes.txt | 37 ++++++++++++++++++++++ + arch/arm/boot/dts/am335x-bone.dts | 4 +++ + arch/arm/boot/dts/am335x-evm.dts | 4 +++ + arch/arm/boot/dts/am335x-evmsk.dts | 4 +++ + arch/arm/boot/dts/am33xx.dtsi | 13 ++++++++ 5 files changed, 62 insertions(+) create mode 100644 Documentation/devicetree/bindings/crypto/omap-aes.txt @@ -63,7 +63,7 @@ index 0000000..6b21256 + dma-names = "tx", "rx"; + }; diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts -index 5254b64..bf87ceb 100644 +index af0a16d..8e62bd5 100644 --- a/arch/arm/boot/dts/am335x-bone.dts +++ b/arch/arm/boot/dts/am335x-bone.dts @@ -285,3 +285,7 @@ @@ -122,5 +122,5 @@ index fa94f6e..6dcd42a 100644 }; }; -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0016-crypto-omap-sham-Remove-unnecessary-pr_info-noise.patch b/patches/crypto/0016-crypto-omap-sham-Remove-unnecessary-pr_info-noise.patch index 994f8153..64820016 100644 --- a/patches/crypto/0016-crypto-omap-sham-Remove-unnecessary-pr_info-noise.patch +++ b/patches/crypto/0016-crypto-omap-sham-Remove-unnecessary-pr_info-noise.patch @@ -1,4 +1,4 @@ -From bb807c5d28d9b6cd042a6fed8a46ed7e2275bade Mon Sep 17 00:00:00 2001 +From 6a3cf4030b3a81a9b194b8bec581fdc26cc33753 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Mon, 17 Dec 2012 11:21:46 -0700 Subject: [PATCH 16/34] crypto: omap-sham - Remove unnecessary pr_info noise @@ -8,7 +8,7 @@ Remove the unnecessary pr_info() call in omap_sham_mod_init(). CC: Dmitry Kasatkin Signed-off-by: Mark A. Greer --- - drivers/crypto/omap-sham.c | 2 -- + drivers/crypto/omap-sham.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c @@ -25,5 +25,5 @@ index 90d34ad..344f713 100644 } -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0017-crypto-omap-sham-Convert-to-use-pm_runtime-API.patch b/patches/crypto/0017-crypto-omap-sham-Convert-to-use-pm_runtime-API.patch index 4f00645e..766565cc 100644 --- a/patches/crypto/0017-crypto-omap-sham-Convert-to-use-pm_runtime-API.patch +++ b/patches/crypto/0017-crypto-omap-sham-Convert-to-use-pm_runtime-API.patch @@ -1,4 +1,4 @@ -From ee3ab2fe248cbc5262a18b5ea17daaccb01134aa Mon Sep 17 00:00:00 2001 +From 1e1c4a3c7f89daa65c7bc943a31d7f46323c3779 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Wed, 10 Oct 2012 10:12:13 -0700 Subject: [PATCH 17/34] crypto: omap-sham - Convert to use pm_runtime API @@ -10,7 +10,7 @@ CC: Kevin Hilman CC: Dmitry Kasatkin Signed-off-by: Mark A. Greer --- - drivers/crypto/omap-sham.c | 28 +++++++++++----------------- + drivers/crypto/omap-sham.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c @@ -111,5 +111,5 @@ index 344f713..4a228c5 100644 if (dd->irq >= 0) free_irq(dd->irq, dd); -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0018-crypto-omap-sham-Add-suspend-resume-support.patch b/patches/crypto/0018-crypto-omap-sham-Add-suspend-resume-support.patch index 44fa7ed8..44adabc5 100644 --- a/patches/crypto/0018-crypto-omap-sham-Add-suspend-resume-support.patch +++ b/patches/crypto/0018-crypto-omap-sham-Add-suspend-resume-support.patch @@ -1,4 +1,4 @@ -From 903988fb3a32b20751cf9fbd201ada1ad5e48734 Mon Sep 17 00:00:00 2001 +From 8d20df5648baaf1ae953aa150a46edadd44c4f9f Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Fri, 14 Dec 2012 12:50:15 -0700 Subject: [PATCH 18/34] crypto: omap-sham - Add suspend/resume support @@ -8,7 +8,7 @@ Add suspend/resume support to the OMAP SHAM driver. CC: Dmitry Kasatkin Signed-off-by: Mark A. Greer --- - drivers/crypto/omap-sham.c | 19 +++++++++++++++++++ + drivers/crypto/omap-sham.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c @@ -48,5 +48,5 @@ index 4a228c5..b7949a0 100644 }; -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0019-crypto-omap-sham-Add-code-to-use-dmaengine-API.patch b/patches/crypto/0019-crypto-omap-sham-Add-code-to-use-dmaengine-API.patch index 15eee775..2ba4850f 100644 --- a/patches/crypto/0019-crypto-omap-sham-Add-code-to-use-dmaengine-API.patch +++ b/patches/crypto/0019-crypto-omap-sham-Add-code-to-use-dmaengine-API.patch @@ -1,4 +1,4 @@ -From 4e239d7196f446823be2a8c7ad6d6a2bef9823b9 Mon Sep 17 00:00:00 2001 +From a68083d845deb778cbce81516af1c4cf24a108b5 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Fri, 12 Oct 2012 11:47:09 -0700 Subject: [PATCH 19/34] crypto: omap-sham - Add code to use dmaengine API @@ -16,7 +16,7 @@ CC: Russell King CC: Dmitry Kasatkin Signed-off-by: Mark A. Greer --- - drivers/crypto/omap-sham.c | 154 +++++++++++++++++++++++++++++++++++++++++--- + drivers/crypto/omap-sham.c | 154 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 145 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c @@ -369,5 +369,5 @@ index b7949a0..57cb76a 100644 free_irq(dd->irq, dd); kfree(dd); -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0020-crypto-omap-sham-Remove-usage-of-private-DMA-API.patch b/patches/crypto/0020-crypto-omap-sham-Remove-usage-of-private-DMA-API.patch index 04eb3a42..a6ee2158 100644 --- a/patches/crypto/0020-crypto-omap-sham-Remove-usage-of-private-DMA-API.patch +++ b/patches/crypto/0020-crypto-omap-sham-Remove-usage-of-private-DMA-API.patch @@ -1,4 +1,4 @@ -From d4197d2a48d24aa29c048b3453b963a0f1bdb989 Mon Sep 17 00:00:00 2001 +From d525cd016d79bbbf614be6874f76171571257b11 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Wed, 17 Oct 2012 22:03:37 -0700 Subject: [PATCH 20/34] crypto: omap-sham - Remove usage of private DMA API @@ -10,7 +10,7 @@ CC: Russell King CC: Dmitry Kasatkin Signed-off-by: Mark A. Greer --- - drivers/crypto/omap-sham.c | 109 -------------------------------------------- + drivers/crypto/omap-sham.c | 109 --------------------------------------------- 1 file changed, 109 deletions(-) diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c @@ -273,5 +273,5 @@ index 57cb76a..1c752a2 100644 free_irq(dd->irq, dd); kfree(dd); -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0021-crypto-omap-sham-Add-Device-Tree-Support.patch b/patches/crypto/0021-crypto-omap-sham-Add-Device-Tree-Support.patch index 24f73a5d..5368599a 100644 --- a/patches/crypto/0021-crypto-omap-sham-Add-Device-Tree-Support.patch +++ b/patches/crypto/0021-crypto-omap-sham-Add-Device-Tree-Support.patch @@ -1,4 +1,4 @@ -From d9e6a0c0c1ee12e1bf3713ad5e6644dd1889ebcd Mon Sep 17 00:00:00 2001 +From b72de85ec9c8ff68433cad56d8b8f96b4f23813a Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Tue, 18 Dec 2012 10:03:02 -0700 Subject: [PATCH 21/34] crypto: omap-sham - Add Device Tree Support @@ -11,7 +11,7 @@ be added in a subsequent patch. CC: Dmitry Kasatkin Signed-off-by: Mark A. Greer --- - drivers/crypto/omap-sham.c | 139 +++++++++++++++++++++++++++++++++----------- + drivers/crypto/omap-sham.c | 139 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 106 insertions(+), 33 deletions(-) diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c @@ -231,5 +231,5 @@ index 1c752a2..797c905 100644 }; -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0022-crypto-omap-sham-Convert-to-dma_request_slave_channe.patch b/patches/crypto/0022-crypto-omap-sham-Convert-to-dma_request_slave_channe.patch index 7b82d31d..2b63cfb9 100644 --- a/patches/crypto/0022-crypto-omap-sham-Convert-to-dma_request_slave_channe.patch +++ b/patches/crypto/0022-crypto-omap-sham-Convert-to-dma_request_slave_channe.patch @@ -1,4 +1,4 @@ -From 4bc2cc7a85b0b34101b2c634e18fa36b3a78377a Mon Sep 17 00:00:00 2001 +From e64f677fbe949fcdf9c2341c4031ba1afd48f43d Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Tue, 18 Dec 2012 20:35:20 -0700 Subject: [PATCH 22/34] crypto: omap-sham - Convert to @@ -11,7 +11,7 @@ This allows the omap-sham driver use different DMA engines. CC: Dmitry Kasatkin Signed-off-by: Mark A. Greer --- - drivers/crypto/omap-sham.c | 3 ++- + drivers/crypto/omap-sham.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c @@ -29,5 +29,5 @@ index 797c905..0814bd6 100644 dev_err(dev, "unable to obtain RX DMA engine channel %u\n", dd->dma); -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0023-crypto-omap-sham-Add-OMAP4-AM33XX-SHAM-Support.patch b/patches/crypto/0023-crypto-omap-sham-Add-OMAP4-AM33XX-SHAM-Support.patch index f2e8824c..bcc637b9 100644 --- a/patches/crypto/0023-crypto-omap-sham-Add-OMAP4-AM33XX-SHAM-Support.patch +++ b/patches/crypto/0023-crypto-omap-sham-Add-OMAP4-AM33XX-SHAM-Support.patch @@ -1,4 +1,4 @@ -From 3848054117f651f88f67ed0230dd9f64efcafff7 Mon Sep 17 00:00:00 2001 +From d473cdfac6050fbf6e6f06179472a51c4b7cb149 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Tue, 18 Dec 2012 20:55:48 -0700 Subject: [PATCH 23/34] crypto: omap-sham - Add OMAP4/AM33XX SHAM Support @@ -24,7 +24,7 @@ CC: Greg Turner CC: Dmitry Kasatkin Signed-off-by: Mark A. Greer --- - drivers/crypto/omap-sham.c | 416 +++++++++++++++++++++++++++++++++++--------- + drivers/crypto/omap-sham.c | 416 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 332 insertions(+), 84 deletions(-) diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c @@ -761,5 +761,5 @@ index 0814bd6..c8bfe71 100644 dma_err: free_irq(dd->irq, dd); -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0024-crypto-omap-sham-Add-SHA224-and-SHA256-Support.patch b/patches/crypto/0024-crypto-omap-sham-Add-SHA224-and-SHA256-Support.patch index 3b9ba359..1223a4ce 100644 --- a/patches/crypto/0024-crypto-omap-sham-Add-SHA224-and-SHA256-Support.patch +++ b/patches/crypto/0024-crypto-omap-sham-Add-SHA224-and-SHA256-Support.patch @@ -1,4 +1,4 @@ -From 90dc8bd5372aa6f4c37cddafcfaa58ea8a05225f Mon Sep 17 00:00:00 2001 +From 32dc4ce5ae89945b3314d4160d9ab5e7c6027ed5 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Tue, 18 Dec 2012 21:50:08 -0700 Subject: [PATCH 24/34] crypto: omap-sham - Add SHA224 and SHA256 Support @@ -20,7 +20,7 @@ CC: Greg Turner CC: Dmitry Kasatkin Signed-off-by: Mark A. Greer --- - drivers/crypto/omap-sham.c | 183 +++++++++++++++++++++++++++++++++++++++++--- + drivers/crypto/omap-sham.c | 183 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 173 insertions(+), 10 deletions(-) diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c @@ -310,5 +310,5 @@ index c8bfe71..696a7d5 100644 pm_runtime_disable(&pdev->dev); dma_release_channel(dd->dma_lch); -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0025-crypto-omap-aes-Remmove-unnecessary-pr_info-noise.patch b/patches/crypto/0025-crypto-omap-aes-Remmove-unnecessary-pr_info-noise.patch index c3aa4e18..2dc55f7b 100644 --- a/patches/crypto/0025-crypto-omap-aes-Remmove-unnecessary-pr_info-noise.patch +++ b/patches/crypto/0025-crypto-omap-aes-Remmove-unnecessary-pr_info-noise.patch @@ -1,4 +1,4 @@ -From 533070c851fc89ffb0ade35c7a97a32d566ce42c Mon Sep 17 00:00:00 2001 +From ab4041165ae3f223dadc600a256094489e6faa0f Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Thu, 20 Dec 2012 09:58:48 -0700 Subject: [PATCH 25/34] crypto: omap-aes - Remmove unnecessary pr_info noise @@ -9,7 +9,7 @@ and omap_aes_mod_init(). CC: Dmitry Kasatkin Signed-off-by: Mark A. Greer --- - drivers/crypto/omap-aes.c | 4 ---- + drivers/crypto/omap-aes.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c @@ -35,5 +35,5 @@ index e66e8ee..481da71 100644 } -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0026-crypto-omap-aes-Don-t-reset-controller-for-every-ope.patch b/patches/crypto/0026-crypto-omap-aes-Don-t-reset-controller-for-every-ope.patch index e89988ad..fd6f7a33 100644 --- a/patches/crypto/0026-crypto-omap-aes-Don-t-reset-controller-for-every-ope.patch +++ b/patches/crypto/0026-crypto-omap-aes-Don-t-reset-controller-for-every-ope.patch @@ -1,4 +1,4 @@ -From abacee7b2dc0717069368e8d28002ca5f0cfbfaa Mon Sep 17 00:00:00 2001 +From 7ef0a82121a5779794d27ec5ba12227055edff6c Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Wed, 28 Nov 2012 15:14:05 -0700 Subject: [PATCH 26/34] crypto: omap-aes - Don't reset controller for every @@ -11,7 +11,7 @@ remove the reset code from the omap-aes driver. CC: Dmitry Kasatkin Signed-off-by: Mark A. Greer --- - drivers/crypto/omap-aes.c | 27 --------------------------- + drivers/crypto/omap-aes.c | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c @@ -60,5 +60,5 @@ index 481da71..33cd783 100644 dd->err = 0; } -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0027-crypto-omap-aes-Convert-to-use-pm_runtime-API.patch b/patches/crypto/0027-crypto-omap-aes-Convert-to-use-pm_runtime-API.patch index a4d54844..06daea3b 100644 --- a/patches/crypto/0027-crypto-omap-aes-Convert-to-use-pm_runtime-API.patch +++ b/patches/crypto/0027-crypto-omap-aes-Convert-to-use-pm_runtime-API.patch @@ -1,4 +1,4 @@ -From 2bc70e7911c4d648bcef9e8952c59ebe4cb71bf9 Mon Sep 17 00:00:00 2001 +From 50a9002715b14cbd7fd4008ec1e7e7705b57fcf2 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Sun, 11 Nov 2012 21:00:37 -0700 Subject: [PATCH 27/34] crypto: omap-aes - Convert to use pm_runtime API @@ -10,7 +10,7 @@ CC: Kevin Hilman CC: Dmitry Kasatkin Signed-off-by: Mark A. Greer --- - drivers/crypto/omap-aes.c | 29 +++++++++++------------------ + drivers/crypto/omap-aes.c | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c @@ -108,5 +108,5 @@ index 33cd783..c229852 100644 dd = NULL; -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0028-crypto-omap-aes-Add-suspend-resume-support.patch b/patches/crypto/0028-crypto-omap-aes-Add-suspend-resume-support.patch index 0f58b76a..b8b3e34b 100644 --- a/patches/crypto/0028-crypto-omap-aes-Add-suspend-resume-support.patch +++ b/patches/crypto/0028-crypto-omap-aes-Add-suspend-resume-support.patch @@ -1,4 +1,4 @@ -From 8a1bb91ec69abce1f942dda54d0f2b5c1ec2f882 Mon Sep 17 00:00:00 2001 +From 79bbf68177613dc8b9a198be391a61b7c7c92f19 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Thu, 20 Dec 2012 10:24:33 -0700 Subject: [PATCH 28/34] crypto: omap-aes - Add suspend/resume support @@ -8,7 +8,7 @@ Add suspend/resume support to the OMAP AES driver. CC: Dmitry Kasatkin Signed-off-by: Mark A. Greer --- - drivers/crypto/omap-aes.c | 19 +++++++++++++++++++ + drivers/crypto/omap-aes.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c @@ -48,5 +48,5 @@ index c229852..3262139 100644 }; -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0029-crypto-omap-aes-Add-code-to-use-dmaengine-API.patch b/patches/crypto/0029-crypto-omap-aes-Add-code-to-use-dmaengine-API.patch index 7691d534..6858666f 100644 --- a/patches/crypto/0029-crypto-omap-aes-Add-code-to-use-dmaengine-API.patch +++ b/patches/crypto/0029-crypto-omap-aes-Add-code-to-use-dmaengine-API.patch @@ -1,4 +1,4 @@ -From 42b989eadd15537eda60831a78805c2d8bbcbec3 Mon Sep 17 00:00:00 2001 +From 5a2b3147a176541e1820c6824bec94d9c67fae34 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Wed, 14 Nov 2012 09:30:10 -0700 Subject: [PATCH 29/34] crypto: omap-aes - Add code to use dmaengine API @@ -12,7 +12,7 @@ CC: Russell King CC: Dmitry Kasatkin Signed-off-by: Mark A. Greer --- - drivers/crypto/omap-aes.c | 184 ++++++++++++++++++++++++++++++++++++++++++++- + drivers/crypto/omap-aes.c | 184 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 183 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c @@ -384,5 +384,5 @@ index 3262139..14ec9e2 100644 if (dd->flags & FLAGS_FAST) { dma_unmap_sg(dd->dev, dd->out_sg, 1, DMA_FROM_DEVICE); -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0030-crypto-omap-aes-Remove-usage-of-private-DMA-API.patch b/patches/crypto/0030-crypto-omap-aes-Remove-usage-of-private-DMA-API.patch index 5e24fd7f..8ce80775 100644 --- a/patches/crypto/0030-crypto-omap-aes-Remove-usage-of-private-DMA-API.patch +++ b/patches/crypto/0030-crypto-omap-aes-Remove-usage-of-private-DMA-API.patch @@ -1,4 +1,4 @@ -From eb985e3b1bf2848ae7b6e537bd24cb5dcfcbb46c Mon Sep 17 00:00:00 2001 +From 6b4d42d6e20021ab30e7c58ae1d6cb368ebd0de4 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Thu, 15 Nov 2012 22:11:36 -0700 Subject: [PATCH 30/34] crypto: omap-aes - Remove usage of private DMA API @@ -10,7 +10,7 @@ CC: Russell King CC: Dmitry Kasatkin Signed-off-by: Mark A. Greer --- - drivers/crypto/omap-aes.c | 133 --------------------------------------------- + drivers/crypto/omap-aes.c | 133 ---------------------------------------------- 1 file changed, 133 deletions(-) diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c @@ -327,5 +327,5 @@ index 14ec9e2..faf522f 100644 if (dd->flags & FLAGS_FAST) { dma_unmap_sg(dd->dev, dd->out_sg, 1, DMA_FROM_DEVICE); -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0031-crypto-omap-aes-Add-Device-Tree-Support.patch b/patches/crypto/0031-crypto-omap-aes-Add-Device-Tree-Support.patch index 14c2a8d2..deea8c00 100644 --- a/patches/crypto/0031-crypto-omap-aes-Add-Device-Tree-Support.patch +++ b/patches/crypto/0031-crypto-omap-aes-Add-Device-Tree-Support.patch @@ -1,4 +1,4 @@ -From 387380e116ca3d4b4cb891db51d8be8247cb742d Mon Sep 17 00:00:00 2001 +From b42f118bf679e6a8ce329f1910c91656993216e3 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Thu, 20 Dec 2012 13:40:47 -0700 Subject: [PATCH 31/34] crypto: omap-aes - Add Device Tree Support @@ -11,7 +11,7 @@ be added in a subsequent patch. CC: Dmitry Kasatkin Signed-off-by: Mark A. Greer --- - drivers/crypto/omap-aes.c | 123 +++++++++++++++++++++++++++++++++++---------- + drivers/crypto/omap-aes.c | 123 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 97 insertions(+), 26 deletions(-) diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c @@ -194,5 +194,5 @@ index faf522f..dfebd40 100644 }; -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0032-crypto-omap-aes-Convert-to-dma_request_slave_channel.patch b/patches/crypto/0032-crypto-omap-aes-Convert-to-dma_request_slave_channel.patch index 92001a62..0ec7c669 100644 --- a/patches/crypto/0032-crypto-omap-aes-Convert-to-dma_request_slave_channel.patch +++ b/patches/crypto/0032-crypto-omap-aes-Convert-to-dma_request_slave_channel.patch @@ -1,4 +1,4 @@ -From 7c53de04ef91a678c0db172c9b5bd0bf86fc6f56 Mon Sep 17 00:00:00 2001 +From 6fd927a60965cdccc82a5aad451759dc77eab376 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Thu, 20 Dec 2012 14:05:57 -0700 Subject: [PATCH 32/34] crypto: omap-aes - Convert to @@ -11,7 +11,7 @@ This allows the omap-aes driver use different DMA engines. CC: Dmitry Kasatkin Signed-off-by: Mark A. Greer --- - drivers/crypto/omap-aes.c | 12 ++++++++---- + drivers/crypto/omap-aes.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c @@ -43,5 +43,5 @@ index dfebd40..d34aa5d 100644 dev_err(dd->dev, "Unable to request out DMA channel\n"); goto err_dma_out; -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0033-crypto-omap-aes-Add-OMAP4-AM33XX-AES-Support.patch b/patches/crypto/0033-crypto-omap-aes-Add-OMAP4-AM33XX-AES-Support.patch index aa88387e..a3e7beb9 100644 --- a/patches/crypto/0033-crypto-omap-aes-Add-OMAP4-AM33XX-AES-Support.patch +++ b/patches/crypto/0033-crypto-omap-aes-Add-OMAP4-AM33XX-AES-Support.patch @@ -1,4 +1,4 @@ -From 5e5c8ff5e26f026235efaeda55ae5456fc77c82b Mon Sep 17 00:00:00 2001 +From f5489cdd3db426e609d3bbd4b914f819a56ea61c Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Thu, 20 Dec 2012 14:41:15 -0700 Subject: [PATCH 33/34] crypto: omap-aes - Add OMAP4/AM33XX AES Support @@ -22,7 +22,7 @@ CC: Greg Turner CC: Dmitry Kasatkin Signed-off-by: Mark A. Greer --- - drivers/crypto/omap-aes.c | 158 +++++++++++++++++++++++++++++++++++---------- + drivers/crypto/omap-aes.c | 158 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 125 insertions(+), 33 deletions(-) diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c @@ -315,5 +315,5 @@ index d34aa5d..bd1ad97 100644 tasklet_init(&dd->queue_task, omap_aes_queue_task, (unsigned long)dd); -- -1.7.9.5 +1.9.0 diff --git a/patches/crypto/0034-crypto-omap-aes-Add-CTR-algorithm-Support.patch b/patches/crypto/0034-crypto-omap-aes-Add-CTR-algorithm-Support.patch index eb891a4b..d02d2369 100644 --- a/patches/crypto/0034-crypto-omap-aes-Add-CTR-algorithm-Support.patch +++ b/patches/crypto/0034-crypto-omap-aes-Add-CTR-algorithm-Support.patch @@ -1,4 +1,4 @@ -From cf410fee6154f37e06ad5450687500f27333f833 Mon Sep 17 00:00:00 2001 +From 4344cdc1cf2db83d8371c4b2be2a03eeb6438b6f Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Thu, 20 Dec 2012 15:28:23 -0700 Subject: [PATCH 34/34] crypto: omap-aes - Add CTR algorithm Support @@ -25,7 +25,7 @@ CC: Greg Turner CC: Dmitry Kasatkin Signed-off-by: Mark A. Greer --- - drivers/crypto/omap-aes.c | 143 ++++++++++++++++++++++++++++++++++++++++----- + drivers/crypto/omap-aes.c | 143 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 128 insertions(+), 15 deletions(-) diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c @@ -289,5 +289,5 @@ index bd1ad97..6aa425f 100644 tasklet_kill(&dd->done_task); tasklet_kill(&dd->queue_task); -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0001-viafb-rename-display_timing-to-via_display_timing.patch b/patches/da8xx-fb/0001-viafb-rename-display_timing-to-via_display_timing.patch index d08ddaa7..6146a3c6 100644 --- a/patches/da8xx-fb/0001-viafb-rename-display_timing-to-via_display_timing.patch +++ b/patches/da8xx-fb/0001-viafb-rename-display_timing-to-via_display_timing.patch @@ -1,4 +1,4 @@ -From 2ecfdf539d139375bfec41f8cf12d748607a0d7d Mon Sep 17 00:00:00 2001 +From b400983559493193f2da7dd209e7438760d5e38b Mon Sep 17 00:00:00 2001 From: Steffen Trumtrar Date: Wed, 19 Dec 2012 16:28:08 +0530 Subject: [PATCH 01/48] viafb: rename display_timing to via_display_timing @@ -11,12 +11,12 @@ to. Signed-off-by: Steffen Trumtrar --- - drivers/video/via/hw.c | 6 +++--- - drivers/video/via/hw.h | 2 +- - drivers/video/via/lcd.c | 2 +- - drivers/video/via/share.h | 2 +- - drivers/video/via/via_modesetting.c | 8 ++++---- - drivers/video/via/via_modesetting.h | 6 +++--- + drivers/video/via/hw.c | 6 +++--- + drivers/video/via/hw.h | 2 +- + drivers/video/via/lcd.c | 2 +- + drivers/video/via/share.h | 2 +- + drivers/video/via/via_modesetting.c | 8 ++++---- + drivers/video/via/via_modesetting.h | 6 +++--- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c @@ -137,5 +137,5 @@ index 06e09fe..f6a6503 100644 void via_set_secondary_address(u32 addr); void via_set_primary_pitch(u32 pitch); -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0002-video-add-display_timing-and-videomode.patch b/patches/da8xx-fb/0002-video-add-display_timing-and-videomode.patch index 006a2f74..3e7bf743 100644 --- a/patches/da8xx-fb/0002-video-add-display_timing-and-videomode.patch +++ b/patches/da8xx-fb/0002-video-add-display_timing-and-videomode.patch @@ -1,4 +1,4 @@ -From 42a4b3bb03b7d3f923aefdfd1bc88aaedf7c7c9f Mon Sep 17 00:00:00 2001 +From 32c5c834aa5c9191e4aca9308f5ff99eabe87b70 Mon Sep 17 00:00:00 2001 From: Steffen Trumtrar Date: Wed, 19 Dec 2012 16:36:50 +0530 Subject: [PATCH 02/48] video: add display_timing and videomode @@ -41,12 +41,12 @@ Tested-by: Philipp Zabel Reviewed-by: Laurent Pinchart Acked-by: Laurent Pinchart --- - drivers/video/Kconfig | 6 ++ - drivers/video/Makefile | 2 + - drivers/video/display_timing.c | 24 ++++++++ - drivers/video/videomode.c | 39 +++++++++++++ - include/video/display_timing.h | 124 ++++++++++++++++++++++++++++++++++++++++ - include/video/videomode.h | 48 ++++++++++++++++ + drivers/video/Kconfig | 6 ++ + drivers/video/Makefile | 2 + + drivers/video/display_timing.c | 24 ++++++++ + drivers/video/videomode.c | 39 +++++++++++++ + include/video/display_timing.h | 124 +++++++++++++++++++++++++++++++++++++++++ + include/video/videomode.h | 48 ++++++++++++++++ 6 files changed, 243 insertions(+) create mode 100644 drivers/video/display_timing.c create mode 100644 drivers/video/videomode.c @@ -340,5 +340,5 @@ index 0000000..a421562 + +#endif -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0003-video-add-of-helper-for-display-timings-videomode.patch b/patches/da8xx-fb/0003-video-add-of-helper-for-display-timings-videomode.patch index 75fd0452..d4583400 100644 --- a/patches/da8xx-fb/0003-video-add-of-helper-for-display-timings-videomode.patch +++ b/patches/da8xx-fb/0003-video-add-of-helper-for-display-timings-videomode.patch @@ -1,4 +1,4 @@ -From 682eb79faeaf6c7d9a71f8522f96f3a7e5363eae Mon Sep 17 00:00:00 2001 +From ac64ba3da90808aa8122fe89cab7cbf5b1f7ee7f Mon Sep 17 00:00:00 2001 From: Steffen Trumtrar Date: Wed, 19 Dec 2012 16:36:54 +0530 Subject: [PATCH 03/48] video: add of helper for display timings/videomode @@ -23,13 +23,13 @@ Tested-by: Philipp Zabel Reviewed-by: Laurent Pinchart Acked-by: Laurent Pinchart --- - .../devicetree/bindings/video/display-timing.txt | 109 +++++++++ - drivers/video/Kconfig | 15 ++ - drivers/video/Makefile | 2 + - drivers/video/of_display_timing.c | 239 ++++++++++++++++++++ - drivers/video/of_videomode.c | 54 +++++ - include/video/of_display_timing.h | 20 ++ - include/video/of_videomode.h | 18 ++ + .../devicetree/bindings/video/display-timing.txt | 109 ++++++++++ + drivers/video/Kconfig | 15 ++ + drivers/video/Makefile | 2 + + drivers/video/of_display_timing.c | 239 +++++++++++++++++++++ + drivers/video/of_videomode.c | 54 +++++ + include/video/of_display_timing.h | 20 ++ + include/video/of_videomode.h | 18 ++ 7 files changed, 457 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/display-timing.txt create mode 100644 drivers/video/of_display_timing.c @@ -545,5 +545,5 @@ index 0000000..a07efcc + +#endif /* __LINUX_OF_VIDEOMODE_H */ -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0004-fbmon-add-videomode-helpers.patch b/patches/da8xx-fb/0004-fbmon-add-videomode-helpers.patch index a8e9e50f..6a1533c5 100644 --- a/patches/da8xx-fb/0004-fbmon-add-videomode-helpers.patch +++ b/patches/da8xx-fb/0004-fbmon-add-videomode-helpers.patch @@ -1,4 +1,4 @@ -From 2c3ad06bc30a1d7a69541f5cf2d4f97ae1a15686 Mon Sep 17 00:00:00 2001 +From 3637f2e5a40f06e2ba4c4b05684da7afbabfc954 Mon Sep 17 00:00:00 2001 From: Steffen Trumtrar Date: Wed, 19 Dec 2012 16:36:57 +0530 Subject: [PATCH 04/48] fbmon: add videomode helpers @@ -13,8 +13,8 @@ Tested-by: Philipp Zabel Reviewed-by: Laurent Pinchart Acked-by: Laurent Pinchart --- - drivers/video/fbmon.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++ - include/linux/fb.h | 4 ++++ + drivers/video/fbmon.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ + include/linux/fb.h | 4 ++++ 2 files changed, 56 insertions(+) diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c @@ -110,5 +110,5 @@ index c7a9571..100a176 100644 #define VESA_MODEDB_SIZE 34 extern void fb_var_to_videomode(struct fb_videomode *mode, -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0005-fbmon-add-of_videomode-helpers.patch b/patches/da8xx-fb/0005-fbmon-add-of_videomode-helpers.patch index 310f93df..3ead8207 100644 --- a/patches/da8xx-fb/0005-fbmon-add-of_videomode-helpers.patch +++ b/patches/da8xx-fb/0005-fbmon-add-of_videomode-helpers.patch @@ -1,4 +1,4 @@ -From 94568c4fb0c3e96835435952479defe52deecf34 Mon Sep 17 00:00:00 2001 +From c9467025c92fd2a5088b61d492fae5a5c1365a95 Mon Sep 17 00:00:00 2001 From: Steffen Trumtrar Date: Wed, 19 Dec 2012 16:37:00 +0530 Subject: [PATCH 05/48] fbmon: add of_videomode helpers @@ -13,8 +13,8 @@ Tested-by: Philipp Zabel Reviewed-by: Laurent Pinchart Acked-by: Laurent Pinchart --- - drivers/video/fbmon.c | 42 ++++++++++++++++++++++++++++++++++++++++++ - include/linux/fb.h | 4 ++++ + drivers/video/fbmon.c | 42 ++++++++++++++++++++++++++++++++++++++++++ + include/linux/fb.h | 4 ++++ 2 files changed, 46 insertions(+) diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c @@ -100,5 +100,5 @@ index 100a176..58b9860 100644 struct fb_videomode *fbmode); -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0006-drm_modes-add-videomode-helpers.patch b/patches/da8xx-fb/0006-drm_modes-add-videomode-helpers.patch index 1983fc1f..c55ff8bd 100644 --- a/patches/da8xx-fb/0006-drm_modes-add-videomode-helpers.patch +++ b/patches/da8xx-fb/0006-drm_modes-add-videomode-helpers.patch @@ -1,4 +1,4 @@ -From e8a5d472c66d625d7714a9f32d4fd32ece0df1d1 Mon Sep 17 00:00:00 2001 +From 7bd60e27d15d5721c3e5d33e4354b55b31ac1299 Mon Sep 17 00:00:00 2001 From: Steffen Trumtrar Date: Wed, 19 Dec 2012 16:37:03 +0530 Subject: [PATCH 06/48] drm_modes: add videomode helpers @@ -13,8 +13,8 @@ Tested-by: Philipp Zabel Reviewed-by: Laurent Pinchart Acked-by: Laurent Pinchart --- - drivers/gpu/drm/drm_modes.c | 37 +++++++++++++++++++++++++++++++++++++ - include/drm/drmP.h | 5 +++++ + drivers/gpu/drm/drm_modes.c | 37 +++++++++++++++++++++++++++++++++++++ + include/drm/drmP.h | 5 +++++ 2 files changed, 42 insertions(+) diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c @@ -96,5 +96,5 @@ index 881fb15..24ef0cf 100644 extern void drm_vblank_pre_modeset(struct drm_device *dev, int crtc); extern void drm_vblank_post_modeset(struct drm_device *dev, int crtc); -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0007-drm_modes-add-of_videomode-helpers.patch b/patches/da8xx-fb/0007-drm_modes-add-of_videomode-helpers.patch index b589ce41..b7bc1d79 100644 --- a/patches/da8xx-fb/0007-drm_modes-add-of_videomode-helpers.patch +++ b/patches/da8xx-fb/0007-drm_modes-add-of_videomode-helpers.patch @@ -1,4 +1,4 @@ -From 4513354d2f111264c59145b4a6dc5d6b1eafc885 Mon Sep 17 00:00:00 2001 +From 897ed6b6c566ea932665f8ef7b79537615beb9cc Mon Sep 17 00:00:00 2001 From: Steffen Trumtrar Date: Wed, 19 Dec 2012 16:37:06 +0530 Subject: [PATCH 07/48] drm_modes: add of_videomode helpers @@ -13,8 +13,8 @@ Tested-by: Philipp Zabel Reviewed-by: Laurent Pinchart Acked-by: Laurent Pinchart --- - drivers/gpu/drm/drm_modes.c | 33 +++++++++++++++++++++++++++++++++ - include/drm/drmP.h | 4 ++++ + drivers/gpu/drm/drm_modes.c | 33 +++++++++++++++++++++++++++++++++ + include/drm/drmP.h | 4 ++++ 2 files changed, 37 insertions(+) diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c @@ -91,5 +91,5 @@ index 24ef0cf..98efdde 100644 /* Modesetting support */ extern void drm_vblank_pre_modeset(struct drm_device *dev, int crtc); -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0008-fbmon-fix-build-error.patch b/patches/da8xx-fb/0008-fbmon-fix-build-error.patch index af265eeb..51c80f53 100644 --- a/patches/da8xx-fb/0008-fbmon-fix-build-error.patch +++ b/patches/da8xx-fb/0008-fbmon-fix-build-error.patch @@ -1,11 +1,11 @@ -From a23b8c370015dad0a8214267867756475309e95b Mon Sep 17 00:00:00 2001 +From ab5034724042351c05a0513306ef4d2047f7baa7 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Wed, 2 Jan 2013 19:16:40 +0530 Subject: [PATCH 08/48] fbmon: fix build error Signed-off-by: Afzal Mohammed --- - include/linux/fb.h | 10 ++++++++++ + include/linux/fb.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/linux/fb.h b/include/linux/fb.h @@ -33,5 +33,5 @@ index 58b9860..0ce30d1 100644 struct fb_videomode *fbmode); -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0009-of-display-timings-use-of_get_child_by_name.patch b/patches/da8xx-fb/0009-of-display-timings-use-of_get_child_by_name.patch index fecfddff..79ef8836 100644 --- a/patches/da8xx-fb/0009-of-display-timings-use-of_get_child_by_name.patch +++ b/patches/da8xx-fb/0009-of-display-timings-use-of_get_child_by_name.patch @@ -1,11 +1,11 @@ -From 4e7847c5fba46c397765458c28bc68a1d141db2e Mon Sep 17 00:00:00 2001 +From 9c9c7db5613dacf8a40348058a8274215494b2d8 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Mon, 28 Jan 2013 16:36:45 +0100 Subject: [PATCH 09/48] of display timings: use of_get_child_by_name Signed-off-by: Koen Kooi --- - drivers/video/of_display_timing.c | 2 +- + drivers/video/of_display_timing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c @@ -22,5 +22,5 @@ index 13ecd98..c0ea594 100644 pr_err("%s: could not find display-timings node\n", of_node_full_name(np)); -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0010-da8xx-Allow-use-by-am33xx-based-devices.patch b/patches/da8xx-fb/0010-da8xx-Allow-use-by-am33xx-based-devices.patch index 99991350..4d509329 100644 --- a/patches/da8xx-fb/0010-da8xx-Allow-use-by-am33xx-based-devices.patch +++ b/patches/da8xx-fb/0010-da8xx-Allow-use-by-am33xx-based-devices.patch @@ -1,4 +1,4 @@ -From 2fed770acfc4b23ace998ad7f9f394a9c04fe767 Mon Sep 17 00:00:00 2001 +From 357cb050ba46602d4cd739008f684142cae2b3e1 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Mon, 17 Dec 2012 15:32:48 +0530 Subject: [PATCH 10/48] da8xx: Allow use by am33xx based devices @@ -7,7 +7,7 @@ This driver can be used for AM33xx devices, like the popular beaglebone. Signed-off-by: Pantelis Antoniou --- - drivers/video/Kconfig | 2 +- + drivers/video/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig @@ -24,5 +24,5 @@ index 4abcf9c..f8f0a41 100644 select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0011-video-da8xx-fb-fb_check_var-enhancement.patch b/patches/da8xx-fb/0011-video-da8xx-fb-fb_check_var-enhancement.patch index b0f86df6..a2338bc5 100644 --- a/patches/da8xx-fb/0011-video-da8xx-fb-fb_check_var-enhancement.patch +++ b/patches/da8xx-fb/0011-video-da8xx-fb-fb_check_var-enhancement.patch @@ -1,4 +1,4 @@ -From 7154246be2394b315cc08640d0d2ece5df128fa6 Mon Sep 17 00:00:00 2001 +From af6abbb92b65431a6e537fa86e4dcbdf0ac84641 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Wed, 28 Nov 2012 19:21:51 +0530 Subject: [PATCH 11/48] video: da8xx-fb: fb_check_var enhancement @@ -12,7 +12,7 @@ values, fb_check_var has to ensure that values are proper. Signed-off-by: Afzal Mohammed --- - drivers/video/da8xx-fb.c | 18 ++++++++++++++++++ + drivers/video/da8xx-fb.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c @@ -52,5 +52,5 @@ index 0810939..d00dd17 100644 } -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0012-video-da8xx-fb-simplify-lcd_reset.patch b/patches/da8xx-fb/0012-video-da8xx-fb-simplify-lcd_reset.patch index 117ee546..a6b9311e 100644 --- a/patches/da8xx-fb/0012-video-da8xx-fb-simplify-lcd_reset.patch +++ b/patches/da8xx-fb/0012-video-da8xx-fb-simplify-lcd_reset.patch @@ -1,4 +1,4 @@ -From b3ad777cd488dc2934e512d9803affdbdcc1e320 Mon Sep 17 00:00:00 2001 +From ab2000c4a9ff722e44b3b5b35ea281122b15bc6c Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Thu, 6 Dec 2012 21:54:58 +0530 Subject: [PATCH 12/48] video: da8xx-fb: simplify lcd_reset @@ -7,7 +7,7 @@ lcd_reset function doesn't require any arguement, remove it. Signed-off-by: Afzal Mohammed --- - drivers/video/da8xx-fb.c | 4 ++-- + drivers/video/da8xx-fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c @@ -33,5 +33,5 @@ index d00dd17..52977b1 100644 /* Calculate the divider */ lcd_calc_clk_divider(par); -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0013-video-da8xx-fb-use-modedb-helper-to-update-var.patch b/patches/da8xx-fb/0013-video-da8xx-fb-use-modedb-helper-to-update-var.patch index 774f390a..f6833f34 100644 --- a/patches/da8xx-fb/0013-video-da8xx-fb-use-modedb-helper-to-update-var.patch +++ b/patches/da8xx-fb/0013-video-da8xx-fb-use-modedb-helper-to-update-var.patch @@ -1,4 +1,4 @@ -From fc4d5e7922cb3c95bb83bb6352c2fd67bd2638e7 Mon Sep 17 00:00:00 2001 +From 701abf7cb11b5e733709af8a190cdc130a797365 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Thu, 6 Dec 2012 22:46:32 +0530 Subject: [PATCH 13/48] video: da8xx-fb: use modedb helper to update var @@ -15,7 +15,7 @@ fixed in a later change and this overide would be removed. Signed-off-by: Afzal Mohammed --- - drivers/video/da8xx-fb.c | 18 ++---------------- + drivers/video/da8xx-fb.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c @@ -58,5 +58,5 @@ index 52977b1..a1f6544 100644 /* Initialize fbinfo */ -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0014-video-da8xx-fb-remove-unneeded-var-initialization.patch b/patches/da8xx-fb/0014-video-da8xx-fb-remove-unneeded-var-initialization.patch index 173026bc..1bb77a70 100644 --- a/patches/da8xx-fb/0014-video-da8xx-fb-remove-unneeded-var-initialization.patch +++ b/patches/da8xx-fb/0014-video-da8xx-fb-remove-unneeded-var-initialization.patch @@ -1,4 +1,4 @@ -From d9d2cb7d47dc158398968c8bec99bd4706d0cafd Mon Sep 17 00:00:00 2001 +From 4f9fc2df3c6b70f04e9753205db74fefebce9276 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Thu, 6 Dec 2012 22:46:32 +0530 Subject: [PATCH 14/48] video: da8xx-fb: remove unneeded "var" initialization @@ -8,7 +8,7 @@ panel, remove the unnecessary initialization. Signed-off-by: Afzal Mohammed --- - drivers/video/da8xx-fb.c | 22 +--------------------- + drivers/video/da8xx-fb.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c @@ -52,5 +52,5 @@ index a1f6544..18834fa 100644 static struct fb_fix_screeninfo da8xx_fb_fix = { .id = "DA8xx FB Drv", -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0015-video-da8xx-fb-store-current-display-information.patch b/patches/da8xx-fb/0015-video-da8xx-fb-store-current-display-information.patch index e6a38f47..da8a1128 100644 --- a/patches/da8xx-fb/0015-video-da8xx-fb-store-current-display-information.patch +++ b/patches/da8xx-fb/0015-video-da8xx-fb-store-current-display-information.patch @@ -1,4 +1,4 @@ -From b816769d9a3b4ff3ab465ecdb1c68003f1a20b04 Mon Sep 17 00:00:00 2001 +From fad895089bd55b2d3245e1e0255b37a4c8931bb8 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Thu, 6 Dec 2012 23:18:07 +0530 Subject: [PATCH 15/48] video: da8xx-fb: store current display information @@ -14,7 +14,7 @@ changes like bpp. Signed-off-by: Afzal Mohammed --- - drivers/video/da8xx-fb.c | 4 ++++ + drivers/video/da8xx-fb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c @@ -40,5 +40,5 @@ index 18834fa..d060f14 100644 if (lcd_init(par, lcd_cfg, lcdc_info) < 0) { dev_err(&device->dev, "lcd_init failed\n"); -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0016-video-da8xx-fb-store-clk-rate-even-if-CPUFREQ.patch b/patches/da8xx-fb/0016-video-da8xx-fb-store-clk-rate-even-if-CPUFREQ.patch index a746156f..04908265 100644 --- a/patches/da8xx-fb/0016-video-da8xx-fb-store-clk-rate-even-if-CPUFREQ.patch +++ b/patches/da8xx-fb/0016-video-da8xx-fb-store-clk-rate-even-if-CPUFREQ.patch @@ -1,4 +1,4 @@ -From f1e9ef0ae4cf90458a375cef5e630fa11bba2ebc Mon Sep 17 00:00:00 2001 +From c0cf3e54ae59a4553c7e096d668787b5877f62d2 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Fri, 7 Dec 2012 02:00:23 +0530 Subject: [PATCH 16/48] video: da8xx-fb: store clk rate even if !CPUFREQ @@ -9,7 +9,7 @@ enquiring with clock framework with clk handle every time. Signed-off-by: Afzal Mohammed --- - drivers/video/da8xx-fb.c | 4 +--- + drivers/video/da8xx-fb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c @@ -37,5 +37,5 @@ index d060f14..f1d88ac 100644 if (fb_pdata->panel_power_ctrl) { par->panel_power_ctrl = fb_pdata->panel_power_ctrl; -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0017-video-da8xx-fb-pix-clk-and-clk-div-handling-cleanup.patch b/patches/da8xx-fb/0017-video-da8xx-fb-pix-clk-and-clk-div-handling-cleanup.patch index acac9f03..80b3f1c2 100644 --- a/patches/da8xx-fb/0017-video-da8xx-fb-pix-clk-and-clk-div-handling-cleanup.patch +++ b/patches/da8xx-fb/0017-video-da8xx-fb-pix-clk-and-clk-div-handling-cleanup.patch @@ -1,4 +1,4 @@ -From f1b9fe0b470b4ef3eaa32cd6814768b50f04b888 Mon Sep 17 00:00:00 2001 +From dd60457eb9d09a33513bbadd3455648cd980eeea Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Tue, 4 Dec 2012 17:34:03 +0530 Subject: [PATCH 17/48] video: da8xx-fb: pix clk and clk div handling cleanup @@ -14,7 +14,7 @@ modedb to var conversion is removed. Signed-off-by: Afzal Mohammed --- - drivers/video/da8xx-fb.c | 48 +++++++++++++++++----------------------------- + drivers/video/da8xx-fb.c | 48 ++++++++++++++++++------------------------------ 1 file changed, 18 insertions(+), 30 deletions(-) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c @@ -150,5 +150,5 @@ index f1d88ac..7f08644 100644 /* Initialize fbinfo */ da8xx_fb_info->flags = FBINFO_FLAG_DEFAULT; -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0018-video-da8xx-fb-store-struct-device.patch b/patches/da8xx-fb/0018-video-da8xx-fb-store-struct-device.patch index 478ab69d..e68b4a7b 100644 --- a/patches/da8xx-fb/0018-video-da8xx-fb-store-struct-device.patch +++ b/patches/da8xx-fb/0018-video-da8xx-fb-store-struct-device.patch @@ -1,4 +1,4 @@ -From 1cb8407e9205111f372f67c448f2f7dcbac4fd62 Mon Sep 17 00:00:00 2001 +From 54d048fe2394ee01baaf47aecd2734000cced3be Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Wed, 5 Dec 2012 12:16:17 +0530 Subject: [PATCH 18/48] video: da8xx-fb: store struct device * @@ -8,7 +8,7 @@ of probe. Signed-off-by: Afzal Mohammed --- - drivers/video/da8xx-fb.c | 2 ++ + drivers/video/da8xx-fb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c @@ -32,5 +32,5 @@ index 7f08644..a5341d0 100644 par->lcd_fck_rate = clk_get_rate(fb_clk); if (fb_pdata->panel_power_ctrl) { -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0019-video-da8xx-fb-report-correct-pixclock.patch b/patches/da8xx-fb/0019-video-da8xx-fb-report-correct-pixclock.patch index 0b37b181..368f3012 100644 --- a/patches/da8xx-fb/0019-video-da8xx-fb-report-correct-pixclock.patch +++ b/patches/da8xx-fb/0019-video-da8xx-fb-report-correct-pixclock.patch @@ -1,4 +1,4 @@ -From 093d9b56660e09eace87dd50c6a4b8c7e64534a8 Mon Sep 17 00:00:00 2001 +From acac5a2e6c9a6ac79b1654c49994624b371e256e Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Tue, 4 Dec 2012 18:40:45 +0530 Subject: [PATCH 19/48] video: da8xx-fb: report correct pixclock @@ -8,7 +8,7 @@ This lets user know the actual pixclock. Signed-off-by: Afzal Mohammed --- - drivers/video/da8xx-fb.c | 11 +++++++++++ + drivers/video/da8xx-fb.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c @@ -41,5 +41,5 @@ index a5341d0..0f73c76 100644 } -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0020-video-da8xx-fb-fb_set_par-support.patch b/patches/da8xx-fb/0020-video-da8xx-fb-fb_set_par-support.patch index a5428a5e..22002a8f 100644 --- a/patches/da8xx-fb/0020-video-da8xx-fb-fb_set_par-support.patch +++ b/patches/da8xx-fb/0020-video-da8xx-fb-fb_set_par-support.patch @@ -1,4 +1,4 @@ -From 8c5b418b175954b0432fcf9a4d135b4928038e6a Mon Sep 17 00:00:00 2001 +From f4573ee651168ed202c9de9d4563bc4274341964 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Wed, 28 Nov 2012 20:08:50 +0530 Subject: [PATCH 20/48] video: da8xx-fb: fb_set_par support @@ -15,7 +15,7 @@ probe so that reset happens only at the begining. Signed-off-by: Afzal Mohammed --- - drivers/video/da8xx-fb.c | 60 +++++++++++++++++++++++++++++++++++++--------- + drivers/video/da8xx-fb.c | 60 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 49 insertions(+), 11 deletions(-) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c @@ -123,5 +123,5 @@ index 0f73c76..720604c 100644 /* allocate frame buffer */ par->vram_size = lcdc_info->xres * lcdc_info->yres * lcd_cfg->bpp; -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0021-ARM-dts-AM33XX-Add-lcdc-node.patch b/patches/da8xx-fb/0021-ARM-dts-AM33XX-Add-lcdc-node.patch index 4b4e9c46..8b71b18c 100644 --- a/patches/da8xx-fb/0021-ARM-dts-AM33XX-Add-lcdc-node.patch +++ b/patches/da8xx-fb/0021-ARM-dts-AM33XX-Add-lcdc-node.patch @@ -1,4 +1,4 @@ -From 1628158a7ac1b95f040c40ca607a26bdc3655d9e Mon Sep 17 00:00:00 2001 +From f1620dd7f4f8b1578ce1231625c8c9d47a0afcb1 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Mon, 17 Dec 2012 15:27:44 +0530 Subject: [PATCH 21/48] ARM: dts: AM33XX: Add lcdc node @@ -7,7 +7,7 @@ Add lcdc node. Signed-off-by: Afzal Mohammed --- - arch/arm/boot/dts/am33xx.dtsi | 8 ++++++++ + arch/arm/boot/dts/am33xx.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi @@ -29,5 +29,5 @@ index bfae98b..7a9c357 100644 }; }; -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0022-ARM-dts-AM33XX-Add-am335x-evm-lcdc-panel-timings.patch b/patches/da8xx-fb/0022-ARM-dts-AM33XX-Add-am335x-evm-lcdc-panel-timings.patch index 4a369d53..960675a1 100644 --- a/patches/da8xx-fb/0022-ARM-dts-AM33XX-Add-am335x-evm-lcdc-panel-timings.patch +++ b/patches/da8xx-fb/0022-ARM-dts-AM33XX-Add-am335x-evm-lcdc-panel-timings.patch @@ -1,4 +1,4 @@ -From 684b4d3b41a30471583a9ebb364fe4161d9a6982 Mon Sep 17 00:00:00 2001 +From d912b2d0d67a865ec4d97d2a0bb6257de68e67b9 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Mon, 31 Dec 2012 14:08:54 +0530 Subject: [PATCH 22/48] ARM: dts: AM33XX: Add am335x-evm lcdc panel timings @@ -7,7 +7,7 @@ Update lcdc node with panel timings (typical) for AM335X-EVM. Signed-off-by: Afzal Mohammed --- - arch/arm/boot/dts/am335x-evm.dts | 20 ++++++++++++++++++++ + arch/arm/boot/dts/am335x-evm.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts @@ -39,5 +39,5 @@ index f4a07f8..d1a34cc 100644 + }; +}; -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0023-ARM-dts-AM33XX-Add-am335x-evm-lcdc-pincontrol-info.patch b/patches/da8xx-fb/0023-ARM-dts-AM33XX-Add-am335x-evm-lcdc-pincontrol-info.patch index a3291558..c88ad30f 100644 --- a/patches/da8xx-fb/0023-ARM-dts-AM33XX-Add-am335x-evm-lcdc-pincontrol-info.patch +++ b/patches/da8xx-fb/0023-ARM-dts-AM33XX-Add-am335x-evm-lcdc-pincontrol-info.patch @@ -1,4 +1,4 @@ -From 1bff058e03e4fdb6ae28841cd349f99e995cc1e5 Mon Sep 17 00:00:00 2001 +From 2dc23b728e12036ebfb37182127e9fc45afe30f4 Mon Sep 17 00:00:00 2001 From: "Manjunathappa, Prakash" Date: Mon, 17 Dec 2012 15:29:44 +0530 Subject: [PATCH 23/48] ARM: dts: AM33XX: Add am335x-evm lcdc pincontrol info @@ -10,7 +10,7 @@ Update pin mux information for lcd panel on AM335X-EVM Signed-off-by: Manjunathappa, Prakash Signed-off-by: Afzal Mohammed --- - arch/arm/boot/dts/am335x-evm.dts | 34 +++++++++++++++++++++++++++++++++- + arch/arm/boot/dts/am335x-evm.dts | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts @@ -66,5 +66,5 @@ index d1a34cc..5eadd1e 100644 ocp { -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0024-ARM-dts-AM33XX-Add-am335x-evmsk-lcdc-panel-timings.patch b/patches/da8xx-fb/0024-ARM-dts-AM33XX-Add-am335x-evmsk-lcdc-panel-timings.patch index 1bbb6035..42e2f55e 100644 --- a/patches/da8xx-fb/0024-ARM-dts-AM33XX-Add-am335x-evmsk-lcdc-panel-timings.patch +++ b/patches/da8xx-fb/0024-ARM-dts-AM33XX-Add-am335x-evmsk-lcdc-panel-timings.patch @@ -1,4 +1,4 @@ -From de3cd51e918866361d87c59793d3208621e7f564 Mon Sep 17 00:00:00 2001 +From 82a6468dfce37eac0b3bfa281a84f7b22445c832 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Thu, 3 Jan 2013 16:08:59 +0530 Subject: [PATCH 24/48] ARM: dts: AM33XX: Add am335x-evmsk lcdc panel timings @@ -7,7 +7,7 @@ Update lcdc node with panel timings (typical) for AM335X-EVMSK. Signed-off-by: Afzal Mohammed --- - arch/arm/boot/dts/am335x-evmsk.dts | 20 ++++++++++++++++++++ + arch/arm/boot/dts/am335x-evmsk.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts @@ -39,5 +39,5 @@ index 2546724..ba1c805 100644 + }; +}; -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0025-ARM-dts-AM33XX-Add-am335x-evmsk-lcdc-pincontrol-info.patch b/patches/da8xx-fb/0025-ARM-dts-AM33XX-Add-am335x-evmsk-lcdc-pincontrol-info.patch index 5fdeee19..67d503a3 100644 --- a/patches/da8xx-fb/0025-ARM-dts-AM33XX-Add-am335x-evmsk-lcdc-pincontrol-info.patch +++ b/patches/da8xx-fb/0025-ARM-dts-AM33XX-Add-am335x-evmsk-lcdc-pincontrol-info.patch @@ -1,14 +1,13 @@ -From 3a4d04e2de5ec8cb641da810b817abbd4a811ffd Mon Sep 17 00:00:00 2001 +From 108eeb299e6d6a95e8c7debec8e8240d5759ed12 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Thu, 3 Jan 2013 16:24:39 +0530 -Subject: [PATCH 25/48] ARM: dts: AM33XX: Add am335x-evmsk lcdc pincontrol - info +Subject: [PATCH 25/48] ARM: dts: AM33XX: Add am335x-evmsk lcdc pincontrol info Update pin mux information for lcd panel on AM335X-EVMSK. Signed-off-by: Afzal Mohammed --- - arch/arm/boot/dts/am335x-evmsk.dts | 35 ++++++++++++++++++++++++++++++++++- + arch/arm/boot/dts/am335x-evmsk.dts | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts @@ -65,5 +64,5 @@ index ba1c805..f684704 100644 ocp { -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0026-ARM-OMAP-AM33xx-hwmod-Corrects-PWM-subsystem-HWMOD-e.patch b/patches/da8xx-fb/0026-ARM-OMAP-AM33xx-hwmod-Corrects-PWM-subsystem-HWMOD-e.patch index 72852d89..2ce2475d 100644 --- a/patches/da8xx-fb/0026-ARM-OMAP-AM33xx-hwmod-Corrects-PWM-subsystem-HWMOD-e.patch +++ b/patches/da8xx-fb/0026-ARM-OMAP-AM33xx-hwmod-Corrects-PWM-subsystem-HWMOD-e.patch @@ -1,4 +1,4 @@ -From 87c1f58f1a02432b7e4447aee1a873e0de8b58bb Mon Sep 17 00:00:00 2001 +From 5e9a9f148ea1b8fafec0d080ec2f11c2d1a11d3c Mon Sep 17 00:00:00 2001 From: "Philip, Avinash" Date: Tue, 16 Oct 2012 14:50:58 +0530 Subject: [PATCH 26/48] ARM: OMAP: AM33xx hwmod: Corrects PWM subsystem HWMOD @@ -14,7 +14,7 @@ patch Signed-off-by: Philip, Avinash --- - arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 158 +++++++++++++++++++++++++--- + arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 158 ++++++++++++++++++++++++++--- 1 file changed, 145 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c @@ -250,5 +250,5 @@ index 646c14d..60d4c3e 100644 &am33xx_l4_ls__ecap1, &am33xx_l4_ls__ecap2, -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0027-ARM-OMAP-AM33xx-hwmod-Add-parent-child-relationship-.patch b/patches/da8xx-fb/0027-ARM-OMAP-AM33xx-hwmod-Add-parent-child-relationship-.patch index 4eea4cd1..7b9c1e6a 100644 --- a/patches/da8xx-fb/0027-ARM-OMAP-AM33xx-hwmod-Add-parent-child-relationship-.patch +++ b/patches/da8xx-fb/0027-ARM-OMAP-AM33xx-hwmod-Add-parent-child-relationship-.patch @@ -1,4 +1,4 @@ -From ada8f4928fb27f07d99201123c35f2a7c80f5e68 Mon Sep 17 00:00:00 2001 +From ca8370309f15e169f8abc382b3a62bff87080aa3 Mon Sep 17 00:00:00 2001 From: "Philip, Avinash" Date: Tue, 16 Oct 2012 14:50:58 +0530 Subject: [PATCH 27/48] ARM: OMAP: AM33xx hwmod: Add parent-child relationship @@ -11,7 +11,7 @@ between PWMSS and ECAP, EQEP & EHRPWM child devices to support runtime PM. Signed-off-by: Philip, Avinash --- - arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 434 +++++++++++++--------------- + arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 434 ++++++++++++++--------------- 1 file changed, 203 insertions(+), 231 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c @@ -654,5 +654,5 @@ index 60d4c3e..e54e7a1 100644 &am33xx_l3_main__lcdc, &am33xx_l4_ls__mcspi0, -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0028-ARM-dts-AM33XX-Add-PWMSS-device-tree-nodes.patch b/patches/da8xx-fb/0028-ARM-dts-AM33XX-Add-PWMSS-device-tree-nodes.patch index 9af21852..5e4b1cf8 100644 --- a/patches/da8xx-fb/0028-ARM-dts-AM33XX-Add-PWMSS-device-tree-nodes.patch +++ b/patches/da8xx-fb/0028-ARM-dts-AM33XX-Add-PWMSS-device-tree-nodes.patch @@ -1,4 +1,4 @@ -From bebf7546e3932db136a3f6eae21896d17bf25f0a Mon Sep 17 00:00:00 2001 +From a29e9df39477350c0ff5bf288dccb4be2e72407a Mon Sep 17 00:00:00 2001 From: "Philip, Avinash" Date: Wed, 11 Jul 2012 11:01:33 +0530 Subject: [PATCH 28/48] ARM: dts: AM33XX: Add PWMSS device tree nodes @@ -15,7 +15,7 @@ Conflicts: arch/arm/boot/dts/am33xx.dtsi --- - arch/arm/boot/dts/am33xx.dtsi | 84 +++++++++++++++++++++++++++++++++++++++++ + arch/arm/boot/dts/am33xx.dtsi | 84 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi @@ -113,5 +113,5 @@ index 7a9c357..e832be8 100644 }; }; -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0029-ARM-dts-AM33XX-Add-PWM-backlight-DT-data-to-am335x-e.patch b/patches/da8xx-fb/0029-ARM-dts-AM33XX-Add-PWM-backlight-DT-data-to-am335x-e.patch index a643d526..553e3e94 100644 --- a/patches/da8xx-fb/0029-ARM-dts-AM33XX-Add-PWM-backlight-DT-data-to-am335x-e.patch +++ b/patches/da8xx-fb/0029-ARM-dts-AM33XX-Add-PWM-backlight-DT-data-to-am335x-e.patch @@ -1,4 +1,4 @@ -From 7b08cf39cf40748897377860298257560d8b7575 Mon Sep 17 00:00:00 2001 +From 4aedb0703b20faa5273569280139ade414026480 Mon Sep 17 00:00:00 2001 From: "Philip, Avinash" Date: Mon, 16 Jul 2012 14:57:33 +0530 Subject: [PATCH 29/48] ARM: dts: AM33XX: Add PWM backlight DT data to @@ -14,7 +14,7 @@ Conflicts: arch/arm/boot/dts/am335x-evm.dts --- - arch/arm/boot/dts/am335x-evm.dts | 23 +++++++++++++++++++++++ + arch/arm/boot/dts/am335x-evm.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts @@ -66,5 +66,5 @@ index 5eadd1e..65ae57f 100644 /include/ "tps65910.dtsi" -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0030-ARM-dts-AM33XX-Add-PWM-backlight-DT-data-to-am335x-e.patch b/patches/da8xx-fb/0030-ARM-dts-AM33XX-Add-PWM-backlight-DT-data-to-am335x-e.patch index 2adee6b1..d41556aa 100644 --- a/patches/da8xx-fb/0030-ARM-dts-AM33XX-Add-PWM-backlight-DT-data-to-am335x-e.patch +++ b/patches/da8xx-fb/0030-ARM-dts-AM33XX-Add-PWM-backlight-DT-data-to-am335x-e.patch @@ -1,4 +1,4 @@ -From 12d48c972938a92ac03985a99add37df9bc676af Mon Sep 17 00:00:00 2001 +From 95bf31e755027fc1cbb27fb734b308b4197d0e2e Mon Sep 17 00:00:00 2001 From: "Philip, Avinash" Date: Mon, 16 Jul 2012 14:57:33 +0530 Subject: [PATCH 30/48] ARM: dts: AM33XX: Add PWM backlight DT data to @@ -15,7 +15,7 @@ Conflicts: arch/arm/boot/dts/am335x-evmsk.dts --- - arch/arm/boot/dts/am335x-evmsk.dts | 23 +++++++++++++++++++++++ + arch/arm/boot/dts/am335x-evmsk.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts @@ -67,5 +67,5 @@ index f684704..7a87803 100644 /include/ "tps65910.dtsi" -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0031-clk-divider-prepare-for-minimum-divider.patch b/patches/da8xx-fb/0031-clk-divider-prepare-for-minimum-divider.patch index 7f8666b2..171db0f0 100644 --- a/patches/da8xx-fb/0031-clk-divider-prepare-for-minimum-divider.patch +++ b/patches/da8xx-fb/0031-clk-divider-prepare-for-minimum-divider.patch @@ -1,4 +1,4 @@ -From 75a9f632e307b9b33987dc7e423bf1b2c9e98218 Mon Sep 17 00:00:00 2001 +From d205fc2696b7bd0031c25fb29cd0682c5e978f77 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Thu, 17 Jan 2013 17:11:53 +0530 Subject: [PATCH 31/48] clk: divider: prepare for minimum divider @@ -13,9 +13,9 @@ functions, static initialization helpers as was earlier. Signed-off-by: Afzal Mohammed --- - drivers/clk/clk-divider.c | 37 ++++++++++++++++++++++++++++++++++--- - include/linux/clk-private.h | 6 +++++- - include/linux/clk-provider.h | 7 +++++++ + drivers/clk/clk-divider.c | 37 ++++++++++++++++++++++++++++++++++--- + include/linux/clk-private.h | 6 +++++- + include/linux/clk-provider.h | 7 +++++++ 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c @@ -165,5 +165,5 @@ index 4989b8a..1c09481 100644 const char *parent_name, unsigned long flags, void __iomem *reg, u8 shift, u8 width, -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0032-clk-divider-handle-minimum-divider.patch b/patches/da8xx-fb/0032-clk-divider-handle-minimum-divider.patch index 35ba43a2..2967a27d 100644 --- a/patches/da8xx-fb/0032-clk-divider-handle-minimum-divider.patch +++ b/patches/da8xx-fb/0032-clk-divider-handle-minimum-divider.patch @@ -1,4 +1,4 @@ -From d06744987cba99fa52b286b845d75fbcc886d654 Mon Sep 17 00:00:00 2001 +From 7cc328995f14bd29e921ccd7ed7c43b77a1d1e45 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Tue, 22 Jan 2013 20:33:56 +0530 Subject: [PATCH 32/48] clk: divider: handle minimum divider @@ -8,7 +8,7 @@ programmed. Modify basic clock divider to take care of this aspect. Signed-off-by: Afzal Mohammed --- - drivers/clk/clk-divider.c | 12 +++++++++--- + drivers/clk/clk-divider.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c @@ -58,5 +58,5 @@ index 4025c5a..ee648dc 100644 continue; parent_rate = __clk_round_rate(__clk_get_parent(hw->clk), -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0033-ARM-OMAP2-dpll-round-rate-to-closest-value.patch b/patches/da8xx-fb/0033-ARM-OMAP2-dpll-round-rate-to-closest-value.patch index 0930f2ff..cc0652a9 100644 --- a/patches/da8xx-fb/0033-ARM-OMAP2-dpll-round-rate-to-closest-value.patch +++ b/patches/da8xx-fb/0033-ARM-OMAP2-dpll-round-rate-to-closest-value.patch @@ -1,4 +1,4 @@ -From e3b25ce816f9169dffbb41f2a782472a2649127b Mon Sep 17 00:00:00 2001 +From 1430dba6c492aaebddc68d0fe380d78a3d2ef63c Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Mon, 21 Jan 2013 18:24:00 +0530 Subject: [PATCH 33/48] ARM: OMAP2+: dpll: round rate to closest value @@ -22,7 +22,7 @@ PLL, display would not work. This change will resolve the issue. Signed-off-by: Afzal Mohammed --- - arch/arm/mach-omap2/clkt_dpll.c | 12 +++++++----- + arch/arm/mach-omap2/clkt_dpll.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-omap2/clkt_dpll.c b/arch/arm/mach-omap2/clkt_dpll.c @@ -58,5 +58,5 @@ index 924c230..15e6d41 100644 } -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0034-ARM-OMAP2-dpll-am335x-avoid-freqsel.patch b/patches/da8xx-fb/0034-ARM-OMAP2-dpll-am335x-avoid-freqsel.patch index 4652165d..542280e3 100644 --- a/patches/da8xx-fb/0034-ARM-OMAP2-dpll-am335x-avoid-freqsel.patch +++ b/patches/da8xx-fb/0034-ARM-OMAP2-dpll-am335x-avoid-freqsel.patch @@ -1,4 +1,4 @@ -From 5376363502ef1fe24d1aa3e10e1455c094af8dd4 Mon Sep 17 00:00:00 2001 +From e19b2d0ca665aa8a9888b625cc95b9ba89fc6b7d Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Mon, 21 Jan 2013 17:13:37 +0530 Subject: [PATCH 34/48] ARM: OMAP2+: dpll: am335x - avoid freqsel @@ -7,7 +7,7 @@ am335x does not have freqsel, avoid it. Signed-off-by: Afzal Mohammed --- - arch/arm/mach-omap2/dpll3xxx.c | 5 +++-- + arch/arm/mach-omap2/dpll3xxx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c @@ -27,5 +27,5 @@ index 0a02aab..3aed4b0 100644 dd->last_rounded_n); WARN_ON(!freqsel); -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0035-ARM-OMAP2-clock-DEFINE_STRUCT_CLK_FLAGS-helper.patch b/patches/da8xx-fb/0035-ARM-OMAP2-clock-DEFINE_STRUCT_CLK_FLAGS-helper.patch index 4b8c62c6..57e9c50d 100644 --- a/patches/da8xx-fb/0035-ARM-OMAP2-clock-DEFINE_STRUCT_CLK_FLAGS-helper.patch +++ b/patches/da8xx-fb/0035-ARM-OMAP2-clock-DEFINE_STRUCT_CLK_FLAGS-helper.patch @@ -1,4 +1,4 @@ -From ece3cd6c9fceeee8df51003c65d428f2f2f125c1 Mon Sep 17 00:00:00 2001 +From b59f3e8ca88e29abf9359454508978003478261e Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Tue, 22 Jan 2013 15:42:00 +0530 Subject: [PATCH 35/48] ARM: OMAP2+: clock: DEFINE_STRUCT_CLK_FLAGS helper @@ -9,7 +9,7 @@ SET_RATE_PARENT flag in statically defined lcd clock in am335x. Signed-off-by: Afzal Mohammed --- - arch/arm/mach-omap2/clock.h | 11 +++++++++++ + arch/arm/mach-omap2/clock.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h @@ -35,5 +35,5 @@ index b402048..60ddd86 100644 static struct clk_hw_omap _name##_hw = { \ .hw = { \ -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0036-ARM-AM33XX-clock-SET_RATE_PARENT-in-lcd-path.patch b/patches/da8xx-fb/0036-ARM-AM33XX-clock-SET_RATE_PARENT-in-lcd-path.patch index 8e65c1e9..ac4af494 100644 --- a/patches/da8xx-fb/0036-ARM-AM33XX-clock-SET_RATE_PARENT-in-lcd-path.patch +++ b/patches/da8xx-fb/0036-ARM-AM33XX-clock-SET_RATE_PARENT-in-lcd-path.patch @@ -1,4 +1,4 @@ -From 6c4d089b1d8c96f8bcededc538f1c3047a5fa319 Mon Sep 17 00:00:00 2001 +From d45244d8a9e2a34494378e97b454f26e874c598e Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Wed, 9 Jan 2013 11:38:11 +0530 Subject: [PATCH 36/48] ARM: AM33XX: clock: SET_RATE_PARENT in lcd path @@ -22,7 +22,7 @@ details. Signed-off-by: Afzal Mohammed --- - arch/arm/mach-omap2/cclock33xx_data.c | 10 ++++++---- + arch/arm/mach-omap2/cclock33xx_data.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c @@ -54,5 +54,5 @@ index a09d6d7..8dd9ecd 100644 DEFINE_CLK_FIXED_FACTOR(mmc_clk, "dpll_per_m2_ck", &dpll_per_m2_ck, 0x0, 1, 2); -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0037-video-da8xx-fb-make-io-operations-safe.patch b/patches/da8xx-fb/0037-video-da8xx-fb-make-io-operations-safe.patch index 26541f5b..27a0a0ad 100644 --- a/patches/da8xx-fb/0037-video-da8xx-fb-make-io-operations-safe.patch +++ b/patches/da8xx-fb/0037-video-da8xx-fb-make-io-operations-safe.patch @@ -1,4 +1,4 @@ -From 1b9cc55a8672c37d595f20056f15cdae75dfb2bd Mon Sep 17 00:00:00 2001 +From cb027c448d7621e3060f1faa8e39dcd22cb855f6 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Fri, 11 Jan 2013 10:43:59 +0530 Subject: [PATCH 37/48] video: da8xx-fb: make io operations safe @@ -8,7 +8,7 @@ reused on ARMv7 (AM335x SoC). Signed-off-by: Afzal Mohammed --- - drivers/video/da8xx-fb.c | 4 ++-- + drivers/video/da8xx-fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c @@ -31,5 +31,5 @@ index 720604c..35a33ca 100644 struct da8xx_fb_par { -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0038-video-da8xx-fb-fix-24bpp-raster-configuration.patch b/patches/da8xx-fb/0038-video-da8xx-fb-fix-24bpp-raster-configuration.patch index 7df18ee3..53afdb29 100644 --- a/patches/da8xx-fb/0038-video-da8xx-fb-fix-24bpp-raster-configuration.patch +++ b/patches/da8xx-fb/0038-video-da8xx-fb-fix-24bpp-raster-configuration.patch @@ -1,4 +1,4 @@ -From c01befb5933174857ff0ec9918ab0b2069627f9b Mon Sep 17 00:00:00 2001 +From 7d5f6e5a39ddb8d3b082d06550fd730301b501ac Mon Sep 17 00:00:00 2001 From: "Manjunathappa, Prakash" Date: Tue, 27 Nov 2012 13:07:59 +0530 Subject: [PATCH 38/48] video: da8xx-fb: fix 24bpp raster configuration @@ -12,7 +12,7 @@ configurations. Signed-off-by: Manjunathappa, Prakash Signed-off-by: Afzal Mohammed --- - drivers/video/da8xx-fb.c | 4 ++-- + drivers/video/da8xx-fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c @@ -33,5 +33,5 @@ index 35a33ca..7f92f37 100644 case 8: -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0039-video-da8xx-fb-enable-sync-lost-intr-for-v2-ip.patch b/patches/da8xx-fb/0039-video-da8xx-fb-enable-sync-lost-intr-for-v2-ip.patch index c5023289..787e88fd 100644 --- a/patches/da8xx-fb/0039-video-da8xx-fb-enable-sync-lost-intr-for-v2-ip.patch +++ b/patches/da8xx-fb/0039-video-da8xx-fb-enable-sync-lost-intr-for-v2-ip.patch @@ -1,4 +1,4 @@ -From 2da17dd37258ef363ac36789453ccd984749e8f0 Mon Sep 17 00:00:00 2001 +From e5c840d7f7ade05214a03d6e296b0a1e2d41bbdf Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Mon, 17 Dec 2012 19:37:46 +0530 Subject: [PATCH 39/48] video: da8xx-fb: enable sync lost intr for v2 ip @@ -8,7 +8,7 @@ enabled, enable it. Signed-off-by: Afzal Mohammed --- - drivers/video/da8xx-fb.c | 2 +- + drivers/video/da8xx-fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c @@ -25,5 +25,5 @@ index 7f92f37..ca69e01 100644 } reg_dma |= LCD_DUAL_FRAME_BUFFER_ENABLE; -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0040-video-da8xx-fb-use-devres.patch b/patches/da8xx-fb/0040-video-da8xx-fb-use-devres.patch index 4a6a10ac..8b4e8879 100644 --- a/patches/da8xx-fb/0040-video-da8xx-fb-use-devres.patch +++ b/patches/da8xx-fb/0040-video-da8xx-fb-use-devres.patch @@ -1,4 +1,4 @@ -From c8afe8bbabe9ea1f12ba07b6a32e39e905728d2f Mon Sep 17 00:00:00 2001 +From 820a2070c1819f73ee3f0cc3f541d1094e087830 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Sun, 30 Dec 2012 18:56:21 +0530 Subject: [PATCH 40/48] video: da8xx-fb: use devres @@ -8,7 +8,7 @@ resource. Signed-off-by: Afzal Mohammed --- - drivers/video/da8xx-fb.c | 35 ++++++----------------------------- + drivers/video/da8xx-fb.c | 35 ++++++----------------------------- 1 file changed, 6 insertions(+), 29 deletions(-) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c @@ -94,5 +94,5 @@ index ca69e01..7a32e83 100644 } -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0041-video-da8xx-fb-ensure-non-null-cfg-in-pdata.patch b/patches/da8xx-fb/0041-video-da8xx-fb-ensure-non-null-cfg-in-pdata.patch index f7652d2f..c5ded5a8 100644 --- a/patches/da8xx-fb/0041-video-da8xx-fb-ensure-non-null-cfg-in-pdata.patch +++ b/patches/da8xx-fb/0041-video-da8xx-fb-ensure-non-null-cfg-in-pdata.patch @@ -1,4 +1,4 @@ -From 415ff6474db7a62f59c7c46e60f29a5e2322b7d2 Mon Sep 17 00:00:00 2001 +From 6165da7d33494cb88bc0d107ac60d64d65b303b5 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Mon, 31 Dec 2012 01:03:41 +0530 Subject: [PATCH 41/48] video: da8xx-fb: ensure non-null cfg in pdata @@ -7,7 +7,7 @@ Ensure that platform data contains pointer for lcd_ctrl_config. Signed-off-by: Afzal Mohammed --- - drivers/video/da8xx-fb.c | 5 +++++ + drivers/video/da8xx-fb.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c @@ -27,5 +27,5 @@ index 7a32e83..3b146bc 100644 &device->dev); if (!da8xx_fb_info) { -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0042-video-da8xx-fb-reorganize-panel-detection.patch b/patches/da8xx-fb/0042-video-da8xx-fb-reorganize-panel-detection.patch index d8aa5f5c..7a0acfe4 100644 --- a/patches/da8xx-fb/0042-video-da8xx-fb-reorganize-panel-detection.patch +++ b/patches/da8xx-fb/0042-video-da8xx-fb-reorganize-panel-detection.patch @@ -1,4 +1,4 @@ -From 48e3252e315552f2079180d70a469e1408049af3 Mon Sep 17 00:00:00 2001 +From 93303501f2beea2bac9d3469d15cbe6e42bbdfcd Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Sun, 30 Dec 2012 23:49:36 +0530 Subject: [PATCH 42/48] video: da8xx-fb: reorganize panel detection @@ -8,7 +8,7 @@ as well as makes DT support cleaner. Signed-off-by: Afzal Mohammed --- - drivers/video/da8xx-fb.c | 42 ++++++++++++++++++++++++++---------------- + drivers/video/da8xx-fb.c | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c @@ -86,5 +86,5 @@ index 3b146bc..b6ea5e9 100644 if (!lcd_cfg) { -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0043-video-da8xx-fb-minimal-dt-support.patch b/patches/da8xx-fb/0043-video-da8xx-fb-minimal-dt-support.patch index 4bb63757..b738face 100644 --- a/patches/da8xx-fb/0043-video-da8xx-fb-minimal-dt-support.patch +++ b/patches/da8xx-fb/0043-video-da8xx-fb-minimal-dt-support.patch @@ -1,4 +1,4 @@ -From 915edfcf9873b31c40276cf07dfefa166dd1fc8e Mon Sep 17 00:00:00 2001 +From a6b3cc1ca000a6dc4e0aae5baa71cb9ecbda91f1 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Sun, 30 Dec 2012 19:11:08 +0530 Subject: [PATCH 43/48] video: da8xx-fb: minimal dt support @@ -7,8 +7,8 @@ Driver is provided a means to have the probe triggered by DT. Signed-off-by: Afzal Mohammed --- - .../devicetree/bindings/video/fb-da8xx.txt | 16 ++++++++++++++++ - drivers/video/da8xx-fb.c | 7 +++++++ + Documentation/devicetree/bindings/video/fb-da8xx.txt | 16 ++++++++++++++++ + drivers/video/da8xx-fb.c | 7 +++++++ 2 files changed, 23 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/fb-da8xx.txt @@ -60,5 +60,5 @@ index b6ea5e9..08ee8eb 100644 }; -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0044-video-da8xx-fb-invoke-platform-callback-safely.patch b/patches/da8xx-fb/0044-video-da8xx-fb-invoke-platform-callback-safely.patch index 7065a86d..efcc20fa 100644 --- a/patches/da8xx-fb/0044-video-da8xx-fb-invoke-platform-callback-safely.patch +++ b/patches/da8xx-fb/0044-video-da8xx-fb-invoke-platform-callback-safely.patch @@ -1,4 +1,4 @@ -From f5c748888597a1ca901e60b15a43d3524d8a392d Mon Sep 17 00:00:00 2001 +From b253b5401ece6b0902e84a5effcc357a3ab7a810 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Mon, 31 Dec 2012 00:02:32 +0530 Subject: [PATCH 44/48] video: da8xx-fb: invoke platform callback safely @@ -10,7 +10,7 @@ support has been added. Signed-off-by: Afzal Mohammed --- - drivers/video/da8xx-fb.c | 2 +- + drivers/video/da8xx-fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c @@ -27,5 +27,5 @@ index 08ee8eb..0beed20 100644 par->panel_power_ctrl(1); } -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0045-video-da8xx-fb-obtain-fb_videomode-info-from-dt.patch b/patches/da8xx-fb/0045-video-da8xx-fb-obtain-fb_videomode-info-from-dt.patch index 322d9287..0d75cca8 100644 --- a/patches/da8xx-fb/0045-video-da8xx-fb-obtain-fb_videomode-info-from-dt.patch +++ b/patches/da8xx-fb/0045-video-da8xx-fb-obtain-fb_videomode-info-from-dt.patch @@ -1,4 +1,4 @@ -From ad9ec865213a9edc4bada8a2d6c929e7cf31dcd6 Mon Sep 17 00:00:00 2001 +From 0173d0c2641f6c2c21191cea036796cbce6ac345 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Mon, 31 Dec 2012 00:31:14 +0530 Subject: [PATCH 45/48] video: da8xx-fb: obtain fb_videomode info from dt @@ -8,8 +8,8 @@ display timing details present in DT. Signed-off-by: Afzal Mohammed --- - .../devicetree/bindings/video/fb-da8xx.txt | 21 ++++++++++++++++++++ - drivers/video/da8xx-fb.c | 17 ++++++++++++++++ + .../devicetree/bindings/video/fb-da8xx.txt | 21 +++++++++++++++++++++ + drivers/video/da8xx-fb.c | 17 +++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/Documentation/devicetree/bindings/video/fb-da8xx.txt b/Documentation/devicetree/bindings/video/fb-da8xx.txt @@ -87,5 +87,5 @@ index 0beed20..0c68712 100644 i < ARRAY_SIZE(known_lcd_panels); i++, lcdc_info++) { if (strcmp(fb_pdata->type, lcdc_info->name) == 0) -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0046-video-da8xx-fb-ensure-pdata-only-for-non-dt.patch b/patches/da8xx-fb/0046-video-da8xx-fb-ensure-pdata-only-for-non-dt.patch index 0349286d..a26d0b3c 100644 --- a/patches/da8xx-fb/0046-video-da8xx-fb-ensure-pdata-only-for-non-dt.patch +++ b/patches/da8xx-fb/0046-video-da8xx-fb-ensure-pdata-only-for-non-dt.patch @@ -1,4 +1,4 @@ -From c0cbf3e284ded1b5f73fc0c6e4650908088fbc8d Mon Sep 17 00:00:00 2001 +From 82298064aa709e78deb8e191a8c5112edaa76230 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Mon, 31 Dec 2012 14:37:16 +0530 Subject: [PATCH 46/48] video: da8xx-fb: ensure pdata only for non-dt @@ -8,7 +8,7 @@ only for non-DT boot. Signed-off-by: Afzal Mohammed --- - drivers/video/da8xx-fb.c | 2 +- + drivers/video/da8xx-fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c @@ -25,5 +25,5 @@ index 0c68712..1c1a616 100644 return -ENOENT; } -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0047-video-da8xx-fb-setup-struct-lcd_ctrl_config-for-dt.patch b/patches/da8xx-fb/0047-video-da8xx-fb-setup-struct-lcd_ctrl_config-for-dt.patch index 2eac98f4..9249c01b 100644 --- a/patches/da8xx-fb/0047-video-da8xx-fb-setup-struct-lcd_ctrl_config-for-dt.patch +++ b/patches/da8xx-fb/0047-video-da8xx-fb-setup-struct-lcd_ctrl_config-for-dt.patch @@ -1,4 +1,4 @@ -From 9447bfc4adc67fb2429010e122c63093708c07f8 Mon Sep 17 00:00:00 2001 +From d6c95fd91cacdd7f8e1e66074047378ce63a4dd5 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Mon, 31 Dec 2012 15:03:12 +0530 Subject: [PATCH 47/48] video: da8xx-fb: setup struct lcd_ctrl_config for dt @@ -10,7 +10,7 @@ sufficient for the panels so far used with this controller to work. Signed-off-by: Afzal Mohammed --- - drivers/video/da8xx-fb.c | 34 +++++++++++++++++++++++++++++++++- + drivers/video/da8xx-fb.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c @@ -66,5 +66,5 @@ index 1c1a616..5455682 100644 if (!lcd_cfg) { ret = -EINVAL; -- -1.7.9.5 +1.9.0 diff --git a/patches/da8xx-fb/0048-video-da8xx-fb-CCF-clock-divider-handling.patch b/patches/da8xx-fb/0048-video-da8xx-fb-CCF-clock-divider-handling.patch index 289fd302..549ff360 100644 --- a/patches/da8xx-fb/0048-video-da8xx-fb-CCF-clock-divider-handling.patch +++ b/patches/da8xx-fb/0048-video-da8xx-fb-CCF-clock-divider-handling.patch @@ -1,4 +1,4 @@ -From 58fc5bb9e1ec0d5f6d8d35cf8a6102483ec59d0f Mon Sep 17 00:00:00 2001 +From 7b18d35be6db01334f96225dfaa855b615b78fe9 Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Wed, 16 Jan 2013 18:14:31 +0530 Subject: [PATCH 48/48] video: da8xx-fb: CCF clock divider handling @@ -17,7 +17,7 @@ clock rates that could be configured. Signed-off-by: Afzal Mohammed --- - drivers/video/da8xx-fb.c | 72 ++++++++++++++++++++++++++++++++++++++++++++-- + drivers/video/da8xx-fb.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 70 insertions(+), 2 deletions(-) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c @@ -164,5 +164,5 @@ index 5455682..6723683 100644 par->vram_size = lcdc_info->xres * lcdc_info->yres * lcd_cfg->bpp; ulcm = lcm((lcdc_info->xres * lcd_cfg->bpp)/8, PAGE_SIZE); -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0001-Without-MACH_-option-Early-printk-DEBUG_LL.patch b/patches/dma/0001-Without-MACH_-option-Early-printk-DEBUG_LL.patch index b0323823..8020c360 100644 --- a/patches/dma/0001-Without-MACH_-option-Early-printk-DEBUG_LL.patch +++ b/patches/dma/0001-Without-MACH_-option-Early-printk-DEBUG_LL.patch @@ -1,4 +1,4 @@ -From 396d8d0db550dc556e3f38223858fb97250798fb Mon Sep 17 00:00:00 2001 +From a374d6f607b6d90a3da1e5b97842d0367a94ed62 Mon Sep 17 00:00:00 2001 From: "hvaibhav@ti.com" Date: Fri, 31 Aug 2012 16:47:12 +0000 Subject: [PATCH 01/35] Without MACH_ option Early printk (DEBUG_LL) @@ -83,7 +83,7 @@ patch - Thanks, Vaibhav --- - arch/arm/mach-omap2/Kconfig | 12 ++++++++++++ + arch/arm/mach-omap2/Kconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig @@ -117,5 +117,5 @@ index 41b581f..ce05b87 100644 bool depends on ARCH_OMAP2 && SOC_OMAP2420 -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0002-ARM-OMAP-Hack-AM33xx-clock-data-to-allow-JTAG-use.patch b/patches/dma/0002-ARM-OMAP-Hack-AM33xx-clock-data-to-allow-JTAG-use.patch index 7ea3a3e2..8799a784 100644 --- a/patches/dma/0002-ARM-OMAP-Hack-AM33xx-clock-data-to-allow-JTAG-use.patch +++ b/patches/dma/0002-ARM-OMAP-Hack-AM33xx-clock-data-to-allow-JTAG-use.patch @@ -1,4 +1,4 @@ -From 498f42e141ca91b0ebd94d6ea9866813a3108243 Mon Sep 17 00:00:00 2001 +From a314c390eff52491a9b4c03c3362b31015f2a00b Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Mon, 7 Jan 2013 11:55:00 -0500 Subject: [PATCH 02/35] ARM: OMAP: Hack AM33xx clock data to allow JTAG use @@ -8,7 +8,7 @@ in order to prevent an attached JTAG probe from hanging. Signed-off-by: Matt Porter --- - arch/arm/mach-omap2/cclock33xx_data.c | 2 +- + arch/arm/mach-omap2/cclock33xx_data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c @@ -25,5 +25,5 @@ index ea64ad6..a09d6d7 100644 0x0, NULL); -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0003-video-st7735fb-add-st7735-framebuffer-driver.patch b/patches/dma/0003-video-st7735fb-add-st7735-framebuffer-driver.patch index e72a19f7..a8850933 100644 --- a/patches/dma/0003-video-st7735fb-add-st7735-framebuffer-driver.patch +++ b/patches/dma/0003-video-st7735fb-add-st7735-framebuffer-driver.patch @@ -1,4 +1,4 @@ -From b5861df588033c0049b2c59e5e007fe3aabca97a Mon Sep 17 00:00:00 2001 +From a03269d0d3be8d9815889ce2aea03841251b9a13 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Tue, 11 Sep 2012 15:30:10 -0400 Subject: [PATCH 03/35] video: st7735fb: add st7735 framebuffer driver @@ -8,11 +8,11 @@ This driver requires that the platform support DT booting. Signed-off-by: Matt Porter --- - .../devicetree/bindings/vendor-prefixes.txt | 2 + - drivers/video/Kconfig | 11 + - drivers/video/Makefile | 1 + - drivers/video/st7735fb.c | 631 ++++++++++++++++++++ - drivers/video/st7735fb.h | 84 +++ + .../devicetree/bindings/vendor-prefixes.txt | 2 + + drivers/video/Kconfig | 11 + + drivers/video/Makefile | 1 + + drivers/video/st7735fb.c | 631 +++++++++++++++++++++ + drivers/video/st7735fb.h | 84 +++ 5 files changed, 729 insertions(+) create mode 100644 drivers/video/st7735fb.c create mode 100644 drivers/video/st7735fb.h @@ -73,7 +73,7 @@ index 768a137..58dbeaf 100644 obj-$(CONFIG_FB_UVESA) += uvesafb.o diff --git a/drivers/video/st7735fb.c b/drivers/video/st7735fb.c new file mode 100644 -index 0000000..67c2544 +index 0000000..319653b --- /dev/null +++ b/drivers/video/st7735fb.c @@ -0,0 +1,631 @@ @@ -208,12 +208,12 @@ index 0000000..67c2544 +}; + +static struct fb_fix_screeninfo st7735fb_fix __devinitdata = { -+ .id = "ST7735", ++ .id = "ST7735", + .type = FB_TYPE_PACKED_PIXELS, + .visual = FB_VISUAL_DIRECTCOLOR, + .xpanstep = 0, + .ypanstep = 0, -+ .ywrapstep = 0, ++ .ywrapstep = 0, + .line_length = WIDTH*BPP/8, + .accel = FB_ACCEL_NONE, +}; @@ -400,14 +400,14 @@ index 0000000..67c2544 + st7735fb_update_display_deferred(info); +} + -+static void st7735fb_copyarea(struct fb_info *info, const struct fb_copyarea *area) ++static void st7735fb_copyarea(struct fb_info *info, const struct fb_copyarea *area) +{ + sys_copyarea(info, area); + + st7735fb_update_display_deferred(info); +} + -+static void st7735fb_imageblit(struct fb_info *info, const struct fb_image *image) ++static void st7735fb_imageblit(struct fb_info *info, const struct fb_image *image) +{ + sys_imageblit(info, image); + @@ -670,7 +670,7 @@ index 0000000..67c2544 + unregister_framebuffer(info); + fb_dealloc_cmap(&info->cmap); + kfree(info->pseudo_palette); -+ vfree(info->screen_base); ++ vfree(info->screen_base); + framebuffer_release(info); + } + @@ -799,5 +799,5 @@ index 0000000..0ce5c11 +#define ST7735_GMCTRN1 0xE1 +#define ST7735_PWCTR6 0xFC -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0004-dmaengine-add-helper-function-to-request-a-slave-DMA.patch b/patches/dma/0004-dmaengine-add-helper-function-to-request-a-slave-DMA.patch index 6f4ef8b9..3d7eadc4 100644 --- a/patches/dma/0004-dmaengine-add-helper-function-to-request-a-slave-DMA.patch +++ b/patches/dma/0004-dmaengine-add-helper-function-to-request-a-slave-DMA.patch @@ -1,4 +1,4 @@ -From 12ee7b670a9c6a611e9ecde702db117f52df6276 Mon Sep 17 00:00:00 2001 +From 33dc9c33f3bdd36a3c71ce0749e73d7885da0dbe Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Fri, 14 Sep 2012 17:41:57 -0500 Subject: [PATCH 04/35] dmaengine: add helper function to request a slave DMA @@ -30,8 +30,8 @@ Reviewed-by: Stephen Warren Acked-by: Rob Herring Signed-off-by: Vinod Koul --- - drivers/dma/dmaengine.c | 16 ++++++++++++++++ - include/linux/dmaengine.h | 6 ++++++ + drivers/dma/dmaengine.c | 16 ++++++++++++++++ + include/linux/dmaengine.h | 6 ++++++ 2 files changed, 22 insertions(+) diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c @@ -93,5 +93,5 @@ index d3201e4..8cd0e25 100644 { } -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0005-of-Add-generic-device-tree-DMA-helpers.patch b/patches/dma/0005-of-Add-generic-device-tree-DMA-helpers.patch index d803d8c5..9711bea2 100644 --- a/patches/dma/0005-of-Add-generic-device-tree-DMA-helpers.patch +++ b/patches/dma/0005-of-Add-generic-device-tree-DMA-helpers.patch @@ -1,4 +1,4 @@ -From 3ea5addf7d451d8eb9aaed37223eb9124664e8b9 Mon Sep 17 00:00:00 2001 +From 404f7f932b09be589270d7d482e2f25afce25af9 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Fri, 14 Sep 2012 17:41:56 -0500 Subject: [PATCH 05/35] of: Add generic device tree DMA helpers @@ -149,10 +149,10 @@ Reviewed-by: Stephen Warren Acked-by: Rob Herring Signed-off-by: Vinod Koul --- - Documentation/devicetree/bindings/dma/dma.txt | 81 +++++++++ - drivers/of/Makefile | 2 +- - drivers/of/dma.c | 219 +++++++++++++++++++++++++ - include/linux/of_dma.h | 45 +++++ + Documentation/devicetree/bindings/dma/dma.txt | 81 ++++++++++ + drivers/of/Makefile | 2 +- + drivers/of/dma.c | 219 ++++++++++++++++++++++++++ + include/linux/of_dma.h | 45 ++++++ 4 files changed, 346 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/dma/dma.txt create mode 100644 drivers/of/dma.c @@ -532,5 +532,5 @@ index 0000000..337823d + +#endif /* __LINUX_OF_DMA_H */ -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0006-of-dma-fix-build-break-for-CONFIG_OF.patch b/patches/dma/0006-of-dma-fix-build-break-for-CONFIG_OF.patch index a87d57e8..12e1f3ba 100644 --- a/patches/dma/0006-of-dma-fix-build-break-for-CONFIG_OF.patch +++ b/patches/dma/0006-of-dma-fix-build-break-for-CONFIG_OF.patch @@ -1,11 +1,11 @@ -From bfcc562e69db864d5d6c69378d3faf71088e2cd5 Mon Sep 17 00:00:00 2001 +From 1c1f2b3cb1c181cc1f8f3230d7dd8554093a2aa3 Mon Sep 17 00:00:00 2001 From: Vinod Koul Date: Tue, 25 Sep 2012 09:57:36 +0530 Subject: [PATCH 06/35] of: dma- fix build break for !CONFIG_OF Signed-off-by: Vinod Koul --- - include/linux/of_dma.h | 27 +++++++++++++++++++++++++++ + include/linux/of_dma.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/include/linux/of_dma.h b/include/linux/of_dma.h @@ -53,5 +53,5 @@ index 337823d..67158dd 100644 #endif /* __LINUX_OF_DMA_H */ -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0007-of-dma-fix-typos-in-generic-dma-binding-definition.patch b/patches/dma/0007-of-dma-fix-typos-in-generic-dma-binding-definition.patch index cf1c83a2..4a7f490f 100644 --- a/patches/dma/0007-of-dma-fix-typos-in-generic-dma-binding-definition.patch +++ b/patches/dma/0007-of-dma-fix-typos-in-generic-dma-binding-definition.patch @@ -1,4 +1,4 @@ -From f5a217763677ee91788be4c1bee1500f53ce1fdf Mon Sep 17 00:00:00 2001 +From 0edc36ee33421cd79bcad2d76e9fbe8bb6364fb4 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Wed, 19 Sep 2012 10:49:48 -0400 Subject: [PATCH 07/35] of: dma: fix typos in generic dma binding definition @@ -14,7 +14,7 @@ Acked-by: Arnd Bergmann Acked-by: Jon Hunter Signed-off-by: Vinod Koul --- - Documentation/devicetree/bindings/dma/dma.txt | 14 +++++++------- + Documentation/devicetree/bindings/dma/dma.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Documentation/devicetree/bindings/dma/dma.txt b/Documentation/devicetree/bindings/dma/dma.txt @@ -68,5 +68,5 @@ index a4f59a5..8f504e6 100644 3. A device with three channels, one of which has two alternatives: -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0008-dmaengine-fix-build-failure-due-to-missing-semi-colo.patch b/patches/dma/0008-dmaengine-fix-build-failure-due-to-missing-semi-colo.patch index fa5bb639..00f7b9c8 100644 --- a/patches/dma/0008-dmaengine-fix-build-failure-due-to-missing-semi-colo.patch +++ b/patches/dma/0008-dmaengine-fix-build-failure-due-to-missing-semi-colo.patch @@ -1,4 +1,4 @@ -From 5ff6a764b5aca749ff30929ee89a01f7e02a0921 Mon Sep 17 00:00:00 2001 +From 91f2e5d1d06660733e92c6302de9f1f884487318 Mon Sep 17 00:00:00 2001 From: Vinod Koul Date: Tue, 25 Sep 2012 16:18:55 +0530 Subject: [PATCH 08/35] dmaengine: fix build failure due to missing semi-colon @@ -6,7 +6,7 @@ Subject: [PATCH 08/35] dmaengine: fix build failure due to missing semi-colon Reported-by: Fengguang Wu Signed-off-by: Vinod Koul --- - include/linux/dmaengine.h | 2 +- + include/linux/dmaengine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h @@ -23,5 +23,5 @@ index 8cd0e25..c88f302 100644 static inline void dma_release_channel(struct dma_chan *chan) { -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0009-dmaengine-edma-fix-slave-config-dependency-on-direct.patch b/patches/dma/0009-dmaengine-edma-fix-slave-config-dependency-on-direct.patch index efad8158..56705ea7 100644 --- a/patches/dma/0009-dmaengine-edma-fix-slave-config-dependency-on-direct.patch +++ b/patches/dma/0009-dmaengine-edma-fix-slave-config-dependency-on-direct.patch @@ -1,4 +1,4 @@ -From 39c889a96066c47258d442ada598ae12e243fd28 Mon Sep 17 00:00:00 2001 +From 3e5237a01758eb80d2c9ee288692f8e4ff2e6e1e Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Tue, 18 Sep 2012 18:57:15 +0000 Subject: [PATCH 09/35] dmaengine: edma: fix slave config dependency on @@ -17,7 +17,7 @@ direction field. Signed-off-by: Matt Porter --- - drivers/dma/edma.c | 55 ++++++++++++++++++++++++++-------------------------- + drivers/dma/edma.c | 55 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c @@ -144,5 +144,5 @@ index f424298..06ea4b8 100644 src_bidx = 0; src_cidx = 0; -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0010-dmaengine-add-dma_get_channel_caps.patch b/patches/dma/0010-dmaengine-add-dma_get_channel_caps.patch index 33d94389..7d2d3df4 100644 --- a/patches/dma/0010-dmaengine-add-dma_get_channel_caps.patch +++ b/patches/dma/0010-dmaengine-add-dma_get_channel_caps.patch @@ -1,4 +1,4 @@ -From 08242db66c90b5c717164500cb52f21811a49aa1 Mon Sep 17 00:00:00 2001 +From a489c41c94d6e49880a68e581a67c9db928f250c Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Thu, 18 Oct 2012 21:07:28 -0400 Subject: [PATCH 10/35] dmaengine: add dma_get_channel_caps() @@ -20,7 +20,7 @@ segment limit caps. Suggested-by: Vinod Koul Signed-off-by: Matt Porter --- - include/linux/dmaengine.h | 40 ++++++++++++++++++++++++++++++++++++++++ + include/linux/dmaengine.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h @@ -96,5 +96,5 @@ index c88f302..9fd0c5b 100644 #ifdef CONFIG_DMA_ENGINE enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0011-dma-edma-add-device_channel_caps-support.patch b/patches/dma/0011-dma-edma-add-device_channel_caps-support.patch index 38555062..a5df86a1 100644 --- a/patches/dma/0011-dma-edma-add-device_channel_caps-support.patch +++ b/patches/dma/0011-dma-edma-add-device_channel_caps-support.patch @@ -1,4 +1,4 @@ -From 5ae64acd7c51857ce400dd647cec2ec6bb215668 Mon Sep 17 00:00:00 2001 +From 92a9aa25c59e14e4c07c6bc7534fe6260bb91da3 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Thu, 18 Oct 2012 21:08:59 -0400 Subject: [PATCH 11/35] dma: edma: add device_channel_caps() support @@ -18,7 +18,7 @@ the max segment length cap. Signed-off-by: Matt Porter --- - drivers/dma/edma.c | 27 +++++++++++++++++++++++++++ + drivers/dma/edma.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c @@ -81,5 +81,5 @@ index 06ea4b8..023c8f2 100644 dma->device_control = edma_control; dma->dev = dev; -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0012-mmc-davinci-get-SG-segment-limits-with-dma_get_chann.patch b/patches/dma/0012-mmc-davinci-get-SG-segment-limits-with-dma_get_chann.patch index a4bd785b..658fb9f3 100644 --- a/patches/dma/0012-mmc-davinci-get-SG-segment-limits-with-dma_get_chann.patch +++ b/patches/dma/0012-mmc-davinci-get-SG-segment-limits-with-dma_get_chann.patch @@ -1,4 +1,4 @@ -From 62275949b1e6eee0cc8d9613738ce14be4908897 Mon Sep 17 00:00:00 2001 +From ae6a3522db9a5c6f0e44b134af060cf1773831b3 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Thu, 18 Oct 2012 21:10:47 -0400 Subject: [PATCH 12/35] mmc: davinci: get SG segment limits with @@ -9,8 +9,8 @@ a dma_get_channel_caps() query to the dmaengine driver. Signed-off-by: Matt Porter --- - drivers/mmc/host/davinci_mmc.c | 66 +++++++++-------------------- - include/linux/platform_data/mmc-davinci.h | 3 -- + drivers/mmc/host/davinci_mmc.c | 66 ++++++++++--------------------- + include/linux/platform_data/mmc-davinci.h | 3 -- 2 files changed, 21 insertions(+), 48 deletions(-) diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c @@ -150,5 +150,5 @@ index 5ba6b22..6910209 100644 void davinci_setup_mmc(int module, struct davinci_mmc_config *config); -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0013-ARM-davinci-move-private-EDMA-API-to-arm-common.patch b/patches/dma/0013-ARM-davinci-move-private-EDMA-API-to-arm-common.patch index 797cdf25..6a80682c 100644 --- a/patches/dma/0013-ARM-davinci-move-private-EDMA-API-to-arm-common.patch +++ b/patches/dma/0013-ARM-davinci-move-private-EDMA-API-to-arm-common.patch @@ -1,4 +1,4 @@ -From 20df48ea07d97f15b8c191c9e4e77516572e4305 Mon Sep 17 00:00:00 2001 +From ab3991c177b37d1b00b2e8b3b9909ad6dfb87500 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Wed, 22 Aug 2012 09:24:24 -0400 Subject: [PATCH 13/35] ARM: davinci: move private EDMA API to arm/common @@ -12,7 +12,7 @@ Signed-off-by: Matt Porter arch/arm/Kconfig | 1 + arch/arm/common/Kconfig | 3 + arch/arm/common/Makefile | 1 + - arch/arm/common/edma.c | 1591 +++++++++++++++++++++++++++ + arch/arm/common/edma.c | 1590 ++++++++++++++++++++++++++ arch/arm/mach-davinci/Makefile | 2 +- arch/arm/mach-davinci/board-tnetv107x-evm.c | 2 +- arch/arm/mach-davinci/davinci.h | 2 +- @@ -35,7 +35,7 @@ Signed-off-by: Matt Porter sound/soc/davinci/davinci-pcm.c | 1 + sound/soc/davinci/davinci-pcm.h | 2 +- sound/soc/davinci/davinci-sffsdr.c | 6 +- - 26 files changed, 1802 insertions(+), 1878 deletions(-) + 26 files changed, 1801 insertions(+), 1878 deletions(-) create mode 100644 arch/arm/common/edma.c delete mode 100644 arch/arm/mach-davinci/dma.c delete mode 100644 arch/arm/mach-davinci/include/mach/edma.h @@ -75,10 +75,10 @@ index e8a4e58..d09a39b 100644 +obj-$(CONFIG_TI_PRIV_EDMA) += edma.o diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c new file mode 100644 -index 0000000..36a0676 +index 0000000..87148ab --- /dev/null +++ b/arch/arm/common/edma.c -@@ -0,0 +1,1591 @@ +@@ -0,0 +1,1590 @@ +/* + * EDMA3 support for DaVinci + * @@ -1669,7 +1669,6 @@ index 0000000..36a0676 + return platform_driver_probe(&edma_driver, edma_probe); +} +arch_initcall(edma_init); -+ diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile index fb5c1aa..493a36b 100644 --- a/arch/arm/mach-davinci/Makefile @@ -4037,5 +4036,5 @@ index 5be65aa..074fc5d 100644 static struct platform_device *sffsdr_snd_device; -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0014-ARM-edma-remove-unused-transfer-controller-handlers.patch b/patches/dma/0014-ARM-edma-remove-unused-transfer-controller-handlers.patch index e274ccd7..ea21a611 100644 --- a/patches/dma/0014-ARM-edma-remove-unused-transfer-controller-handlers.patch +++ b/patches/dma/0014-ARM-edma-remove-unused-transfer-controller-handlers.patch @@ -1,4 +1,4 @@ -From f134bf751666db16bcbf12ead88636eb071196bf Mon Sep 17 00:00:00 2001 +From 2c0dd89dfc357e98085607b24bdc3016717af8aa Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Wed, 22 Aug 2012 09:31:49 -0400 Subject: [PATCH 14/35] ARM: edma: remove unused transfer controller handlers @@ -9,11 +9,11 @@ so since they are unused code, simply remove them. Signed-off-by: Matt Porter --- - arch/arm/common/edma.c | 37 ------------------------------------- + arch/arm/common/edma.c | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c -index 36a0676..3580eca 100644 +index 87148ab..6f93acf 100644 --- a/arch/arm/common/edma.c +++ b/arch/arm/common/edma.c @@ -494,26 +494,6 @@ static irqreturn_t dma_ccerr_handler(int irq, void *data) @@ -68,5 +68,5 @@ index 36a0676..3580eca 100644 fail: -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0015-ARM-edma-add-AM33XX-support-to-the-private-EDMA-API.patch b/patches/dma/0015-ARM-edma-add-AM33XX-support-to-the-private-EDMA-API.patch index 38870818..6c75ee95 100644 --- a/patches/dma/0015-ARM-edma-add-AM33XX-support-to-the-private-EDMA-API.patch +++ b/patches/dma/0015-ARM-edma-add-AM33XX-support-to-the-private-EDMA-API.patch @@ -1,4 +1,4 @@ -From d4bc655418a866783ae9c0ee093492e2abd70b76 Mon Sep 17 00:00:00 2001 +From 95482075e1c715b828c4de8294aed6fedfb15d0f Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Thu, 6 Sep 2012 17:40:42 -0400 Subject: [PATCH 15/35] ARM: edma: add AM33XX support to the private EDMA API @@ -10,12 +10,12 @@ support. Signed-off-by: Matt Porter --- - arch/arm/common/edma.c | 311 ++++++++++++++++++++++++++++++++++-- - include/linux/platform_data/edma.h | 1 + + arch/arm/common/edma.c | 311 +++++++++++++++++++++++++++++++++++-- + include/linux/platform_data/edma.h | 1 + 2 files changed, 303 insertions(+), 9 deletions(-) diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c -index 3580eca..beeb1d2 100644 +index 6f93acf..4c07461 100644 --- a/arch/arm/common/edma.c +++ b/arch/arm/common/edma.c @@ -24,6 +24,13 @@ @@ -400,5 +400,5 @@ index 2344ea2..ffc1fb2 100644 #endif -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0016-dmaengine-edma-enable-build-for-AM33XX.patch b/patches/dma/0016-dmaengine-edma-enable-build-for-AM33XX.patch index fd1f4e5c..01274565 100644 --- a/patches/dma/0016-dmaengine-edma-enable-build-for-AM33XX.patch +++ b/patches/dma/0016-dmaengine-edma-enable-build-for-AM33XX.patch @@ -1,4 +1,4 @@ -From bbc63ebd0fd632302c1a2eb1154f38e9ee1d1aa5 Mon Sep 17 00:00:00 2001 +From 2e68f4d629c844809add5fa8febdd599ca7e8953 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Thu, 6 Sep 2012 17:42:35 -0400 Subject: [PATCH 16/35] dmaengine: edma: enable build for AM33XX @@ -7,11 +7,11 @@ Enable TI EDMA option on OMAP. Signed-off-by: Matt Porter --- - drivers/dma/Kconfig | 2 +- + drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig -index d4c1218..20ef955 100644 +index d4c1218..20ef9556 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -221,7 +221,7 @@ config SIRF_DMA @@ -24,5 +24,5 @@ index d4c1218..20ef955 100644 select DMA_VIRTUAL_CHANNELS default n -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0017-dmaengine-edma-Add-TI-EDMA-device-tree-binding.patch b/patches/dma/0017-dmaengine-edma-Add-TI-EDMA-device-tree-binding.patch index e51cc34f..89c63ef7 100644 --- a/patches/dma/0017-dmaengine-edma-Add-TI-EDMA-device-tree-binding.patch +++ b/patches/dma/0017-dmaengine-edma-Add-TI-EDMA-device-tree-binding.patch @@ -1,4 +1,4 @@ -From 75396d25bd7c8e383559a4f0ee804887defe8c46 Mon Sep 17 00:00:00 2001 +From 0ee996298dece71900421a644d44f5a4fc1e0c46 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Thu, 20 Sep 2012 07:46:04 -0400 Subject: [PATCH 17/35] dmaengine: edma: Add TI EDMA device tree binding @@ -8,7 +8,7 @@ binding. Signed-off-by: Matt Porter --- - Documentation/devicetree/bindings/dma/ti-edma.txt | 49 +++++++++++++++++++++ + Documentation/devicetree/bindings/dma/ti-edma.txt | 49 +++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/ti-edma.txt @@ -68,5 +68,5 @@ index 0000000..075a60e3 + 2 13>; +}; -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0018-ARM-dts-add-AM33XX-EDMA-support.patch b/patches/dma/0018-ARM-dts-add-AM33XX-EDMA-support.patch index 3b7c329d..98f76130 100644 --- a/patches/dma/0018-ARM-dts-add-AM33XX-EDMA-support.patch +++ b/patches/dma/0018-ARM-dts-add-AM33XX-EDMA-support.patch @@ -1,4 +1,4 @@ -From 35d4214da597e9f39151074cc4bcd31b4006c52d Mon Sep 17 00:00:00 2001 +From 903462ea435edc84030f817ca27a435c9e8dba3f Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Wed, 10 Oct 2012 10:01:33 -0400 Subject: [PATCH 18/35] ARM: dts: add AM33XX EDMA support @@ -8,7 +8,7 @@ Documentation/devicetree/bindings/dma/ti-edma.txt Signed-off-by: Matt Porter --- - arch/arm/boot/dts/am33xx.dtsi | 20 ++++++++++++++++++++ + arch/arm/boot/dts/am33xx.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi @@ -43,5 +43,5 @@ index c2f14e8..e711ffb 100644 compatible = "ti,omap4-gpio"; ti,hwmods = "gpio1"; -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0019-dmaengine-add-dma_request_slave_channel_compat.patch b/patches/dma/0019-dmaengine-add-dma_request_slave_channel_compat.patch index a577272b..e94dbff1 100644 --- a/patches/dma/0019-dmaengine-add-dma_request_slave_channel_compat.patch +++ b/patches/dma/0019-dmaengine-add-dma_request_slave_channel_compat.patch @@ -1,4 +1,4 @@ -From bab162a7d4088713457b09f7908697cc13fac38a Mon Sep 17 00:00:00 2001 +From ff541c16c00dd710adf9acc0c163a65cc8a25be8 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Thu, 11 Oct 2012 12:58:44 -0400 Subject: [PATCH 19/35] dmaengine: add dma_request_slave_channel_compat() @@ -17,7 +17,7 @@ Suggested-by: Tony Lindgren Signed-off-by: Matt Porter Acked-by: Tony Lindgren --- - include/linux/dmaengine.h | 10 ++++++++++ + include/linux/dmaengine.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h @@ -42,5 +42,5 @@ index 9fd0c5b..64f9f69 100644 /* --- Helper iov-locking functions --- */ -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0020-mmc-omap_hsmmc-convert-to-dma_request_slave_channel_.patch b/patches/dma/0020-mmc-omap_hsmmc-convert-to-dma_request_slave_channel_.patch index 03c9b147..553aa24a 100644 --- a/patches/dma/0020-mmc-omap_hsmmc-convert-to-dma_request_slave_channel_.patch +++ b/patches/dma/0020-mmc-omap_hsmmc-convert-to-dma_request_slave_channel_.patch @@ -1,4 +1,4 @@ -From 8f5535ee3b5c0d2a84e0307fbbbb3e898b8f98db Mon Sep 17 00:00:00 2001 +From 7e7d3682443139bf72d9d1fc21a11d029d2433a5 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Thu, 6 Sep 2012 17:47:21 -0400 Subject: [PATCH 20/35] mmc: omap_hsmmc: convert to @@ -14,7 +14,7 @@ filter. Signed-off-by: Matt Porter Acked-by: Tony Lindgren --- - drivers/mmc/host/omap_hsmmc.c | 10 ++++++++-- + drivers/mmc/host/omap_hsmmc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c @@ -45,5 +45,5 @@ index bc58078..e79b12d 100644 dev_err(mmc_dev(host->mmc), "unable to obtain TX DMA engine channel %u\n", tx_req); ret = -ENXIO; -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0021-mmc-omap_hsmmc-set-max_segs-based-on-dma-engine-limi.patch b/patches/dma/0021-mmc-omap_hsmmc-set-max_segs-based-on-dma-engine-limi.patch index 5155d3ae..c5c13ef3 100644 --- a/patches/dma/0021-mmc-omap_hsmmc-set-max_segs-based-on-dma-engine-limi.patch +++ b/patches/dma/0021-mmc-omap_hsmmc-set-max_segs-based-on-dma-engine-limi.patch @@ -1,4 +1,4 @@ -From 7b9fbbdae8a82d34bfbfa1031e1620dd7b4e5055 Mon Sep 17 00:00:00 2001 +From da75a7f46f3cce216803cfbb7d4a9a6bcc69f168 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Thu, 20 Sep 2012 08:55:41 -0400 Subject: [PATCH 21/35] mmc: omap_hsmmc: set max_segs based on dma engine @@ -14,7 +14,7 @@ appropriately. Signed-off-by: Matt Porter Acked-by: Tony Lindgren --- - drivers/mmc/host/omap_hsmmc.c | 6 ++++++ + drivers/mmc/host/omap_hsmmc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c @@ -42,5 +42,5 @@ index e79b12d..f74bd69 100644 ret = request_irq(host->irq, omap_hsmmc_irq, 0, mmc_hostname(mmc), host); -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0022-mmc-omap_hsmmc-add-generic-DMA-request-support-to-th.patch b/patches/dma/0022-mmc-omap_hsmmc-add-generic-DMA-request-support-to-th.patch index 3218566d..850645fc 100644 --- a/patches/dma/0022-mmc-omap_hsmmc-add-generic-DMA-request-support-to-th.patch +++ b/patches/dma/0022-mmc-omap_hsmmc-add-generic-DMA-request-support-to-th.patch @@ -1,15 +1,15 @@ -From b9d03b9c4236c77fe00cd82e4198d448116cf25d Mon Sep 17 00:00:00 2001 +From e596ba44e2f398a960f0649429147af9eb11ca32 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Thu, 20 Sep 2012 07:47:47 -0400 -Subject: [PATCH 22/35] mmc: omap_hsmmc: add generic DMA request support to - the DT binding +Subject: [PATCH 22/35] mmc: omap_hsmmc: add generic DMA request support to the + DT binding The binding definition is based on the generic DMA request binding. Signed-off-by: Matt Porter Acked-by: Tony Lindgren --- - .../devicetree/bindings/mmc/ti-omap-hsmmc.txt | 25 +++++++++++++++++++- + .../devicetree/bindings/mmc/ti-omap-hsmmc.txt | 25 +++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt @@ -55,5 +55,5 @@ index ed271fc..826cc51 100644 + dma-names = "tx", "rx"; }; -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0023-ARM-dts-add-AM33XX-MMC-support.patch b/patches/dma/0023-ARM-dts-add-AM33XX-MMC-support.patch index 7f5a8900..460d2fdb 100644 --- a/patches/dma/0023-ARM-dts-add-AM33XX-MMC-support.patch +++ b/patches/dma/0023-ARM-dts-add-AM33XX-MMC-support.patch @@ -1,4 +1,4 @@ -From e38434bf0956eedda97b719fbcd4a3044c12fc38 Mon Sep 17 00:00:00 2001 +From 07aed1618d9cb2f65402eb84236b264b72ae67dd Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Wed, 10 Oct 2012 15:14:03 -0400 Subject: [PATCH 23/35] ARM: dts: add AM33XX MMC support @@ -9,10 +9,10 @@ am335x-evmsk. Signed-off-by: Matt Porter Acked-by: Tony Lindgren --- - arch/arm/boot/dts/am335x-bone.dts | 7 +++++++ - arch/arm/boot/dts/am335x-evm.dts | 7 +++++++ - arch/arm/boot/dts/am335x-evmsk.dts | 7 +++++++ - arch/arm/boot/dts/am33xx.dtsi | 28 ++++++++++++++++++++++++++++ + arch/arm/boot/dts/am335x-bone.dts | 7 +++++++ + arch/arm/boot/dts/am335x-evm.dts | 7 +++++++ + arch/arm/boot/dts/am335x-evmsk.dts | 7 +++++++ + arch/arm/boot/dts/am33xx.dtsi | 28 ++++++++++++++++++++++++++++ 4 files changed, 49 insertions(+) diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts @@ -118,5 +118,5 @@ index e711ffb..278b75d 100644 compatible = "ti,omap3-wdt"; ti,hwmods = "wd_timer2"; -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0024-spi-omap2-mcspi-convert-to-dma_request_slave_channel.patch b/patches/dma/0024-spi-omap2-mcspi-convert-to-dma_request_slave_channel.patch index db1ab2b8..4434f434 100644 --- a/patches/dma/0024-spi-omap2-mcspi-convert-to-dma_request_slave_channel.patch +++ b/patches/dma/0024-spi-omap2-mcspi-convert-to-dma_request_slave_channel.patch @@ -1,4 +1,4 @@ -From d0f1d60ac61bfe2596ff436d72a3da6e516fc80f Mon Sep 17 00:00:00 2001 +From a5fddb933d3fe307b8ccbd84f48549b301502773 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Thu, 20 Sep 2012 00:37:54 -0400 Subject: [PATCH 24/35] spi: omap2-mcspi: convert to @@ -13,7 +13,7 @@ filter. Signed-off-by: Matt Porter --- - drivers/spi/spi-omap2-mcspi.c | 65 ++++++++++++++++++++++++++++------------- + drivers/spi/spi-omap2-mcspi.c | 65 ++++++++++++++++++++++++++++++------------- 1 file changed, 45 insertions(+), 20 deletions(-) diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c @@ -118,5 +118,5 @@ index b610f52..2c02c02 100644 if (status < 0) -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0025-spi-omap2-mcspi-add-generic-DMA-request-support-to-t.patch b/patches/dma/0025-spi-omap2-mcspi-add-generic-DMA-request-support-to-t.patch index fa57c9a3..49f9d2a2 100644 --- a/patches/dma/0025-spi-omap2-mcspi-add-generic-DMA-request-support-to-t.patch +++ b/patches/dma/0025-spi-omap2-mcspi-add-generic-DMA-request-support-to-t.patch @@ -1,4 +1,4 @@ -From 133616c002d5b66c5b6d14b5de742d9ceb4f57e6 Mon Sep 17 00:00:00 2001 +From 0630c633bdce602d53a07d61f7f9d20366f67425 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Thu, 20 Sep 2012 09:21:16 -0400 Subject: [PATCH 25/35] spi: omap2-mcspi: add generic DMA request support to @@ -8,11 +8,11 @@ The binding definition is based on the generic DMA request binding. Signed-off-by: Matt Porter --- - Documentation/devicetree/bindings/spi/omap-spi.txt | 28 +++++++++++++++++++- - 1 file changed, 27 insertions(+), 1 deletion(-) + Documentation/devicetree/bindings/spi/omap-spi.txt | 27 +++++++++++++++++++++- + 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/spi/omap-spi.txt b/Documentation/devicetree/bindings/spi/omap-spi.txt -index 938809c..3bd8eed 100644 +index 938809c..68cb28e 100644 --- a/Documentation/devicetree/bindings/spi/omap-spi.txt +++ b/Documentation/devicetree/bindings/spi/omap-spi.txt @@ -10,7 +10,18 @@ Required properties: @@ -35,7 +35,7 @@ index 938809c..3bd8eed 100644 mcspi1: mcspi@1 { #address-cells = <1>; -@@ -20,3 +31,18 @@ mcspi1: mcspi@1 { +@@ -20,3 +31,17 @@ mcspi1: mcspi@1 { ti,spi-num-cs = <4>; }; @@ -53,7 +53,6 @@ index 938809c..3bd8eed 100644 + &edma 45>; + dma-names = "tx0", "rx0", "tx1", "rx1"; +}; -+ -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0026-ARM-dts-add-AM33XX-SPI-DMA-support.patch b/patches/dma/0026-ARM-dts-add-AM33XX-SPI-DMA-support.patch index 21b70414..6e437919 100644 --- a/patches/dma/0026-ARM-dts-add-AM33XX-SPI-DMA-support.patch +++ b/patches/dma/0026-ARM-dts-add-AM33XX-SPI-DMA-support.patch @@ -1,4 +1,4 @@ -From 777b92acff1f162ce9472fab5210f63dca10cb89 Mon Sep 17 00:00:00 2001 +From 24d07a96a7a068d7e83ce2bc01f26048d183a6e5 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Thu, 10 Jan 2013 19:09:50 -0500 Subject: [PATCH 26/35] ARM: dts: add AM33XX SPI DMA support @@ -7,7 +7,7 @@ Adds DMA resources to the AM33XX SPI nodes. Signed-off-by: Matt Porter --- - arch/arm/boot/dts/am33xx.dtsi | 10 ++++++++++ + arch/arm/boot/dts/am33xx.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi @@ -39,5 +39,5 @@ index 278b75d..8fd3648 100644 }; -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0027-ARM-dts-Add-SPI-Flash-support-to-am335x-evm.patch b/patches/dma/0027-ARM-dts-Add-SPI-Flash-support-to-am335x-evm.patch index 5880b6c0..7ea504fe 100644 --- a/patches/dma/0027-ARM-dts-Add-SPI-Flash-support-to-am335x-evm.patch +++ b/patches/dma/0027-ARM-dts-Add-SPI-Flash-support-to-am335x-evm.patch @@ -1,4 +1,4 @@ -From ce74cb8352780283a7a31fbe6ff66153e7f90330 Mon Sep 17 00:00:00 2001 +From 7fe9769fb2bcedc4876507af101e27474fdb3302 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Thu, 10 Jan 2013 19:11:38 -0500 Subject: [PATCH 27/35] ARM: dts: Add SPI Flash support to am335x-evm @@ -7,7 +7,7 @@ Add SPI pinmuxing and spansion device node for profile 2.. Signed-off-by: Matt Porter --- - arch/arm/boot/dts/am335x-evm.dts | 21 ++++++++++++++++++++- + arch/arm/boot/dts/am335x-evm.dts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts @@ -54,5 +54,5 @@ index 2907da6..0dda333 100644 + }; +}; -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0028-Documentation-bindings-add-spansion.patch b/patches/dma/0028-Documentation-bindings-add-spansion.patch index 486ead05..4c024f92 100644 --- a/patches/dma/0028-Documentation-bindings-add-spansion.patch +++ b/patches/dma/0028-Documentation-bindings-add-spansion.patch @@ -1,11 +1,11 @@ -From 10f9875508c6a8481bfa06a7ada69261e8d3c14f Mon Sep 17 00:00:00 2001 +From e8a2d9248590369f72ec9a7552432533f7e2071f Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Wed, 17 Oct 2012 17:12:09 -0400 Subject: [PATCH 28/35] Documentation: bindings: add spansion Signed-off-by: Matt Porter --- - .../devicetree/bindings/vendor-prefixes.txt | 1 + + Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -21,5 +21,5 @@ index 2e000ea..cb0209a 100644 stericsson ST-Ericsson ti Texas Instruments -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0029-ARM-dts-enable-spi1-node-and-pinmux-on-BeagleBone.patch b/patches/dma/0029-ARM-dts-enable-spi1-node-and-pinmux-on-BeagleBone.patch index c701d98c..50db0131 100644 --- a/patches/dma/0029-ARM-dts-enable-spi1-node-and-pinmux-on-BeagleBone.patch +++ b/patches/dma/0029-ARM-dts-enable-spi1-node-and-pinmux-on-BeagleBone.patch @@ -1,4 +1,4 @@ -From 73d8b6b139f868bb5c7a487c7310a229a67df4bf Mon Sep 17 00:00:00 2001 +From b8e2f02e17905afe9563055f1eda4193de4dcca4 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Thu, 10 Jan 2013 19:13:30 -0500 Subject: [PATCH 29/35] ARM: dts: enable spi1 node and pinmux on BeagleBone @@ -8,7 +8,7 @@ pins. Signed-off-by: Matt Porter --- - arch/arm/boot/dts/am335x-bone.dts | 15 ++++++++++++++- + arch/arm/boot/dts/am335x-bone.dts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts @@ -49,5 +49,5 @@ index a154ce0..ccff86a 100644 + status = "okay"; +}; -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0030-ARM-dts-add-BeagleBone-Adafruit-1.8-LCD-support.patch b/patches/dma/0030-ARM-dts-add-BeagleBone-Adafruit-1.8-LCD-support.patch index 15b4395f..4e7c2573 100644 --- a/patches/dma/0030-ARM-dts-add-BeagleBone-Adafruit-1.8-LCD-support.patch +++ b/patches/dma/0030-ARM-dts-add-BeagleBone-Adafruit-1.8-LCD-support.patch @@ -1,11 +1,11 @@ -From 7900c72038aafb43f3c1af65c5e8bacdac99cbb2 Mon Sep 17 00:00:00 2001 +From 74e3c1b42f8e4dae591dc27d5a476ffd5c91b4f2 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Thu, 11 Oct 2012 08:52:54 -0400 Subject: [PATCH 30/35] ARM: dts: add BeagleBone Adafruit 1.8 LCD support Signed-off-by: Matt Porter --- - arch/arm/boot/dts/am335x-bone.dts | 19 ++++++++++++++++++- + arch/arm/boot/dts/am335x-bone.dts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts @@ -51,5 +51,5 @@ index ccff86a..8ac3ae4 100644 + }; }; -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0031-misc-add-gpevt-driver.patch b/patches/dma/0031-misc-add-gpevt-driver.patch index 3c41c44c..55513f2c 100644 --- a/patches/dma/0031-misc-add-gpevt-driver.patch +++ b/patches/dma/0031-misc-add-gpevt-driver.patch @@ -1,4 +1,4 @@ -From 04911881a54c4f5116a46ba1fad213c68fce21ab Mon Sep 17 00:00:00 2001 +From 2c7edb907297567b7843f059ad0cea65c63d90a5 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Wed, 17 Oct 2012 10:48:22 -0400 Subject: [PATCH 31/35] misc: add gpevt driver @@ -7,9 +7,9 @@ Simply amazing...'nuff said. Signed-off-by: Matt Porter --- - drivers/misc/Kconfig | 6 ++ - drivers/misc/Makefile | 1 + - drivers/misc/gpevt.c | 172 +++++++++++++++++++++++++++++++++++++++++++++++++ + drivers/misc/Kconfig | 6 ++ + drivers/misc/Makefile | 1 + + drivers/misc/gpevt.c | 172 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 179 insertions(+) create mode 100644 drivers/misc/gpevt.c @@ -41,7 +41,7 @@ index 2129377..661d093 100644 +obj-$(CONFIG_GPEVT) += gpevt.o diff --git a/drivers/misc/gpevt.c b/drivers/misc/gpevt.c new file mode 100644 -index 0000000..4fe256c +index 0000000..8a4be45 --- /dev/null +++ b/drivers/misc/gpevt.c @@ -0,0 +1,172 @@ @@ -111,7 +111,7 @@ index 0000000..4fe256c + dev_err(&pdev->dev, "failed to allocate dst fifo\n"); + return -ENOMEM; + } -+ ++ + pinctrl = devm_pinctrl_get_select_default(&pdev->dev); + if (IS_ERR(pinctrl)) + dev_warn(&pdev->dev, @@ -173,7 +173,7 @@ index 0000000..4fe256c + dmaengine_submit(tx); + + dma_async_issue_pending(chan); -+ ++ + dev_info(&pdev->dev, "Amazing GPIO DMA Event Test Driver(tm) engaged\n"); + + return 0; @@ -218,5 +218,5 @@ index 0000000..4fe256c +MODULE_AUTHOR("Matt Porter "); +MODULE_LICENSE("GPL"); -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0032-ARM-dts-add-BeagleBone-gpevt-support.patch b/patches/dma/0032-ARM-dts-add-BeagleBone-gpevt-support.patch index 3f7fa9a8..b1cd14eb 100644 --- a/patches/dma/0032-ARM-dts-add-BeagleBone-gpevt-support.patch +++ b/patches/dma/0032-ARM-dts-add-BeagleBone-gpevt-support.patch @@ -1,11 +1,11 @@ -From c7839916bce8e41e78aa9beadf9a2044b170d65c Mon Sep 17 00:00:00 2001 +From bf9403b9165d7d9289c221ab0ad40c432343e832 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Wed, 17 Oct 2012 17:12:45 -0400 Subject: [PATCH 32/35] ARM: dts: add BeagleBone gpevt support Signed-off-by: Matt Porter --- - arch/arm/boot/dts/am335x-bone.dts | 19 ++++++++++++++++++- + arch/arm/boot/dts/am335x-bone.dts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts @@ -57,5 +57,5 @@ index 8ac3ae4..8f35a81 100644 + ti,edma-xbar-event-map = <32 12>; +}; -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0033-ARM-configs-working-dmaengine-configs-for-da8xx-and-.patch b/patches/dma/0033-ARM-configs-working-dmaengine-configs-for-da8xx-and-.patch index ebd7452a..909c0903 100644 --- a/patches/dma/0033-ARM-configs-working-dmaengine-configs-for-da8xx-and-.patch +++ b/patches/dma/0033-ARM-configs-working-dmaengine-configs-for-da8xx-and-.patch @@ -1,4 +1,4 @@ -From 695a3ae0b3d01f3dfbc76d2b2251ab984d0c9b8d Mon Sep 17 00:00:00 2001 +From b4ce86ef231f8c443f53ea0dfb982afc13faf8a9 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Wed, 9 Jan 2013 16:26:38 -0500 Subject: [PATCH 33/35] ARM: configs: working dmaengine configs for da8xx and @@ -4875,5 +4875,5 @@ index 82ce8d7..d322dec 100644 +# CONFIG_CORDIC is not set +# CONFIG_DDR is not set -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0034-ARM-dts-Add-UART4-support-to-BeagleBone.patch b/patches/dma/0034-ARM-dts-Add-UART4-support-to-BeagleBone.patch index ff5a8c92..31dab745 100644 --- a/patches/dma/0034-ARM-dts-Add-UART4-support-to-BeagleBone.patch +++ b/patches/dma/0034-ARM-dts-Add-UART4-support-to-BeagleBone.patch @@ -1,11 +1,11 @@ -From 9cda88779bef6e25d76eece42500b28c5942713f Mon Sep 17 00:00:00 2001 +From f7ed1e722ce5a54594027aadccd04b79512336c8 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Wed, 9 Jan 2013 16:57:15 -0500 Subject: [PATCH 34/35] ARM: dts: Add UART4 support to BeagleBone Signed-off-by: Matt Porter --- - arch/arm/boot/dts/am335x-bone.dts | 4 ++++ + arch/arm/boot/dts/am335x-bone.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts @@ -24,5 +24,5 @@ index 8f35a81..b338f5b 100644 status = "okay"; clock-frequency = <400000>; -- -1.7.9.5 +1.9.0 diff --git a/patches/dma/0035-gpevnt-Remove-__devinit.patch b/patches/dma/0035-gpevnt-Remove-__devinit.patch index a69f14ae..54ccef86 100644 --- a/patches/dma/0035-gpevnt-Remove-__devinit.patch +++ b/patches/dma/0035-gpevnt-Remove-__devinit.patch @@ -1,4 +1,4 @@ -From 06444b5243151de8ac57e29635815339f1f25206 Mon Sep 17 00:00:00 2001 +From 903bede45f05fd4c98f205e1452248469e6204a1 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 1 May 2013 16:45:10 +0300 Subject: [PATCH 35/35] gpevnt: Remove __devinit @@ -7,11 +7,11 @@ __devinit is gone now; remove it. Signed-off-by: Pantelis Antoniou --- - drivers/misc/gpevt.c | 6 +++--- + drivers/misc/gpevt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/misc/gpevt.c b/drivers/misc/gpevt.c -index 4fe256c..aabcd48 100644 +index 8a4be45..2d97cd7 100644 --- a/drivers/misc/gpevt.c +++ b/drivers/misc/gpevt.c @@ -41,7 +41,7 @@ static void gpevt_callback(void *data) @@ -42,5 +42,5 @@ index 4fe256c..aabcd48 100644 static int __init gpevt_init(void) -- -1.7.9.5 +1.9.0 diff --git a/patches/drm/0001-am33xx-Add-clock-for-the-lcdc-DRM-driver.patch b/patches/drm/0001-am33xx-Add-clock-for-the-lcdc-DRM-driver.patch index 7327cd78..02686cd5 100644 --- a/patches/drm/0001-am33xx-Add-clock-for-the-lcdc-DRM-driver.patch +++ b/patches/drm/0001-am33xx-Add-clock-for-the-lcdc-DRM-driver.patch @@ -1,4 +1,4 @@ -From 292ed98993e4f5013a3cb051b98c2bf9cfd687d7 Mon Sep 17 00:00:00 2001 +From a6229c98d513d95bede17c39841299991c5aca5f Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Tue, 8 Jan 2013 20:01:09 +0200 Subject: [PATCH 01/12] am33xx: Add clock for the lcdc DRM driver @@ -7,7 +7,7 @@ Update the clocks with the lcdc DRM's driver definition. Signed-off-by: Pantelis Antoniou --- - arch/arm/mach-omap2/cclock33xx_data.c | 1 + + arch/arm/mach-omap2/cclock33xx_data.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c @@ -23,5 +23,5 @@ index 743dce4..7e29317 100644 -- -1.7.9.5 +1.9.0 diff --git a/patches/drm/0002-drm-small-fix-in-drm_send_vblank_event.patch b/patches/drm/0002-drm-small-fix-in-drm_send_vblank_event.patch index 27bc3bf6..3c508e7e 100644 --- a/patches/drm/0002-drm-small-fix-in-drm_send_vblank_event.patch +++ b/patches/drm/0002-drm-small-fix-in-drm_send_vblank_event.patch @@ -1,4 +1,4 @@ -From 98a85a1994987c152c6756063fe7a69686bf9f1c Mon Sep 17 00:00:00 2001 +From eb2f158ae2fda4c3d82fc0e81923ce7319116b34 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Mon, 10 Dec 2012 10:49:46 -0600 Subject: [PATCH 02/12] drm: small fix in drm_send_vblank_event() @@ -9,7 +9,7 @@ behavior with the different drivers. Signed-off-by: Rob Clark --- - drivers/gpu/drm/drm_irq.c | 1 + + drivers/gpu/drm/drm_irq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c @@ -25,5 +25,5 @@ index 19c01ca..9bb83a5 100644 } EXPORT_SYMBOL(drm_send_vblank_event); -- -1.7.9.5 +1.9.0 diff --git a/patches/drm/0003-drm-cma-add-debugfs-helpers.patch b/patches/drm/0003-drm-cma-add-debugfs-helpers.patch index 4594a737..b7bcacbf 100644 --- a/patches/drm/0003-drm-cma-add-debugfs-helpers.patch +++ b/patches/drm/0003-drm-cma-add-debugfs-helpers.patch @@ -1,4 +1,4 @@ -From 6e3cb19f71942f5dda71c09fc9d23ecf79be5033 Mon Sep 17 00:00:00 2001 +From 0c564282d4512fd7b5df73f81a097d809e850428 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Mon, 10 Dec 2012 10:46:43 -0600 Subject: [PATCH 03/12] drm/cma: add debugfs helpers @@ -16,10 +16,10 @@ a list of CMA GEM objects. Signed-off-by: Rob Clark --- - drivers/gpu/drm/drm_fb_cma_helper.c | 53 ++++++++++++++++++++++++++++++++++ - drivers/gpu/drm/drm_gem_cma_helper.c | 21 ++++++++++++++ - include/drm/drm_fb_cma_helper.h | 5 ++++ - include/drm/drm_gem_cma_helper.h | 4 +++ + drivers/gpu/drm/drm_fb_cma_helper.c | 53 ++++++++++++++++++++++++++++++++++++ + drivers/gpu/drm/drm_gem_cma_helper.c | 21 ++++++++++++++ + include/drm/drm_fb_cma_helper.h | 5 ++++ + include/drm/drm_gem_cma_helper.h | 4 +++ 4 files changed, 83 insertions(+) diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c @@ -144,5 +144,5 @@ index f0f6b1a..63397ce 100644 + #endif /* __DRM_GEM_CMA_HELPER_H__ */ -- -1.7.9.5 +1.9.0 diff --git a/patches/drm/0004-drm-i2c-encoder-helper-wrappers.patch b/patches/drm/0004-drm-i2c-encoder-helper-wrappers.patch index 13eb5901..b8ba4779 100644 --- a/patches/drm/0004-drm-i2c-encoder-helper-wrappers.patch +++ b/patches/drm/0004-drm-i2c-encoder-helper-wrappers.patch @@ -1,4 +1,4 @@ -From 6a6d33f922bb929de3c93d1bd545d808b171c141 Mon Sep 17 00:00:00 2001 +From 8984cf5535b1a7dbf806b8fa13c1bb87dbeb4ad5 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Tue, 8 Jan 2013 17:50:48 -0600 Subject: [PATCH 04/12] drm: i2c encoder helper wrappers @@ -9,8 +9,8 @@ allocate and populate them. Signed-off-by: Rob Clark --- - drivers/gpu/drm/drm_encoder_slave.c | 63 +++++++++++++++++++++++++++++++++++ - include/drm/drm_encoder_slave.h | 20 +++++++++++ + drivers/gpu/drm/drm_encoder_slave.c | 63 +++++++++++++++++++++++++++++++++++++ + include/drm/drm_encoder_slave.h | 20 ++++++++++++ 2 files changed, 83 insertions(+) diff --git a/drivers/gpu/drm/drm_encoder_slave.c b/drivers/gpu/drm/drm_encoder_slave.c @@ -114,5 +114,5 @@ index b0c11a7..8b9cc36 100644 + #endif -- -1.7.9.5 +1.9.0 diff --git a/patches/drm/0005-drm-nouveau-use-i2c-encoder-helper-wrappers.patch b/patches/drm/0005-drm-nouveau-use-i2c-encoder-helper-wrappers.patch index d545131c..0d7c986f 100644 --- a/patches/drm/0005-drm-nouveau-use-i2c-encoder-helper-wrappers.patch +++ b/patches/drm/0005-drm-nouveau-use-i2c-encoder-helper-wrappers.patch @@ -1,11 +1,11 @@ -From 85cb64814c3adb88ff9b176a35b70c37c4340713 Mon Sep 17 00:00:00 2001 +From e7722ac889bff744e316426f9770949a9c9add0c Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Tue, 8 Jan 2013 19:19:13 -0600 Subject: [PATCH 05/12] drm/nouveau: use i2c encoder helper wrappers Signed-off-by: Rob Clark --- - drivers/gpu/drm/nouveau/nv04_tv.c | 39 +++++++++++++------------------------ + drivers/gpu/drm/nouveau/nv04_tv.c | 39 +++++++++++++-------------------------- 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nv04_tv.c b/drivers/gpu/drm/nouveau/nv04_tv.c @@ -90,5 +90,5 @@ index 62e826a..4a69ccd 100644 return ret; } -- -1.7.9.5 +1.9.0 diff --git a/patches/drm/0006-drm-i2c-give-i2c-it-s-own-Kconfig.patch b/patches/drm/0006-drm-i2c-give-i2c-it-s-own-Kconfig.patch index e6e8cfed..846c82dd 100644 --- a/patches/drm/0006-drm-i2c-give-i2c-it-s-own-Kconfig.patch +++ b/patches/drm/0006-drm-i2c-give-i2c-it-s-own-Kconfig.patch @@ -1,4 +1,4 @@ -From 4c3ded36b1144d13b3dabd7361299db51dd76259 Mon Sep 17 00:00:00 2001 +From a3ebeadc89272408dae67258260ae78b2207a4de Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Thu, 24 Jan 2013 15:39:19 -0600 Subject: [PATCH 06/12] drm/i2c: give i2c it's own Kconfig @@ -9,9 +9,9 @@ one place. Signed-off-by: Rob Clark --- - drivers/gpu/drm/Kconfig | 2 ++ - drivers/gpu/drm/i2c/Kconfig | 22 ++++++++++++++++++++++ - drivers/gpu/drm/nouveau/Kconfig | 23 ----------------------- + drivers/gpu/drm/Kconfig | 2 ++ + drivers/gpu/drm/i2c/Kconfig | 22 ++++++++++++++++++++++ + drivers/gpu/drm/nouveau/Kconfig | 23 ----------------------- 3 files changed, 24 insertions(+), 23 deletions(-) create mode 100644 drivers/gpu/drm/i2c/Kconfig @@ -88,5 +88,5 @@ index 8a55bee..47ccc1a 100644 - -endmenu -- -1.7.9.5 +1.9.0 diff --git a/patches/drm/0007-drm-tilcdc-add-TI-LCD-Controller-DRM-driver-v4.patch b/patches/drm/0007-drm-tilcdc-add-TI-LCD-Controller-DRM-driver-v4.patch index cf859c90..c231b664 100644 --- a/patches/drm/0007-drm-tilcdc-add-TI-LCD-Controller-DRM-driver-v4.patch +++ b/patches/drm/0007-drm-tilcdc-add-TI-LCD-Controller-DRM-driver-v4.patch @@ -1,4 +1,4 @@ -From 984f0b294766dc9168f60885d8612c705929b830 Mon Sep 17 00:00:00 2001 +From 8c6b3b3a0d35e6b48cff295aa2f0bb4f13e58890 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Tue, 8 Jan 2013 15:04:28 -0600 Subject: [PATCH 07/12] drm/tilcdc: add TI LCD Controller DRM driver (v4) @@ -26,16 +26,16 @@ v4: remove some unneeded stuff from panel-info struct, properly Signed-off-by: Rob Clark --- - drivers/gpu/drm/Kconfig | 2 + - drivers/gpu/drm/Makefile | 1 + - drivers/gpu/drm/tilcdc/Kconfig | 10 + - drivers/gpu/drm/tilcdc/Makefile | 8 + - drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 602 +++++++++++++++++++++++++++++++ - drivers/gpu/drm/tilcdc/tilcdc_drv.c | 605 ++++++++++++++++++++++++++++++++ - drivers/gpu/drm/tilcdc/tilcdc_drv.h | 150 ++++++++ - drivers/gpu/drm/tilcdc/tilcdc_regs.h | 154 ++++++++ - drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 419 ++++++++++++++++++++++ - drivers/gpu/drm/tilcdc/tilcdc_tfp410.h | 26 ++ + drivers/gpu/drm/Kconfig | 2 + + drivers/gpu/drm/Makefile | 1 + + drivers/gpu/drm/tilcdc/Kconfig | 10 + + drivers/gpu/drm/tilcdc/Makefile | 8 + + drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 602 ++++++++++++++++++++++++++++++++ + drivers/gpu/drm/tilcdc/tilcdc_drv.c | 605 +++++++++++++++++++++++++++++++++ + drivers/gpu/drm/tilcdc/tilcdc_drv.h | 150 ++++++++ + drivers/gpu/drm/tilcdc/tilcdc_regs.h | 154 +++++++++ + drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 419 +++++++++++++++++++++++ + drivers/gpu/drm/tilcdc/tilcdc_tfp410.h | 26 ++ 10 files changed, 1977 insertions(+) create mode 100644 drivers/gpu/drm/tilcdc/Kconfig create mode 100644 drivers/gpu/drm/tilcdc/Makefile @@ -2089,5 +2089,5 @@ index 0000000..5b800f1 + +#endif /* __TILCDC_TFP410_H__ */ -- -1.7.9.5 +1.9.0 diff --git a/patches/drm/0008-drm-i2c-nxp-tda998x-v3.patch b/patches/drm/0008-drm-i2c-nxp-tda998x-v3.patch index bf75716a..6726a5cf 100644 --- a/patches/drm/0008-drm-i2c-nxp-tda998x-v3.patch +++ b/patches/drm/0008-drm-i2c-nxp-tda998x-v3.patch @@ -1,4 +1,4 @@ -From 080ac27152f82c1953764fc1019fccc18f165539 Mon Sep 17 00:00:00 2001 +From 4bbed4ad3bd6a149d90d02f0b84317ba937b1a93 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Tue, 8 Jan 2013 19:21:02 -0600 Subject: [PATCH 08/12] drm/i2c: nxp-tda998x (v3) @@ -11,9 +11,9 @@ v3: add Kconfig, fix dup'd MODULE_DESCRIPTION Signed-off-by: Rob Clark --- - drivers/gpu/drm/i2c/Kconfig | 6 + - drivers/gpu/drm/i2c/Makefile | 3 + - drivers/gpu/drm/i2c/tda998x_drv.c | 906 +++++++++++++++++++++++++++++++++++++ + drivers/gpu/drm/i2c/Kconfig | 6 + + drivers/gpu/drm/i2c/Makefile | 3 + + drivers/gpu/drm/i2c/tda998x_drv.c | 906 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 915 insertions(+) create mode 100644 drivers/gpu/drm/i2c/tda998x_drv.c @@ -956,5 +956,5 @@ index 0000000..e68b58a +module_init(tda998x_init); +module_exit(tda998x_exit); -- -1.7.9.5 +1.9.0 diff --git a/patches/drm/0009-drm-tilcdc-add-encoder-slave.patch b/patches/drm/0009-drm-tilcdc-add-encoder-slave.patch index a523f448..c88f6e1a 100644 --- a/patches/drm/0009-drm-tilcdc-add-encoder-slave.patch +++ b/patches/drm/0009-drm-tilcdc-add-encoder-slave.patch @@ -1,4 +1,4 @@ -From 30d6debf9a898fc507fe16322b4094081a31b704 Mon Sep 17 00:00:00 2001 +From b402b633561a9b20f101ff4db5d09ab4d7ac11c4 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Tue, 22 Jan 2013 16:02:21 -0600 Subject: [PATCH 09/12] drm/tilcdc: add encoder slave @@ -7,10 +7,10 @@ Add output panel driver for i2c encoder slaves. Signed-off-by: Rob Clark --- - drivers/gpu/drm/tilcdc/Makefile | 1 + - drivers/gpu/drm/tilcdc/tilcdc_drv.c | 5 +- - drivers/gpu/drm/tilcdc/tilcdc_slave.c | 376 +++++++++++++++++++++++++++++++++ - drivers/gpu/drm/tilcdc/tilcdc_slave.h | 26 +++ + drivers/gpu/drm/tilcdc/Makefile | 1 + + drivers/gpu/drm/tilcdc/tilcdc_drv.c | 5 +- + drivers/gpu/drm/tilcdc/tilcdc_slave.c | 376 ++++++++++++++++++++++++++++++++++ + drivers/gpu/drm/tilcdc/tilcdc_slave.h | 26 +++ 4 files changed, 407 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/tilcdc/tilcdc_slave.c create mode 100644 drivers/gpu/drm/tilcdc/tilcdc_slave.h @@ -475,5 +475,5 @@ index 0000000..2f85048 + +#endif /* __TILCDC_SLAVE_H__ */ -- -1.7.9.5 +1.9.0 diff --git a/patches/drm/0010-drm-tilcdc-add-support-for-LCD-panels-v5.patch b/patches/drm/0010-drm-tilcdc-add-support-for-LCD-panels-v5.patch index c8f9f297..3d1e938e 100644 --- a/patches/drm/0010-drm-tilcdc-add-support-for-LCD-panels-v5.patch +++ b/patches/drm/0010-drm-tilcdc-add-support-for-LCD-panels-v5.patch @@ -1,4 +1,4 @@ -From 96a0f19f81d5f6d2e505cdb642329d075befe11b Mon Sep 17 00:00:00 2001 +From 9c2793ce8f04b78642e3cf4ae6aeed551673e094 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Tue, 18 Dec 2012 17:34:16 -0600 Subject: [PATCH 10/12] drm/tilcdc: add support for LCD panels (v5) @@ -15,11 +15,11 @@ v5: remove some unneeded fields from panel-info struct Signed-off-by: Rob Clark --- - drivers/gpu/drm/tilcdc/Kconfig | 5 +- - drivers/gpu/drm/tilcdc/Makefile | 1 + - drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 + - drivers/gpu/drm/tilcdc/tilcdc_panel.c | 436 +++++++++++++++++++++++++++++++++ - drivers/gpu/drm/tilcdc/tilcdc_panel.h | 26 ++ + drivers/gpu/drm/tilcdc/Kconfig | 5 +- + drivers/gpu/drm/tilcdc/Makefile | 1 + + drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 + + drivers/gpu/drm/tilcdc/tilcdc_panel.c | 436 ++++++++++++++++++++++++++++++++++ + drivers/gpu/drm/tilcdc/tilcdc_panel.h | 26 ++ 5 files changed, 470 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/tilcdc/tilcdc_panel.c create mode 100644 drivers/gpu/drm/tilcdc/tilcdc_panel.h @@ -557,5 +557,5 @@ index 0000000..7db40aa + +#endif /* __TILCDC_PANEL_H__ */ -- -1.7.9.5 +1.9.0 diff --git a/patches/drm/0011-drm-lcdc-Power-control-GPIO-support.patch b/patches/drm/0011-drm-lcdc-Power-control-GPIO-support.patch index e5b3509c..b729e977 100644 --- a/patches/drm/0011-drm-lcdc-Power-control-GPIO-support.patch +++ b/patches/drm/0011-drm-lcdc-Power-control-GPIO-support.patch @@ -1,4 +1,4 @@ -From 8d81d86024171900c5aa5be2ba5d208e1d29b334 Mon Sep 17 00:00:00 2001 +From 2f590fb7ad9b25ad7d1a62eec60d496d89aed1fe Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 9 Jan 2013 16:31:29 +0200 Subject: [PATCH 11/12] drm: lcdc: Power control GPIO support @@ -8,7 +8,7 @@ Implement it trivialy. Signed-off-by: Pantelis Antoniou --- - drivers/gpu/drm/tilcdc/tilcdc_drv.c | 25 ++++++++++++++++++++++++- + drivers/gpu/drm/tilcdc/tilcdc_drv.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c @@ -62,5 +62,5 @@ index c5b592d..91e8ed2 100644 priv->lcd_fck_rate = clk_get_rate(priv->clk); priv->freq_transition.notifier_call = cpufreq_transition; -- -1.7.9.5 +1.9.0 diff --git a/patches/drm/0012-drm-tilcdc-Fix-scheduling-while-atomic-from-irq-hand.patch b/patches/drm/0012-drm-tilcdc-Fix-scheduling-while-atomic-from-irq-hand.patch index db7270a2..d9b186fd 100644 --- a/patches/drm/0012-drm-tilcdc-Fix-scheduling-while-atomic-from-irq-hand.patch +++ b/patches/drm/0012-drm-tilcdc-Fix-scheduling-while-atomic-from-irq-hand.patch @@ -1,4 +1,4 @@ -From 36155a6909faa8bf9a35d50b67e86bbf4a044810 Mon Sep 17 00:00:00 2001 +From 39ff9f4ab4d6bb201522ebce6e638ea169231085 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Mon, 3 Jun 2013 17:57:18 +0300 Subject: [PATCH 12/12] drm: tilcdc: Fix scheduling while atomic from irq @@ -8,7 +8,7 @@ Fix the crash by not making pm_runtime calls while in the irq. Signed-off-by: Pantelis Antoniou --- - drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 8 ++++++-- + drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c @@ -54,5 +54,5 @@ index 5dd3c7d..9f10f05 100644 } -- -1.7.9.5 +1.9.0 diff --git a/patches/fixes/0001-sync-don-t-block-the-flusher-thread-waiting-on-IO.patch b/patches/fixes/0001-sync-don-t-block-the-flusher-thread-waiting-on-IO.patch index fd8f4e42..679b591a 100644 --- a/patches/fixes/0001-sync-don-t-block-the-flusher-thread-waiting-on-IO.patch +++ b/patches/fixes/0001-sync-don-t-block-the-flusher-thread-waiting-on-IO.patch @@ -1,7 +1,7 @@ -From f0b36cfcb8376c093458b225cf0d22dd304fa12e Mon Sep 17 00:00:00 2001 +From 85447d415d3fa923941edc1d928eda2cd714aa58 Mon Sep 17 00:00:00 2001 From: Dave Chinner Date: Tue, 2 Jul 2013 22:38:35 +1000 -Subject: [PATCH] sync: don't block the flusher thread waiting on IO +Subject: [PATCH 1/9] sync: don't block the flusher thread waiting on IO When sync does it's WB_SYNC_ALL writeback, it issues data Io and then immediately waits for IO completion. This is done in the @@ -110,5 +110,5 @@ index b82a83a..7aa94e5 100644 /* -- -1.8.2.1 +1.9.0 diff --git a/patches/fixes/0002-USB-Fix-USB-device-disconnects-on-resume.patch b/patches/fixes/0002-USB-Fix-USB-device-disconnects-on-resume.patch index 42689db0..6e9b463b 100644 --- a/patches/fixes/0002-USB-Fix-USB-device-disconnects-on-resume.patch +++ b/patches/fixes/0002-USB-Fix-USB-device-disconnects-on-resume.patch @@ -1,7 +1,7 @@ -From 448e4371f4b39822e24d6fc3bdcc244d64c86d9e Mon Sep 17 00:00:00 2001 +From c16fe6b799252bb86c6ec02d4935d87d1304be9f Mon Sep 17 00:00:00 2001 From: Sarah Sharp Date: Tue, 3 Sep 2013 15:52:22 +0200 -Subject: [PATCH 2/2] USB: Fix USB device disconnects on resume. +Subject: [PATCH 2/9] USB: Fix USB device disconnects on resume. The TLDR; version: @@ -162,5 +162,5 @@ index 2a89588..c2eeed5 100644 usb_lock_device(udev); ret = usb_remote_wakeup(udev); -- -1.8.2.1 +1.9.0 diff --git a/patches/fixes/0003-beaglebone-switch-uSD-to-4-bit-mode.patch b/patches/fixes/0003-beaglebone-switch-uSD-to-4-bit-mode.patch index 6bb1a316..16f3f127 100644 --- a/patches/fixes/0003-beaglebone-switch-uSD-to-4-bit-mode.patch +++ b/patches/fixes/0003-beaglebone-switch-uSD-to-4-bit-mode.patch @@ -1,7 +1,7 @@ -From a4f37bbbb4155178263d47beb6322a7d1685ce43 Mon Sep 17 00:00:00 2001 +From 66ebacd24136f5af5e599d05683933023b3bb8a5 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 12 Sep 2013 09:56:37 +0200 -Subject: [PATCH 3/3] beaglebone: switch uSD to 4-bit mode +Subject: [PATCH 3/9] beaglebone: switch uSD to 4-bit mode Signed-off-by: Koen Kooi --- @@ -9,10 +9,10 @@ Signed-off-by: Koen Kooi 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi -index 81d95306..89240d0 100644 +index b183c7d..7ed546f 100644 --- a/arch/arm/boot/dts/am335x-bone-common.dtsi +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi -@@ -521,6 +521,7 @@ +@@ -553,6 +553,7 @@ &mmc1 { pinctrl-names = "default"; pinctrl-0 = <&mmc1_pins>; @@ -21,5 +21,5 @@ index 81d95306..89240d0 100644 cd-inverted; status = "okay"; -- -1.8.2.1 +1.9.0 diff --git a/patches/fixes/0004-mmc-omap_hsmmc-clear-status-flags-before-starting-a-.patch b/patches/fixes/0004-mmc-omap_hsmmc-clear-status-flags-before-starting-a-.patch new file mode 100644 index 00000000..743d2b32 --- /dev/null +++ b/patches/fixes/0004-mmc-omap_hsmmc-clear-status-flags-before-starting-a-.patch @@ -0,0 +1,47 @@ +From d502c1a25770f1a152d4c4847b2690002fdc951c Mon Sep 17 00:00:00 2001 +From: Francesco Lavra +Date: Sat, 29 Jun 2013 06:25:12 +0000 +Subject: [PATCH 4/9] mmc: omap_hsmmc: clear status flags before starting a new + command + +Commit 1f6b9fa40e76fffaaa0b3bd6a0bfdcf1cdc06efa consolidated writes to +the STAT register in one location, moving them from omap_hsmmc_do_irq() +to omap_hsmmc_irq(). This move has the unwanted side effect that the +controller status flags are potentially cleared after a new command has +been started as a consequence of reading the previous status flags. +This means that if the new command changes the status flags before the +IRQ routine returns, those flags may be cleared without handling the +event which asserted them, and thus missing the event. +Move the writing of the STAT register back in omap_hsmmc_do_irq(), +before handling the status flags which generated the interrupt. + +Signed-off-by: Francesco Lavra +Reviewed-and-Tested-by: Balaji T K +Signed-off-by: Chris Ball +--- + drivers/mmc/host/omap_hsmmc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c +index e2b97df..04daf72 100644 +--- a/drivers/mmc/host/omap_hsmmc.c ++++ b/drivers/mmc/host/omap_hsmmc.c +@@ -1070,6 +1070,7 @@ static void omap_hsmmc_do_irq(struct omap_hsmmc_host *host, int status) + } + } + ++ OMAP_HSMMC_WRITE(host->base, STAT, status); + if (end_cmd || ((status & CC_EN) && host->cmd)) + omap_hsmmc_cmd_done(host, host->cmd); + if ((end_trans || (status & TC_EN)) && host->mrq) +@@ -1089,7 +1090,6 @@ static irqreturn_t omap_hsmmc_irq(int irq, void *dev_id) + omap_hsmmc_do_irq(host, status); + + /* Flush posted write */ +- OMAP_HSMMC_WRITE(host->base, STAT, status); + status = OMAP_HSMMC_READ(host->base, STAT); + } + +-- +1.9.0 + diff --git a/patches/fixes/0005-omap-serial-allow-custom-buad-rate-settings.patch b/patches/fixes/0005-omap-serial-allow-custom-buad-rate-settings.patch new file mode 100644 index 00000000..d0ce968f --- /dev/null +++ b/patches/fixes/0005-omap-serial-allow-custom-buad-rate-settings.patch @@ -0,0 +1,31 @@ +From fdf467c7fd33dea2a7bc5b689909bbcc4e34565d Mon Sep 17 00:00:00 2001 +From: Matt Ranostay +Date: Tue, 17 Dec 2013 00:57:06 -0800 +Subject: [PATCH 5/9] omap-serial: allow custom buad rate settings + +Current custom baud rate settings are broken due a function call from +serial_core.c that returns -EINVAL from omap-serial.c. + +This is important for the upcoming MIDI cape and is placeholder hack. + +Signed-off-by: Matt Ranostay +--- + drivers/tty/serial/omap-serial.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c +index 57d6b29..717cf32 100644 +--- a/drivers/tty/serial/omap-serial.c ++++ b/drivers/tty/serial/omap-serial.c +@@ -1060,7 +1060,7 @@ serial_omap_verify_port(struct uart_port *port, struct serial_struct *ser) + { + /* we don't want the core code to modify any port params */ + dev_dbg(port->dev, "serial_omap_verify_port+\n"); +- return -EINVAL; ++ return 0; + } + + static const char * +-- +1.9.0 + diff --git a/patches/fixes/0006-uvcvideo-Fix-data-type-for-pan-tilt-control.patch b/patches/fixes/0006-uvcvideo-Fix-data-type-for-pan-tilt-control.patch new file mode 100644 index 00000000..a3899ce5 --- /dev/null +++ b/patches/fixes/0006-uvcvideo-Fix-data-type-for-pan-tilt-control.patch @@ -0,0 +1,44 @@ +From 3cb6f858dad44e4ff9a71b3fa58859a6e77b3d38 Mon Sep 17 00:00:00 2001 +From: Chanho Min +Date: Fri, 27 Sep 2013 01:57:40 -0300 +Subject: [PATCH 6/9] uvcvideo: Fix data type for pan/tilt control + +The pan/tilt absolute control value is signed value. If minimum value +is minus, It will be changed to plus by clamp_t() as commit 64ae9958a62. +([media] uvcvideo: Fix control value clamping for unsigned integer controls). +It leads to wrong setting of the control values. For example, +when min and max are -36000 and 36000, the setting value between of this range +is always 36000. So, its data type should be changed to signed. + +Signed-off-by: Chanho Min +Signed-off-by: Laurent Pinchart +Signed-off-by: Mauro Carvalho Chehab +--- + drivers/media/usb/uvc/uvc_ctrl.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c +index d5baab1..da3c300 100644 +--- a/drivers/media/usb/uvc/uvc_ctrl.c ++++ b/drivers/media/usb/uvc/uvc_ctrl.c +@@ -664,7 +664,7 @@ static struct uvc_control_mapping uvc_ctrl_mappings[] = { + .size = 32, + .offset = 0, + .v4l2_type = V4L2_CTRL_TYPE_INTEGER, +- .data_type = UVC_CTRL_DATA_TYPE_UNSIGNED, ++ .data_type = UVC_CTRL_DATA_TYPE_SIGNED, + }, + { + .id = V4L2_CID_TILT_ABSOLUTE, +@@ -674,7 +674,7 @@ static struct uvc_control_mapping uvc_ctrl_mappings[] = { + .size = 32, + .offset = 32, + .v4l2_type = V4L2_CTRL_TYPE_INTEGER, +- .data_type = UVC_CTRL_DATA_TYPE_UNSIGNED, ++ .data_type = UVC_CTRL_DATA_TYPE_SIGNED, + }, + { + .id = V4L2_CID_PRIVACY, +-- +1.9.0 + diff --git a/patches/fixes/0007-ti_am335x_tsc-touchscreen-jitter-fix.patch b/patches/fixes/0007-ti_am335x_tsc-touchscreen-jitter-fix.patch new file mode 100644 index 00000000..fcfbfdd2 --- /dev/null +++ b/patches/fixes/0007-ti_am335x_tsc-touchscreen-jitter-fix.patch @@ -0,0 +1,121 @@ +From 9118a200f300f5d6abc44282bfe9c943f00a77b6 Mon Sep 17 00:00:00 2001 +From: Micka +Date: Wed, 22 Jan 2014 15:19:22 -0600 +Subject: [PATCH 7/9] ti_am335x_tsc: touchscreen jitter fix + +Signed-off-by: Micka +--- + drivers/input/touchscreen/ti_am335x_tsc.c | 46 +++++++++++++++++++------------ + 1 file changed, 28 insertions(+), 18 deletions(-) + +diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c +index 8933c91..ed83043 100644 +--- a/drivers/input/touchscreen/ti_am335x_tsc.c ++++ b/drivers/input/touchscreen/ti_am335x_tsc.c +@@ -53,6 +53,7 @@ struct titsc { + u32 config_inp[4]; + u32 bit_xp, bit_xn, bit_yp, bit_yn; + u32 inp_xp, inp_xn, inp_yp, inp_yn; ++ unsigned int prevZ; + }; + + static unsigned int titsc_readl(struct titsc *ts, unsigned int reg) +@@ -204,11 +205,10 @@ static void titsc_read_coordinates(struct titsc *ts_dev, + u32 *x, u32 *y, u32 *z1, u32 *z2) + { + unsigned int fifocount = titsc_readl(ts_dev, REG_FIFO0CNT); +- unsigned int prev_val_x = ~0, prev_val_y = ~0; +- unsigned int prev_diff_x = ~0, prev_diff_y = ~0; +- unsigned int read, diff; ++ unsigned int read; + unsigned int i, channel; + unsigned int creads = ts_dev->coordinate_readouts; ++ unsigned int nX, nY; + + *z1 = *z2 = 0; + if (fifocount % (creads * 2 + 2)) +@@ -221,27 +221,21 @@ static void titsc_read_coordinates(struct titsc *ts_dev, + * algorithm compares the difference with that of a present value, + * if true the value is reported to the sub system. + */ ++ *x=0; ++ *y=0; ++ nX=0; ++ nY=0; + for (i = 0; i < fifocount; i++) { + read = titsc_readl(ts_dev, REG_FIFO0); + + channel = (read & 0xf0000) >> 16; + read &= 0xfff; + if (channel < creads) { +- diff = abs(read - prev_val_x); +- if (diff < prev_diff_x) { +- prev_diff_x = diff; +- *x = read; +- } +- prev_val_x = read; +- ++ (*x)+=read; ++ nX++; + } else if (channel < creads * 2) { +- diff = abs(read - prev_val_y); +- if (diff < prev_diff_y) { +- prev_diff_y = diff; +- *y = read; +- } +- prev_val_y = read; +- ++ (*y)+=read; ++ nY++; + } else if (channel < creads * 2 + 1) { + *z1 = read; + +@@ -249,6 +243,12 @@ static void titsc_read_coordinates(struct titsc *ts_dev, + *z2 = read; + } + } ++ if (nX != 0) { ++ (*x)/=nX; ++ } ++ if (nY != 0) { ++ (*y)/=nY; ++ } + } + + static irqreturn_t titsc_irq(int irq, void *dev) +@@ -258,6 +258,7 @@ static irqreturn_t titsc_irq(int irq, void *dev) + unsigned int status, irqclr = 0; + unsigned int x = 0, y = 0; + unsigned int z1, z2, z; ++ int deltaZ; + unsigned int fsm; + + status = titsc_readl(ts_dev, REG_IRQSTATUS); +@@ -288,7 +289,13 @@ static irqreturn_t titsc_irq(int irq, void *dev) + z /= z2; + z = (z + 2047) >> 12; + +- if (z <= MAX_12BIT) { ++ // calculate the deltaZ : ++ deltaZ= z - ts_dev->prevZ; ++ // save the last z calculated : ++ ts_dev->prevZ=z; ++ pr_debug("x %d y %d deltaZ %d\n", x, y, deltaZ); ++ ++ if (z <= MAX_12BIT && deltaZ>=0 && deltaZ<=10 ) { + input_report_abs(input_dev, ABS_X, x); + input_report_abs(input_dev, ABS_Y, y); + input_report_abs(input_dev, ABS_PRESSURE, z); +@@ -445,6 +452,9 @@ static int titsc_probe(struct platform_device *pdev) + input_set_abs_params(input_dev, ABS_Y, 0, MAX_12BIT, 0, 0); + input_set_abs_params(input_dev, ABS_PRESSURE, 0, MAX_12BIT, 0, 0); + ++ /*init prev Z*/ ++ ts_dev->prevZ=0; ++ + /* register to the input system */ + err = input_register_device(input_dev); + if (err) +-- +1.9.0 + diff --git a/patches/fixes/0008-omap-RS485-support-by-Michael-Musset.patch b/patches/fixes/0008-omap-RS485-support-by-Michael-Musset.patch new file mode 100644 index 00000000..ef5922f0 --- /dev/null +++ b/patches/fixes/0008-omap-RS485-support-by-Michael-Musset.patch @@ -0,0 +1,222 @@ +From 14476b9420a810c001d29fa112b05f2c6342f88f Mon Sep 17 00:00:00 2001 +From: Michael Musset +Date: Tue, 28 Jan 2014 10:51:50 -0600 +Subject: [PATCH 8/9] omap RS485 support by Michael Musset + +Signed-off-by: Michael Musset +--- + drivers/tty/serial/omap-serial.c | 118 ++++++++++++++++++++++++++++++++++++++- + include/uapi/linux/serial.h | 6 +- + 2 files changed, 121 insertions(+), 3 deletions(-) + +diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c +index 717cf32..28ab1fb 100644 +--- a/drivers/tty/serial/omap-serial.c ++++ b/drivers/tty/serial/omap-serial.c +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -160,6 +161,7 @@ struct uart_omap_port { + u32 calc_latency; + struct work_struct qos_work; + struct pinctrl *pins; ++ struct serial_rs485 rs485; + }; + + #define to_uart_omap_port(p) ((container_of((p), struct uart_omap_port, port))) +@@ -268,11 +270,12 @@ static void serial_omap_enable_ms(struct uart_port *port) + pm_runtime_mark_last_busy(up->dev); + pm_runtime_put_autosuspend(up->dev); + } ++static inline void wait_for_xmitr(struct uart_omap_port *up); + + static void serial_omap_stop_tx(struct uart_port *port) + { + struct uart_omap_port *up = to_uart_omap_port(port); +- ++ int val; + pm_runtime_get_sync(up->dev); + if (up->ier & UART_IER_THRI) { + up->ier &= ~UART_IER_THRI; +@@ -283,6 +286,15 @@ static void serial_omap_stop_tx(struct uart_port *port) + + pm_runtime_mark_last_busy(up->dev); + pm_runtime_put_autosuspend(up->dev); ++ wait_for_xmitr(up); ++ if (up->rs485.flags & SER_RS485_ENABLED) { ++ if(up->rs485.delay_rts_after_send>0) { ++ udelay(up->rs485.delay_rts_after_send); ++ } ++ /* Disable RS485 TX EN */ ++ val = (up->rs485.flags & SER_RS485_RTS_AFTER_SEND) ? 1 : 0; ++ gpio_set_value(up->rs485.gpio_pin, val); ++ } + } + + static void serial_omap_stop_rx(struct uart_port *port) +@@ -345,6 +357,16 @@ static inline void serial_omap_enable_ier_thri(struct uart_omap_port *up) + static void serial_omap_start_tx(struct uart_port *port) + { + struct uart_omap_port *up = to_uart_omap_port(port); ++ int val; ++ ++ if (up->rs485.flags & SER_RS485_ENABLED) { ++ /* Enable RS485 TX EN */ ++ val = (up->rs485.flags & SER_RS485_RTS_ON_SEND) ? 0 : 1; ++ gpio_set_value(up->rs485.gpio_pin, val); ++ ++ if(up->rs485.delay_rts_before_send>0) ++ udelay(up->rs485.delay_rts_before_send); ++ } + + pm_runtime_get_sync(up->dev); + serial_omap_enable_ier_thri(up); +@@ -702,6 +724,7 @@ static void serial_omap_shutdown(struct uart_port *port) + { + struct uart_omap_port *up = to_uart_omap_port(port); + unsigned long flags = 0; ++ int val; + + dev_dbg(up->port.dev, "serial_omap_shutdown+%d\n", up->port.line); + +@@ -723,6 +746,12 @@ static void serial_omap_shutdown(struct uart_port *port) + serial_out(up, UART_LCR, serial_in(up, UART_LCR) & ~UART_LCR_SBC); + serial_omap_clear_fifos(up); + ++ /* if in RS485 mode, make sure we disable the driver */ ++ if (up->rs485.flags & SER_RS485_ENABLED) { ++ val = (up->rs485.flags & SER_RS485_RTS_AFTER_SEND) ? 1 : 0; ++ gpio_set_value(up->rs485.gpio_pin, val); ++ } ++ + /* + * Read data port to reset things, and then free the irq + */ +@@ -1250,6 +1279,92 @@ static inline void serial_omap_add_console_port(struct uart_omap_port *up) + + #endif + ++ ++static int ++serial_omap_config_rs485(struct uart_port *port, struct serial_rs485 *rs485conf) ++{ ++ int r = 0; ++ int val; ++ struct uart_omap_port *p = (struct uart_omap_port *)port; ++ ++ spin_lock(&port->lock); ++ ++ /* TODO - disable transmitter ? */ ++ ++ if (rs485conf->flags & SER_RS485_ENABLED) { ++ val = (p->rs485.flags & SER_RS485_RTS_AFTER_SEND) ? 1 : 0; ++ /* if using GPIO, request the resource and set it up */ ++ ++ if (rs485conf->flags & SER_RS485_USE_GPIO) { ++ /* get gpio resources if not already set */ ++ if (!(p->rs485.flags & SER_RS485_USE_GPIO) || ++ (p->rs485.gpio_pin != rs485conf->gpio_pin)) { ++ ++ r = gpio_request(rs485conf->gpio_pin, ++ "RS485 TXE"); ++ if (r) { ++ dev_warn(port->dev, ++ "Could not request GPIO %d : %d\n", ++ rs485conf->gpio_pin, r); ++ r = -EFAULT; ++ goto exit_bail; ++ } ++ ++ r = gpio_direction_output(rs485conf->gpio_pin, val); ++ if (r) { ++ dev_warn(port->dev, ++ "Could not drive GPIO %d : %d\n", ++ rs485conf->gpio_pin, r); ++ r = -EFAULT; ++ goto exit_bail; ++ } ++ ++ /* free up old pin */ ++ //TODO: What if old pin is same as current?!!?!? ++ //if (p->rs485.flags & SER_RS485_USE_GPIO) ++ //gpio_free(p->rs485.gpio_pin); ++ } ++ } else { /* RTS pin requested */ ++ dev_warn(port->dev, "Must use GPIO for RS485 Support\n"); ++ goto exit_bail; ++ } ++ } ++ p->rs485 = *rs485conf; ++ ++exit_bail: ++ spin_unlock(&port->lock); ++ return r; ++} ++ ++static int ++serial_omap_ioctl(struct uart_port *port, unsigned int cmd, unsigned long arg) ++{ ++ struct serial_rs485 rs485conf; ++ switch (cmd) { ++ case TIOCSRS485: ++ printk("rs485 v1.1\n"); ++ if (copy_from_user(&rs485conf, (struct serial_rs485 *)arg, ++ sizeof(rs485conf))) ++ return -EFAULT; ++ serial_omap_config_rs485(port, &rs485conf); ++ break; ++ ++ case TIOCGRS485: ++ printk("rs485 v1.1\n"); ++ if (copy_to_user((struct serial_rs485 *)arg, ++ &((struct uart_omap_port *)port)->rs485, ++ sizeof(rs485conf))) ++ return -EFAULT; ++ break; ++ ++ default: ++ return -ENOIOCTLCMD; ++ } ++ ++ return 0; ++} ++ ++ + static struct uart_ops serial_omap_pops = { + .tx_empty = serial_omap_tx_empty, + .set_mctrl = serial_omap_set_mctrl, +@@ -1271,6 +1386,7 @@ static struct uart_ops serial_omap_pops = { + .request_port = serial_omap_request_port, + .config_port = serial_omap_config_port, + .verify_port = serial_omap_verify_port, ++ .ioctl = serial_omap_ioctl, + #ifdef CONFIG_CONSOLE_POLL + .poll_put_char = serial_omap_poll_put_char, + .poll_get_char = serial_omap_poll_get_char, +diff --git a/include/uapi/linux/serial.h b/include/uapi/linux/serial.h +index 5e0d0ed..9d3fcda 100644 +--- a/include/uapi/linux/serial.h ++++ b/include/uapi/linux/serial.h +@@ -116,10 +116,12 @@ struct serial_rs485 { + sending */ + #define SER_RS485_RTS_AFTER_SEND (1 << 2) /* Logical level for + RTS pin after sent*/ +-#define SER_RS485_RX_DURING_TX (1 << 4) ++ #define SER_RS485_RTS_BEFORE_SEND (1 << 3) ++ #define SER_RS485_USE_GPIO (1 << 5) + __u32 delay_rts_before_send; /* Delay before send (milliseconds) */ + __u32 delay_rts_after_send; /* Delay after send (milliseconds) */ +- __u32 padding[5]; /* Memory is cheap, new structs ++ __u32 gpio_pin; /* GPIO Pin Index */ ++ __u32 padding[4]; /* Memory is cheap, new structs + are a royal PITA .. */ + }; + +-- +1.9.0 + diff --git a/patches/fixes/0009-deb-pkg-sync-with-v3.14.patch b/patches/fixes/0009-deb-pkg-sync-with-v3.14.patch new file mode 100644 index 00000000..e2a6acb1 --- /dev/null +++ b/patches/fixes/0009-deb-pkg-sync-with-v3.14.patch @@ -0,0 +1,292 @@ +From b18f5137eab1c7639d419abbb0f253bb768e890c Mon Sep 17 00:00:00 2001 +From: Robert Nelson +Date: Mon, 31 Mar 2014 14:48:05 -0500 +Subject: [PATCH 9/9] deb-pkg: sync with v3.14 + +Signed-off-by: Robert Nelson +--- + scripts/package/builddeb | 182 +++++++++++++++++++++++++++++++++-------------- + 1 file changed, 129 insertions(+), 53 deletions(-) + +diff --git a/scripts/package/builddeb b/scripts/package/builddeb +index a5f197b..f46e4dd 100644 +--- a/scripts/package/builddeb ++++ b/scripts/package/builddeb +@@ -25,8 +25,44 @@ create_package() { + chown -R root:root "$pdir" + chmod -R go-w "$pdir" + ++ # Attempt to find the correct Debian architecture ++ local forcearch="" debarch="" ++ case "$UTS_MACHINE" in ++ i386|ia64|alpha) ++ debarch="$UTS_MACHINE" ;; ++ x86_64) ++ debarch=amd64 ;; ++ sparc*) ++ debarch=sparc ;; ++ s390*) ++ debarch=s390 ;; ++ ppc*) ++ debarch=powerpc ;; ++ parisc*) ++ debarch=hppa ;; ++ mips*) ++ debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el || true) ;; ++ arm*) ++ debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el || true) ;; ++ *) ++ echo "" >&2 ++ echo "** ** ** WARNING ** ** **" >&2 ++ echo "" >&2 ++ echo "Your architecture doesn't have it's equivalent" >&2 ++ echo "Debian userspace architecture defined!" >&2 ++ echo "Falling back to using your current userspace instead!" >&2 ++ echo "Please add support for $UTS_MACHINE to ${0} ..." >&2 ++ echo "" >&2 ++ esac ++ if [ -n "$KBUILD_DEBARCH" ] ; then ++ debarch="$KBUILD_DEBARCH" ++ fi ++ if [ -n "$debarch" ] ; then ++ forcearch="-DArchitecture=$debarch" ++ fi ++ + # Create the package +- dpkg-gencontrol -p$pname -P"$pdir" ++ dpkg-gencontrol -isp $forcearch -Vkernel:debarch="${debarch:-$(dpkg --print-architecture)}" -p$pname -P"$pdir" + dpkg --build "$pdir" .. + } + +@@ -42,49 +78,35 @@ tmpdir="$objtree/debian/tmp" + fwdir="$objtree/debian/fwtmp" + kernel_headers_dir="$objtree/debian/hdrtmp" + libc_headers_dir="$objtree/debian/headertmp" ++dbg_dir="$objtree/debian/dbgtmp" + packagename=linux-image-$version +-fwpackagename=linux-firmware-image ++fwpackagename=linux-firmware-image-$version + kernel_headers_packagename=linux-headers-$version + libc_headers_packagename=linux-libc-dev +- +-# Attempt to find the correct Debian architecture +-case "$UTS_MACHINE" in +-i386|ia64|alpha) +- debarch="$UTS_MACHINE" ;; +-x86_64) +- debarch=amd64 ;; +-sparc*) +- debarch=sparc ;; +-s390*) +- debarch=s390 ;; +-ppc*) +- debarch=powerpc ;; +-parisc*) +- debarch=hppa ;; +-mips*) +- debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y .config && echo el) ;; +-arm*) +- debarch=arm$(grep -q CONFIG_AEABI=y .config && echo el) ;; +-*) +- echo "" >&2 +- echo "** ** ** WARNING ** ** **" >&2 +- echo "" >&2 +- echo "Your architecture doesn't have it's equivalent" >&2 +- echo "Debian userspace architecture defined!" >&2 +- echo "Falling back to using your current userspace instead!" >&2 +- echo "Please add support for $UTS_MACHINE to ${0} ..." >&2 +- echo "" >&2 +-esac +-if [ -n "$KBUILD_DEBARCH" ] ; then +- debarch="$KBUILD_DEBARCH" +-fi ++dbg_packagename=$packagename-dbg + + if [ "$ARCH" = "um" ] ; then + packagename=user-mode-linux-$version + fi + ++# Not all arches have the same installed path in debian ++# XXX: have each arch Makefile export a variable of the canonical image install ++# path instead ++case $ARCH in ++um) ++ installed_image_path="usr/bin/linux-$version" ++ ;; ++parisc|mips|powerpc) ++ installed_image_path="boot/vmlinux-$version" ++ ;; ++*) ++ installed_image_path="boot/vmlinuz-$version" ++esac ++ ++BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)" ++ + # Setup the directory structure +-rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir" ++rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" + mkdir -m 755 -p "$tmpdir/DEBIAN" + mkdir -p "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename" + mkdir -m 755 -p "$fwdir/DEBIAN" +@@ -97,26 +119,29 @@ mkdir -p "$kernel_headers_dir/lib/modules/$version/" + if [ "$ARCH" = "um" ] ; then + mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/bin" + fi ++if [ -n "$BUILD_DEBUG" ] ; then ++ mkdir -p "$dbg_dir/usr/share/doc/$dbg_packagename" ++ mkdir -m 755 -p "$dbg_dir/DEBIAN" ++fi + + # Build and install the kernel + if [ "$ARCH" = "um" ] ; then + $MAKE linux + cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map" +- cp .config "$tmpdir/usr/share/doc/$packagename/config" ++ cp $KCONFIG_CONFIG "$tmpdir/usr/share/doc/$packagename/config" + gzip "$tmpdir/usr/share/doc/$packagename/config" +- cp $KBUILD_IMAGE "$tmpdir/usr/bin/linux-$version" + else + cp System.map "$tmpdir/boot/System.map-$version" +- cp .config "$tmpdir/boot/config-$version" +- # Not all arches include the boot path in KBUILD_IMAGE +- if [ -e $KBUILD_IMAGE ]; then +- cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version" +- else +- cp arch/$ARCH/boot/$KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version" +- fi ++ cp $KCONFIG_CONFIG "$tmpdir/boot/config-$version" ++fi ++# Not all arches include the boot path in KBUILD_IMAGE ++if [ -e $KBUILD_IMAGE ]; then ++ cp $KBUILD_IMAGE "$tmpdir/$installed_image_path" ++else ++ cp arch/$ARCH/boot/$KBUILD_IMAGE "$tmpdir/$installed_image_path" + fi + +-if grep -q '^CONFIG_MODULES=y' .config ; then ++if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then + INSTALL_MOD_PATH="$tmpdir" $MAKE KBUILD_SRC= modules_install + rm -f "$tmpdir/lib/modules/$version/build" + rm -f "$tmpdir/lib/modules/$version/source" +@@ -124,6 +149,20 @@ if grep -q '^CONFIG_MODULES=y' .config ; then + mv "$tmpdir/lib/modules/$version"/* "$tmpdir/usr/lib/uml/modules/$version/" + rmdir "$tmpdir/lib/modules/$version" + fi ++ if [ -n "$BUILD_DEBUG" ] ; then ++ ( ++ cd $tmpdir ++ for module in $(find lib/modules/ -name *.ko); do ++ mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module) ++ # only keep debug symbols in the debug file ++ objcopy --only-keep-debug $module $dbg_dir/usr/lib/debug/$module ++ # strip original module from debug symbols ++ objcopy --strip-debug $module ++ # then add a link to those ++ objcopy --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module ++ done ++ ) ++ fi + fi + + if [ "$ARCH" != "um" ]; then +@@ -133,8 +172,15 @@ fi + + # Install the maintainer scripts + # Note: hook scripts under /etc/kernel are also executed by official Debian +-# kernel packages, as well as kernel packages built using make-kpkg ++# kernel packages, as well as kernel packages built using make-kpkg. ++# make-kpkg sets $INITRD to indicate whether an initramfs is wanted, and ++# so do we; recent versions of dracut and initramfs-tools will obey this. + debhookdir=${KDEB_HOOKDIR:-/etc/kernel} ++if grep -q '^CONFIG_BLK_DEV_INITRD=y' $KCONFIG_CONFIG; then ++ want_initrd=Yes ++else ++ want_initrd=No ++fi + for script in postinst postrm preinst prerm ; do + mkdir -p "$tmpdir$debhookdir/$script.d" + cat < "$tmpdir/DEBIAN/$script" +@@ -145,7 +191,10 @@ set -e + # Pass maintainer script parameters to hook scripts + export DEB_MAINT_PARAMS="\$*" + +-test -d $debhookdir/$script.d && run-parts --arg="$version" $debhookdir/$script.d ++# Tell initramfs builder whether it's wanted ++export INITRD=$want_initrd ++ ++test -d $debhookdir/$script.d && run-parts --arg="$version" --arg="/$installed_image_path" $debhookdir/$script.d + exit 0 + EOF + chmod 755 "$tmpdir/DEBIAN/$script" +@@ -230,8 +279,8 @@ else + Package: $packagename + Provides: linux-image, linux-image-2.6, linux-modules-$version + Suggests: $fwpackagename +-Architecture: $debarch +-Description: Linux kernel, version $version on $debarch ++Architecture: any ++Description: Linux kernel, version $version + This package contains the Linux kernel, modules and corresponding other + files, version: $version. + EOF +@@ -241,21 +290,22 @@ fi + # Build header package + (cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl > "$objtree/debian/hdrsrcfiles") + (cd $srctree; find arch/$SRCARCH/include include scripts -type f >> "$objtree/debian/hdrsrcfiles") +-(cd $objtree; find arch/$SRCARCH/include .config Module.symvers include scripts -type f >> "$objtree/debian/hdrobjfiles") ++(cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts -type f >> "$objtree/debian/hdrobjfiles") + destdir=$kernel_headers_dir/usr/src/linux-headers-$version + mkdir -p "$destdir" + (cd $srctree; tar -c -f - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -) + (cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -) ++(cd $objtree; cp $KCONFIG_CONFIG $destdir/.config) # copy .config manually to be where it's expected to be + ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build" + rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles" + + cat <> debian/control + + Package: $kernel_headers_packagename +-Architecture: $debarch + Provides: linux-headers, linux-headers-2.6 +-Description: Linux kernel headers for $KERNELRELEASE on $debarch +- This package provides kernel header files for $KERNELRELEASE on $debarch ++Architecture: any ++Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch} ++ This package provides kernel header files for $KERNELRELEASE on \${kernel:debarch} + . + This is useful for people who need to build external modules + EOF +@@ -294,4 +344,30 @@ fi + + create_package "$packagename" "$tmpdir" + ++if [ -n "$BUILD_DEBUG" ] ; then ++ # Build debug package ++ # Different tools want the image in different locations ++ # perf ++ mkdir -p $dbg_dir/usr/lib/debug/lib/modules/$version/ ++ cp vmlinux $dbg_dir/usr/lib/debug/lib/modules/$version/ ++ # systemtap ++ mkdir -p $dbg_dir/usr/lib/debug/boot/ ++ ln -s ../lib/modules/$version/vmlinux $dbg_dir/usr/lib/debug/boot/vmlinux-$version ++ # kdump-tools ++ ln -s lib/modules/$version/vmlinux $dbg_dir/usr/lib/debug/vmlinux-$version ++ ++ cat <> debian/control ++ ++Package: $dbg_packagename ++Section: debug ++Provides: linux-debug, linux-debug-$version ++Architecture: any ++Description: Linux kernel debugging symbols for $version ++ This package will come in handy if you need to debug the kernel. It provides ++ all the necessary debug symbols for the kernel and its modules. ++EOF ++ ++ create_package "$dbg_packagename" "$dbg_dir" ++fi ++ + exit 0 +-- +1.9.0 + diff --git a/patches/gpmc/0001-ARM-OMAP-Clear-GPMC-bits-when-applying-new-setting.patch b/patches/gpmc/0001-ARM-OMAP-Clear-GPMC-bits-when-applying-new-setting.patch index 975926f8..21a2ba7b 100644 --- a/patches/gpmc/0001-ARM-OMAP-Clear-GPMC-bits-when-applying-new-setting.patch +++ b/patches/gpmc/0001-ARM-OMAP-Clear-GPMC-bits-when-applying-new-setting.patch @@ -1,4 +1,4 @@ -From 4d5c3dec261a46f5b7bb9294e8a1e1ee7cd638b5 Mon Sep 17 00:00:00 2001 +From 10c9a3309cbd71c463b8c8c2674d645aee2f0682 Mon Sep 17 00:00:00 2001 From: Mark Jackson Date: Tue, 5 Mar 2013 10:13:40 +0000 Subject: [PATCH 01/39] ARM: OMAP: Clear GPMC bits when applying new setting. @@ -18,8 +18,8 @@ Signed-off-by: Mark Jackson [jon-hunter@ti.com: updated changelog] Signed-off-by: Jon Hunter --- - arch/arm/mach-omap2/gpmc.c | 4 ++++ - arch/arm/mach-omap2/gpmc.h | 5 ++++- + arch/arm/mach-omap2/gpmc.c | 4 ++++ + arch/arm/mach-omap2/gpmc.h | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c @@ -54,5 +54,5 @@ index fe0a844..f79cbde 100644 #define GPMC_CONFIG1_FCLK_DIV(val) (val & 3) #define GPMC_CONFIG1_FCLK_DIV2 (GPMC_CONFIG1_FCLK_DIV(1)) -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0002-ARM-omap2-gpmc-Mark-local-scoped-functions-static.patch b/patches/gpmc/0002-ARM-omap2-gpmc-Mark-local-scoped-functions-static.patch index 6a770be7..5175b312 100644 --- a/patches/gpmc/0002-ARM-omap2-gpmc-Mark-local-scoped-functions-static.patch +++ b/patches/gpmc/0002-ARM-omap2-gpmc-Mark-local-scoped-functions-static.patch @@ -1,4 +1,4 @@ -From 2136d2f6471bf1c53068b126ae858bb3e3fb4f27 Mon Sep 17 00:00:00 2001 +From 3723f4daccb73b23ea98646ef5f1879d80c0208a Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Tue, 12 Feb 2013 16:22:17 -0300 Subject: [PATCH 02/39] ARM: omap2: gpmc: Mark local scoped functions static @@ -10,8 +10,8 @@ Signed-off-by: Ezequiel Garcia Reviewed-by: Jon Hunter Signed-off-by: Jon Hunter --- - arch/arm/mach-omap2/gpmc.c | 14 +++++++------- - arch/arm/mach-omap2/gpmc.h | 7 ------- + arch/arm/mach-omap2/gpmc.c | 14 +++++++------- + arch/arm/mach-omap2/gpmc.h | 7 ------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c @@ -107,5 +107,5 @@ index f79cbde..697ff42 100644 extern void omap3_gpmc_restore_context(void); extern int gpmc_cs_configure(int cs, int cmd, int wval); -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0003-ARM-omap2-gpmc-Remove-unused-gpmc_round_ns_to_ticks-.patch b/patches/gpmc/0003-ARM-omap2-gpmc-Remove-unused-gpmc_round_ns_to_ticks-.patch index d692b3ee..9aeaf3e1 100644 --- a/patches/gpmc/0003-ARM-omap2-gpmc-Remove-unused-gpmc_round_ns_to_ticks-.patch +++ b/patches/gpmc/0003-ARM-omap2-gpmc-Remove-unused-gpmc_round_ns_to_ticks-.patch @@ -1,4 +1,4 @@ -From ebcd62c5547bbf53d0536d37ba59e017e8ae3a42 Mon Sep 17 00:00:00 2001 +From bcc5a40f151fbb196a645baf853c6f8386914bd8 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Tue, 12 Feb 2013 16:22:18 -0300 Subject: [PATCH 03/39] ARM: omap2: gpmc: Remove unused @@ -11,7 +11,7 @@ Signed-off-by: Ezequiel Garcia Reviewed-by: Jon Hunter Signed-off-by: Jon Hunter --- - arch/arm/mach-omap2/gpmc.c | 7 ------- + arch/arm/mach-omap2/gpmc.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c @@ -33,5 +33,5 @@ index 20de0f6..d7add37 100644 { return ticks * gpmc_get_fclk_period(); -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0004-ARM-omap2-gpmc-Fix-gpmc_cs_reserved-return-value.patch b/patches/gpmc/0004-ARM-omap2-gpmc-Fix-gpmc_cs_reserved-return-value.patch index 97d461f3..239e2df1 100644 --- a/patches/gpmc/0004-ARM-omap2-gpmc-Fix-gpmc_cs_reserved-return-value.patch +++ b/patches/gpmc/0004-ARM-omap2-gpmc-Fix-gpmc_cs_reserved-return-value.patch @@ -1,4 +1,4 @@ -From c4646be481abcc73713641abc8b29e11f866f442 Mon Sep 17 00:00:00 2001 +From 3bfe0f3e1c60f7e8a4c75f2a378414f70474a52b Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Tue, 12 Feb 2013 16:22:19 -0300 Subject: [PATCH 04/39] ARM: omap2: gpmc: Fix gpmc_cs_reserved() return value @@ -16,7 +16,7 @@ Signed-off-by: Ezequiel Garcia Reviewed-by: Jon Hunter Signed-off-by: Jon Hunter --- - arch/arm/mach-omap2/gpmc.c | 4 ++-- + arch/arm/mach-omap2/gpmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c @@ -37,5 +37,5 @@ index d7add37..83430a2 100644 return gpmc_cs_map & (1 << cs); } -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0005-ARM-omap2-gpmc-nand-Print-something-useful-on-CS-req.patch b/patches/gpmc/0005-ARM-omap2-gpmc-nand-Print-something-useful-on-CS-req.patch index 16997f73..002dc6c4 100644 --- a/patches/gpmc/0005-ARM-omap2-gpmc-nand-Print-something-useful-on-CS-req.patch +++ b/patches/gpmc/0005-ARM-omap2-gpmc-nand-Print-something-useful-on-CS-req.patch @@ -1,4 +1,4 @@ -From 39dd92743bf861d4bb4f4ae917be56f7730c8971 Mon Sep 17 00:00:00 2001 +From 0dc291bbae9a56c0274e1ec0c98a006dd02d7c2d Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Tue, 12 Feb 2013 16:22:20 -0300 Subject: [PATCH 05/39] ARM: omap2: gpmc-nand: Print something useful on CS @@ -11,7 +11,7 @@ Signed-off-by: Ezequiel Garcia Reviewed-by: Jon Hunter Signed-off-by: Jon Hunter --- - arch/arm/mach-omap2/gpmc-nand.c | 3 ++- + arch/arm/mach-omap2/gpmc-nand.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c @@ -29,5 +29,5 @@ index db969a5..6027dd0 100644 } -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0006-ARM-omap2-gpmc-onenand-Print-something-useful-on-CS-.patch b/patches/gpmc/0006-ARM-omap2-gpmc-onenand-Print-something-useful-on-CS-.patch index 96e0304c..cb1d0d8c 100644 --- a/patches/gpmc/0006-ARM-omap2-gpmc-onenand-Print-something-useful-on-CS-.patch +++ b/patches/gpmc/0006-ARM-omap2-gpmc-onenand-Print-something-useful-on-CS-.patch @@ -1,4 +1,4 @@ -From 4f06119b521fad6c2a67afa10f4a769f49825509 Mon Sep 17 00:00:00 2001 +From 474860e006e438e0c5d3cbbaf1aeaaa7ce31f415 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Tue, 12 Feb 2013 16:22:21 -0300 Subject: [PATCH 06/39] ARM: omap2: gpmc-onenand: Print something useful on CS @@ -11,7 +11,7 @@ Signed-off-by: Ezequiel Garcia Reviewed-by: Jon Hunter Signed-off-by: Jon Hunter --- - arch/arm/mach-omap2/gpmc-onenand.c | 3 ++- + arch/arm/mach-omap2/gpmc-onenand.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c @@ -29,5 +29,5 @@ index 94a349e..80d756b 100644 } -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0007-ARM-omap2-gpmc-onenand-Replace-pr_err-with-dev_err.patch b/patches/gpmc/0007-ARM-omap2-gpmc-onenand-Replace-pr_err-with-dev_err.patch index c2c33b0e..56f74396 100644 --- a/patches/gpmc/0007-ARM-omap2-gpmc-onenand-Replace-pr_err-with-dev_err.patch +++ b/patches/gpmc/0007-ARM-omap2-gpmc-onenand-Replace-pr_err-with-dev_err.patch @@ -1,4 +1,4 @@ -From 7971a0ff58785a6103624e747a754ec1ba04b9a4 Mon Sep 17 00:00:00 2001 +From a6a3956a40c46e4d608fc323445c12e70ec85bef Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Tue, 12 Feb 2013 16:22:22 -0300 Subject: [PATCH 07/39] ARM: omap2: gpmc-onenand: Replace pr_err() with @@ -11,7 +11,7 @@ Signed-off-by: Ezequiel Garcia Reviewed-by: Jon Hunter Signed-off-by: Jon Hunter --- - arch/arm/mach-omap2/gpmc-onenand.c | 7 ++++--- + arch/arm/mach-omap2/gpmc-onenand.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c @@ -47,5 +47,5 @@ index 80d756b..e1daf94 100644 return; } -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0008-ARM-omap2-gpmc-onenand-Replace-printk-KERN_ERR-with-.patch b/patches/gpmc/0008-ARM-omap2-gpmc-onenand-Replace-printk-KERN_ERR-with-.patch index 581e451e..f5b551a0 100644 --- a/patches/gpmc/0008-ARM-omap2-gpmc-onenand-Replace-printk-KERN_ERR-with-.patch +++ b/patches/gpmc/0008-ARM-omap2-gpmc-onenand-Replace-printk-KERN_ERR-with-.patch @@ -1,4 +1,4 @@ -From 63ae03e6d77f27ce732aaa8f4ef16d406edbc086 Mon Sep 17 00:00:00 2001 +From 4a3ae6c3889bc238740f97875a440f34285eef1c Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Tue, 12 Feb 2013 16:22:23 -0300 Subject: [PATCH 08/39] ARM: omap2: gpmc-onenand: Replace printk KERN_ERR with @@ -11,7 +11,7 @@ Signed-off-by: Ezequiel Garcia Reviewed-by: Jon Hunter Signed-off-by: Jon Hunter --- - arch/arm/mach-omap2/gpmc-onenand.c | 2 +- + arch/arm/mach-omap2/gpmc-onenand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c @@ -28,5 +28,5 @@ index e1daf94..428cb19 100644 gpmc_onenand_data->flags |= ONENAND_SYNC_READ; } -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0009-ARM-omap2-gpmc-Remove-redundant-chip-select-out-of-r.patch b/patches/gpmc/0009-ARM-omap2-gpmc-Remove-redundant-chip-select-out-of-r.patch index 49f0096a..8e827898 100644 --- a/patches/gpmc/0009-ARM-omap2-gpmc-Remove-redundant-chip-select-out-of-r.patch +++ b/patches/gpmc/0009-ARM-omap2-gpmc-Remove-redundant-chip-select-out-of-r.patch @@ -1,4 +1,4 @@ -From 6669b580deee0d35489ac09dc3e0c9f7ef05d173 Mon Sep 17 00:00:00 2001 +From ed1b3cde3ca24a46a02cbcd24ea3a4b75bb1a7ff Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Tue, 12 Feb 2013 16:22:24 -0300 Subject: [PATCH 09/39] ARM: omap2: gpmc: Remove redundant chip select out of @@ -12,7 +12,7 @@ Signed-off-by: Ezequiel Garcia Reviewed-by: Jon Hunter Signed-off-by: Jon Hunter --- - arch/arm/mach-omap2/gpmc.c | 10 +--------- + arch/arm/mach-omap2/gpmc.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c @@ -44,5 +44,5 @@ index 83430a2..901dacd 100644 } -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0010-ARM-OMAP2-Simplify-code-configuring-ONENAND-devices.patch b/patches/gpmc/0010-ARM-OMAP2-Simplify-code-configuring-ONENAND-devices.patch index 563928cf..f92cbcbc 100644 --- a/patches/gpmc/0010-ARM-OMAP2-Simplify-code-configuring-ONENAND-devices.patch +++ b/patches/gpmc/0010-ARM-OMAP2-Simplify-code-configuring-ONENAND-devices.patch @@ -1,4 +1,4 @@ -From ae248fc81a1657ea6de8c711749d73ac3e11f68b Mon Sep 17 00:00:00 2001 +From 7bb853af3567e13550cbc879a9fad1ea397190ea Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Thu, 21 Feb 2013 15:20:53 -0600 Subject: [PATCH 10/39] ARM: OMAP2+: Simplify code configuring ONENAND devices @@ -15,7 +15,7 @@ member and not the entire structure. Signed-off-by: Jon Hunter Tested-by: Ezequiel Garcia --- - arch/arm/mach-omap2/gpmc-onenand.c | 26 ++++++++++---------------- + arch/arm/mach-omap2/gpmc-onenand.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c @@ -103,5 +103,5 @@ index 428cb19..b7f73c5 100644 ret = gpmc_set_sync_mode(gpmc_onenand_data->cs, &t); if (IS_ERR_VALUE(ret)) -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0011-ARM-OMAP2-Add-variable-to-store-number-of-GPMC-waitp.patch b/patches/gpmc/0011-ARM-OMAP2-Add-variable-to-store-number-of-GPMC-waitp.patch index addd063e..83f5cf71 100644 --- a/patches/gpmc/0011-ARM-OMAP2-Add-variable-to-store-number-of-GPMC-waitp.patch +++ b/patches/gpmc/0011-ARM-OMAP2-Add-variable-to-store-number-of-GPMC-waitp.patch @@ -1,4 +1,4 @@ -From 2af2f2236762737c01b75900b083b28ef2cde6ea Mon Sep 17 00:00:00 2001 +From 309dfeda25b850a735d7974015abb41c51ecd49c Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Wed, 20 Feb 2013 15:53:38 -0600 Subject: [PATCH 11/39] ARM: OMAP2+: Add variable to store number of GPMC @@ -19,7 +19,7 @@ device-tree is fine. Signed-off-by: Jon Hunter Tested-by: Ezequiel Garcia --- - arch/arm/mach-omap2/gpmc.c | 231 +++++++++++++++++++++++++++++++++++++++++++- + arch/arm/mach-omap2/gpmc.c | 231 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 230 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c @@ -286,5 +286,5 @@ index 901dacd..1346f3e 100644 } -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0012-ARM-OMAP2-Add-structure-for-storing-GPMC-settings.patch b/patches/gpmc/0012-ARM-OMAP2-Add-structure-for-storing-GPMC-settings.patch index 7785b10e..52edc776 100644 --- a/patches/gpmc/0012-ARM-OMAP2-Add-structure-for-storing-GPMC-settings.patch +++ b/patches/gpmc/0012-ARM-OMAP2-Add-structure-for-storing-GPMC-settings.patch @@ -1,4 +1,4 @@ -From 945ba5b42e64470edcad8778604466eb07589544 Mon Sep 17 00:00:00 2001 +From cb3eb9da64cc746a8918b736ba50703827a302e9 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Thu, 21 Feb 2013 13:46:22 -0600 Subject: [PATCH 12/39] ARM: OMAP2+: Add structure for storing GPMC settings @@ -16,11 +16,11 @@ these options. Signed-off-by: Jon Hunter Tested-by: Ezequiel Garcia --- - arch/arm/mach-omap2/gpmc-onenand.c | 18 ++++++++++----- - arch/arm/mach-omap2/gpmc-smc91x.c | 2 +- - arch/arm/mach-omap2/gpmc.c | 45 +++++++++++++++++++++--------------- - arch/arm/mach-omap2/gpmc.h | 28 ++++++++++++++++------ - arch/arm/mach-omap2/usb-tusb6010.c | 19 ++++++++------- + arch/arm/mach-omap2/gpmc-onenand.c | 18 ++++++++++----- + arch/arm/mach-omap2/gpmc-smc91x.c | 2 +- + arch/arm/mach-omap2/gpmc.c | 45 +++++++++++++++++++++++--------------- + arch/arm/mach-omap2/gpmc.h | 28 ++++++++++++++++++------ + arch/arm/mach-omap2/usb-tusb6010.c | 19 +++++++++------- 5 files changed, 72 insertions(+), 40 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c @@ -323,5 +323,5 @@ index c5a3c6f..faaf96d 100644 return gpmc_cs_set_timings(sync_cs, &t); } -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0013-ARM-OMAP2-Add-function-for-configuring-GPMC-settings.patch b/patches/gpmc/0013-ARM-OMAP2-Add-function-for-configuring-GPMC-settings.patch index 53a36fd4..6d49e304 100644 --- a/patches/gpmc/0013-ARM-OMAP2-Add-function-for-configuring-GPMC-settings.patch +++ b/patches/gpmc/0013-ARM-OMAP2-Add-function-for-configuring-GPMC-settings.patch @@ -1,8 +1,7 @@ -From 82070be1a8b90974c16c5356d5e12b044df3d5ae Mon Sep 17 00:00:00 2001 +From 279aca1ff1ce01f436c5f9b7f1e30fd4bd98974d Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Thu, 21 Feb 2013 15:25:23 -0600 -Subject: [PATCH 13/39] ARM: OMAP2+: Add function for configuring GPMC - settings +Subject: [PATCH 13/39] ARM: OMAP2+: Add function for configuring GPMC settings The GPMC has various different configuration options such as bus-width, synchronous or asychronous mode selection, burst mode options etc. @@ -21,8 +20,8 @@ address-address-data multiplexing mode. Signed-off-by: Jon Hunter Tested-by: Ezequiel Garcia --- - arch/arm/mach-omap2/gpmc.c | 100 ++++++++++++++++++++++++++++++++++++++++++++ - arch/arm/mach-omap2/gpmc.h | 6 +++ + arch/arm/mach-omap2/gpmc.c | 100 +++++++++++++++++++++++++++++++++++++++++++++ + arch/arm/mach-omap2/gpmc.h | 6 +++ 2 files changed, 106 insertions(+) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c @@ -177,5 +176,5 @@ index 39e4e04..ce6ae21 100644 extern void gpmc_cs_free(int cs); extern void omap3_gpmc_save_context(void); -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0014-ARM-OMAP2-Convert-ONENAND-to-use-gpmc_cs_program_set.patch b/patches/gpmc/0014-ARM-OMAP2-Convert-ONENAND-to-use-gpmc_cs_program_set.patch index bf0e9770..f671be16 100644 --- a/patches/gpmc/0014-ARM-OMAP2-Convert-ONENAND-to-use-gpmc_cs_program_set.patch +++ b/patches/gpmc/0014-ARM-OMAP2-Convert-ONENAND-to-use-gpmc_cs_program_set.patch @@ -1,4 +1,4 @@ -From 7678680472ed194bde4ea88504611e00b317101a Mon Sep 17 00:00:00 2001 +From d7792193706a14cffc8209edbf907c3dce70de2e Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Thu, 21 Feb 2013 12:42:22 -0600 Subject: [PATCH 14/39] ARM: OMAP2+: Convert ONENAND to use @@ -11,7 +11,7 @@ programming the CONFIG1 register. Signed-off-by: Jon Hunter Tested-by: Ezequiel Garcia --- - arch/arm/mach-omap2/gpmc-onenand.c | 57 +++++++++++++++--------------------- + arch/arm/mach-omap2/gpmc-onenand.c | 57 +++++++++++++++----------------------- 1 file changed, 23 insertions(+), 34 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c @@ -133,5 +133,5 @@ index d2bf43e..dae6e05 100644 if (IS_ERR_VALUE(ret)) return ret; -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0015-ARM-OMAP2-Convert-NAND-to-use-gpmc_cs_program_settin.patch b/patches/gpmc/0015-ARM-OMAP2-Convert-NAND-to-use-gpmc_cs_program_settin.patch index 046f73d0..4042f255 100644 --- a/patches/gpmc/0015-ARM-OMAP2-Convert-NAND-to-use-gpmc_cs_program_settin.patch +++ b/patches/gpmc/0015-ARM-OMAP2-Convert-NAND-to-use-gpmc_cs_program_settin.patch @@ -1,4 +1,4 @@ -From efc29dcc66717009f6db02205e0b7aa9fb4d0750 Mon Sep 17 00:00:00 2001 +From f989f3407df20973912a2df488fac45345e3748a Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Thu, 21 Feb 2013 15:43:08 -0600 Subject: [PATCH 15/39] ARM: OMAP2+: Convert NAND to use @@ -18,7 +18,7 @@ setting the dev_ready variable. Signed-off-by: Jon Hunter Tested-by: Ezequiel Garcia --- - arch/arm/mach-omap2/gpmc-nand.c | 35 +++++++++++++++++++++++------------ + arch/arm/mach-omap2/gpmc-nand.c | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c @@ -85,5 +85,5 @@ index 6027dd0..d8ad997 100644 gpmc_update_nand_reg(&gpmc_nand_data->reg, gpmc_nand_data->cs); -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0016-ARM-OMAP2-Convert-SMC91x-to-use-gpmc_cs_program_sett.patch b/patches/gpmc/0016-ARM-OMAP2-Convert-SMC91x-to-use-gpmc_cs_program_sett.patch index 5995c11b..e45ae6a5 100644 --- a/patches/gpmc/0016-ARM-OMAP2-Convert-SMC91x-to-use-gpmc_cs_program_sett.patch +++ b/patches/gpmc/0016-ARM-OMAP2-Convert-SMC91x-to-use-gpmc_cs_program_sett.patch @@ -1,4 +1,4 @@ -From 6ffff0fa4befe9afbd9eade67b4437511166293f Mon Sep 17 00:00:00 2001 +From 3e1bacf8e146aff8dcc3445ced8c34807bc52ac9 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Thu, 21 Feb 2013 13:01:37 -0600 Subject: [PATCH 16/39] ARM: OMAP2+: Convert SMC91x to use @@ -15,7 +15,7 @@ at runtime. Signed-off-by: Jon Hunter Tested-by: Ezequiel Garcia --- - arch/arm/mach-omap2/gpmc-smc91x.c | 30 +++++++++++++++++------------- + arch/arm/mach-omap2/gpmc-smc91x.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc-smc91x.c b/arch/arm/mach-omap2/gpmc-smc91x.c @@ -81,5 +81,5 @@ index 4b78338..61a0635 100644 ret = gpmc_cfg->retime(); if (ret != 0) -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0017-ARM-OMAP2-Convert-TUSB-to-use-gpmc_cs_program_settin.patch b/patches/gpmc/0017-ARM-OMAP2-Convert-TUSB-to-use-gpmc_cs_program_settin.patch index d5886324..d9e91422 100644 --- a/patches/gpmc/0017-ARM-OMAP2-Convert-TUSB-to-use-gpmc_cs_program_settin.patch +++ b/patches/gpmc/0017-ARM-OMAP2-Convert-TUSB-to-use-gpmc_cs_program_settin.patch @@ -1,4 +1,4 @@ -From bf7da2fa8dffc07731459996c1aee434bf521226 Mon Sep 17 00:00:00 2001 +From 760624ee63a4ccd52b701e495812d217e8b2678c Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Thu, 21 Feb 2013 13:01:47 -0600 Subject: [PATCH 17/39] ARM: OMAP2+: Convert TUSB to use @@ -11,7 +11,7 @@ programming the CONFIG1 register. Signed-off-by: Jon Hunter Tested-by: Ezequiel Garcia --- - arch/arm/mach-omap2/usb-tusb6010.c | 43 ++++++++++++++++-------------------- + arch/arm/mach-omap2/usb-tusb6010.c | 43 +++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/arch/arm/mach-omap2/usb-tusb6010.c b/arch/arm/mach-omap2/usb-tusb6010.c @@ -99,5 +99,5 @@ index faaf96d..e832bc7 100644 /* IRQ */ status = gpio_request_one(irq, GPIOF_IN, "TUSB6010 irq"); -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0018-ARM-OMAP2-Don-t-configure-of-chip-select-options-in-.patch b/patches/gpmc/0018-ARM-OMAP2-Don-t-configure-of-chip-select-options-in-.patch index 7dfcb24e..2901a426 100644 --- a/patches/gpmc/0018-ARM-OMAP2-Don-t-configure-of-chip-select-options-in-.patch +++ b/patches/gpmc/0018-ARM-OMAP2-Don-t-configure-of-chip-select-options-in-.patch @@ -1,4 +1,4 @@ -From 629e50b9ccc7ca13c7912f823e3ec823554e0457 Mon Sep 17 00:00:00 2001 +From 1c6e7490667ccb10217adc149db8f48af2ffbd65 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Thu, 21 Feb 2013 13:00:21 -0600 Subject: [PATCH 18/39] ARM: OMAP2+: Don't configure of chip-select options in @@ -12,9 +12,9 @@ modifies options in the CONFIG1 register. Signed-off-by: Jon Hunter Tested-by: Ezequiel Garcia --- - arch/arm/mach-omap2/gpmc-nand.c | 2 +- - arch/arm/mach-omap2/gpmc.c | 49 ++++++--------------------------------- - arch/arm/mach-omap2/gpmc.h | 5 +--- + arch/arm/mach-omap2/gpmc-nand.c | 2 +- + arch/arm/mach-omap2/gpmc.c | 49 ++++++----------------------------------- + arch/arm/mach-omap2/gpmc.h | 5 +---- 3 files changed, 9 insertions(+), 47 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c @@ -129,5 +129,5 @@ index ce6ae21..87d2a22 100644 #endif -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0019-ARM-OMAP2-Add-function-to-read-GPMC-settings-from-de.patch b/patches/gpmc/0019-ARM-OMAP2-Add-function-to-read-GPMC-settings-from-de.patch index c88ebfe4..c9cf59e1 100644 --- a/patches/gpmc/0019-ARM-OMAP2-Add-function-to-read-GPMC-settings-from-de.patch +++ b/patches/gpmc/0019-ARM-OMAP2-Add-function-to-read-GPMC-settings-from-de.patch @@ -1,4 +1,4 @@ -From 2e92cf3d7fa4490aad9f17612b9c2486edcc1a2b Mon Sep 17 00:00:00 2001 +From 6ce8f1d65ab9ea659caf14412616d1aedead1ff5 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Wed, 20 Feb 2013 15:53:12 -0600 Subject: [PATCH 19/39] ARM: OMAP2+: Add function to read GPMC settings from @@ -13,9 +13,9 @@ options. Signed-off-by: Jon Hunter Tested-by: Ezequiel Garcia --- - Documentation/devicetree/bindings/bus/ti-gpmc.txt | 107 +++++++++++++++++++++ - arch/arm/mach-omap2/gpmc.c | 40 ++++++++ - arch/arm/mach-omap2/gpmc.h | 2 + + Documentation/devicetree/bindings/bus/ti-gpmc.txt | 107 ++++++++++++++++++++++ + arch/arm/mach-omap2/gpmc.c | 40 ++++++++ + arch/arm/mach-omap2/gpmc.h | 2 + 3 files changed, 149 insertions(+) create mode 100644 Documentation/devicetree/bindings/bus/ti-gpmc.txt @@ -196,5 +196,5 @@ index 87d2a22..707f6d5 100644 #endif -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0020-ARM-OMAP2-Add-additional-GPMC-timing-parameters.patch b/patches/gpmc/0020-ARM-OMAP2-Add-additional-GPMC-timing-parameters.patch index 109c0f46..1e7c06f7 100644 --- a/patches/gpmc/0020-ARM-OMAP2-Add-additional-GPMC-timing-parameters.patch +++ b/patches/gpmc/0020-ARM-OMAP2-Add-additional-GPMC-timing-parameters.patch @@ -1,4 +1,4 @@ -From 0f2fd8cbed55b711c84567a28cce49629d82ce23 Mon Sep 17 00:00:00 2001 +From f8f7af4d4b2e0e61989d499c59249aa9d71d556c Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Thu, 21 Feb 2013 18:51:27 -0600 Subject: [PATCH 20/39] ARM: OMAP2+: Add additional GPMC timing parameters @@ -23,8 +23,8 @@ this too. Signed-off-by: Jon Hunter Tested-by: Ezequiel Garcia --- - Documentation/devicetree/bindings/bus/ti-gpmc.txt | 78 +++++++++++------ - arch/arm/mach-omap2/gpmc.c | 94 ++++++++++----------- + Documentation/devicetree/bindings/bus/ti-gpmc.txt | 78 ++++++++++++------- + arch/arm/mach-omap2/gpmc.c | 94 +++++++++++------------ 2 files changed, 98 insertions(+), 74 deletions(-) diff --git a/Documentation/devicetree/bindings/bus/ti-gpmc.txt b/Documentation/devicetree/bindings/bus/ti-gpmc.txt @@ -238,5 +238,5 @@ index dd2c72c..c127e75 100644 #ifdef CONFIG_MTD_NAND -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0021-ARM-OMAP2-Add-device-tree-support-for-NOR-flash.patch b/patches/gpmc/0021-ARM-OMAP2-Add-device-tree-support-for-NOR-flash.patch index 5d3e2c16..10b3a762 100644 --- a/patches/gpmc/0021-ARM-OMAP2-Add-device-tree-support-for-NOR-flash.patch +++ b/patches/gpmc/0021-ARM-OMAP2-Add-device-tree-support-for-NOR-flash.patch @@ -1,4 +1,4 @@ -From 252c7fc2a501a9df58ae4aed613fe2d95aacd266 Mon Sep 17 00:00:00 2001 +From 79209316702c5e44e6e6ca04f550179b2af3836b Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Fri, 8 Feb 2013 16:46:13 -0600 Subject: [PATCH 21/39] ARM: OMAP2+: Add device-tree support for NOR flash @@ -12,8 +12,8 @@ Add documentation for the TI GPMC NOR binding. Signed-off-by: Jon Hunter Tested-by: Ezequiel Garcia --- - Documentation/devicetree/bindings/mtd/gpmc-nor.txt | 98 ++++++++++++++++ - arch/arm/mach-omap2/gpmc.c | 119 ++++++++++++++++++++ + Documentation/devicetree/bindings/mtd/gpmc-nor.txt | 98 +++++++++++++++++ + arch/arm/mach-omap2/gpmc.c | 119 +++++++++++++++++++++ 2 files changed, 217 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/gpmc-nor.txt @@ -273,5 +273,5 @@ index c127e75..80dd023 100644 } #else -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0022-ARM-OMAP2-Convert-NAND-to-retrieve-GPMC-settings-fro.patch b/patches/gpmc/0022-ARM-OMAP2-Convert-NAND-to-retrieve-GPMC-settings-fro.patch index 5518f020..bac17a76 100644 --- a/patches/gpmc/0022-ARM-OMAP2-Convert-NAND-to-retrieve-GPMC-settings-fro.patch +++ b/patches/gpmc/0022-ARM-OMAP2-Convert-NAND-to-retrieve-GPMC-settings-fro.patch @@ -1,4 +1,4 @@ -From d2bbf6daa9be80eddb714609ec4e35803ae445f0 Mon Sep 17 00:00:00 2001 +From 2373a916e97bda6c4d6beb03aa868e866e15101f Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Mon, 25 Feb 2013 11:36:47 -0600 Subject: [PATCH 22/39] ARM: OMAP2+: Convert NAND to retrieve GPMC settings @@ -12,7 +12,7 @@ device-tree is complete. Signed-off-by: Jon Hunter Tested-by: Ezequiel Garcia --- - arch/arm/mach-omap2/gpmc-nand.c | 16 ++++++++++------ + arch/arm/mach-omap2/gpmc-nand.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c @@ -43,5 +43,5 @@ index 7c70752..026785c 100644 if (gpmc_nand_data->devsize == NAND_BUSWIDTH_16) -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0023-ARM-OMAP2-Convert-ONENAND-to-retrieve-GPMC-settings-.patch b/patches/gpmc/0023-ARM-OMAP2-Convert-ONENAND-to-retrieve-GPMC-settings-.patch index 04d801dd..9e1618f2 100644 --- a/patches/gpmc/0023-ARM-OMAP2-Convert-ONENAND-to-retrieve-GPMC-settings-.patch +++ b/patches/gpmc/0023-ARM-OMAP2-Convert-ONENAND-to-retrieve-GPMC-settings-.patch @@ -1,4 +1,4 @@ -From e41f4f3c32d6aead59bcc64b1d794f52ac97ef44 Mon Sep 17 00:00:00 2001 +From 424915471ed612569dd0f0de76ac624c931dc740 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Mon, 25 Feb 2013 11:37:58 -0600 Subject: [PATCH 23/39] ARM: OMAP2+: Convert ONENAND to retrieve GPMC settings @@ -25,8 +25,8 @@ wait-monitoring settings described in the device-tree blob. Signed-off-by: Jon Hunter Tested-by: Ezequiel Garcia --- - .../devicetree/bindings/mtd/gpmc-onenand.txt | 46 ++++++++++++++++++++ - arch/arm/mach-omap2/gpmc-onenand.c | 21 ++++++--- + .../devicetree/bindings/mtd/gpmc-onenand.txt | 46 ++++++++++++++++++++++ + arch/arm/mach-omap2/gpmc-onenand.c | 21 +++++++--- 2 files changed, 61 insertions(+), 6 deletions(-) create mode 100644 Documentation/devicetree/bindings/mtd/gpmc-onenand.txt @@ -122,5 +122,5 @@ index dae6e05..1a2b84e 100644 omap2_onenand_calc_sync_timings(&t, gpmc_onenand_data->flags, freq); -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0024-ARM-OMAP2-Detect-incorrectly-aligned-GPMC-base-addre.patch b/patches/gpmc/0024-ARM-OMAP2-Detect-incorrectly-aligned-GPMC-base-addre.patch index ca251aed..02fe0a2b 100644 --- a/patches/gpmc/0024-ARM-OMAP2-Detect-incorrectly-aligned-GPMC-base-addre.patch +++ b/patches/gpmc/0024-ARM-OMAP2-Detect-incorrectly-aligned-GPMC-base-addre.patch @@ -1,4 +1,4 @@ -From 48514d6d6e2b4c55d9d4648d6975ea925e8874d2 Mon Sep 17 00:00:00 2001 +From 59816627f55502dcae88ddd01c80966bf7391e0e Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Wed, 6 Mar 2013 12:00:10 -0600 Subject: [PATCH 24/39] ARM: OMAP2+: Detect incorrectly aligned GPMC base @@ -15,7 +15,7 @@ Reported-by: Mark Jackson Signed-off-by: Jon Hunter Tested-by: Ezequiel Garcia --- - arch/arm/mach-omap2/gpmc.c | 22 +++++++++++++++++++--- + arch/arm/mach-omap2/gpmc.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c @@ -77,5 +77,5 @@ index 80dd023..9fed934 100644 gpmc_cs_set_reserved(cs, 1); out: -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0025-ARM-OMAP2-Remove-unnecesssary-GPMC-definitions-and-v.patch b/patches/gpmc/0025-ARM-OMAP2-Remove-unnecesssary-GPMC-definitions-and-v.patch index 74df7830..34165f94 100644 --- a/patches/gpmc/0025-ARM-OMAP2-Remove-unnecesssary-GPMC-definitions-and-v.patch +++ b/patches/gpmc/0025-ARM-OMAP2-Remove-unnecesssary-GPMC-definitions-and-v.patch @@ -1,4 +1,4 @@ -From 66abe2ff013519d98a2f764ab5e820b645fc56a4 Mon Sep 17 00:00:00 2001 +From c4ee6c899faed72ca6e92c53e2d4a50da878337a Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Wed, 6 Mar 2013 14:12:59 -0600 Subject: [PATCH 25/39] ARM: OMAP2+: Remove unnecesssary GPMC definitions and @@ -12,7 +12,7 @@ definitions and clean-up the comment as well. Signed-off-by: Jon Hunter Tested-by: Ezequiel Garcia --- - arch/arm/mach-omap2/gpmc.c | 15 +++++---------- + arch/arm/mach-omap2/gpmc.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c @@ -52,5 +52,5 @@ index 9fed934..3f87752 100644 /* Reserve all regions that has been set up by bootloader */ -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0026-ARM-OMAP2-Allow-GPMC-probe-to-complete-even-if-CS-ma.patch b/patches/gpmc/0026-ARM-OMAP2-Allow-GPMC-probe-to-complete-even-if-CS-ma.patch index 64be5859..724d3822 100644 --- a/patches/gpmc/0026-ARM-OMAP2-Allow-GPMC-probe-to-complete-even-if-CS-ma.patch +++ b/patches/gpmc/0026-ARM-OMAP2-Allow-GPMC-probe-to-complete-even-if-CS-ma.patch @@ -1,4 +1,4 @@ -From 5e735aa7ed20c965bd0905a4f4c9a11bb3ce4231 Mon Sep 17 00:00:00 2001 +From 01e968baafc2838c84e48fb1eab8920998ca0bbe Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Wed, 6 Mar 2013 14:36:47 -0600 Subject: [PATCH 26/39] ARM: OMAP2+: Allow GPMC probe to complete even if CS @@ -22,7 +22,7 @@ then it will be. Signed-off-by: Jon Hunter Tested-by: Ezequiel Garcia --- - arch/arm/mach-omap2/gpmc.c | 25 ++++++++----------------- + arch/arm/mach-omap2/gpmc.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c @@ -79,5 +79,5 @@ index 3f87752..5482d23 100644 if (IS_ERR_VALUE(gpmc_setup_irq())) dev_warn(gpmc_dev, "gpmc_setup_irq failed\n"); -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0027-ARM-OMAP2-return-ENODEV-if-GPMC-child-device-creatio.patch b/patches/gpmc/0027-ARM-OMAP2-return-ENODEV-if-GPMC-child-device-creatio.patch index 4f01199b..a318ec85 100644 --- a/patches/gpmc/0027-ARM-OMAP2-return-ENODEV-if-GPMC-child-device-creatio.patch +++ b/patches/gpmc/0027-ARM-OMAP2-return-ENODEV-if-GPMC-child-device-creatio.patch @@ -1,4 +1,4 @@ -From 50c6b3b5c1fb1318250cdc3fb561f57aa0fce744 Mon Sep 17 00:00:00 2001 +From 43f115bc49288bbffebcb4fe4ebfe74b5d44aeab Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Thu, 14 Mar 2013 16:09:20 +0100 Subject: [PATCH 27/39] ARM: OMAP2+: return -ENODEV if GPMC child device @@ -18,7 +18,7 @@ Signed-off-by: Javier Martinez Canillas Signed-off-by: Jon Hunter Tested-by: Ezequiel Garcia --- - arch/arm/mach-omap2/gpmc.c | 1 + + arch/arm/mach-omap2/gpmc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c @@ -34,5 +34,5 @@ index 5482d23..e20c6d0 100644 err: gpmc_cs_free(cs); -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0028-ARM-OMAP2-rename-gpmc_probe_nor_child-to-gpmc_probe_.patch b/patches/gpmc/0028-ARM-OMAP2-rename-gpmc_probe_nor_child-to-gpmc_probe_.patch index ea3418cf..704deee8 100644 --- a/patches/gpmc/0028-ARM-OMAP2-rename-gpmc_probe_nor_child-to-gpmc_probe_.patch +++ b/patches/gpmc/0028-ARM-OMAP2-rename-gpmc_probe_nor_child-to-gpmc_probe_.patch @@ -1,4 +1,4 @@ -From f9e36ae42f5ff5b7cd3a42c8bbd984b2abbcbd39 Mon Sep 17 00:00:00 2001 +From 56d9c860be07ff2b26e5c05ecfc73a18d118ee0a Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Thu, 14 Mar 2013 16:09:21 +0100 Subject: [PATCH 28/39] ARM: OMAP2+: rename gpmc_probe_nor_child() to @@ -16,7 +16,7 @@ setup so by making this function generic it can be used for those too. Signed-off-by: Javier Martinez Canillas Signed-off-by: Jon Hunter --- - arch/arm/mach-omap2/gpmc.c | 10 +++++----- + arch/arm/mach-omap2/gpmc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c @@ -52,5 +52,5 @@ index e20c6d0..780cb12 100644 of_node_put(child); return ret; -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0029-ARM-OMAP2-Add-GPMC-DT-support-for-Ethernet-child-nod.patch b/patches/gpmc/0029-ARM-OMAP2-Add-GPMC-DT-support-for-Ethernet-child-nod.patch index b9ea0a9b..bffa8305 100644 --- a/patches/gpmc/0029-ARM-OMAP2-Add-GPMC-DT-support-for-Ethernet-child-nod.patch +++ b/patches/gpmc/0029-ARM-OMAP2-Add-GPMC-DT-support-for-Ethernet-child-nod.patch @@ -1,4 +1,4 @@ -From 183f9ed7e1f23c2c74cbcb7e2393890c9825ee09 Mon Sep 17 00:00:00 2001 +From 822ebccd13d4aeb0405be2c8e261e8430393bd58 Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Thu, 14 Mar 2013 22:54:11 +0100 Subject: [PATCH 29/39] ARM: OMAP2+: Add GPMC DT support for Ethernet child @@ -15,8 +15,8 @@ child device node. Signed-off-by: Javier Martinez Canillas Signed-off-by: Jon Hunter --- - Documentation/devicetree/bindings/net/gpmc-eth.txt | 97 ++++++++++++++++++++ - arch/arm/mach-omap2/gpmc.c | 8 ++ + Documentation/devicetree/bindings/net/gpmc-eth.txt | 97 ++++++++++++++++++++++ + arch/arm/mach-omap2/gpmc.c | 8 ++ 2 files changed, 105 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/gpmc-eth.txt @@ -143,5 +143,5 @@ index 780cb12..52c32c9 100644 } #else -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0030-mtd-omap-nand-pass-device_node-in-platform-data.patch b/patches/gpmc/0030-mtd-omap-nand-pass-device_node-in-platform-data.patch index 2200012d..54ed155c 100644 --- a/patches/gpmc/0030-mtd-omap-nand-pass-device_node-in-platform-data.patch +++ b/patches/gpmc/0030-mtd-omap-nand-pass-device_node-in-platform-data.patch @@ -1,4 +1,4 @@ -From ee75cf019423c3dd034b2a2ccf707dc6092497f6 Mon Sep 17 00:00:00 2001 +From b14853f4e7ea2927b6f5db583becab19b07252f0 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Fri, 14 Dec 2012 11:36:41 +0100 Subject: [PATCH 30/39] mtd: omap-nand: pass device_node in platform data @@ -15,8 +15,8 @@ Acked-by: Grant Likely Acked-by: Artem Bityutskiy Signed-off-by: Tony Lindgren --- - drivers/mtd/nand/omap2.c | 4 +++- - include/linux/platform_data/mtd-nand-omap2.h | 4 +++- + drivers/mtd/nand/omap2.c | 4 +++- + include/linux/platform_data/mtd-nand-omap2.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c @@ -56,5 +56,5 @@ index 24d32ca..6bf9ef4 100644 +}; #endif -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0031-ARM-OMAP-gpmc-nand-drop-__init-annotation.patch b/patches/gpmc/0031-ARM-OMAP-gpmc-nand-drop-__init-annotation.patch index 36175d12..a545de6d 100644 --- a/patches/gpmc/0031-ARM-OMAP-gpmc-nand-drop-__init-annotation.patch +++ b/patches/gpmc/0031-ARM-OMAP-gpmc-nand-drop-__init-annotation.patch @@ -1,4 +1,4 @@ -From 21c89e55c75b63befb313061762b4dcc96b29bc0 Mon Sep 17 00:00:00 2001 +From 89a45b06936c9c774485f3802b80985fe037fa0a Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Fri, 14 Dec 2012 11:36:42 +0100 Subject: [PATCH 31/39] ARM: OMAP: gpmc-nand: drop __init annotation @@ -11,7 +11,7 @@ Signed-off-by: Daniel Mack Acked-by: Grant Likely Signed-off-by: Tony Lindgren --- - arch/arm/mach-omap2/gpmc-nand.c | 6 +++--- + arch/arm/mach-omap2/gpmc-nand.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c @@ -39,5 +39,5 @@ index 026785c..b966784 100644 int err = 0; struct gpmc_settings s; -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0032-ARM-OMAP-gpmc-enable-hwecc-for-AM33xx-SoCs.patch b/patches/gpmc/0032-ARM-OMAP-gpmc-enable-hwecc-for-AM33xx-SoCs.patch index 7a52413f..aa29cc57 100644 --- a/patches/gpmc/0032-ARM-OMAP-gpmc-enable-hwecc-for-AM33xx-SoCs.patch +++ b/patches/gpmc/0032-ARM-OMAP-gpmc-enable-hwecc-for-AM33xx-SoCs.patch @@ -1,4 +1,4 @@ -From 30b31c77d0f3ad2a18879fb576a4f252aebb731f Mon Sep 17 00:00:00 2001 +From 2e8de37d2a68d7e6b2ac5bc9f902ff4530072a36 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Fri, 14 Dec 2012 11:36:43 +0100 Subject: [PATCH 32/39] ARM: OMAP: gpmc: enable hwecc for AM33xx SoCs @@ -10,7 +10,7 @@ Signed-off-by: Daniel Mack Acked-by: Grant Likely Signed-off-by: Tony Lindgren --- - arch/arm/mach-omap2/gpmc-nand.c | 9 +++++---- + arch/arm/mach-omap2/gpmc-nand.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c @@ -41,5 +41,5 @@ index b966784..d9c2719 100644 return 0; } -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0033-ARM-OMAP-gpmc-don-t-create-devices-from-initcall-on-.patch b/patches/gpmc/0033-ARM-OMAP-gpmc-don-t-create-devices-from-initcall-on-.patch index ad4a304f..3e4c5f63 100644 --- a/patches/gpmc/0033-ARM-OMAP-gpmc-don-t-create-devices-from-initcall-on-.patch +++ b/patches/gpmc/0033-ARM-OMAP-gpmc-don-t-create-devices-from-initcall-on-.patch @@ -1,4 +1,4 @@ -From cdda7dce24333cf5b89776127f919dc9e4765ebf Mon Sep 17 00:00:00 2001 +From 99ac6561e7c7434ba2f2b037cee24ca15a3477b5 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Fri, 14 Dec 2012 11:36:40 +0100 Subject: [PATCH 33/39] ARM: OMAP: gpmc: don't create devices from initcall on @@ -11,7 +11,7 @@ Signed-off-by: Daniel Mack Acked-by: Grant Likely Signed-off-by: Tony Lindgren --- - arch/arm/mach-omap2/gpmc.c | 7 +++++++ + arch/arm/mach-omap2/gpmc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c @@ -33,5 +33,5 @@ index 52c32c9..de43b61 100644 if (!oh) { pr_err("Could not look up %s\n", oh_name); -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0034-ARM-OMAP2-gpmc-onenand-drop-__init-annotation.patch b/patches/gpmc/0034-ARM-OMAP2-gpmc-onenand-drop-__init-annotation.patch index f0bd6d52..6ade4c36 100644 --- a/patches/gpmc/0034-ARM-OMAP2-gpmc-onenand-drop-__init-annotation.patch +++ b/patches/gpmc/0034-ARM-OMAP2-gpmc-onenand-drop-__init-annotation.patch @@ -1,4 +1,4 @@ -From 7a3330e195a8ad6d5195514d01db719aca0402fb Mon Sep 17 00:00:00 2001 +From 1eee10b759882fe8306df437304610ab3fe2a43e Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Fri, 25 Jan 2013 09:23:10 -0300 Subject: [PATCH 34/39] ARM: OMAP2+: gpmc-onenand: drop __init annotation @@ -9,7 +9,7 @@ so drop the __init annotation, in order to prevent section mismatches. Signed-off-by: Ezequiel Garcia Signed-off-by: Tony Lindgren --- - arch/arm/mach-omap2/gpmc-onenand.c | 2 +- + arch/arm/mach-omap2/gpmc-onenand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c @@ -26,5 +26,5 @@ index 1a2b84e..3df9230 100644 int err; struct device *dev = &gpmc_onenand_device.dev; -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0035-gpmc-Add-missing-gpmc-includes.patch b/patches/gpmc/0035-gpmc-Add-missing-gpmc-includes.patch index 6011459d..93215664 100644 --- a/patches/gpmc/0035-gpmc-Add-missing-gpmc-includes.patch +++ b/patches/gpmc/0035-gpmc-Add-missing-gpmc-includes.patch @@ -1,11 +1,11 @@ -From 4663a0c4d3d6cbc324734e8a700b7f1e69d705e7 Mon Sep 17 00:00:00 2001 +From 3f550a3470267942f5774f95968943525fc33bc0 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Tue, 23 Apr 2013 20:14:46 +0300 Subject: [PATCH 35/39] gpmc: Add missing gpmc includes. Signed-off-by: Pantelis Antoniou --- - arch/arm/mach-omap2/gpmc.c | 2 ++ + arch/arm/mach-omap2/gpmc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c @@ -22,5 +22,5 @@ index de43b61..6f9fb7a 100644 #define DEVICE_NAME "omap-gpmc" -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0036-mtd-omap-onenand-pass-device_node-in-platform-data.patch b/patches/gpmc/0036-mtd-omap-onenand-pass-device_node-in-platform-data.patch index be646a6a..0b7f0865 100644 --- a/patches/gpmc/0036-mtd-omap-onenand-pass-device_node-in-platform-data.patch +++ b/patches/gpmc/0036-mtd-omap-onenand-pass-device_node-in-platform-data.patch @@ -1,4 +1,4 @@ -From eeeeeb60ece730ce2f5fbc6beb42b2d1497f0b25 Mon Sep 17 00:00:00 2001 +From 85e0cbe5b40785dd3be222518f0b5b8f4b251006 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Fri, 25 Jan 2013 09:23:09 -0300 Subject: [PATCH 36/39] mtd: omap-onenand: pass device_node in platform data @@ -14,8 +14,8 @@ Acked-by: Artem Bityutskiy Signed-off-by: Ezequiel Garcia Signed-off-by: Tony Lindgren --- - drivers/mtd/onenand/omap2.c | 4 +++- - include/linux/platform_data/mtd-onenand-omap2.h | 3 +++ + drivers/mtd/onenand/omap2.c | 4 +++- + include/linux/platform_data/mtd-onenand-omap2.h | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c @@ -54,5 +54,5 @@ index 685af7e..e9a9fb1 100644 }; #endif -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0037-ARM-OMAP2-Convert-ONENAND-to-use-gpmc_cs_program_set.patch b/patches/gpmc/0037-ARM-OMAP2-Convert-ONENAND-to-use-gpmc_cs_program_set.patch index daecbce8..66a7f76e 100644 --- a/patches/gpmc/0037-ARM-OMAP2-Convert-ONENAND-to-use-gpmc_cs_program_set.patch +++ b/patches/gpmc/0037-ARM-OMAP2-Convert-ONENAND-to-use-gpmc_cs_program_set.patch @@ -1,4 +1,4 @@ -From 5707807c3ad8b5d6335b222743f84a609ccb5b5d Mon Sep 17 00:00:00 2001 +From 47e8d06473b111aafb8bd0d80284b4b7f83ea820 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Thu, 21 Feb 2013 12:42:22 -0600 Subject: [PATCH 37/39] ARM: OMAP2+: Convert ONENAND to use @@ -14,7 +14,7 @@ Tested-by: Ezequiel Garcia Conflicts: arch/arm/mach-omap2/gpmc-onenand.c --- - arch/arm/mach-omap2/gpmc-onenand.c | 8 ++++---- + arch/arm/mach-omap2/gpmc-onenand.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c @@ -44,5 +44,5 @@ index 3df9230..64b5a83 100644 set_onenand_cfg(onenand_base); -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0038-omap-gpmc-Various-driver-fixes.patch b/patches/gpmc/0038-omap-gpmc-Various-driver-fixes.patch index 21a740f2..caef1f7e 100644 --- a/patches/gpmc/0038-omap-gpmc-Various-driver-fixes.patch +++ b/patches/gpmc/0038-omap-gpmc-Various-driver-fixes.patch @@ -1,4 +1,4 @@ -From 1111f67088fe5973b5b3c9dde612c24cd53054f6 Mon Sep 17 00:00:00 2001 +From 9488a505949acd3c885a813a5d9f3a49c9ce391c Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Fri, 26 Apr 2013 01:21:49 +0300 Subject: [PATCH 38/39] omap: gpmc: Various driver fixes @@ -12,8 +12,8 @@ Various fixes: Signed-off-by: Pantelis Antoniou --- - arch/arm/mach-omap2/gpmc.c | 94 +++++++++++++++++++++++--------------------- - arch/arm/mach-omap2/gpmc.h | 1 + + arch/arm/mach-omap2/gpmc.c | 94 ++++++++++++++++++++++++---------------------- + arch/arm/mach-omap2/gpmc.h | 1 + 2 files changed, 51 insertions(+), 44 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c @@ -203,5 +203,5 @@ index 707f6d5..b329bb8 100644 extern int gpmc_calc_timings(struct gpmc_timings *gpmc_t, -- -1.7.9.5 +1.9.0 diff --git a/patches/gpmc/0039-gpmc-Add-DT-node-for-gpmc-on-am33xx.patch b/patches/gpmc/0039-gpmc-Add-DT-node-for-gpmc-on-am33xx.patch index 9cb0dea3..e54cca41 100644 --- a/patches/gpmc/0039-gpmc-Add-DT-node-for-gpmc-on-am33xx.patch +++ b/patches/gpmc/0039-gpmc-Add-DT-node-for-gpmc-on-am33xx.patch @@ -1,4 +1,4 @@ -From 249b24927902cd1032d2da4d7e138d2decda5768 Mon Sep 17 00:00:00 2001 +From 2d75d14504f2d92e0c28dfcc603929ae6d7e3e8b Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 1 May 2013 18:38:25 +0300 Subject: [PATCH 39/39] gpmc: Add DT node for gpmc on am33xx @@ -7,14 +7,14 @@ Add am33xx gpmc device. Signed-off-by: Pantelis Antoniou --- - arch/arm/boot/dts/am33xx.dtsi | 13 +++++++++++++ + arch/arm/boot/dts/am33xx.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi -index 6c24c9b..76fa03b 100644 +index 84dabd2..6f8e001 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi -@@ -399,6 +399,19 @@ +@@ -404,6 +404,19 @@ }; @@ -35,5 +35,5 @@ index 6c24c9b..76fa03b 100644 compatible = "nop-xceiv-usb"; }; -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0001-video-Add-generic-HDMI-infoframe-helpers.patch b/patches/hdmi/0001-video-Add-generic-HDMI-infoframe-helpers.patch index f88e5a92..cfc8bd26 100644 --- a/patches/hdmi/0001-video-Add-generic-HDMI-infoframe-helpers.patch +++ b/patches/hdmi/0001-video-Add-generic-HDMI-infoframe-helpers.patch @@ -1,16 +1,16 @@ -From 78a0962d68db5b65c50f589d01bec67c223ed7a5 Mon Sep 17 00:00:00 2001 +From a3c2a9cd3bf4c69f1fe0a91b6fdd72e74dec4704 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Fri, 22 Feb 2013 07:03:26 +0000 -Subject: [PATCH 01/22] video: Add generic HDMI infoframe helpers +Subject: [PATCH 01/27] video: Add generic HDMI infoframe helpers Add generic helpers to pack HDMI infoframes into binary buffers. Signed-off-by: Thierry Reding --- - drivers/video/Kconfig | 3 + - drivers/video/Makefile | 1 + - drivers/video/hdmi.c | 308 ++++++++++++++++++++++++++++++++++++++++++++++++ - include/linux/hdmi.h | 231 ++++++++++++++++++++++++++++++++++++ + drivers/video/Kconfig | 3 + + drivers/video/Makefile | 1 + + drivers/video/hdmi.c | 308 +++++++++++++++++++++++++++++++++++++++++++++++++ + include/linux/hdmi.h | 231 +++++++++++++++++++++++++++++++++++++ 4 files changed, 543 insertions(+) create mode 100644 drivers/video/hdmi.c create mode 100644 include/linux/hdmi.h @@ -593,5 +593,5 @@ index 0000000..3b58944 + +#endif /* _DRM_HDMI_H */ -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0002-BeagleBone-Black-TDA998x-Initial-HDMI-Audio-support.patch b/patches/hdmi/0002-BeagleBone-Black-TDA998x-Initial-HDMI-Audio-support.patch index 33e2c3d3..9d727dfa 100644 --- a/patches/hdmi/0002-BeagleBone-Black-TDA998x-Initial-HDMI-Audio-support.patch +++ b/patches/hdmi/0002-BeagleBone-Black-TDA998x-Initial-HDMI-Audio-support.patch @@ -1,7 +1,7 @@ -From 4896c52400a3a009cf8e325e6b092d34252b1e49 Mon Sep 17 00:00:00 2001 +From abeace3181516f7fb6e9ab915724bae739d1888e Mon Sep 17 00:00:00 2001 From: Darren Etheridge Date: Fri, 19 Apr 2013 12:37:37 -0500 -Subject: [PATCH 02/22] BeagleBone Black TDA998x Initial HDMI Audio support +Subject: [PATCH 02/27] BeagleBone Black TDA998x Initial HDMI Audio support commit 5e166deffcfe438f57ec334e288e068e42fb05bb Author: Darren Etheridge @@ -114,14 +114,14 @@ Date: Fri Apr 5 10:44:03 2013 -0500 that is enabled by setting gpio1_27 high. Create a new machine in Davinci audio driver for BeagleBone Black. --- - drivers/gpu/drm/i2c/Kconfig | 1 + - drivers/gpu/drm/i2c/Makefile | 2 +- - drivers/gpu/drm/i2c/tda998x_audio_drv.c | 76 ++++++++++ - drivers/gpu/drm/i2c/tda998x_drv.c | 205 ++++++++++++++++++++++++++- - firmware/capes/cape-boneblack-hdmi-00A0.dts | 52 +++++++ - sound/soc/davinci/davinci-evm.c | 50 ++++++- - sound/soc/davinci/davinci-mcasp.c | 15 +- - 7 files changed, 385 insertions(+), 16 deletions(-) + drivers/gpu/drm/i2c/Kconfig | 1 + + drivers/gpu/drm/i2c/Makefile | 2 +- + drivers/gpu/drm/i2c/tda998x_audio_drv.c | 76 +++++++++++ + drivers/gpu/drm/i2c/tda998x_drv.c | 202 +++++++++++++++++++++++++++- + firmware/capes/cape-boneblack-hdmi-00A0.dts | 52 +++++++ + sound/soc/davinci/davinci-evm.c | 50 ++++++- + sound/soc/davinci/davinci-mcasp.c | 15 ++- + 7 files changed, 383 insertions(+), 15 deletions(-) create mode 100644 drivers/gpu/drm/i2c/tda998x_audio_drv.c diff --git a/drivers/gpu/drm/i2c/Kconfig b/drivers/gpu/drm/i2c/Kconfig @@ -230,7 +230,7 @@ index 0000000..c13e25b +MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:" DRV_NAME); diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c -index e68b58a..e3e9101 100644 +index e68b58a..a03bc32 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -23,7 +23,7 @@ @@ -330,7 +330,7 @@ index e68b58a..e3e9101 100644 + } + i2cpacket[0] = REG2ADDR(reg); + memcpy(&i2cpacket[1], buf, cnt); -+ ++ + set_page(encoder, reg); + + ret = i2c_master_send(client, i2cpacket, cnt+1); @@ -406,8 +406,8 @@ index e68b58a..e3e9101 100644 + + reg_write_range(encoder, REG_AVI_IF, buffer, len); + -+ /* -+ * enable AVI Infoframe output in DIP_IF Register, but toggle it ++ /* ++ * enable AVI Infoframe output in DIP_IF Register, but toggle it + * so that the hardware acknowledges that the packet data might have + * changed + */ @@ -417,7 +417,7 @@ index e68b58a..e3e9101 100644 +} + +/* loopup table for CEA values to VIDFORMAT values taken from NXP datasheet */ -+static char cea_to_nxp_mode[32] = {-1, 0, 1, 1, 2, 3, 4, 4, 5, 5, -1, -1, ++static char cea_to_nxp_mode[32] = {-1, 0, 1, 1, 2, 3, 4, 4, 5, 5, -1, -1, + -1, -1, -1, -1, 6, 7, 7, 8, 9, 10, 10, + 11, 11, -1, -1, -1, -1, -1, -1, 12}; + @@ -455,14 +455,7 @@ index e68b58a..e3e9101 100644 reg_set(encoder, REG_TBG_CNTRL_1, TBG_CNTRL_1_DWIN_DIS); reg_clear(encoder, REG_TX33, TX33_HDMI); -@@ -605,14 +742,69 @@ tda998x_encoder_mode_set(struct drm_encoder *encoder, - reg = TBG_CNTRL_1_VHX_EXT_DE | - TBG_CNTRL_1_VHX_EXT_HS | - TBG_CNTRL_1_VHX_EXT_VS | -- TBG_CNTRL_1_DWIN_DIS | /* HDCP off */ -+ TBG_CNTRL_1_DWIN_DIS | /* HDCP off */ - TBG_CNTRL_1_VH_TGL_2; - if (mode->flags & (DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC)) +@@ -611,8 +748,63 @@ tda998x_encoder_mode_set(struct drm_encoder *encoder, reg |= TBG_CNTRL_1_VH_TGL_0; reg_set(encoder, REG_TBG_CNTRL_1, reg); @@ -477,7 +470,7 @@ index e68b58a..e3e9101 100644 + goto out; + } + dev_info(encoder->dev->dev, "Connected to an HDMI monitor with cea mode %d", vidformat); -+ ++ + /* this is an HDMI monitor, so set things up a bit differently */ + reg_write(encoder, REG_TBG_CNTRL_1, 0); + reg_write(encoder, REG_VIDFORMAT, vidformat); @@ -526,13 +519,8 @@ index e68b58a..e3e9101 100644 } static enum drm_connector_status -@@ -904,3 +1096,4 @@ MODULE_LICENSE("GPL"); - - module_init(tda998x_init); - module_exit(tda998x_exit); -+ diff --git a/firmware/capes/cape-boneblack-hdmi-00A0.dts b/firmware/capes/cape-boneblack-hdmi-00A0.dts -index ee36d0e..e5f714a 100644 +index cb45533..6d5307f 100644 --- a/firmware/capes/cape-boneblack-hdmi-00A0.dts +++ b/firmware/capes/cape-boneblack-hdmi-00A0.dts @@ -46,6 +46,16 @@ @@ -544,7 +532,7 @@ index ee36d0e..e5f714a 100644 + pinctrl-single,pins = < + 0x1ac 0x30 /* mcasp0_ahclkx, MODE0 | INPUT */ + 0x19c 0x02 /* mcasp0_ahclkr, */ -+ 0x194 0x10 /* mcasp0_fsx, MODE0 | OUTPUT */ ++ 0x194 0x10 /* mcasp0_fsx, MODE0 | OUTPUT */ + 0x190 0x00 /* mcasp0_aclkr.mcasp0_aclkx, MODE0 | OUTPUT_PULLDOWN */ + 0x1a8 0x1f /* mcasp0_axr1 GPIO1_27 | OUTPUT | PULLUP */ + >; @@ -607,7 +595,7 @@ index ee36d0e..e5f714a 100644 + }; diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c -index 349db80..7a7fc47 100644 +index 349db80..bbae516 100644 --- a/sound/soc/davinci/davinci-evm.c +++ b/sound/soc/davinci/davinci-evm.c @@ -30,6 +30,9 @@ @@ -654,7 +642,7 @@ index 349db80..7a7fc47 100644 int ret = 0; machine_ver = (u32)match->data; -@@ -363,12 +372,37 @@ static int davinci_evm_probe(struct platform_device *pdev) +@@ -363,13 +372,38 @@ static int davinci_evm_probe(struct platform_device *pdev) evm_dai.stream_name = "CQ93"; evm_dai.codec_dai_name = "cq93vc-hifi"; break; @@ -668,10 +656,10 @@ index 349db80..7a7fc47 100644 + evm_dai.stream_name = "HDMI"; + evm_dai.codec_dai_name = "nxp-hdmi-hifi"; + -+ /* -+ * Move GPIO handling out of the probe, if probe gets ++ /* ++ * Move GPIO handling out of the probe, if probe gets + * deferred, the gpio will have been claimed on previous -+ * probe and will fail on the second and susequent probes ++ * probe and will fail on the second and susequent probes + */ + clk_gpio = of_get_named_gpio(np, "mcasp_clock_enable", 0); + if (clk_gpio < 0) { @@ -687,12 +675,13 @@ index 349db80..7a7fc47 100644 + gpio_set_value(clk_gpio, 1); + evm_dai.dai_fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_IB_NF; + break; -+ ++ } -+ ++ evm_dai.codec_of_node = of_parse_phandle(np, "ti,audio-codec", 0); if (!evm_dai.codec_of_node) + return -EINVAL; @@ -387,9 +421,9 @@ static int davinci_evm_probe(struct platform_device *pdev) return ret; @@ -701,7 +690,7 @@ index 349db80..7a7fc47 100644 + if (ret) { dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); - -+ } ++ } return ret; } @@ -784,5 +773,5 @@ index ea292f6..4c700df 100644 /* bit stream is MSB first with no delay */ /* DSP_B mode */ -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0003-Clean-up-some-formating-and-debug-in-Davinci-MCASP-d.patch b/patches/hdmi/0003-Clean-up-some-formating-and-debug-in-Davinci-MCASP-d.patch index a29fec8b..2b5b0720 100644 --- a/patches/hdmi/0003-Clean-up-some-formating-and-debug-in-Davinci-MCASP-d.patch +++ b/patches/hdmi/0003-Clean-up-some-formating-and-debug-in-Davinci-MCASP-d.patch @@ -1,15 +1,15 @@ -From 8871fbdf1590a2deaa2d8f8db323acbdbbeb5661 Mon Sep 17 00:00:00 2001 +From 0cb27818859507e56e464ac788974fe98655be67 Mon Sep 17 00:00:00 2001 From: Darren Etheridge Date: Fri, 19 Apr 2013 13:18:14 -0500 -Subject: [PATCH 03/22] Clean up some formating and debug in Davinci MCASP +Subject: [PATCH 03/27] Clean up some formating and debug in Davinci MCASP driver --- - sound/soc/davinci/davinci-mcasp.c | 15 +++++---------- + sound/soc/davinci/davinci-mcasp.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c -index 4c700df..bef4e72 100644 +index 4c700df..a89ece3 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c @@ -497,11 +497,10 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai, @@ -22,9 +22,9 @@ index 4c700df..bef4e72 100644 - mcasp_set_bits(base + DAVINCI_MCASP_AHCLKXCTL_REG, AHCLKXDIV(0)); - mcasp_clr_bits(base + DAVINCI_MCASP_AHCLKXCTL_REG, AHCLKXE); + /* codec is clock and frame slave */ -+ mcasp_set_bits(base + DAVINCI_MCASP_ACLKXCTL_REG, ACLKXE | ACLKXDIV(7)); -+ mcasp_set_bits(base + DAVINCI_MCASP_AHCLKXCTL_REG, AHCLKXDIV(0)); -+ mcasp_clr_bits(base + DAVINCI_MCASP_AHCLKXCTL_REG, AHCLKXE); ++ mcasp_set_bits(base + DAVINCI_MCASP_ACLKXCTL_REG, ACLKXE | ACLKXDIV(7)); ++ mcasp_set_bits(base + DAVINCI_MCASP_AHCLKXCTL_REG, AHCLKXDIV(0)); ++ mcasp_clr_bits(base + DAVINCI_MCASP_AHCLKXCTL_REG, AHCLKXE); mcasp_set_bits(base + DAVINCI_MCASP_TXFMCTL_REG, AFSXE); mcasp_set_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRE); @@ -51,10 +51,10 @@ index 4c700df..bef4e72 100644 /* DSP_B mode */ - printk("davinci hw_params _ PLAYBACK modified\n"); - mcasp_clr_bits(dev->base + DAVINCI_MCASP_AHCLKXCTL_REG, AHCLKXE); -+ mcasp_clr_bits(dev->base + DAVINCI_MCASP_AHCLKXCTL_REG, AHCLKXE); ++ mcasp_clr_bits(dev->base + DAVINCI_MCASP_AHCLKXCTL_REG, AHCLKXE); mcasp_set_reg(dev->base + DAVINCI_MCASP_TXTDM_REG, mask); mcasp_set_bits(dev->base + DAVINCI_MCASP_TXFMT_REG, TXORD); -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0004-tilcdc-Prune-modes-that-can-t-support-audio.patch b/patches/hdmi/0004-tilcdc-Prune-modes-that-can-t-support-audio.patch index a65b640b..88194284 100644 --- a/patches/hdmi/0004-tilcdc-Prune-modes-that-can-t-support-audio.patch +++ b/patches/hdmi/0004-tilcdc-Prune-modes-that-can-t-support-audio.patch @@ -1,23 +1,23 @@ -From 9702e1339f8490bbd816e01aaacbc72b41bdaff8 Mon Sep 17 00:00:00 2001 +From 3362b0add94f61e019287ab033c1f0fc81817fc6 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Fri, 3 May 2013 16:11:53 +0300 -Subject: [PATCH 04/22] tilcdc: Prune modes that can't support audio. +Subject: [PATCH 04/27] tilcdc: Prune modes that can't support audio. If the connector supports audio, prune all the display modes that don't support it. Signed-off-by: Pantelis Antoniou --- - drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 73 +++++++++++++++++++------------- - drivers/gpu/drm/tilcdc/tilcdc_drv.c | 9 +++- - drivers/gpu/drm/tilcdc/tilcdc_drv.h | 3 +- - drivers/gpu/drm/tilcdc/tilcdc_panel.c | 2 +- - drivers/gpu/drm/tilcdc/tilcdc_slave.c | 6 ++- - drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 2 +- + drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 73 ++++++++++++++++++++-------------- + drivers/gpu/drm/tilcdc/tilcdc_drv.c | 9 ++++- + drivers/gpu/drm/tilcdc/tilcdc_drv.h | 3 +- + drivers/gpu/drm/tilcdc/tilcdc_panel.c | 2 +- + drivers/gpu/drm/tilcdc/tilcdc_slave.c | 6 ++- + drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 2 +- 6 files changed, 59 insertions(+), 36 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c -index 69675e6..afbaa6f 100644 +index 5d24e0a..07e93ce 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c @@ -241,7 +241,7 @@ static int tilcdc_crtc_mode_set(struct drm_crtc *crtc, @@ -36,7 +36,7 @@ index 69675e6..afbaa6f 100644 - int rb_check) + int rb_check, int audio, struct edid *edid) { - struct tilcdc_drm_private *priv = crtc->dev->dev_private; + struct tilcdc_drm_private *priv = crtc->dev->dev_private; unsigned int bandwidth; uint32_t hbp, hfp, hsw, vbp, vfp, vsw; + int has_audio, is_cea_mode; @@ -50,7 +50,7 @@ index 69675e6..afbaa6f 100644 + /* set if there's audio capability */ + has_audio = edid && drm_detect_monitor_audio(edid); -- DBG("Processing mode %dx%d@%d with pixel clock %d", +- DBG("Processing mode %dx%d@%d with pixel clock %d", - mode->hdisplay, mode->vdisplay, drm_mode_vrefresh(mode), mode->clock); + /* set if it's a cea mode */ + is_cea_mode = drm_match_cea_mode(mode) > 0; @@ -240,5 +240,5 @@ index 9d9796f..c71f955 100644 static struct drm_encoder *tfp410_connector_best_encoder( -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0005-Enable-output-of-correct-AVI-Infoframe-type-hdmi.patch b/patches/hdmi/0005-Enable-output-of-correct-AVI-Infoframe-type-hdmi.patch index b09f249e..3a454da0 100644 --- a/patches/hdmi/0005-Enable-output-of-correct-AVI-Infoframe-type-hdmi.patch +++ b/patches/hdmi/0005-Enable-output-of-correct-AVI-Infoframe-type-hdmi.patch @@ -1,14 +1,14 @@ -From 14edb13fc03d2bfbce27b87aee771ec718f67bb3 Mon Sep 17 00:00:00 2001 +From 8526d7cbfc1a045f5b0662dee4f13ad9550d2552 Mon Sep 17 00:00:00 2001 From: Darren Etheridge Date: Tue, 7 May 2013 21:22:27 -0500 -Subject: [PATCH 05/22] Enable output of correct AVI Infoframe type hdmi +Subject: [PATCH 05/27] Enable output of correct AVI Infoframe type hdmi --- - drivers/gpu/drm/i2c/tda998x_drv.c | 4 ++-- + drivers/gpu/drm/i2c/tda998x_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c -index e3e9101..7c64696 100644 +index a03bc32..03d58b1 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -593,9 +593,9 @@ tda998x_avi_infoframe_enable(struct drm_encoder *encoder, @@ -24,5 +24,5 @@ index e3e9101..7c64696 100644 /* loopup table for CEA values to VIDFORMAT values taken from NXP datasheet */ -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0006-drm-am335x-add-support-for-2048-lines-vertical.patch b/patches/hdmi/0006-drm-am335x-add-support-for-2048-lines-vertical.patch index 34af58ba..1f824e0e 100644 --- a/patches/hdmi/0006-drm-am335x-add-support-for-2048-lines-vertical.patch +++ b/patches/hdmi/0006-drm-am335x-add-support-for-2048-lines-vertical.patch @@ -1,19 +1,19 @@ -From 634b096066cf411793e97ccb1019ac6558544e12 Mon Sep 17 00:00:00 2001 +From 5f11d834e40720d3103012220e3df70c30420014 Mon Sep 17 00:00:00 2001 From: Darren Etheridge Date: Wed, 8 May 2013 16:15:40 -0500 -Subject: [PATCH 06/22] drm: am335x: add support for 2048 lines vertical +Subject: [PATCH 06/27] drm: am335x: add support for 2048 lines vertical Add extra mode that enables 1920x1080@24, this now works with 2048 lines vertical support and EMIF setting of INT_CONFIG optimized. --- - drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 15 ++++++++++++--- - drivers/gpu/drm/tilcdc/tilcdc_drv.h | 10 +++++++--- - drivers/gpu/drm/tilcdc/tilcdc_regs.h | 1 + + drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 15 ++++++++++++--- + drivers/gpu/drm/tilcdc/tilcdc_drv.h | 10 +++++++--- + drivers/gpu/drm/tilcdc/tilcdc_regs.h | 1 + 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c -index afbaa6f..1dbd927 100644 +index 07e93ce..b79f4a5 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c @@ -308,6 +308,7 @@ static int tilcdc_crtc_mode_set(struct drm_crtc *crtc, @@ -22,7 +22,7 @@ index afbaa6f..1dbd927 100644 reg |= (((mode->hdisplay >> 4) - 1) & 0x40) >> 3; + tilcdc_write(dev, LCDC_RASTER_TIMING_0_REG, reg); - + /* only the vertical sync width maps 0 as 1 so only subtract 1 from vsw */ @@ -317,6 +318,14 @@ static int tilcdc_crtc_mode_set(struct drm_crtc *crtc, (((vsw-1) & 0x3f) << 10); @@ -53,7 +53,7 @@ index afbaa6f..1dbd927 100644 DBG("Pruning mode, only support reduced blanking modes"); return MODE_BAD; diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h b/drivers/gpu/drm/tilcdc/tilcdc_drv.h -index db3c468..6b2c7ea 100644 +index db3c468..4315f78 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.h +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h @@ -37,9 +37,13 @@ @@ -64,10 +64,10 @@ index db3c468..6b2c7ea 100644 -/* This may need some tweaking, but want to allow at least 1280x1024@60 */ -#define TILCDC_DEFAULT_MAX_BANDWIDTH (1366*1024*60) +#define TILCDC_DEFAULT_MAX_WIDTH 2048 -+/* -+ * This may need some tweaking, but want to allow at least 1280x1024@60 -+ * with optimized DDR & EMIF settings tweaked 1920x1080@24 appears to -+ * be supportable ++/* ++ * This may need some tweaking, but want to allow at least 1280x1024@60 ++ * with optimized DDR & EMIF settings tweaked 1920x1080@24 appears to ++ * be supportable + */ +#define TILCDC_DEFAULT_MAX_BANDWIDTH (1920*1080*25) @@ -86,5 +86,5 @@ index 17fd1b4..1bf5e25 100644 /* LCDC Block */ #define LCDC_PID_REG 0x0 -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0007-drm-tda998x-Adding-extra-CEA-mode-for-1920x1080-24.patch b/patches/hdmi/0007-drm-tda998x-Adding-extra-CEA-mode-for-1920x1080-24.patch index a79ed86e..c4249cd6 100644 --- a/patches/hdmi/0007-drm-tda998x-Adding-extra-CEA-mode-for-1920x1080-24.patch +++ b/patches/hdmi/0007-drm-tda998x-Adding-extra-CEA-mode-for-1920x1080-24.patch @@ -1,14 +1,14 @@ -From 0ada35c2245249c998c17c146bd78920ac3cb6f6 Mon Sep 17 00:00:00 2001 +From a1f00c5cbe2959a812480dda501361d1a937cbe3 Mon Sep 17 00:00:00 2001 From: Darren Etheridge Date: Wed, 8 May 2013 16:39:28 -0500 -Subject: [PATCH 07/22] drm: tda998x Adding extra CEA mode for 1920x1080@24 +Subject: [PATCH 07/27] drm: tda998x Adding extra CEA mode for 1920x1080@24 --- - drivers/gpu/drm/i2c/tda998x_drv.c | 8 ++++---- + drivers/gpu/drm/i2c/tda998x_drv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c -index 7c64696..412ba4f 100644 +index 03d58b1..4432eea 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -598,14 +598,14 @@ tda998x_avi_infoframe_enable(struct drm_encoder *encoder, @@ -16,9 +16,9 @@ index 7c64696..412ba4f 100644 } -/* loopup table for CEA values to VIDFORMAT values taken from NXP datasheet */ --static char cea_to_nxp_mode[32] = {-1, 0, 1, 1, 2, 3, 4, 4, 5, 5, -1, -1, +-static char cea_to_nxp_mode[32] = {-1, 0, 1, 1, 2, 3, 4, 4, 5, 5, -1, -1, +/* lookup table for CEA values to VIDFORMAT values taken from NXP datasheet */ -+static char cea_to_nxp_mode[34] = {-1, 0, 1, 1, 2, 3, 4, 4, 5, 5, -1, -1, ++static char cea_to_nxp_mode[34] = {-1, 0, 1, 1, 2, 3, 4, 4, 5, 5, -1, -1, -1, -1, -1, -1, 6, 7, 7, 8, 9, 10, 10, - 11, 11, -1, -1, -1, -1, -1, -1, 12}; + 11, 11, -1, -1, -1, -1, -1, -1, 12, 13}; @@ -31,5 +31,5 @@ index 7c64696..412ba4f 100644 } return cea_to_nxp_mode[cea_mode]; -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0008-tilcdc-Remove-superfluous-newlines-from-DBG-messages.patch b/patches/hdmi/0008-tilcdc-Remove-superfluous-newlines-from-DBG-messages.patch index fbc84ad4..6c15bd3c 100644 --- a/patches/hdmi/0008-tilcdc-Remove-superfluous-newlines-from-DBG-messages.patch +++ b/patches/hdmi/0008-tilcdc-Remove-superfluous-newlines-from-DBG-messages.patch @@ -1,17 +1,17 @@ -From 41efa063051102c1e805b625fb53f3626fbf77ba Mon Sep 17 00:00:00 2001 +From bc52c93fff14407123c5fac5acca36dd26aeb048 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Mon, 20 May 2013 13:54:21 +0300 -Subject: [PATCH 08/22] tilcdc: Remove superfluous newlines from DBG messages +Subject: [PATCH 08/27] tilcdc: Remove superfluous newlines from DBG messages DBGs supply their own newlines, don't add them. Signed-off-by: Pantelis Antoniou --- - drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 14 +++++++------- + drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c -index 1dbd927..c39503b 100644 +index b79f4a5..279bbb5 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c @@ -473,7 +473,7 @@ int tilcdc_crtc_mode_valid(struct drm_crtc *crtc, struct drm_display_mode *mode, @@ -63,5 +63,5 @@ index 1dbd927..c39503b 100644 } -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0009-tilcdc-1280x1024x60-bw-1920x1080x24-bw.patch b/patches/hdmi/0009-tilcdc-1280x1024x60-bw-1920x1080x24-bw.patch index 46847600..06f80394 100644 --- a/patches/hdmi/0009-tilcdc-1280x1024x60-bw-1920x1080x24-bw.patch +++ b/patches/hdmi/0009-tilcdc-1280x1024x60-bw-1920x1080x24-bw.patch @@ -1,18 +1,18 @@ -From 5c99e97d8975ccc033942b1fd6c6a3a63b796295 Mon Sep 17 00:00:00 2001 +From 4abfd9f75c119cbd313eccaff9ce016750a9a7d0 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Mon, 20 May 2013 15:16:55 +0300 -Subject: [PATCH 09/22] tilcdc: 1280x1024x60 bw > 1920x1080x24 bw +Subject: [PATCH 09/27] tilcdc: 1280x1024x60 bw > 1920x1080x24 bw The lower resolution modes do infact need more bandwidth. Signed-off-by: Pantelis Antoniou --- - drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +- - drivers/gpu/drm/tilcdc/tilcdc_drv.h | 5 +++-- + drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +- + drivers/gpu/drm/tilcdc/tilcdc_drv.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c -index c39503b..7ba2048 100644 +index 279bbb5..ecb6353 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c @@ -472,7 +472,7 @@ int tilcdc_crtc_mode_valid(struct drm_crtc *crtc, struct drm_display_mode *mode, @@ -25,16 +25,16 @@ index c39503b..7ba2048 100644 return MODE_BAD; } diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h b/drivers/gpu/drm/tilcdc/tilcdc_drv.h -index 6b2c7ea..f3861e4 100644 +index 4315f78..a66ac31 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.h +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h @@ -40,10 +40,11 @@ #define TILCDC_DEFAULT_MAX_WIDTH 2048 - /* - * This may need some tweaking, but want to allow at least 1280x1024@60 -- * with optimized DDR & EMIF settings tweaked 1920x1080@24 appears to -+ * with optimized DDR & EMIF settings tweaked 1920x1080@25 appears to - * be supportable + /* + * This may need some tweaking, but want to allow at least 1280x1024@60 +- * with optimized DDR & EMIF settings tweaked 1920x1080@24 appears to ++ * with optimized DDR & EMIF settings tweaked 1920x1080@25 appears to + * be supportable + * Note: 1920x1080x25=49766400 < 1280x1024x60=78643200 */ -#define TILCDC_DEFAULT_MAX_BANDWIDTH (1920*1080*25) @@ -43,5 +43,5 @@ index 6b2c7ea..f3861e4 100644 struct tilcdc_drm_private { void __iomem *mmio; -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0010-tilcdc-Only-support-Audio-on-50-60-Hz-modes.patch b/patches/hdmi/0010-tilcdc-Only-support-Audio-on-50-60-Hz-modes.patch index cdbf1072..84ead5b1 100644 --- a/patches/hdmi/0010-tilcdc-Only-support-Audio-on-50-60-Hz-modes.patch +++ b/patches/hdmi/0010-tilcdc-Only-support-Audio-on-50-60-Hz-modes.patch @@ -1,30 +1,21 @@ -From bb5f2ba19b8861a21bac07b41914d7b86f20b66a Mon Sep 17 00:00:00 2001 +From 827a82e58a64bcf3bbb1b0c0918b6558d513098a Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Mon, 20 May 2013 16:01:07 +0300 -Subject: [PATCH 10/22] tilcdc: Only support Audio on 50 & 60 Hz modes +Subject: [PATCH 10/27] tilcdc: Only support Audio on 50 & 60 Hz modes Apparently anything other fails to work (at least for me). Signed-off-by: Pantelis Antoniou --- - drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 20 ++++++++++++++------ - 1 file changed, 14 insertions(+), 6 deletions(-) + drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 18 +++++++++++++----- + 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c -index 7ba2048..14cee74 100644 +index ecb6353..4b5277a 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c -@@ -310,7 +310,7 @@ static int tilcdc_crtc_mode_set(struct drm_crtc *crtc, - reg |= (((mode->hdisplay >> 4) - 1) & 0x40) >> 3; - - tilcdc_write(dev, LCDC_RASTER_TIMING_0_REG, reg); -- -+ - /* only the vertical sync width maps 0 as 1 so only subtract 1 from vsw */ - reg = ((mode->vdisplay - 1) & 0x3ff) | - ((vbp & 0xff) << 24) | @@ -444,7 +444,7 @@ int tilcdc_crtc_mode_valid(struct drm_crtc *crtc, struct drm_display_mode *mode, - struct tilcdc_drm_private *priv = crtc->dev->dev_private; + struct tilcdc_drm_private *priv = crtc->dev->dev_private; unsigned int bandwidth; uint32_t hbp, hfp, hsw, vbp, vfp, vsw; - int has_audio, is_cea_mode; @@ -62,5 +53,5 @@ index 7ba2048..14cee74 100644 return MODE_BAD; } -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0011-drm-i2c-nxp-tda998x-fix-EDID-reading-on-TDA19988-dev.patch b/patches/hdmi/0011-drm-i2c-nxp-tda998x-fix-EDID-reading-on-TDA19988-dev.patch index 22a92708..e821b496 100644 --- a/patches/hdmi/0011-drm-i2c-nxp-tda998x-fix-EDID-reading-on-TDA19988-dev.patch +++ b/patches/hdmi/0011-drm-i2c-nxp-tda998x-fix-EDID-reading-on-TDA19988-dev.patch @@ -1,7 +1,7 @@ -From 21e0441de27550a136b4c49fea094773b8465e76 Mon Sep 17 00:00:00 2001 +From 8b504545c9bf25d6dcc5c3d63355bb25b7a48ec6 Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 16 May 2013 19:25:58 +0000 -Subject: [PATCH 11/22] drm/i2c: nxp-tda998x: fix EDID reading on TDA19988 +Subject: [PATCH 11/27] drm/i2c: nxp-tda998x: fix EDID reading on TDA19988 devices TDA19988 devices need their RAM enabled in order to read EDID @@ -9,11 +9,11 @@ information. Add support for this. Signed-off-by: Russell King --- - drivers/gpu/drm/i2c/tda998x_drv.c | 14 +++++++++++++- + drivers/gpu/drm/i2c/tda998x_drv.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c -index 412ba4f..9ac4ed9 100644 +index 4432eea..27550a7 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -253,6 +253,8 @@ struct tda998x_priv { @@ -69,5 +69,5 @@ index 412ba4f..9ac4ed9 100644 kfree(block); return NULL; -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0012-tilcdc-Allow-non-audio-modes-when-we-don-t-support-t.patch b/patches/hdmi/0012-tilcdc-Allow-non-audio-modes-when-we-don-t-support-t.patch index 83a2b7ef..793193c6 100644 --- a/patches/hdmi/0012-tilcdc-Allow-non-audio-modes-when-we-don-t-support-t.patch +++ b/patches/hdmi/0012-tilcdc-Allow-non-audio-modes-when-we-don-t-support-t.patch @@ -1,7 +1,7 @@ -From 665687dfc6a61b316e53c0fd6f94bfe6346a8fa7 Mon Sep 17 00:00:00 2001 +From 0a5a7ea714b6b0a1cf0c4f2e01287a2c8310d351 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Tue, 4 Jun 2013 17:53:07 +0300 -Subject: [PATCH 12/22] tilcdc: Allow non-audio modes when we don't support +Subject: [PATCH 12/27] tilcdc: Allow non-audio modes when we don't support them. Allow non-audio modes on an audio capable monitor if we explicitly @@ -9,11 +9,11 @@ disable audio. Signed-off-by: Pantelis Antoniou --- - drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 3 ++- + drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c -index 14cee74..5f5f464 100644 +index 4b5277a..45852d7 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c @@ -480,7 +480,8 @@ int tilcdc_crtc_mode_valid(struct drm_crtc *crtc, struct drm_display_mode *mode, @@ -27,5 +27,5 @@ index 14cee74..5f5f464 100644 return MODE_BAD; } -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0013-drm-i2c-nxp-tda998x-ensure-VIP-output-mux-is-properl.patch b/patches/hdmi/0013-drm-i2c-nxp-tda998x-ensure-VIP-output-mux-is-properl.patch index d5e15929..88fe4626 100644 --- a/patches/hdmi/0013-drm-i2c-nxp-tda998x-ensure-VIP-output-mux-is-properl.patch +++ b/patches/hdmi/0013-drm-i2c-nxp-tda998x-ensure-VIP-output-mux-is-properl.patch @@ -1,8 +1,8 @@ -From f6659d5dbecab792e7d5beeb34e9987362c6c446 Mon Sep 17 00:00:00 2001 +From a8a765fcc12dc1b5022b19ab756e6c660a4a9692 Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 16 May 2013 19:26:18 +0000 -Subject: [PATCH 13/22] drm/i2c: nxp-tda998x: ensure VIP output mux is - properly set +Subject: [PATCH 13/27] drm/i2c: nxp-tda998x: ensure VIP output mux is properly + set When switching between various drivers for this device, it's possible that some critical registers are left containing values which affect @@ -15,11 +15,11 @@ default setting. Signed-off-by: Russell King --- - drivers/gpu/drm/i2c/tda998x_drv.c | 3 +++ + drivers/gpu/drm/i2c/tda998x_drv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c -index 9ac4ed9..37094fd 100644 +index 27550a7..447a4cd 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -110,6 +110,7 @@ struct tda998x_priv { @@ -40,5 +40,5 @@ index 9ac4ed9..37094fd 100644 reg_write(encoder, REG_ENA_AP, 0x03); reg_write(encoder, REG_ENA_VP_0, 0xff); -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0014-drm-i2c-nxp-tda998x-fix-npix-nline-programming.patch b/patches/hdmi/0014-drm-i2c-nxp-tda998x-fix-npix-nline-programming.patch index 305c2c19..670479b7 100644 --- a/patches/hdmi/0014-drm-i2c-nxp-tda998x-fix-npix-nline-programming.patch +++ b/patches/hdmi/0014-drm-i2c-nxp-tda998x-fix-npix-nline-programming.patch @@ -1,7 +1,7 @@ -From bd931f30721ee16f2fc99e13a256ae1bc4395131 Mon Sep 17 00:00:00 2001 +From 3eb45bbbc697c8f67aec9888aa6b9240e7ec188c Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 16 May 2013 19:26:38 +0000 -Subject: [PATCH 14/22] drm/i2c: nxp-tda998x: fix npix/nline programming +Subject: [PATCH 14/27] drm/i2c: nxp-tda998x: fix npix/nline programming The npix/nline registers are supposed to be programmed with the total number of pixels/lines, not the displayed pixels/lines, and not minus @@ -9,11 +9,11 @@ one either. Signed-off-by: Russell King --- - drivers/gpu/drm/i2c/tda998x_drv.c | 4 ++-- + drivers/gpu/drm/i2c/tda998x_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c -index 37094fd..17db51b 100644 +index 447a4cd..7bcca0e 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -723,8 +723,8 @@ tda998x_encoder_mode_set(struct drm_encoder *encoder, @@ -28,5 +28,5 @@ index 37094fd..17db51b 100644 reg_write16(encoder, REG_VS_LINE_END_1_MSB, line_end); reg_write16(encoder, REG_VS_PIX_STRT_1_MSB, hs_start); -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0015-drm-tilcdc-Clear-bits-of-register-we-re-going-to-set.patch b/patches/hdmi/0015-drm-tilcdc-Clear-bits-of-register-we-re-going-to-set.patch index a286e6c5..56300d9d 100644 --- a/patches/hdmi/0015-drm-tilcdc-Clear-bits-of-register-we-re-going-to-set.patch +++ b/patches/hdmi/0015-drm-tilcdc-Clear-bits-of-register-we-re-going-to-set.patch @@ -1,18 +1,17 @@ -From 00b09f803f15fd0ff8d135cd83d5c3e3ef27a86c Mon Sep 17 00:00:00 2001 +From 9e6b4be7f4f8861ea4093762434d50e950923127 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 5 Jun 2013 19:48:59 +0300 -Subject: [PATCH 15/22] drm: tilcdc: Clear bits of register we're going to - set. +Subject: [PATCH 15/27] drm: tilcdc: Clear bits of register we're going to set. Bits weren't cleared so resolution changes didn't work. Signed-off-by: Pantelis Antoniou --- - drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 22 ++++++++++++---------- + drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c -index 5f5f464..8ce18ca 100644 +index 45852d7..24f2aa4 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c @@ -286,15 +286,18 @@ static int tilcdc_crtc_mode_set(struct drm_crtc *crtc, @@ -64,5 +63,5 @@ index 5f5f464..8ce18ca 100644 /* Configure display type: */ -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0016-DRM-tda998x-add-missing-include.patch b/patches/hdmi/0016-DRM-tda998x-add-missing-include.patch index 22a65977..760b5224 100644 --- a/patches/hdmi/0016-DRM-tda998x-add-missing-include.patch +++ b/patches/hdmi/0016-DRM-tda998x-add-missing-include.patch @@ -1,14 +1,14 @@ -From 6a4989473e38fa7365a6cb5324401f3e75686525 Mon Sep 17 00:00:00 2001 +From 3a8f87c8c8276709af8fd8a008b666d4ce8837fa Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Sat, 18 May 2013 17:12:19 +0000 -Subject: [PATCH 16/22] DRM: tda998x: add missing include +Subject: [PATCH 16/27] DRM: tda998x: add missing include The RFC sent by Russell King was missing an include for tda998x. This is just a compatible clone to remember Russell to add that later. Signed-off-by: Sebastian Hesselbarth --- - include/drm/i2c/tda998x.h | 23 +++++++++++++++++++++++ + include/drm/i2c/tda998x.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 include/drm/i2c/tda998x.h @@ -42,5 +42,5 @@ index 0000000..41f799f + +#endif -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0017-drm-i2c-nxp-tda998x-prepare-for-video-input-configur.patch b/patches/hdmi/0017-drm-i2c-nxp-tda998x-prepare-for-video-input-configur.patch index 094e93ac..b211dc59 100644 --- a/patches/hdmi/0017-drm-i2c-nxp-tda998x-prepare-for-video-input-configur.patch +++ b/patches/hdmi/0017-drm-i2c-nxp-tda998x-prepare-for-video-input-configur.patch @@ -1,16 +1,16 @@ -From ae797847d68d2dbe1bd9f65a363e52210527a129 Mon Sep 17 00:00:00 2001 +From c15d1ca44a87bf6d875bd071fa869f64aaf7a0db Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 16 May 2013 19:26:58 +0000 -Subject: [PATCH 17/22] drm/i2c: nxp-tda998x: prepare for video input +Subject: [PATCH 17/27] drm/i2c: nxp-tda998x: prepare for video input configuration Signed-off-by: Russell King --- - drivers/gpu/drm/i2c/tda998x_drv.c | 16 ++++++++++------ + drivers/gpu/drm/i2c/tda998x_drv.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c -index 17db51b..49e5d98 100644 +index 7bcca0e..6f1d7e2 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -32,6 +32,9 @@ struct tda998x_priv { @@ -51,5 +51,5 @@ index 17db51b..49e5d98 100644 priv->cec = i2c_new_dummy(client->adapter, 0x34); priv->dpms = DRM_MODE_DPMS_OFF; -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0018-WIP-of-new-tda998x-patches.patch b/patches/hdmi/0018-WIP-of-new-tda998x-patches.patch index 489be02a..08be215c 100644 --- a/patches/hdmi/0018-WIP-of-new-tda998x-patches.patch +++ b/patches/hdmi/0018-WIP-of-new-tda998x-patches.patch @@ -1,19 +1,19 @@ -From 105dcf66d2508295c8e1efbbbb30e3ec2837bb9f Mon Sep 17 00:00:00 2001 +From a7be7a5c2578abf75fef733eefb69973a0cfa404 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 5 Jun 2013 19:52:25 +0300 -Subject: [PATCH 18/22] WIP of new tda998x patches. +Subject: [PATCH 18/27] WIP of new tda998x patches. Video works, but no audio. RMK uses SPDIF so I2S is missing various bits. With the tilcdc driver the some non CEC modes are shifted too. Signed-off-by: Pantelis Antoniou --- - drivers/gpu/drm/i2c/tda998x_drv.c | 574 ++++++++++++++++++++++++++----------- - include/drm/i2c/tda998x.h | 21 +- - 2 files changed, 419 insertions(+), 176 deletions(-) + drivers/gpu/drm/i2c/tda998x_drv.c | 573 +++++++++++++++++++++++++++----------- + include/drm/i2c/tda998x.h | 21 +- + 2 files changed, 419 insertions(+), 175 deletions(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c -index 49e5d98..2049898 100644 +index 6f1d7e2..5fb5b59 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -25,6 +25,8 @@ @@ -438,7 +438,8 @@ index 49e5d98..2049898 100644 tda998x_encoder_mode_fixup(struct drm_encoder *encoder, const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) --{ ++ struct drm_display_mode *adjusted) + { - return true; -} - @@ -452,8 +453,7 @@ index 49e5d98..2049898 100644 - -static void -tda998x_audio_infoframe_enable(struct drm_encoder *encoder) -+ struct drm_display_mode *adjusted) - { +-{ - uint8_t buffer[20]; - struct hdmi_audio_infoframe audio_frame; - size_t len; @@ -465,29 +465,18 @@ index 49e5d98..2049898 100644 - audio_frame.coding_type = HDMI_AUDIO_CODING_TYPE_PCM; - audio_frame.sample_size = HDMI_AUDIO_SAMPLE_SIZE_24; - audio_frame.sample_frequency = HDMI_AUDIO_SAMPLE_FREQUENCY_48000; -+ DBG(""); - +- - len = hdmi_audio_infoframe_pack(&audio_frame, buffer, sizeof(buffer)); - WARN(len < 0, "hdmi_avi_infoframe_pack failed\n"); -+ adjusted->flags &= ~(DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NHSYNC | -+ DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_NVSYNC | -+ DRM_MODE_FLAG_PCSYNC | DRM_MODE_FLAG_NCSYNC); - +- - reg_write_range(encoder, REG_AUDIO_IF, buffer, len); -+ /* The TDA19988 always requires negative VSYNC? */ -+ adjusted->flags |= DRM_MODE_FLAG_NVSYNC; - +- - /* enable Audio Infoframe output in DIP_IF Register */ - reg_clear(encoder, REG_DIP_IF_FLAGS, DIP_IF_FLAGS_IF4); - udelay(5); - reg_set(encoder, REG_DIP_IF_FLAGS, DIP_IF_FLAGS_IF4); -} -+ /* The TDA19988 requires positive HSYNC on 1080p or 720p */ -+ if ((adjusted->hdisplay == 1920 && adjusted->vdisplay == 1080) || -+ (adjusted->hdisplay == 1280 && adjusted->vdisplay == 720)) -+ adjusted->flags |= DRM_MODE_FLAG_PHSYNC; -+ else -+ adjusted->flags |= DRM_MODE_FLAG_NHSYNC; ++ DBG(""); -static void -tda998x_avi_infoframe_enable(struct drm_encoder *encoder, @@ -496,18 +485,29 @@ index 49e5d98..2049898 100644 - uint8_t buffer[20]; - struct hdmi_avi_infoframe avi_frame; - size_t len; -- ++ adjusted->flags &= ~(DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NHSYNC | ++ DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_NVSYNC | ++ DRM_MODE_FLAG_PCSYNC | DRM_MODE_FLAG_NCSYNC); + - hdmi_avi_infoframe_init(&avi_frame); - avi_frame.video_code = drm_match_cea_mode(mode); - avi_frame.picture_aspect = HDMI_PICTURE_ASPECT_NONE; - avi_frame.active_aspect = HDMI_ACTIVE_ASPECT_PICTURE; - len = hdmi_avi_infoframe_pack(&avi_frame, buffer, sizeof(buffer)); - WARN(len < 0, "hdmi_avi_infoframe_pack failed\n"); -- ++ /* The TDA19988 always requires negative VSYNC? */ ++ adjusted->flags |= DRM_MODE_FLAG_NVSYNC; + - reg_write_range(encoder, REG_AVI_IF, buffer, len); -- -- /* -- * enable AVI Infoframe output in DIP_IF Register, but toggle it ++ /* The TDA19988 requires positive HSYNC on 1080p or 720p */ ++ if ((adjusted->hdisplay == 1920 && adjusted->vdisplay == 1080) || ++ (adjusted->hdisplay == 1280 && adjusted->vdisplay == 720)) ++ adjusted->flags |= DRM_MODE_FLAG_PHSYNC; ++ else ++ adjusted->flags |= DRM_MODE_FLAG_NHSYNC; + +- /* +- * enable AVI Infoframe output in DIP_IF Register, but toggle it - * so that the hardware acknowledges that the packet data might have - * changed - */ @@ -518,7 +518,7 @@ index 49e5d98..2049898 100644 } -/* lookup table for CEA values to VIDFORMAT values taken from NXP datasheet */ --static char cea_to_nxp_mode[34] = {-1, 0, 1, 1, 2, 3, 4, 4, 5, 5, -1, -1, +-static char cea_to_nxp_mode[34] = {-1, 0, 1, 1, 2, 3, 4, 4, 5, 5, -1, -1, - -1, -1, -1, -1, 6, 7, 7, 8, 9, 10, 10, - 11, 11, -1, -1, -1, -1, -1, -1, 12, 13}; - @@ -568,7 +568,7 @@ index 49e5d98..2049898 100644 - reg = TBG_CNTRL_1_VHX_EXT_DE | - TBG_CNTRL_1_VHX_EXT_HS | - TBG_CNTRL_1_VHX_EXT_VS | -- TBG_CNTRL_1_DWIN_DIS | /* HDCP off */ +- TBG_CNTRL_1_DWIN_DIS | /* HDCP off */ + reg = TBG_CNTRL_1_DWIN_DIS | /* HDCP off */ TBG_CNTRL_1_VH_TGL_2; + /* @@ -590,7 +590,7 @@ index 49e5d98..2049898 100644 - goto out; - } - dev_info(encoder->dev->dev, "Connected to an HDMI monitor with cea mode %d", vidformat); -- +- - /* this is an HDMI monitor, so set things up a bit differently */ - reg_write(encoder, REG_TBG_CNTRL_1, 0); - reg_write(encoder, REG_VIDFORMAT, vidformat); @@ -612,15 +612,15 @@ index 49e5d98..2049898 100644 - reg_write(encoder, REG_ACR_N_0, 0x0); - reg_write(encoder, REG_ACR_N_1, 0x18); - reg_write(encoder, REG_ACR_N_2, 0x0); -+ tda998x_write_avi(encoder, adjusted_mode); - +- - reg_set(encoder, REG_DIP_FLAGS, DIP_FLAGS_ACR); - - reg_write(encoder, REG_ENC_CNTRL, 0x04); - reg_write(encoder, REG_CTS_N, 0x33); - /* Set 2 channel I2S mode */ - reg_write(encoder, REG_ENA_AP, 0x3); -- ++ tda998x_write_avi(encoder, adjusted_mode); + - /* set audio divider in pll settings */ - reg_write(encoder, REG_AUDIO_DIV, 0x2); - @@ -762,11 +762,6 @@ index 49e5d98..2049898 100644 priv->current_page = 0; priv->cec = i2c_new_dummy(client->adapter, 0x34); -@@ -1115,4 +1356,3 @@ MODULE_LICENSE("GPL"); - - module_init(tda998x_init); - module_exit(tda998x_exit); -- diff --git a/include/drm/i2c/tda998x.h b/include/drm/i2c/tda998x.h index 41f799f..23736f1 100644 --- a/include/drm/i2c/tda998x.h @@ -808,5 +803,5 @@ index 41f799f..23736f1 100644 #endif -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0019-tilcdc-Slave-panel-settings-read-from-DT-now.patch b/patches/hdmi/0019-tilcdc-Slave-panel-settings-read-from-DT-now.patch index 36210fce..eefc9c79 100644 --- a/patches/hdmi/0019-tilcdc-Slave-panel-settings-read-from-DT-now.patch +++ b/patches/hdmi/0019-tilcdc-Slave-panel-settings-read-from-DT-now.patch @@ -1,23 +1,23 @@ -From d437f5b73665167ed52116fbd57b5c0c44d11379 Mon Sep 17 00:00:00 2001 +From e2e4a2352788f43a561c34619ba6332a160a72ab Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Thu, 6 Jun 2013 11:45:28 +0300 -Subject: [PATCH 19/22] tilcdc: Slave panel settings read from DT now +Subject: [PATCH 19/27] tilcdc: Slave panel settings read from DT now Turns out that we really need those panel settings. Signed-off-by: Pantelis Antoniou --- - drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 56 +++++++++++++++++++++++++++++++++ - drivers/gpu/drm/tilcdc/tilcdc_drv.h | 3 ++ - drivers/gpu/drm/tilcdc/tilcdc_panel.c | 49 +---------------------------- - drivers/gpu/drm/tilcdc/tilcdc_slave.c | 25 +++++++-------- - 4 files changed, 71 insertions(+), 62 deletions(-) + drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 55 +++++++++++++++++++++++++++++++++++ + drivers/gpu/drm/tilcdc/tilcdc_drv.h | 3 ++ + drivers/gpu/drm/tilcdc/tilcdc_panel.c | 49 +------------------------------ + drivers/gpu/drm/tilcdc/tilcdc_slave.c | 25 +++++++--------- + 4 files changed, 70 insertions(+), 62 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c -index 8ce18ca..023092f 100644 +index 24f2aa4..206a4a0 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c -@@ -721,3 +721,59 @@ fail: +@@ -721,3 +721,58 @@ fail: tilcdc_crtc_destroy(crtc); return NULL; } @@ -76,9 +76,8 @@ index 8ce18ca..023092f 100644 + of_node_put(info_np); + return NULL; +} -+ diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h b/drivers/gpu/drm/tilcdc/tilcdc_drv.h -index f3861e4..40ff5d4 100644 +index a66ac31..d661dbb 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.h +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h @@ -169,4 +169,7 @@ int tilcdc_crtc_mode_valid(struct drm_crtc *crtc, struct drm_display_mode *mode, @@ -221,5 +220,5 @@ index e454874..440de4e 100644 return 0; -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0020-drm-tda998x-Revert-WIP-to-previous-state.patch b/patches/hdmi/0020-drm-tda998x-Revert-WIP-to-previous-state.patch index 4a57429b..411ef82f 100644 --- a/patches/hdmi/0020-drm-tda998x-Revert-WIP-to-previous-state.patch +++ b/patches/hdmi/0020-drm-tda998x-Revert-WIP-to-previous-state.patch @@ -1,17 +1,17 @@ -From 58ed76c8c2efaba73ec93ede7f2697142c6b9e6f Mon Sep 17 00:00:00 2001 +From 2d5ccc206d2ada424047ba3bba2a01c2cc74f81d Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Thu, 6 Jun 2013 22:25:45 +0300 -Subject: [PATCH 20/22] drm: tda998x: Revert WIP to previous state +Subject: [PATCH 20/27] drm: tda998x: Revert WIP to previous state Revert all the changes of the WIP so that audio continues to work. We do it with an explicit patch so that we can revisit at a later time when things settled down. --- - drivers/gpu/drm/i2c/tda998x_drv.c | 611 +++++++++++-------------------------- - 1 file changed, 176 insertions(+), 435 deletions(-) + drivers/gpu/drm/i2c/tda998x_drv.c | 610 +++++++++++--------------------------- + 1 file changed, 175 insertions(+), 435 deletions(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c -index 2049898..412ba4f 100644 +index 5fb5b59..4432eea 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -25,8 +25,6 @@ @@ -527,8 +527,8 @@ index 2049898..412ba4f 100644 + + reg_write_range(encoder, REG_AVI_IF, buffer, len); + -+ /* -+ * enable AVI Infoframe output in DIP_IF Register, but toggle it ++ /* ++ * enable AVI Infoframe output in DIP_IF Register, but toggle it + * so that the hardware acknowledges that the packet data might have + * changed + */ @@ -538,7 +538,7 @@ index 2049898..412ba4f 100644 +} + +/* lookup table for CEA values to VIDFORMAT values taken from NXP datasheet */ -+static char cea_to_nxp_mode[34] = {-1, 0, 1, 1, 2, 3, 4, 4, 5, 5, -1, -1, ++static char cea_to_nxp_mode[34] = {-1, 0, 1, 1, 2, 3, 4, 4, 5, 5, -1, -1, + -1, -1, -1, -1, 6, 7, 7, 8, 9, 10, 10, + 11, 11, -1, -1, -1, -1, -1, -1, 12, 13}; + @@ -595,7 +595,7 @@ index 2049898..412ba4f 100644 + reg = TBG_CNTRL_1_VHX_EXT_DE | + TBG_CNTRL_1_VHX_EXT_HS | + TBG_CNTRL_1_VHX_EXT_VS | -+ TBG_CNTRL_1_DWIN_DIS | /* HDCP off */ ++ TBG_CNTRL_1_DWIN_DIS | /* HDCP off */ TBG_CNTRL_1_VH_TGL_2; - /* - * It is questionable whether this is correct - the nxp driver @@ -621,7 +621,7 @@ index 2049898..412ba4f 100644 + goto out; + } + dev_info(encoder->dev->dev, "Connected to an HDMI monitor with cea mode %d", vidformat); -+ ++ + /* this is an HDMI monitor, so set things up a bit differently */ + reg_write(encoder, REG_TBG_CNTRL_1, 0); + reg_write(encoder, REG_VIDFORMAT, vidformat); @@ -642,7 +642,7 @@ index 2049898..412ba4f 100644 + reg_write(encoder, REG_ACR_N_0, 0x0); + reg_write(encoder, REG_ACR_N_1, 0x18); + reg_write(encoder, REG_ACR_N_2, 0x0); -+ + + reg_set(encoder, REG_DIP_FLAGS, DIP_FLAGS_ACR); + + reg_write(encoder, REG_ENC_CNTRL, 0x04); @@ -652,7 +652,7 @@ index 2049898..412ba4f 100644 + + /* set audio divider in pll settings */ + reg_write(encoder, REG_AUDIO_DIV, 0x2); - ++ + /* select the audio input port clock */ + reg_write(encoder, REG_AIP_CLKSEL, SEL_AIP_I2S); + reg_write(encoder, REG_MUX_AP, MUX_AP_SELECT_I2S); @@ -832,11 +832,6 @@ index 2049898..412ba4f 100644 priv->current_page = 0; priv->cec = i2c_new_dummy(client->adapter, 0x34); priv->dpms = DRM_MODE_DPMS_OFF; -@@ -1356,3 +1096,4 @@ MODULE_LICENSE("GPL"); - - module_init(tda998x_init); - module_exit(tda998x_exit); -+ -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0021-tilcdc-More-refined-audio-mode-compatibility-check.patch b/patches/hdmi/0021-tilcdc-More-refined-audio-mode-compatibility-check.patch index e7036182..7497ea8e 100644 --- a/patches/hdmi/0021-tilcdc-More-refined-audio-mode-compatibility-check.patch +++ b/patches/hdmi/0021-tilcdc-More-refined-audio-mode-compatibility-check.patch @@ -1,16 +1,16 @@ -From 0d35970747235329b72988844be8a1085a52d6b2 Mon Sep 17 00:00:00 2001 +From 4b4c25d0e8590bad30ddacc851842930a472f512 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Thu, 6 Jun 2013 22:55:04 +0300 -Subject: [PATCH 21/22] tilcdc: More refined audio mode compatibility check. +Subject: [PATCH 21/27] tilcdc: More refined audio mode compatibility check. Allow audio modes more selectively. This should end up in DT instead but it will do for release. --- - drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 30 ++++++++++++++++++++++++++---- + drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c -index 023092f..375986e 100644 +index 206a4a0..54023bf 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c @@ -440,6 +440,25 @@ int tilcdc_crtc_max_width(struct drm_crtc *crtc) @@ -69,5 +69,5 @@ index 023092f..375986e 100644 has_audio ? "true" : "false", is_cea_mode ? "true" : "false", -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0022-drm-tilcdc-fixing-i2c-slave-initialization-race.patch b/patches/hdmi/0022-drm-tilcdc-fixing-i2c-slave-initialization-race.patch index 1334b15a..2a375b07 100644 --- a/patches/hdmi/0022-drm-tilcdc-fixing-i2c-slave-initialization-race.patch +++ b/patches/hdmi/0022-drm-tilcdc-fixing-i2c-slave-initialization-race.patch @@ -1,4 +1,4 @@ -From e0ccb9374fdd0613a3b181f5e0f662afd3da8bff Mon Sep 17 00:00:00 2001 +From 08c747e5059daa274a0437621a82829c9f36074f Mon Sep 17 00:00:00 2001 From: Cody Lacey Date: Fri, 9 Aug 2013 12:19:20 -0500 Subject: [PATCH 22/27] drm/tilcdc fixing i2c/slave initialization race @@ -11,9 +11,9 @@ the tilcdc main driver. Created by: Darren Etheridge This change was modified by Cody Lacey to work with the 3.8 kernel. --- - drivers/gpu/drm/tilcdc/tilcdc_drv.c | 10 ++++++ - drivers/gpu/drm/tilcdc/tilcdc_drv.h | 1 + - drivers/gpu/drm/tilcdc/tilcdc_slave.c | 62 ++++++++++++++++++--------------- + drivers/gpu/drm/tilcdc/tilcdc_drv.c | 10 ++++++ + drivers/gpu/drm/tilcdc/tilcdc_drv.h | 1 + + drivers/gpu/drm/tilcdc/tilcdc_slave.c | 62 +++++++++++++++++++---------------- 3 files changed, 44 insertions(+), 29 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c @@ -52,7 +52,7 @@ index 31e039e..09ae498 100644 } diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h b/drivers/gpu/drm/tilcdc/tilcdc_drv.h -index 40ff5d4..254bba60 100644 +index d661dbb..58d86c7 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.h +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h @@ -116,6 +116,7 @@ void tilcdc_module_init(struct tilcdc_module *mod, const char *name, @@ -187,5 +187,5 @@ index 440de4e..667540c 100644 static int slave_remove(struct platform_device *pdev) -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0023-drm-tilcdc-increase-allowable-supported-resolution.patch b/patches/hdmi/0023-drm-tilcdc-increase-allowable-supported-resolution.patch index 254548f8..f14de5ad 100644 --- a/patches/hdmi/0023-drm-tilcdc-increase-allowable-supported-resolution.patch +++ b/patches/hdmi/0023-drm-tilcdc-increase-allowable-supported-resolution.patch @@ -1,4 +1,4 @@ -From 4a97d099013714c3b529683946ed2ab6e7196f44 Mon Sep 17 00:00:00 2001 +From fcd0a4256b36c30420afd6534e901716c6825fd5 Mon Sep 17 00:00:00 2001 From: Cody Lacey Date: Fri, 9 Aug 2013 13:40:35 -0500 Subject: [PATCH 23/27] drm/tilcdc increase allowable supported resolution @@ -7,15 +7,15 @@ Subject: [PATCH 23/27] drm/tilcdc increase allowable supported resolution of the device and memory infrastructure. Created by: Darren Etheridge --- - drivers/gpu/drm/tilcdc/tilcdc_drv.h | 2 +- + drivers/gpu/drm/tilcdc/tilcdc_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h b/drivers/gpu/drm/tilcdc/tilcdc_drv.h -index 254bba60..b4562d5 100644 +index 58d86c7..7e0d640 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.h +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h @@ -44,7 +44,7 @@ - * be supportable + * be supportable * Note: 1920x1080x25=49766400 < 1280x1024x60=78643200 */ -#define TILCDC_DEFAULT_MAX_BANDWIDTH (1280*1024*60) @@ -24,5 +24,5 @@ index 254bba60..b4562d5 100644 struct tilcdc_drm_private { void __iomem *mmio; -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0024-drm-i2c-tda998x-fix-sync-generation-and-calculation.patch b/patches/hdmi/0024-drm-i2c-tda998x-fix-sync-generation-and-calculation.patch index 34a0764e..c991ee9b 100644 --- a/patches/hdmi/0024-drm-i2c-tda998x-fix-sync-generation-and-calculation.patch +++ b/patches/hdmi/0024-drm-i2c-tda998x-fix-sync-generation-and-calculation.patch @@ -1,4 +1,4 @@ -From de5351b3c28fd0de37f763b279bb4d907bdf0f47 Mon Sep 17 00:00:00 2001 +From 9b30ee16aac21cbd34206d9b577c4837f16cb2b7 Mon Sep 17 00:00:00 2001 From: Cody Lacey Date: Fri, 9 Aug 2013 13:44:05 -0500 Subject: [PATCH 24/27] drm/i2c/tda998x fix sync generation and calculation @@ -16,12 +16,12 @@ the display to the right by a certain number of pixels. Changes only take effect if adjusted_mode is changed in fixup function. Created by: Darren Etheridge --- - drivers/gpu/drm/i2c/tda998x_drv.c | 192 ++++++++++++++++++++++------------ - drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 7 +- - 2 files changed, 130 insertions(+), 69 deletions(-) + drivers/gpu/drm/i2c/tda998x_drv.c | 190 +++++++++++++++++++++++------------ + drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 7 +- + 2 files changed, 129 insertions(+), 68 deletions(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c -index 412ba4f..8e65fff 100644 +index 4432eea..4358804 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -133,8 +133,12 @@ struct tda998x_priv { @@ -73,7 +73,7 @@ index 412ba4f..8e65fff 100644 # define TBG_CNTRL_1_DWIN_DIS (1 << 6) #define REG_ENABLE_SPACE REG(0x00, 0xd6) /* write */ #define REG_HVF_CNTRL_0 REG(0x00, 0xe4) /* write */ -@@ -631,43 +643,79 @@ tda998x_encoder_mode_set(struct drm_encoder *encoder, +@@ -631,42 +643,78 @@ tda998x_encoder_mode_set(struct drm_encoder *encoder, struct drm_display_mode *adjusted_mode) { struct tda998x_priv *priv = to_tda998x_priv(encoder); @@ -119,11 +119,15 @@ index 412ba4f..8e65fff 100644 + * + * So we add +1 to all horizontal and vertical register values, + * plus an additional +3 for REFPIX as we are using RGB input only. -+ */ -+ + */ +- ref_line = 2; + +- /* this might changes for other color formats from the CRTC: */ +- ref_pix = 3 + hs_start; + n_pix = mode->htotal; + n_line = mode->vtotal; -+ + +- div = 148500 / mode->clock; + ref_pix = 3 + mode->hsync_start - mode->hdisplay; + + /* @@ -131,11 +135,7 @@ index 412ba4f..8e65fff 100644 + * non-VESA compliant sync signals the workaround + * forces us to invert the HSYNC, so need to adjust display to + * the left by hskew pixels, provided by the tilcdc driver - */ -- ref_line = 2; -- -- /* this might changes for other color formats from the CRTC: */ -- ref_pix = 3 + hs_start; ++ */ + if (adjusted_mode->flags & DRM_MODE_FLAG_HSKEW) + ref_pix += adjusted_mode->hskew; + @@ -171,8 +171,6 @@ index 412ba4f..8e65fff 100644 + (mode->vsync_end - mode->vsync_start)/2; + } - div = 148500 / mode->clock; - - DBG("clock=%d, div=%u", mode->clock, div); - DBG("hs_start=%u, hs_end=%u, line_start=%u, line_end=%u", - hs_start, hs_end, line_start, line_end); @@ -180,10 +178,10 @@ index 412ba4f..8e65fff 100644 - vwin_start, vwin_end, de_start, de_end); - DBG("ref_line=%u, ref_pix=%u, pix_start2=%u", - ref_line, ref_pix, pix_start2); -- ++ div = 148500 / mode->clock; + /* mute the audio FIFO: */ reg_set(encoder, REG_AIP_CNTRL_0, AIP_CNTRL_0_RST_FIFO); - @@ -698,9 +746,6 @@ tda998x_encoder_mode_set(struct drm_encoder *encoder, reg_write(encoder, REG_PLL_SERIAL_2, PLL_SERIAL_2_SRL_NOSC(div) | PLL_SERIAL_2_SRL_PR(rep)); @@ -270,7 +268,7 @@ index 412ba4f..8e65fff 100644 - reg = TBG_CNTRL_1_VHX_EXT_DE | - TBG_CNTRL_1_VHX_EXT_HS | - TBG_CNTRL_1_VHX_EXT_VS | -- TBG_CNTRL_1_DWIN_DIS | /* HDCP off */ +- TBG_CNTRL_1_DWIN_DIS | /* HDCP off */ - TBG_CNTRL_1_VH_TGL_2; - if (mode->flags & (DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC)) - reg |= TBG_CNTRL_1_VH_TGL_0; @@ -283,7 +281,7 @@ index 412ba4f..8e65fff 100644 char vidformat; vidformat = tda998x_cea_to_vidformat(drm_match_cea_mode(mode)); diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c -index 375986e..5495ebc 100644 +index 54023bf..188ac07 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c @@ -371,7 +371,12 @@ static int tilcdc_crtc_mode_set(struct drm_crtc *crtc, @@ -301,5 +299,5 @@ index 375986e..5495ebc 100644 else tilcdc_clear(dev, LCDC_RASTER_TIMING_2_REG, LCDC_INVERT_HSYNC); -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0025-drm-tilcdc-fixup-mode-to-workaound-sync-for-tda998x.patch b/patches/hdmi/0025-drm-tilcdc-fixup-mode-to-workaound-sync-for-tda998x.patch index 7c0259d1..f844af38 100644 --- a/patches/hdmi/0025-drm-tilcdc-fixup-mode-to-workaound-sync-for-tda998x.patch +++ b/patches/hdmi/0025-drm-tilcdc-fixup-mode-to-workaound-sync-for-tda998x.patch @@ -1,4 +1,4 @@ -From 74723af024c68654af44568ccfbc6af0d825d12b Mon Sep 17 00:00:00 2001 +From 9ce76ae8369b1ba3997c283843f74ecda6307e98 Mon Sep 17 00:00:00 2001 From: Cody Lacey Date: Fri, 9 Aug 2013 14:07:01 -0500 Subject: [PATCH 25/27] drm/tilcdc fixup mode to workaound sync for tda998x @@ -10,7 +10,7 @@ This works around an issue with the sync timings that tilcdc is outputing. Created by: Darren Etheridge --- - drivers/gpu/drm/tilcdc/tilcdc_slave.c | 20 +++++++++++++++++++- + drivers/gpu/drm/tilcdc/tilcdc_slave.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_slave.c b/drivers/gpu/drm/tilcdc/tilcdc_slave.c @@ -51,5 +51,5 @@ index 667540c..8d72c4d 100644 .commit = drm_i2c_encoder_commit, .mode_set = drm_i2c_encoder_mode_set, -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0026-Documentation-for-tilcdc-Devicetree-Bindings.patch b/patches/hdmi/0026-Documentation-for-tilcdc-Devicetree-Bindings.patch index 337a94db..35a03875 100644 --- a/patches/hdmi/0026-Documentation-for-tilcdc-Devicetree-Bindings.patch +++ b/patches/hdmi/0026-Documentation-for-tilcdc-Devicetree-Bindings.patch @@ -1,14 +1,14 @@ -From 097dac7ddad00f97441c60d6710a0d5c1a76d51b Mon Sep 17 00:00:00 2001 +From f9116741825ff6a0a56c49fa3444436979e1ce17 Mon Sep 17 00:00:00 2001 From: Cody Lacey Date: Fri, 9 Aug 2013 14:10:45 -0500 Subject: [PATCH 26/27] Documentation for tilcdc Devicetree Bindings This adds documentation for tilcdc devicetree bindings. --- - .../devicetree/bindings/drm/tilcdc/panel.txt | 59 ++++++++++++++++++++ - .../devicetree/bindings/drm/tilcdc/slave.txt | 18 ++++++ - .../devicetree/bindings/drm/tilcdc/tfp410.txt | 21 +++++++ - .../devicetree/bindings/drm/tilcdc/tilcdc.txt | 29 ++++++++++ + .../devicetree/bindings/drm/tilcdc/panel.txt | 59 ++++++++++++++++++++++ + .../devicetree/bindings/drm/tilcdc/slave.txt | 18 +++++++ + .../devicetree/bindings/drm/tilcdc/tfp410.txt | 21 ++++++++ + .../devicetree/bindings/drm/tilcdc/tilcdc.txt | 29 +++++++++++ 4 files changed, 127 insertions(+) create mode 100644 Documentation/devicetree/bindings/drm/tilcdc/panel.txt create mode 100644 Documentation/devicetree/bindings/drm/tilcdc/slave.txt @@ -167,5 +167,5 @@ index 0000000..fff10da + ti,hwmods = "lcdc"; + }; -- -1.7.9.5 +1.9.0 diff --git a/patches/hdmi/0027-drm-tilcdc-adding-more-guards-to-prevent-selecting-i.patch b/patches/hdmi/0027-drm-tilcdc-adding-more-guards-to-prevent-selecting-i.patch index f06b7bc7..88732720 100644 --- a/patches/hdmi/0027-drm-tilcdc-adding-more-guards-to-prevent-selecting-i.patch +++ b/patches/hdmi/0027-drm-tilcdc-adding-more-guards-to-prevent-selecting-i.patch @@ -1,4 +1,4 @@ -From f9168072d46968116198cf54509467ef93baf8ae Mon Sep 17 00:00:00 2001 +From 5f27cf8e45ddc0bfa27af9fc26997720b0329e75 Mon Sep 17 00:00:00 2001 From: Cody Lacey Date: Fri, 9 Aug 2013 14:18:48 -0500 Subject: [PATCH 27/27] drm/tilcdc: adding more guards to prevent selecting @@ -12,11 +12,11 @@ that will overflow the allowed sizes in the tilcdc. Created by: Darren Etheridge Modified by Cody Lacey for the 3.8 kernel. --- - drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 47 ++++++++++++++++++---------------- + drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 47 +++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c -index 5495ebc..45d51c9 100644 +index 188ac07..9982a9f 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c @@ -42,7 +42,8 @@ struct tilcdc_crtc { @@ -121,5 +121,5 @@ index 5495ebc..45d51c9 100644 /* filter out modes that would require too much memory bandwidth: */ -- -1.7.9.5 +1.9.0 diff --git a/patches/i2c/0001-pinctrl-pinctrl-single-must-be-initialized-early.patch b/patches/i2c/0001-pinctrl-pinctrl-single-must-be-initialized-early.patch index 1beeec1b..95d1d2c5 100644 --- a/patches/i2c/0001-pinctrl-pinctrl-single-must-be-initialized-early.patch +++ b/patches/i2c/0001-pinctrl-pinctrl-single-must-be-initialized-early.patch @@ -1,4 +1,4 @@ -From 91dce7b0c169aa2fb7447bc90dabdc26fdc4e291 Mon Sep 17 00:00:00 2001 +From 0fd1b5f15464824d34eedd9c8a5753cfe7806b77 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Sat, 15 Sep 2012 12:00:41 +0300 Subject: [PATCH 1/5] pinctrl: pinctrl-single must be initialized early. @@ -7,7 +7,7 @@ When using pinctrl-single to handle i2c initialization, it has to be done early. Whether this is the best way to do so, is an exercise left to the reader. --- - drivers/pinctrl/pinctrl-single.c | 12 +++++++++++- + drivers/pinctrl/pinctrl-single.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c @@ -34,5 +34,5 @@ index 5c32e88..e75d107 100644 MODULE_AUTHOR("Tony Lindgren "); MODULE_DESCRIPTION("One-register-per-pin type device tree based pinctrl driver"); -- -1.7.9.5 +1.9.0 diff --git a/patches/i2c/0002-Bone-DTS-working-i2c2-i2c3-in-the-tree.patch b/patches/i2c/0002-Bone-DTS-working-i2c2-i2c3-in-the-tree.patch index 3869a2da..250fcc50 100644 --- a/patches/i2c/0002-Bone-DTS-working-i2c2-i2c3-in-the-tree.patch +++ b/patches/i2c/0002-Bone-DTS-working-i2c2-i2c3-in-the-tree.patch @@ -1,14 +1,14 @@ -From c2239044a832ea9500ca00c8adbc16a9c77908c8 Mon Sep 17 00:00:00 2001 +From dfed848bfef3f01663c05b045fc8e78b846c56d9 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Sat, 15 Sep 2012 12:05:04 +0300 Subject: [PATCH 2/5] Bone DTS working i2c2 (i2c3 in the tree) --- - arch/arm/boot/dts/am335x-bone.dts | 60 ++++++++++++++++++++++++++++++------- + arch/arm/boot/dts/am335x-bone.dts | 60 ++++++++++++++++++++++++++++++++------- 1 file changed, 50 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts -index 6dbeff6..813ac04 100644 +index 6dbeff6..702ceee 100644 --- a/arch/arm/boot/dts/am335x-bone.dts +++ b/arch/arm/boot/dts/am335x-bone.dts @@ -66,6 +66,12 @@ @@ -57,7 +57,7 @@ index 6dbeff6..813ac04 100644 + compatible = "at,24c256"; + reg = <0x50>; + }; -+ ++ +}; + +&i2c3 { @@ -93,5 +93,5 @@ index 6dbeff6..813ac04 100644 &tps { -- -1.7.9.5 +1.9.0 diff --git a/patches/i2c/0003-am33xx-Convert-I2C-from-omap-to-am33xx-names.patch b/patches/i2c/0003-am33xx-Convert-I2C-from-omap-to-am33xx-names.patch index 4a74d7ad..43c7a254 100644 --- a/patches/i2c/0003-am33xx-Convert-I2C-from-omap-to-am33xx-names.patch +++ b/patches/i2c/0003-am33xx-Convert-I2C-from-omap-to-am33xx-names.patch @@ -1,4 +1,4 @@ -From 6781651533de7db56b0d99c936bf4cfe832a11ba Mon Sep 17 00:00:00 2001 +From 35ef5cac49ebc6c145ac96ad7d6df210433f9964 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Sat, 15 Sep 2012 14:49:11 +0300 Subject: [PATCH 3/5] am33xx: Convert I2C from omap to am33xx names @@ -8,13 +8,13 @@ On the am33xx's it is i2c0, i2c1, etc. Use am33xx naming everywhere, beside the hwmod name. --- - arch/arm/boot/dts/am335x-bone.dts | 8 ++++---- - arch/arm/boot/dts/am335x-evm.dts | 2 +- - arch/arm/boot/dts/am33xx.dtsi | 12 ++++++------ + arch/arm/boot/dts/am335x-bone.dts | 8 ++++---- + arch/arm/boot/dts/am335x-evm.dts | 2 +- + arch/arm/boot/dts/am33xx.dtsi | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts -index 813ac04..874997b 100644 +index 702ceee..8dd66b4 100644 --- a/arch/arm/boot/dts/am335x-bone.dts +++ b/arch/arm/boot/dts/am335x-bone.dts @@ -66,7 +66,7 @@ @@ -36,7 +36,7 @@ index 813ac04..874997b 100644 clock-frequency = <400000>; @@ -174,10 +174,10 @@ - + }; -&i2c3 { @@ -104,5 +104,5 @@ index 47ac3d2..bfae98b 100644 interrupts = <30>; status = "disabled"; -- -1.7.9.5 +1.9.0 diff --git a/patches/i2c/0004-am335x-evm-hack-around-i2c-node-names.patch b/patches/i2c/0004-am335x-evm-hack-around-i2c-node-names.patch index e6eb6ea7..40b9abfb 100644 --- a/patches/i2c/0004-am335x-evm-hack-around-i2c-node-names.patch +++ b/patches/i2c/0004-am335x-evm-hack-around-i2c-node-names.patch @@ -1,12 +1,12 @@ -From c88dbc55fda0f5ced6ddb5ee528b35602a4476d5 Mon Sep 17 00:00:00 2001 +From aee667a06908626d6f5220bc4bce6ea7619051e8 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 13 Dec 2012 14:13:31 +0100 Subject: [PATCH 4/5] am335x-evm*: hack around i2c node names Signed-off-by: Koen Kooi --- - arch/arm/boot/dts/am335x-evm.dts | 2 +- - arch/arm/boot/dts/am335x-evmsk.dts | 2 +- + arch/arm/boot/dts/am335x-evm.dts | 2 +- + arch/arm/boot/dts/am335x-evmsk.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts @@ -36,5 +36,5 @@ index f050c46..2546724 100644 clock-frequency = <400000>; -- -1.7.9.5 +1.9.0 diff --git a/patches/i2c/0005-tsl2550-fix-lux1_input-error-in-low-light.patch b/patches/i2c/0005-tsl2550-fix-lux1_input-error-in-low-light.patch index 1c5e8cb2..2a6e0f12 100644 --- a/patches/i2c/0005-tsl2550-fix-lux1_input-error-in-low-light.patch +++ b/patches/i2c/0005-tsl2550-fix-lux1_input-error-in-low-light.patch @@ -1,4 +1,4 @@ -From d105f3fb154ca8eb70be47d4eca967fbb34b9c26 Mon Sep 17 00:00:00 2001 +From 686dcac8379a7a38f1711a34d342152bcb88572f Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Mon, 3 Jun 2013 22:38:49 +0000 Subject: [PATCH 5/5] tsl2550: fix lux1_input error in low light @@ -14,7 +14,7 @@ This patch changes the resulting lux1_input sysfs attribute message from Signed-off-by: Matt Ranostay --- - drivers/misc/tsl2550.c | 2 +- + drivers/misc/tsl2550.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/tsl2550.c b/drivers/misc/tsl2550.c @@ -31,5 +31,5 @@ index 1e7bc0e..9255074 100644 /* LUX range check */ return lux > TSL2550_MAX_LUX ? TSL2550_MAX_LUX : lux; -- -1.7.9.5 +1.9.0 diff --git a/patches/iio/0001-iio-common-Add-STMicroelectronics-common-library.patch b/patches/iio/0001-iio-common-Add-STMicroelectronics-common-library.patch index c67445b4..651d4cc3 100644 --- a/patches/iio/0001-iio-common-Add-STMicroelectronics-common-library.patch +++ b/patches/iio/0001-iio-common-Add-STMicroelectronics-common-library.patch @@ -1,4 +1,4 @@ -From e3bed0f7f1dfd9a6c7861587f0830a6f293efbe8 Mon Sep 17 00:00:00 2001 +From 046b5568018816ab6f57d82f74e274672528b9ce Mon Sep 17 00:00:00 2001 From: Denis Ciocca Date: Fri, 25 Jan 2013 23:44:00 +0000 Subject: [PATCH 01/11] iio:common: Add STMicroelectronics common library @@ -9,18 +9,18 @@ Signed-off-by: Denis Ciocca Reviewed-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron --- - drivers/iio/common/Kconfig | 1 + - drivers/iio/common/Makefile | 1 + - drivers/iio/common/st_sensors/Kconfig | 14 + - drivers/iio/common/st_sensors/Makefile | 10 + - drivers/iio/common/st_sensors/st_sensors_buffer.c | 116 +++++ - drivers/iio/common/st_sensors/st_sensors_core.c | 460 ++++++++++++++++++++ - drivers/iio/common/st_sensors/st_sensors_i2c.c | 81 ++++ - drivers/iio/common/st_sensors/st_sensors_spi.c | 128 ++++++ - drivers/iio/common/st_sensors/st_sensors_trigger.c | 77 ++++ - include/linux/iio/common/st_sensors.h | 274 ++++++++++++ - include/linux/iio/common/st_sensors_i2c.h | 20 + - include/linux/iio/common/st_sensors_spi.h | 20 + + drivers/iio/common/Kconfig | 1 + + drivers/iio/common/Makefile | 1 + + drivers/iio/common/st_sensors/Kconfig | 14 + + drivers/iio/common/st_sensors/Makefile | 10 + + drivers/iio/common/st_sensors/st_sensors_buffer.c | 116 ++++++ + drivers/iio/common/st_sensors/st_sensors_core.c | 460 +++++++++++++++++++++ + drivers/iio/common/st_sensors/st_sensors_i2c.c | 81 ++++ + drivers/iio/common/st_sensors/st_sensors_spi.c | 128 ++++++ + drivers/iio/common/st_sensors/st_sensors_trigger.c | 77 ++++ + include/linux/iio/common/st_sensors.h | 274 ++++++++++++ + include/linux/iio/common/st_sensors_i2c.h | 20 + + include/linux/iio/common/st_sensors_spi.h | 20 + 12 files changed, 1202 insertions(+) create mode 100644 drivers/iio/common/st_sensors/Kconfig create mode 100644 drivers/iio/common/st_sensors/Makefile @@ -1312,5 +1312,5 @@ index 0000000..d964a35 + +#endif /* ST_SENSORS_SPI_H */ -- -1.7.9.5 +1.9.0 diff --git a/patches/iio/0002-iio-accel-Add-STMicroelectronics-accelerometers-driv.patch b/patches/iio/0002-iio-accel-Add-STMicroelectronics-accelerometers-driv.patch index d1d82417..6b088b48 100644 --- a/patches/iio/0002-iio-accel-Add-STMicroelectronics-accelerometers-driv.patch +++ b/patches/iio/0002-iio-accel-Add-STMicroelectronics-accelerometers-driv.patch @@ -1,8 +1,7 @@ -From 187064de591ab03715478aecb0b57ce4d02da600 Mon Sep 17 00:00:00 2001 +From 2972c4ddf49634e17d7c24938aaef8e4fc5bc8f1 Mon Sep 17 00:00:00 2001 From: Denis Ciocca Date: Fri, 25 Jan 2013 23:44:00 +0000 -Subject: [PATCH 02/11] iio:accel: Add STMicroelectronics accelerometers - driver +Subject: [PATCH 02/11] iio:accel: Add STMicroelectronics accelerometers driver This patch adds a generic accelerometer driver for STMicroelectronics accelerometers, currently it supports: @@ -13,13 +12,13 @@ Signed-off-by: Denis Ciocca Reviewed-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron --- - drivers/iio/accel/Kconfig | 38 +++ - drivers/iio/accel/Makefile | 9 + - drivers/iio/accel/st_accel.h | 47 ++++ - drivers/iio/accel/st_accel_buffer.c | 114 ++++++++ - drivers/iio/accel/st_accel_core.c | 495 +++++++++++++++++++++++++++++++++++ - drivers/iio/accel/st_accel_i2c.c | 87 ++++++ - drivers/iio/accel/st_accel_spi.c | 86 ++++++ + drivers/iio/accel/Kconfig | 38 +++ + drivers/iio/accel/Makefile | 9 + + drivers/iio/accel/st_accel.h | 47 ++++ + drivers/iio/accel/st_accel_buffer.c | 114 +++++++++ + drivers/iio/accel/st_accel_core.c | 495 ++++++++++++++++++++++++++++++++++++ + drivers/iio/accel/st_accel_i2c.c | 87 +++++++ + drivers/iio/accel/st_accel_spi.c | 86 +++++++ 7 files changed, 876 insertions(+) create mode 100644 drivers/iio/accel/st_accel.h create mode 100644 drivers/iio/accel/st_accel_buffer.c @@ -951,5 +950,5 @@ index 0000000..dbd45c0 +MODULE_DESCRIPTION("STMicroelectronics accelerometers spi driver"); +MODULE_LICENSE("GPL v2"); -- -1.7.9.5 +1.9.0 diff --git a/patches/iio/0003-iio-gyro-Add-STMicroelectronics-gyroscopes-driver.patch b/patches/iio/0003-iio-gyro-Add-STMicroelectronics-gyroscopes-driver.patch index 56e30616..4f601858 100644 --- a/patches/iio/0003-iio-gyro-Add-STMicroelectronics-gyroscopes-driver.patch +++ b/patches/iio/0003-iio-gyro-Add-STMicroelectronics-gyroscopes-driver.patch @@ -1,4 +1,4 @@ -From a58297bbfa00453138e378484316af62e0d2e1a5 Mon Sep 17 00:00:00 2001 +From b2ba6f34639002b6150753bd3a469d055a50b95f Mon Sep 17 00:00:00 2001 From: Denis Ciocca Date: Fri, 25 Jan 2013 23:44:00 +0000 Subject: [PATCH 03/11] iio:gyro: Add STMicroelectronics gyroscopes driver @@ -11,13 +11,13 @@ Signed-off-by: Denis Ciocca Reviewed-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron --- - drivers/iio/gyro/Kconfig | 30 +++ - drivers/iio/gyro/Makefile | 7 + - drivers/iio/gyro/st_gyro.h | 45 +++++ - drivers/iio/gyro/st_gyro_buffer.c | 114 ++++++++++++ - drivers/iio/gyro/st_gyro_core.c | 363 +++++++++++++++++++++++++++++++++++++ - drivers/iio/gyro/st_gyro_i2c.c | 85 +++++++++ - drivers/iio/gyro/st_gyro_spi.c | 84 +++++++++ + drivers/iio/gyro/Kconfig | 30 ++++ + drivers/iio/gyro/Makefile | 7 + + drivers/iio/gyro/st_gyro.h | 45 +++++ + drivers/iio/gyro/st_gyro_buffer.c | 114 ++++++++++++ + drivers/iio/gyro/st_gyro_core.c | 363 ++++++++++++++++++++++++++++++++++++++ + drivers/iio/gyro/st_gyro_i2c.c | 85 +++++++++ + drivers/iio/gyro/st_gyro_spi.c | 84 +++++++++ 7 files changed, 728 insertions(+) create mode 100644 drivers/iio/gyro/st_gyro.h create mode 100644 drivers/iio/gyro/st_gyro_buffer.c @@ -801,5 +801,5 @@ index 0000000..8b4dcc5 +MODULE_DESCRIPTION("STMicroelectronics gyroscopes spi driver"); +MODULE_LICENSE("GPL v2"); -- -1.7.9.5 +1.9.0 diff --git a/patches/iio/0004-iio-magnetometer-Add-STMicroelectronics-magnetometer.patch b/patches/iio/0004-iio-magnetometer-Add-STMicroelectronics-magnetometer.patch index 4c245d42..96cea2b0 100644 --- a/patches/iio/0004-iio-magnetometer-Add-STMicroelectronics-magnetometer.patch +++ b/patches/iio/0004-iio-magnetometer-Add-STMicroelectronics-magnetometer.patch @@ -1,4 +1,4 @@ -From ea3f2ffdd06828da7aa5c1279f2ba1be4f7df882 Mon Sep 17 00:00:00 2001 +From b3dd152ae4e9edde1d40286150e3e257beb14e80 Mon Sep 17 00:00:00 2001 From: Denis Ciocca Date: Fri, 25 Jan 2013 23:44:00 +0000 Subject: [PATCH 04/11] iio:magnetometer: Add STMicroelectronics magnetometers @@ -11,13 +11,13 @@ LSM303DLHC, LSM303DLM, LIS3MDL. Signed-off-by: Denis Ciocca Signed-off-by: Jonathan Cameron --- - drivers/iio/magnetometer/Kconfig | 30 +++ - drivers/iio/magnetometer/Makefile | 7 + - drivers/iio/magnetometer/st_magn.h | 45 ++++ - drivers/iio/magnetometer/st_magn_buffer.c | 98 +++++++ - drivers/iio/magnetometer/st_magn_core.c | 394 +++++++++++++++++++++++++++++ - drivers/iio/magnetometer/st_magn_i2c.c | 81 ++++++ - drivers/iio/magnetometer/st_magn_spi.c | 80 ++++++ + drivers/iio/magnetometer/Kconfig | 30 +++ + drivers/iio/magnetometer/Makefile | 7 + + drivers/iio/magnetometer/st_magn.h | 45 ++++ + drivers/iio/magnetometer/st_magn_buffer.c | 98 ++++++++ + drivers/iio/magnetometer/st_magn_core.c | 394 ++++++++++++++++++++++++++++++ + drivers/iio/magnetometer/st_magn_i2c.c | 81 ++++++ + drivers/iio/magnetometer/st_magn_spi.c | 80 ++++++ 7 files changed, 735 insertions(+) create mode 100644 drivers/iio/magnetometer/st_magn.h create mode 100644 drivers/iio/magnetometer/st_magn_buffer.c @@ -808,5 +808,5 @@ index 0000000..94547e7 +MODULE_DESCRIPTION("STMicroelectronics magnetometers spi driver"); +MODULE_LICENSE("GPL v2"); -- -1.7.9.5 +1.9.0 diff --git a/patches/iio/0005-iio-magn-Add-sensors_supported-in-st_magn_sensors.patch b/patches/iio/0005-iio-magn-Add-sensors_supported-in-st_magn_sensors.patch index 1de797b5..d9239e70 100644 --- a/patches/iio/0005-iio-magn-Add-sensors_supported-in-st_magn_sensors.patch +++ b/patches/iio/0005-iio-magn-Add-sensors_supported-in-st_magn_sensors.patch @@ -1,11 +1,11 @@ -From d9bc85d975b725d2ef498c2ba69f5082f3cea545 Mon Sep 17 00:00:00 2001 +From c27e2b8d4e7efc85eb9955f475f516fe7d8739b7 Mon Sep 17 00:00:00 2001 From: Denis Ciocca Date: Tue, 29 Jan 2013 12:27:30 +0100 Subject: [PATCH 05/11] iio:magn: Add sensors_supported in st_magn_sensors This patch add sensors_supported struct to st_magn_sensors. Without this the probe can't match the WhoAmI and sensor name. --- - drivers/iio/magnetometer/st_magn_core.c | 7 +++++++ + drivers/iio/magnetometer/st_magn_core.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/iio/magnetometer/st_magn_core.c b/drivers/iio/magnetometer/st_magn_core.c @@ -34,5 +34,5 @@ index 1dfcb41..a69fbe1 100644 .odr = { .addr = ST_MAGN_2_ODR_ADDR, -- -1.7.9.5 +1.9.0 diff --git a/patches/iio/0006-Invensense-MPU6050-Device-Driver.patch b/patches/iio/0006-Invensense-MPU6050-Device-Driver.patch index 6aa77f0c..bec2c66e 100644 --- a/patches/iio/0006-Invensense-MPU6050-Device-Driver.patch +++ b/patches/iio/0006-Invensense-MPU6050-Device-Driver.patch @@ -1,4 +1,4 @@ -From 24e98c1a23a802da31d2e5c32f88d03d743f7251 Mon Sep 17 00:00:00 2001 +From 04474847f00950ccc3ee44bb0c09a912ce67c371 Mon Sep 17 00:00:00 2001 From: Ge Gao Date: Sat, 2 Feb 2013 00:26:00 +0000 Subject: [PATCH 06/11] Invensense MPU6050 Device Driver. @@ -9,16 +9,16 @@ Signed-off-by: Ge Gao Reviewed-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron --- - Documentation/ABI/testing/sysfs-bus-iio-mpu6050 | 13 + - drivers/iio/imu/Kconfig | 2 + - drivers/iio/imu/Makefile | 2 + - drivers/iio/imu/inv_mpu6050/Kconfig | 13 + - drivers/iio/imu/inv_mpu6050/Makefile | 6 + - drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 795 ++++++++++++++++++++++ - drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h | 246 +++++++ - drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c | 196 ++++++ - drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c | 155 +++++ - include/linux/platform_data/invensense_mpu6050.h | 31 + + Documentation/ABI/testing/sysfs-bus-iio-mpu6050 | 13 + + drivers/iio/imu/Kconfig | 2 + + drivers/iio/imu/Makefile | 2 + + drivers/iio/imu/inv_mpu6050/Kconfig | 13 + + drivers/iio/imu/inv_mpu6050/Makefile | 6 + + drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 795 +++++++++++++++++++++++ + drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h | 246 +++++++ + drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c | 196 ++++++ + drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c | 155 +++++ + include/linux/platform_data/invensense_mpu6050.h | 31 + 10 files changed, 1459 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-mpu6050 create mode 100644 drivers/iio/imu/inv_mpu6050/Kconfig @@ -1553,5 +1553,5 @@ index 0000000..ad3aa7b + +#endif -- -1.7.9.5 +1.9.0 diff --git a/patches/iio/0007-iio-imu-inv_mpu6050-depends-on-IIO_BUFFER.patch b/patches/iio/0007-iio-imu-inv_mpu6050-depends-on-IIO_BUFFER.patch index 85d04500..0baecf8e 100644 --- a/patches/iio/0007-iio-imu-inv_mpu6050-depends-on-IIO_BUFFER.patch +++ b/patches/iio/0007-iio-imu-inv_mpu6050-depends-on-IIO_BUFFER.patch @@ -1,4 +1,4 @@ -From d826f9d78e186e863fb7da4bc56af1b9c42a631d Mon Sep 17 00:00:00 2001 +From 7460f7d8c96681461e7e93507bc5b0b87bd30fa5 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Fri, 1 Mar 2013 15:21:00 +0000 Subject: [PATCH 07/11] iio/imu: inv_mpu6050 depends on IIO_BUFFER @@ -15,7 +15,7 @@ function ‘iio_push_to_buffers’ [-Werror=implicit-function-declaration] Signed-off-by: Guenter Roeck Signed-off-by: Jonathan Cameron --- - drivers/iio/imu/inv_mpu6050/Kconfig | 1 + + drivers/iio/imu/inv_mpu6050/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iio/imu/inv_mpu6050/Kconfig b/drivers/iio/imu/inv_mpu6050/Kconfig @@ -31,5 +31,5 @@ index b5cfa3a..361b232 100644 help This driver supports the Invensense MPU6050 devices. -- -1.7.9.5 +1.9.0 diff --git a/patches/iio/0008-using-kfifo_in_spinlocked-instead-of-separate-code.patch b/patches/iio/0008-using-kfifo_in_spinlocked-instead-of-separate-code.patch index 14fb6a13..b579a042 100644 --- a/patches/iio/0008-using-kfifo_in_spinlocked-instead-of-separate-code.patch +++ b/patches/iio/0008-using-kfifo_in_spinlocked-instead-of-separate-code.patch @@ -1,4 +1,4 @@ -From a62f916954c84f846ce4a3d43d4de24f62d67f29 Mon Sep 17 00:00:00 2001 +From 20d27cef2951f6d7acfb916a5b10e692f1cc94f0 Mon Sep 17 00:00:00 2001 From: Ge Gao Date: Mon, 4 Mar 2013 23:27:00 +0000 Subject: [PATCH 08/11] using kfifo_in_spinlocked instead of separate code. @@ -6,7 +6,7 @@ Subject: [PATCH 08/11] using kfifo_in_spinlocked instead of separate code. Signed-off-by: Ge Gao Signed-off-by: Jonathan Cameron --- - drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c | 5 ++--- + drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c @@ -26,5 +26,5 @@ index 331781f..7da0832 100644 return IRQ_WAKE_THREAD; } -- -1.7.9.5 +1.9.0 diff --git a/patches/iio/0009-pwm-add-pca9685-driver.patch b/patches/iio/0009-pwm-add-pca9685-driver.patch index b064bfac..d6e98cf2 100644 --- a/patches/iio/0009-pwm-add-pca9685-driver.patch +++ b/patches/iio/0009-pwm-add-pca9685-driver.patch @@ -1,4 +1,4 @@ -From ebab07045209c0bb30be16fdcd8f4d8b7d11f37b Mon Sep 17 00:00:00 2001 +From 771dce98b784cf56ef4d0cd3197c5bb8b3f836ed Mon Sep 17 00:00:00 2001 From: Steffen Trumtrar Date: Thu, 30 May 2013 09:50:12 +0200 Subject: [PATCH 09/11] pwm: add pca9685 driver @@ -13,10 +13,10 @@ Signed-off-by: Steffen Trumtrar [thierry.reding@gmail.com: style and whitespace cleanups] Signed-off-by: Thierry Reding --- - .../devicetree/bindings/pwm/nxp,pca9685-pwm.txt | 27 ++ - drivers/pwm/Kconfig | 9 + - drivers/pwm/Makefile | 1 + - drivers/pwm/pwm-pca9685.c | 298 ++++++++++++++++++++ + .../devicetree/bindings/pwm/nxp,pca9685-pwm.txt | 27 ++ + drivers/pwm/Kconfig | 9 + + drivers/pwm/Makefile | 1 + + drivers/pwm/pwm-pca9685.c | 298 +++++++++++++++++++++ 4 files changed, 335 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/nxp,pca9685-pwm.txt create mode 100644 drivers/pwm/pwm-pca9685.c @@ -391,5 +391,5 @@ index 0000000..9d6903b +MODULE_DESCRIPTION("PWM driver for PCA9685"); +MODULE_LICENSE("GPL"); -- -1.7.9.5 +1.9.0 diff --git a/patches/iio/0010-pwm-Fill-in-missing-.owner-fields.patch b/patches/iio/0010-pwm-Fill-in-missing-.owner-fields.patch index 0d7e0a08..c7776ee7 100644 --- a/patches/iio/0010-pwm-Fill-in-missing-.owner-fields.patch +++ b/patches/iio/0010-pwm-Fill-in-missing-.owner-fields.patch @@ -1,4 +1,4 @@ -From 08e322d2addd8a453160d613de4c57ca739e472b Mon Sep 17 00:00:00 2001 +From b6b59f504e96f0a235b5e65d66c13285d96c2467 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Wed, 12 Jun 2013 13:18:29 +0200 Subject: [PATCH 10/11] pwm: Fill in missing .owner fields @@ -12,15 +12,15 @@ Conflicts: drivers/pwm/pwm-atmel-tcb.c drivers/pwm/pwm-tegra.c --- - drivers/pwm/pwm-atmel-tcb.c | 447 +++++++++++++++++++++++++++++++++++++++++++ - drivers/pwm/pwm-bfin.c | 1 + - drivers/pwm/pwm-imx.c | 1 + - drivers/pwm/pwm-lpc32xx.c | 1 + - drivers/pwm/pwm-mxs.c | 1 + - drivers/pwm/pwm-pca9685.c | 1 + - drivers/pwm/pwm-puv3.c | 1 + - drivers/pwm/pwm-spear.c | 1 + - drivers/pwm/pwm-tegra.c | 1 + + drivers/pwm/pwm-atmel-tcb.c | 447 ++++++++++++++++++++++++++++++++++++++++++++ + drivers/pwm/pwm-bfin.c | 1 + + drivers/pwm/pwm-imx.c | 1 + + drivers/pwm/pwm-lpc32xx.c | 1 + + drivers/pwm/pwm-mxs.c | 1 + + drivers/pwm/pwm-pca9685.c | 1 + + drivers/pwm/pwm-puv3.c | 1 + + drivers/pwm/pwm-spear.c | 1 + + drivers/pwm/pwm-tegra.c | 1 + 9 files changed, 455 insertions(+) create mode 100644 drivers/pwm/pwm-atmel-tcb.c @@ -574,5 +574,5 @@ index 30c0e2b..1ddff7f 100644 }, .probe = tegra_pwm_probe, -- -1.7.9.5 +1.9.0 diff --git a/patches/iio/0011-pwm-pca9685-Fix-wrong-argument-to-set-MODE1_SLEEP-bi.patch b/patches/iio/0011-pwm-pca9685-Fix-wrong-argument-to-set-MODE1_SLEEP-bi.patch index b6290fe2..46c3f524 100644 --- a/patches/iio/0011-pwm-pca9685-Fix-wrong-argument-to-set-MODE1_SLEEP-bi.patch +++ b/patches/iio/0011-pwm-pca9685-Fix-wrong-argument-to-set-MODE1_SLEEP-bi.patch @@ -1,8 +1,7 @@ -From f09766b77a02a225ad60535de89c41a30b2685a7 Mon Sep 17 00:00:00 2001 +From 0cf7a3407590d4d1e4ec6d6bb23961dfcaee6343 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 20 Jun 2013 01:27:27 +0800 -Subject: [PATCH 11/11] pwm: pca9685: Fix wrong argument to set MODE1_SLEEP - bit +Subject: [PATCH 11/11] pwm: pca9685: Fix wrong argument to set MODE1_SLEEP bit Current code actually does not set MODE1_SLEEP bit because the new value for bitmask (0x1) is wrong. To set MODE1_SLEEP bit, we should pass MODE1_SLEEP @@ -12,7 +11,7 @@ Signed-off-by: Axel Lin Reviewed-by: Steffen Trumtrar Signed-off-by: Thierry Reding --- - drivers/pwm/pwm-pca9685.c | 5 +++-- + drivers/pwm/pwm-pca9685.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/pwm/pwm-pca9685.c b/drivers/pwm/pwm-pca9685.c @@ -39,5 +38,5 @@ index 2cef2bd..77b4e05 100644 return pwmchip_remove(&pca->chip); } -- -1.7.9.5 +1.9.0 diff --git a/patches/leds/0001-leds-leds-pwm-Convert-to-use-devm_get_pwm.patch b/patches/leds/0001-leds-leds-pwm-Convert-to-use-devm_get_pwm.patch index 93360165..fbf65b0e 100644 --- a/patches/leds/0001-leds-leds-pwm-Convert-to-use-devm_get_pwm.patch +++ b/patches/leds/0001-leds-leds-pwm-Convert-to-use-devm_get_pwm.patch @@ -1,4 +1,4 @@ -From f5759066c7b9abf3f491c15d87d0021c7c5144b3 Mon Sep 17 00:00:00 2001 +From 31f1747c6ff5a9b8e96d989bcf00ce63f3722038 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Fri, 21 Dec 2012 01:43:55 -0800 Subject: [PATCH 1/6] leds: leds-pwm: Convert to use devm_get_pwm @@ -10,8 +10,8 @@ LED functionality. Signed-off-by: Peter Ujfalusi Signed-off-by: Bryan Wu --- - drivers/leds/leds-pwm.c | 19 ++++++------------- - include/linux/leds_pwm.h | 2 +- + drivers/leds/leds-pwm.c | 19 ++++++------------- + include/linux/leds_pwm.h | 2 +- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c @@ -84,5 +84,5 @@ index 33a0711..a65e964 100644 unsigned max_brightness; unsigned pwm_period_ns; -- -1.7.9.5 +1.9.0 diff --git a/patches/leds/0002-leds-leds-pwm-Preparing-the-driver-for-device-tree-s.patch b/patches/leds/0002-leds-leds-pwm-Preparing-the-driver-for-device-tree-s.patch index 3e7307a2..810bacd0 100644 --- a/patches/leds/0002-leds-leds-pwm-Preparing-the-driver-for-device-tree-s.patch +++ b/patches/leds/0002-leds-leds-pwm-Preparing-the-driver-for-device-tree-s.patch @@ -1,4 +1,4 @@ -From 2ebe8c9a7706bad81d2030a2a09e692fdffc8c47 Mon Sep 17 00:00:00 2001 +From 30ca1e408087dbc523696705990ba248bf7de464 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Fri, 21 Dec 2012 01:43:56 -0800 Subject: [PATCH 2/6] leds: leds-pwm: Preparing the driver for device tree @@ -10,7 +10,7 @@ to rearrange the data structures used by the drivers. Signed-off-by: Peter Ujfalusi Signed-off-by: Bryan Wu --- - drivers/leds/leds-pwm.c | 39 +++++++++++++++++++++++---------------- + drivers/leds/leds-pwm.c | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c @@ -105,5 +105,5 @@ index 351257c..c767837 100644 return 0; } -- -1.7.9.5 +1.9.0 diff --git a/patches/leds/0003-leds-leds-pwm-Simplify-cleanup-code.patch b/patches/leds/0003-leds-leds-pwm-Simplify-cleanup-code.patch index 4ae420ef..05eeed94 100644 --- a/patches/leds/0003-leds-leds-pwm-Simplify-cleanup-code.patch +++ b/patches/leds/0003-leds-leds-pwm-Simplify-cleanup-code.patch @@ -1,4 +1,4 @@ -From 103ad42ce28e631dd4e8f43fdf2cc9bbe72d6ba1 Mon Sep 17 00:00:00 2001 +From a0afa8ff3e7337e87a1f6fcd39387519fd68b411 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Fri, 21 Dec 2012 01:44:00 -0800 Subject: [PATCH 3/6] leds: leds-pwm: Simplify cleanup code @@ -14,7 +14,7 @@ if (i > 0) Signed-off-by: Peter Ujfalusi Signed-off-by: Bryan Wu --- - drivers/leds/leds-pwm.c | 6 ++---- + drivers/leds/leds-pwm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c @@ -35,5 +35,5 @@ index c767837..46f4e44 100644 return ret; } -- -1.7.9.5 +1.9.0 diff --git a/patches/leds/0004-leds-leds-pwm-Add-device-tree-bindings.patch b/patches/leds/0004-leds-leds-pwm-Add-device-tree-bindings.patch index 7da84fb4..3ed74ae7 100644 --- a/patches/leds/0004-leds-leds-pwm-Add-device-tree-bindings.patch +++ b/patches/leds/0004-leds-leds-pwm-Add-device-tree-bindings.patch @@ -1,4 +1,4 @@ -From fb038aff01ff6ac81535c0c1751b4b2846454f16 Mon Sep 17 00:00:00 2001 +From 00d71fa859d804d63bc3778a31babf07fc04e81e Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Fri, 21 Dec 2012 01:44:01 -0800 Subject: [PATCH 4/6] leds: leds-pwm: Add device tree bindings @@ -17,8 +17,8 @@ Signed-off-by: Peter Ujfalusi Acked-by: Grant Likely Signed-off-by: Bryan Wu --- - .../devicetree/bindings/leds/leds-pwm.txt | 48 +++++++++ - drivers/leds/leds-pwm.c | 112 ++++++++++++++++---- + .../devicetree/bindings/leds/leds-pwm.txt | 48 +++++++++ + drivers/leds/leds-pwm.c | 112 +++++++++++++++++---- 2 files changed, 140 insertions(+), 20 deletions(-) create mode 100644 Documentation/devicetree/bindings/leds/leds-pwm.txt @@ -240,5 +240,5 @@ index 46f4e44..a1ea5f6 100644 }; -- -1.7.9.5 +1.9.0 diff --git a/patches/leds/0005-leds-leds-pwm-Defer-led_pwm_set-if-PWM-can-sleep.patch b/patches/leds/0005-leds-leds-pwm-Defer-led_pwm_set-if-PWM-can-sleep.patch index 08853df7..1884eed2 100644 --- a/patches/leds/0005-leds-leds-pwm-Defer-led_pwm_set-if-PWM-can-sleep.patch +++ b/patches/leds/0005-leds-leds-pwm-Defer-led_pwm_set-if-PWM-can-sleep.patch @@ -1,4 +1,4 @@ -From 85575999ccd351004f1452cbf06142eaeefc79b8 Mon Sep 17 00:00:00 2001 +From 5b89ab489fac3fa99ee7ce1809500cb823e2c54f Mon Sep 17 00:00:00 2001 From: Florian Vaussard Date: Mon, 28 Jan 2013 06:00:59 -0800 Subject: [PATCH 5/6] leds: leds-pwm: Defer led_pwm_set() if PWM can sleep @@ -11,7 +11,7 @@ Reviewed-by: Peter Ujfalusi Acked-by: Thierry Reding Signed-off-by: Bryan Wu --- - drivers/leds/leds-pwm.c | 50 +++++++++++++++++++++++++++++++++++++++-------- + drivers/leds/leds-pwm.c | 50 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c @@ -118,5 +118,5 @@ index a1ea5f6..faf52c0 100644 return 0; } -- -1.7.9.5 +1.9.0 diff --git a/patches/leds/0006-leds-pwm-Enable-compilation-on-this-version-of-the-k.patch b/patches/leds/0006-leds-pwm-Enable-compilation-on-this-version-of-the-k.patch index b97accbc..1d3192d9 100644 --- a/patches/leds/0006-leds-pwm-Enable-compilation-on-this-version-of-the-k.patch +++ b/patches/leds/0006-leds-pwm-Enable-compilation-on-this-version-of-the-k.patch @@ -1,12 +1,12 @@ -From 1981253cbc5e0619f95d5e5f249b6a33ded88c3c Mon Sep 17 00:00:00 2001 +From 33ffdd8de66266654341900cdc25c03b0127778b Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Wed, 10 Jul 2013 23:50:05 +0300 Subject: [PATCH 6/6] leds: pwm: Enable compilation on this version of the kernel --- - drivers/leds/Kconfig | 2 +- - drivers/leds/leds-pwm.c | 7 ++++--- + drivers/leds/Kconfig | 2 +- + drivers/leds/leds-pwm.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig @@ -55,5 +55,5 @@ index faf52c0..730c7c6 100644 INIT_WORK(&led_dat->work, led_pwm_work); -- -1.7.9.5 +1.9.0 diff --git a/patches/logibone/0001-Instering-Logibone-driver-into-kernel.patch b/patches/logibone/0001-Instering-Logibone-driver-into-kernel.patch new file mode 100644 index 00000000..47608baf --- /dev/null +++ b/patches/logibone/0001-Instering-Logibone-driver-into-kernel.patch @@ -0,0 +1,921 @@ +From ebcbbc0bef12b29860d169bcd48d0a9a78a1e300 Mon Sep 17 00:00:00 2001 +From: Jonathan Piat +Date: Mon, 28 Apr 2014 23:13:03 +0200 +Subject: [PATCH 1/2] Instering Logibone driver into kernel + +--- + drivers/misc/cape/beaglebone/Kconfig | 2 + + drivers/misc/cape/beaglebone/Makefile | 1 + + drivers/misc/cape/beaglebone/logibone/Kconfig | 6 + + drivers/misc/cape/beaglebone/logibone/Makefile | 2 + + drivers/misc/cape/beaglebone/logibone/config.c | 234 +++++++++++ + drivers/misc/cape/beaglebone/logibone/config.h | 6 + + drivers/misc/cape/beaglebone/logibone/drvr.h | 35 ++ + drivers/misc/cape/beaglebone/logibone/generic.h | 11 + + drivers/misc/cape/beaglebone/logibone/ioctl.c | 20 + + drivers/misc/cape/beaglebone/logibone/ioctl.h | 13 + + drivers/misc/cape/beaglebone/logibone/main_dma.c | 490 +++++++++++++++++++++++ + 11 files changed, 820 insertions(+) + create mode 100644 drivers/misc/cape/beaglebone/logibone/Kconfig + create mode 100644 drivers/misc/cape/beaglebone/logibone/Makefile + create mode 100644 drivers/misc/cape/beaglebone/logibone/config.c + create mode 100644 drivers/misc/cape/beaglebone/logibone/config.h + create mode 100644 drivers/misc/cape/beaglebone/logibone/drvr.h + create mode 100644 drivers/misc/cape/beaglebone/logibone/generic.h + create mode 100644 drivers/misc/cape/beaglebone/logibone/ioctl.c + create mode 100644 drivers/misc/cape/beaglebone/logibone/ioctl.h + create mode 100644 drivers/misc/cape/beaglebone/logibone/main_dma.c + +diff --git a/drivers/misc/cape/beaglebone/Kconfig b/drivers/misc/cape/beaglebone/Kconfig +index ae58216..9569924 100644 +--- a/drivers/misc/cape/beaglebone/Kconfig ++++ b/drivers/misc/cape/beaglebone/Kconfig +@@ -45,3 +45,5 @@ config CAPE_BEAGLEBONE_NIXIE + default n + help + Say Y here to include support for the Nixie Cape ++ ++source "drivers/misc/cape/beaglebone/logibone/Kconfig" +diff --git a/drivers/misc/cape/beaglebone/Makefile b/drivers/misc/cape/beaglebone/Makefile +index 097e25b..e8187b9 100644 +--- a/drivers/misc/cape/beaglebone/Makefile ++++ b/drivers/misc/cape/beaglebone/Makefile +@@ -9,3 +9,4 @@ obj-$(CONFIG_CAPE_BEAGLEBONE) += capemgr.o + obj-$(CONFIG_CAPE_BEAGLEBONE_GEIGER) += cape-bone-geiger.o + obj-$(CONFIG_CAPE_BEAGLEBONE_ARGUS) += cape-bone-argus.o + obj-$(CONFIG_CAPE_BEAGLEBONE_NIXIE) += cape-bone-nixie.o ++obj-y += logibone/ +diff --git a/drivers/misc/cape/beaglebone/logibone/Kconfig b/drivers/misc/cape/beaglebone/logibone/Kconfig +new file mode 100644 +index 0000000..2d2e891 +--- /dev/null ++++ b/drivers/misc/cape/beaglebone/logibone/Kconfig +@@ -0,0 +1,6 @@ ++config CAPE_LOGIBONE_R1 ++ tristate "Beaglebone Logibone Cape" ++ depends on CAPE_BEAGLEBONE ++ default n ++ help ++ Say Y here to include support for the Nixie Cape +diff --git a/drivers/misc/cape/beaglebone/logibone/Makefile b/drivers/misc/cape/beaglebone/logibone/Makefile +new file mode 100644 +index 0000000..9a1833f +--- /dev/null ++++ b/drivers/misc/cape/beaglebone/logibone/Makefile +@@ -0,0 +1,2 @@ ++obj-$(CONFIG_CAPE_LOGIBONE_R1) += logibone_r1_dma.o ++logibone_r1_dma-objs := main_dma.o config.o ioctl.o +diff --git a/drivers/misc/cape/beaglebone/logibone/config.c b/drivers/misc/cape/beaglebone/logibone/config.c +new file mode 100644 +index 0000000..fe01653 +--- /dev/null ++++ b/drivers/misc/cape/beaglebone/logibone/config.c +@@ -0,0 +1,234 @@ ++#include ++#include ++#include ++#include ++#include ++ ++ ++//SSI ++#define SSI_CLK 110 ++#define SSI_DATA 112 ++#define SSI_DONE 3 ++#define SSI_PROG 5 ++#define SSI_INIT 2 ++#define MODE0 0 ++#define MODE1 1 ++#define SSI_DELAY 1 ++ ++//GPIO ++#define GPIO3_BASE 0x481AE000 ++#define GPIO3_SETDATAOUT *(gpio_regs+1) ++#define GPIO3_CLEARDATAOUT *(gpio_regs) ++ ++//I2C ++#define I2C_IO_EXP_CONFIG_REG 0x03 ++#define I2C_IO_EXP_IN_REG 0x00 ++#define I2C_IO_EXP_OUT_REG 0x01 ++ ++ ++volatile unsigned * gpio_regs; ++ ++ ++static inline void __delay_cycles(unsigned long cycles) ++{ ++ while (cycles != 0) { ++ cycles--; ++ } ++} ++ ++static inline void ssiSetClk(void) ++{ ++ //gpio_set_value(SSI_CLK, 1); ++ GPIO3_SETDATAOUT = (1 << 14); ++} ++ ++static inline void ssiClearClk(void) ++{ ++ //gpio_set_value(SSI_CLK, 0); ++ GPIO3_CLEARDATAOUT = (1 << 14); ++} ++ ++static inline void ssiSetData(void) ++{ ++ //gpio_set_value(SSI_DATA, 1); ++ GPIO3_SETDATAOUT = (1 << 16); ++} ++ ++static inline void ssiClearData(void) ++{ ++ //gpio_set_value(SSI_DATA, 0); ++ GPIO3_CLEARDATAOUT = (1 << 16); ++} ++ ++static inline void serialConfigWriteByte(unsigned char val) ++{ ++ unsigned char bitCount = 0; ++ unsigned char valBuf = val; ++ ++ for (bitCount = 0; bitCount < 8; bitCount++) { ++ ssiClearClk(); ++ ++ if ((valBuf & 0x80) != 0) { ++ ssiSetData(); ++ } else { ++ ssiClearData(); ++ } ++ ++ //__delay_cycles(SSI_DELAY); ++ ssiSetClk(); ++ valBuf = (valBuf << 1); ++ //__delay_cycles(SSI_DELAY); ++ } ++} ++ ++static inline void i2c_set_pin(struct i2c_client * io_cli, unsigned char pin, unsigned char val) ++{ ++ unsigned char i2c_buffer[2]; ++ ++ i2c_buffer[0] = I2C_IO_EXP_OUT_REG; ++ i2c_master_send(io_cli, i2c_buffer, 1); ++ i2c_master_recv(io_cli, &i2c_buffer[1], 1); ++ ++ if (val == 1) { ++ i2c_buffer[1] |= (1 << pin); ++ } else { ++ i2c_buffer[1] &= ~(1 << pin); ++ } ++ ++ i2c_master_send(io_cli, i2c_buffer, 2); ++} ++ ++static inline unsigned char i2c_get_pin(struct i2c_client * io_cli, unsigned char pin) ++{ ++ unsigned char i2c_buffer; ++ ++ i2c_buffer = I2C_IO_EXP_IN_REG; ++ i2c_master_send(io_cli, &i2c_buffer, 1); ++ i2c_master_recv(io_cli, &i2c_buffer, 1); ++ //printk("reading value %x \n", i2c_buffer); ++ ++ return ((i2c_buffer >> pin) & 0x01); ++} ++ ++int loadBitFile(struct i2c_client * io_cli, const unsigned char * bitBuffer_user, const unsigned int length) ++{ ++ int iCfg; ++ unsigned long int i; ++ unsigned long int timer = 0; ++ unsigned char * bitBuffer; ++ unsigned char i2c_buffer[4]; ++ ++ //request_mem_region(GPIO3_BASE + 0x190, 8, gDrvrName); ++ gpio_regs = ioremap_nocache(GPIO3_BASE + 0x190, 2 * sizeof(int)); ++ ++ bitBuffer = kmalloc(length, GFP_KERNEL); ++ ++ if (bitBuffer == NULL || copy_from_user(bitBuffer, bitBuffer_user, length)) { ++ printk("Failed allocate buffer for configuration file \n"); ++ ++ return -ENOTTY; ++ } ++ ++ iCfg = gpio_request(SSI_CLK, "ssi_clk"); ++ ++ if (iCfg < 0) { ++ printk("Failed to take control over ssi_clk pin \n"); ++ ++ return -ENOTTY; ++ } ++ ++ iCfg = gpio_request(SSI_DATA, "ssi_data"); ++ ++ if (iCfg < 0) { ++ printk("Failed to take control over ssi_data pin \n"); ++ ++ return -ENOTTY; ++ } ++ ++ i2c_buffer[0] = I2C_IO_EXP_CONFIG_REG; ++ i2c_buffer[1] = 0xFF; ++ i2c_buffer[1] &= ~((1 << SSI_PROG) | (1 << MODE1) | (1 << MODE0)); ++ i2c_master_send(io_cli, i2c_buffer, 2); // set SSI_PROG, MODE0, MODE1 as output others as inputs ++ i2c_set_pin(io_cli, MODE0, 1); ++ i2c_set_pin(io_cli, MODE1, 1); ++ i2c_set_pin(io_cli, SSI_PROG, 0); ++ ++ gpio_direction_output(SSI_CLK, 0); ++ gpio_direction_output(SSI_DATA, 0); ++ ++ gpio_set_value(SSI_CLK, 0); ++ i2c_set_pin(io_cli, SSI_PROG, 1); ++ __delay_cycles(10 * SSI_DELAY); ++ i2c_set_pin(io_cli, SSI_PROG, 0); ++ __delay_cycles(5 * SSI_DELAY); ++ ++ while (i2c_get_pin(io_cli, SSI_INIT) > 0 && timer < 200) ++ timer++; // waiting for init pin to go down ++ ++ if (timer >= 200) { ++ printk("FPGA did not answer to prog request, init pin not going low \n"); ++ i2c_set_pin(io_cli, SSI_PROG, 1); ++ gpio_free(SSI_CLK); ++ gpio_free(SSI_DATA); ++ ++ return -ENOTTY; ++ } ++ ++ timer = 0; ++ __delay_cycles(5 * SSI_DELAY); ++ i2c_set_pin(io_cli, SSI_PROG, 1); ++ ++ while (i2c_get_pin(io_cli, SSI_INIT) == 0 && timer < 256) { // need to find a better way ... ++ timer++; // waiting for init pin to go up ++ } ++ ++ if (timer >= 256) { ++ printk("FPGA did not answer to prog request, init pin not going high \n"); ++ gpio_free(SSI_CLK); ++ gpio_free(SSI_DATA); ++ ++ return -ENOTTY; ++ } ++ ++ timer = 0; ++ printk("Starting configuration of %d bits \n", length * 8); ++ ++ for (i = 0; i < length; i++) { ++ serialConfigWriteByte(bitBuffer[i]); ++ schedule(); ++ } ++ ++ printk("Waiting for done pin to go high \n"); ++ ++ while (timer < 50) { ++ ssiClearClk(); ++ __delay_cycles(SSI_DELAY); ++ ssiSetClk(); ++ __delay_cycles(SSI_DELAY); ++ timer++; ++ } ++ ++ gpio_set_value(SSI_CLK, 0); ++ gpio_set_value(SSI_DATA, 1); ++ ++ if (i2c_get_pin(io_cli, SSI_DONE) == 0) { ++ printk("FPGA prog failed, done pin not going high \n"); ++ gpio_free(SSI_CLK); ++ gpio_free(SSI_DATA); ++ ++ return -ENOTTY; ++ } ++ ++ i2c_buffer[0] = I2C_IO_EXP_CONFIG_REG; ++ i2c_buffer[1] = 0xDC; ++ i2c_master_send(io_cli, i2c_buffer, 2); // set all unused config pins as input (keeping mode pins and PROG as output) ++ gpio_direction_input(SSI_CLK); ++ gpio_direction_input(SSI_DATA); ++ gpio_free(SSI_CLK); ++ gpio_free(SSI_DATA); ++ iounmap(gpio_regs); ++ //release_mem_region(GPIO3_BASE + 0x190, 8); ++ kfree(bitBuffer); ++ ++ return length; ++} +diff --git a/drivers/misc/cape/beaglebone/logibone/config.h b/drivers/misc/cape/beaglebone/logibone/config.h +new file mode 100644 +index 0000000..f2e3f66 +--- /dev/null ++++ b/drivers/misc/cape/beaglebone/logibone/config.h +@@ -0,0 +1,6 @@ ++#ifndef __CONFIG_H__ ++#define __CONFIG_H__ ++ ++int loadBitFile(struct i2c_client * io_cli, const unsigned char * bitBuffer_user, const unsigned int length); ++ ++#endif +diff --git a/drivers/misc/cape/beaglebone/logibone/drvr.h b/drivers/misc/cape/beaglebone/logibone/drvr.h +new file mode 100644 +index 0000000..2051369 +--- /dev/null ++++ b/drivers/misc/cape/beaglebone/logibone/drvr.h +@@ -0,0 +1,35 @@ ++#ifndef __DRVR_H__ ++#define __DRVR_H__ ++ ++#include ++ ++enum drvr_type{ ++ prog, ++ mem ++}; ++ ++struct drvr_prog{ ++ struct i2c_client * i2c_io; ++}; ++ ++ ++struct drvr_mem{ ++ unsigned short * base_addr; ++ unsigned short * virt_addr; ++ unsigned char * dma_buf; ++ int dma_chan; ++}; ++ ++union drvr_data{ ++ struct drvr_prog prog; ++ struct drvr_mem mem; ++}; ++ ++struct drvr_device{ ++ enum drvr_type type; ++ union drvr_data data; ++ struct cdev cdev; ++ unsigned char opened; ++}; ++ ++#endif +diff --git a/drivers/misc/cape/beaglebone/logibone/generic.h b/drivers/misc/cape/beaglebone/logibone/generic.h +new file mode 100644 +index 0000000..54a82a4 +--- /dev/null ++++ b/drivers/misc/cape/beaglebone/logibone/generic.h +@@ -0,0 +1,11 @@ ++#define DEVICE_NAME "logibone" ++#define DEVICE_NAME_MEM "logibone_mem" ++ ++//I2C ++#define I2C_IO_EXP_ADDR 0x24 ++ ++//FPGA ++#define FPGA_BASE_ADDR 0x01000000 ++#define FPGA_MEM_SIZE 131072 ++ ++#define MAX_DMA_TRANSFER_IN_BYTES (32768) +diff --git a/drivers/misc/cape/beaglebone/logibone/ioctl.c b/drivers/misc/cape/beaglebone/logibone/ioctl.c +new file mode 100644 +index 0000000..84be5fd +--- /dev/null ++++ b/drivers/misc/cape/beaglebone/logibone/ioctl.c +@@ -0,0 +1,20 @@ ++#include ++#include ++#include ++#include /* copy_to_user */ ++#include "ioctl.h" ++#include "drvr.h" ++ ++ ++long ioctl_init() { ++ return 0; ++} ++ ++void ioctl_exit() { ++} ++ ++long dm_ioctl(struct file *filp, unsigned int cmd, unsigned long arg){ ++ printk("ioctl failed \n"); ++ ++ return -ENOTTY; ++} +diff --git a/drivers/misc/cape/beaglebone/logibone/ioctl.h b/drivers/misc/cape/beaglebone/logibone/ioctl.h +new file mode 100644 +index 0000000..989bfca +--- /dev/null ++++ b/drivers/misc/cape/beaglebone/logibone/ioctl.h +@@ -0,0 +1,13 @@ ++#ifndef __IOCTL_H__ ++#define __IOCTL_H__ ++ ++#include ++#include ++ ++#define MAJOR_NUM 100 ++ ++long ioctl_init(void); ++void ioctl_exit(void); ++long dm_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); ++ ++#endif +diff --git a/drivers/misc/cape/beaglebone/logibone/main_dma.c b/drivers/misc/cape/beaglebone/logibone/main_dma.c +new file mode 100644 +index 0000000..8228b33 +--- /dev/null ++++ b/drivers/misc/cape/beaglebone/logibone/main_dma.c +@@ -0,0 +1,490 @@ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include /* copy_to_user */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++//device tree support ++#include ++#include ++#include ++#include ++#include ++#include "generic.h" ++#include "config.h" ++#include "drvr.h" ++#include "ioctl.h" ++ ++ ++//#define PROFILE //uncoment to enable code profile ++ ++static int dm_open(struct inode *inode, struct file *filp); ++static int dm_release(struct inode *inode, struct file *filp); ++static ssize_t dm_write(struct file *filp, const char *buf, size_t count, loff_t *f_pos); ++static ssize_t dm_read(struct file *filp, char *buf, size_t count, loff_t *f_pos); ++static int edma_memtomemcpy(int count, unsigned long src_addr, unsigned long trgt_addr, int dma_ch); ++static void dma_callback(unsigned lch, u16 ch_status, void *data); ++ ++ ++static struct i2c_board_info io_exp_info= { ++ I2C_BOARD_INFO("fpga_ctrl", I2C_IO_EXP_ADDR), ++}; ++ ++static struct file_operations dm_ops = { ++ .read = dm_read, ++ .write = dm_write, ++ .compat_ioctl = dm_ioctl, ++ .unlocked_ioctl = dm_ioctl, ++ .open = dm_open, ++ .release = dm_release, ++}; ++ ++ ++static dma_addr_t dmaphysbuf = 0; ++static volatile int irqraised1 = 0; ++static unsigned char gDrvrMajor = 0; ++static struct device * prog_device; ++static struct class * drvr_class; ++static struct drvr_device * drvr_devices; ++static struct completion dma_comp; ++ ++ ++#ifdef PROFILE ++ ++static struct timespec start_ts, end_ts ; //profile timer ++ ++inline void start_profile() { ++ getnstimeofday(&start_ts); ++} ++ ++inline void stop_profile() { ++ getnstimeofday(&end_ts); ++} ++ ++inline void compute_bandwidth(const unsigned int nb_byte) { ++ struct timespec dt=timespec_sub(end_ts,start_ts); ++ long elapsed_u_time=dt.tv_sec*1000000+dt.tv_nsec/1000; ++ ++ printk("Time=%ld us\n",elapsed_u_time); ++ printk("Bandwidth=%d kBytes/s\n",1000000*(nb_byte>>10)/elapsed_u_time); ++} ++ ++#endif ++ ++ ++ssize_t writeMem(struct file *filp, const char *buf, size_t count, loff_t *f_pos) ++{ ++ unsigned short int transfer_size; ++ ssize_t transferred = 0; ++ unsigned long src_addr, trgt_addr; ++ struct drvr_mem * mem_to_write = &(((struct drvr_device *) filp->private_data)->data.mem); ++/* ++ if (count % 2 != 0) { ++ printk("%s: write: Transfer must be 16bits aligned.\n", DEVICE_NAME); ++ ++ return -1; ++ } ++*/ ++ if (count < MAX_DMA_TRANSFER_IN_BYTES) { ++ transfer_size = count; ++ } else { ++ transfer_size = MAX_DMA_TRANSFER_IN_BYTES; ++ } ++ ++ if (mem_to_write->dma_buf == NULL) { ++ printk("failed to allocate DMA buffer \n"); ++ ++ return -1; ++ } ++ ++ trgt_addr = (unsigned long) &(mem_to_write->base_addr[(*f_pos)]); ++ src_addr = (unsigned long) dmaphysbuf; ++ ++ if (copy_from_user(mem_to_write->dma_buf, buf, transfer_size)) { ++ return -1; ++ } ++ ++ while (transferred < count) { ++ ++#ifdef PROFILE ++ printk("Write \n"); ++ start_profile(); ++#endif ++ ++ if (edma_memtomemcpy(transfer_size, src_addr, trgt_addr, mem_to_write->dma_chan) < 0) { ++ printk("%s: write: Failed to trigger EDMA transfer.\n", DEVICE_NAME); ++ ++ return -1; ++ } ++ ++#ifdef PROFILE ++ stop_profile(); ++ compute_bandwidth(transfer_size); ++#endif ++ ++ trgt_addr += transfer_size; ++ transferred += transfer_size; ++ ++ if ((count - transferred) < MAX_DMA_TRANSFER_IN_BYTES) { ++ transfer_size = count - transferred; ++ } else { ++ transfer_size = MAX_DMA_TRANSFER_IN_BYTES; ++ } ++ ++ if (copy_from_user(mem_to_write->dma_buf, &buf[transferred], transfer_size)) { ++ return -1; ++ } ++ } ++ ++ return transferred; ++} ++ ++ssize_t readMem(struct file *filp, char *buf, size_t count, loff_t *f_pos) ++{ ++ unsigned short int transfer_size; ++ ssize_t transferred = 0; ++ unsigned long src_addr, trgt_addr; ++ ++ struct drvr_mem * mem_to_read = &(((struct drvr_device *) filp->private_data)->data.mem); ++/* ++ if (count % 2 != 0) { ++ printk("%s: read: Transfer must be 16bits aligned.\n", DEVICE_NAME); ++ ++ return -1; ++ } ++*/ ++ if (count < MAX_DMA_TRANSFER_IN_BYTES) { ++ transfer_size = count; ++ } else { ++ transfer_size = MAX_DMA_TRANSFER_IN_BYTES; ++ } ++ ++ if (mem_to_read->dma_buf == NULL) { ++ printk("failed to allocate DMA buffer \n"); ++ ++ return -1; ++ } ++ ++ src_addr = (unsigned long) &(mem_to_read->base_addr[(*f_pos)]); ++ trgt_addr = (unsigned long) dmaphysbuf; ++ ++ while (transferred < count) { ++ ++#ifdef PROFILE ++ printk("Read \n"); ++ start_profile(); ++#endif ++ ++ if (edma_memtomemcpy(transfer_size, src_addr, trgt_addr, mem_to_read->dma_chan) < 0) { ++ ++ printk("%s: read: Failed to trigger EDMA transfer.\n", DEVICE_NAME); ++ ++ return -1; ++ } ++ ++ if (copy_to_user(&buf[transferred], mem_to_read->dma_buf, transfer_size)) { ++ return -1; ++ } ++ ++#ifdef PROFILE ++ stop_profile(); ++ compute_bandwidth(transfer_size); ++#endif ++ ++ src_addr += transfer_size; ++ transferred += transfer_size; ++ ++ if ((count - transferred) < MAX_DMA_TRANSFER_IN_BYTES) { ++ transfer_size = (count - transferred); ++ } else { ++ transfer_size = MAX_DMA_TRANSFER_IN_BYTES; ++ } ++ } ++ ++ return transferred; ++} ++ ++static int dm_open(struct inode *inode, struct file *filp) ++{ ++ struct drvr_device ++ * dev = container_of(inode->i_cdev, struct drvr_device, cdev); ++ ++ filp->private_data = dev; /* for other methods */ ++ ++ if (dev == NULL) { ++ printk("%s: Failed to retrieve driver structure !\n", DEVICE_NAME); ++ ++ return -1; ++ } ++ ++ if (dev->opened == 1) { ++ printk("%s: module already opened\n", DEVICE_NAME); ++ ++ return 0; ++ } ++ ++ if (dev->type != prog) { ++ struct drvr_mem* mem_dev = &((dev->data).mem); ++ ++ request_mem_region((unsigned long) mem_dev->base_addr, FPGA_MEM_SIZE, DEVICE_NAME); ++ mem_dev->virt_addr = ioremap_nocache(((unsigned long) mem_dev->base_addr), FPGA_MEM_SIZE); ++ mem_dev->dma_chan = edma_alloc_channel(EDMA_CHANNEL_ANY, dma_callback, NULL, EVENTQ_0); ++ mem_dev->dma_buf = (unsigned char *) dma_alloc_coherent(NULL, MAX_DMA_TRANSFER_IN_BYTES, &dmaphysbuf, 0); ++ printk("EDMA channel %d reserved \n", mem_dev->dma_chan); ++ ++ if (mem_dev->dma_chan < 0) { ++ printk("edma_alloc_channel failed for dma_ch, error: %d\n", mem_dev->dma_chan); ++ ++ return -1; ++ } ++ ++ printk("mem interface opened \n"); ++ } ++ ++ dev->opened = 1; ++ ++ return 0; ++} ++ ++static int dm_release(struct inode *inode, struct file *filp) ++{ ++ struct drvr_device ++ * dev = container_of(inode->i_cdev, struct drvr_device, cdev); ++ ++ if (dev->opened == 0) { ++ printk("%s: module already released\n", DEVICE_NAME); ++ ++ return 0; ++ } ++ ++ if (dev->type == mem) { ++ iounmap((dev->data.mem).virt_addr); ++ release_mem_region(((unsigned long) (dev->data.mem).base_addr), FPGA_MEM_SIZE); ++ printk("%s: Release: module released\n", DEVICE_NAME); ++ dma_free_coherent(NULL, MAX_DMA_TRANSFER_IN_BYTES, (dev->data.mem).dma_buf, dmaphysbuf); ++ edma_free_channel((dev->data.mem).dma_chan); ++ } ++ ++ dev->opened = 0; ++ ++ return 0; ++} ++ ++static ssize_t dm_write(struct file *filp, const char *buf, size_t count, loff_t *f_pos) ++{ ++ struct drvr_device * dev = filp->private_data; /* for other methods */ ++ ++ switch (dev->type) { ++ case prog: ++ return loadBitFile((dev->data.prog.i2c_io), buf, count); ++ ++ case mem: ++ return writeMem(filp, buf, count, f_pos); ++ ++ default: ++ return loadBitFile((dev->data.prog.i2c_io), buf, count); ++ }; ++} ++ ++static ssize_t dm_read(struct file *filp, char *buf, size_t count, loff_t *f_pos) ++{ ++ struct drvr_device * dev = filp->private_data; /* for other methods */ ++ ++ switch (dev->type) { ++ case prog: ++ return -1; ++ ++ case mem: ++ return readMem(filp, buf, count, f_pos); ++ ++ default: ++ return -1; ++ }; ++} ++ ++static void dm_exit(void) ++{ ++ dev_t devno = MKDEV(gDrvrMajor, 0); ++ ++ /* Get rid of our char dev entries */ ++ if (drvr_devices) { ++ int i; ++ ++ for (i = 0; i < 2; i++) { ++ if (i == 0) { ++ i2c_unregister_device(drvr_devices[i].data.prog.i2c_io); ++ } ++ ++ device_destroy(drvr_class, MKDEV(gDrvrMajor, i)); ++ cdev_del(&drvr_devices[i].cdev); ++ } ++ ++ kfree(drvr_devices); ++ } ++ ++ class_destroy(drvr_class); ++ /* cleanup_module is never called if registering failed */ ++ unregister_chrdev_region(devno, 2); ++ ++ ioctl_exit(); ++} ++ ++static int dm_init(void) ++{ ++ int result; ++ int devno; ++ struct drvr_mem * memDev; ++ struct drvr_prog * progDev; ++ struct i2c_adapter *i2c_adap; ++ ++ dev_t dev = 0; ++ result = alloc_chrdev_region(&dev, 0, 2, DEVICE_NAME); ++ gDrvrMajor = MAJOR(dev); ++ ++ if (result < 0) { ++ printk(KERN_ALERT "Registering char device failed with %d\n", gDrvrMajor); ++ ++ return result; ++ } ++ ++ drvr_devices = kmalloc(2 * sizeof(struct drvr_device), GFP_KERNEL); ++ ++ if (!drvr_devices) { ++ dm_exit(); ++ ++ return -ENOMEM; ++ } ++ ++ drvr_class = class_create(THIS_MODULE, DEVICE_NAME); ++ memset(drvr_devices, 0, 2 * sizeof(struct drvr_device)); ++ ++ /*Initializing main mdevice for prog*/ ++ devno = MKDEV(gDrvrMajor, 0); ++ drvr_devices[0].type = prog; ++ progDev = &(drvr_devices[0].data.prog); ++ prog_device = device_create(drvr_class, NULL, devno, NULL, DEVICE_NAME); // should create /dev entry for main node ++ drvr_devices[0].opened = 0; ++ ++ /*Do the i2c stuff*/ ++ i2c_adap = i2c_get_adapter(1); // todo need to check i2c adapter id ++ ++ if (i2c_adap == NULL) { ++ printk("Cannot get adapter 1 \n"); ++ dm_exit(); ++ ++ return -1; ++ } ++ ++ progDev->i2c_io = i2c_new_device(i2c_adap, &io_exp_info); ++ i2c_put_adapter(i2c_adap); //don't know what it does, seems to release the adapter ... ++ ++ if (prog_device == NULL) { ++ class_destroy(drvr_class); ++ drvr_devices[0].opened = 0; ++ dm_exit(); ++ ++ return -ENOMEM;; ++ } ++ ++ cdev_init(&(drvr_devices[0].cdev), &dm_ops); ++ drvr_devices[0].cdev.owner = THIS_MODULE; ++ drvr_devices[0].cdev.ops = &dm_ops; ++ cdev_add(&(drvr_devices[0].cdev), devno, 1); ++ //printk(KERN_INFO "'mknod /dev/%s c %d %d'.\n", DEVICE_NAME, gDrvrMajor, 0); ++ /* Initialize each device. */ ++ devno = MKDEV(gDrvrMajor, 1); ++ drvr_devices[1].type = mem; ++ memDev = &(drvr_devices[1].data.mem); ++ memDev->base_addr = (unsigned short *) (FPGA_BASE_ADDR); ++ device_create(drvr_class, prog_device, devno, NULL, DEVICE_NAME_MEM); ++ cdev_init(&(drvr_devices[1].cdev), &dm_ops); ++ (drvr_devices[1].cdev).owner = THIS_MODULE; ++ (drvr_devices[1].cdev).ops = &dm_ops; ++ cdev_add(&(drvr_devices[1].cdev), devno, 1); ++ drvr_devices[1].opened = 0; ++ init_completion(&dma_comp); ++ ++ return ioctl_init(); ++} ++ ++static int edma_memtomemcpy(int count, unsigned long src_addr, unsigned long trgt_addr, int dma_ch) ++{ ++ int result = 0; ++ struct edmacc_param param_set; ++ ++ edma_set_src(dma_ch, src_addr, INCR, W256BIT); ++ edma_set_dest(dma_ch, trgt_addr, INCR, W256BIT); ++ edma_set_src_index(dma_ch, 1, 1); ++ edma_set_dest_index(dma_ch, 1, 1); ++ /* A Sync Transfer Mode */ ++ edma_set_transfer_params(dma_ch, count, 1, 1, 1, ASYNC); //one block of one frame of one array of count bytes ++ ++ /* Enable the Interrupts on Channel 1 */ ++ edma_read_slot(dma_ch, ¶m_set); ++ param_set.opt |= ITCINTEN; ++ param_set.opt |= TCINTEN; ++ param_set.opt |= EDMA_TCC(EDMA_CHAN_SLOT(dma_ch)); ++ edma_write_slot(dma_ch, ¶m_set); ++ irqraised1 = 0u; ++ dma_comp.done = 0; ++ result = edma_start(dma_ch); ++ ++ if (result != 0) { ++ printk("%s: edma copy failed \n", DEVICE_NAME); ++ } ++ ++ wait_for_completion(&dma_comp); ++ ++ /* Check the status of the completed transfer */ ++ if (irqraised1 < 0) { ++ printk("%s: edma copy: Event Miss Occured!!!\n", DEVICE_NAME); ++ edma_stop(dma_ch); ++ result = -EAGAIN; ++ } ++ ++ return result; ++} ++ ++static void dma_callback(unsigned lch, u16 ch_status, void *data) ++{ ++ switch (ch_status) { ++ case DMA_COMPLETE: ++ irqraised1 = 1; ++ break; ++ ++ case DMA_CC_ERROR: ++ irqraised1 = -1; ++ break; ++ ++ default: ++ irqraised1 = -1; ++ break; ++ } ++ ++ complete(&dma_comp); ++} ++ ++static const struct of_device_id drvr_of_match[] = { ++ { .compatible = DEVICE_NAME, }, ++ { }, ++}; ++ ++MODULE_DEVICE_TABLE(of, drvr_of_match); ++MODULE_LICENSE("Dual BSD/GPL"); ++MODULE_AUTHOR("Jonathan Piat "); ++MODULE_AUTHOR("Martin Schmitt "); ++ ++module_init(dm_init); ++module_exit(dm_exit); +-- +1.9.0 + diff --git a/patches/logibone/0002-Adding-DTS-support-for-Logibone.patch b/patches/logibone/0002-Adding-DTS-support-for-Logibone.patch new file mode 100644 index 00000000..fdb94549 --- /dev/null +++ b/patches/logibone/0002-Adding-DTS-support-for-Logibone.patch @@ -0,0 +1,255 @@ +From d23fc74c3fad28af5b502c0490a4e5d3504b2b6b Mon Sep 17 00:00:00 2001 +From: Jonathan Piat +Date: Mon, 28 Apr 2014 23:13:49 +0200 +Subject: [PATCH 2/2] Adding DTS support for Logibone + +--- + firmware/Makefile | 3 +- + firmware/capes/BB-BONE-LOGIBONE-00R1.dts | 221 +++++++++++++++++++++++++++++++ + 2 files changed, 223 insertions(+), 1 deletion(-) + create mode 100644 firmware/capes/BB-BONE-LOGIBONE-00R1.dts + +diff --git a/firmware/Makefile b/firmware/Makefile +index f4ca0cc..0dde22d 100644 +--- a/firmware/Makefile ++++ b/firmware/Makefile +@@ -212,7 +212,8 @@ fw-shipped-$(CONFIG_CAPE_BEAGLEBONE) += \ + BB-BONE-CRYPTO-00A0.dtbo \ + bone_eqep0-00A0.dtbo \ + bone_eqep1-00A0.dtbo \ +- bone_eqep2-00A0.dtbo ++ bone_eqep2-00A0.dtbo \ ++ BB-BONE-LOGIBONE-00R1.dtbo + + # the geiger cape + fw-shipped-$(CONFIG_CAPE_BEAGLEBONE_GEIGER) += \ +diff --git a/firmware/capes/BB-BONE-LOGIBONE-00R1.dts b/firmware/capes/BB-BONE-LOGIBONE-00R1.dts +new file mode 100644 +index 0000000..75cd3f1 +--- /dev/null ++++ b/firmware/capes/BB-BONE-LOGIBONE-00R1.dts +@@ -0,0 +1,221 @@ ++/* ++ * optargs=capemgr.disable_partno=BB-BONE-EMMC-2G ++ * "arch/arm/boot/dts/am335x-boneblack.dts", find the section starting ++ * with "&mmc2 {" and in section change status = "okay" into "disabled". ++ * do once : mmc dev 1 ++ * mmc rstn 1 ++ * in uBoot or in uEnv and then delete ++ */ ++ ++ ++ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "ti,beaglebone", "ti,beaglebone-black"; ++ ++ /* identification */ ++ part-number = "BB-BONE-LOGIBONE"; ++ version = "00R1"; ++ ++ /* state the resources this cape uses */ ++ exclusive-use = ++ /* the pin header uses */ ++ "P8.25", /* gpmc: gpmc_ad0 */ ++ "P8.24", /* gpmc: gpmc_ad1 */ ++ "P8.5", /* gpmc: gpmc_ad2 */ ++ "P8.6", /* gpmc: gpmc_ad3 */ ++ "P8.23", /* gpmc: gpmc_ad4 */ ++ "P8.22", /* gpmc: gpmc_ad5 */ ++ "P8.3", /* gpmc: gpmc_ad6 */ ++ "P8.4", /* gpmc: gpmc_ad7 */ ++ "P8.19", /* gpmc: gpmc_ad8 */ ++ "P8.13", /* gpmc: gpmc_ad9 */ ++ "P8.14", /* gpmc: gpmc_ad10 */ ++ "P8.17", /* gpmc: gpmc_ad11 */ ++ "P8.12", /* gpmc: gpmc_ad12 */ ++ "P8.11", /* gpmc: gpmc_ad13 */ ++ "P8.16", /* gpmc: gpmc_ad14 */ ++ "P8.15", /* gpmc: gpmc_ad15 */ ++ "P9.12", /* gpmc: gpmc_ben1 */ ++ "P8.21", /* gpmc: gpmc_csn1 */ ++ "P8.18", /* gpmc: gpmc_clk */ ++ "P8.7", /* gpmc: gpmc_advn_ale */ ++ "P8.8", /* gpmc: gpmc_oen_ren */ ++ "P8.10", /* gpmc: gpmc_wen */ ++ "P8.9", /* gpmc: gpmc_ben0_cle */ ++ ++ "gpmc", ++ /* the reset pin */ ++ "eMMC_RSTn"; ++ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ fragment@0 { ++ target = <&am33xx_pinmux>; ++ __overlay__ { ++ ++ gpmc_pins: pinmux_gpmc_pins { ++ pinctrl-single,pins = < ++ 0x000 0x30 /* gpmc_ad0.gpmc_ad0 MODE0 | INPUT | PULLUP */ ++ 0x004 0x30 /* gpmc_ad1.gpmc_ad1 MODE0 | INPUT | PULLUP */ ++ 0x008 0x30 /* gpmc_ad2.gpmc_ad2 MODE0 | INPUT | PULLUP */ ++ 0x00C 0x30 /* gpmc_ad3.gpmc_ad3 MODE0 | INPUT | PULLUP */ ++ 0x010 0x30 /* gpmc_ad4.gpmc_ad4 MODE0 | INPUT | PULLUP */ ++ 0x014 0x30 /* gpmc_ad5.gpmc_ad5 MODE0 | INPUT | PULLUP */ ++ 0x018 0x30 /* gpmc_ad6.gpmc_ad6 MODE0 | INPUT | PULLUP */ ++ 0x01C 0x30 /* gpmc_ad7.gpmc_ad7 MODE0 | INPUT | PULLUP */ ++ 0x020 0x30 /* gpmc_ad8.gpmc_ad8 MODE0 | INPUT | PULLUP */ ++ 0x024 0x30 /* gpmc_ad9.gpmc_ad9 MODE0 | INPUT | PULLUP */ ++ 0x028 0x30 /* gpmc_ad10.gpmc_ad10 MODE0 | INPUT | PULLUP */ ++ 0x02C 0x30 /* gpmc_ad11.gpmc_ad11 MODE0 | INPUT | PULLUP */ ++ 0x030 0x30 /* gpmc_ad12.gpmc_ad12 MODE0 | INPUT | PULLUP */ ++ 0x034 0x30 /* gpmc_ad13.gpmc_ad13 MODE0 | INPUT | PULLUP */ ++ 0x038 0x30 /* gpmc_ad14.gpmc_ad14 MODE0 | INPUT | PULLUP */ ++ 0x03C 0x30 /* gpmc_ad15.gpmc_ad15 MODE0 | INPUT | PULLUP */ ++ 0x080 0x08 /* gpmc_cscn1.gpmc_cscn1 MODE0 | OUTPUT */ ++ 0x08C 0x28 /* gpmc_clk.gpmc_clk MODE0 | INPUT */ ++ 0x090 0x08 /* gpmc_advn_ale.gpmc_advn_ale MODE0 | OUTPUT */ ++ 0x094 0x08 /* gpmc_oen_ren.gpmc_oen_ren MODE0 | OUTPUT */ ++ 0x098 0x08 /* gpmc_wen.gpmc_wen MODE0 | OUTPUT */ ++ 0x09C 0x08 /* gpmc_ben0_cle.gpmc_ben0_cle MODE0 | OUTPUT */ ++ 0x078 0x08 /* gpmc_ben1_cle.gpmc_ben1_cle MODE0 | OUTPUT */ ++ >; ++ }; ++ ++ fpga_config_pins: pinmux_fpga_config_pins { ++ pinctrl-single,pins = < ++ /* config clk and data */ ++ 0x198 0x37 /* spi1_d1 MODE3 | INPUT | PULLUP , serial data config */ ++ 0x190 0x37 /* spi1_sclk MODE3 | INPUT | PULLUP, serial clock config */ ++ >; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&gpmc>; ++ depth = <1>; /* only create devices on depth 1 */ ++ ++ /* stupid warnings */ ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ __overlay__ { ++ ++ status = "okay"; ++ ++ #address-cells = <2>; ++ #size-cells = <1>; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&gpmc_pins>; ++ ++ ++ ++ ++ /* chip select ranges */ ++ ranges = <1 0 0x01000000 0x1000000>; ++ ++ camera{ ++ compatible = "logibone_ra1"; ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&fpga_config_pins>; ++ ++ reset = <&rstctl 0 0>; ++ reset-names = "eMMC_RSTn-LOGIBONE"; ++ ++ reg = <1 0 0x01000000>; /*CSn1*/ ++ ++ bank-width = <2>; /* GPMC_CONFIG1_DEVICESIZE(1) */ ++ ++ /*gpmc,burst-write;*/ ++ /*gpmc,burst-read;*/ ++ /*gpmc,burst-wrap;*/ ++ gpmc,sync-read; /* GPMC_CONFIG1_READTYPE_ASYNC */ ++ gpmc,sync-write; /* GPMC_CONFIG1_WRITETYPE_ASYNC */ ++ gpmc,clk-activation-ns = <0>; /* GPMC_CONFIG1_CLKACTIVATIONTIME(2) */ ++ gpmc,burst-length = <16>; /* GPMC_CONFIG1_PAGE_LEN(2) */ ++ gpmc,mux-add-data = <2>; /* GPMC_CONFIG1_MUXTYPE(2) */ ++ ++ gpmc,sync-clk-ps = <20000>; /* CONFIG2 */ ++ ++ gpmc,cs-on-ns = <0>; ++ gpmc,cs-rd-off-ns = <100>; ++ gpmc,cs-wr-off-ns = <40>; ++ ++ gpmc,adv-on-ns = <0>; /* CONFIG3 */ ++ gpmc,adv-rd-off-ns = <20>; ++ gpmc,adv-wr-off-ns = <20>; ++ ++ gpmc,we-on-ns = <20>; /* CONFIG4 */ ++ gpmc,we-off-ns = <40>; ++ gpmc,oe-on-ns = <20>; ++ gpmc,oe-off-ns = <100>; ++ ++ gpmc,page-burst-access-ns = <20>; /* CONFIG 5 */ ++ gpmc,access-ns = <80>; ++ gpmc,rd-cycle-ns = <120>; ++ gpmc,wr-cycle-ns = <60>; ++ gpmc,wr-access-ns = <40>; /* CONFIG 6 */ ++ gpmc,wr-data-mux-bus-ns = <20>; ++ ++ /*gpmc,bus-turnaround-ns = <40>;*/ /* CONFIG6:3:0 = 4 */ ++ /*gpmc,cycle2cycle-samecsen;*/ /* CONFIG6:7 = 1 */ ++ /*gpmc,cycle2cycle-delay-ns = <40>;*/ /* CONFIG6:11:8 = 4 */ ++ ++ /* not using dma engine yet, but we can get the channel number here */ ++ dmas = <&edma 20>; ++ dma-names = "logibone"; ++ ++ fpga,config { ++ i2c-adapter = <&i2c2>; ++ ++ /* need it to stop the whinning */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ /* fake i2c device node */ ++ pca9534 { ++ compatible = "logibone"; ++ reg = <0x24>; ++ }; ++ }; ++ ++ }; ++ ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&spi0>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&fpga_config_pins>; ++ ++ spi0_0{ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "spidev"; ++ reg = <0>; ++ spi-max-frequency = <16000000>; ++ spi-cpha; ++ }; ++ spi0_1{ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ compatible = "spidev"; ++ reg = <1>; ++ spi-max-frequency = <16000000>; ++ // Mode 0 (CPOL = 0, CPHA = 0) ++ }; ++ }; ++ }; ++ ++ }; +-- +1.9.0 + diff --git a/patches/machinekit/0001-Add-dir-changeable-property-to-gpio-of-helper.patch b/patches/machinekit/0001-Add-dir-changeable-property-to-gpio-of-helper.patch new file mode 100644 index 00000000..c200baec --- /dev/null +++ b/patches/machinekit/0001-Add-dir-changeable-property-to-gpio-of-helper.patch @@ -0,0 +1,26 @@ +From 460d15238488ae6db3d5997da8c30c8ddb17cb2a Mon Sep 17 00:00:00 2001 +From: Charles Steinkuehler +Date: Sun, 26 Jan 2014 16:17:09 +0100 +Subject: [PATCH] Add dir-changeable property to gpio-of-helper + +Signed-off-by: Charles Steinkuehler +--- + drivers/gpio/gpio-of-helper.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/gpio/gpio-of-helper.c b/drivers/gpio/gpio-of-helper.c +index 16a607f..1c289b2 100644 +--- a/drivers/gpio/gpio-of-helper.c ++++ b/drivers/gpio/gpio-of-helper.c +@@ -181,6 +181,8 @@ gpio_of_entry_create(struct gpio_of_helper_info *info, + req_flags |= GPIOF_OUT_INIT_LOW; + break; + } ++ if (of_property_read_bool(node, "dir-changeable")) ++ req_flags |= GPIOF_EXPORT_CHANGEABLE; + + /* request the gpio */ + err = devm_gpio_request_one(dev, gpio, req_flags, name); +-- +1.9.0 + diff --git a/patches/mmc/0001-am33xx.dtsi-enable-MMC-HSPE-bit-for-all-3-controller.patch b/patches/mmc/0001-am33xx.dtsi-enable-MMC-HSPE-bit-for-all-3-controller.patch index e016cf88..aaa773c6 100644 --- a/patches/mmc/0001-am33xx.dtsi-enable-MMC-HSPE-bit-for-all-3-controller.patch +++ b/patches/mmc/0001-am33xx.dtsi-enable-MMC-HSPE-bit-for-all-3-controller.patch @@ -1,11 +1,11 @@ -From 8ded24b643fb56e20afd55baf53d9a265d362332 Mon Sep 17 00:00:00 2001 +From db1e50018072ad4d3188b5faa3eb478a52ad6876 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 18 Oct 2012 10:11:48 +0200 Subject: [PATCH 1/2] am33xx.dtsi: enable MMC HSPE bit for all 3 controllers Signed-off-by: Koen Kooi --- - arch/arm/boot/dts/am33xx.dtsi | 3 +++ + arch/arm/boot/dts/am33xx.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi @@ -37,5 +37,5 @@ index c0d9c5b..0087b13 100644 }; -- -1.7.9.5 +1.9.0 diff --git a/patches/mmc/0002-omap-hsmmc-Correct-usage-of-of_find_node_by_name.patch b/patches/mmc/0002-omap-hsmmc-Correct-usage-of-of_find_node_by_name.patch index c8185359..ed405ae3 100644 --- a/patches/mmc/0002-omap-hsmmc-Correct-usage-of-of_find_node_by_name.patch +++ b/patches/mmc/0002-omap-hsmmc-Correct-usage-of-of_find_node_by_name.patch @@ -1,11 +1,11 @@ -From 1df125693a36da53bad975d4871d73f1ce6bf8a5 Mon Sep 17 00:00:00 2001 +From 39d217dd8bb7f3f2d649a3260198af3464775944 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Fri, 26 Oct 2012 15:48:00 +0300 Subject: [PATCH 2/2] omap-hsmmc: Correct usage of of_find_node_by_name of_find_node_by_name expect to have the parent node reference taken. --- - drivers/mmc/host/omap_hsmmc.c | 10 ++++++++++ + drivers/mmc/host/omap_hsmmc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c @@ -30,5 +30,5 @@ index f74bd69..e30c1ee 100644 mmc->max_blk_count = 0xFFFF; /* No. of Blocks is 16 bits */ mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count; -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0001-CHROMIUM-Input-atmel_mxt_ts-refactor-i2c-error-handl.patch b/patches/mxt/0001-CHROMIUM-Input-atmel_mxt_ts-refactor-i2c-error-handl.patch index 3c2a086d..365d4689 100644 --- a/patches/mxt/0001-CHROMIUM-Input-atmel_mxt_ts-refactor-i2c-error-handl.patch +++ b/patches/mxt/0001-CHROMIUM-Input-atmel_mxt_ts-refactor-i2c-error-handl.patch @@ -1,4 +1,4 @@ -From d1409133df21b1b8e169e2e0c52df9fdca5d504b Mon Sep 17 00:00:00 2001 +From 5254efdcbb20ddf92e52b111a2c174c97abf9ff5 Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Wed, 19 Dec 2012 17:22:16 +0800 Subject: [PATCH 01/57] CHROMIUM: Input: atmel_mxt_ts - refactor i2c error @@ -18,7 +18,7 @@ Signed-off-by: Daniel Kurtz Change-Id: I59eabbb80dea610a89c01a3be06f0d165f4b4431 --- - drivers/input/touchscreen/atmel_mxt_ts.c | 92 ++++++++++++++++++------------ + drivers/input/touchscreen/atmel_mxt_ts.c | 92 +++++++++++++++++++------------- 1 file changed, 54 insertions(+), 38 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -164,5 +164,5 @@ index d04f810..a222bd8 100644 return ret; } -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0002-CHROMIUM-Input-atmel_mxt_ts-register-input-device-be.patch b/patches/mxt/0002-CHROMIUM-Input-atmel_mxt_ts-register-input-device-be.patch index 8f50bfdc..4ab4d385 100644 --- a/patches/mxt/0002-CHROMIUM-Input-atmel_mxt_ts-register-input-device-be.patch +++ b/patches/mxt/0002-CHROMIUM-Input-atmel_mxt_ts-register-input-device-be.patch @@ -1,4 +1,4 @@ -From 71c4278fe3797fbf82e28dbb2aecfade2e80ec74 Mon Sep 17 00:00:00 2001 +From 056ec210a7754f3b8f0dd2d2db7f7eb4815943e4 Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Fri, 27 Apr 2012 22:08:52 +0800 Subject: [PATCH 02/57] CHROMIUM: Input: atmel_mxt_ts - register input device @@ -25,7 +25,7 @@ Tested-by: Daniel Kurtz [djkurtz: v3.8 rebase] --- - drivers/input/touchscreen/atmel_mxt_ts.c | 32 +++++++++++++++++++----------- + drivers/input/touchscreen/atmel_mxt_ts.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -109,5 +109,5 @@ index a222bd8..84f0408 100644 return error; } -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0003-CHROMIUM-Input-atmel_mxt_ts-refactor-input-device-cr.patch b/patches/mxt/0003-CHROMIUM-Input-atmel_mxt_ts-refactor-input-device-cr.patch index 1dd7ae64..6c44ceac 100644 --- a/patches/mxt/0003-CHROMIUM-Input-atmel_mxt_ts-refactor-input-device-cr.patch +++ b/patches/mxt/0003-CHROMIUM-Input-atmel_mxt_ts-refactor-input-device-cr.patch @@ -1,4 +1,4 @@ -From bbb7e8498cde77130fbb9162cced032de7bb4769 Mon Sep 17 00:00:00 2001 +From 76e686432c9f1cd041fb1cc1e3c48848a54533fb Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Fri, 27 Apr 2012 22:15:16 +0800 Subject: [PATCH 03/57] CHROMIUM: Input: atmel_mxt_ts - refactor input device @@ -20,7 +20,7 @@ Reviewed-by: Daniel Kurtz Tested-by: Daniel Kurtz [djkurtz: v3.8-rc3 rebase] --- - drivers/input/touchscreen/atmel_mxt_ts.c | 91 ++++++++++++++++-------------- + drivers/input/touchscreen/atmel_mxt_ts.c | 91 ++++++++++++++++++-------------- 1 file changed, 50 insertions(+), 41 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -157,5 +157,5 @@ index 84f0408..9afc26e 100644 pdata->irqflags | IRQF_ONESHOT, client->name, data); -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0004-CHROMIUM-Input-atmel_mxt_ts-handle-bootloader-mode-a.patch b/patches/mxt/0004-CHROMIUM-Input-atmel_mxt_ts-handle-bootloader-mode-a.patch index 712b130a..ef008db9 100644 --- a/patches/mxt/0004-CHROMIUM-Input-atmel_mxt_ts-handle-bootloader-mode-a.patch +++ b/patches/mxt/0004-CHROMIUM-Input-atmel_mxt_ts-handle-bootloader-mode-a.patch @@ -1,4 +1,4 @@ -From 1bda3f45259c9a4595af04c2fc93e8fd0d42c7f7 Mon Sep 17 00:00:00 2001 +From 83e688406e67360c0b67ed2d76f8bcaea15e8fdb Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Fri, 21 Dec 2012 09:26:54 +0800 Subject: [PATCH 04/57] CHROMIUM: Input: atmel_mxt_ts - handle bootloader mode @@ -56,7 +56,7 @@ Signed-off-by: Daniel Kurtz Change-Id: I2b65ec6cc3c9506372499785f4f8599faf4aa353 --- - drivers/input/touchscreen/atmel_mxt_ts.c | 51 +++++++++++++++++++++++------- + drivers/input/touchscreen/atmel_mxt_ts.c | 51 +++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 11 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -180,5 +180,5 @@ index 9afc26e..6c2c712 100644 mxt_write_object(data, MXT_GEN_COMMAND_T6, MXT_COMMAND_RESET, 1); -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0005-CHROMIUM-Input-atmel_mxt_ts-handle-errors-during-fw-.patch b/patches/mxt/0005-CHROMIUM-Input-atmel_mxt_ts-handle-errors-during-fw-.patch index fee7da69..c54c3e10 100644 --- a/patches/mxt/0005-CHROMIUM-Input-atmel_mxt_ts-handle-errors-during-fw-.patch +++ b/patches/mxt/0005-CHROMIUM-Input-atmel_mxt_ts-handle-errors-during-fw-.patch @@ -1,8 +1,8 @@ -From 6d13d4db2756391b1d38ab3548de3635e4119074 Mon Sep 17 00:00:00 2001 +From 9d07d788609256260577d188fdc0edad3df2f5e2 Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Thu, 20 Dec 2012 23:16:35 +0800 -Subject: [PATCH 05/57] CHROMIUM: Input: atmel_mxt_ts - handle errors during - fw update +Subject: [PATCH 05/57] CHROMIUM: Input: atmel_mxt_ts - handle errors during fw + update If there are any (i2c) errors during fw update, abort the update, but leave the i2c address assigned to the bootloader address. @@ -15,7 +15,7 @@ Signed-off-by: Daniel Kurtz Change-Id: I2933505115dd55aa4dcf07e333f0e1d56e9e246e --- - drivers/input/touchscreen/atmel_mxt_ts.c | 17 +++++++++++------ + drivers/input/touchscreen/atmel_mxt_ts.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -74,5 +74,5 @@ index 6c2c712..76a25d3 100644 return ret; } -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0006-CHROMIUM-Input-atmel_mxt_ts-destroy-state-before-fw-.patch b/patches/mxt/0006-CHROMIUM-Input-atmel_mxt_ts-destroy-state-before-fw-.patch index 032e5ac2..694c60fc 100644 --- a/patches/mxt/0006-CHROMIUM-Input-atmel_mxt_ts-destroy-state-before-fw-.patch +++ b/patches/mxt/0006-CHROMIUM-Input-atmel_mxt_ts-destroy-state-before-fw-.patch @@ -1,8 +1,8 @@ -From 90b5db9e6f65c937303561cadd17d2665b9b93c8 Mon Sep 17 00:00:00 2001 +From 91c6ab1e25dc5288e3cae59f984da68f9e02e4de Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Thu, 20 Dec 2012 23:38:08 +0800 -Subject: [PATCH 06/57] CHROMIUM: Input: atmel_mxt_ts - destroy state before - fw update and restore after +Subject: [PATCH 06/57] CHROMIUM: Input: atmel_mxt_ts - destroy state before fw + update and restore after After firmware update, the device may have a completely different object table which corresponds to an input device with different properties. @@ -18,7 +18,7 @@ bootloader mode and an improperly configured input device will not exist. Change-Id: I42e6b946e2206b4957c313be00b9b45b9dd02b60 Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 10 ++++++++-- + drivers/input/touchscreen/atmel_mxt_ts.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -51,5 +51,5 @@ index 76a25d3..c74f5a5 100644 enable_irq(data->irq); -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0007-CHROMIUM-Input-atmel_mxt_ts-refactor-bootloader-entr.patch b/patches/mxt/0007-CHROMIUM-Input-atmel_mxt_ts-refactor-bootloader-entr.patch index adf9f638..dedffdb3 100644 --- a/patches/mxt/0007-CHROMIUM-Input-atmel_mxt_ts-refactor-bootloader-entr.patch +++ b/patches/mxt/0007-CHROMIUM-Input-atmel_mxt_ts-refactor-bootloader-entr.patch @@ -1,4 +1,4 @@ -From 28f0a8c4f4762a3fc56ac179522d79f24e247fa3 Mon Sep 17 00:00:00 2001 +From e1a1967b9b894d458139d3fa084af5f86a9f6730 Mon Sep 17 00:00:00 2001 From: Benson Leung Date: Thu, 3 May 2012 13:57:46 -0700 Subject: [PATCH 07/57] CHROMIUM: Input: atmel_mxt_ts - refactor bootloader @@ -50,7 +50,7 @@ Reviewed-on: https://gerrit.chromium.org/gerrit/37860 v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 128 ++++++++++++++++++++---------- + drivers/input/touchscreen/atmel_mxt_ts.c | 128 +++++++++++++++++++++---------- 1 file changed, 87 insertions(+), 41 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -239,5 +239,5 @@ index c74f5a5..be96be3 100644 } -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0008-CHROMIUM-Input-atmel_mxt_ts-wait-for-CHG-assert-in-m.patch b/patches/mxt/0008-CHROMIUM-Input-atmel_mxt_ts-wait-for-CHG-assert-in-m.patch index 36690ada..77a7a625 100644 --- a/patches/mxt/0008-CHROMIUM-Input-atmel_mxt_ts-wait-for-CHG-assert-in-m.patch +++ b/patches/mxt/0008-CHROMIUM-Input-atmel_mxt_ts-wait-for-CHG-assert-in-m.patch @@ -1,4 +1,4 @@ -From d3be5e08a9a218bb8e29a62bb45e463ce0849edf Mon Sep 17 00:00:00 2001 +From 78a586a570bf8e8f7efa76218bc799397093887f Mon Sep 17 00:00:00 2001 From: Benson Leung Date: Wed, 25 Apr 2012 23:08:12 -0700 Subject: [PATCH 08/57] CHROMIUM: Input: atmel_mxt_ts - wait for CHG assert in @@ -29,7 +29,7 @@ Reviewed-on: https://gerrit.chromium.org/gerrit/21173 v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 63 ++++++++++++++++++++++++++---- + drivers/input/touchscreen/atmel_mxt_ts.c | 63 ++++++++++++++++++++++++++++---- 1 file changed, 55 insertions(+), 8 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -170,5 +170,5 @@ index be96be3..d0f91ff 100644 if (mxt_in_bootloader(data)) { -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0009-CHROMIUM-Input-atmel_mxt_ts-wait-for-CHG-after-bootl.patch b/patches/mxt/0009-CHROMIUM-Input-atmel_mxt_ts-wait-for-CHG-after-bootl.patch index 7d6db7a6..a4f481a6 100644 --- a/patches/mxt/0009-CHROMIUM-Input-atmel_mxt_ts-wait-for-CHG-after-bootl.patch +++ b/patches/mxt/0009-CHROMIUM-Input-atmel_mxt_ts-wait-for-CHG-after-bootl.patch @@ -1,4 +1,4 @@ -From fcb9ce1d6cef9e2bce293890c0aa9dd1ec6ce902 Mon Sep 17 00:00:00 2001 +From ceccbb113e7bb0b4b50dcf8f10e48920b0bb95e1 Mon Sep 17 00:00:00 2001 From: Benson Leung Date: Wed, 2 May 2012 20:21:12 -0700 Subject: [PATCH 09/57] CHROMIUM: Input: atmel_mxt_ts - wait for CHG after @@ -26,7 +26,7 @@ Reviewed-on: https://gerrit.chromium.org/gerrit/21832 v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 19 +++++++++++++++---- + drivers/input/touchscreen/atmel_mxt_ts.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -84,5 +84,5 @@ index d0f91ff..ef867d3 100644 ret = mxt_unlock_bootloader(client); if (ret) -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0010-CHROMIUM-Input-atmel_mxt_ts-change-MXT_BOOT_LOW-to-0.patch b/patches/mxt/0010-CHROMIUM-Input-atmel_mxt_ts-change-MXT_BOOT_LOW-to-0.patch index cf83c700..c0f02b21 100644 --- a/patches/mxt/0010-CHROMIUM-Input-atmel_mxt_ts-change-MXT_BOOT_LOW-to-0.patch +++ b/patches/mxt/0010-CHROMIUM-Input-atmel_mxt_ts-change-MXT_BOOT_LOW-to-0.patch @@ -1,4 +1,4 @@ -From 52e195d0cb04cad48716891e6ee8a438a0e88a31 Mon Sep 17 00:00:00 2001 +From 0fcab80129b4029805c071f4bc8def2485e5cf14 Mon Sep 17 00:00:00 2001 From: Benson Leung Date: Wed, 4 Apr 2012 17:26:47 -0700 Subject: [PATCH 10/57] CHROMIUM: Input: atmel_mxt_ts - change MXT_BOOT_LOW to @@ -17,7 +17,7 @@ Signed-off-by: Benson Leung Reviewed-on: https://gerrit.chromium.org/gerrit/19639 Reviewed-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 6 +++++- + drivers/input/touchscreen/atmel_mxt_ts.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -38,5 +38,5 @@ index ef867d3..0aae3fb 100644 /* Firmware */ -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0011-CHROMIUM-Input-atmel_mxt_ts-Increase-FWRESET_TIME.patch b/patches/mxt/0011-CHROMIUM-Input-atmel_mxt_ts-Increase-FWRESET_TIME.patch index 5f84fdca..ec119731 100644 --- a/patches/mxt/0011-CHROMIUM-Input-atmel_mxt_ts-Increase-FWRESET_TIME.patch +++ b/patches/mxt/0011-CHROMIUM-Input-atmel_mxt_ts-Increase-FWRESET_TIME.patch @@ -1,4 +1,4 @@ -From a51f2042eec6301708d1bc5f33526433acbddc83 Mon Sep 17 00:00:00 2001 +From 497a7a491406279bce8b6675f2ca460dfa324090 Mon Sep 17 00:00:00 2001 From: Benson Leung Date: Wed, 4 Apr 2012 19:34:52 -0700 Subject: [PATCH 11/57] CHROMIUM: Input: atmel_mxt_ts - Increase FWRESET_TIME @@ -14,7 +14,7 @@ Signed-off-by: Benson Leung Reviewed-on: https://gerrit.chromium.org/gerrit/19640 Reviewed-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 2 +- + drivers/input/touchscreen/atmel_mxt_ts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -31,5 +31,5 @@ index 0aae3fb..b9b9b3f 100644 /* Command to unlock bootloader */ #define MXT_UNLOCK_CMD_MSB 0xaa -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0012-CHROMIUM-Input-atmel_mxt_ts-add-calibrate-sysfs-entr.patch b/patches/mxt/0012-CHROMIUM-Input-atmel_mxt_ts-add-calibrate-sysfs-entr.patch index 31606669..6c9d21a4 100644 --- a/patches/mxt/0012-CHROMIUM-Input-atmel_mxt_ts-add-calibrate-sysfs-entr.patch +++ b/patches/mxt/0012-CHROMIUM-Input-atmel_mxt_ts-add-calibrate-sysfs-entr.patch @@ -1,4 +1,4 @@ -From e3c61d79b6d38a033476d7cd6fec92ca856fbac9 Mon Sep 17 00:00:00 2001 +From 9dd97fa87a17284956464043c21d0b3b36f0dfe1 Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Sun, 22 Apr 2012 23:29:25 +0800 Subject: [PATCH 12/57] CHROMIUM: Input: atmel_mxt_ts - add calibrate sysfs @@ -22,7 +22,7 @@ Commit-Ready: Daniel Kurtz v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 24 ++++++++++++++++++++++++ + drivers/input/touchscreen/atmel_mxt_ts.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -81,5 +81,5 @@ index b9b9b3f..00968a1 100644 &dev_attr_hw_version.attr, &dev_attr_object.attr, -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0013-CHROMIUM-Input-atmel_mxt_ts-add-sysfs-entry-to-read-.patch b/patches/mxt/0013-CHROMIUM-Input-atmel_mxt_ts-add-sysfs-entry-to-read-.patch index 8b6a4947..561d04e4 100644 --- a/patches/mxt/0013-CHROMIUM-Input-atmel_mxt_ts-add-sysfs-entry-to-read-.patch +++ b/patches/mxt/0013-CHROMIUM-Input-atmel_mxt_ts-add-sysfs-entry-to-read-.patch @@ -1,8 +1,8 @@ -From bd50cf5277d7c93f8339f6fb9264dfc14f9ee13f Mon Sep 17 00:00:00 2001 +From 692881bf6378bbc6b2273f719bdab753aba1cbe8 Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Mon, 23 Apr 2012 12:33:12 +0800 -Subject: [PATCH 13/57] CHROMIUM: Input: atmel_mxt_ts - add sysfs entry to - read config checksum +Subject: [PATCH 13/57] CHROMIUM: Input: atmel_mxt_ts - add sysfs entry to read + config checksum Config checksum is returned in the T6 message at every boot, and when the config changes. Cache its value and add sysfs entry for userspace to @@ -23,7 +23,7 @@ Reviewed-by: Benson Leung v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 15 +++++++++++++-- + drivers/input/touchscreen/atmel_mxt_ts.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -82,5 +82,5 @@ index 00968a1..a03a0c4 100644 &dev_attr_hw_version.attr, &dev_attr_object.attr, -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0014-CHROMIUM-Input-atmel_mxt_ts-add-sysfs-entry-to-read-.patch b/patches/mxt/0014-CHROMIUM-Input-atmel_mxt_ts-add-sysfs-entry-to-read-.patch index 67aaf940..835a8a97 100644 --- a/patches/mxt/0014-CHROMIUM-Input-atmel_mxt_ts-add-sysfs-entry-to-read-.patch +++ b/patches/mxt/0014-CHROMIUM-Input-atmel_mxt_ts-add-sysfs-entry-to-read-.patch @@ -1,8 +1,8 @@ -From 8cdb8c42efa10f9433803908341602c10b6bbfe9 Mon Sep 17 00:00:00 2001 +From 9af039b874d6d7f96213b3d9d02158f39ab84494 Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Fri, 27 Apr 2012 21:44:58 +0800 -Subject: [PATCH 14/57] CHROMIUM: Input: atmel_mxt_ts - add sysfs entry to - read info checksum +Subject: [PATCH 14/57] CHROMIUM: Input: atmel_mxt_ts - add sysfs entry to read + info checksum The device stores the Information Block Checksum in the 3 bytes immediately following the Information Block. @@ -25,7 +25,7 @@ Tested-by: Daniel Kurtz v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 24 ++++++++++++++++++++++++ + drivers/input/touchscreen/atmel_mxt_ts.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -103,5 +103,5 @@ index a03a0c4..e6a5422 100644 &dev_attr_update_fw.attr, NULL -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0015-CHROMIUM-Input-atmel_mxt_ts-verify-info-block-checks.patch b/patches/mxt/0015-CHROMIUM-Input-atmel_mxt_ts-verify-info-block-checks.patch index d5f6dec1..7dfc35b7 100644 --- a/patches/mxt/0015-CHROMIUM-Input-atmel_mxt_ts-verify-info-block-checks.patch +++ b/patches/mxt/0015-CHROMIUM-Input-atmel_mxt_ts-verify-info-block-checks.patch @@ -1,4 +1,4 @@ -From 47586a1cd772262be9cb305ec4722832fa564f7e Mon Sep 17 00:00:00 2001 +From 38f686e224b3e64df77f1ee06f80c6d060a653f7 Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Thu, 26 Apr 2012 00:57:41 +0800 Subject: [PATCH 15/57] CHROMIUM: Input: atmel_mxt_ts - verify info block @@ -21,7 +21,7 @@ Tested-by: Daniel Kurtz v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 69 ++++++++++++++++++++++++++++++ + drivers/input/touchscreen/atmel_mxt_ts.c | 69 ++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -112,5 +112,5 @@ index e6a5422..9210a8a 100644 reportid = 1; for (i = 0; i < data->info.object_num; i++) { -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0016-CHROMIUM-Input-atmel_mxt_tx-add-matrix_size-sysfs-en.patch b/patches/mxt/0016-CHROMIUM-Input-atmel_mxt_tx-add-matrix_size-sysfs-en.patch index b597ca80..676c0652 100644 --- a/patches/mxt/0016-CHROMIUM-Input-atmel_mxt_tx-add-matrix_size-sysfs-en.patch +++ b/patches/mxt/0016-CHROMIUM-Input-atmel_mxt_tx-add-matrix_size-sysfs-en.patch @@ -1,4 +1,4 @@ -From 8398ef895404aa27eb48e22cda2651b8c3a0975f Mon Sep 17 00:00:00 2001 +From 1f0615a9cae94d16d3b252d74ffa424e32fa878b Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Mon, 30 Apr 2012 13:30:31 +0800 Subject: [PATCH 16/57] CHROMIUM: Input: atmel_mxt_tx - add matrix_size sysfs @@ -23,7 +23,7 @@ Tested-by: Daniel Kurtz v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 12 ++++++++++++ + drivers/input/touchscreen/atmel_mxt_ts.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -64,5 +64,5 @@ index 9210a8a..b9a0de2 100644 &dev_attr_update_fw.attr, NULL -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0017-CHROMIUM-Input-atmel_mxt_ts-define-helper-functions-.patch b/patches/mxt/0017-CHROMIUM-Input-atmel_mxt_ts-define-helper-functions-.patch index af4c3b8e..94d2b969 100644 --- a/patches/mxt/0017-CHROMIUM-Input-atmel_mxt_ts-define-helper-functions-.patch +++ b/patches/mxt/0017-CHROMIUM-Input-atmel_mxt_ts-define-helper-functions-.patch @@ -1,8 +1,8 @@ -From a3c4c5e094a540c74cfdf91110c6c7c371596e4a Mon Sep 17 00:00:00 2001 +From 33091b77d285bd2468826232ac005f599df55319 Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Mon, 17 Dec 2012 17:22:02 +0800 -Subject: [PATCH 17/57] CHROMIUM: Input: atmel_mxt_ts - define helper - functions for size and instances +Subject: [PATCH 17/57] CHROMIUM: Input: atmel_mxt_ts - define helper functions + for size and instances These two object table entry fields are reported 1 less than their value. When used, however, we always want the actual size and instances. @@ -26,7 +26,7 @@ Tested-by: Daniel Kurtz v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 31 ++++++++++++++++++++---------- + drivers/input/touchscreen/atmel_mxt_ts.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -117,5 +117,5 @@ index b9a0de2..b53e839 100644 error = __mxt_read_reg(data->client, addr, size, obuf); -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0018-CHROMIUM-Input-atmel_mxt_ts-add-debugfs-infrastructu.patch b/patches/mxt/0018-CHROMIUM-Input-atmel_mxt_ts-add-debugfs-infrastructu.patch index 7d205c93..6609c7d5 100644 --- a/patches/mxt/0018-CHROMIUM-Input-atmel_mxt_ts-add-debugfs-infrastructu.patch +++ b/patches/mxt/0018-CHROMIUM-Input-atmel_mxt_ts-add-debugfs-infrastructu.patch @@ -1,4 +1,4 @@ -From cf75e785b55be661ff8d9019b2f3a3ec440c5c07 Mon Sep 17 00:00:00 2001 +From 35a9e473a748359967c5c137d32edfbf90c225d4 Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Wed, 9 May 2012 02:18:14 +0000 Subject: [PATCH 18/57] CHROMIUM: Input: atmel_mxt_ts - add debugfs @@ -21,7 +21,7 @@ Tested-by: Daniel Kurtz v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 55 +++++++++++++++++++++++++++++- + drivers/input/touchscreen/atmel_mxt_ts.c | 55 +++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -128,5 +128,5 @@ index b53e839..311959d 100644 /* Module information */ MODULE_AUTHOR("Joonyoung Shim "); -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0019-CHROMIUM-Input-atmel_mxt_ts-add-deltas-and-refs-debu.patch b/patches/mxt/0019-CHROMIUM-Input-atmel_mxt_ts-add-deltas-and-refs-debu.patch index 6bd0d570..a37ebc0f 100644 --- a/patches/mxt/0019-CHROMIUM-Input-atmel_mxt_ts-add-deltas-and-refs-debu.patch +++ b/patches/mxt/0019-CHROMIUM-Input-atmel_mxt_ts-add-deltas-and-refs-debu.patch @@ -1,4 +1,4 @@ -From b801c91b172769991e883adabf09b0119153546b Mon Sep 17 00:00:00 2001 +From 805e2299de7fc8a2d2348631918f97f6a002b167 Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Mon, 17 Dec 2012 17:32:59 +0800 Subject: [PATCH 19/57] CHROMIUM: Input: atmel_mxt_ts - add deltas and refs @@ -39,7 +39,7 @@ Tested-by: Daniel Kurtz v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 241 +++++++++++++++++++++++++++++- + drivers/input/touchscreen/atmel_mxt_ts.c | 241 ++++++++++++++++++++++++++++++- 1 file changed, 240 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -338,5 +338,5 @@ index 311959d..9a8cfd2 100644 free_irq(data->irq, data); if (data->input_dev) -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0020-CHROMIUM-Input-atmel_mxt_ts-add-device-id-for-touchp.patch b/patches/mxt/0020-CHROMIUM-Input-atmel_mxt_ts-add-device-id-for-touchp.patch index 508cf286..256abb9e 100644 --- a/patches/mxt/0020-CHROMIUM-Input-atmel_mxt_ts-add-device-id-for-touchp.patch +++ b/patches/mxt/0020-CHROMIUM-Input-atmel_mxt_ts-add-device-id-for-touchp.patch @@ -1,4 +1,4 @@ -From 4f27924a5bcc5237ef035908214365f2dda8335e Mon Sep 17 00:00:00 2001 +From 401881dedd0aa3a1f66f0da47822956c204edace Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Wed, 12 Dec 2012 15:33:18 +0800 Subject: [PATCH 20/57] CHROMIUM: Input: atmel_mxt_ts - add device id for @@ -30,7 +30,7 @@ Tested-by: Benson Leung v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 51 +++++++++++++++++++++++++++++- + drivers/input/touchscreen/atmel_mxt_ts.c | 51 +++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -180,5 +180,5 @@ index 9a8cfd2..3b9007c 100644 { } }; -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0021-CHROMIUM-Input-atmel_mxt_ts-Read-resolution-from-dev.patch b/patches/mxt/0021-CHROMIUM-Input-atmel_mxt_ts-Read-resolution-from-dev.patch index d51ee148..9ae833e6 100644 --- a/patches/mxt/0021-CHROMIUM-Input-atmel_mxt_ts-Read-resolution-from-dev.patch +++ b/patches/mxt/0021-CHROMIUM-Input-atmel_mxt_ts-Read-resolution-from-dev.patch @@ -1,4 +1,4 @@ -From 5aea525e3bf8b4a30c7bd1e3576b34a9fc7d0350 Mon Sep 17 00:00:00 2001 +From 6f3b0c7d51750a184970311aea27c30cde7c7b10 Mon Sep 17 00:00:00 2001 From: Yufeng Shen Date: Tue, 1 May 2012 16:58:46 -0400 Subject: [PATCH 21/57] CHROMIUM: Input: atmel_mxt_ts - Read resolution from @@ -25,7 +25,7 @@ Reviewed-by: Daniel Kurtz v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 51 +++++++++++++++++++++++------- + drivers/input/touchscreen/atmel_mxt_ts.c | 51 +++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 11 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -130,5 +130,5 @@ index 3b9007c..95abf18 100644 dev_info(&client->dev, "Device in bootloader at probe\n"); } else { -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0022-CHROMIUM-Input-atmel_mxt_ts-Report-TOUCH-MAJOR-in-te.patch b/patches/mxt/0022-CHROMIUM-Input-atmel_mxt_ts-Report-TOUCH-MAJOR-in-te.patch index d66271ef..772b9040 100644 --- a/patches/mxt/0022-CHROMIUM-Input-atmel_mxt_ts-Report-TOUCH-MAJOR-in-te.patch +++ b/patches/mxt/0022-CHROMIUM-Input-atmel_mxt_ts-Report-TOUCH-MAJOR-in-te.patch @@ -1,4 +1,4 @@ -From d696e3265692132e5a756f43dd56383f4acea175 Mon Sep 17 00:00:00 2001 +From d78233d349dfe80c9ab29eceb45c28927d71686d Mon Sep 17 00:00:00 2001 From: Yufeng Shen Date: Fri, 25 May 2012 13:55:26 -0400 Subject: [PATCH 22/57] CHROMIUM: Input: atmel_mxt_ts - Report TOUCH MAJOR in @@ -28,7 +28,7 @@ Tested-by: Yufeng Shen v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 40 ++++++++++++++++++++++++++++-- + drivers/input/touchscreen/atmel_mxt_ts.c | 40 ++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -147,5 +147,5 @@ index 95abf18..66b6f70 100644 0, data->max_x, 0, 0); input_set_abs_params(input_dev, ABS_MT_POSITION_Y, -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0023-CHROMIUM-Input-atmel_mxt_ts-add-new-object-types.patch b/patches/mxt/0023-CHROMIUM-Input-atmel_mxt_ts-add-new-object-types.patch index dd8c1ed4..c3f21d0d 100644 --- a/patches/mxt/0023-CHROMIUM-Input-atmel_mxt_ts-add-new-object-types.patch +++ b/patches/mxt/0023-CHROMIUM-Input-atmel_mxt_ts-add-new-object-types.patch @@ -1,4 +1,4 @@ -From 1f6dfc9a2a8db501ef6b953b6a971377afdbcf48 Mon Sep 17 00:00:00 2001 +From b02afb1541ff22b00c809529335662579b8c8454 Mon Sep 17 00:00:00 2001 From: Benson Leung Date: Wed, 4 Apr 2012 17:19:55 -0700 Subject: [PATCH 23/57] CHROMIUM: Input: atmel_mxt_ts - add new object types @@ -14,7 +14,7 @@ Reviewed-on: https://gerrit.chromium.org/gerrit/19638 Reviewed-by: Daniel Kurtz Reviewed-by: Vadim Bendebury --- - drivers/input/touchscreen/atmel_mxt_ts.c | 15 +++++++++++++++ + drivers/input/touchscreen/atmel_mxt_ts.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -78,5 +78,5 @@ index 66b6f70..4d67eeb 100644 default: return false; -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0024-CHROMIUM-INPUT-atmel_mxt_ts-Increase-the-wait-times-.patch b/patches/mxt/0024-CHROMIUM-INPUT-atmel_mxt_ts-Increase-the-wait-times-.patch index 2b5d4359..91792d40 100644 --- a/patches/mxt/0024-CHROMIUM-INPUT-atmel_mxt_ts-Increase-the-wait-times-.patch +++ b/patches/mxt/0024-CHROMIUM-INPUT-atmel_mxt_ts-Increase-the-wait-times-.patch @@ -1,8 +1,8 @@ -From 01ceaa067a1be609ec2090844953608f271d11a5 Mon Sep 17 00:00:00 2001 +From e735ba40293be35cc1612c06d6b96de541c45229 Mon Sep 17 00:00:00 2001 From: Iiro Valkonen Date: Fri, 29 Apr 2011 09:37:45 -0400 -Subject: [PATCH 24/57] CHROMIUM: INPUT: atmel_mxt_ts - Increase the wait - times for backup and reset +Subject: [PATCH 24/57] CHROMIUM: INPUT: atmel_mxt_ts - Increase the wait times + for backup and reset Increase the sleep times after backup and reset, so that we can be sure they have been completed even when the mXT cycle time is set to maximum value (254ms). @@ -29,7 +29,7 @@ Change-Id: I487c75fd05d5eb7b6223b5a3b79d34076d096726 Signed-off-by: Yufeng Shen Reviewed-on: http://gerrit.chromium.org/gerrit/8773 --- - drivers/input/touchscreen/atmel_mxt_ts.c | 4 ++-- + drivers/input/touchscreen/atmel_mxt_ts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -48,5 +48,5 @@ index 4d67eeb..2f22ae1 100644 #define MXT_FWRESET_TIME 500 /* msec */ -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0025-CHROMIUM-Input-atmel_mxt_ts-dump-mxt_read-write_reg.patch b/patches/mxt/0025-CHROMIUM-Input-atmel_mxt_ts-dump-mxt_read-write_reg.patch index cdd6dc6a..baa79dc9 100644 --- a/patches/mxt/0025-CHROMIUM-Input-atmel_mxt_ts-dump-mxt_read-write_reg.patch +++ b/patches/mxt/0025-CHROMIUM-Input-atmel_mxt_ts-dump-mxt_read-write_reg.patch @@ -1,8 +1,7 @@ -From b89f68894712bc1cb5524806e7897e2f89977b6c Mon Sep 17 00:00:00 2001 +From 268229b4cb8093d701181f18bc9dcc8b8cb15e61 Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Wed, 15 Feb 2012 16:32:02 +0800 -Subject: [PATCH 25/57] CHROMIUM: Input: atmel_mxt_ts - dump - mxt_read/write_reg +Subject: [PATCH 25/57] CHROMIUM: Input: atmel_mxt_ts - dump mxt_read/write_reg For verbose on-the-wire debugging. Prints DUMP_LEN bytes (in hex) per line. @@ -23,7 +22,7 @@ Tested-by: Daniel Kurtz v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 35 +++++++++++++++++++++++++++++- + drivers/input/touchscreen/atmel_mxt_ts.c | 35 +++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -92,5 +91,5 @@ index 2f22ae1..50fe84a 100644 kfree(buf); return ret; -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0026-CHROMIUM-Input-atmel_mxt_ts-take-an-instance-for-mxt.patch b/patches/mxt/0026-CHROMIUM-Input-atmel_mxt_ts-take-an-instance-for-mxt.patch index 1f450156..78b29f92 100644 --- a/patches/mxt/0026-CHROMIUM-Input-atmel_mxt_ts-take-an-instance-for-mxt.patch +++ b/patches/mxt/0026-CHROMIUM-Input-atmel_mxt_ts-take-an-instance-for-mxt.patch @@ -1,4 +1,4 @@ -From 1deb0f40a9d979b6e9c9471d2ab937db4d377d3a Mon Sep 17 00:00:00 2001 +From 9103f275d2b93c2cd1df16cffccfae953c2ea2a2 Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Wed, 12 Dec 2012 15:27:51 +0800 Subject: [PATCH 26/57] CHROMIUM: Input: atmel_mxt_ts - take an instance for @@ -21,7 +21,7 @@ Tested-by: Daniel Kurtz v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 16 +++++++++++----- + drivers/input/touchscreen/atmel_mxt_ts.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -59,5 +59,5 @@ index 50fe84a..d07732d 100644 static void mxt_input_button(struct mxt_data *data, struct mxt_message *message) -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0027-CHROMIUM-Input-atmel_mxt_ts-allow-writing-to-object-.patch b/patches/mxt/0027-CHROMIUM-Input-atmel_mxt_ts-allow-writing-to-object-.patch index b4eb4f5f..f1af4f5f 100644 --- a/patches/mxt/0027-CHROMIUM-Input-atmel_mxt_ts-allow-writing-to-object-.patch +++ b/patches/mxt/0027-CHROMIUM-Input-atmel_mxt_ts-allow-writing-to-object-.patch @@ -1,8 +1,8 @@ -From df5b26ded58863cc2dbb60531f5358c3353c4b78 Mon Sep 17 00:00:00 2001 +From 317f77581d95d2a1b39602ff13e9efd8538918cb Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Mon, 19 Mar 2012 09:39:12 +0800 -Subject: [PATCH 27/57] CHROMIUM: Input: atmel_mxt_ts - allow writing to - object sysfs entry +Subject: [PATCH 27/57] CHROMIUM: Input: atmel_mxt_ts - allow writing to object + sysfs entry Userspace can write a 32-bit value (encoded as a 8 character hex string) to the 'object' sysfs entry to modify a single byte of the object table. @@ -54,7 +54,7 @@ Tested-by: Daniel Kurtz v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 32 +++++++++++++++++++++++++++++- + drivers/input/touchscreen/atmel_mxt_ts.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -108,5 +108,5 @@ index d07732d..120d766 100644 static struct attribute *mxt_attrs[] = { -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0028-CHROMIUM-Input-atmel_mxt_ts-add-backupnv-sysfs-entry.patch b/patches/mxt/0028-CHROMIUM-Input-atmel_mxt_ts-add-backupnv-sysfs-entry.patch index 477f7244..d67362c0 100644 --- a/patches/mxt/0028-CHROMIUM-Input-atmel_mxt_ts-add-backupnv-sysfs-entry.patch +++ b/patches/mxt/0028-CHROMIUM-Input-atmel_mxt_ts-add-backupnv-sysfs-entry.patch @@ -1,4 +1,4 @@ -From f73446b98a653012378bbf2871da174a2a42d4a3 Mon Sep 17 00:00:00 2001 +From b6f83be0fba0c333f2d4162d1759ac8c7314f128 Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Mon, 19 Mar 2012 10:09:41 +0800 Subject: [PATCH 28/57] CHROMIUM: Input: atmel_mxt_ts - add backupnv sysfs @@ -25,7 +25,7 @@ Tested-by: Daniel Kurtz v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 19 +++++++++++++++++++ + drivers/input/touchscreen/atmel_mxt_ts.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -73,5 +73,5 @@ index 120d766..c2891f2 100644 &dev_attr_config_csum.attr, &dev_attr_fw_version.attr, -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0029-CHROMIUM-Input-atmel_mxt_ts-read-num-messages-then-a.patch b/patches/mxt/0029-CHROMIUM-Input-atmel_mxt_ts-read-num-messages-then-a.patch index 583f769f..d6c5a082 100644 --- a/patches/mxt/0029-CHROMIUM-Input-atmel_mxt_ts-read-num-messages-then-a.patch +++ b/patches/mxt/0029-CHROMIUM-Input-atmel_mxt_ts-read-num-messages-then-a.patch @@ -1,8 +1,8 @@ -From 2034556f753459e45aa5e8972fdc2e7eaab95bb8 Mon Sep 17 00:00:00 2001 +From 6fcaacf336b509207d4ef6812c167aaa9324784e Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Mon, 19 Mar 2012 09:42:09 +0800 -Subject: [PATCH 29/57] CHROMIUM: Input: atmel_mxt_ts - read num messages, - then all messages +Subject: [PATCH 29/57] CHROMIUM: Input: atmel_mxt_ts - read num messages, then + all messages Implement the MXT DMA method of reading messages. On an interrupt, the T44 report always contains the number of messages @@ -37,7 +37,7 @@ Commit-Ready: Daniel Kurtz v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 138 +++++++++++++++++++----------- + drivers/input/touchscreen/atmel_mxt_ts.c | 138 ++++++++++++++++++++----------- 1 file changed, 90 insertions(+), 48 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -237,5 +237,5 @@ index c2891f2..8c29fb3 100644 } -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0030-CHROMIUM-Input-atmel_mxt_ts-remove-mxt_make_highchg.patch b/patches/mxt/0030-CHROMIUM-Input-atmel_mxt_ts-remove-mxt_make_highchg.patch index 3b67ae5c..246ea290 100644 --- a/patches/mxt/0030-CHROMIUM-Input-atmel_mxt_ts-remove-mxt_make_highchg.patch +++ b/patches/mxt/0030-CHROMIUM-Input-atmel_mxt_ts-remove-mxt_make_highchg.patch @@ -1,8 +1,7 @@ -From c3bcb6021b99b73bc5eb3922df227353b36959d3 Mon Sep 17 00:00:00 2001 +From 9ca09bb89dd19eadbe3ce9feef697ea7dcfae666 Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Wed, 19 Dec 2012 17:48:36 +0800 -Subject: [PATCH 30/57] CHROMIUM: Input: atmel_mxt_ts - remove - mxt_make_highchg +Subject: [PATCH 30/57] CHROMIUM: Input: atmel_mxt_ts - remove mxt_make_highchg This function attempts to make the CHG pin high by reading a messages until the device queue is empty. @@ -29,7 +28,7 @@ Reviewed-by: Benson Leung v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 33 ++---------------------------- + drivers/input/touchscreen/atmel_mxt_ts.c | 33 ++------------------------------ 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -105,5 +104,5 @@ index 8c29fb3..8dfdba9 100644 goto err_free_irq; } -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0031-CHROMIUM-Input-atmel_mxt_ts-Remove-matrix-size-updat.patch b/patches/mxt/0031-CHROMIUM-Input-atmel_mxt_ts-Remove-matrix-size-updat.patch index 12cd114e..745b306d 100644 --- a/patches/mxt/0031-CHROMIUM-Input-atmel_mxt_ts-Remove-matrix-size-updat.patch +++ b/patches/mxt/0031-CHROMIUM-Input-atmel_mxt_ts-Remove-matrix-size-updat.patch @@ -1,4 +1,4 @@ -From 35158e2d43263cb0fc8bd82249ac6a865662aa50 Mon Sep 17 00:00:00 2001 +From 6ff0c08cd1960cfaea28f8ef0e0baa15d12dff4b Mon Sep 17 00:00:00 2001 From: Yufeng Shen Date: Tue, 1 May 2012 17:31:04 -0400 Subject: [PATCH 31/57] CHROMIUM: Input: atmel_mxt_ts - Remove matrix size @@ -19,7 +19,7 @@ Reviewed-on: https://gerrit.chromium.org/gerrit/21547 v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 17 ----------------- + drivers/input/touchscreen/atmel_mxt_ts.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -65,5 +65,5 @@ index 8dfdba9..71a5317 100644 "Family ID: %u Variant ID: %u Major.Minor.Build: %u.%u.%02X\n", info->family_id, info->variant_id, info->version >> 4, -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0032-CHROMIUM-Input-atmel_mxt_ts-parse-vector-field-of-da.patch b/patches/mxt/0032-CHROMIUM-Input-atmel_mxt_ts-parse-vector-field-of-da.patch index 6087bbb2..02c810bf 100644 --- a/patches/mxt/0032-CHROMIUM-Input-atmel_mxt_ts-parse-vector-field-of-da.patch +++ b/patches/mxt/0032-CHROMIUM-Input-atmel_mxt_ts-parse-vector-field-of-da.patch @@ -1,4 +1,4 @@ -From 9bd936363e294a8bc0af894094cfc4da9882c128 Mon Sep 17 00:00:00 2001 +From aec01f95f5f53b915a8e764dc1be4b63f300ed6d Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Mon, 20 Feb 2012 23:35:06 +0800 Subject: [PATCH 32/57] CHROMIUM: Input: atmel_mxt_ts - parse vector field of @@ -22,7 +22,7 @@ Tested-by: Daniel Kurtz v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 10 ++++++++-- + drivers/input/touchscreen/atmel_mxt_ts.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -69,5 +69,5 @@ index 71a5317..1882e14 100644 } -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0033-CHROMIUM-Input-atmel_mxt_ts-Add-IDLE-DEEP-SLEEP-mode.patch b/patches/mxt/0033-CHROMIUM-Input-atmel_mxt_ts-Add-IDLE-DEEP-SLEEP-mode.patch index 9088440a..31c53f39 100644 --- a/patches/mxt/0033-CHROMIUM-Input-atmel_mxt_ts-Add-IDLE-DEEP-SLEEP-mode.patch +++ b/patches/mxt/0033-CHROMIUM-Input-atmel_mxt_ts-Add-IDLE-DEEP-SLEEP-mode.patch @@ -1,4 +1,4 @@ -From 401e67677694d8e9920031854de068735e6cd4c6 Mon Sep 17 00:00:00 2001 +From 86e8ee64fe6074eb56ae708bf697d0d4f65de7b4 Mon Sep 17 00:00:00 2001 From: Yufeng Shen Date: Fri, 4 May 2012 20:47:32 -0400 Subject: [PATCH 33/57] CHROMIUM: Input: atmel_mxt_ts - Add IDLE/DEEP-SLEEP @@ -41,7 +41,7 @@ Reviewed-by: Benson Leung v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 134 ++++++++++++++++++++++++++++-- + drivers/input/touchscreen/atmel_mxt_ts.c | 134 +++++++++++++++++++++++++++++-- 1 file changed, 127 insertions(+), 7 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -226,5 +226,5 @@ index 1882e14..0804795 100644 mutex_unlock(&input_dev->mutex); -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0034-CHROMIUM-Input-atmel_mxt_ts-Move-object-from-sysfs-t.patch b/patches/mxt/0034-CHROMIUM-Input-atmel_mxt_ts-Move-object-from-sysfs-t.patch index 69c866f8..5c66116a 100644 --- a/patches/mxt/0034-CHROMIUM-Input-atmel_mxt_ts-Move-object-from-sysfs-t.patch +++ b/patches/mxt/0034-CHROMIUM-Input-atmel_mxt_ts-Move-object-from-sysfs-t.patch @@ -1,4 +1,4 @@ -From e01b06ba93d0eb121142c5122af0c864bff12644 Mon Sep 17 00:00:00 2001 +From e02bdb6cbb3963fb1ace3a90dc645530ac99a4cf Mon Sep 17 00:00:00 2001 From: Yufeng Shen Date: Thu, 10 May 2012 16:19:04 -0400 Subject: [PATCH 34/57] CHROMIUM: Input: atmel_mxt_ts - Move object from sysfs @@ -26,7 +26,7 @@ Tested-by: Yufeng Shen v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 279 +++++++++++++++++++++++------- + drivers/input/touchscreen/atmel_mxt_ts.c | 279 +++++++++++++++++++++++-------- 1 file changed, 212 insertions(+), 67 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -372,5 +372,5 @@ index 0804795..3ea35d1 100644 free_irq(data->irq, data); if (data->input_dev) -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0035-CHROMIUM-Input-atmel_mxt_ts-Set-default-irqflags-whe.patch b/patches/mxt/0035-CHROMIUM-Input-atmel_mxt_ts-Set-default-irqflags-whe.patch index b09165fd..3c660b4e 100644 --- a/patches/mxt/0035-CHROMIUM-Input-atmel_mxt_ts-Set-default-irqflags-whe.patch +++ b/patches/mxt/0035-CHROMIUM-Input-atmel_mxt_ts-Set-default-irqflags-whe.patch @@ -1,4 +1,4 @@ -From 5ca5f193df77863490a93b638f7590503acde3d2 Mon Sep 17 00:00:00 2001 +From 4a49465c9ce328e209a3e02d2ae54dbeec732ff8 Mon Sep 17 00:00:00 2001 From: Yufeng Shen Date: Mon, 14 May 2012 12:06:29 -0400 Subject: [PATCH 35/57] CHROMIUM: Input: atmel_mxt_ts - Set default irqflags @@ -27,7 +27,7 @@ Tested-by: Yufeng Shen v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 5 ++++- + drivers/input/touchscreen/atmel_mxt_ts.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -55,5 +55,5 @@ index 3ea35d1..ec1077b 100644 if (error) { dev_err(&client->dev, "Failed to register interrupt\n"); -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0036-CHROMIUM-Input-atmel_mxt_ts-Support-the-case-with-no.patch b/patches/mxt/0036-CHROMIUM-Input-atmel_mxt_ts-Support-the-case-with-no.patch index 94954ef4..dc8443fd 100644 --- a/patches/mxt/0036-CHROMIUM-Input-atmel_mxt_ts-Support-the-case-with-no.patch +++ b/patches/mxt/0036-CHROMIUM-Input-atmel_mxt_ts-Support-the-case-with-no.patch @@ -1,4 +1,4 @@ -From 6a4f6f0376a4bbb115500ed307147deabc6d63b3 Mon Sep 17 00:00:00 2001 +From 0c948ce76740023682c9579a1ca431dcfed0bcfe Mon Sep 17 00:00:00 2001 From: Yufeng Shen Date: Mon, 14 May 2012 12:29:52 -0400 Subject: [PATCH 36/57] CHROMIUM: Input: atmel_mxt_ts - Support the case with @@ -26,7 +26,7 @@ Commit-Ready: Yufeng Shen Reviewed-by: Yufeng Shen Tested-by: Yufeng Shen --- - drivers/input/touchscreen/atmel_mxt_ts.c | 28 ++++++++++++++++++---------- + drivers/input/touchscreen/atmel_mxt_ts.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -110,5 +110,5 @@ index ec1077b..3dbaa3c 100644 if (!data) { dev_err(&client->dev, "Failed to allocate memory\n"); -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0037-CHROMIUM-Input-atmel_mxt_ts-Wait-on-auto-calibration.patch b/patches/mxt/0037-CHROMIUM-Input-atmel_mxt_ts-Wait-on-auto-calibration.patch index af4d6b35..efb8f331 100644 --- a/patches/mxt/0037-CHROMIUM-Input-atmel_mxt_ts-Wait-on-auto-calibration.patch +++ b/patches/mxt/0037-CHROMIUM-Input-atmel_mxt_ts-Wait-on-auto-calibration.patch @@ -1,4 +1,4 @@ -From e53e1a82630baaeca128ad846abab2bf0b000bed Mon Sep 17 00:00:00 2001 +From 7040d68f361dacdbe0092deb0ad4ffed53c593b6 Mon Sep 17 00:00:00 2001 From: Yufeng Shen Date: Wed, 16 May 2012 14:52:02 -0400 Subject: [PATCH 37/57] CHROMIUM: Input: atmel_mxt_ts - Wait on auto @@ -28,7 +28,7 @@ Commit-Ready: Yufeng Shen v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 39 +++++++++++++++++++++++++----- + drivers/input/touchscreen/atmel_mxt_ts.c | 39 +++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -117,5 +117,5 @@ index 3dbaa3c..bac30d1f 100644 /* Enable wake from IRQ */ data->irq_wake = (enable_irq_wake(data->irq) == 0); -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0038-CHROMIUM-Input-atmel_mxt_ts-Add-sysfs-entry-for-r-w-.patch b/patches/mxt/0038-CHROMIUM-Input-atmel_mxt_ts-Add-sysfs-entry-for-r-w-.patch index f92e676b..1daea4c9 100644 --- a/patches/mxt/0038-CHROMIUM-Input-atmel_mxt_ts-Add-sysfs-entry-for-r-w-.patch +++ b/patches/mxt/0038-CHROMIUM-Input-atmel_mxt_ts-Add-sysfs-entry-for-r-w-.patch @@ -1,8 +1,8 @@ -From ad63e5c5c8fd974c9c9d9c658aaa538a38f8fc20 Mon Sep 17 00:00:00 2001 +From b18ae44e3a7986d9517c5ecbcdc3f7a75a89bcfb Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Thu, 13 Dec 2012 11:36:59 +0800 -Subject: [PATCH 38/57] CHROMIUM: Input: atmel_mxt_ts - Add sysfs entry for - r/w fw file name +Subject: [PATCH 38/57] CHROMIUM: Input: atmel_mxt_ts - Add sysfs entry for r/w + fw file name On system with more than 1 Atmel chip, a fixed firmware file name "maxtouch.fw" does not work since different chips need different @@ -35,7 +35,7 @@ Commit-Ready: Yufeng Shen v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 69 +++++++++++++++++++++++++++++- + drivers/input/touchscreen/atmel_mxt_ts.c | 69 +++++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -182,5 +182,5 @@ index bac30d1f..1659d91 100644 return 0; -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0039-CHROMIUM-Input-atmel_mxt_ts-Add-sysfs-entry-for-r-w-.patch b/patches/mxt/0039-CHROMIUM-Input-atmel_mxt_ts-Add-sysfs-entry-for-r-w-.patch index f74475e9..d4bc7175 100644 --- a/patches/mxt/0039-CHROMIUM-Input-atmel_mxt_ts-Add-sysfs-entry-for-r-w-.patch +++ b/patches/mxt/0039-CHROMIUM-Input-atmel_mxt_ts-Add-sysfs-entry-for-r-w-.patch @@ -1,8 +1,8 @@ -From 160b45796ce29143f6272bf907e77131dd0c3405 Mon Sep 17 00:00:00 2001 +From 24a575de4e1da76bbbc7900b5a0e1cb1c59f27cf Mon Sep 17 00:00:00 2001 From: Yufeng Shen Date: Wed, 16 May 2012 18:38:14 -0400 -Subject: [PATCH 39/57] CHROMIUM: Input: atmel_mxt_ts - Add sysfs entry for - r/w config file name +Subject: [PATCH 39/57] CHROMIUM: Input: atmel_mxt_ts - Add sysfs entry for r/w + config file name In the preparation for adding support of loading atmel config data from file, this CL adds the sysfs entry config_file so that which @@ -31,7 +31,7 @@ Tested-by: Yufeng Shen v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 37 +++++++++++++++++++++++++++++- + drivers/input/touchscreen/atmel_mxt_ts.c | 37 +++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -137,5 +137,5 @@ index 1659d91..dbabc89 100644 return 0; -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0040-CHROMIUM-Input-atmel_mxt_ts-add-sysfs-entry-for-writ.patch b/patches/mxt/0040-CHROMIUM-Input-atmel_mxt_ts-add-sysfs-entry-for-writ.patch index d804d69c..4973790d 100644 --- a/patches/mxt/0040-CHROMIUM-Input-atmel_mxt_ts-add-sysfs-entry-for-writ.patch +++ b/patches/mxt/0040-CHROMIUM-Input-atmel_mxt_ts-add-sysfs-entry-for-writ.patch @@ -1,4 +1,4 @@ -From f15e6bed33bc4b1dcdd652c905a4062dfefff1b8 Mon Sep 17 00:00:00 2001 +From 6c3dc9b2acf9b9e9242db5922031967966899a72 Mon Sep 17 00:00:00 2001 From: Yufeng Shen Date: Fri, 18 May 2012 16:04:06 -0400 Subject: [PATCH 40/57] CHROMIUM: Input: atmel_mxt_ts - add sysfs entry for @@ -43,7 +43,7 @@ Reviewed-on: https://gerrit.chromium.org/gerrit/31638 v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 315 ++++++++++++++++++++++++++++++ + drivers/input/touchscreen/atmel_mxt_ts.c | 315 +++++++++++++++++++++++++++++++ 1 file changed, 315 insertions(+) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -408,5 +408,5 @@ index dbabc89..8f1a33f 100644 NULL }; -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0041-CHROMIUM-Input-atmel_mxt_ts-make-mxt_initialize-asyn.patch b/patches/mxt/0041-CHROMIUM-Input-atmel_mxt_ts-make-mxt_initialize-asyn.patch index 68584f14..a2b1608f 100644 --- a/patches/mxt/0041-CHROMIUM-Input-atmel_mxt_ts-make-mxt_initialize-asyn.patch +++ b/patches/mxt/0041-CHROMIUM-Input-atmel_mxt_ts-make-mxt_initialize-asyn.patch @@ -1,4 +1,4 @@ -From 1a574f2ec1e63b92ea12ebb130f702d8e6afc761 Mon Sep 17 00:00:00 2001 +From d041c89d9ba8211378dca39ce3b383b95c74c268 Mon Sep 17 00:00:00 2001 From: Yufeng Shen Date: Tue, 30 Oct 2012 16:06:51 -0400 Subject: [PATCH 41/57] CHROMIUM: Input: atmel_mxt_ts - make mxt_initialize @@ -27,7 +27,7 @@ Signed-off-by: Daniel Kurtz Change-Id: I81785546c6a0ff87486e7ee92cb8bab8aefe2594 --- - drivers/input/touchscreen/atmel_mxt_ts.c | 123 ++++++++++++++++++------------ + drivers/input/touchscreen/atmel_mxt_ts.c | 123 +++++++++++++++++++------------ 1 file changed, 74 insertions(+), 49 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -224,5 +224,5 @@ index 8f1a33f..315dcb9 100644 kfree(data->fw_file); err_free_mem: -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0042-CHROMIUM-Input-atmel_mxt_ts-move-backup_nv-to-handle.patch b/patches/mxt/0042-CHROMIUM-Input-atmel_mxt_ts-move-backup_nv-to-handle.patch index 8507c30d..4a8f892b 100644 --- a/patches/mxt/0042-CHROMIUM-Input-atmel_mxt_ts-move-backup_nv-to-handle.patch +++ b/patches/mxt/0042-CHROMIUM-Input-atmel_mxt_ts-move-backup_nv-to-handle.patch @@ -1,4 +1,4 @@ -From 42e0f06c8acf935ed83c31f137978a8001a9c70d Mon Sep 17 00:00:00 2001 +From 36626ce442293b75a5bb96710b5f2518617c3d71 Mon Sep 17 00:00:00 2001 From: Benson Leung Date: Tue, 7 Aug 2012 19:48:12 -0700 Subject: [PATCH 42/57] CHROMIUM: Input: atmel_mxt_ts - move backup_nv to @@ -26,7 +26,7 @@ Tested-by: Benson Leung v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 14 +++++++------- + drivers/input/touchscreen/atmel_mxt_ts.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -62,5 +62,5 @@ index 315dcb9..bdbcc60 100644 error = mxt_write_object(data, MXT_GEN_COMMAND_T6, MXT_COMMAND_RESET, 1); -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0043-CHROMIUM-Input-atmel_mxt_ts-Add-defines-for-T9-Touch.patch b/patches/mxt/0043-CHROMIUM-Input-atmel_mxt_ts-Add-defines-for-T9-Touch.patch index 8548563a..618acabc 100644 --- a/patches/mxt/0043-CHROMIUM-Input-atmel_mxt_ts-Add-defines-for-T9-Touch.patch +++ b/patches/mxt/0043-CHROMIUM-Input-atmel_mxt_ts-Add-defines-for-T9-Touch.patch @@ -1,4 +1,4 @@ -From 7d9bb3713829a1b0f75193a793c059c367454c61 Mon Sep 17 00:00:00 2001 +From 0d3e4dc703ee18ae9a0610a3ad3336cd0efd2c55 Mon Sep 17 00:00:00 2001 From: Benson Leung Date: Tue, 7 Aug 2012 16:20:18 -0700 Subject: [PATCH 43/57] CHROMIUM: Input: atmel_mxt_ts - Add defines for T9 @@ -21,7 +21,7 @@ Reviewed-by: Benson Leung v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 24 ++++++++++++++++++++---- + drivers/input/touchscreen/atmel_mxt_ts.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -81,5 +81,5 @@ index bdbcc60..f13ef67 100644 /* Enable wake from IRQ */ -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0044-CHROMIUM-Input-atmel_mxt_ts-disable-reporting-on-sto.patch b/patches/mxt/0044-CHROMIUM-Input-atmel_mxt_ts-disable-reporting-on-sto.patch index 673c9a86..74f10da4 100644 --- a/patches/mxt/0044-CHROMIUM-Input-atmel_mxt_ts-disable-reporting-on-sto.patch +++ b/patches/mxt/0044-CHROMIUM-Input-atmel_mxt_ts-disable-reporting-on-sto.patch @@ -1,4 +1,4 @@ -From 9bc6c198369cb701a3d2da50cdb2c801177e5387 Mon Sep 17 00:00:00 2001 +From 5db4868e58375586bc617bf0939caddfe3f55c13 Mon Sep 17 00:00:00 2001 From: Benson Leung Date: Fri, 10 Aug 2012 18:43:52 -0700 Subject: [PATCH 44/57] CHROMIUM: Input: atmel_mxt_ts - disable reporting on @@ -20,7 +20,7 @@ Reviewed-on: https://gerrit.chromium.org/gerrit/29951 v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 8 ++++---- + drivers/input/touchscreen/atmel_mxt_ts.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -49,5 +49,5 @@ index f13ef67..33b564b 100644 static int mxt_input_open(struct input_dev *dev) -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0045-CHROMIUM-Input-atmel_mxt_ts-Suppress-handle-messages.patch b/patches/mxt/0045-CHROMIUM-Input-atmel_mxt_ts-Suppress-handle-messages.patch index 6d1e9888..c3d1d231 100644 --- a/patches/mxt/0045-CHROMIUM-Input-atmel_mxt_ts-Suppress-handle-messages.patch +++ b/patches/mxt/0045-CHROMIUM-Input-atmel_mxt_ts-Suppress-handle-messages.patch @@ -1,4 +1,4 @@ -From d437939e503d1689e083c41ad1bb71c6e8502fc1 Mon Sep 17 00:00:00 2001 +From 08544f840e0dbf607349e8267deb37d2a99109ba Mon Sep 17 00:00:00 2001 From: Benson Leung Date: Mon, 13 Aug 2012 18:10:29 -0700 Subject: [PATCH 45/57] CHROMIUM: Input: atmel_mxt_ts - Suppress handle @@ -23,7 +23,7 @@ Reviewed-by: Yufeng Shen v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 18 ++++++++++-------- + drivers/input/touchscreen/atmel_mxt_ts.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -112,5 +112,5 @@ index 33b564b..af92d8d 100644 dev_err(dev, "Handling message fails upon resume, %d\n", ret); -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0046-CHROMIUM-Input-atmel_mxt_ts-save-and-restore-t9_ctrl.patch b/patches/mxt/0046-CHROMIUM-Input-atmel_mxt_ts-save-and-restore-t9_ctrl.patch index 78935af2..5a3db940 100644 --- a/patches/mxt/0046-CHROMIUM-Input-atmel_mxt_ts-save-and-restore-t9_ctrl.patch +++ b/patches/mxt/0046-CHROMIUM-Input-atmel_mxt_ts-save-and-restore-t9_ctrl.patch @@ -1,4 +1,4 @@ -From 18669640d0c5547c91062f2bbf71cf7b7118beaf Mon Sep 17 00:00:00 2001 +From 1bbc1e5480caa8658c0b4ce53a4d5d6d82a759bf Mon Sep 17 00:00:00 2001 From: Benson Leung Date: Thu, 23 Aug 2012 15:43:55 -0700 Subject: [PATCH 46/57] CHROMIUM: Input: atmel_mxt_ts - save and restore @@ -20,7 +20,7 @@ Tested-by: Benson Leung v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 18 ++++++++---------- + drivers/input/touchscreen/atmel_mxt_ts.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -70,5 +70,5 @@ index af92d8d..ae8a6f3 100644 /* Restore the T7 Power config to before-suspend value */ -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0047-CHROMIUM-Input-atmel_mxt_ts-enable-RPTEN-if-can-wake.patch b/patches/mxt/0047-CHROMIUM-Input-atmel_mxt_ts-enable-RPTEN-if-can-wake.patch index a17723b9..9007776a 100644 --- a/patches/mxt/0047-CHROMIUM-Input-atmel_mxt_ts-enable-RPTEN-if-can-wake.patch +++ b/patches/mxt/0047-CHROMIUM-Input-atmel_mxt_ts-enable-RPTEN-if-can-wake.patch @@ -1,4 +1,4 @@ -From 60f1ca1b44584fc28a78e57182fc8fd45698c26d Mon Sep 17 00:00:00 2001 +From 64bfc8f28bab3db22f674972f1d4ef77f7ba1f47 Mon Sep 17 00:00:00 2001 From: Yufeng Shen Date: Wed, 12 Sep 2012 12:42:16 -0400 Subject: [PATCH 47/57] CHROMIUM: Input: atmel_mxt_ts - enable RPTEN if can @@ -29,7 +29,7 @@ Reviewed-by: Benson Leung Commit-Ready: Yufeng Shen Tested-by: Yufeng Shen --- - drivers/input/touchscreen/atmel_mxt_ts.c | 35 ++++++++++++++++++++++-------- + drivers/input/touchscreen/atmel_mxt_ts.c | 35 ++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -95,5 +95,5 @@ index ae8a6f3..d7cd1a5 100644 /* Enable wake from IRQ */ -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0048-CHROMIUM-Input-atmel_mxt_ts-release-all-fingers-on-r.patch b/patches/mxt/0048-CHROMIUM-Input-atmel_mxt_ts-release-all-fingers-on-r.patch index 38dacc47..5a02defc 100644 --- a/patches/mxt/0048-CHROMIUM-Input-atmel_mxt_ts-release-all-fingers-on-r.patch +++ b/patches/mxt/0048-CHROMIUM-Input-atmel_mxt_ts-release-all-fingers-on-r.patch @@ -1,4 +1,4 @@ -From 0d93f47e82ec4e13456afb42bcbe15aa67f44aaa Mon Sep 17 00:00:00 2001 +From 1ed8caab1063dab52a26b1c120eeae5ea735ebb1 Mon Sep 17 00:00:00 2001 From: Yufeng Shen Date: Tue, 9 Oct 2012 16:51:52 -0400 Subject: [PATCH 48/57] CHROMIUM: Input: atmel_mxt_ts - release all fingers on @@ -34,7 +34,7 @@ Tested-by: Yufeng Shen v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 49 ++++++++++++++++++++++++++++++ + drivers/input/touchscreen/atmel_mxt_ts.c | 49 ++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -126,5 +126,5 @@ index d7cd1a5..b964430 100644 enable_irq(data->irq); -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0049-CHROMIUM-Input-atmel_mxt_ts-make-suspend-power-acqui.patch b/patches/mxt/0049-CHROMIUM-Input-atmel_mxt_ts-make-suspend-power-acqui.patch index 2361c802..29601b43 100644 --- a/patches/mxt/0049-CHROMIUM-Input-atmel_mxt_ts-make-suspend-power-acqui.patch +++ b/patches/mxt/0049-CHROMIUM-Input-atmel_mxt_ts-make-suspend-power-acqui.patch @@ -1,4 +1,4 @@ -From aa64dd278c0eafd7d7442c0b537f02f7719316c2 Mon Sep 17 00:00:00 2001 +From 31c2f735f9a1073376e9502b86a2bcc70350cf7c Mon Sep 17 00:00:00 2001 From: Yufeng Shen Date: Mon, 12 Nov 2012 14:21:10 -0500 Subject: [PATCH 49/57] CHROMIUM: Input: atmel_mxt_ts - make suspend power @@ -32,7 +32,7 @@ Tested-by: Yufeng Shen v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 64 +++++++++++++++++++++++++++++- + drivers/input/touchscreen/atmel_mxt_ts.c | 64 +++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -167,5 +167,5 @@ index b964430..8ca5288 100644 const u8 *power_config; int ret; -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0050-CHROMIUM-Input-atmel_mxt_ts-recalibrate-on-system-re.patch b/patches/mxt/0050-CHROMIUM-Input-atmel_mxt_ts-recalibrate-on-system-re.patch index c0fa82f3..e4b9151b 100644 --- a/patches/mxt/0050-CHROMIUM-Input-atmel_mxt_ts-recalibrate-on-system-re.patch +++ b/patches/mxt/0050-CHROMIUM-Input-atmel_mxt_ts-recalibrate-on-system-re.patch @@ -1,4 +1,4 @@ -From 66dfb36736b7844636d2c39fbbda3dd553d3a7ec Mon Sep 17 00:00:00 2001 +From 625017ff203753fa6ebe240cc3fa13d977787e22 Mon Sep 17 00:00:00 2001 From: Yufeng Shen Date: Wed, 14 Nov 2012 16:13:59 -0500 Subject: [PATCH 50/57] CHROMIUM: Input: atmel_mxt_ts - recalibrate on system @@ -38,7 +38,7 @@ Tested-by: Yufeng Shen v3.7 rebase: Signed-off-by: Daniel Kurtz --- - drivers/input/touchscreen/atmel_mxt_ts.c | 19 ++++++++++++++----- + drivers/input/touchscreen/atmel_mxt_ts.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -81,5 +81,5 @@ index 8ca5288..9196e94 100644 } #endif -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0051-CHROMIUM-Input-atmel_mxt_ts-Use-correct-max-touch_ma.patch b/patches/mxt/0051-CHROMIUM-Input-atmel_mxt_ts-Use-correct-max-touch_ma.patch index 61c62594..0411cb9a 100644 --- a/patches/mxt/0051-CHROMIUM-Input-atmel_mxt_ts-Use-correct-max-touch_ma.patch +++ b/patches/mxt/0051-CHROMIUM-Input-atmel_mxt_ts-Use-correct-max-touch_ma.patch @@ -1,4 +1,4 @@ -From 0892772beeace15d297c018c5dbd8bbbd7365edc Mon Sep 17 00:00:00 2001 +From 6868ea10d7c52793b004024e5e20c802be7ccc4c Mon Sep 17 00:00:00 2001 From: Yufeng Shen Date: Thu, 10 Jan 2013 15:00:42 -0500 Subject: [PATCH 51/57] CHROMIUM: Input: atmel_mxt_ts: Use correct max @@ -24,7 +24,7 @@ Commit-Queue: Yufeng Shen Tested-by: Yufeng Shen (cherry picked from commit 0a962d62165755547e4802da837ca9004f5d246b) --- - drivers/input/touchscreen/atmel_mxt_ts.c | 6 +++++- + drivers/input/touchscreen/atmel_mxt_ts.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -59,5 +59,5 @@ index 9196e94..893d59d 100644 } } -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0052-CHROMIUM-Input-atmel_mxt_ts-Add-support-for-T65-Lens.patch b/patches/mxt/0052-CHROMIUM-Input-atmel_mxt_ts-Add-support-for-T65-Lens.patch index e7edad6c..d32c2216 100644 --- a/patches/mxt/0052-CHROMIUM-Input-atmel_mxt_ts-Add-support-for-T65-Lens.patch +++ b/patches/mxt/0052-CHROMIUM-Input-atmel_mxt_ts-Add-support-for-T65-Lens.patch @@ -1,4 +1,4 @@ -From 9be4ed3de3a2d94775498900446010a88c64b629 Mon Sep 17 00:00:00 2001 +From de6ff9390051b91843e44058764e9bb3a760809f Mon Sep 17 00:00:00 2001 From: Benson Leung Date: Wed, 9 Jan 2013 17:30:44 -0800 Subject: [PATCH 52/57] CHROMIUM: Input: atmel_mxt_ts - Add support for T65, @@ -38,7 +38,7 @@ Commit-Queue: Benson Leung Tested-by: Benson Leung (cherry picked from commit 5fd7e4778bd22252de5611a894d061a3bb64c4a2) --- - drivers/input/touchscreen/atmel_mxt_ts.c | 3 +++ + drivers/input/touchscreen/atmel_mxt_ts.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -70,5 +70,5 @@ index 893d59d..fdf61b8 100644 case MXT_SPT_GPIOPWM_T19: case MXT_SPT_SELFTEST_T25: -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0053-CHROMIUM-Input-atmel_mxt_ts-On-Tpads-enable-T42-disa.patch b/patches/mxt/0053-CHROMIUM-Input-atmel_mxt_ts-On-Tpads-enable-T42-disa.patch index b1a0c300..deef5b8f 100644 --- a/patches/mxt/0053-CHROMIUM-Input-atmel_mxt_ts-On-Tpads-enable-T42-disa.patch +++ b/patches/mxt/0053-CHROMIUM-Input-atmel_mxt_ts-On-Tpads-enable-T42-disa.patch @@ -1,4 +1,4 @@ -From 227b2d0849c9566f312a6075973ae7ef86704801 Mon Sep 17 00:00:00 2001 +From dc913820e32f95a70243107b1f789240fc026962 Mon Sep 17 00:00:00 2001 From: Benson Leung Date: Fri, 18 Jan 2013 17:35:19 -0800 Subject: [PATCH 53/57] CHROMIUM: Input: atmel_mxt_ts : On Tpads, enable T42, @@ -28,7 +28,7 @@ Tested-by: Benson Leung (cherry picked from commit 6988c8d813d863007df2ba3f418172d07b63ece6) [djkurtz: v3.6: merge] --- - drivers/input/touchscreen/atmel_mxt_ts.c | 61 ++++++++++++++++++++++++++++++ + drivers/input/touchscreen/atmel_mxt_ts.c | 61 ++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -118,5 +118,5 @@ index fdf61b8..8077000 100644 /* Recalibration in case of environment change */ ret = mxt_write_object(data, MXT_GEN_COMMAND_T6, -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0054-CHROMIUM-Input-atmel_mxt_ts-Set-power-wakeup-to-disa.patch b/patches/mxt/0054-CHROMIUM-Input-atmel_mxt_ts-Set-power-wakeup-to-disa.patch index 482eed6d..143fe18e 100644 --- a/patches/mxt/0054-CHROMIUM-Input-atmel_mxt_ts-Set-power-wakeup-to-disa.patch +++ b/patches/mxt/0054-CHROMIUM-Input-atmel_mxt_ts-Set-power-wakeup-to-disa.patch @@ -1,4 +1,4 @@ -From f1ec11b63d100c81ead2e8fffe9af7c1d2bba415 Mon Sep 17 00:00:00 2001 +From 8920c1f9d5eb8ee0e351851cd6ae3d34912ca8ac Mon Sep 17 00:00:00 2001 From: Benson Leung Date: Fri, 18 Jan 2013 17:35:52 -0800 Subject: [PATCH 54/57] CHROMIUM: Input: atmel_mxt_ts : Set power/wakeup to @@ -22,7 +22,7 @@ Commit-Queue: Benson Leung Tested-by: Benson Leung (cherry picked from commit 6625e780bacf270b6da346751819d2825f09c20a) --- - drivers/input/touchscreen/atmel_mxt_ts.c | 2 ++ + drivers/input/touchscreen/atmel_mxt_ts.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -39,5 +39,5 @@ index 8077000..3f14d3b 100644 return 0; -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0055-CHROMIUM-Input-atmel_mxt_ts-mxt_stop-on-lid-close.patch b/patches/mxt/0055-CHROMIUM-Input-atmel_mxt_ts-mxt_stop-on-lid-close.patch index 14b17a20..f42bc2f8 100644 --- a/patches/mxt/0055-CHROMIUM-Input-atmel_mxt_ts-mxt_stop-on-lid-close.patch +++ b/patches/mxt/0055-CHROMIUM-Input-atmel_mxt_ts-mxt_stop-on-lid-close.patch @@ -1,4 +1,4 @@ -From b38092ff2a48aaf1384512fe214128baf78452c2 Mon Sep 17 00:00:00 2001 +From 5b974516c4c9d8c2421dd29cf1147e0cde337b73 Mon Sep 17 00:00:00 2001 From: Benson Leung Date: Fri, 25 Jan 2013 17:45:56 -0800 Subject: [PATCH 55/57] CHROMIUM: Input: atmel_mxt_ts - mxt_stop on lid close @@ -22,7 +22,7 @@ Commit-Queue: Benson Leung Tested-by: Benson Leung (cherry picked from commit 5391ebafb8f9b72475795445ca71b02815a2a229) --- - drivers/input/touchscreen/atmel_mxt_ts.c | 49 ++++++++++++++++++++++++++++++ + drivers/input/touchscreen/atmel_mxt_ts.c | 49 ++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -121,5 +121,5 @@ index 3f14d3b..cd900ee 100644 * For tpads, save T42 and T19 ctrl registers if may wakeup, * enable large object suppression, and disable button wake. -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0056-CHROMIUM-Input-atmel_mxt_ts-Disable-T9-on-mxt_stop.patch b/patches/mxt/0056-CHROMIUM-Input-atmel_mxt_ts-Disable-T9-on-mxt_stop.patch index b056986b..310862b7 100644 --- a/patches/mxt/0056-CHROMIUM-Input-atmel_mxt_ts-Disable-T9-on-mxt_stop.patch +++ b/patches/mxt/0056-CHROMIUM-Input-atmel_mxt_ts-Disable-T9-on-mxt_stop.patch @@ -1,4 +1,4 @@ -From b0ffccb611cf6631fd8527e0f6cc1f167834fa88 Mon Sep 17 00:00:00 2001 +From 7b4e0017a08acf0daea7d59c1c1ce1950143b6ac Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Thu, 31 Jan 2013 17:43:07 +0800 Subject: [PATCH 56/57] CHROMIUM: Input: atmel_mxt_ts - Disable T9 on mxt_stop @@ -24,7 +24,7 @@ Tested-by: Benson Leung (cherry picked from commit 65caaf9e0697899cd5e21eb643e018298adc781a) [djkurtz: v3.6 merge] --- - drivers/input/touchscreen/atmel_mxt_ts.c | 3 ++- + drivers/input/touchscreen/atmel_mxt_ts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -49,5 +49,5 @@ index cd900ee..0865842 100644 static int mxt_input_open(struct input_dev *dev) -- -1.7.9.5 +1.9.0 diff --git a/patches/mxt/0057-CHROMIUM-Input-atmel_mxt_ts-Set-T9-in-mxt_resume-bas.patch b/patches/mxt/0057-CHROMIUM-Input-atmel_mxt_ts-Set-T9-in-mxt_resume-bas.patch index 68f165a1..4423a1aa 100644 --- a/patches/mxt/0057-CHROMIUM-Input-atmel_mxt_ts-Set-T9-in-mxt_resume-bas.patch +++ b/patches/mxt/0057-CHROMIUM-Input-atmel_mxt_ts-Set-T9-in-mxt_resume-bas.patch @@ -1,4 +1,4 @@ -From e16984a267b8ba2d4cf72b309f73f78e3dc92ecc Mon Sep 17 00:00:00 2001 +From c4330c1bad967c81c90791f6bf711fb712779651 Mon Sep 17 00:00:00 2001 From: Benson Leung Date: Mon, 28 Jan 2013 15:26:25 -0800 Subject: [PATCH 57/57] CHROMIUM: Input: atmel_mxt_ts - Set T9 in mxt_resume @@ -29,7 +29,7 @@ Commit-Queue: Benson Leung Tested-by: Benson Leung (cherry picked from commit 4201ff9f7a9e114c453932662d49e34047dee59c) --- - drivers/input/touchscreen/atmel_mxt_ts.c | 22 +++++++++++++--------- + drivers/input/touchscreen/atmel_mxt_ts.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -73,5 +73,5 @@ index 0865842..ca94635 100644 if (data->T9_ctrl_valid) { ret = mxt_set_regs(data, MXT_TOUCH_MULTI_T9, 0, 0, -- -1.7.9.5 +1.9.0 diff --git a/patches/net/0001-am33xx-cpsw-default-to-ethernet-hwaddr-from-efuse-if.patch b/patches/net/0001-am33xx-cpsw-default-to-ethernet-hwaddr-from-efuse-if.patch index 58fdaa37..4bc87b5b 100644 --- a/patches/net/0001-am33xx-cpsw-default-to-ethernet-hwaddr-from-efuse-if.patch +++ b/patches/net/0001-am33xx-cpsw-default-to-ethernet-hwaddr-from-efuse-if.patch @@ -1,7 +1,7 @@ -From 8b7018ca951049c048ce9674f05df737cafbc8e3 Mon Sep 17 00:00:00 2001 +From 5844775343ffc34ceb799f1ac9e18cc5ec3fbc3e Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Wed, 16 Jan 2013 21:01:13 +0000 -Subject: [PATCH 1/6] am33xx: cpsw: default to ethernet hwaddr from efuse if +Subject: [PATCH 1/7] am33xx: cpsw: default to ethernet hwaddr from efuse if not defined in dt When booting with CONFIG_ARM_APPENDED_DTB (either because of using an old @@ -17,9 +17,9 @@ didn't contain valid ones. Signed-off-by: Peter Korsgaard --- - arch/arm/mach-omap2/Makefile | 3 ++ - arch/arm/mach-omap2/am33xx-cpsw.c | 94 +++++++++++++++++++++++++++++++++++++ - arch/arm/mach-omap2/control.h | 4 ++ + arch/arm/mach-omap2/Makefile | 3 ++ + arch/arm/mach-omap2/am33xx-cpsw.c | 94 +++++++++++++++++++++++++++++++++++++++ + arch/arm/mach-omap2/control.h | 4 ++ 3 files changed, 101 insertions(+) create mode 100644 arch/arm/mach-omap2/am33xx-cpsw.c @@ -151,5 +151,5 @@ index 35d17a6..12d8468 100644 /* AM33XX CONTROL_STATUS bitfields (partial) */ #define AM33XX_CONTROL_STATUS_SYSBOOT1_SHIFT 22 -- -1.7.9.5 +1.9.0 diff --git a/patches/net/0002-Attempted-SMC911x-BQL-patch.patch b/patches/net/0002-Attempted-SMC911x-BQL-patch.patch index ef0f5473..9e4da27e 100644 --- a/patches/net/0002-Attempted-SMC911x-BQL-patch.patch +++ b/patches/net/0002-Attempted-SMC911x-BQL-patch.patch @@ -1,13 +1,13 @@ -From cc67d9caeb15c2384859f424fce69e52f03111ff Mon Sep 17 00:00:00 2001 +From d4d87d24bb21b65e1c0ea99f65e194c59819e9cc Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Thu, 29 Nov 2012 11:17:05 +0100 -Subject: [PATCH 2/6] Attempted SMC911x BQL patch +Subject: [PATCH 2/7] Attempted SMC911x BQL patch First attempt at BQL on smsc911x. Signed-off-by: Paul E. McKenney --- - drivers/net/ethernet/smsc/smsc911x.c | 6 ++++++ + drivers/net/ethernet/smsc/smsc911x.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c @@ -56,5 +56,5 @@ index e112877..8907fde 100644 skb_tx_timestamp(skb); dev_kfree_skb(skb); -- -1.7.9.5 +1.9.0 diff --git a/patches/net/0003-cpsw-Fix-interrupt-storm-among-other-things.patch b/patches/net/0003-cpsw-Fix-interrupt-storm-among-other-things.patch index 9cc1209e..443ee973 100644 --- a/patches/net/0003-cpsw-Fix-interrupt-storm-among-other-things.patch +++ b/patches/net/0003-cpsw-Fix-interrupt-storm-among-other-things.patch @@ -1,7 +1,7 @@ -From 31f8be2da37edcb0cdc021a3e2f4d220bb5c9b3d Mon Sep 17 00:00:00 2001 +From dc145f17aa0efc329f2d67d3714ce3a4bc53f777 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Thu, 17 Jan 2013 20:18:32 +0200 -Subject: [PATCH 3/6] cpsw: Fix interrupt storm among other things +Subject: [PATCH 3/7] cpsw: Fix interrupt storm among other things Fix interrupt storm on bone A4 cause by non-by-the-book interrupt handling. While at it, added a non-NAPI mode (which is easier to debug), plus @@ -9,11 +9,11 @@ some general fixes. Signed-off-by: Pantelis Antoniou --- - Documentation/devicetree/bindings/net/cpsw.txt | 1 + - drivers/net/ethernet/ti/cpsw.c | 222 ++++++++++++++++++++---- - drivers/net/ethernet/ti/davinci_cpdma.c | 4 +- - drivers/net/ethernet/ti/davinci_cpdma.h | 2 +- - include/linux/platform_data/cpsw.h | 1 + + Documentation/devicetree/bindings/net/cpsw.txt | 1 + + drivers/net/ethernet/ti/cpsw.c | 222 +++++++++++++++++++++---- + drivers/net/ethernet/ti/davinci_cpdma.c | 4 +- + drivers/net/ethernet/ti/davinci_cpdma.h | 2 +- + include/linux/platform_data/cpsw.h | 1 + 5 files changed, 194 insertions(+), 36 deletions(-) diff --git a/Documentation/devicetree/bindings/net/cpsw.txt b/Documentation/devicetree/bindings/net/cpsw.txt @@ -419,5 +419,5 @@ index 24368a2..be5b27e 100644 #endif /* __CPSW_H__ */ -- -1.7.9.5 +1.9.0 diff --git a/patches/net/0004-beaglebone-TT3201-MCP2515-fixes.patch b/patches/net/0004-beaglebone-TT3201-MCP2515-fixes.patch index 89cc348f..171b6274 100644 --- a/patches/net/0004-beaglebone-TT3201-MCP2515-fixes.patch +++ b/patches/net/0004-beaglebone-TT3201-MCP2515-fixes.patch @@ -1,11 +1,11 @@ -From 2648760d9cecbac9846fc0e44b3045ba5e580883 Mon Sep 17 00:00:00 2001 +From 758c8df23ca8af3cbe916acd1492c2f1f8191e86 Mon Sep 17 00:00:00 2001 From: Alessandro Zummo Date: Thu, 23 May 2013 20:57:04 +0200 -Subject: [PATCH 4/6] beaglebone: TT3201 MCP2515 fixes +Subject: [PATCH 4/7] beaglebone: TT3201 MCP2515 fixes Signed-off-by: Alessandro Zummo --- - drivers/net/can/mcp251x.c | 47 +++++++++++++++++++++++++++++++++++---------- + drivers/net/can/mcp251x.c | 47 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c @@ -162,5 +162,5 @@ index 42b6d69..3555ef44 100644 } error_probe: -- -1.7.9.5 +1.9.0 diff --git a/patches/net/0005-add-proper-db.txt-for-CRDA.patch b/patches/net/0005-add-proper-db.txt-for-CRDA.patch index 483177cd..6eb79590 100644 --- a/patches/net/0005-add-proper-db.txt-for-CRDA.patch +++ b/patches/net/0005-add-proper-db.txt-for-CRDA.patch @@ -1,18 +1,18 @@ -From ab68e305658dfd57547a03ca46ddcc4b56da9ebc Mon Sep 17 00:00:00 2001 +From e34b0e7f91bf4d9d877c5b604a3f745f6e1f361d Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 28 Mar 2013 11:10:40 +0100 -Subject: [PATCH 5/6] add proper db.txt for CRDA +Subject: [PATCH 5/7] add proper db.txt for CRDA Signed-off-by: Koen Kooi --- - net/wireless/db.txt | 816 +++++++++++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 799 insertions(+), 17 deletions(-) + net/wireless/db.txt | 862 ++++++++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 845 insertions(+), 17 deletions(-) diff --git a/net/wireless/db.txt b/net/wireless/db.txt -index a2fc3a0..c5861b8 100644 +index a2fc3a0..fcab208 100644 --- a/net/wireless/db.txt +++ b/net/wireless/db.txt -@@ -1,17 +1,799 @@ +@@ -1,17 +1,845 @@ -# -# This file is a placeholder to prevent accidental build breakage if someone -# enables CONFIG_CFG80211_INTERNAL_REGDB. Almost no one actually needs to @@ -32,212 +32,217 @@ index a2fc3a0..c5861b8 100644 -# +# This is the world regulatory domain +country 00: -+ (2402 - 2472 @ 40), (3, 20) ++ (2402 - 2472 @ 40), (20) + # Channel 12 - 13. -+ (2457 - 2482 @ 40), (3, 20), PASSIVE-SCAN, NO-IBSS ++ (2457 - 2482 @ 40), (20), NO-IR + # Channel 14. Only JP enables this and for 802.11b only -+ (2474 - 2494 @ 20), (3, 20), PASSIVE-SCAN, NO-IBSS, NO-OFDM ++ (2474 - 2494 @ 20), (20), NO-IR + # Channel 36 - 48 -+ (5170 - 5250 @ 40), (3, 20), PASSIVE-SCAN, NO-IBSS ++ (5170 - 5250 @ 80), (20), NO-IR + # NB: 5260 MHz - 5700 MHz requies DFS + # Channel 149 - 165 -+ (5735 - 5835 @ 40), (3, 20), PASSIVE-SCAN, NO-IBSS ++ (5735 - 5835 @ 80), (20), NO-IR ++ # IEEE 802.11ad (60GHz), channels 1..3 ++ (57240 - 63720 @ 2160), (0) + + +country AD: + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR -+ -+country AE: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS -+ -+country AL: -+ (2402 - 2482 @ 20), (N/A, 20) -+ -+country AM: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 20), (N/A, 18) -+ (5250 - 5330 @ 20), (N/A, 18), DFS -+ -+country AN: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS -+ -+country AR: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (3, 17) -+ (5250 - 5330 @ 40), (3, 20), DFS -+ (5490 - 5710 @ 40), (3, 20), DFS -+ (5735 - 5835 @ 40), (3, 30) ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR ++ ++country AE: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) ++ ++country AL: DFS-ETSI ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20.00) ++ (5250 - 5330 @ 80), (20.00), DFS ++ (5490 - 5710 @ 80), (27.00), DFS ++ ++country AM: DFS-ETSI ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (18) ++ (5250 - 5330 @ 80), (18), DFS ++ ++country AN: DFS-ETSI ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS ++ ++country AR: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) + +country AT: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + +country AU: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (3, 23) -+ (5250 - 5330 @ 40), (3, 23), DFS -+ (5735 - 5835 @ 40), (3, 30) -+ -+country AW: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS -+ -+country AZ: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 18) -+ (5250 - 5330 @ 40), (N/A, 18), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5710 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) ++ ++country AW: DFS-ETSI ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS ++ ++country AZ: DFS-ETSI ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (18) ++ (5250 - 5330 @ 80), (18), DFS + +country BA: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + -+country BB: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (3, 23) -+ (5250 - 5330 @ 40), (3, 23), DFS -+ (5735 - 5835 @ 40), (3, 30) ++country BB: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (23) ++ (5250 - 5330 @ 80), (23), DFS ++ (5735 - 5835 @ 80), (30) + -+country BD: -+ (2402 - 2482 @ 40), (N/A, 20) ++country BD: DFS-JP ++ (2402 - 2482 @ 40), (20) ++ (5735 - 5835 @ 80), (30) + +country BE: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + +country BG: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 23) -+ (5250 - 5290 @ 40), (N/A, 23), DFS -+ (5490 - 5710 @ 40), (N/A, 30), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + -+country BH: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 20), (N/A, 20) -+ (5250 - 5330 @ 20), (N/A, 20), DFS -+ (5735 - 5835 @ 20), (N/A, 20) ++country BH: DFS-JP ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5735 - 5835 @ 80), (20) + +country BL: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 18) -+ (5250 - 5330 @ 40), (N/A, 18), DFS -+ -+country BN: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5735 - 5835 @ 40), (N/A, 30) -+ -+country BO: -+ (2402 - 2482 @ 40), (N/A, 30) -+ (5735 - 5835 @ 40), (N/A, 30) -+ -+country BR: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (3, 17) -+ (5250 - 5330 @ 40), (3, 20), DFS -+ (5490 - 5710 @ 40), (3, 20), DFS -+ (5735 - 5835 @ 40), (3, 30) -+ -+country BY: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS -+ -+country BZ: -+ (2402 - 2482 @ 40), (N/A, 30) -+ (5735 - 5835 @ 40), (N/A, 30) -+ -+country CA: -+ (2402 - 2472 @ 40), (3, 27) -+ (5170 - 5250 @ 40), (3, 17) -+ (5250 - 5330 @ 40), (3, 20), DFS -+ (5490 - 5710 @ 40), (3, 20), DFS -+ (5735 - 5835 @ 40), (3, 30) ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 40), (18) ++ (5250 - 5330 @ 40), (18), DFS ++ ++country BN: DFS-JP ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5735 - 5835 @ 80), (20) ++ ++country BO: DFS-JP ++ (2402 - 2482 @ 40), (30) ++ (5735 - 5835 @ 80), (30) ++ ++country BR: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) ++ ++country BY: DFS-ETSI ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS ++ ++country BZ: DFS-JP ++ (2402 - 2482 @ 40), (30) ++ (5735 - 5835 @ 80), (30) ++ ++country CA: DFS-FCC ++ (2402 - 2472 @ 40), (30) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) + +country CH: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS -+ # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR -+ -+country CL: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5735 - 5835 @ 40), (N/A, 20) -+ -+country CN: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5735 - 5835 @ 40), (N/A, 30) ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR ++ ++country CL: DFS-JP ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5735 - 5835 @ 80), (20) ++ ++country CN: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (23) ++ (5250 - 5330 @ 80), (23), DFS ++ (5735 - 5835 @ 80), (30) + # 60 gHz band channels 1,4: 28dBm, channels 2,3: 44dBm + # ref: http://www.miit.gov.cn/n11293472/n11505629/n11506593/n11960250/n11960606/n11960700/n12330791.files/n12330790.pdf -+ (57240 - 59400 @ 2160), (N/A, 28) -+ (59400 - 63720 @ 2160), (N/A, 44) -+ (63720 - 65880 @ 2160), (N/A, 28) -+ -+country CO: -+ (2402 - 2472 @ 40), (3, 27) -+ (5170 - 5250 @ 40), (3, 17) -+ (5250 - 5330 @ 40), (3, 23), DFS -+ (5735 - 5835 @ 40), (3, 30) -+ -+country CR: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 20), (3, 17) -+ (5250 - 5330 @ 20), (3, 23), DFS -+ (5735 - 5835 @ 20), (3, 30) -+ -+country CS: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (57240 - 59400 @ 2160), (28) ++ (59400 - 63720 @ 2160), (44) ++ (63720 - 65880 @ 2160), (28) ++ ++country CO: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) ++ ++country CR: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) + +country CY: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + +# Data from http://www.ctu.eu/164/download/VOR/VOR-12-08-2005-34.pdf +# and http://www.ctu.eu/164/download/VOR/VOR-12-05-2007-6-AN.pdf +# Power at 5250 - 5350 MHz and 5470 - 5725 MHz can be doubled if TPC is +# implemented. +country CZ: DFS-ETSI -+ (2400 - 2483.5 @ 40), (N/A, 100 mW) -+ (5150 - 5250 @ 40), (N/A, 200 mW), NO-OUTDOOR -+ (5250 - 5350 @ 40), (N/A, 100 mW), NO-OUTDOOR, DFS -+ (5470 - 5725 @ 40), (N/A, 500 mW), DFS ++ (2400 - 2483.5 @ 40), (100 mW) ++ (5150 - 5250 @ 80), (200 mW), NO-OUTDOOR ++ (5250 - 5350 @ 80), (100 mW), NO-OUTDOOR ++ (5470 - 5725 @ 80), (500 mW), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + +# Data from "Frequenznutzungsplan" (as published in April 2008), downloaded from +# http://www.bundesnetzagentur.de/cae/servlet/contentblob/38448/publicationFile/2659/Frequenznutzungsplan2008_Id17448pdf.pdf @@ -253,520 +258,555 @@ index a2fc3a0..c5861b8 100644 + +country DE: DFS-ETSI + # entries 279004 and 280006 -+ (2400 - 2483.5 @ 40), (N/A, 100 mW) -+ # entry 303005 -+ (5150 - 5250 @ 40), (N/A, 100 mW), NO-OUTDOOR -+ # entries 304002 and 305002 -+ (5250 - 5350 @ 40), (N/A, 100 mW), NO-OUTDOOR, DFS ++ (2400 - 2483.5 @ 40), (100 mW) ++ # entry 303005, 304002 and 305002 ++ (5150 - 5350 @ 80), (100 mW), NO-OUTDOOR + # entries 308002, 309001 and 310003 -+ (5470 - 5725 @ 40), (N/A, 500 mW), DFS ++ (5470 - 5725 @ 80), (500 mW), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + +country DK: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS -+ # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR -+ -+country DO: -+ (2402 - 2472 @ 40), (3, 27) -+ (5170 - 5250 @ 40), (3, 17) -+ (5250 - 5330 @ 40), (3, 23), DFS -+ (5735 - 5835 @ 40), (3, 30) -+ -+country DZ: -+ (2402 - 2482 @ 40), (N/A, 20) -+ -+country EC: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 20), (3, 17) -+ (5250 - 5330 @ 20), (3, 23), DFS -+ (5735 - 5835 @ 20), (3, 30) ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR ++ ++country DO: DFS-FCC ++ (2402 - 2472 @ 40), (30) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (23), DFS ++ (5735 - 5835 @ 80), (30) ++ ++country DZ: DFS-JP ++ (2402 - 2482 @ 40), (20) ++ (5170.000 - 5250.000 @ 80.000), (23.00) ++ (5250.000 - 5330.000 @ 80.000), (23.00), DFS ++ (5490.000 - 5670.000 @ 80.000), (23.00), DFS ++ ++country EC: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) + +country EE: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + -+country EG: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 20), (N/A, 20) -+ (5250 - 5330 @ 20), (N/A, 20), DFS ++country EG: DFS-ETSI ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS + +country ES: DFS-ETSI -+ (2400 - 2483.5 @ 40), (N/A, 100 mW) -+ (5150 - 5250 @ 40), (N/A, 100 mW), NO-OUTDOOR -+ (5250 - 5350 @ 40), (N/A, 100 mW), NO-OUTDOOR, DFS -+ (5470 - 5725 @ 40), (N/A, 500 mW), DFS ++ (2400 - 2483.5 @ 40), (100 mW) ++ (5150 - 5250 @ 80), (100 mW), NO-OUTDOOR ++ (5250 - 5350 @ 80), (100 mW), NO-OUTDOOR ++ (5470 - 5725 @ 80), (500 mW), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + +country FI: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + +country FR: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + -+country GE: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 18) -+ (5250 - 5330 @ 40), (N/A, 18), DFS ++country GE: DFS-ETSI ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (18) ++ (5250 - 5330 @ 80), (18), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + +country GB: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + -+country GD: -+ (2402 - 2472 @ 40), (3, 27) -+ (5170 - 5250 @ 40), (3, 17) -+ (5250 - 5330 @ 40), (3, 20), DFS -+ (5490 - 5710 @ 40), (3, 20), DFS -+ (5735 - 5835 @ 40), (3, 30) ++country GD: DFS-FCC ++ (2402 - 2472 @ 40), (30) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) + +country GR: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + +country GL: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 20), (N/A, 20) -+ (5250 - 5330 @ 20), (N/A, 20), DFS -+ (5490 - 5710 @ 20), (N/A, 27), DFS -+ -+country GT: -+ (2402 - 2472 @ 40), (3, 27) -+ (5170 - 5250 @ 40), (3, 17) -+ (5250 - 5330 @ 40), (3, 23), DFS -+ (5735 - 5835 @ 40), (3, 30) -+ -+country GU: -+ (2402 - 2472 @ 40), (3, 27) -+ (5170 - 5250 @ 20), (3, 17) -+ (5250 - 5330 @ 20), (3, 23), DFS -+ (5735 - 5835 @ 20), (3, 30) -+ -+country HN: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (3, 17) -+ (5250 - 5330 @ 40), (3, 20), DFS -+ (5490 - 5710 @ 40), (3, 20), DFS -+ (5735 - 5835 @ 40), (3, 30) ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS ++ ++country GT: DFS-FCC ++ (2402 - 2472 @ 40), (30) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (23), DFS ++ (5735 - 5835 @ 80), (30) ++ ++country GU: DFS-FCC ++ (2402 - 2472 @ 40), (30) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) ++ ++country HN: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) + +country HK: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (3, 17) -+ (5250 - 5330 @ 40), (3, 20), DFS -+ (5490 - 5710 @ 40), (3, 20), DFS -+ (5735 - 5835 @ 40), (3, 30) ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5710 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) + +country HR: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + -+country HT: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++country HT: DFS-ETSI ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + +country HU: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + -+country ID: -+ (2402 - 2482 @ 40), (N/A, 20) ++country ID: DFS-JP ++ # ref: http://www.postel.go.id/content/ID/regulasi/standardisasi/kepdir/bwa%205,8%20ghz.pdf ++ (2402 - 2482 @ 40), (20) ++ (5735 - 5815 @ 80), (23) + +country IE: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + -+country IL: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5150 - 5250 @ 40), (N/A, 200 mW), NO-OUTDOOR -+ (5250 - 5350 @ 40), (N/A, 200 mW), NO-OUTDOOR, DFS ++country IL: DFS-ETSI ++ (2402 - 2482 @ 40), (20) ++ (5150 - 5350 @ 80), (200 mW), NO-OUTDOOR + -+country IN: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5735 - 5835 @ 40), (N/A, 20) ++country IN: DFS-JP ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5735 - 5835 @ 80), (20) + +country IS: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + -+country IR: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5735 - 5835 @ 40), (N/A, 30) ++country IR: DFS-JP ++ (2402 - 2482 @ 40), (20) ++ (5735 - 5835 @ 80), (30) + +country IT: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS -+ # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR -+ -+country JM: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (3, 17) -+ (5250 - 5330 @ 40), (3, 20), DFS -+ (5490 - 5710 @ 40), (3, 20), DFS -+ (5735 - 5835 @ 40), (3, 30) -+ -+country JP: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (2474 - 2494 @ 20), (N/A, 20), NO-OFDM -+ (4910 - 4990 @ 40), (N/A, 23) -+ (5030 - 5090 @ 40), (N/A, 23) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 23), DFS -+ -+country JO: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 18) -+ -+country KE: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5735 - 5835 @ 40), (N/A, 30) -+ -+country KH: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS -+ -+country KP: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5330 @ 40), (3, 20) -+ (5160 - 5250 @ 40), (3, 20), DFS -+ (5490 - 5630 @ 40), (3, 30), DFS -+ (5735 - 5815 @ 40), (3, 30) -+ -+country KR: -+ (2402 - 2482 @ 20), (N/A, 20) -+ (5170 - 5250 @ 20), (3, 20) -+ (5250 - 5330 @ 20), (3, 20), DFS -+ (5490 - 5630 @ 20), (3, 30), DFS -+ (5735 - 5815 @ 20), (3, 30) -+ -+country KW: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR ++ ++country JM: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) ++ ++country JP: DFS-JP ++ (2402 - 2482 @ 40), (20) ++ (2474 - 2494 @ 20), (20), NO-OFDM ++ (4910 - 4990 @ 40), (23) ++ (5030 - 5090 @ 40), (23) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 160), (23), DFS ++ ++country JO: DFS-JP ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (23) ++ (5735 - 5835 @ 80), (23) ++ ++country KE: DFS-JP ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (23) ++ (5490 - 5570 @ 80), (30), DFS ++ (5735 - 5775 @ 40), (23) ++ ++country KH: DFS-ETSI ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS ++ ++country KP: DFS-JP ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5630 @ 80), (30), DFS ++ (5735 - 5815 @ 80), (30) ++ ++country KR: DFS-JP ++ (2402 - 2482 @ 20), (20) ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (30), DFS ++ (5735 - 5815 @ 80), (30) ++ ++country KW: DFS-ETSI ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS + +country KZ: -+ (2402 - 2482 @ 40), (N/A, 20) ++ (2402 - 2482 @ 40), (20) + -+country LB: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5735 - 5835 @ 40), (N/A, 30) ++country LB: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) + +country LI: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS -+ -+country LK: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 20), (3, 17) -+ (5250 - 5330 @ 20), (3, 20), DFS -+ (5490 - 5710 @ 20), (3, 20), DFS -+ (5735 - 5835 @ 20), (3, 30) ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS ++ ++country LK: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) + +country LT: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + +country LU: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + +country LV: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + +country MC: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 18) -+ (5250 - 5330 @ 40), (N/A, 18), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + -+country MA: -+ (2402 - 2482 @ 40), (N/A, 20) ++country MA: DFS-ETSI ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS + +country MO: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (3, 23) -+ (5250 - 5330 @ 40), (3, 23), DFS -+ (5735 - 5835 @ 40), (3, 30) ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 40), (23) ++ (5250 - 5330 @ 40), (23), DFS ++ (5735 - 5835 @ 40), (30) + +country MK: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + +country MT: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS -+ # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR -+ -+country MY: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 30), DFS -+ (5735 - 5835 @ 40), (N/A, 30) -+ -+country MX: -+ (2402 - 2472 @ 40), (3, 27) -+ (5170 - 5250 @ 40), (3, 17) -+ (5250 - 5330 @ 40), (3, 23), DFS -+ (5735 - 5835 @ 40), (3, 30) ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR ++ ++country MY: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (23), DFS ++ (5735 - 5835 @ 80), (30) ++ ++country MX: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) + +country NL: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20), NO-OUTDOOR -+ (5250 - 5330 @ 40), (N/A, 20), NO-OUTDOOR, DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5330 @ 80), (20), NO-OUTDOOR ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + +country NO: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS -+ # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR -+ -+country NP: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5735 - 5835 @ 40), (N/A, 30) -+ -+country NZ: -+ (2402 - 2482 @ 40), (N/A, 30) -+ (5170 - 5250 @ 20), (3, 23) -+ (5250 - 5330 @ 20), (3, 23), DFS -+ (5735 - 5835 @ 20), (3, 30) -+ -+country OM: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (3, 17) -+ (5250 - 5330 @ 40), (3, 20), DFS -+ (5490 - 5710 @ 40), (3, 20), DFS -+ (5735 - 5835 @ 40), (3, 30) -+ -+country PA: -+ (2402 - 2472 @ 40), (3, 27) -+ (5170 - 5250 @ 40), (3, 17) -+ (5250 - 5330 @ 40), (3, 23), DFS -+ (5735 - 5835 @ 40), (3, 30) -+ -+country PE: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5735 - 5835 @ 40), (N/A, 30) -+ -+country PG: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (3, 17) -+ (5250 - 5330 @ 40), (3, 23), DFS -+ (5735 - 5835 @ 40), (3, 30) -+ -+country PH: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5735 - 5835 @ 40), (N/A, 30) -+ -+country PK: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5735 - 5835 @ 40), (N/A, 30) ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR ++ ++country NP: DFS-JP ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5735 - 5835 @ 80), (20) ++ ++country NZ: DFS-FCC ++ (2402 - 2482 @ 40), (30) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) ++ ++country OM: DFS-ETSI ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS ++ ++country PA: DFS-FCC ++ (2402 - 2472 @ 40), (30) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (23), DFS ++ (5735 - 5835 @ 80), (30) ++ ++country PE: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) ++ ++country PG: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) ++ ++country PH: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) ++ ++country PK: DFS-JP ++ (2402 - 2482 @ 40), (20) ++ (5735 - 5835 @ 80), (30) + +country PL: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + +country PT: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + -+country PR: -+ (2402 - 2472 @ 40), (3, 27) -+ (5170 - 5250 @ 40), (3, 17) -+ (5250 - 5330 @ 40), (3, 23), DFS -+ (5735 - 5835 @ 40), (3, 30) ++country PR: DFS-FCC ++ (2402 - 2472 @ 40), (30) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) + -+country QA: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5735 - 5835 @ 40), (N/A, 30) ++country QA: DFS-JP ++ (2402 - 2482 @ 40), (20) ++ (5735 - 5835 @ 80), (30) + +country RO: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + + +# Source: +# http://www.ratel.rs/upload/documents/Plan_namene/Plan_namene-sl_glasnik.pdf -+country RS: -+ (2400 - 2483.5 @ 40), (N/A, 100 mW) -+ (5150 - 5350 @ 40), (N/A, 200 mW), NO-OUTDOOR -+ (5470 - 5725 @ 20), (3, 1000 mW), DFS -+ # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR -+ -+country RU: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5735 - 5835 @ 20), (N/A, 30) -+ -+country RW: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5735 - 5835 @ 40), (N/A, 30) -+ -+country SA: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 20), (3, 23) -+ (5250 - 5330 @ 20), (3, 23), DFS -+ (5735 - 5835 @ 20), (3, 30) ++country RS: DFS-ETSI ++ (2400 - 2483.5 @ 40), (100 mW) ++ (5150 - 5350 @ 40), (200 mW), NO-OUTDOOR ++ (5470 - 5725 @ 20), (1000 mW), DFS ++ # 60 gHz band channels 1-4, ref: Etsi En 302 567 ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR ++ ++country RU: DFS-ETSI ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5650 - 5730 @ 80), (30), DFS ++ (5735 - 5835 @ 80), (30) ++ ++country RW: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) ++ ++country SA: DFS-ETSI ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + +country SE: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + -+country SG: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5735 - 5835 @ 40), (N/A, 20) ++country SG: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) + +country SI: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + +country SK: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS -+ (5490 - 5710 @ 40), (N/A, 27), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + -+country SV: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 20), (3, 17) -+ (5250 - 5330 @ 20), (3, 23), DFS -+ (5735 - 5835 @ 20), (3, 30) ++country SV: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (23), DFS ++ (5735 - 5835 @ 80), (30) + +country SY: -+ (2402 - 2482 @ 40), (N/A, 20) -+ -+country TW: -+ (2402 - 2472 @ 40), (3, 27) -+ (5270 - 5330 @ 40), (3, 17), DFS -+ (5735 - 5815 @ 40), (3, 30) -+ -+country TH: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (3, 17) -+ (5250 - 5330 @ 40), (3, 20), DFS -+ (5490 - 5710 @ 40), (3, 20), DFS -+ (5735 - 5835 @ 40), (3, 30) -+ -+country TT: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (3, 17) -+ (5250 - 5330 @ 40), (3, 20), DFS -+ (5490 - 5710 @ 40), (3, 20), DFS -+ (5735 - 5835 @ 40), (3, 30) -+ -+country TN: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 20), (N/A, 20) -+ (5250 - 5330 @ 20), (N/A, 20), DFS ++ (2402 - 2482 @ 40), (20) ++ ++country TW: DFS-JP ++ (2402 - 2472 @ 40), (30) ++ (5270 - 5330 @ 40), (17), DFS ++ (5490 - 5590 @ 80), (30), DFS ++ (5650 - 5710 @ 40), (30), DFS ++ (5735 - 5835 @ 80), (30) ++ ++country TH: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) ++ ++country TT: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) ++ ++country TN: DFS-ETSI ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS + +country TR: DFS-ETSI -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 20), (N/A, 20) -+ (5250 - 5330 @ 20), (N/A, 20), DFS ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + +# Source: +# #914 / 06 Sep 2007: http://www.ucrf.gov.ua/uk/doc/nkrz/1196068874 @@ -775,60 +815,66 @@ index a2fc3a0..c5861b8 100644 +# Listed 5GHz range is a lowest common denominator for all related +# rules in the referenced laws. Such a range is used because of +# disputable definitions there. -+country UA: -+ (2400 - 2483.5 @ 40), (N/A, 20), NO-OUTDOOR -+ (5150 - 5350 @ 40), (N/A, 20), NO-OUTDOOR ++country UA: DFS-ETSI ++ (2400 - 2483.5 @ 40), (20), NO-OUTDOOR ++ (5150 - 5350 @ 40), (20), NO-OUTDOOR ++ (5490 - 5670 @ 80), (20), DFS ++ (5735 - 5835 @ 80), (20) + # 60 gHz band channels 1-4, ref: Etsi En 302 567 -+ (57240 - 65880 @ 2160), (N/A, 40), NO-OUTDOOR ++ (57240 - 65880 @ 2160), (40), NO-OUTDOOR + +country US: DFS-FCC -+ (2402 - 2472 @ 40), (3, 27) -+ (5170 - 5250 @ 40), (3, 17) -+ (5250 - 5330 @ 40), (3, 20), DFS -+ (5490 - 5600 @ 40), (3, 20), DFS -+ (5650 - 5710 @ 40), (3, 20), DFS -+ (5735 - 5835 @ 40), (3, 30) ++ (2402 - 2472 @ 40), (30) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (23), DFS ++ (5735 - 5835 @ 80), (30) + # 60g band + # reference: http://cfr.regstoday.com/47cfr15.aspx#47_CFR_15p255 + # channels 1,2,3, EIRP=40dBm(43dBm peak) -+ (57240 - 63720 @ 2160), (N/A, 40) -+ -+country UY: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (3, 17) -+ (5250 - 5330 @ 40), (3, 20), DFS -+ (5490 - 5710 @ 40), (3, 20), DFS -+ (5735 - 5835 @ 40), (3, 30) -+ -+country UZ: -+ (2402 - 2472 @ 40), (3, 27) -+ (5170 - 5250 @ 40), (3, 17) -+ (5250 - 5330 @ 40), (3, 20), DFS -+ (5490 - 5710 @ 40), (3, 20), DFS -+ (5735 - 5835 @ 40), (3, 30) -+ -+country VE: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5735 - 5815 @ 40), (N/A, 23) -+ -+country VN: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (N/A, 20) -+ (5250 - 5330 @ 40), (N/A, 20), DFS ++ (57240 - 63720 @ 2160), (40) ++ ++country UY: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) ++ ++country UZ: DFS-FCC ++ (2402 - 2472 @ 40), (30) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) ++ ++country VE: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (23), DFS ++ (5735 - 5835 @ 80), (30) ++ ++country VN: DFS-FCC ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (17) ++ (5250 - 5330 @ 80), (24), DFS ++ (5490 - 5730 @ 80), (24), DFS ++ (5735 - 5835 @ 80), (30) + +country YE: -+ (2402 - 2482 @ 40), (N/A, 20) ++ (2402 - 2482 @ 40), (20) + -+country ZA: -+ (2402 - 2482 @ 40), (N/A, 20) -+ (5170 - 5250 @ 40), (3, 17) -+ (5250 - 5330 @ 40), (3, 20), DFS -+ (5490 - 5710 @ 40), (3, 20), DFS -+ (5735 - 5835 @ 40), (3, 30) ++country ZA: DFS-ETSI ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + -+country ZW: -+ (2402 - 2482 @ 40), (N/A, 20) ++country ZW: DFS-ETSI ++ (2402 - 2482 @ 40), (20) ++ (5170 - 5250 @ 80), (20) ++ (5250 - 5330 @ 80), (20), DFS ++ (5490 - 5710 @ 80), (27), DFS + -- -1.7.9.5 +1.9.0 diff --git a/patches/net/0006-mcp251x-add-device-tree-support.patch b/patches/net/0006-mcp251x-add-device-tree-support.patch index 99b4cf3c..a8cea800 100644 --- a/patches/net/0006-mcp251x-add-device-tree-support.patch +++ b/patches/net/0006-mcp251x-add-device-tree-support.patch @@ -1,14 +1,14 @@ -From 52525721666a3128480ddd97a31233afd8de757b Mon Sep 17 00:00:00 2001 +From 5f0719744c3e5cb3c7d11d995b60eafd3d78c958 Mon Sep 17 00:00:00 2001 From: Alessandro Zummo Date: Sat, 25 May 2013 18:20:33 +0200 -Subject: [PATCH 6/6] mcp251x: add device tree support +Subject: [PATCH 6/7] mcp251x: add device tree support drivers/net/can/mcp251x.c | 133 +++++++++++++++++++++++++++------- include/linux/can/platform/mcp251x.h | 4 + 2 files changed, 110 insertions(+), 27 deletions(-) --- - drivers/net/can/mcp251x.c | 133 +++++++++++++++++++++++++++------- - include/linux/can/platform/mcp251x.h | 4 + + drivers/net/can/mcp251x.c | 133 ++++++++++++++++++++++++++++------- + include/linux/can/platform/mcp251x.h | 4 ++ 2 files changed, 110 insertions(+), 27 deletions(-) diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c @@ -349,5 +349,5 @@ index 089fe43..c017922 100644 int (*transceiver_enable)(int enable); int (*power_enable) (int enable); -- -1.7.9.5 +1.9.0 diff --git a/patches/net/0007-net-cpsw-fix-irq_disable-with-threaded-interrupts.patch b/patches/net/0007-net-cpsw-fix-irq_disable-with-threaded-interrupts.patch new file mode 100644 index 00000000..a694107e --- /dev/null +++ b/patches/net/0007-net-cpsw-fix-irq_disable-with-threaded-interrupts.patch @@ -0,0 +1,72 @@ +From 6d2d307c723f3213757bc9de34ab177afb50d3e2 Mon Sep 17 00:00:00 2001 +From: Robert Nelson +Date: Fri, 3 Jan 2014 10:39:30 -0600 +Subject: [PATCH 7/7] net/cpsw: fix irq_disable() with threaded interrupts + +https://groups.google.com/d/msg/beagleboard/mfQwHdfHyoo/SA9EnjpXoAsJ + +Signed-off-by: Eugene +Signed-off-by: Robert Nelson +--- + drivers/net/ethernet/ti/cpsw.c | 17 ++++++++++++++--- + 1 file changed, 14 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c +index 21ba53e..9c72a69 100644 +--- a/drivers/net/ethernet/ti/cpsw.c ++++ b/drivers/net/ethernet/ti/cpsw.c +@@ -342,6 +342,7 @@ struct cpsw_priv { + /* snapshot of IRQ numbers */ + u32 irqs_table[4]; + u32 num_irqs; ++ bool irq_enabled; + struct cpts cpts; + }; + +@@ -458,7 +459,10 @@ static irqreturn_t cpsw_interrupt(int irq, void *dev_id) + + if (likely(netif_running(priv->ndev))) { + cpsw_intr_disable(priv); +- cpsw_disable_irq(priv); ++ if (priv->irq_enabled == true) { ++ cpsw_disable_irq(priv); ++ priv->irq_enabled = false; ++ } + napi_schedule(&priv->napi); + } + +@@ -512,7 +516,10 @@ static int cpsw_poll(struct napi_struct *napi, int budget) + if ((num_total_rx + num_total_tx) < budget) { + napi_complete(napi); + cpsw_intr_enable(priv); +- cpsw_enable_irq(priv); ++ if (priv->irq_enabled == false) { ++ cpsw_enable_irq(priv); ++ priv->irq_enabled = true; ++ } + } + + return num_total_rx + num_total_rx; +@@ -812,7 +819,10 @@ static int cpsw_ndo_stop(struct net_device *ndev) + struct cpsw_priv *priv = netdev_priv(ndev); + + cpsw_info(priv, ifdown, "shutting down cpsw device\n"); +- cpsw_disable_irq(priv); ++ if (priv->irq_enabled == true) { ++ cpsw_disable_irq(priv); ++ priv->irq_enabled = false; ++ } + netif_stop_queue(priv->ndev); + if (!priv->data.disable_napi) + napi_disable(&priv->napi); +@@ -1306,6 +1316,7 @@ static int cpsw_probe(struct platform_device *pdev) + priv->dev = &ndev->dev; + priv->msg_enable = netif_msg_init(debug_level, CPSW_DEBUG); + priv->rx_packet_max = max(rx_packet_max, 128); ++ priv->irq_enabled = false; + + /* + * This may be required here for child devices. +-- +1.9.0 + diff --git a/patches/not-capebus/0001-add-dvi-pinmuxes-to-am33xx.dtsi.patch b/patches/not-capebus/0001-add-dvi-pinmuxes-to-am33xx.dtsi.patch index 6270fc37..f53fe981 100644 --- a/patches/not-capebus/0001-add-dvi-pinmuxes-to-am33xx.dtsi.patch +++ b/patches/not-capebus/0001-add-dvi-pinmuxes-to-am33xx.dtsi.patch @@ -1,18 +1,18 @@ -From f99f8c818fd70385942695f12b413ac13a3e691e Mon Sep 17 00:00:00 2001 +From a26b909999265c9f324e4d160d5424928e804965 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Fri, 21 Dec 2012 09:08:49 +0100 Subject: [PATCH 001/184] add dvi pinmuxes to am33xx.dtsi Signed-off-by: Koen Kooi --- - arch/arm/boot/dts/am33xx.dtsi | 54 +++++++++++++++++++++++++++++++++++++++++ + arch/arm/boot/dts/am33xx.dtsi | 54 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi -index 6dcd42a..1b91637 100644 +index e0394d3..f1f1ab8 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi -@@ -67,6 +67,60 @@ +@@ -72,6 +72,60 @@ #size-cells = <0>; pinctrl-single,register-width = <32>; pinctrl-single,function-mask = <0x7f>; @@ -74,5 +74,5 @@ index 6dcd42a..1b91637 100644 /* -- -1.7.9.5 +1.9.0 diff --git a/patches/not-capebus/0002-add-defconfig-file-to-use-as-.config.patch b/patches/not-capebus/0002-add-defconfig-file-to-use-as-.config.patch index 14e4af63..7614adb4 100644 --- a/patches/not-capebus/0002-add-defconfig-file-to-use-as-.config.patch +++ b/patches/not-capebus/0002-add-defconfig-file-to-use-as-.config.patch @@ -1,4 +1,4 @@ -From 0c07ea682e7fcce4bbe7458f005d8fde8a88abe4 Mon Sep 17 00:00:00 2001 +From 45d39e69595ae77fae47d3620f2dc3c4301ddffa Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Fri, 28 Dec 2012 14:41:10 +0100 Subject: [PATCH 002/184] add 'defconfig' file to use as .config @@ -4013,5 +4013,5 @@ index 0000000..5eb94b7 +CONFIG_MPILIB=m +CONFIG_OID_REGISTRY=m -- -1.7.9.5 +1.9.0 diff --git a/patches/not-capebus/0003-am33xx-musb-Add-OF-definitions.patch b/patches/not-capebus/0003-am33xx-musb-Add-OF-definitions.patch index fe1d4dc0..9ff895e4 100644 --- a/patches/not-capebus/0003-am33xx-musb-Add-OF-definitions.patch +++ b/patches/not-capebus/0003-am33xx-musb-Add-OF-definitions.patch @@ -1,4 +1,4 @@ -From 1c977e1e6444066e46bd87a5f74e3144d6b62b8f Mon Sep 17 00:00:00 2001 +From a3aab22bfb183608e539d4aab0c3b08aa8f0df79 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Tue, 30 Oct 2012 20:45:35 +0200 Subject: [PATCH 003/184] am33xx-musb: Add OF definitions @@ -7,14 +7,14 @@ For some reason these got dropped; reintroduce. Signed-off-by: Pantelis Antoniou --- - arch/arm/boot/dts/am33xx.dtsi | 60 +++++++++++++++++++++++++++++++++++++++++ + arch/arm/boot/dts/am33xx.dtsi | 60 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi -index 1b91637..5c6e272 100644 +index f1f1ab8..cb50403 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi -@@ -324,6 +324,66 @@ +@@ -329,6 +329,66 @@ status = "disabled"; }; @@ -82,5 +82,5 @@ index 1b91637..5c6e272 100644 compatible = "ti,omap3-wdt"; ti,hwmods = "wd_timer2"; -- -1.7.9.5 +1.9.0 diff --git a/patches/not-capebus/0004-Mark-the-device-as-PRIVATE.patch b/patches/not-capebus/0004-Mark-the-device-as-PRIVATE.patch index 64a99bf1..ac5e275e 100644 --- a/patches/not-capebus/0004-Mark-the-device-as-PRIVATE.patch +++ b/patches/not-capebus/0004-Mark-the-device-as-PRIVATE.patch @@ -1,4 +1,4 @@ -From 81d3d3c043dd4d4f765da56a0e707387ff957eaf Mon Sep 17 00:00:00 2001 +From ce4d44267ea50e218c88ccbd2257dc532e7c3416 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Fri, 30 Nov 2012 12:12:55 +0200 Subject: [PATCH 004/184] Mark the device as PRIVATE @@ -14,7 +14,7 @@ dma devices. Very crazy bug. --- - drivers/dma/edma.c | 8 ++++++-- + drivers/dma/edma.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c @@ -52,5 +52,5 @@ index e57cce3..2e27ec5 100644 edma_dma_init(ecc, &ecc->dma_slave, &pdev->dev); -- -1.7.9.5 +1.9.0 diff --git a/patches/not-capebus/0005-omap_hsmmc-Bug-fixes-pinctl-gpio-reset.patch b/patches/not-capebus/0005-omap_hsmmc-Bug-fixes-pinctl-gpio-reset.patch index 94df4d21..80fb0640 100644 --- a/patches/not-capebus/0005-omap_hsmmc-Bug-fixes-pinctl-gpio-reset.patch +++ b/patches/not-capebus/0005-omap_hsmmc-Bug-fixes-pinctl-gpio-reset.patch @@ -1,4 +1,4 @@ -From 36cebd52f395bf5b398643991c75e370d2367110 Mon Sep 17 00:00:00 2001 +From 1385e1037e7c11f9bbadaaf964eeed8cf1e80c6d Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Fri, 30 Nov 2012 12:18:16 +0200 Subject: [PATCH 005/184] omap_hsmmc: Bug fixes, pinctl & gpio-reset @@ -10,8 +10,8 @@ Signed-off-by: Pantelis Antoniou Conflicts: drivers/mmc/host/omap_hsmmc.c --- - drivers/mmc/host/omap_hsmmc.c | 42 +++++++++++++++++++++++++++++++- - include/linux/platform_data/mmc-omap.h | 3 +++ + drivers/mmc/host/omap_hsmmc.c | 42 +++++++++++++++++++++++++++++++++- + include/linux/platform_data/mmc-omap.h | 3 +++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c @@ -138,5 +138,5 @@ index 2bf1b30..d548994 100644 int (*set_bus_mode)(struct device *dev, int slot, int bus_mode); int (*set_power)(struct device *dev, int slot, -- -1.7.9.5 +1.9.0 diff --git a/patches/not-capebus/0006-tps65217-bl-Locate-backlight-node-correctly.patch b/patches/not-capebus/0006-tps65217-bl-Locate-backlight-node-correctly.patch index ae6a69e6..974a1db3 100644 --- a/patches/not-capebus/0006-tps65217-bl-Locate-backlight-node-correctly.patch +++ b/patches/not-capebus/0006-tps65217-bl-Locate-backlight-node-correctly.patch @@ -1,4 +1,4 @@ -From 29416f9f501634e20208af10ac0682994c2d456f Mon Sep 17 00:00:00 2001 +From fedfb8b7a8ab2d2f035b2f4cfe726ecb5e764fe8 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Fri, 28 Dec 2012 16:54:51 +0200 Subject: [PATCH 006/184] tps65217-bl: Locate backlight node correctly. @@ -10,7 +10,7 @@ Use the correct function to locate the child node. Signed-off-by: Pantelis Antoniou --- - drivers/video/backlight/tps65217_bl.c | 10 +++++++--- + drivers/video/backlight/tps65217_bl.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/video/backlight/tps65217_bl.c b/drivers/video/backlight/tps65217_bl.c @@ -47,5 +47,5 @@ index 69c1dfe..31a9203 100644 if (!pdev->dev.platform_data) { dev_err(&pdev->dev, "no platform data provided\n"); -- -1.7.9.5 +1.9.0 diff --git a/patches/not-capebus/0007-arm-Export-cache-flush-management-symbols-when-MULTI.patch b/patches/not-capebus/0007-arm-Export-cache-flush-management-symbols-when-MULTI.patch index 82857f95..fa17297d 100644 --- a/patches/not-capebus/0007-arm-Export-cache-flush-management-symbols-when-MULTI.patch +++ b/patches/not-capebus/0007-arm-Export-cache-flush-management-symbols-when-MULTI.patch @@ -1,4 +1,4 @@ -From 9cf1a28537ced9ee497a44144345e38a1fe083a9 Mon Sep 17 00:00:00 2001 +From 667ea4bbaa276dee6b289a4c583872a320f9e716 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Sun, 16 Dec 2012 19:46:34 +0200 Subject: [PATCH 007/184] arm: Export cache flush management symbols when @@ -9,7 +9,7 @@ dma access functions end up not being exported. Fix it. Signed-off-by: Pantelis Antoniou --- - arch/arm/kernel/setup.c | 9 +++++++++ + arch/arm/kernel/setup.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c @@ -30,5 +30,5 @@ index 3f6cbb2..4540dad 100644 + +#endif -- -1.7.9.5 +1.9.0 diff --git a/patches/not-capebus/0008-am335x-bone-dtsi-Clean-up.patch b/patches/not-capebus/0008-am335x-bone-dtsi-Clean-up.patch index a280b8d5..ee97992c 100644 --- a/patches/not-capebus/0008-am335x-bone-dtsi-Clean-up.patch +++ b/patches/not-capebus/0008-am335x-bone-dtsi-Clean-up.patch @@ -1,4 +1,4 @@ -From 8d0f64b2748e5a03e0c7d77ddf73f81f95c451d8 Mon Sep 17 00:00:00 2001 +From f4db1382a2a4cdee9528ca57b04d2f4e934ca957 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Fri, 14 Dec 2012 14:34:08 +0200 Subject: [PATCH 008/184] am335x-bone-dtsi: Clean up @@ -11,11 +11,11 @@ Conflicts: arch/arm/boot/dts/am335x-bone-common.dtsi arch/arm/boot/dts/am335x-bone.dts --- - arch/arm/boot/dts/am335x-bone-common.dtsi | 80 +---------------------------- + arch/arm/boot/dts/am335x-bone-common.dtsi | 80 +------------------------------ 1 file changed, 1 insertion(+), 79 deletions(-) diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi -index 8295b30..b084324 100644 +index e1a126a..b084324 100644 --- a/arch/arm/boot/dts/am335x-bone-common.dtsi +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi @@ -73,7 +73,7 @@ @@ -72,7 +72,7 @@ index 8295b30..b084324 100644 - compatible = "at,24c256"; - reg = <0x50>; - }; -- +- -}; - -&i2c2 { @@ -127,5 +127,5 @@ index 8295b30..b084324 100644 ti,edma-xbar-event-map = <32 12>; }; -- -1.7.9.5 +1.9.0 diff --git a/patches/not-capebus/0009-am335x-bone-dtsi-Introduce-new-I2C-entries.patch b/patches/not-capebus/0009-am335x-bone-dtsi-Introduce-new-I2C-entries.patch index c3dbab17..35784f88 100644 --- a/patches/not-capebus/0009-am335x-bone-dtsi-Introduce-new-I2C-entries.patch +++ b/patches/not-capebus/0009-am335x-bone-dtsi-Introduce-new-I2C-entries.patch @@ -1,4 +1,4 @@ -From 7e0b9165e6dd3fb919a274989aa689d77591c169 Mon Sep 17 00:00:00 2001 +From 027d479259b9bbb0ca73e0687756f5d02e251b63 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Fri, 14 Dec 2012 14:36:38 +0200 Subject: [PATCH 009/184] am335x-bone-dtsi: Introduce new I2C entries @@ -7,7 +7,7 @@ Introduce I2C entries that are required for capes. Signed-off-by: Pantelis Antoniou --- - arch/arm/boot/dts/am335x-bone-common.dtsi | 33 +++++++++++++++++++++++++++++ + arch/arm/boot/dts/am335x-bone-common.dtsi | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi @@ -55,5 +55,5 @@ index b084324..312ded8 100644 /include/ "tps65217.dtsi" -- -1.7.9.5 +1.9.0 diff --git a/patches/not-capebus/0010-am335x-dt-Add-I2C0-pinctrl-entries.patch b/patches/not-capebus/0010-am335x-dt-Add-I2C0-pinctrl-entries.patch index 86890c2f..592fa3ac 100644 --- a/patches/not-capebus/0010-am335x-dt-Add-I2C0-pinctrl-entries.patch +++ b/patches/not-capebus/0010-am335x-dt-Add-I2C0-pinctrl-entries.patch @@ -1,4 +1,4 @@ -From fd8e51671113bc8697c6b10e2c21bd3e9bf5ff12 Mon Sep 17 00:00:00 2001 +From c899978dcd9c1e15405de742e7fedce793ff1b7c Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Fri, 28 Dec 2012 11:26:59 +0200 Subject: [PATCH 010/184] am335x-dt: Add I2C0 pinctrl entries. @@ -8,7 +8,7 @@ bootloader. Signed-off-by: Pantelis Antoniou --- - arch/arm/boot/dts/am335x-bone-common.dtsi | 8 ++++++++ + arch/arm/boot/dts/am335x-bone-common.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi @@ -38,5 +38,5 @@ index 312ded8..e43417b 100644 tps: tps@24 { reg = <0x24>; -- -1.7.9.5 +1.9.0 diff --git a/patches/not-capebus/0011-Cleanup-am33xx.dtsi.patch b/patches/not-capebus/0011-Cleanup-am33xx.dtsi.patch index e8541081..e6f3114c 100644 --- a/patches/not-capebus/0011-Cleanup-am33xx.dtsi.patch +++ b/patches/not-capebus/0011-Cleanup-am33xx.dtsi.patch @@ -1,17 +1,17 @@ -From c175454c7e2783ed36e329662f8dafc51935a62c Mon Sep 17 00:00:00 2001 +From 5208d5905a34ebea43ac51ec8d1c91fb01957694 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Fri, 28 Dec 2012 20:15:52 +0200 Subject: [PATCH 011/184] Cleanup am33xx.dtsi --- - arch/arm/boot/dts/am33xx.dtsi | 54 ----------------------------------------- + arch/arm/boot/dts/am33xx.dtsi | 54 ------------------------------------------- 1 file changed, 54 deletions(-) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi -index 5c6e272..5218fbe 100644 +index cb50403..3cab673 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi -@@ -67,60 +67,6 @@ +@@ -72,60 +72,6 @@ #size-cells = <0>; pinctrl-single,register-width = <32>; pinctrl-single,function-mask = <0x7f>; @@ -73,5 +73,5 @@ index 5c6e272..5218fbe 100644 /* -- -1.7.9.5 +1.9.0 diff --git a/patches/not-capebus/0012-Fix-platform-device-resource-linking.patch b/patches/not-capebus/0012-Fix-platform-device-resource-linking.patch index 766179a7..f5446fe8 100644 --- a/patches/not-capebus/0012-Fix-platform-device-resource-linking.patch +++ b/patches/not-capebus/0012-Fix-platform-device-resource-linking.patch @@ -1,4 +1,4 @@ -From a78b18265bccdd07cba1e4cd50913e4f1467b5e6 Mon Sep 17 00:00:00 2001 +From b285a01ed9b7d8e6b1885c69127fb9297c8cac8a Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Fri, 28 Dec 2012 11:34:15 +0200 Subject: [PATCH 012/184] Fix platform device resource linking @@ -21,8 +21,8 @@ resources. Signed-off-by: Pantelis Antoniou --- - drivers/base/platform.c | 124 ++++++++++++++++++++++++++------------- - include/linux/platform_device.h | 4 ++ + drivers/base/platform.c | 124 +++++++++++++++++++++++++++------------- + include/linux/platform_device.h | 4 ++ 2 files changed, 87 insertions(+), 41 deletions(-) diff --git a/drivers/base/platform.c b/drivers/base/platform.c @@ -214,5 +214,5 @@ index a9ded9a..e48c2d5 100644 + #endif /* _PLATFORM_DEVICE_H_ */ -- -1.7.9.5 +1.9.0 diff --git a/patches/not-capebus/0013-Link-platform-device-resources-properly.patch b/patches/not-capebus/0013-Link-platform-device-resources-properly.patch index b837f988..7b72e192 100644 --- a/patches/not-capebus/0013-Link-platform-device-resources-properly.patch +++ b/patches/not-capebus/0013-Link-platform-device-resources-properly.patch @@ -1,4 +1,4 @@ -From 91e26f084bbb9dd2bc4eb040d7592c53db4f940c Mon Sep 17 00:00:00 2001 +From fd2e0332986591f019be31a3a0e71b348e8bff35 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Fri, 28 Dec 2012 11:39:29 +0200 Subject: [PATCH 013/184] Link platform device resources properly. @@ -9,7 +9,7 @@ any crashes when trying to remove the device. Signed-off-by: Pantelis Antoniou --- - drivers/of/device.c | 3 +++ + drivers/of/device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/of/device.c b/drivers/of/device.c @@ -27,5 +27,5 @@ index 4c74e4f..d75fcaf 100644 } -- -1.7.9.5 +1.9.0 diff --git a/patches/not-capebus/0014-Properly-handle-resources-for-omap_devices.patch b/patches/not-capebus/0014-Properly-handle-resources-for-omap_devices.patch index 392fe9de..195c6a8f 100644 --- a/patches/not-capebus/0014-Properly-handle-resources-for-omap_devices.patch +++ b/patches/not-capebus/0014-Properly-handle-resources-for-omap_devices.patch @@ -1,4 +1,4 @@ -From cc3db731f6c825dfdf89e44188d58f1a2288b93e Mon Sep 17 00:00:00 2001 +From 953352a39795857d59d820e3db48c8d399181fde Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Fri, 28 Dec 2012 11:41:11 +0200 Subject: [PATCH 014/184] Properly handle resources for omap_devices @@ -13,7 +13,7 @@ and make sure that no resources that have no parent (which can happen for DMA Signed-off-by: Pantelis Antoniou --- - arch/arm/mach-omap2/omap_device.c | 232 +++++++++++++++++++++++-------------- + arch/arm/mach-omap2/omap_device.c | 232 ++++++++++++++++++++++++-------------- 1 file changed, 148 insertions(+), 84 deletions(-) diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c @@ -290,5 +290,5 @@ index e065daa..9f8dba1 100644 pm_lats = omap_default_latency; pm_lats_cnt = ARRAY_SIZE(omap_default_latency); -- -1.7.9.5 +1.9.0 diff --git a/patches/not-capebus/0015-omap-Avoid-crashes-in-the-case-of-hwmod-misconfigura.patch b/patches/not-capebus/0015-omap-Avoid-crashes-in-the-case-of-hwmod-misconfigura.patch index be234efe..5d45d0a3 100644 --- a/patches/not-capebus/0015-omap-Avoid-crashes-in-the-case-of-hwmod-misconfigura.patch +++ b/patches/not-capebus/0015-omap-Avoid-crashes-in-the-case-of-hwmod-misconfigura.patch @@ -1,4 +1,4 @@ -From d4b9fa680cbdadc4b544b6a1d6264104bd5fff2b Mon Sep 17 00:00:00 2001 +From 0ecae5b71384dc9ccdc8760809e84ab1d1c2a7af Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Tue, 8 Jan 2013 15:19:52 +0200 Subject: [PATCH 015/184] omap: Avoid crashes in the case of hwmod @@ -50,7 +50,7 @@ Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b! Signed-off-by: Pantelis Antoniou --- - arch/arm/mach-omap2/omap_hwmod.c | 8 ++++++-- + arch/arm/mach-omap2/omap_hwmod.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c @@ -80,5 +80,5 @@ index 4653efb..2b58e21 100644 oc->_clk = c; /* -- -1.7.9.5 +1.9.0 diff --git a/patches/not-capebus/0016-i2c-EEPROM-In-kernel-memory-accessor-interface.patch b/patches/not-capebus/0016-i2c-EEPROM-In-kernel-memory-accessor-interface.patch index 6e3ce499..83d53164 100644 --- a/patches/not-capebus/0016-i2c-EEPROM-In-kernel-memory-accessor-interface.patch +++ b/patches/not-capebus/0016-i2c-EEPROM-In-kernel-memory-accessor-interface.patch @@ -1,4 +1,4 @@ -From fb7297e72b8fc8a44a1950ac0801d3173aeb0d54 Mon Sep 17 00:00:00 2001 +From dfd68165a6be95ea7b71cb67b32fc56e1a7de3f6 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Thu, 13 Dec 2012 11:23:21 +0200 Subject: [PATCH 016/184] i2c-EEPROM: In kernel memory accessor interface @@ -8,8 +8,8 @@ interface. Extend at24 to use it via the command interface. Signed-off-by: Pantelis Antoniou --- - drivers/misc/eeprom/at24.c | 23 +++++++++++++++++ - include/linux/i2c/eeprom.h | 59 ++++++++++++++++++++++++++++++++++++++++++++ + drivers/misc/eeprom/at24.c | 23 ++++++++++++++++++ + include/linux/i2c/eeprom.h | 59 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 include/linux/i2c/eeprom.h @@ -127,5 +127,5 @@ index 0000000..1393980 + +#endif -- -1.7.9.5 +1.9.0 diff --git a/patches/not-capebus/0017-Fix-util_is_printable_string.patch b/patches/not-capebus/0017-Fix-util_is_printable_string.patch index 64077c30..c0bff5b9 100644 --- a/patches/not-capebus/0017-Fix-util_is_printable_string.patch +++ b/patches/not-capebus/0017-Fix-util_is_printable_string.patch @@ -1,4 +1,4 @@ -From 1516d4b333dbe33db931b0ddc1f241fff878bcd3 Mon Sep 17 00:00:00 2001 +From 6a814ea8654fe7b4680ba986202c2bc991e2b403 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Thu, 6 Dec 2012 13:22:49 +0200 Subject: [PATCH 017/184] Fix util_is_printable_string @@ -7,7 +7,7 @@ The method used did not account for multi-part strings. Signed-off-by: Pantelis Antoniou --- - scripts/dtc/util.c | 20 +++++++++++++------- + scripts/dtc/util.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/scripts/dtc/util.c b/scripts/dtc/util.c @@ -50,5 +50,5 @@ index 2422c34..45f186b 100644 return 1; } -- -1.7.9.5 +1.9.0 diff --git a/patches/not-capebus/0018-fdtdump-properly-handle-multi-string-properties.patch b/patches/not-capebus/0018-fdtdump-properly-handle-multi-string-properties.patch index d118275b..30b48270 100644 --- a/patches/not-capebus/0018-fdtdump-properly-handle-multi-string-properties.patch +++ b/patches/not-capebus/0018-fdtdump-properly-handle-multi-string-properties.patch @@ -1,4 +1,4 @@ -From 9f7790921a48476fa7b0727cf0386ca91de6c088 Mon Sep 17 00:00:00 2001 +From 360296e714778fff0f3c85e247e6e07009f93437 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Thu, 6 Dec 2012 13:44:10 +0200 Subject: [PATCH 018/184] fdtdump: properly handle multi-string properties @@ -8,7 +8,7 @@ We didn't handle that case properly. Signed-off-by: Pantelis Antoniou --- - scripts/dtc/fdtdump.c | 12 +++++++++++- + scripts/dtc/fdtdump.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/dtc/fdtdump.c b/scripts/dtc/fdtdump.c @@ -41,5 +41,5 @@ index 207a46d..d4fa6d7 100644 printf(" = <"); for (i = 0; i < len; i += 4) -- -1.7.9.5 +1.9.0 diff --git a/patches/not-capebus/0019-dtc-Dynamic-symbols-fixup-support.patch b/patches/not-capebus/0019-dtc-Dynamic-symbols-fixup-support.patch index 1621feaf..e2e79051 100644 --- a/patches/not-capebus/0019-dtc-Dynamic-symbols-fixup-support.patch +++ b/patches/not-capebus/0019-dtc-Dynamic-symbols-fixup-support.patch @@ -1,4 +1,4 @@ -From 2dac5e69f83ff7b446509968b468ff234146e1e8 Mon Sep 17 00:00:00 2001 +From 65862082a20ab56a666b030f8f65399c0f66e2c2 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Thu, 6 Dec 2012 13:48:11 +0200 Subject: [PATCH 019/184] dtc: Dynamic symbols & fixup support @@ -17,17 +17,17 @@ This is sufficient to implement a dynamic DT object loader. Signed-off-by: Pantelis Antoniou --- - Documentation/devicetree/00-INDEX | 1 + - Documentation/devicetree/dt-object-internal.txt | 295 ++++++++++ - scripts/dtc/checks.c | 120 +++- - scripts/dtc/dtc-lexer.l | 5 + - scripts/dtc/dtc-lexer.lex.c_shipped | 435 ++++++++------- - scripts/dtc/dtc-parser.tab.c_shipped | 679 ++++++++++++----------- - scripts/dtc/dtc-parser.tab.h_shipped | 48 +- - scripts/dtc/dtc-parser.y | 23 +- - scripts/dtc/dtc.c | 9 +- - scripts/dtc/dtc.h | 38 ++ - scripts/dtc/flattree.c | 139 +++++ + Documentation/devicetree/00-INDEX | 1 + + Documentation/devicetree/dt-object-internal.txt | 295 ++++++++++ + scripts/dtc/checks.c | 120 ++++- + scripts/dtc/dtc-lexer.l | 5 + + scripts/dtc/dtc-lexer.lex.c_shipped | 435 +++++++-------- + scripts/dtc/dtc-parser.tab.c_shipped | 679 ++++++++++++------------ + scripts/dtc/dtc-parser.tab.h_shipped | 48 +- + scripts/dtc/dtc-parser.y | 23 +- + scripts/dtc/dtc.c | 9 +- + scripts/dtc/dtc.h | 38 ++ + scripts/dtc/flattree.c | 139 +++++ 11 files changed, 1224 insertions(+), 568 deletions(-) create mode 100644 Documentation/devicetree/dt-object-internal.txt @@ -42,7 +42,7 @@ index b78f691..fb932e2 100644 +dt-object-internals.txt diff --git a/Documentation/devicetree/dt-object-internal.txt b/Documentation/devicetree/dt-object-internal.txt new file mode 100644 -index 0000000..f86d054 +index 0000000..eb5d4c0 --- /dev/null +++ b/Documentation/devicetree/dt-object-internal.txt @@ -0,0 +1,295 @@ @@ -257,10 +257,10 @@ index 0000000..f86d054 +No __symbols__ has been generated (no label in bar.dts). +Note that the target's ocp label is undefined, so the phandle handle +value is filled with the illegal value '0xdeadbeef', while a __fixups__ -+node has been generated, which marks the location in the tree where ++node has been generated, which marks the location in the tree where +the label lookup should store the runtime phandle value of the ocp node. + -+The format of the __fixups__ node entry is ++The format of the __fixups__ node entry is + +