From 4857416e72e3ffd715f9f9aa23500358d8108123 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Thu, 5 Sep 2013 02:19:25 +0200 Subject: [PATCH] projects/RPi: update to kernel 3.11 Signed-off-by: Stephan Raue --- projects/RPi/linux/linux.arm.conf | 173 +- projects/RPi/options | 2 +- ...tch => linux-01-RPi_support-d747469.patch} | 9558 +++++++---------- 3 files changed, 3932 insertions(+), 5801 deletions(-) rename projects/RPi/patches/linux/{linux-01-RPi_support-2ed7ca0.patch => linux-01-RPi_support-d747469.patch} (94%) diff --git a/projects/RPi/linux/linux.arm.conf b/projects/RPi/linux/linux.arm.conf index cc64cdd3a0..7ae8d8dfe3 100644 --- a/projects/RPi/linux/linux.arm.conf +++ b/projects/RPi/linux/linux.arm.conf @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/arm 3.10.10 Kernel Configuration +# Linux/arm 3.11.0 Kernel Configuration # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -30,16 +30,19 @@ CONFIG_BUILDTIME_EXTABLE_SORT=y CONFIG_BROKEN_ON_SMP=y CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_CROSS_COMPILE="" +# CONFIG_COMPILE_TEST is not set CONFIG_LOCALVERSION="" # CONFIG_LOCALVERSION_AUTO is not set CONFIG_HAVE_KERNEL_GZIP=y CONFIG_HAVE_KERNEL_LZMA=y CONFIG_HAVE_KERNEL_XZ=y CONFIG_HAVE_KERNEL_LZO=y +CONFIG_HAVE_KERNEL_LZ4=y CONFIG_KERNEL_GZIP=y # CONFIG_KERNEL_LZMA is not set # CONFIG_KERNEL_XZ is not set # CONFIG_KERNEL_LZO is not set +# CONFIG_KERNEL_LZ4 is not set CONFIG_DEFAULT_HOSTNAME="openelec" CONFIG_SWAP=y CONFIG_SYSVIPC=y @@ -82,17 +85,24 @@ CONFIG_TICK_CPU_ACCOUNTING=y # # RCU Subsystem # -# CONFIG_TREE_PREEMPT_RCU is not set -CONFIG_TINY_PREEMPT_RCU=y +CONFIG_TREE_PREEMPT_RCU=y CONFIG_PREEMPT_RCU=y -# CONFIG_RCU_STALL_COMMON is not set +CONFIG_RCU_STALL_COMMON=y +CONFIG_RCU_FANOUT=32 +CONFIG_RCU_FANOUT_LEAF=16 +# CONFIG_RCU_FANOUT_EXACT is not set # CONFIG_TREE_RCU_TRACE is not set CONFIG_RCU_BOOST=y CONFIG_RCU_BOOST_PRIO=1 CONFIG_RCU_BOOST_DELAY=500 +CONFIG_RCU_NOCB_CPU=y +# CONFIG_RCU_NOCB_CPU_NONE is not set +# CONFIG_RCU_NOCB_CPU_ZERO is not set +CONFIG_RCU_NOCB_CPU_ALL=y CONFIG_IKCONFIG=m CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=17 +CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_CGROUPS=y # CONFIG_CGROUP_DEBUG is not set # CONFIG_CGROUP_FREEZER is not set @@ -116,13 +126,13 @@ CONFIG_RD_GZIP=y # CONFIG_RD_LZMA is not set # CONFIG_RD_XZ is not set # CONFIG_RD_LZO is not set +# CONFIG_RD_LZ4 is not set CONFIG_INITRAMFS_COMPRESSION_NONE=y # CONFIG_INITRAMFS_COMPRESSION_GZIP is not set # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_SYSCTL=y CONFIG_ANON_INODES=y CONFIG_HAVE_UID16=y -CONFIG_HOTPLUG=y CONFIG_EXPERT=y # CONFIG_UID16 is not set CONFIG_SYSCTL_SYSCALL=y @@ -152,6 +162,7 @@ CONFIG_SLUB_DEBUG=y # CONFIG_SLAB is not set CONFIG_SLUB=y # CONFIG_SLOB is not set +CONFIG_SLUB_CPU_PARTIAL=y # CONFIG_PROFILING is not set CONFIG_HAVE_OPROFILE=y # CONFIG_KPROBES is not set @@ -203,6 +214,7 @@ CONFIG_BLK_DEV_BSGLIB=y # CONFIG_PARTITION_ADVANCED=y # CONFIG_ACORN_PARTITION is not set +# CONFIG_AIX_PARTITION is not set # CONFIG_OSF_PARTITION is not set # CONFIG_AMIGA_PARTITION is not set # CONFIG_ATARI_PARTITION is not set @@ -274,12 +286,23 @@ CONFIG_ARCH_BCM2708=y # CONFIG_ARCH_S5PV210 is not set # CONFIG_ARCH_EXYNOS is not set # CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_U300 is not set # CONFIG_ARCH_DAVINCI is not set # CONFIG_ARCH_OMAP1 is not set # CONFIG_GPIO_PCA953X is not set # CONFIG_PLAT_SPEAR is not set +# +# ST-Ericsson AB U300/U335 Platform +# + +# +# ST-Ericsson Mobile Platform Products +# + +# +# ST-Ericsson U300/U335 Feature Selections +# + # # Broadcom BCM2708 Implementations # @@ -366,6 +389,8 @@ CONFIG_CROSS_MEMORY_ATTACH=y CONFIG_NEED_PER_CPU_KM=y CONFIG_CLEANCACHE=y CONFIG_FRONTSWAP=y +# CONFIG_ZBUD is not set +# CONFIG_ZSWAP is not set CONFIG_FORCE_MAX_ZONEORDER=11 CONFIG_ALIGNMENT_TRAP=y # CONFIG_UACCESS_WITH_MEMCPY is not set @@ -624,7 +649,9 @@ CONFIG_DNS_RESOLVER=y # CONFIG_VSOCKETS is not set # CONFIG_NETLINK_MMAP is not set # CONFIG_NETLINK_DIAG is not set +# CONFIG_NET_MPLS_GSO is not set # CONFIG_NETPRIO_CGROUP is not set +CONFIG_NET_RX_BUSY_POLL=y CONFIG_BQL=y # CONFIG_BPF_JIT is not set @@ -715,6 +742,7 @@ CONFIG_DMA_SHARED_BUFFER=y # # Bus devices # +# CONFIG_ARM_CCI is not set # CONFIG_CONNECTOR is not set # CONFIG_MTD is not set # CONFIG_PARPORT is not set @@ -832,11 +860,11 @@ CONFIG_ISCSI_BOOT_SYSFS=y # CONFIG_MD is not set # CONFIG_TARGET_CORE is not set CONFIG_NETDEVICES=y +CONFIG_MII=y CONFIG_NET_CORE=y # CONFIG_BONDING is not set # CONFIG_DUMMY is not set # CONFIG_EQUALIZER is not set -CONFIG_MII=y # CONFIG_NET_TEAM is not set # CONFIG_MACVLAN is not set # CONFIG_VXLAN is not set @@ -845,6 +873,7 @@ CONFIG_MII=y # CONFIG_NET_POLL_CONTROLLER is not set CONFIG_TUN=y # CONFIG_VETH is not set +# CONFIG_NLMON is not set # # CAIF transport drivers @@ -957,6 +986,7 @@ CONFIG_ATH6KL=m CONFIG_ATH6KL_USB=m # CONFIG_ATH6KL_DEBUG is not set CONFIG_AR5523=m +# CONFIG_ATH10K is not set CONFIG_B43=m CONFIG_B43_SSB=y # CONFIG_B43_SDIO is not set @@ -995,13 +1025,13 @@ CONFIG_RT2X00_LIB_FIRMWARE=y CONFIG_RT2X00_LIB_CRYPTO=y CONFIG_RT2X00_LIB_LEDS=y # CONFIG_RT2X00_DEBUG is not set -CONFIG_RTLWIFI=m -# CONFIG_RTLWIFI_DEBUG is not set +CONFIG_RTL_CARDS=m # CONFIG_RTL8192CU is not set # CONFIG_WL_TI is not set CONFIG_ZD1211RW=m # CONFIG_ZD1211RW_DEBUG is not set # CONFIG_MWIFIEX is not set +# CONFIG_CW1200 is not set # # Enable WiMAX (Networking options) to see the WiMAX drivers @@ -1125,6 +1155,7 @@ CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_ALTERA_UART is not set # CONFIG_SERIAL_IFX6X60 is not set # CONFIG_SERIAL_ARC is not set +# CONFIG_SERIAL_FSL_LPUART is not set # CONFIG_TTY_PRINTK is not set # CONFIG_HVC_DCC is not set # CONFIG_IPMI_HANDLER is not set @@ -1203,11 +1234,6 @@ CONFIG_SPI_BCM2708=y # CONFIG_SPI_SPIDEV=y # CONFIG_SPI_TLE62X0 is not set - -# -# Qualcomm MSM SSBI bus support -# -# CONFIG_SSBI is not set # CONFIG_HSI is not set # @@ -1227,7 +1253,6 @@ CONFIG_SPI_SPIDEV=y # # Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. # -# CONFIG_PTP_1588_CLOCK_PCH is not set CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y CONFIG_ARCH_REQUIRE_GPIOLIB=y CONFIG_GPIO_DEVRES=y @@ -1328,6 +1353,7 @@ CONFIG_HWMON=y # CONFIG_SENSORS_F71882FG is not set # CONFIG_SENSORS_F75375S is not set # CONFIG_SENSORS_G760A is not set +# CONFIG_SENSORS_G762 is not set # CONFIG_SENSORS_GL518SM is not set # CONFIG_SENSORS_GL520SM is not set # CONFIG_SENSORS_GPIO_FAN is not set @@ -1413,6 +1439,10 @@ CONFIG_THERMAL_GOV_STEP_WISE=y # CONFIG_CPU_THERMAL is not set # CONFIG_THERMAL_EMULATION is not set CONFIG_THERMAL_BCM2835=y + +# +# Texas Instruments thermal drivers +# # CONFIG_WATCHDOG is not set CONFIG_SSB_POSSIBLE=y @@ -1451,6 +1481,7 @@ CONFIG_BCMA_POSSIBLE=y # CONFIG_HTC_EGPIO is not set # CONFIG_HTC_PASIC3 is not set # CONFIG_HTC_I2CPLD is not set +# CONFIG_MFD_KEMPLD is not set # CONFIG_MFD_88PM800 is not set # CONFIG_MFD_88PM805 is not set # CONFIG_MFD_88PM860X is not set @@ -1502,6 +1533,7 @@ CONFIG_BCMA_POSSIBLE=y # CONFIG_MFD_WM831X_SPI is not set # CONFIG_MFD_WM8350_I2C is not set # CONFIG_MFD_WM8994 is not set +# CONFIG_VEXPRESS_CONFIG is not set # CONFIG_REGULATOR is not set CONFIG_MEDIA_SUPPORT=m @@ -1892,9 +1924,6 @@ CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y # CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set -# CONFIG_FONTS is not set -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y # CONFIG_LOGO is not set # CONFIG_SOUND is not set @@ -1922,8 +1951,10 @@ CONFIG_HID_CYPRESS=y # CONFIG_HID_DRAGONRISE is not set # CONFIG_HID_EMS_FF is not set # CONFIG_HID_ELECOM is not set +# CONFIG_HID_ELO is not set CONFIG_HID_EZKEY=y # CONFIG_HID_HOLTEK is not set +# CONFIG_HID_HUION is not set # CONFIG_HID_KEYTOUCH is not set CONFIG_HID_KYE=y # CONFIG_HID_UCLOGIC is not set @@ -1966,7 +1997,6 @@ CONFIG_HID_TOPSEED=y # CONFIG_HID_THRUSTMASTER is not set # CONFIG_HID_WACOM is not set CONFIG_HID_WIIMOTE=m -CONFIG_HID_WIIMOTE_EXT=y # CONFIG_HID_ZEROPLUS is not set CONFIG_HID_ZYDACRON=y # CONFIG_HID_SENSOR_HUB is not set @@ -1982,9 +2012,6 @@ CONFIG_USB_HIDDEV=y # I2C HID support # # CONFIG_I2C_HID is not set -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB_ARCH_HAS_XHCI is not set CONFIG_USB_SUPPORT=y CONFIG_USB_COMMON=y CONFIG_USB_ARCH_HAS_HCD=y @@ -2006,10 +2033,14 @@ CONFIG_USB_MON=m # USB Host Controller Drivers # # CONFIG_USB_C67X00_HCD is not set +# CONFIG_USB_XHCI_HCD is not set +# CONFIG_USB_EHCI_HCD is not set # CONFIG_USB_OXU210HP_HCD is not set # CONFIG_USB_ISP116X_HCD is not set # CONFIG_USB_ISP1760_HCD is not set # CONFIG_USB_ISP1362_HCD is not set +# CONFIG_USB_FUSBH200_HCD is not set +# CONFIG_USB_OHCI_HCD is not set # CONFIG_USB_SL811_HCD is not set # CONFIG_USB_R8A66597_HCD is not set CONFIG_USB_DWCOTG=y @@ -2112,6 +2143,8 @@ CONFIG_USB_SERIAL_PL2303=m # CONFIG_USB_SERIAL_ZTE is not set # CONFIG_USB_SERIAL_SSU100 is not set # CONFIG_USB_SERIAL_QT2 is not set +# CONFIG_USB_SERIAL_FLASHLOADER is not set +# CONFIG_USB_SERIAL_SUUNTO is not set # CONFIG_USB_SERIAL_DEBUG is not set # @@ -2274,11 +2307,11 @@ CONFIG_LIRC_XBOX=m # CONFIG_ANDROID is not set # CONFIG_USB_WPAN_HCD is not set # CONFIG_WIMAX_GDM72XX is not set -# CONFIG_CSR_WIFI is not set # CONFIG_CED1401 is not set # CONFIG_DGRP is not set CONFIG_ZCACHE=y # CONFIG_ZCACHE_DEBUG is not set +# CONFIG_USB_BTMTK is not set CONFIG_CLKDEV_LOOKUP=y # @@ -2302,6 +2335,7 @@ CONFIG_CLKDEV_LOOKUP=y # CONFIG_PWM is not set # CONFIG_IPACK_BUS is not set # CONFIG_RESET_CONTROLLER is not set +# CONFIG_FMC is not set # # File systems @@ -2427,6 +2461,7 @@ CONFIG_NFS_V3=y CONFIG_NFS_V4=y CONFIG_NFS_SWAP=y CONFIG_NFS_V4_1=y +CONFIG_NFS_V4_2=y CONFIG_PNFS_FILE_LAYOUT=m CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org" CONFIG_ROOT_NFS=y @@ -2509,61 +2544,81 @@ CONFIG_NLS_UTF8=y # # Kernel hacking # + +# +# printk and dmesg options +# CONFIG_PRINTK_TIME=y CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 +CONFIG_BOOT_PRINTK_DELAY=y +# CONFIG_DYNAMIC_DEBUG is not set + +# +# Compile-time checks and compiler options +# +# CONFIG_DEBUG_INFO is not set CONFIG_ENABLE_WARN_DEPRECATED=y CONFIG_ENABLE_MUST_CHECK=y CONFIG_FRAME_WARN=1024 -CONFIG_MAGIC_SYSRQ=y # CONFIG_STRIP_ASM_SYMS is not set # CONFIG_READABLE_ASM is not set # CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_FS=y # CONFIG_HEADERS_CHECK is not set # CONFIG_DEBUG_SECTION_MISMATCH is not set +CONFIG_FRAME_POINTER=y +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -CONFIG_LOCKUP_DETECTOR=y -# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 -# CONFIG_PANIC_ON_OOPS is not set -CONFIG_PANIC_ON_OOPS_VALUE=0 -CONFIG_DETECT_HUNG_TASK=y -CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 -# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set -CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 -# CONFIG_SCHED_DEBUG is not set -# CONFIG_SCHEDSTATS is not set -# CONFIG_TIMER_STATS is not set + +# +# Memory Debugging +# +# CONFIG_DEBUG_PAGEALLOC is not set # CONFIG_DEBUG_OBJECTS is not set # CONFIG_SLUB_DEBUG_ON is not set # CONFIG_SLUB_STATS is not set CONFIG_HAVE_DEBUG_KMEMLEAK=y # CONFIG_DEBUG_KMEMLEAK is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +# CONFIG_DEBUG_SHIRQ is not set + +# +# Debug Lockups and Hangs +# +CONFIG_LOCKUP_DETECTOR=y +# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 +# CONFIG_DETECT_HUNG_TASK is not set +# CONFIG_PANIC_ON_OOPS is not set +CONFIG_PANIC_ON_OOPS_VALUE=0 +# CONFIG_SCHED_DEBUG is not set +# CONFIG_SCHEDSTATS is not set +# CONFIG_TIMER_STATS is not set # CONFIG_DEBUG_PREEMPT is not set + +# +# Lock Debugging (spinlocks, mutexes, etc...) +# # CONFIG_DEBUG_RT_MUTEXES is not set # CONFIG_RT_MUTEX_TESTER is not set # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set # CONFIG_DEBUG_LOCK_ALLOC is not set # CONFIG_PROVE_LOCKING is not set # CONFIG_LOCK_STAT is not set # CONFIG_DEBUG_ATOMIC_SLEEP is not set # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_STACK_USAGE is not set # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_VM is not set # CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_MEMORY_INIT is not set # CONFIG_DEBUG_LIST is not set -# CONFIG_TEST_LIST_SORT is not set # CONFIG_DEBUG_SG is not set # CONFIG_DEBUG_NOTIFIERS is not set # CONFIG_DEBUG_CREDENTIALS is not set -CONFIG_FRAME_POINTER=y -CONFIG_BOOT_PRINTK_DELAY=y # # RCU Debugging @@ -2571,15 +2626,14 @@ CONFIG_BOOT_PRINTK_DELAY=y # CONFIG_PROVE_RCU_DELAY is not set # CONFIG_SPARSE_RCU_POINTER is not set # CONFIG_RCU_TORTURE_TEST is not set +CONFIG_RCU_CPU_STALL_TIMEOUT=21 +CONFIG_RCU_CPU_STALL_VERBOSE=y +# CONFIG_RCU_CPU_STALL_INFO is not set # CONFIG_RCU_TRACE is not set -# CONFIG_BACKTRACE_SELF_TEST is not set # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -# CONFIG_LKDTM is not set # CONFIG_NOTIFIER_ERROR_INJECTION is not set # CONFIG_FAULT_INJECTION is not set # CONFIG_LATENCYTOP is not set -# CONFIG_DEBUG_PAGEALLOC is not set CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_DYNAMIC_FTRACE=y @@ -2588,16 +2642,22 @@ CONFIG_HAVE_SYSCALL_TRACEPOINTS=y CONFIG_HAVE_C_RECORDMCOUNT=y CONFIG_TRACING_SUPPORT=y # CONFIG_FTRACE is not set + +# +# Runtime Testing +# +# CONFIG_LKDTM is not set +# CONFIG_TEST_LIST_SORT is not set +# CONFIG_BACKTRACE_SELF_TEST is not set # CONFIG_RBTREE_TEST is not set # CONFIG_INTERVAL_TREE_TEST is not set -# CONFIG_DYNAMIC_DEBUG is not set -# CONFIG_DMA_API_DEBUG is not set # CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_TEST_STRING_HELPERS is not set +# CONFIG_TEST_KSTRTOX is not set +# CONFIG_DMA_API_DEBUG is not set # CONFIG_SAMPLES is not set CONFIG_HAVE_ARCH_KGDB=y # CONFIG_KGDB is not set -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set # CONFIG_STRICT_DEVMEM is not set # CONFIG_ARM_UNWIND is not set # CONFIG_DEBUG_USER is not set @@ -2665,7 +2725,7 @@ CONFIG_CRYPTO_ECB=y # # Hash modes # -# CONFIG_CRYPTO_CMAC is not set +CONFIG_CRYPTO_CMAC=y CONFIG_CRYPTO_HMAC=y # CONFIG_CRYPTO_XCBC is not set # CONFIG_CRYPTO_VMAC is not set @@ -2716,6 +2776,8 @@ CONFIG_CRYPTO_DES=y # CONFIG_CRYPTO_DEFLATE is not set # CONFIG_CRYPTO_ZLIB is not set CONFIG_CRYPTO_LZO=y +# CONFIG_CRYPTO_LZ4 is not set +# CONFIG_CRYPTO_LZ4HC is not set # # Random Number Generation @@ -2734,6 +2796,7 @@ CONFIG_RAID6_PQ=y CONFIG_BITREVERSE=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GENERIC_NET_UTILS=y CONFIG_GENERIC_PCI_IOMAP=y CONFIG_GENERIC_IO=y CONFIG_CRC_CCITT=y @@ -2774,4 +2837,8 @@ CONFIG_AVERAGE=y # CONFIG_CORDIC is not set # CONFIG_DDR is not set CONFIG_OID_REGISTRY=y +CONFIG_FONT_SUPPORT=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y # CONFIG_VIRTUALIZATION is not set diff --git a/projects/RPi/options b/projects/RPi/options index b4153d8bf6..e73e7678c0 100755 --- a/projects/RPi/options +++ b/projects/RPi/options @@ -112,7 +112,7 @@ # Kernel to use. values can be: # default: default mainline kernel # ti-omap4: Ti's OMAP4 kernel - LINUX="3.10" + LINUX="default" # use linux-next (latest rc) instead latest released version LINUX_NEXT="no" diff --git a/projects/RPi/patches/linux/linux-01-RPi_support-2ed7ca0.patch b/projects/RPi/patches/linux/linux-01-RPi_support-d747469.patch similarity index 94% rename from projects/RPi/patches/linux/linux-01-RPi_support-2ed7ca0.patch rename to projects/RPi/patches/linux/linux-01-RPi_support-d747469.patch index 90fe504ec7..256b03e9e3 100644 --- a/projects/RPi/patches/linux/linux-01-RPi_support-2ed7ca0.patch +++ b/projects/RPi/patches/linux/linux-01-RPi_support-d747469.patch @@ -1,7 +1,7 @@ -From 297322435f97dd0cba80467999dc3620dafa5f82 Mon Sep 17 00:00:00 2001 +From 9fca890f6bf59e17b10e3bc69725184503faf07b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 -Subject: [PATCH 001/113] Main bcm2708 linux port +Subject: [PATCH 01/98] Main bcm2708 linux port Signed-off-by: popcornmix --- @@ -12,7 +12,7 @@ Signed-off-by: popcornmix arch/arm/configs/bcmrpi_defconfig | 510 ++++++++ arch/arm/configs/bcmrpi_emergency_defconfig | 532 ++++++++ arch/arm/mach-bcm2708/Kconfig | 34 + - arch/arm/mach-bcm2708/Makefile | 8 + + arch/arm/mach-bcm2708/Makefile | 7 + arch/arm/mach-bcm2708/Makefile.boot | 3 + arch/arm/mach-bcm2708/armctrl.c | 208 ++++ arch/arm/mach-bcm2708/armctrl.h | 27 + @@ -29,7 +29,7 @@ Signed-off-by: popcornmix arch/arm/mach-bcm2708/include/mach/dma.h | 86 ++ arch/arm/mach-bcm2708/include/mach/entry-macro.S | 69 ++ arch/arm/mach-bcm2708/include/mach/frc.h | 38 + - arch/arm/mach-bcm2708/include/mach/gpio.h | 18 + + arch/arm/mach-bcm2708/include/mach/gpio.h | 17 + arch/arm/mach-bcm2708/include/mach/hardware.h | 28 + arch/arm/mach-bcm2708/include/mach/io.h | 27 + arch/arm/mach-bcm2708/include/mach/irqs.h | 196 +++ @@ -38,23 +38,24 @@ Signed-off-by: popcornmix arch/arm/mach-bcm2708/include/mach/power.h | 26 + arch/arm/mach-bcm2708/include/mach/system.h | 53 + arch/arm/mach-bcm2708/include/mach/timex.h | 23 + - arch/arm/mach-bcm2708/include/mach/uncompress.h | 85 ++ + arch/arm/mach-bcm2708/include/mach/uncompress.h | 84 ++ arch/arm/mach-bcm2708/include/mach/vc_mem.h | 35 + - arch/arm/mach-bcm2708/include/mach/vcio.h | 42 + + arch/arm/mach-bcm2708/include/mach/vcio.h | 141 +++ arch/arm/mach-bcm2708/include/mach/vmalloc.h | 20 + arch/arm/mach-bcm2708/power.c | 194 +++ - arch/arm/mach-bcm2708/vc_mem.c | 470 +++++++ - arch/arm/mach-bcm2708/vcio.c | 308 +++++ + arch/arm/mach-bcm2708/vc_mem.c | 462 +++++++ + arch/arm/mach-bcm2708/vcio.c | 474 +++++++ arch/arm/mm/Kconfig | 2 +- arch/arm/mm/proc-v6.S | 15 +- arch/arm/tools/mach-types | 1 + drivers/mmc/host/Kconfig | 21 + drivers/mmc/host/Makefile | 1 + - drivers/mmc/host/sdhci-bcm2708.c | 1425 ++++++++++++++++++++++ + drivers/mmc/host/sdhci-bcm2708.c | 1424 ++++++++++++++++++++++ drivers/mmc/host/sdhci.c | 209 +++- drivers/mmc/host/sdhci.h | 37 + + drivers/tty/serial/amba-pl011.c | 2 +- include/linux/mmc/sdhci.h | 2 + - 49 files changed, 7478 insertions(+), 71 deletions(-) + 50 files changed, 7732 insertions(+), 72 deletions(-) create mode 100644 arch/arm/configs/bcmrpi_cutdown_defconfig create mode 100644 arch/arm/configs/bcmrpi_defconfig create mode 100644 arch/arm/configs/bcmrpi_emergency_defconfig @@ -95,10 +96,10 @@ Signed-off-by: popcornmix create mode 100644 drivers/mmc/host/sdhci-bcm2708.c diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index 18a9f5e..eb291c7 100644 +index 43594d5..9935688 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -361,6 +361,21 @@ config ARCH_AT91 +@@ -366,6 +366,21 @@ config ARCH_AT91 This enables support for systems based on Atmel AT91RM9200 and AT91SAM9* processors. @@ -120,7 +121,7 @@ index 18a9f5e..eb291c7 100644 config ARCH_CLPS711X bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" select ARCH_REQUIRE_GPIOLIB -@@ -1025,6 +1040,7 @@ source "arch/arm/mach-virt/Kconfig" +@@ -1041,6 +1056,7 @@ source "arch/arm/mach-virt/Kconfig" source "arch/arm/mach-vt8500/Kconfig" source "arch/arm/mach-w90x900/Kconfig" @@ -129,10 +130,10 @@ index 18a9f5e..eb291c7 100644 source "arch/arm/mach-zynq/Kconfig" diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug -index 1d41908..52377c9 100644 +index 583f4a0..b3b654d 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug -@@ -519,6 +519,14 @@ choice +@@ -610,6 +610,14 @@ choice For more details about semihosting, please see chapter 8 of DUI0203I_rvct_developer_guide.pdf from ARM Ltd. @@ -148,10 +149,10 @@ index 1d41908..52377c9 100644 config DEBUG_EXYNOS_UART diff --git a/arch/arm/Makefile b/arch/arm/Makefile -index 1ba358b..fb73cf04 100644 +index 6fd2cea..917f6ff 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile -@@ -139,6 +139,7 @@ textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000 +@@ -146,6 +146,7 @@ textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000 # by CONFIG_* macro name. machine-$(CONFIG_ARCH_AT91) += at91 machine-$(CONFIG_ARCH_BCM) += bcm @@ -1695,7 +1696,7 @@ index 0000000..3b40c49 +CONFIG_LIBCRC32C=y diff --git a/arch/arm/mach-bcm2708/Kconfig b/arch/arm/mach-bcm2708/Kconfig new file mode 100644 -index 0000000..63bb76c +index 0000000..9355841 --- /dev/null +++ b/arch/arm/mach-bcm2708/Kconfig @@ -0,0 +1,34 @@ @@ -1723,7 +1724,7 @@ index 0000000..63bb76c + depends on MACH_BCM2708 + default y + help -+ Helper for videocore memory access and total size allocation. ++ Helper for videocore memory access and total size allocation. + +config BCM2708_NOL2CACHE + bool "Videocore L2 cache disable" @@ -1735,10 +1736,10 @@ index 0000000..63bb76c +endmenu diff --git a/arch/arm/mach-bcm2708/Makefile b/arch/arm/mach-bcm2708/Makefile new file mode 100644 -index 0000000..164ecb2 +index 0000000..a722f3f --- /dev/null +++ b/arch/arm/mach-bcm2708/Makefile -@@ -0,0 +1,8 @@ +@@ -0,0 +1,7 @@ +# +# Makefile for the linux kernel. +# @@ -1746,7 +1747,6 @@ index 0000000..164ecb2 +obj-$(CONFIG_MACH_BCM2708) += clock.o bcm2708.o armctrl.o vcio.o power.o dma.o +obj-$(CONFIG_BCM2708_GPIO) += bcm2708_gpio.o +obj-$(CONFIG_BCM2708_VCMEM) += vc_mem.o -+ diff --git a/arch/arm/mach-bcm2708/Makefile.boot b/arch/arm/mach-bcm2708/Makefile.boot new file mode 100644 index 0000000..67039c3 @@ -2005,7 +2005,7 @@ index 0000000..0aa916e +#endif diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c new file mode 100644 -index 0000000..544ed1e +index 0000000..e6459b3 --- /dev/null +++ b/arch/arm/mach-bcm2708/bcm2708.c @@ -0,0 +1,638 @@ @@ -2083,6 +2083,7 @@ index 0000000..544ed1e + +/* command line parameters */ +static unsigned boardrev, serial; ++static unsigned uart_clock; + +static void __init bcm2708_init_led(void); + @@ -2460,8 +2461,12 @@ index 0000000..544ed1e +{ + int i; + ++ printk("bcm2708.uart_clock = %d\n", uart_clock); + pm_power_off = bcm2708_power_off; + ++ if (uart_clock) ++ lookups[0].clk->rate = uart_clock; ++ + for (i = 0; i < ARRAY_SIZE(lookups); i++) + clkdev_add(&lookups[i]); + @@ -2481,12 +2486,6 @@ index 0000000..544ed1e +#endif + bcm2708_init_led(); + -+#ifdef CONFIG_BCM2708_VCMEM -+ { -+ extern void vc_mem_connected_init(void); -+ vc_mem_connected_init(); -+ } -+#endif + for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { + struct amba_device *d = amba_devs[i]; + amba_device_register(d, &iomem_resource); @@ -2647,6 +2646,7 @@ index 0000000..544ed1e + +module_param(boardrev, uint, 0644); +module_param(serial, uint, 0644); ++module_param(uart_clock, uint, 0644); diff --git a/arch/arm/mach-bcm2708/bcm2708.h b/arch/arm/mach-bcm2708/bcm2708.h new file mode 100644 index 0000000..dfe8700 @@ -4296,10 +4296,10 @@ index 0000000..dd51e07 +#endif diff --git a/arch/arm/mach-bcm2708/include/mach/gpio.h b/arch/arm/mach-bcm2708/include/mach/gpio.h new file mode 100644 -index 0000000..f600bc7 +index 0000000..753dc06 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/gpio.h -@@ -0,0 +1,18 @@ +@@ -0,0 +1,17 @@ +/* + * arch/arm/mach-bcm2708/include/mach/gpio.h + * @@ -4317,7 +4317,6 @@ index 0000000..f600bc7 +#define irq_to_gpio(x) ((x) - GPIO_IRQ_START) + +#endif -+ diff --git a/arch/arm/mach-bcm2708/include/mach/hardware.h b/arch/arm/mach-bcm2708/include/mach/hardware.h new file mode 100644 index 0000000..c2954e8 @@ -4998,10 +4997,10 @@ index 0000000..64a660c +#define CLOCK_TICK_RATE (1000000) diff --git a/arch/arm/mach-bcm2708/include/mach/uncompress.h b/arch/arm/mach-bcm2708/include/mach/uncompress.h new file mode 100644 -index 0000000..6ff8f94 +index 0000000..d634813 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/uncompress.h -@@ -0,0 +1,85 @@ +@@ -0,0 +1,84 @@ +/* + * arch/arm/mach-bcn2708/include/mach/uncompress.h + * @@ -5086,10 +5085,9 @@ index 0000000..6ff8f94 + * nothing to do + */ +#define arch_decomp_wdog() -+ diff --git a/arch/arm/mach-bcm2708/include/mach/vc_mem.h b/arch/arm/mach-bcm2708/include/mach/vc_mem.h new file mode 100644 -index 0000000..9d41c3a +index 0000000..4a4a338 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/vc_mem.h @@ -0,0 +1,35 @@ @@ -5117,6 +5115,7 @@ index 0000000..9d41c3a +#define VC_MEM_IOC_MEM_PHYS_ADDR _IOR( VC_MEM_IOC_MAGIC, 0, unsigned long ) +#define VC_MEM_IOC_MEM_SIZE _IOR( VC_MEM_IOC_MAGIC, 1, unsigned int ) +#define VC_MEM_IOC_MEM_BASE _IOR( VC_MEM_IOC_MAGIC, 2, unsigned int ) ++#define VC_MEM_IOC_MEM_LOAD _IOR( VC_MEM_IOC_MAGIC, 3, unsigned int ) + +#if defined( __KERNEL__ ) +#define VC_MEM_TO_ARM_ADDR_MASK 0x3FFFFFFF @@ -5127,13 +5126,12 @@ index 0000000..9d41c3a +#endif + +#endif /* VC_MEM_H */ -+ diff --git a/arch/arm/mach-bcm2708/include/mach/vcio.h b/arch/arm/mach-bcm2708/include/mach/vcio.h new file mode 100644 -index 0000000..0d7f9a5 +index 0000000..9935e02 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/vcio.h -@@ -0,0 +1,42 @@ +@@ -0,0 +1,141 @@ +/* + * arch/arm/mach-bcm2708/include/mach/vcio.h + * @@ -5163,22 +5161,121 @@ index 0000000..0d7f9a5 +#define BCM_VCIO_DRIVER_NAME "bcm2708_vcio" + +/* Constants shared with the ARM identifying separate mailbox channels */ -+#define MBOX_CHAN_POWER 0 /* for use by the power management interface */ -+#define MBOX_CHAN_FB 1 /* for use by the frame buffer */ -+#define MBOX_CHAN_VUART 2 /* for use by the virtual UART */ -+#define MBOX_CHAN_VCHIQ 3 /* for use by the VCHIQ interface */ -+#define MBOX_CHAN_LEDS 4 /* for use by the leds interface */ -+#define MBOX_CHAN_BUTTONS 5 /* for use by the buttons interface */ -+#define MBOX_CHAN_TOUCH 6 /* for use by the touchscreen interface */ -+#define MBOX_CHAN_COUNT 7 ++#define MBOX_CHAN_POWER 0 /* for use by the power management interface */ ++#define MBOX_CHAN_FB 1 /* for use by the frame buffer */ ++#define MBOX_CHAN_VCHIQ 3 /* for use by the VCHIQ interface */ ++#define MBOX_CHAN_PROPERTY 8 /* for use by the property channel */ ++#define MBOX_CHAN_COUNT 9 ++ ++/* Mailbox property tags */ ++enum { ++ VCMSG_PROPERTY_END = 0x00000000, ++ VCMSG_GET_FIRMWARE_REVISION = 0x00000001, ++ VCMSG_GET_BOARD_MODEL = 0x00010001, ++ VCMSG_GET_BOARD_REVISION = 0x00020002, ++ VCMSG_GET_BOARD_MAC_ADDRESS = 0x00020003, ++ VCMSG_GET_BOARD_SERIAL = 0x00020004, ++ VCMSG_GET_ARM_MEMORY = 0x00020005, ++ VCMSG_GET_VC_MEMORY = 0x00020006, ++ VCMSG_GET_CLOCKS = 0x00020007, ++ VCMSG_GET_COMMAND_LINE = 0x00050001, ++ VCMSG_GET_DMA_CHANNELS = 0x00060001, ++ VCMSG_GET_POWER_STATE = 0x00020001, ++ VCMSG_GET_TIMING = 0x00020002, ++ VCMSG_SET_POWER_STATE = 0x00028001, ++ VCMSG_GET_CLOCK_STATE = 0x00030001, ++ VCMSG_SET_CLOCK_STATE = 0x00038001, ++ VCMSG_GET_CLOCK_RATE = 0x00030002, ++ VCMSG_SET_CLOCK_RATE = 0x00038002, ++ VCMSG_GET_VOLTAGE = 0x00030003, ++ VCMSG_SET_VOLTAGE = 0x00038003, ++ VCMSG_GET_MAX_CLOCK = 0x00030004, ++ VCMSG_GET_MAX_VOLTAGE = 0x00030005, ++ VCMSG_GET_TEMPERATURE = 0x00030006, ++ VCMSG_GET_MIN_CLOCK = 0x00030007, ++ VCMSG_GET_MIN_VOLTAGE = 0x00030008, ++ VCMSG_GET_TURBO = 0x00030009, ++ VCMSG_SET_TURBO = 0x00038009, ++ VCMSG_SET_ALLOCATE_BUFFER = 0x00040001, ++ VCMSG_SET_RELEASE_BUFFER = 0x00048001, ++ VCMSG_SET_BLANK_SCREEN = 0x00040002, ++ VCMSG_TST_BLANK_SCREEN = 0x00044002, ++ VCMSG_GET_PHYSICAL_WIDTH_HEIGHT = 0x00040003, ++ VCMSG_TST_PHYSICAL_WIDTH_HEIGHT = 0x00044003, ++ VCMSG_SET_PHYSICAL_WIDTH_HEIGHT = 0x00048003, ++ VCMSG_GET_VIRTUAL_WIDTH_HEIGHT = 0x00040004, ++ VCMSG_TST_VIRTUAL_WIDTH_HEIGHT = 0x00044004, ++ VCMSG_SET_VIRTUAL_WIDTH_HEIGHT = 0x00048004, ++ VCMSG_GET_DEPTH = 0x00040005, ++ VCMSG_TST_DEPTH = 0x00044005, ++ VCMSG_SET_DEPTH = 0x00048005, ++ VCMSG_GET_PIXEL_ORDER = 0x00040006, ++ VCMSG_TST_PIXEL_ORDER = 0x00044006, ++ VCMSG_SET_PIXEL_ORDER = 0x00048006, ++ VCMSG_GET_ALPHA_MODE = 0x00040007, ++ VCMSG_TST_ALPHA_MODE = 0x00044007, ++ VCMSG_SET_ALPHA_MODE = 0x00048007, ++ VCMSG_GET_PITCH = 0x00040008, ++ VCMSG_TST_PITCH = 0x00044008, ++ VCMSG_SET_PITCH = 0x00048008, ++ VCMSG_GET_VIRTUAL_OFFSET = 0x00040009, ++ VCMSG_TST_VIRTUAL_OFFSET = 0x00044009, ++ VCMSG_SET_VIRTUAL_OFFSET = 0x00048009, ++ VCMSG_GET_OVERSCAN = 0x0004000a, ++ VCMSG_TST_OVERSCAN = 0x0004400a, ++ VCMSG_SET_OVERSCAN = 0x0004800a, ++ VCMSG_GET_PALETTE = 0x0004000b, ++ VCMSG_TST_PALETTE = 0x0004400b, ++ VCMSG_SET_PALETTE = 0x0004800b, ++ VCMSG_GET_LAYER = 0x0004000c, ++ VCMSG_TST_LAYER = 0x0004400c, ++ VCMSG_SET_LAYER = 0x0004800c, ++ VCMSG_GET_TRANSFORM = 0x0004000d, ++ VCMSG_TST_TRANSFORM = 0x0004400d, ++ VCMSG_SET_TRANSFORM = 0x0004800d, ++}; + +extern int /*rc*/ bcm_mailbox_read(unsigned chan, uint32_t *data28); +extern int /*rc*/ bcm_mailbox_write(unsigned chan, uint32_t data28); ++extern int /*rc*/ bcm_mailbox_property(void *data, int size); ++ ++#include ++ ++/* ++ * The major device number. We can't rely on dynamic ++ * registration any more, because ioctls need to know ++ * it. ++ */ ++#define MAJOR_NUM 100 ++ ++/* ++ * Set the message of the device driver ++ */ ++#define IOCTL_MBOX_PROPERTY _IOWR(MAJOR_NUM, 0, char *) ++/* ++ * _IOWR means that we're creating an ioctl command ++ * number for passing information from a user process ++ * to the kernel module and from the kernel module to user process ++ * ++ * The first arguments, MAJOR_NUM, is the major device ++ * number we're using. ++ * ++ * The second argument is the number of the command ++ * (there could be several with different meanings). ++ * ++ * The third argument is the type we want to get from ++ * the process to the kernel. ++ */ ++ ++/* ++ * The name of the device file ++ */ ++#define DEVICE_FILE_NAME "char_dev" + +#endif diff --git a/arch/arm/mach-bcm2708/include/mach/vmalloc.h b/arch/arm/mach-bcm2708/include/mach/vmalloc.h new file mode 100644 -index 0000000..28ecc15 +index 0000000..502c617 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/vmalloc.h @@ -0,0 +1,20 @@ @@ -5201,7 +5298,7 @@ index 0000000..28ecc15 + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ -+#define VMALLOC_END (0xd8000000) ++#define VMALLOC_END (0xe8000000) diff --git a/arch/arm/mach-bcm2708/power.c b/arch/arm/mach-bcm2708/power.c new file mode 100644 index 0000000..256bf1a @@ -5404,10 +5501,10 @@ index 0000000..256bf1a +MODULE_LICENSE("GPL"); diff --git a/arch/arm/mach-bcm2708/vc_mem.c b/arch/arm/mach-bcm2708/vc_mem.c new file mode 100644 -index 0000000..fd9d4be +index 0000000..aeae4d5 --- /dev/null +++ b/arch/arm/mach-bcm2708/vc_mem.c -@@ -0,0 +1,470 @@ +@@ -0,0 +1,462 @@ +/***************************************************************************** +* Copyright 2010 - 2011 Broadcom Corporation. All rights reserved. +* @@ -5431,6 +5528,7 @@ index 0000000..fd9d4be +#include +#include +#include ++#include + +#ifdef CONFIG_ARCH_KONA +#include @@ -5440,12 +5538,12 @@ index 0000000..fd9d4be +#endif + +#include "mach/vc_mem.h" -+//#include "interface/vchiq_arm/vchiq_connected.h" ++#include + +#define DRIVER_NAME "vc-mem" + +// Uncomment to enable debug logging -+//#define ENABLE_DBG ++// #define ENABLE_DBG + +#if defined(ENABLE_DBG) +#define LOG_DBG( fmt, ... ) printk( KERN_INFO fmt "\n", ##__VA_ARGS__ ) @@ -5477,23 +5575,8 @@ index 0000000..fd9d4be + * bootloader (and/or kernel). When that happens, the values of these variables + * would be calculated and assigned in the init function. + */ -+#ifdef CONFIG_ARCH_KONA -+ -+#include -+unsigned long mm_vc_mem_phys_addr = VC_EMI; -+ -+#elif CONFIG_ARCH_BCM2708 -+ +// in the 2835 VC in mapped above ARM, but ARM has full access to VC space +unsigned long mm_vc_mem_phys_addr = 0x00000000; -+ -+#else -+ -+#include -+unsigned long mm_vc_mem_phys_addr = MM_ADDR_IO_VC_EMI; -+ -+#endif -+ +unsigned int mm_vc_mem_size = 0; +unsigned int mm_vc_mem_base = 0; + @@ -5501,6 +5584,11 @@ index 0000000..fd9d4be +EXPORT_SYMBOL(mm_vc_mem_size); +EXPORT_SYMBOL(mm_vc_mem_base); + ++static uint phys_addr = 0; ++static uint mem_size = 0; ++static uint mem_base = 0; ++ ++ +/**************************************************************************** +* +* vc_mem_open @@ -5544,7 +5632,6 @@ index 0000000..fd9d4be +static void +vc_mem_get_size(void) +{ -+ mm_vc_mem_size = 256 * 1024 * 1024; // Static for now +} + +/**************************************************************************** @@ -5556,7 +5643,6 @@ index 0000000..fd9d4be +static void +vc_mem_get_base(void) +{ -+ mm_vc_mem_base = 128 * 1024 * 1024; // Static for now +} + +/**************************************************************************** @@ -5568,7 +5654,6 @@ index 0000000..fd9d4be +int +vc_mem_get_current_size(void) +{ -+ vc_mem_get_size(); + return mm_vc_mem_size; +} + @@ -5630,6 +5715,20 @@ index 0000000..fd9d4be + } + break; + } ++ case VC_MEM_IOC_MEM_LOAD: ++ { ++ // Get the videocore memory base ++ vc_mem_get_base(); ++ ++ LOG_DBG("%s: VC_MEM_IOC_MEM_LOAD=%u", __func__, ++ mm_vc_mem_base); ++ ++ if (copy_to_user((void *) arg, &mm_vc_mem_base, ++ sizeof (mm_vc_mem_base)) != 0) { ++ rc = -EFAULT; ++ } ++ break; ++ } + default: + { + return -ENOTTY; @@ -5759,25 +5858,26 @@ index 0000000..fd9d4be + +/**************************************************************************** +* -+* vc_mem_connected_init -+* -+* This function is called once the videocore has been connected. ++* vc_mem_init +* +***************************************************************************/ + -+void -+vc_mem_connected_init(void) ++static int __init ++vc_mem_init(void) +{ + int rc = -EFAULT; + struct device *dev; + + LOG_DBG("%s: called", __func__); + ++ mm_vc_mem_phys_addr = phys_addr; ++ mm_vc_mem_size = mem_size; ++ mm_vc_mem_base = mem_base; ++ + vc_mem_get_size(); + -+ printk("vc-mem: mm_vc_mem_phys_addr = 0x%08lx\n", mm_vc_mem_phys_addr); -+ printk("vc-mem: mm_vc_mem_size = 0x%08x (%u MiB)\n", -+ mm_vc_mem_size, mm_vc_mem_size / (1024 * 1024)); ++ printk("vc-mem: phys_addr:0x%08lx mem_base=0x%08x mem_size:0x%08x(%u MiB)\n", ++ mm_vc_mem_phys_addr, mm_vc_mem_base, mm_vc_mem_size, mm_vc_mem_size / (1024 * 1024)); + + if ((rc = alloc_chrdev_region(&vc_mem_devnum, 0, 1, DRIVER_NAME)) < 0) { + LOG_ERR("%s: alloc_chrdev_region failed (rc=%d)", __func__, rc); @@ -5817,7 +5917,7 @@ index 0000000..fd9d4be +#endif + + vc_mem_inited = 1; -+ return; ++ return 0; + + out_device_destroy: + device_destroy(vc_mem_class, vc_mem_devnum); @@ -5833,23 +5933,7 @@ index 0000000..fd9d4be + unregister_chrdev_region(vc_mem_devnum, 1); + + out_err: -+ return; -+} -+ -+/**************************************************************************** -+* -+* vc_mem_init -+* -+***************************************************************************/ -+ -+static int __init -+vc_mem_init(void) -+{ -+ printk(KERN_INFO "vc-mem: Videocore memory driver\n"); -+ -+ //vchiq_add_connected_callback(vc_mem_connected_init); -+ -+ return 0; ++ return -1; +} + +/**************************************************************************** @@ -5878,12 +5962,17 @@ index 0000000..fd9d4be +module_exit(vc_mem_exit); +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Broadcom Corporation"); ++ ++module_param(phys_addr, uint, 0644); ++module_param(mem_size, uint, 0644); ++module_param(mem_base, uint, 0644); ++ diff --git a/arch/arm/mach-bcm2708/vcio.c b/arch/arm/mach-bcm2708/vcio.c new file mode 100644 -index 0000000..799a0ac +index 0000000..5e43e85 --- /dev/null +++ b/arch/arm/mach-bcm2708/vcio.c -@@ -0,0 +1,308 @@ +@@ -0,0 +1,474 @@ +/* + * linux/arch/arm/mach-bcm2708/vcio.c + * @@ -5923,6 +6012,9 @@ index 0000000..799a0ac +#include +#include + ++#include ++ ++ +#define DRIVER_NAME BCM_VCIO_DRIVER_NAME + +/* ---------------------------------------------------------------------- @@ -6005,14 +6097,10 @@ index 0000000..799a0ac + if (mbox->magic != MBOX_MAGIC) + rc = -EINVAL; + else { -+ if (down_interruptible(&mbox->sema[chan]) == 0) { -+ *data28 = MBOX_DATA28(mbox->msg[chan]); -+ mbox->msg[chan] = 0; -+ rc = 0; -+ } else { -+ /* The wait was interrupted */ -+ rc = -EINTR; -+ } ++ down(&mbox->sema[chan]); ++ *data28 = MBOX_DATA28(mbox->msg[chan]); ++ mbox->msg[chan] = 0; ++ rc = 0; + } + return rc; +} @@ -6106,10 +6194,161 @@ index 0000000..799a0ac + mbox_dev = dev; +} + ++static int mbox_copy_from_user(void *dst, const void *src, int size) ++{ ++ if ( (uint32_t)src < TASK_SIZE) ++ { ++ return copy_from_user(dst, src, size); ++ } ++ else ++ { ++ memcpy( dst, src, size ); ++ return 0; ++ } ++} ++ ++static int mbox_copy_to_user(void *dst, const void *src, int size) ++{ ++ if ( (uint32_t)dst < TASK_SIZE) ++ { ++ return copy_to_user(dst, src, size); ++ } ++ else ++ { ++ memcpy( dst, src, size ); ++ return 0; ++ } ++} ++ ++static DEFINE_MUTEX(mailbox_lock); ++extern int bcm_mailbox_property(void *data, int size) ++{ ++ uint32_t success; ++ dma_addr_t mem_bus; /* the memory address accessed from videocore */ ++ void *mem_kern; /* the memory address accessed from driver */ ++ int s = 0; ++ ++ mutex_lock(&mailbox_lock); ++ /* allocate some memory for the messages communicating with GPU */ ++ mem_kern = dma_alloc_coherent(NULL, PAGE_ALIGN(size), &mem_bus, GFP_ATOMIC); ++ if (mem_kern) { ++ /* create the message */ ++ mbox_copy_from_user(mem_kern, data, size); ++ ++ /* send the message */ ++ wmb(); ++ s = bcm_mailbox_write(MBOX_CHAN_PROPERTY, (uint32_t)mem_bus); ++ if (s == 0) { ++ s = bcm_mailbox_read(MBOX_CHAN_PROPERTY, &success); ++ } ++ if (s == 0) { ++ /* copy the response */ ++ rmb(); ++ mbox_copy_to_user(data, mem_kern, size); ++ } ++ dma_free_coherent(NULL, PAGE_ALIGN(size), mem_kern, mem_bus); ++ } else { ++ s = -ENOMEM; ++ } ++ if (s != 0) ++ printk(KERN_ERR DRIVER_NAME ": %s failed (%d)\n", __func__, s); ++ ++ mutex_unlock(&mailbox_lock); ++ return s; ++} ++EXPORT_SYMBOL_GPL(bcm_mailbox_property); ++ +/* ---------------------------------------------------------------------- + * Platform Device for Mailbox + * -------------------------------------------------------------------- */ + ++/* ++ * Is the device open right now? Used to prevent ++ * concurent access into the same device ++ */ ++static int Device_Open = 0; ++ ++/* ++ * This is called whenever a process attempts to open the device file ++ */ ++static int device_open(struct inode *inode, struct file *file) ++{ ++ /* ++ * We don't want to talk to two processes at the same time ++ */ ++ if (Device_Open) ++ return -EBUSY; ++ ++ Device_Open++; ++ /* ++ * Initialize the message ++ */ ++ try_module_get(THIS_MODULE); ++ return 0; ++} ++ ++static int device_release(struct inode *inode, struct file *file) ++{ ++ /* ++ * We're now ready for our next caller ++ */ ++ Device_Open--; ++ ++ module_put(THIS_MODULE); ++ return 0; ++} ++ ++/* ++ * This function is called whenever a process tries to do an ioctl on our ++ * device file. We get two extra parameters (additional to the inode and file ++ * structures, which all device functions get): the number of the ioctl called ++ * and the parameter given to the ioctl function. ++ * ++ * If the ioctl is write or read/write (meaning output is returned to the ++ * calling process), the ioctl call returns the output of this function. ++ * ++ */ ++static long device_ioctl(struct file *file, /* see include/linux/fs.h */ ++ unsigned int ioctl_num, /* number and param for ioctl */ ++ unsigned long ioctl_param) ++{ ++ unsigned size; ++ /* ++ * Switch according to the ioctl called ++ */ ++ switch (ioctl_num) { ++ case IOCTL_MBOX_PROPERTY: ++ /* ++ * Receive a pointer to a message (in user space) and set that ++ * to be the device's message. Get the parameter given to ++ * ioctl by the process. ++ */ ++ mbox_copy_from_user(&size, (void *)ioctl_param, sizeof size); ++ return bcm_mailbox_property((void *)ioctl_param, size); ++ break; ++ default: ++ printk(KERN_ERR DRIVER_NAME "unknown ioctl: %d\n", ioctl_num); ++ return -EINVAL; ++ } ++ ++ return 0; ++} ++ ++/* Module Declarations */ ++ ++/* ++ * This structure will hold the functions to be called ++ * when a process does something to the device we ++ * created. Since a pointer to this structure is kept in ++ * the devices table, it can't be local to ++ * init_module. NULL is for unimplemented functios. ++ */ ++struct file_operations fops = { ++ .unlocked_ioctl = device_ioctl, ++ .open = device_open, ++ .release = device_release, /* a.k.a. close */ ++}; ++ +static int bcm_vcio_probe(struct platform_device *pdev) +{ + int ret = 0; @@ -6142,6 +6381,22 @@ index 0000000..799a0ac + __io_address(ARM_0_MAIL0_RD)); + } + } ++ ++ if (ret == 0) { ++ /* ++ * Register the character device ++ */ ++ ret = register_chrdev(MAJOR_NUM, DEVICE_FILE_NAME, &fops); ++ ++ /* ++ * Negative values signify an error ++ */ ++ if (ret < 0) { ++ printk(KERN_ERR DRIVER_NAME ++ "Failed registering the character device %d\n", ret); ++ return ret; ++ } ++ } + return ret; +} + @@ -6175,7 +6430,7 @@ index 0000000..799a0ac + if (ret != 0) { + printk(KERN_ERR DRIVER_NAME ": failed to register " + "on platform\n"); -+ } ++ } + + return ret; +} @@ -6193,7 +6448,7 @@ index 0000000..799a0ac +MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:bcm-mbox"); diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig -index 2950082..bbccc7e 100644 +index cd2c88e..edbc5f6 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -358,7 +358,7 @@ config CPU_PJ4B @@ -6206,7 +6461,7 @@ index 2950082..bbccc7e 100644 select CPU_ABRT_EV6 select CPU_CACHE_V6 diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S -index 919405e..ae1cb16 100644 +index 1128064..3706f80 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S @@ -73,10 +73,19 @@ ENDPROC(cpu_v6_reset) @@ -6245,12 +6500,12 @@ index a10297d..c9ddd87 100644 ics_if_voip MACH_ICS_IF_VOIP ICS_IF_VOIP 3206 wlf_cragg_6410 MACH_WLF_CRAGG_6410 WLF_CRAGG_6410 3207 diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig -index 9ab8f8d..74e7543 100644 +index 8a4c066..6794c7d 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig -@@ -249,6 +249,27 @@ config MMC_SDHCI_S3C_DMA +@@ -260,6 +260,27 @@ config MMC_SDHCI_BCM_KONA - YMMV. + If you have a controller with this interface, say Y or M here. +config MMC_SDHCI_BCM2708 + tristate "SDHCI support on BCM2708" @@ -6277,7 +6532,7 @@ index 9ab8f8d..74e7543 100644 tristate "SDHCI platform support for the BCM2835 SD/MMC Controller" depends on ARCH_BCM2835 diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile -index cd32280..6a7b985 100644 +index d422e21..3589f43 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -15,6 +15,7 @@ obj-$(CONFIG_MMC_SDHCI_PXAV2) += sdhci-pxav2.o @@ -6290,10 +6545,10 @@ index cd32280..6a7b985 100644 obj-$(CONFIG_MMC_OMAP) += omap.o diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c new file mode 100644 -index 0000000..e79723d +index 0000000..d8ef77c --- /dev/null +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -0,0 +1,1425 @@ +@@ -0,0 +1,1424 @@ +/* + * sdhci-bcm2708.c Support for SDHCI device on BCM2708 + * Copyright (c) 2010 Broadcom @@ -6525,7 +6780,7 @@ index 0000000..e79723d +#if USE_SPACED_WRITES_2CLK + static bool timeout_disabled = false; + unsigned int ns_2clk = 0; -+ ++ + /* The Arasan has a bugette whereby it may lose the content of + * successive writes to registers that are within two SD-card clock + * cycles of each other (a clock domain crossing problem). @@ -7040,7 +7295,7 @@ index 0000000..e79723d + { unsigned long info, debug; + void __iomem *base; + unsigned long pend0, pend1, pend2; -+ ++ + base = host_priv->dma_chan_base; + cs = readl(base + BCM2708_DMA_CS); + info = readl(base + BCM2708_DMA_INFO); @@ -7053,12 +7308,12 @@ index 0000000..e79723d + pend0 = readl(__io_address(ARM_IRQ_PEND0)); + pend1 = readl(__io_address(ARM_IRQ_PEND1)); + pend2 = readl(__io_address(ARM_IRQ_PEND2)); -+ ++ + printk(KERN_INFO "%s: PEND0=%08lX " + "PEND1=%08lX PEND2=%08lX\n", + mmc_hostname(host->mmc), + pend0, pend1, pend2); -+ ++ + //gintsts = readl(__io_address(GINTSTS)); + //gintmsk = readl(__io_address(GINTMSK)); + //printk(KERN_INFO "%s: USB GINTSTS=%08lX" @@ -7352,7 +7607,7 @@ index 0000000..e79723d + */ +static ssize_t attr_dmawait_store(struct device *_dev, + struct device_attribute *attr, -+ const char *buf, size_t count) ++ const char *buf, size_t count) +{ + struct sdhci_host *host = (struct sdhci_host *)dev_get_drvdata(_dev); + @@ -7360,7 +7615,7 @@ index 0000000..e79723d +#ifdef CONFIG_MMC_SDHCI_BCM2708_DMA + struct sdhci_bcm2708_priv *host_priv = SDHCI_HOST_PRIV(host); + int dma_waits = simple_strtol(buf, NULL, 0); -+ if (dma_waits >= 0 && dma_waits < 32) ++ if (dma_waits >= 0 && dma_waits < 32) + host_priv->dma_waits = dma_waits; + else + printk(KERN_ERR "%s: illegal dma_waits value - %d", @@ -7718,9 +7973,8 @@ index 0000000..e79723d +MODULE_AUTHOR("Broadcom "); +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:"DRIVER_NAME); -+ diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c -index 2ea429c..179e83e 100644 +index a78bd4f..763dbf9 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -28,6 +28,7 @@ @@ -7731,7 +7985,7 @@ index 2ea429c..179e83e 100644 #include #include "sdhci.h" -@@ -315,7 +316,7 @@ static void sdhci_read_block_pio(struct sdhci_host *host) +@@ -327,7 +328,7 @@ static void sdhci_read_block_pio(struct sdhci_host *host) u32 uninitialized_var(scratch); u8 *buf; @@ -7740,7 +7994,7 @@ index 2ea429c..179e83e 100644 blksize = host->data->blksz; chunk = 0; -@@ -360,7 +361,7 @@ static void sdhci_write_block_pio(struct sdhci_host *host) +@@ -372,7 +373,7 @@ static void sdhci_write_block_pio(struct sdhci_host *host) u32 scratch; u8 *buf; @@ -7749,7 +8003,7 @@ index 2ea429c..179e83e 100644 blksize = host->data->blksz; chunk = 0; -@@ -399,19 +400,28 @@ static void sdhci_write_block_pio(struct sdhci_host *host) +@@ -411,19 +412,28 @@ static void sdhci_write_block_pio(struct sdhci_host *host) local_irq_restore(flags); } @@ -7781,7 +8035,7 @@ index 2ea429c..179e83e 100644 /* * Some controllers (JMicron JMB38x) mess up the buffer bits -@@ -422,7 +432,7 @@ static void sdhci_transfer_pio(struct sdhci_host *host) +@@ -434,7 +444,7 @@ static void sdhci_transfer_pio(struct sdhci_host *host) (host->data->blocks == 1)) mask = ~0; @@ -7790,7 +8044,7 @@ index 2ea429c..179e83e 100644 if (host->quirks & SDHCI_QUIRK_PIO_NEEDS_DELAY) udelay(100); -@@ -434,9 +444,11 @@ static void sdhci_transfer_pio(struct sdhci_host *host) +@@ -446,9 +456,11 @@ static void sdhci_transfer_pio(struct sdhci_host *host) host->blocks--; if (host->blocks == 0) break; @@ -7803,7 +8057,7 @@ index 2ea429c..179e83e 100644 } static char *sdhci_kmap_atomic(struct scatterlist *sg, unsigned long *flags) -@@ -709,7 +721,9 @@ static void sdhci_set_transfer_irqs(struct sdhci_host *host) +@@ -721,7 +733,9 @@ static void sdhci_set_transfer_irqs(struct sdhci_host *host) u32 pio_irqs = SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL; u32 dma_irqs = SDHCI_INT_DMA_END | SDHCI_INT_ADMA_ERROR; @@ -7814,7 +8068,7 @@ index 2ea429c..179e83e 100644 sdhci_clear_set_irqs(host, pio_irqs, dma_irqs); else sdhci_clear_set_irqs(host, dma_irqs, pio_irqs); -@@ -741,44 +755,25 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd) +@@ -753,44 +767,25 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd) host->data_early = 0; host->data->bytes_xfered = 0; @@ -7859,7 +8113,7 @@ index 2ea429c..179e83e 100644 - if (host->flags & SDHCI_REQ_USE_DMA) { + if ((host->flags & (SDHCI_REQ_USE_DMA | SDHCI_USE_PLATDMA)) == + (SDHCI_REQ_USE_DMA | SDHCI_USE_PLATDMA)) { -+ ++ + if (! sdhci_platdma_dmaable(host, data)) + host->flags &= ~SDHCI_REQ_USE_DMA; + @@ -7867,17 +8121,17 @@ index 2ea429c..179e83e 100644 int broken, i; struct scatterlist *sg; -@@ -837,7 +832,8 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd) +@@ -849,7 +844,8 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd) */ WARN_ON(1); host->flags &= ~SDHCI_REQ_USE_DMA; - } else { -+ } else ++ } else + if (!(host->flags & SDHCI_USE_PLATDMA)) { WARN_ON(sg_cnt != 1); sdhci_writel(host, sg_dma_address(data->sg), SDHCI_DMA_ADDRESS); -@@ -853,11 +849,13 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd) +@@ -865,11 +861,13 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd) if (host->version >= SDHCI_SPEC_200) { ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL); ctrl &= ~SDHCI_CTRL_DMA_MASK; @@ -7891,7 +8145,7 @@ index 2ea429c..179e83e 100644 sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL); } -@@ -909,7 +907,8 @@ static void sdhci_set_transfer_mode(struct sdhci_host *host, +@@ -921,7 +919,8 @@ static void sdhci_set_transfer_mode(struct sdhci_host *host, if (data->flags & MMC_DATA_READ) mode |= SDHCI_TRNS_READ; @@ -7901,7 +8155,7 @@ index 2ea429c..179e83e 100644 mode |= SDHCI_TRNS_DMA; sdhci_writew(host, mode, SDHCI_TRANSFER_MODE); -@@ -925,13 +924,16 @@ static void sdhci_finish_data(struct sdhci_host *host) +@@ -937,13 +936,16 @@ static void sdhci_finish_data(struct sdhci_host *host) host->data = NULL; if (host->flags & SDHCI_REQ_USE_DMA) { @@ -7922,7 +8176,7 @@ index 2ea429c..179e83e 100644 } /* -@@ -984,6 +986,12 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) +@@ -996,6 +998,12 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) if ((cmd->data != NULL) || (cmd->flags & MMC_RSP_BUSY)) mask |= SDHCI_DATA_INHIBIT; @@ -7935,7 +8189,7 @@ index 2ea429c..179e83e 100644 /* We shouldn't wait for data inihibit for stop commands, even though they might use busy signaling */ if (host->mrq->data && (cmd == host->mrq->data->stop)) -@@ -1001,10 +1009,16 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) +@@ -1013,10 +1021,16 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) timeout--; mdelay(1); } @@ -7952,7 +8206,7 @@ index 2ea429c..179e83e 100644 sdhci_prepare_data(host, cmd); -@@ -1470,7 +1484,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) +@@ -1487,7 +1501,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) else ctrl &= ~SDHCI_CTRL_HISPD; @@ -7961,7 +8215,7 @@ index 2ea429c..179e83e 100644 u16 clk, ctrl_2; /* In case of UHS-I modes, set High Speed Enable */ -@@ -2164,7 +2178,7 @@ static void sdhci_timeout_timer(unsigned long data) +@@ -2183,7 +2197,7 @@ static void sdhci_timeout_timer(unsigned long data) if (host->mrq) { pr_err("%s: Timeout waiting for hardware " @@ -7970,7 +8224,7 @@ index 2ea429c..179e83e 100644 sdhci_dumpregs(host); if (host->data) { -@@ -2209,10 +2223,13 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask) +@@ -2228,10 +2242,13 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask) BUG_ON(intmask == 0); if (!host->cmd) { @@ -7984,7 +8238,7 @@ index 2ea429c..179e83e 100644 return; } -@@ -2282,6 +2299,19 @@ static void sdhci_show_adma_error(struct sdhci_host *host) +@@ -2301,6 +2318,19 @@ static void sdhci_show_adma_error(struct sdhci_host *host) static void sdhci_show_adma_error(struct sdhci_host *host) { } #endif @@ -7997,14 +8251,14 @@ index 2ea429c..179e83e 100644 + * things in the proper order. + */ + host->data_early = 1; -+ } else ++ } else + sdhci_finish_data(host); +} + static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) { u32 command; -@@ -2311,23 +2341,39 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) +@@ -2330,23 +2360,39 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) } } @@ -8048,7 +8302,7 @@ index 2ea429c..179e83e 100644 pr_err("%s: ADMA error\n", mmc_hostname(host->mmc)); sdhci_show_adma_error(host); host->data->error = -EIO; -@@ -2335,11 +2381,18 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) +@@ -2354,11 +2400,18 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) host->ops->adma_workaround(host, intmask); } @@ -8071,7 +8325,7 @@ index 2ea429c..179e83e 100644 /* * We currently don't do anything fancy with DMA -@@ -2368,18 +2421,8 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) +@@ -2387,18 +2440,8 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) sdhci_writel(host, dmanow, SDHCI_DMA_ADDRESS); } @@ -8092,7 +8346,7 @@ index 2ea429c..179e83e 100644 } } -@@ -2435,6 +2478,22 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) +@@ -2454,6 +2497,22 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) tasklet_schedule(&host->card_tasklet); } @@ -8115,7 +8369,7 @@ index 2ea429c..179e83e 100644 if (intmask & SDHCI_INT_CMD_MASK) { sdhci_writel(host, intmask & SDHCI_INT_CMD_MASK, SDHCI_INT_STATUS); -@@ -2449,7 +2508,13 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) +@@ -2468,7 +2527,13 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) intmask &= ~(SDHCI_INT_CMD_MASK | SDHCI_INT_DATA_MASK); @@ -8130,22 +8384,22 @@ index 2ea429c..179e83e 100644 if (intmask & SDHCI_INT_BUS_POWER) { pr_err("%s: Card is consuming too much power!\n", -@@ -2569,7 +2634,8 @@ int sdhci_resume_host(struct sdhci_host *host) +@@ -2588,7 +2653,8 @@ int sdhci_resume_host(struct sdhci_host *host) { int ret; - if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA)) { -+ if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA | ++ if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA | + SDHCI_USE_PLATDMA)) { if (host->ops->enable_dma) host->ops->enable_dma(host); } -@@ -2785,14 +2851,16 @@ int sdhci_add_host(struct sdhci_host *host) +@@ -2820,14 +2886,16 @@ int sdhci_add_host(struct sdhci_host *host) host->flags &= ~SDHCI_USE_ADMA; } - if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA)) { -+ if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA | ++ if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA | + SDHCI_USE_PLATDMA)) { if (host->ops->enable_dma) { if (host->ops->enable_dma(host)) { @@ -8159,7 +8413,7 @@ index 2ea429c..179e83e 100644 } } } -@@ -3080,6 +3148,12 @@ int sdhci_add_host(struct sdhci_host *host) +@@ -3119,6 +3187,12 @@ int sdhci_add_host(struct sdhci_host *host) SDHCI_MAX_CURRENT_MULTIPLIER; } @@ -8172,7 +8426,7 @@ index 2ea429c..179e83e 100644 mmc->ocr_avail = ocr_avail; mmc->ocr_avail_sdio = ocr_avail; if (host->ocr_avail_sdio) -@@ -3210,6 +3284,7 @@ int sdhci_add_host(struct sdhci_host *host) +@@ -3249,6 +3323,7 @@ int sdhci_add_host(struct sdhci_host *host) pr_info("%s: SDHCI controller on %s [%s] using %s\n", mmc_hostname(mmc), host->hw_name, dev_name(mmc_dev(mmc)), @@ -8181,7 +8435,7 @@ index 2ea429c..179e83e 100644 (host->flags & SDHCI_USE_SDMA) ? "DMA" : "PIO"); diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h -index 379e09d..f90574e 100644 +index b037f18..8a02ec8 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -289,6 +289,20 @@ struct sdhci_ops { @@ -8205,7 +8459,7 @@ index 379e09d..f90574e 100644 void (*hw_reset)(struct sdhci_host *host); void (*platform_suspend)(struct sdhci_host *host); void (*platform_resume)(struct sdhci_host *host); -@@ -399,6 +413,29 @@ static inline void *sdhci_priv(struct sdhci_host *host) +@@ -400,6 +414,29 @@ static inline void *sdhci_priv(struct sdhci_host *host) extern void sdhci_enable_irq_wakeups(struct sdhci_host *host); #endif @@ -8231,23 +8485,36 @@ index 379e09d..f90574e 100644 + if (host->ops->pdma_reset) + host->ops->pdma_reset(host, data); +} -+ ++ #ifdef CONFIG_PM_RUNTIME extern int sdhci_runtime_suspend_host(struct sdhci_host *host); extern int sdhci_runtime_resume_host(struct sdhci_host *host); +diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c +index 28b35ad..600c755 100644 +--- a/drivers/tty/serial/amba-pl011.c ++++ b/drivers/tty/serial/amba-pl011.c +@@ -84,7 +84,7 @@ struct vendor_data { + + static unsigned int get_fifosize_arm(struct amba_device *dev) + { +- return amba_rev(dev) < 3 ? 16 : 32; ++ return 16; //TODO: fix: amba_rev(dev) < 3 ? 16 : 32; + } + + static struct vendor_data vendor_arm = { diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h -index b838ffc..f3a39c1 100644 +index e3c6a74..458794c 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h -@@ -128,6 +128,7 @@ struct sdhci_host { +@@ -131,6 +131,7 @@ struct sdhci_host { #define SDHCI_SDIO_IRQ_ENABLED (1<<9) /* SDIO irq enabled */ - #define SDHCI_HS200_NEEDS_TUNING (1<<10) /* HS200 needs tuning */ + #define SDHCI_SDR104_NEEDS_TUNING (1<<10) /* SDR104/HS200 needs tuning */ #define SDHCI_USING_RETUNING_TIMER (1<<11) /* Host is using a retuning timer for the card */ +#define SDHCI_USE_PLATDMA (1<<12) /* Host uses 3rd party DMA */ unsigned int version; /* SDHCI spec. version */ -@@ -142,6 +143,7 @@ struct sdhci_host { +@@ -146,6 +147,7 @@ struct sdhci_host { struct mmc_request *mrq; /* Current request */ struct mmc_command *cmd; /* Current command */ @@ -8256,20 +8523,239 @@ index b838ffc..f3a39c1 100644 unsigned int data_early:1; /* Data finished before cmd */ -- -1.8.1.6 +1.8.4 -From b71856a8387e23943d2e026883aedc0a3440faa2 Mon Sep 17 00:00:00 2001 +From 03372514cc8e531599f131c04b94976899f8a420 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 7 May 2013 22:20:24 +0100 +Subject: [PATCH 02/98] Add quick config. + +This is designed for quick compiling when developing. +No modules are needed and it includes all Pi specific drivers +--- + arch/arm/configs/bcmrpi_quick_defconfig | 197 ++++++++++++++++++++++++++++++++ + 1 file changed, 197 insertions(+) + create mode 100644 arch/arm/configs/bcmrpi_quick_defconfig + +diff --git a/arch/arm/configs/bcmrpi_quick_defconfig b/arch/arm/configs/bcmrpi_quick_defconfig +new file mode 100644 +index 0000000..e5efe75 +--- /dev/null ++++ b/arch/arm/configs/bcmrpi_quick_defconfig +@@ -0,0 +1,197 @@ ++# CONFIG_ARM_PATCH_PHYS_VIRT is not set ++CONFIG_LOCALVERSION="-quick" ++# CONFIG_LOCALVERSION_AUTO is not set ++# CONFIG_SWAP is not set ++CONFIG_SYSVIPC=y ++CONFIG_POSIX_MQUEUE=y ++CONFIG_NO_HZ=y ++CONFIG_HIGH_RES_TIMERS=y ++CONFIG_IKCONFIG=y ++CONFIG_IKCONFIG_PROC=y ++CONFIG_KALLSYMS_ALL=y ++CONFIG_EMBEDDED=y ++CONFIG_PERF_EVENTS=y ++# CONFIG_COMPAT_BRK is not set ++CONFIG_SLAB=y ++CONFIG_MODULES=y ++CONFIG_MODULE_UNLOAD=y ++CONFIG_MODVERSIONS=y ++CONFIG_MODULE_SRCVERSION_ALL=y ++# CONFIG_BLK_DEV_BSG is not set ++CONFIG_ARCH_BCM2708=y ++CONFIG_PREEMPT=y ++CONFIG_AEABI=y ++CONFIG_UACCESS_WITH_MEMCPY=y ++CONFIG_ZBOOT_ROM_TEXT=0x0 ++CONFIG_ZBOOT_ROM_BSS=0x0 ++CONFIG_CMDLINE="dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" ++CONFIG_CPU_FREQ=y ++CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y ++CONFIG_CPU_FREQ_GOV_PERFORMANCE=y ++CONFIG_CPU_FREQ_GOV_USERSPACE=y ++CONFIG_CPU_FREQ_GOV_ONDEMAND=y ++CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y ++CONFIG_CPU_IDLE=y ++CONFIG_VFP=y ++CONFIG_BINFMT_MISC=y ++CONFIG_NET=y ++CONFIG_PACKET=y ++CONFIG_UNIX=y ++CONFIG_INET=y ++CONFIG_IP_MULTICAST=y ++CONFIG_IP_PNP=y ++CONFIG_IP_PNP_DHCP=y ++CONFIG_IP_PNP_RARP=y ++CONFIG_SYN_COOKIES=y ++# CONFIG_INET_XFRM_MODE_TRANSPORT is not set ++# CONFIG_INET_XFRM_MODE_TUNNEL is not set ++# CONFIG_INET_XFRM_MODE_BEET is not set ++# CONFIG_INET_LRO is not set ++# CONFIG_INET_DIAG is not set ++# CONFIG_IPV6 is not set ++# CONFIG_WIRELESS is not set ++CONFIG_DEVTMPFS=y ++CONFIG_DEVTMPFS_MOUNT=y ++CONFIG_BLK_DEV_LOOP=y ++CONFIG_BLK_DEV_RAM=y ++CONFIG_SCSI=y ++# CONFIG_SCSI_PROC_FS is not set ++# CONFIG_SCSI_LOWLEVEL is not set ++CONFIG_NETDEVICES=y ++# CONFIG_NET_VENDOR_BROADCOM is not set ++# CONFIG_NET_VENDOR_CIRRUS is not set ++# CONFIG_NET_VENDOR_FARADAY is not set ++# CONFIG_NET_VENDOR_INTEL is not set ++# CONFIG_NET_VENDOR_MARVELL is not set ++# CONFIG_NET_VENDOR_MICREL is not set ++# CONFIG_NET_VENDOR_NATSEMI is not set ++# CONFIG_NET_VENDOR_SEEQ is not set ++# CONFIG_NET_VENDOR_STMICRO is not set ++# CONFIG_NET_VENDOR_WIZNET is not set ++CONFIG_USB_USBNET=y ++# CONFIG_USB_NET_AX8817X is not set ++# CONFIG_USB_NET_CDCETHER is not set ++# CONFIG_USB_NET_CDC_NCM is not set ++CONFIG_USB_NET_SMSC95XX=y ++# CONFIG_USB_NET_NET1080 is not set ++# CONFIG_USB_NET_CDC_SUBSET is not set ++# CONFIG_USB_NET_ZAURUS is not set ++# CONFIG_WLAN is not set ++# CONFIG_INPUT_MOUSEDEV is not set ++CONFIG_INPUT_EVDEV=y ++# CONFIG_INPUT_KEYBOARD is not set ++# CONFIG_INPUT_MOUSE is not set ++# CONFIG_SERIO is not set ++CONFIG_VT_HW_CONSOLE_BINDING=y ++# CONFIG_LEGACY_PTYS is not set ++# CONFIG_DEVKMEM is not set ++CONFIG_SERIAL_AMBA_PL011=y ++CONFIG_SERIAL_AMBA_PL011_CONSOLE=y ++CONFIG_TTY_PRINTK=y ++CONFIG_HW_RANDOM=y ++CONFIG_HW_RANDOM_BCM2708=y ++CONFIG_RAW_DRIVER=y ++CONFIG_THERMAL=y ++CONFIG_THERMAL_BCM2835=y ++CONFIG_WATCHDOG=y ++CONFIG_BCM2708_WDT=y ++CONFIG_REGULATOR=y ++CONFIG_REGULATOR_DEBUG=y ++CONFIG_REGULATOR_FIXED_VOLTAGE=y ++CONFIG_REGULATOR_VIRTUAL_CONSUMER=y ++CONFIG_REGULATOR_USERSPACE_CONSUMER=y ++CONFIG_FB=y ++CONFIG_FB_BCM2708=y ++CONFIG_FRAMEBUFFER_CONSOLE=y ++CONFIG_LOGO=y ++# CONFIG_LOGO_LINUX_MONO is not set ++# CONFIG_LOGO_LINUX_VGA16 is not set ++CONFIG_SOUND=y ++CONFIG_SND=y ++CONFIG_SND_BCM2835=y ++# CONFIG_SND_USB is not set ++CONFIG_USB=y ++CONFIG_USB_ANNOUNCE_NEW_DEVICES=y ++CONFIG_USB_DWCOTG=y ++CONFIG_MMC=y ++CONFIG_MMC_SDHCI=y ++CONFIG_MMC_SDHCI_PLTFM=y ++CONFIG_MMC_SDHCI_BCM2708=y ++CONFIG_MMC_SDHCI_BCM2708_DMA=y ++CONFIG_NEW_LEDS=y ++CONFIG_LEDS_CLASS=y ++CONFIG_LEDS_TRIGGERS=y ++# CONFIG_IOMMU_SUPPORT is not set ++CONFIG_EXT4_FS=y ++CONFIG_EXT4_FS_POSIX_ACL=y ++CONFIG_EXT4_FS_SECURITY=y ++CONFIG_AUTOFS4_FS=y ++CONFIG_FSCACHE=y ++CONFIG_CACHEFILES=y ++CONFIG_MSDOS_FS=y ++CONFIG_VFAT_FS=y ++CONFIG_FAT_DEFAULT_IOCHARSET="ascii" ++CONFIG_TMPFS=y ++CONFIG_TMPFS_POSIX_ACL=y ++CONFIG_CONFIGFS_FS=y ++# CONFIG_MISC_FILESYSTEMS is not set ++CONFIG_NFS_FS=y ++CONFIG_NFS_V3_ACL=y ++CONFIG_NFS_V4=y ++CONFIG_ROOT_NFS=y ++CONFIG_NFS_FSCACHE=y ++CONFIG_NLS_DEFAULT="utf8" ++CONFIG_NLS_CODEPAGE_437=y ++CONFIG_NLS_CODEPAGE_737=y ++CONFIG_NLS_CODEPAGE_775=y ++CONFIG_NLS_CODEPAGE_850=y ++CONFIG_NLS_CODEPAGE_852=y ++CONFIG_NLS_CODEPAGE_855=y ++CONFIG_NLS_CODEPAGE_857=y ++CONFIG_NLS_CODEPAGE_860=y ++CONFIG_NLS_CODEPAGE_861=y ++CONFIG_NLS_CODEPAGE_862=y ++CONFIG_NLS_CODEPAGE_863=y ++CONFIG_NLS_CODEPAGE_864=y ++CONFIG_NLS_CODEPAGE_865=y ++CONFIG_NLS_CODEPAGE_866=y ++CONFIG_NLS_CODEPAGE_869=y ++CONFIG_NLS_CODEPAGE_936=y ++CONFIG_NLS_CODEPAGE_950=y ++CONFIG_NLS_CODEPAGE_932=y ++CONFIG_NLS_CODEPAGE_949=y ++CONFIG_NLS_CODEPAGE_874=y ++CONFIG_NLS_ISO8859_8=y ++CONFIG_NLS_CODEPAGE_1250=y ++CONFIG_NLS_CODEPAGE_1251=y ++CONFIG_NLS_ASCII=y ++CONFIG_NLS_ISO8859_1=y ++CONFIG_NLS_ISO8859_2=y ++CONFIG_NLS_ISO8859_3=y ++CONFIG_NLS_ISO8859_4=y ++CONFIG_NLS_ISO8859_5=y ++CONFIG_NLS_ISO8859_6=y ++CONFIG_NLS_ISO8859_7=y ++CONFIG_NLS_ISO8859_9=y ++CONFIG_NLS_ISO8859_13=y ++CONFIG_NLS_ISO8859_14=y ++CONFIG_NLS_ISO8859_15=y ++CONFIG_NLS_UTF8=y ++CONFIG_PRINTK_TIME=y ++CONFIG_DEBUG_FS=y ++CONFIG_DETECT_HUNG_TASK=y ++# CONFIG_DEBUG_PREEMPT is not set ++# CONFIG_DEBUG_BUGVERBOSE is not set ++# CONFIG_FTRACE is not set ++CONFIG_KGDB=y ++CONFIG_KGDB_KDB=y ++# CONFIG_ARM_UNWIND is not set ++CONFIG_CRYPTO_CBC=y ++CONFIG_CRYPTO_HMAC=y ++CONFIG_CRYPTO_MD5=y ++CONFIG_CRYPTO_SHA1=y ++CONFIG_CRYPTO_DES=y ++# CONFIG_CRYPTO_ANSI_CPRNG is not set ++# CONFIG_CRYPTO_HW is not set ++CONFIG_CRC_ITU_T=y ++CONFIG_LIBCRC32C=y +-- +1.8.4 + + +From 2572d0c01f72204a5ff7c1b92c84bb4cd5f4f415 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 002/113] Add dwc_otg driver +Subject: [PATCH 03/98] Add dwc_otg driver Signed-off-by: popcornmix --- drivers/usb/Makefile | 1 + drivers/usb/core/generic.c | 1 + drivers/usb/core/message.c | 79 + - drivers/usb/core/otg_whitelist.h | 172 +- + drivers/usb/core/otg_whitelist.h | 160 +- drivers/usb/gadget/file_storage.c | 3676 ++++++++++ drivers/usb/host/Kconfig | 13 + drivers/usb/host/Makefile | 2 + @@ -8279,7 +8765,7 @@ Signed-off-by: popcornmix drivers/usb/host/dwc_common_port/changes.txt | 174 + drivers/usb/host/dwc_common_port/doc/doxygen.cfg | 270 + drivers/usb/host/dwc_common_port/dwc_cc.c | 532 ++ - drivers/usb/host/dwc_common_port/dwc_cc.h | 225 + + drivers/usb/host/dwc_common_port/dwc_cc.h | 224 + drivers/usb/host/dwc_common_port/dwc_common_fbsd.c | 1308 ++++ .../usb/host/dwc_common_port/dwc_common_linux.c | 1421 ++++ drivers/usb/host/dwc_common_port/dwc_common_nbsd.c | 1275 ++++ @@ -8330,7 +8816,7 @@ Signed-off-by: popcornmix drivers/usb/host/dwc_otg/test/dwc_otg_test.pm | 337 + drivers/usb/host/dwc_otg/test/test_mod_param.pl | 133 + drivers/usb/host/dwc_otg/test/test_sysfs.pl | 193 + - 64 files changed, 56447 insertions(+), 49 deletions(-) + 64 files changed, 56440 insertions(+), 43 deletions(-) create mode 100644 drivers/usb/gadget/file_storage.c create mode 100644 drivers/usb/host/dwc_common_port/Makefile create mode 100644 drivers/usb/host/dwc_common_port/Makefile.fbsd @@ -8391,7 +8877,7 @@ Signed-off-by: popcornmix create mode 100644 drivers/usb/host/dwc_otg/test/test_sysfs.pl diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile -index c41feba..0b5c606 100644 +index 238c5d4..dbc71e9 100644 --- a/drivers/usb/Makefile +++ b/drivers/usb/Makefile @@ -23,6 +23,7 @@ obj-$(CONFIG_USB_U132_HCD) += host/ @@ -8401,7 +8887,7 @@ index c41feba..0b5c606 100644 +obj-$(CONFIG_USB_DWCOTG) += host/ obj-$(CONFIG_USB_IMX21_HCD) += host/ obj-$(CONFIG_USB_FSL_MPH_DR_OF) += host/ - + obj-$(CONFIG_USB_FUSBH200_HCD) += host/ diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c index acbfeb0..7d675c8 100644 --- a/drivers/usb/core/generic.c @@ -8415,7 +8901,7 @@ index acbfeb0..7d675c8 100644 return i; } diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c -index 444d30e..3ff77fa 100644 +index e7ee1e4..8723c20 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -1875,6 +1875,85 @@ int usb_set_configuration(struct usb_device *dev, int configuration) @@ -8505,7 +8991,7 @@ index 444d30e..3ff77fa 100644 /* Now that the interfaces are installed, re-enable LPM. */ usb_unlocked_enable_lpm(dev); diff --git a/drivers/usb/core/otg_whitelist.h b/drivers/usb/core/otg_whitelist.h -index e8cdce5..3a0da17 100644 +index e8cdce5..ca0ac47 100644 --- a/drivers/usb/core/otg_whitelist.h +++ b/drivers/usb/core/otg_whitelist.h @@ -19,33 +19,82 @@ @@ -8547,7 +9033,7 @@ index e8cdce5..3a0da17 100644 -{ USB_DEVICE(0x0525, 0xa4a0), }, +//{ USB_DEVICE(0x0525, 0xa4a0), }, #endif -+ + +/* OPT Tester */ +{ USB_DEVICE( 0x1a0a, 0x0101 ), }, /* TEST_SE0_NAK */ +{ USB_DEVICE( 0x1a0a, 0x0102 ), }, /* Test_J */ @@ -8558,9 +9044,9 @@ index e8cdce5..3a0da17 100644 +{ USB_DEVICE( 0x1a0a, 0x0107 ), }, /* SINGLE_STEP_GET_DESCRIPTOR setup */ +{ USB_DEVICE( 0x1a0a, 0x0108 ), }, /* SINGLE_STEP_GET_DESCRIPTOR execute */ + -+/* Sony cameras */ ++/* Sony cameras */ +{ USB_DEVICE_VER(0x054c,0x0010,0x0410, 0x0500), }, -+ ++ +/* Memory Devices */ +//{ USB_DEVICE( 0x0781, 0x5150 ), }, /* SanDisk */ +//{ USB_DEVICE( 0x05DC, 0x0080 ), }, /* Lexar */ @@ -8576,7 +9062,7 @@ index e8cdce5..3a0da17 100644 +/* Speakers */ +//{ USB_DEVICE( 0x0499, 0x3002 ), }, /* YAMAHA YST-MS35D USB Speakers */ +//{ USB_DEVICE( 0x0672, 0x1041 ), }, /* Labtec USB Headset */ - ++ { } /* Terminating entry */ }; @@ -8588,7 +9074,7 @@ index e8cdce5..3a0da17 100644 + le16_to_cpu(dev->descriptor.idProduct)); + if (USB_CLASS_HUB == dev->descriptor.bDeviceClass){ + dev_printk(KERN_CRIT, &dev->dev, "Unsupported Hub Topology\n"); -+ } else { ++ } else { + dev_printk(KERN_CRIT, &dev->dev, "Attached Device is not Supported\n"); + } +} @@ -8604,41 +9090,7 @@ index e8cdce5..3a0da17 100644 - if ((le16_to_cpu(dev->descriptor.idVendor) == 0x1a0a && - le16_to_cpu(dev->descriptor.idProduct) == 0xbadd)) - return 0; -- -- /* NOTE: can't use usb_match_id() since interface caches -- * aren't set up yet. this is cut/paste from that code. -- */ -- for (id = whitelist_table; id->match_flags; id++) { -- if ((id->match_flags & USB_DEVICE_ID_MATCH_VENDOR) && -- id->idVendor != le16_to_cpu(dev->descriptor.idVendor)) -- continue; -- -- if ((id->match_flags & USB_DEVICE_ID_MATCH_PRODUCT) && -- id->idProduct != le16_to_cpu(dev->descriptor.idProduct)) -- continue; -- -- /* No need to test id->bcdDevice_lo != 0, since 0 is never -- greater than any unsigned number. */ -- if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_LO) && -- (id->bcdDevice_lo > le16_to_cpu(dev->descriptor.bcdDevice))) -- continue; -- -- if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_HI) && -- (id->bcdDevice_hi < le16_to_cpu(dev->descriptor.bcdDevice))) -- continue; -- -- if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_CLASS) && -- (id->bDeviceClass != dev->descriptor.bDeviceClass)) -- continue; -- -- if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_SUBCLASS) && -- (id->bDeviceSubClass != dev->descriptor.bDeviceSubClass)) -- continue; -- -- if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_PROTOCOL) && -- (id->bDeviceProtocol != dev->descriptor.bDeviceProtocol)) -- continue; -+ if (dev->descriptor.idVendor == 0x1a0a && ++ if (dev->descriptor.idVendor == 0x1a0a && + dev->descriptor.idProduct == 0xbadd) { + return 0; + } else if (!enable_whitelist) { @@ -8654,47 +9106,75 @@ index e8cdce5..3a0da17 100644 + dev->descriptor.bDeviceProtocol); +#endif - return 1; +- /* NOTE: can't use usb_match_id() since interface caches +- * aren't set up yet. this is cut/paste from that code. +- */ +- for (id = whitelist_table; id->match_flags; id++) { +- if ((id->match_flags & USB_DEVICE_ID_MATCH_VENDOR) && +- id->idVendor != le16_to_cpu(dev->descriptor.idVendor)) +- continue; ++ return 1; + /* NOTE: can't use usb_match_id() since interface caches + * aren't set up yet. this is cut/paste from that code. + */ + for (id = whitelist_table; id->match_flags; id++) { +#ifdef DEBUG -+ dev_dbg(&dev->dev, ++ dev_dbg(&dev->dev, + "ID: V:%04x P:%04x DC:%04x SC:%04x PR:%04x \n", + id->idVendor, + id->idProduct, + id->bDeviceClass, + id->bDeviceSubClass, + id->bDeviceProtocol); -+#endif -+ ++#endif + +- if ((id->match_flags & USB_DEVICE_ID_MATCH_PRODUCT) && +- id->idProduct != le16_to_cpu(dev->descriptor.idProduct)) +- continue; + if ((id->match_flags & USB_DEVICE_ID_MATCH_VENDOR) && + id->idVendor != le16_to_cpu(dev->descriptor.idVendor)) + continue; -+ + +- /* No need to test id->bcdDevice_lo != 0, since 0 is never +- greater than any unsigned number. */ +- if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_LO) && +- (id->bcdDevice_lo > le16_to_cpu(dev->descriptor.bcdDevice))) +- continue; + if ((id->match_flags & USB_DEVICE_ID_MATCH_PRODUCT) && + id->idProduct != le16_to_cpu(dev->descriptor.idProduct)) + continue; -+ + +- if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_HI) && +- (id->bcdDevice_hi < le16_to_cpu(dev->descriptor.bcdDevice))) +- continue; + /* No need to test id->bcdDevice_lo != 0, since 0 is never + greater than any unsigned number. */ + if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_LO) && + (id->bcdDevice_lo > le16_to_cpu(dev->descriptor.bcdDevice))) + continue; -+ + +- if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_CLASS) && +- (id->bDeviceClass != dev->descriptor.bDeviceClass)) +- continue; + if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_HI) && + (id->bcdDevice_hi < le16_to_cpu(dev->descriptor.bcdDevice))) + continue; -+ + +- if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_SUBCLASS) && +- (id->bDeviceSubClass != dev->descriptor.bDeviceSubClass)) +- continue; + if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_CLASS) && + (id->bDeviceClass != dev->descriptor.bDeviceClass)) + continue; -+ + +- if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_PROTOCOL) && +- (id->bDeviceProtocol != dev->descriptor.bDeviceProtocol)) +- continue; + if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_SUBCLASS) && + (id->bDeviceSubClass != dev->descriptor.bDeviceSubClass)) + continue; -+ + +- return 1; + if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_PROTOCOL) && + (id->bDeviceProtocol != dev->descriptor.bDeviceProtocol)) + continue; @@ -12407,10 +12887,10 @@ index 0000000..a896d73 +} +module_exit(fsg_cleanup); diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig -index 344d5e2..0937bde 100644 +index 4263d01..da71b93 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig -@@ -663,6 +663,19 @@ config USB_HWA_HCD +@@ -671,6 +671,19 @@ config USB_HWA_HCD To compile this driver a module, choose M here: the module will be called "hwa-hc". @@ -12431,10 +12911,10 @@ index 344d5e2..0937bde 100644 tristate "i.MX21 HCD support" depends on ARM && ARCH_MXC diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile -index 4fb73c1..76d97de 100644 +index bea7112..268b9c1 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile -@@ -47,6 +47,8 @@ obj-$(CONFIG_USB_U132_HCD) += u132-hcd.o +@@ -52,6 +52,8 @@ obj-$(CONFIG_USB_U132_HCD) += u132-hcd.o obj-$(CONFIG_USB_R8A66597_HCD) += r8a66597-hcd.o obj-$(CONFIG_USB_ISP1760_HCD) += isp1760.o obj-$(CONFIG_USB_HWA_HCD) += hwa-hc.o @@ -12445,7 +12925,7 @@ index 4fb73c1..76d97de 100644 obj-$(CONFIG_USB_OCTEON2_COMMON) += octeon2-common.o diff --git a/drivers/usb/host/dwc_common_port/Makefile b/drivers/usb/host/dwc_common_port/Makefile new file mode 100644 -index 0000000..63e3485 +index 0000000..b2136bc0 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/Makefile @@ -0,0 +1,58 @@ @@ -12473,7 +12953,7 @@ index 0000000..63e3485 + +kernrelwd := $(subst ., ,$(KERNELRELEASE)) +kernrel3 := $(word 1,$(kernrelwd)).$(word 2,$(kernrelwd)).$(word 3,$(kernrelwd)) -+ ++ +ifneq ($(kernrel3),2.6.20) +# grayg - I only know that we use EXTRA_CFLAGS in 2.6.31 actually +EXTRA_CFLAGS += $(CPPFLAGS) @@ -12767,7 +13247,7 @@ index 0000000..f6839f9 +library code directly into a driver module, instead of as a standalone module. diff --git a/drivers/usb/host/dwc_common_port/doc/doxygen.cfg b/drivers/usb/host/dwc_common_port/doc/doxygen.cfg new file mode 100644 -index 0000000..605b9dab +index 0000000..89aa887 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/doc/doxygen.cfg @@ -0,0 +1,270 @@ @@ -12777,7 +13257,7 @@ index 0000000..605b9dab +# Project related configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = "Synopsys DWC Portability and Common Library for UWB" -+PROJECT_NUMBER = ++PROJECT_NUMBER = +OUTPUT_DIRECTORY = doc +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English @@ -12798,7 +13278,7 @@ index 0000000..605b9dab +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = NO +STRIP_FROM_PATH = .. -+STRIP_FROM_INC_PATH = ++STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = YES +MULTILINE_CPP_IS_BRIEF = NO @@ -12806,7 +13286,7 @@ index 0000000..605b9dab +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 8 -+ALIASES = ++ALIASES = +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = NO +BUILTIN_STL_SUPPORT = NO @@ -12836,11 +13316,11 @@ index 0000000..605b9dab +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES -+ENABLED_SECTIONS = ++ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = YES -+FILE_VERSION_FILTER = ++FILE_VERSION_FILTER = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- @@ -12850,7 +13330,7 @@ index 0000000..605b9dab +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = YES +WARN_FORMAT = "$file:$line: $text" -+WARN_LOGFILE = ++WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- @@ -12897,15 +13377,15 @@ index 0000000..605b9dab + *.MM \ + *.PY +RECURSIVE = NO -+EXCLUDE = ++EXCLUDE = +EXCLUDE_SYMLINKS = NO -+EXCLUDE_PATTERNS = -+EXAMPLE_PATH = ++EXCLUDE_PATTERNS = ++EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO -+IMAGE_PATH = -+INPUT_FILTER = -+FILTER_PATTERNS = ++IMAGE_PATH = ++INPUT_FILTER = ++FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing @@ -12922,20 +13402,20 @@ index 0000000..605b9dab +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = NO +COLS_IN_ALPHA_INDEX = 5 -+IGNORE_PREFIX = ++IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html -+HTML_HEADER = -+HTML_FOOTER = -+HTML_STYLESHEET = ++HTML_HEADER = ++HTML_FOOTER = ++HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO -+CHM_FILE = -+HHC_LOCATION = ++CHM_FILE = ++HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO @@ -12952,8 +13432,8 @@ index 0000000..605b9dab +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide -+EXTRA_PACKAGES = -+LATEX_HEADER = ++EXTRA_PACKAGES = ++LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO @@ -12965,8 +13445,8 @@ index 0000000..605b9dab +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO -+RTF_STYLESHEET_FILE = -+RTF_EXTENSIONS_FILE = ++RTF_STYLESHEET_FILE = ++RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- @@ -12979,8 +13459,8 @@ index 0000000..605b9dab +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml -+XML_SCHEMA = -+XML_DTD = ++XML_SCHEMA = ++XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output @@ -12992,29 +13472,29 @@ index 0000000..605b9dab +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES -+PERLMOD_MAKEVAR_PREFIX = ++PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- -+# Configuration options related to the preprocessor ++# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES -+INCLUDE_PATH = -+INCLUDE_FILE_PATTERNS = ++INCLUDE_PATH = ++INCLUDE_FILE_PATTERNS = +PREDEFINED = DEBUG DEBUG_MEMORY -+EXPAND_AS_DEFINED = ++EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- -+# Configuration::additions related to external references ++# Configuration::additions related to external references +#--------------------------------------------------------------------------- -+TAGFILES = -+GENERATE_TAGFILE = ++TAGFILES = ++GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- -+# Configuration options related to the dot tool ++# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +HIDE_UNDOC_RELATIONS = YES @@ -13030,20 +13510,20 @@ index 0000000..605b9dab +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png -+DOT_PATH = -+DOTFILE_DIRS = ++DOT_PATH = ++DOTFILE_DIRS = +MAX_DOT_GRAPH_DEPTH = 1000 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- -+# Configuration::additions related to the search engine ++# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO diff --git a/drivers/usb/host/dwc_common_port/dwc_cc.c b/drivers/usb/host/dwc_common_port/dwc_cc.c new file mode 100644 -index 0000000..613c901 +index 0000000..5ec2ae2 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_cc.c @@ -0,0 +1,532 @@ @@ -13269,7 +13749,7 @@ index 0000000..613c901 + } +} + -+dwc_cc_if_t *dwc_cc_if_alloc(void *mem_ctx, void *mtx_ctx, ++dwc_cc_if_t *dwc_cc_if_alloc(void *mem_ctx, void *mtx_ctx, + dwc_notifier_t *notifier, unsigned is_host) +{ + dwc_cc_if_t *cc_if = NULL; @@ -13581,10 +14061,10 @@ index 0000000..613c901 +#endif /* DWC_CCLIB */ diff --git a/drivers/usb/host/dwc_common_port/dwc_cc.h b/drivers/usb/host/dwc_common_port/dwc_cc.h new file mode 100644 -index 0000000..6b2bbaf +index 0000000..f86e6f2 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_cc.h -@@ -0,0 +1,225 @@ +@@ -0,0 +1,224 @@ +/* ========================================================================= + * $File: //dwh/usb_iip/dev/software/dwc_common_port_2/dwc_cc.h $ + * $Revision: #4 $ @@ -13771,7 +14251,7 @@ index 0000000..6b2bbaf +extern uint8_t *dwc_cc_name(dwc_cc_if_t *cc_if, int32_t id, uint8_t *length); + +/** Checks a buffer for non-zero. -+ * @param id A pointer to a 16 byte buffer. ++ * @param id A pointer to a 16 byte buffer. + * @return true if the 16 byte value is non-zero. */ +static inline unsigned dwc_assoc_is_not_zero_id(uint8_t *id) { + int i; @@ -13782,7 +14262,7 @@ index 0000000..6b2bbaf +} + +/** Checks a buffer for zero. -+ * @param id A pointer to a 16 byte buffer. ++ * @param id A pointer to a 16 byte buffer. + * @return true if the 16 byte value is zero. */ +static inline unsigned dwc_assoc_is_zero_id(uint8_t *id) { + return !dwc_assoc_is_not_zero_id(id); @@ -13809,7 +14289,6 @@ index 0000000..6b2bbaf +#endif + +#endif /* _DWC_CC_H_ */ -+ diff --git a/drivers/usb/host/dwc_common_port/dwc_common_fbsd.c b/drivers/usb/host/dwc_common_port/dwc_common_fbsd.c new file mode 100644 index 0000000..6dd04b5 @@ -15126,7 +15605,7 @@ index 0000000..6dd04b5 +} diff --git a/drivers/usb/host/dwc_common_port/dwc_common_linux.c b/drivers/usb/host/dwc_common_port/dwc_common_linux.c new file mode 100644 -index 0000000..f00a9ff +index 0000000..440bcfc --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_common_linux.c @@ -0,0 +1,1421 @@ @@ -16428,7 +16907,7 @@ index 0000000..f00a9ff +EXPORT_SYMBOL(__DWC_DEBUG); +#endif + -+EXPORT_SYMBOL(__DWC_DMA_ALLOC); ++EXPORT_SYMBOL(__DWC_DMA_ALLOC); +EXPORT_SYMBOL(__DWC_DMA_ALLOC_ATOMIC); +EXPORT_SYMBOL(__DWC_DMA_FREE); +EXPORT_SYMBOL(__DWC_ALLOC); @@ -18265,7 +18744,7 @@ index 0000000..26fcddc +#endif /* _DWC_CRYPTO_H_ */ diff --git a/drivers/usb/host/dwc_common_port/dwc_dh.c b/drivers/usb/host/dwc_common_port/dwc_dh.c new file mode 100644 -index 0000000..997f753 +index 0000000..2b429a3 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_dh.c @@ -0,0 +1,291 @@ @@ -18426,8 +18905,8 @@ index 0000000..997f753 + DWC_MEMCPY(&m3[0], pk, 384); + DWC_SHA256(m3, 385, hash); + -+ dh_dump("PK", pk, 384); -+ dh_dump("SHA-256(M3)", hash, 32); ++ dh_dump("PK", pk, 384); ++ dh_dump("SHA-256(M3)", hash, 32); + return 0; +} + @@ -18496,12 +18975,12 @@ index 0000000..997f753 + + message = "connection key"; + DWC_HMAC_SHA256(message, DWC_STRLEN(message), dhkey, 32, sha_result); -+ dh_dump("HMAC(SHA-256, DHKey, connection key)", sha_result, 32); ++ dh_dump("HMAC(SHA-256, DHKey, connection key)", sha_result, 32); + DWC_MEMCPY(ck, sha_result, 16); + + message = "key derivation key"; + DWC_HMAC_SHA256(message, DWC_STRLEN(message), dhkey, 32, sha_result); -+ dh_dump("HMAC(SHA-256, DHKey, key derivation key)", sha_result, 32); ++ dh_dump("HMAC(SHA-256, DHKey, key derivation key)", sha_result, 32); + DWC_MEMCPY(kdk, sha_result, 32); + + return 0; @@ -19525,7 +20004,7 @@ index 0000000..ad645ff +#endif /* DWC_DEBUG_MEMORY */ diff --git a/drivers/usb/host/dwc_common_port/dwc_modpow.c b/drivers/usb/host/dwc_common_port/dwc_modpow.c new file mode 100644 -index 0000000..b7c456b +index 0000000..2004538 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_modpow.c @@ -0,0 +1,636 @@ @@ -19610,8 +20089,8 @@ index 0000000..b7c456b +} while (0) +#endif + -+// q = n / w; -+// r = n % w; ++// q = n / w; ++// r = n % w; + +#define BIGNUM_INT_BYTES (BIGNUM_INT_BITS / 8) + @@ -19723,7 +20202,7 @@ index 0000000..b7c456b + if (h >= m0) { + /* + * Special case. -+ * ++ * + * To illustrate it, suppose a BignumInt is 8 bits, and + * we are dividing (say) A1:23:45:67 by A1:B2:C3. Then + * our initial division will be 0xA123 / 0xA1, which @@ -19732,7 +20211,7 @@ index 0000000..b7c456b + * are not violated, since the full number A1:23:... is + * _less_ than the quotient prefix A1:B2:... and so the + * following correction loop would have sorted it out. -+ * ++ * + * In this situation we set q to be the largest + * quotient we _can_ stomach (0xFF, of course). + */ @@ -20125,7 +20604,7 @@ index 0000000..b7c456b + 0x6fa452cd, + 0x2df89d30, + 0xc75f1b0f, -+ 0x8ce3578f, ++ 0x8ce3578f, + 0x7980a324, + 0x5daec786, +}; @@ -20660,7 +21139,7 @@ index 0000000..4a8cdfe +#endif /* __DWC_NOTIFIER_H__ */ diff --git a/drivers/usb/host/dwc_common_port/dwc_os.h b/drivers/usb/host/dwc_common_port/dwc_os.h new file mode 100644 -index 0000000..308ddd5 +index 0000000..9ffe929 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_os.h @@ -0,0 +1,1260 @@ @@ -20915,7 +21394,7 @@ index 0000000..308ddd5 +#ifndef DWC_OTG_DEBUG_LEV +#define DWC_OTG_DEBUG_LEV 0 +#endif -+ ++ +#ifdef DEBUG +/** + * Prints out a debug message. Used for logging/trace messages. @@ -21358,7 +21837,7 @@ index 0000000..308ddd5 +extern void dwc_free_debug(void *mem_ctx, void *addr, char const *func, int line); +extern void *dwc_dma_alloc_debug(void *dma_ctx, uint32_t size, dwc_dma_t *dma_addr, + char const *func, int line); -+extern void *dwc_dma_alloc_atomic_debug(void *dma_ctx, uint32_t size, dwc_dma_t *dma_addr, ++extern void *dwc_dma_alloc_atomic_debug(void *dma_ctx, uint32_t size, dwc_dma_t *dma_addr, + char const *func, int line); +extern void dwc_dma_free_debug(void *dma_ctx, uint32_t size, void *virt_addr, + dwc_dma_t dma_addr, char const *func, int line); @@ -22878,7 +23357,7 @@ index 0000000..27bda82 +#endif /* _USB_H_ */ diff --git a/drivers/usb/host/dwc_otg/Makefile b/drivers/usb/host/dwc_otg/Makefile new file mode 100644 -index 0000000..c4c6e4e +index 0000000..5748f7d --- /dev/null +++ b/drivers/usb/host/dwc_otg/Makefile @@ -0,0 +1,80 @@ @@ -22888,7 +23367,7 @@ index 0000000..c4c6e4e + +ifneq ($(KERNELRELEASE),) + -+# Use the BUS_INTERFACE variable to compile the software for either ++# Use the BUS_INTERFACE variable to compile the software for either +# PCI(PCI_INTERFACE) or LM(LM_INTERFACE) bus. +ifeq ($(BUS_INTERFACE),) +# BUS_INTERFACE = -DPCI_INTERFACE @@ -22915,9 +23394,9 @@ index 0000000..c4c6e4e + +obj-$(CONFIG_USB_DWCOTG) += dwc_otg.o + -+dwc_otg-objs := dwc_otg_driver.o dwc_otg_attr.o -+dwc_otg-objs += dwc_otg_cil.o dwc_otg_cil_intr.o -+dwc_otg-objs += dwc_otg_pcd_linux.o dwc_otg_pcd.o dwc_otg_pcd_intr.o ++dwc_otg-objs := dwc_otg_driver.o dwc_otg_attr.o ++dwc_otg-objs += dwc_otg_cil.o dwc_otg_cil_intr.o ++dwc_otg-objs += dwc_otg_pcd_linux.o dwc_otg_pcd.o dwc_otg_pcd_intr.o +dwc_otg-objs += dwc_otg_hcd.o dwc_otg_hcd_linux.o dwc_otg_hcd_intr.o dwc_otg_hcd_queue.o dwc_otg_hcd_ddma.o +dwc_otg-objs += dwc_otg_adp.o +ifneq ($(CFI),) @@ -22945,7 +23424,7 @@ index 0000000..c4c6e4e + +install: default + $(MAKE) -C$(KDIR) M=$(PORTLIB) modules_install -+ $(MAKE) -C$(KDIR) M=$(PWD) modules_install ++ $(MAKE) -C$(KDIR) M=$(PWD) modules_install + +portlib: + $(MAKE) -C$(KDIR) M=$(PORTLIB) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) modules @@ -22964,7 +23443,7 @@ index 0000000..c4c6e4e +endif diff --git a/drivers/usb/host/dwc_otg/doc/doxygen.cfg b/drivers/usb/host/dwc_otg/doc/doxygen.cfg new file mode 100644 -index 0000000..537c676 +index 0000000..712b057 --- /dev/null +++ b/drivers/usb/host/dwc_otg/doc/doxygen.cfg @@ -0,0 +1,224 @@ @@ -22994,15 +23473,15 @@ index 0000000..537c676 +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = NO -+STRIP_FROM_PATH = -+STRIP_FROM_INC_PATH = ++STRIP_FROM_PATH = ++STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = YES +MULTILINE_CPP_IS_BRIEF = NO +INHERIT_DOCS = YES +DISTRIBUTE_GROUP_DOC = NO +TAB_SIZE = 8 -+ALIASES = ++ALIASES = +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = NO +SUBGROUPING = YES @@ -23030,7 +23509,7 @@ index 0000000..537c676 +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES -+ENABLED_SECTIONS = ++ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = YES @@ -23042,7 +23521,7 @@ index 0000000..537c676 +WARN_IF_UNDOCUMENTED = NO +WARN_IF_DOC_ERROR = YES +WARN_FORMAT = "$file:$line: $text" -+WARN_LOGFILE = ++WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- @@ -23056,12 +23535,12 @@ index 0000000..537c676 + ./dwc_otg/.AppleDouble/ +EXCLUDE_SYMLINKS = YES +EXCLUDE_PATTERNS = *.mod.* -+EXAMPLE_PATH = ++EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO -+IMAGE_PATH = -+INPUT_FILTER = -+FILTER_PATTERNS = ++IMAGE_PATH = ++INPUT_FILTER = ++FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing @@ -23077,20 +23556,20 @@ index 0000000..537c676 +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = NO +COLS_IN_ALPHA_INDEX = 5 -+IGNORE_PREFIX = ++IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html -+HTML_HEADER = -+HTML_FOOTER = -+HTML_STYLESHEET = ++HTML_HEADER = ++HTML_FOOTER = ++HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO -+CHM_FILE = -+HHC_LOCATION = ++CHM_FILE = ++HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO @@ -23107,8 +23586,8 @@ index 0000000..537c676 +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide -+EXTRA_PACKAGES = -+LATEX_HEADER = ++EXTRA_PACKAGES = ++LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO @@ -23120,8 +23599,8 @@ index 0000000..537c676 +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO -+RTF_STYLESHEET_FILE = -+RTF_EXTENSIONS_FILE = ++RTF_STYLESHEET_FILE = ++RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- @@ -23134,8 +23613,8 @@ index 0000000..537c676 +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml -+XML_SCHEMA = -+XML_DTD = ++XML_SCHEMA = ++XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output @@ -23147,29 +23626,29 @@ index 0000000..537c676 +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES -+PERLMOD_MAKEVAR_PREFIX = ++PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- -+# Configuration options related to the preprocessor ++# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = YES +EXPAND_ONLY_PREDEF = YES +SEARCH_INCLUDES = YES -+INCLUDE_PATH = -+INCLUDE_FILE_PATTERNS = ++INCLUDE_PATH = ++INCLUDE_FILE_PATTERNS = +PREDEFINED = DEVICE_ATTR DWC_EN_ISOC +EXPAND_AS_DEFINED = DWC_OTG_DEVICE_ATTR_BITFIELD_SHOW DWC_OTG_DEVICE_ATTR_BITFIELD_STORE DWC_OTG_DEVICE_ATTR_BITFIELD_RW DWC_OTG_DEVICE_ATTR_BITFIELD_RO DWC_OTG_DEVICE_ATTR_REG_SHOW DWC_OTG_DEVICE_ATTR_REG_STORE DWC_OTG_DEVICE_ATTR_REG32_RW DWC_OTG_DEVICE_ATTR_REG32_RO DWC_EN_ISOC +SKIP_FUNCTION_MACROS = NO +#--------------------------------------------------------------------------- -+# Configuration::additions related to external references ++# Configuration::additions related to external references +#--------------------------------------------------------------------------- -+TAGFILES = -+GENERATE_TAGFILE = ++TAGFILES = ++GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- -+# Configuration options related to the dot tool ++# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +HIDE_UNDOC_RELATIONS = YES @@ -23183,18 +23662,18 @@ index 0000000..537c676 +CALL_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DOT_IMAGE_FORMAT = png -+DOT_PATH = -+DOTFILE_DIRS = ++DOT_PATH = ++DOTFILE_DIRS = +MAX_DOT_GRAPH_DEPTH = 1000 +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- -+# Configuration::additions related to the search engine ++# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO diff --git a/drivers/usb/host/dwc_otg/dummy_audio.c b/drivers/usb/host/dwc_otg/dummy_audio.c new file mode 100644 -index 0000000..530ac8b +index 0000000..225decf --- /dev/null +++ b/drivers/usb/host/dwc_otg/dummy_audio.c @@ -0,0 +1,1575 @@ @@ -23362,7 +23841,7 @@ index 0000000..530ac8b + + +/** -+ * usb_gadget_get_string - fill out a string descriptor ++ * usb_gadget_get_string - fill out a string descriptor + * @table: of c strings encoded using UTF-8 + * @id: string id, from low byte of wValue in get string descriptor + * @buf: at least 256 bytes @@ -23484,7 +23963,7 @@ index 0000000..530ac8b + /* config descriptor first */ + if (length < USB_DT_CONFIG_SIZE || !desc) + return -EINVAL; -+ *cp = *config; ++ *cp = *config; + + /* then interface/endpoint/class/vendor/... */ + len = usb_descriptor_fillbuf(USB_DT_CONFIG_SIZE + (u8*)buf, @@ -23796,7 +24275,7 @@ index 0000000..530ac8b +z_audio_cs_as_if_desc = { + .bLength = 7, + .bDescriptorType = 0x24, -+ ++ + .bDescriptorSubType = 0x01, + .bTerminalLink = 0x01, + .bDelay = 0x0, @@ -23804,11 +24283,11 @@ index 0000000..530ac8b +}; + + -+static const struct usb_cs_as_format_descriptor ++static const struct usb_cs_as_format_descriptor +z_audio_cs_as_format_desc = { + .bLength = 0xe, + .bDescriptorType = 0x24, -+ ++ + .bDescriptorSubType = 2, + .bFormatType = 1, + .bNrChannels = 1, @@ -23819,7 +24298,7 @@ index 0000000..530ac8b + .tUpperSamFreq = {0xe2, 0xd6, 0x00}, +}; + -+static const struct usb_endpoint_descriptor ++static const struct usb_endpoint_descriptor +z_iso_ep = { + .bLength = 0x09, + .bDescriptorType = 0x05, @@ -23828,31 +24307,31 @@ index 0000000..530ac8b + .wMaxPacketSize = 0x0038, + .bInterval = 0x01, + .bRefresh = 0x00, -+ .bSynchAddress = 0x00, ++ .bSynchAddress = 0x00, +}; + +static char z_iso_ep2[] = {0x07, 0x25, 0x01, 0x00, 0x02, 0x00, 0x02}; + +// 9 bytes -+static char z_ac_interface_header_desc[] = ++static char z_ac_interface_header_desc[] = +{ 0x09, 0x24, 0x01, 0x00, 0x01, 0x2b, 0x00, 0x01, 0x01 }; + +// 12 bytes -+static char z_0[] = {0x0c, 0x24, 0x02, 0x01, 0x01, 0x01, 0x00, 0x02, ++static char z_0[] = {0x0c, 0x24, 0x02, 0x01, 0x01, 0x01, 0x00, 0x02, + 0x03, 0x00, 0x00, 0x00}; +// 13 bytes -+static char z_1[] = {0x0d, 0x24, 0x06, 0x02, 0x01, 0x02, 0x15, 0x00, ++static char z_1[] = {0x0d, 0x24, 0x06, 0x02, 0x01, 0x02, 0x15, 0x00, + 0x02, 0x00, 0x02, 0x00, 0x00}; +// 9 bytes -+static char z_2[] = {0x09, 0x24, 0x03, 0x03, 0x01, 0x03, 0x00, 0x02, ++static char z_2[] = {0x09, 0x24, 0x03, 0x03, 0x01, 0x03, 0x00, 0x02, + 0x00}; + -+static char za_0[] = {0x09, 0x04, 0x01, 0x02, 0x01, 0x01, 0x02, 0x00, ++static char za_0[] = {0x09, 0x04, 0x01, 0x02, 0x01, 0x01, 0x02, 0x00, + 0x00}; + +static char za_1[] = {0x07, 0x24, 0x01, 0x01, 0x00, 0x01, 0x00}; + -+static char za_2[] = {0x0e, 0x24, 0x02, 0x01, 0x02, 0x01, 0x08, 0x00, ++static char za_2[] = {0x0e, 0x24, 0x02, 0x01, 0x02, 0x01, 0x08, 0x00, + 0x7e, 0x13, 0x00, 0xe2, 0xd6, 0x00}; + +static char za_3[] = {0x09, 0x05, 0x04, 0x09, 0x70, 0x00, 0x01, 0x00, @@ -23886,12 +24365,12 @@ index 0000000..530ac8b + +static char za_14[] = {0x07, 0x25, 0x01, 0x00, 0x02, 0x00, 0x02}; + -+static char za_15[] = {0x09, 0x04, 0x01, 0x05, 0x01, 0x01, 0x02, 0x00, ++static char za_15[] = {0x09, 0x04, 0x01, 0x05, 0x01, 0x01, 0x02, 0x00, + 0x00}; + +static char za_16[] = {0x07, 0x24, 0x01, 0x01, 0x00, 0x01, 0x00}; + -+static char za_17[] = {0x0e, 0x24, 0x02, 0x01, 0x01, 0x03, 0x14, 0x00, ++static char za_17[] = {0x0e, 0x24, 0x02, 0x01, 0x01, 0x03, 0x14, 0x00, + 0x7e, 0x13, 0x00, 0xe2, 0xd6, 0x00}; + +static char za_18[] = {0x09, 0x05, 0x04, 0x09, 0xa8, 0x00, 0x01, 0x00, @@ -23904,7 +24383,7 @@ index 0000000..530ac8b + +static char za_21[] = {0x07, 0x24, 0x01, 0x01, 0x00, 0x01, 0x00}; + -+static char za_22[] = {0x0e, 0x24, 0x02, 0x01, 0x02, 0x03, 0x14, 0x00, ++static char za_22[] = {0x0e, 0x24, 0x02, 0x01, 0x02, 0x03, 0x14, 0x00, + 0x7e, 0x13, 0x00, 0xe2, 0xd6, 0x00}; + +static char za_23[] = {0x09, 0x05, 0x04, 0x09, 0x50, 0x01, 0x01, 0x00, @@ -24006,7 +24485,7 @@ index 0000000..530ac8b +{ + int len; + const struct usb_descriptor_header **function; -+ ++ + function = z_function; + len = usb_gadget_config_buf (&z_config, buf, USB_BUFSIZ, function); + if (len < 0) @@ -24106,7 +24585,7 @@ index 0000000..530ac8b + +#define _write(f, buf, sz) (f->f_op->write(f, buf, sz, &f->f_pos)) + -+static void ++static void +zero_isoc_complete (struct usb_ep *ep, struct usb_request *req) +{ + struct zero_dev *dev = ep->driver_data; @@ -24453,7 +24932,7 @@ index 0000000..530ac8b + case 0x0300: + ((u8*)req->buf)[0] = 0x60; + break; -+ case 0x0500: ++ case 0x0500: + ((u8*)req->buf)[0] = 0x18; + break; + } @@ -24483,7 +24962,7 @@ index 0000000..530ac8b + value = ctrl->wLength; + break; + -+ ++ + default: +unknown: + printk("unknown control req%02x.%02x v%04x i%04x l%d\n", @@ -24721,7 +25200,7 @@ index 0000000..530ac8b + page[i] = rbuf[(c+s) % RBUF_LEN]; + } + *start = page; -+ ++ + if (c >= rbuf_len) { + *eof = 1; + done = 1; @@ -24768,14 +25247,14 @@ index 0000000..530ac8b +{ + + usb_gadget_unregister_driver (&zero_driver); -+ ++ + remove_proc_entry("isoc_data", pdir); + remove_proc_entry("isoc_test", NULL); +} +module_exit (cleanup); diff --git a/drivers/usb/host/dwc_otg/dwc_cfi_common.h b/drivers/usb/host/dwc_otg/dwc_cfi_common.h new file mode 100644 -index 0000000..be56af4 +index 0000000..7770e20 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_cfi_common.h @@ -0,0 +1,142 @@ @@ -24783,7 +25262,7 @@ index 0000000..be56af4 + * Synopsys HS OTG Linux Software Driver and documentation (hereinafter, + * "Software") is an Unsupported proprietary work of Synopsys, Inc. unless + * otherwise expressly agreed to in writing between Synopsys and you. -+ * ++ * + * The Software IS NOT an item of Licensed Software or Licensed Product under + * any End User Software License Agreement or Agreement for Licensed Product + * with Synopsys or any supplement thereto. You are permitted to use and @@ -24793,7 +25272,7 @@ index 0000000..be56af4 + * any information contained herein except pursuant to this license grant from + * Synopsys. If you do not agree with this notice, including the disclaimer + * below, then you are not authorized to use the Software. -+ * ++ * + * THIS SOFTWARE IS BEING DISTRIBUTED BY SYNOPSYS SOLELY ON AN "AS IS" BASIS + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -24813,7 +25292,7 @@ index 0000000..be56af4 +//#include + +/** -+ * @file ++ * @file + * + * This file contains the CFI specific common constants, interfaces + * (functions and macros) and structures for Linux. No PCD specific @@ -24830,8 +25309,8 @@ index 0000000..be56af4 +/** This command allows the host to set the value of a specific Core Feature */ +#define VEN_CORE_SET_FEATURE 0xB3 + -+/** This command allows the host to set the default values of -+ * either all or any specific Core Feature ++/** This command allows the host to set the default values of ++ * either all or any specific Core Feature + */ +#define VEN_CORE_RESET_FEATURES 0xB4 + @@ -24844,20 +25323,20 @@ index 0000000..be56af4 +/** This request writes a DWORD value into a register at the specified offset */ +#define VEN_CORE_WRITE_REGISTER 0xB7 + -+/** This structure is the header of the Core Features dataset returned to ++/** This structure is the header of the Core Features dataset returned to + * the Host + */ +struct cfi_all_features_header { +/** The features header structure length is */ +#define CFI_ALL_FEATURES_HDR_LEN 8 + /** -+ * The total length of the features dataset returned to the Host ++ * The total length of the features dataset returned to the Host + */ + uint16_t wTotalLen; + + /** + * CFI version number inBinary-Coded Decimal (i.e., 1.00 is 100H). -+ * This field identifies the version of the CFI Specification with which ++ * This field identifies the version of the CFI Specification with which + * the device is compliant. + */ + uint16_t wVersion; @@ -24874,7 +25353,7 @@ index 0000000..be56af4 + +typedef struct cfi_all_features_header cfi_all_features_header_t; + -+/** This structure is a header of the Core Feature descriptor dataset returned to ++/** This structure is a header of the Core Feature descriptor dataset returned to + * the Host after the VEN_CORE_GET_FEATURES request + */ +struct cfi_feature_desc_header { @@ -24891,8 +25370,8 @@ index 0000000..be56af4 + /** The data length of this feature in bytes */ + uint16_t wDataLength; + -+ /** -+ * Attributes of this features ++ /** ++ * Attributes of this features + * D0: Access rights + * 0 - Read/Write + * 1 - Read only @@ -24923,7 +25402,7 @@ index 0000000..be56af4 +#endif diff --git a/drivers/usb/host/dwc_otg/dwc_otg_adp.c b/drivers/usb/host/dwc_otg/dwc_otg_adp.c new file mode 100644 -index 0000000..0877472 +index 0000000..ce0618d --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_adp.c @@ -0,0 +1,854 @@ @@ -25017,7 +25496,7 @@ index 0000000..0877472 + adpctl.b.adp_tmout_int = 0; + adpctl.b.adp_prb_int = 0; + adpctl.b.adp_tmout_int = 0; -+ ++ + return adpctl.d32; +} + @@ -25108,7 +25587,7 @@ index 0000000..0877472 +} + +/** -+ * Start the ADP Initial Probe timer to detect if Port Connected interrupt is ++ * Start the ADP Initial Probe timer to detect if Port Connected interrupt is + * not asserted within 1.1 seconds. + * + * @param core_if the pointer to core_if strucure. @@ -25267,7 +25746,7 @@ index 0000000..0877472 +} + +/** -+ * Starts the ADP Sense timer to detect if ADP Sense interrupt is not asserted ++ * Starts the ADP Sense timer to detect if ADP Sense interrupt is not asserted + * within 3 seconds. + * + * @param core_if the pointer to core_if strucure. @@ -25293,7 +25772,7 @@ index 0000000..0877472 + adpctl.d32 = dwc_otg_adp_read_reg_filter(core_if); + adpctl.b.adp_sns_int_msk = 1; + dwc_otg_adp_write_reg(core_if, adpctl.d32); -+ dwc_otg_disable_global_interrupts(core_if); // vahrama ++ dwc_otg_disable_global_interrupts(core_if); // vahrama + + /* Set ADP reset bit*/ + adpctl.d32 = dwc_otg_adp_read_reg_filter(core_if); @@ -25373,7 +25852,7 @@ index 0000000..0877472 + hprt0.b.prtpwr = 1; + //DWC_WRITE_REG32(core_if->host_if->hprt0, hprt0.d32); + } -+ ++ + dwc_otg_adp_vbuson_timer_start(core_if); +} + @@ -25459,13 +25938,13 @@ index 0000000..0877472 + gpwrdn.b.pmuactv = 1; + DWC_MODIFY_REG32(&core_if->core_global_regs->gpwrdn, gpwrdn.d32, 0); + -+ if (core_if->adp.probe_enabled) ++ if (core_if->adp.probe_enabled) + dwc_otg_adp_probe_stop(core_if); -+ if (core_if->adp.sense_enabled) ++ if (core_if->adp.sense_enabled) + dwc_otg_adp_sense_stop(core_if); -+ if (core_if->adp.sense_timer_started) ++ if (core_if->adp.sense_timer_started) + DWC_TIMER_CANCEL(core_if->adp.sense_timer); -+ if (core_if->adp.vbuson_timer_started) ++ if (core_if->adp.vbuson_timer_started) + DWC_TIMER_CANCEL(core_if->adp.vbuson_timer); + DWC_TIMER_FREE(core_if->adp.sense_timer); + DWC_TIMER_FREE(core_if->adp.vbuson_timer); @@ -25500,7 +25979,7 @@ index 0000000..0877472 + if (core_if->adp.probe_timer_values[0]>=core_if->adp.probe_timer_values[1]) + diff = core_if->adp.probe_timer_values[0]-core_if->adp.probe_timer_values[1]; + else -+ diff = core_if->adp.probe_timer_values[1]-core_if->adp.probe_timer_values[0]; ++ diff = core_if->adp.probe_timer_values[1]-core_if->adp.probe_timer_values[0]; + if(diff < 2) { + return 0; + } else { @@ -25522,7 +26001,7 @@ index 0000000..0877472 + core_if->adp.probe_counter++; + core_if->adp.gpwrdn = DWC_READ_REG32(&core_if->core_global_regs->gpwrdn); + if (adpctl.b.rtim == 0 && !temp.b.idsts){ -+ DWC_PRINTF("RTIM value is 0\n"); ++ DWC_PRINTF("RTIM value is 0\n"); + goto exit; + } + if (set_timer_value(core_if, adpctl.b.rtim) && @@ -25618,7 +26097,7 @@ index 0000000..0877472 + gpwrdn.d32 = 0; + gpwrdn.b.srp_det_msk = 1; + DWC_MODIFY_REG32(&core_if->core_global_regs->gpwrdn, gpwrdn.d32, 0); -+ ++ + /* Disable Power Down Logic */ + gpwrdn.d32 = 0; + gpwrdn.b.pmuactv = 1; @@ -25654,7 +26133,7 @@ index 0000000..0877472 + + /* Restart ADP Sense timer */ + dwc_otg_adp_sense_timer_start(core_if); -+ ++ + /* Clear interrupt */ + adpctl.d32 = dwc_otg_adp_read_reg(core_if); + adpctl.b.adp_sns_int = 1; @@ -25672,7 +26151,7 @@ index 0000000..0877472 + adpctl_data_t adpctl = {.d32 = 0 }; + adpctl.d32 = val; + set_timer_value(core_if, adpctl.b.rtim); -+ ++ + /* Clear interrupt */ + adpctl.d32 = dwc_otg_adp_read_reg(core_if); + adpctl.b.adp_tmout_int = 1; @@ -25703,7 +26182,7 @@ index 0000000..0877472 + } + if (adpctl.b.adp_prb_int & adpctl.b.adp_prb_int_msk) { + DWC_PRINTF("ADP Probe interrupt\n"); -+ adpctl.b.adp_prb_int = 1; ++ adpctl.b.adp_prb_int = 1; + retval |= dwc_otg_adp_handle_prb_intr(core_if, adpctl.d32); + } + @@ -25783,7 +26262,7 @@ index 0000000..0877472 +} diff --git a/drivers/usb/host/dwc_otg/dwc_otg_adp.h b/drivers/usb/host/dwc_otg/dwc_otg_adp.h new file mode 100644 -index 0000000..d8c3f85 +index 0000000..4110b25 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_adp.h @@ -0,0 +1,80 @@ @@ -25836,7 +26315,7 @@ index 0000000..d8c3f85 +#define DWC_OTG_ADP_UNKOWN 2 + +typedef struct dwc_otg_adp { -+ uint32_t adp_started; ++ uint32_t adp_started; + uint32_t initial_probe; + int32_t probe_timer_values[2]; + uint32_t probe_enabled; @@ -25869,7 +26348,7 @@ index 0000000..d8c3f85 +#endif //__DWC_OTG_ADP_H__ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_attr.c b/drivers/usb/host/dwc_otg/dwc_otg_attr.c new file mode 100644 -index 0000000..95eb7f8 +index 0000000..fab2961 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_attr.c @@ -0,0 +1,1210 @@ @@ -26089,28 +26568,28 @@ index 0000000..95eb7f8 + + + rem_wakeup_pwrdn -+ On read, shows the status core - hibernated or not. On write, initiates ++ On read, shows the status core - hibernated or not. On write, initiates + a remote wakeup of the device from Hibernation. + Read/Write + + + + mode_ch_tim_en -+ This bit is used to enable or disable the host core to wait for 200 PHY ++ This bit is used to enable or disable the host core to wait for 200 PHY + clock cycles at the end of Resume to change the opmode signal to the PHY to 00 + after Suspend or LPM. + Read/Write + -+ ++ + + fr_interval -+ On read, shows the value of HFIR Frame Interval. On write, dynamically ++ On read, shows the value of HFIR Frame Interval. On write, dynamically + reload HFIR register during runtime. The application can write a value to this -+ register only after the Port Enable bit of the Host Port Control and Status ++ register only after the Port Enable bit of the Host Port Control and Status + register (HPRT.PrtEnaPort) has been set + Read/Write + -+ ++ + + disconnect_us + On read, shows the status of disconnect_device_us. On write, sets disconnect_us @@ -26710,7 +27189,7 @@ index 0000000..95eb7f8 + remote_wakeup_store); + +/** -+ * Show the whether core is hibernated or not. ++ * Show the whether core is hibernated or not. + */ +static ssize_t rem_wakeup_pwrdn_show(struct device *_dev, + struct device_attribute *attr, char *buf) @@ -27085,7 +27564,7 @@ index 0000000..95eb7f8 +} diff --git a/drivers/usb/host/dwc_otg/dwc_otg_attr.h b/drivers/usb/host/dwc_otg/dwc_otg_attr.h new file mode 100644 -index 0000000..fc14d94 +index 0000000..e10b67f --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_attr.h @@ -0,0 +1,89 @@ @@ -27098,7 +27577,7 @@ index 0000000..fc14d94 + * Synopsys HS OTG Linux Software Driver and documentation (hereinafter, + * "Software") is an Unsupported proprietary work of Synopsys, Inc. unless + * otherwise expressly agreed to in writing between Synopsys and you. -+ * ++ * + * The Software IS NOT an item of Licensed Software or Licensed Product under + * any End User Software License Agreement or Agreement for Licensed Product + * with Synopsys or any supplement thereto. You are permitted to use and @@ -27108,7 +27587,7 @@ index 0000000..fc14d94 + * any information contained herein except pursuant to this license grant from + * Synopsys. If you do not agree with this notice, including the disclaimer + * below, then you are not authorized to use the Software. -+ * ++ * + * THIS SOFTWARE IS BEING DISTRIBUTED BY SYNOPSYS SOLELY ON AN "AS IS" BASIS + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -27180,7 +27659,7 @@ index 0000000..fc14d94 +#endif diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cfi.c b/drivers/usb/host/dwc_otg/dwc_otg_cfi.c new file mode 100644 -index 0000000..a9878d6 +index 0000000..bbb3d32 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_cfi.c @@ -0,0 +1,1876 @@ @@ -27188,7 +27667,7 @@ index 0000000..a9878d6 + * Synopsys HS OTG Linux Software Driver and documentation (hereinafter, + * "Software") is an Unsupported proprietary work of Synopsys, Inc. unless + * otherwise expressly agreed to in writing between Synopsys and you. -+ * ++ * + * The Software IS NOT an item of Licensed Software or Licensed Product under + * any End User Software License Agreement or Agreement for Licensed Product + * with Synopsys or any supplement thereto. You are permitted to use and @@ -27198,7 +27677,7 @@ index 0000000..a9878d6 + * any information contained herein except pursuant to this license grant from + * Synopsys. If you do not agree with this notice, including the disclaimer + * below, then you are not authorized to use the Software. -+ * ++ * + * THIS SOFTWARE IS BEING DISTRIBUTED BY SYNOPSYS SOLELY ON AN "AS IS" BASIS + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -27212,10 +27691,10 @@ index 0000000..a9878d6 + * DAMAGE. + * ========================================================================== */ + -+/** @file ++/** @file + * -+ * This file contains the most of the CFI(Core Feature Interface) -+ * implementation for the OTG. ++ * This file contains the most of the CFI(Core Feature Interface) ++ * implementation for the OTG. + */ + +#ifdef DWC_UTE_CFI @@ -27339,10 +27818,10 @@ index 0000000..a9878d6 + +/************************************************************************/ + -+/** -+ * Returns the name of the feature by its ID ++/** ++ * Returns the name of the feature by its ID + * or NULL if no featute ID matches. -+ * ++ * + */ +const uint8_t *get_prop_name(uint16_t prop_id, int *len) +{ @@ -27360,7 +27839,7 @@ index 0000000..a9878d6 + +/** + * This function handles all CFI specific control requests. -+ * ++ * + * Return a negative value to stall the DCE. + */ +int cfi_setup(struct dwc_otg_pcd *pcd, struct cfi_usb_ctrlrequest *ctrl) @@ -27375,7 +27854,7 @@ index 0000000..a9878d6 + uint32_t regaddr = 0; + uint32_t regval = 0; + -+ /* Save this Control Request in the CFI object. ++ /* Save this Control Request in the CFI object. + * The data field will be assigned in the data stage completion CB function. + */ + cfi->ctrl_req = *ctrl; @@ -27467,7 +27946,7 @@ index 0000000..a9878d6 + case VEN_CORE_READ_REGISTER: + CFI_INFO("VEN_CORE_READ_REGISTER\n"); + /* wValue optionally contains the HI WORD of the register offset and -+ * wIndex contains the LOW WORD of the register offset ++ * wIndex contains the LOW WORD of the register offset + */ + if (wValue == 0) { + /* @TODO - MAS - fix the access to the base field */ @@ -27531,7 +28010,7 @@ index 0000000..a9878d6 +/** + * This function prepares the core features descriptors and copies its + * raw representation into the buffer . -+ * ++ * + * The buffer structure is as follows: + * all_features_header (8 bytes) + * features_#1 (8 bytes + feature name string length) @@ -27683,7 +28162,7 @@ index 0000000..a9878d6 + * The callback function that notifies the CFI on the activation of + * an endpoint in the PCD. The following steps are done in this function: + * -+ * Create a dynamically allocated cfi_ep_t object (a CFI wrapper to the PCD's ++ * Create a dynamically allocated cfi_ep_t object (a CFI wrapper to the PCD's + * active endpoint) + * Create MAX_DMA_DESCS_PER_EP count DMA Descriptors for the EP + * Set the Buffer Mode to standard @@ -27728,7 +28207,7 @@ index 0000000..a9878d6 + + DWC_LIST_INIT(&cfiep->lh); + -+ /* Set the buffer mode to BM_STANDARD. It will be modified ++ /* Set the buffer mode to BM_STANDARD. It will be modified + * when building descriptors for a specific buffer mode */ + ep->dwc_ep.buff_mode = BM_STANDARD; + @@ -27750,7 +28229,7 @@ index 0000000..a9878d6 +/** + * This function is called when the data stage of a 3-stage Control Write request + * is complete. -+ * ++ * + */ +static int cfi_ctrl_write_complete(struct cfiobject *cfi, + struct dwc_otg_pcd *pcd) @@ -27769,7 +28248,7 @@ index 0000000..a9878d6 + wIndex = DWC_CONSTANT_CPU_TO_LE16(ctrl_req->wIndex); + wValue = DWC_CONSTANT_CPU_TO_LE16(ctrl_req->wValue); + -+ /* ++ /* + * Save the pointer to the data stage in the ctrl_req's field. + * The request should be already saved in the command stage by now. + */ @@ -27828,7 +28307,7 @@ index 0000000..a9878d6 + txsize = sgval->wSize; + off = sgval->bOffset; + -+// CFI_INFO("%s: %s TXSIZE=0x%08x; OFFSET=0x%08x\n", ++// CFI_INFO("%s: %s TXSIZE=0x%08x; OFFSET=0x%08x\n", +// __func__, cfiep->ep->ep.name, txsize, off); + + for (i = 0; i < sgval->bCount; i++) { @@ -28020,7 +28499,7 @@ index 0000000..a9878d6 +/** + * This function reads the required feature's current value into the buffer + * -+ * @retval: Returns negative as error, or the data length of the feature ++ * @retval: Returns negative as error, or the data length of the feature + */ +static int cfi_get_feature_value(uint8_t * buf, uint16_t buflen, + struct dwc_otg_pcd *pcd, @@ -28105,7 +28584,7 @@ index 0000000..a9878d6 + +/** + * This function resets the Concatenation for the specified EP to its default value -+ * This function will also set the value of the wTxBytes field to NULL after ++ * This function will also set the value of the wTxBytes field to NULL after + * freeing the memory previously allocated for this field. + */ +static int cfi_reset_concat_val(cfi_ep_t * cfiep) @@ -28558,7 +29037,7 @@ index 0000000..a9878d6 + +/** + * This function calculates the total of all FIFO sizes -+ * ++ * + * @param core_if Programming view of DWC_otg controller + * + * @return The total of data FIFO sizes. @@ -28584,7 +29063,7 @@ index 0000000..a9878d6 + +/** + * This function returns Rx FIFO size -+ * ++ * + * @param core_if Programming view of DWC_otg controller + * + * @return The total of data FIFO sizes. @@ -28608,7 +29087,7 @@ index 0000000..a9878d6 + +/** + * This function returns Tx FIFO size for IN EP -+ * ++ * + * @param core_if Programming view of DWC_otg controller + * + * @return The total of data FIFO sizes. @@ -28652,9 +29131,9 @@ index 0000000..a9878d6 +} + +/** -+ * This function checks if the submitted combination of ++ * This function checks if the submitted combination of + * device mode FIFO sizes is possible or not. -+ * ++ * + * @param core_if Programming view of DWC_otg controller + * + * @return 1 if possible, 0 otherwise. @@ -28712,7 +29191,7 @@ index 0000000..a9878d6 + +/** + * This function resizes Device mode FIFOs -+ * ++ * + * @param core_if Programming view of DWC_otg controller + * + * @return 1 if successful, 0 otherwise @@ -28913,7 +29392,7 @@ index 0000000..a9878d6 +} + +/** -+ * This function reads the Concatenation value of an EP's buffer mode into ++ * This function reads the Concatenation value of an EP's buffer mode into + * the buffer buf + */ +static int cfi_ep_get_concat_val(uint8_t * buf, struct dwc_otg_pcd *pcd, @@ -28950,7 +29429,7 @@ index 0000000..a9878d6 +} + +/** -+ * This function reads the buffer Alignment value of an EP's buffer mode into ++ * This function reads the buffer Alignment value of an EP's buffer mode into + * the buffer buf + * + * @return The total number of bytes copied to the buffer or negative error code. @@ -28982,9 +29461,9 @@ index 0000000..a9878d6 + +/** + * This function sets a new value for the specified feature -+ * ++ * + * @param pcd A pointer to the PCD object -+ * ++ * + * @return 0 if successful, negative error code otherwise to stall the DCE. + */ +static int cfi_set_feature_value(struct dwc_otg_pcd *pcd) @@ -29062,7 +29541,7 @@ index 0000000..a9878d6 +#endif //DWC_UTE_CFI diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cfi.h b/drivers/usb/host/dwc_otg/dwc_otg_cfi.h new file mode 100644 -index 0000000..cbccdab +index 0000000..55fd337 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_cfi.h @@ -0,0 +1,320 @@ @@ -29102,9 +29581,9 @@ index 0000000..cbccdab + +/** + * @file -+ * This file contains the CFI related OTG PCD specific common constants, -+ * interfaces(functions and macros) and data structures.The CFI Protocol is an -+ * optional interface for internal testing purposes that a DUT may implement to ++ * This file contains the CFI related OTG PCD specific common constants, ++ * interfaces(functions and macros) and data structures.The CFI Protocol is an ++ * optional interface for internal testing purposes that a DUT may implement to + * support testing of configurable features. + * + */ @@ -29388,7 +29867,7 @@ index 0000000..cbccdab +#endif /* (__DWC_OTG_CFI_H__) */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil.c b/drivers/usb/host/dwc_otg/dwc_otg_cil.c new file mode 100644 -index 0000000..9b67537 +index 0000000..6a32c5c --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_cil.c @@ -0,0 +1,7151 @@ @@ -29445,7 +29924,7 @@ index 0000000..9b67537 + * + * The Core Interface Layer has the following requirements: + * - Provides basic controller operations. -+ * - Minimal use of OS services. ++ * - Minimal use of OS services. + * - The OS services used will be abstracted by using inline functions + * or macros. + * @@ -29582,13 +30061,13 @@ index 0000000..9b67537 + gusbcfg.d32 = DWC_READ_REG32(&core_if->core_global_regs->gusbcfg); + gusbcfg.b.force_host_mode = 1; + DWC_WRITE_REG32(&core_if->core_global_regs->gusbcfg, gusbcfg.d32); -+ dwc_mdelay(100); ++ dwc_mdelay(100); + core_if->hptxfsiz.d32 = + DWC_READ_REG32(&core_if->core_global_regs->hptxfsiz); + gusbcfg.d32 = DWC_READ_REG32(&core_if->core_global_regs->gusbcfg); + gusbcfg.b.force_host_mode = 0; + DWC_WRITE_REG32(&core_if->core_global_regs->gusbcfg, gusbcfg.d32); -+ dwc_mdelay(100); ++ dwc_mdelay(100); + } + + DWC_DEBUGPL(DBG_CILV, "hwcfg1=%08x\n", core_if->hwcfg1.d32); @@ -29665,7 +30144,7 @@ index 0000000..9b67537 + + /** ADP initialization */ + dwc_otg_adp_init(core_if); -+ ++ + return core_if; +} + @@ -29869,7 +30348,7 @@ index 0000000..9b67537 + + if (core_if->hibernation_suspend == 0) { + /* -+ * Wait For Restore_done Interrupt. This mechanism of polling the ++ * Wait For Restore_done Interrupt. This mechanism of polling the + * interrupt is introduced to avoid any possible race conditions + */ + do { @@ -30034,8 +30513,8 @@ index 0000000..9b67537 + if (gintsts.b.restoredone) { + gintsts.d32 = 0; + gintsts.b.restoredone = 1; -+ DWC_WRITE_REG32(&core_if->core_global_regs->gintsts, gintsts.d32); -+ DWC_DEBUGPL(DBG_HCD,"Restore Done Interrupt seen\n"); ++ DWC_WRITE_REG32(&core_if->core_global_regs->gintsts, gintsts.d32); ++ DWC_DEBUGPL(DBG_HCD,"Restore Done Interrupt seen\n"); + break; + } + dwc_udelay(10); @@ -30308,7 +30787,7 @@ index 0000000..9b67537 + if (!gr) { + return -DWC_E_INVALID; + } -+ ++ + DWC_WRITE_REG32(&core_if->core_global_regs->gotgctl, gr->gotgctl_local); + DWC_WRITE_REG32(&core_if->core_global_regs->gintmsk, gr->gintmsk_local); + DWC_WRITE_REG32(&core_if->core_global_regs->gusbcfg, gr->gusbcfg_local); @@ -30347,7 +30826,7 @@ index 0000000..9b67537 + DWC_WRITE_REG32(&core_if->dev_if->dev_global_regs->dctl, + dr->dctl); + } -+ ++ + DWC_WRITE_REG32(&core_if->dev_if->dev_global_regs->daintmsk, dr->daintmsk); + DWC_WRITE_REG32(&core_if->dev_if->dev_global_regs->diepmsk, dr->diepmsk); + DWC_WRITE_REG32(&core_if->dev_if->dev_global_regs->doepmsk, dr->doepmsk); @@ -30357,7 +30836,7 @@ index 0000000..9b67537 + DWC_WRITE_REG32(&core_if->dev_if->in_ep_regs[i]->diepdma, dr->diepdma[i]); + DWC_WRITE_REG32(&core_if->dev_if->in_ep_regs[i]->diepctl, dr->diepctl[i]); + } -+ ++ + return 0; +} + @@ -30783,7 +31262,7 @@ index 0000000..9b67537 + + case DWC_INT_DMA_ARCH: + DWC_DEBUGPL(DBG_CIL, "Internal DMA Mode\n"); -+ /* Old value was DWC_GAHBCFG_INT_DMA_BURST_INCR - done for ++ /* Old value was DWC_GAHBCFG_INT_DMA_BURST_INCR - done for + Host mode ISOC in issue fix - vahrama */ + /* Broadcom had altered to (1<<3)|(0<<0) - WRESP=1, max 4 beats */ + ahbcfg.b.hburstlen = (1<<3)|(0<<0);//DWC_GAHBCFG_INT_DMA_BURST_INCR4; @@ -30808,7 +31287,7 @@ index 0000000..9b67537 + if (core_if->core_params->ahb_single) { + ahbcfg.b.ahbsingle = 1; + } -+ ++ + ahbcfg.b.dmaenable = core_if->dma_enable; + DWC_WRITE_REG32(&global_regs->gahbcfg, ahbcfg.d32); + @@ -30904,7 +31383,7 @@ index 0000000..9b67537 + DWC_PRINTF("OTG VER PARAM: %d, OTG VER FLAG: %d\n", + core_if->core_params->otg_ver, core_if->otg_ver); + } -+ ++ + + /* Enable common interrupts */ + dwc_otg_enable_common_interrupts(core_if); @@ -30963,7 +31442,7 @@ index 0000000..9b67537 + + //intr_mask.b.incomplisoout = 1; + intr_mask.b.incomplisoin = 1; -+ ++ +/* Enable the ignore frame number for ISOC xfers - MAS */ +/* Disable to support high bandwith ISOC transfers - manukz */ +#if 0 @@ -31050,7 +31529,7 @@ index 0000000..9b67537 + dcfg.b.perfrint = DWC_DCFG_FRAME_INTERVAL_80; + /* Enable Device OUT NAK in case of DDMA mode*/ + if (core_if->core_params->dev_out_nak) { -+ dcfg.b.endevoutnak = 1; ++ dcfg.b.endevoutnak = 1; + } + + if (core_if->core_params->cont_on_bna) { @@ -31058,7 +31537,7 @@ index 0000000..9b67537 + dctl.b.encontonbna = 1; + DWC_MODIFY_REG32(&dev_if->dev_global_regs->dctl, 0, dctl.d32); + } -+ ++ + + DWC_WRITE_REG32(&dev_if->dev_global_regs->dcfg, dcfg.d32); + @@ -31220,7 +31699,7 @@ index 0000000..9b67537 + diepctl.d32 = DWC_READ_REG32(&dev_if->in_ep_regs[0]->diepctl); + diepctl.b.nextep = 0; + DWC_WRITE_REG32(&dev_if->in_ep_regs[0]->diepctl, diepctl.d32); -+ ++ + /* Update IN Endpoint Mismatch Count by active IN NP EP count + 1 */ + dcfg.d32 = DWC_READ_REG32(&dev_if->dev_global_regs->dcfg); + dcfg.b.epmscnt = 2; @@ -31233,7 +31712,7 @@ index 0000000..9b67537 + } + DWC_DEBUGPL(DBG_CILV,"\n"); + } -+ ++ + /* Clear all pending Device Interrupts */ + /** @todo - if the condition needed to be checked + * or in any case all pending interrutps should be cleared? @@ -31481,7 +31960,7 @@ index 0000000..9b67537 + } + + /* This bit allows dynamic reloading of the HFIR register -+ * during runtime. This bit needs to be programmed during ++ * during runtime. This bit needs to be programmed during + * initial configuration and its value must not be changed + * during runtime.*/ + if (core_if->core_params->reload_ctl == 1) { @@ -31552,7 +32031,7 @@ index 0000000..9b67537 + DWC_WRITE_REG32(&global_regs->hptxfsiz, ptxfifosize.d32); + DWC_DEBUGPL(DBG_CIL, "new hptxfsiz=%08x\n", + DWC_READ_REG32(&global_regs->hptxfsiz)); -+ ++ + if (core_if->en_multiple_tx_fifo + && core_if->snpsid <= OTG_CORE_REV_2_94a) { + /* Global DFIFOCFG calculation for Host mode - include RxFIFO, NPTXFIFO and HPTXFIFO */ @@ -31900,7 +32379,7 @@ index 0000000..9b67537 + hcchar.d32 = DWC_READ_REG32(&hc_regs->hcchar); + + /* No need to set the bit in DDMA for disabling the channel */ -+ //TODO check it everywhere channel is disabled ++ //TODO check it everywhere channel is disabled + if (!core_if->core_params->dma_desc_enable) + hcchar.b.chen = 1; + hcchar.b.chdis = 1; @@ -32528,9 +33007,9 @@ index 0000000..9b67537 +} + +/** -+ * Calculates and gets the frame Interval value of HFIR register according PHY ++ * Calculates and gets the frame Interval value of HFIR register according PHY + * type and speed.The application can modify a value of HFIR register only after -+ * the Port Enable bit of the Host Port Control and Status register ++ * the Port Enable bit of the Host Port Control and Status register + * (HPRT.PrtEnaPort) has been set. +*/ + @@ -32704,7 +33183,7 @@ index 0000000..9b67537 + if (core_if->nextep_seq[i] == core_if->first_in_nextep_seq) + break; + } -+ core_if->nextep_seq[i] = ep->num; ++ core_if->nextep_seq[i] = ep->num; + core_if->nextep_seq[ep->num] = core_if->first_in_nextep_seq; + depctl.b.nextep = core_if->nextep_seq[ep->num]; + dcfg.d32 = DWC_READ_REG32(&dev_if->dev_global_regs->dcfg); @@ -32736,20 +33215,20 @@ index 0000000..9b67537 + diepmsk.b.ahberr = 1; + diepmsk.b.intknepmis = 1; + if (!core_if->en_multiple_tx_fifo && core_if->dma_enable) -+ diepmsk.b.intknepmis = 0; ++ diepmsk.b.intknepmis = 0; + diepmsk.b.txfifoundrn = 1; //????? + if (ep->type == DWC_OTG_EP_TYPE_ISOC) { + diepmsk.b.nak = 1; + } + -+ -+ ++ ++ +/* + if (core_if->dma_desc_enable) { + diepmsk.b.bna = 1; + } +*/ -+/* ++/* + if (core_if->dma_enable) { + doepmsk.b.nak = 1; + } @@ -32765,13 +33244,13 @@ index 0000000..9b67537 + if (ep->type == DWC_OTG_EP_TYPE_ISOC) + doepmsk.b.outtknepdis = 1; + -+/* ++/* + + if (core_if->dma_desc_enable) { + doepmsk.b.bna = 1; + } +*/ -+/* ++/* + doepmsk.b.babble = 1; + doepmsk.b.nyet = 1; + doepmsk.b.nak = 1; @@ -32839,14 +33318,14 @@ index 0000000..9b67537 + depctl.d32 = DWC_READ_REG32(addr); + + depctl.b.usbactep = 0; -+ ++ + /* Update nextep_seq array and EPMSCNT in DCFG*/ + if (!(depctl.b.eptype & 1) && ep->is_in == 1) { // NP EP IN + for (i = 0; i <= core_if->dev_if->num_in_eps; i++) { + if (core_if->nextep_seq[i] == ep->num) + break; + } -+ core_if->nextep_seq[i] = core_if->nextep_seq[ep->num]; ++ core_if->nextep_seq[i] = core_if->nextep_seq[ep->num]; + if (core_if->first_in_nextep_seq == ep->num) + core_if->first_in_nextep_seq = i; + core_if->nextep_seq[ep->num] = 0xff; @@ -32864,7 +33343,7 @@ index 0000000..9b67537 + DWC_DEBUGPL(DBG_PCDV, "%2d\n", core_if->nextep_seq[i]); + } + } -+ ++ + if (ep->is_in == 1) + depctl.b.txfnum = 0; + @@ -32878,7 +33357,7 @@ index 0000000..9b67537 + depctl_data_t depctl = {.d32 = 0}; + if (ep->is_in) { + diepint_data_t diepint = {.d32 = 0}; -+ ++ + depctl.b.snak = 1; + DWC_WRITE_REG32(&core_if->dev_if->in_ep_regs[ep->num]-> + diepctl, depctl.d32); @@ -32888,7 +33367,7 @@ index 0000000..9b67537 + DWC_READ_REG32(&core_if-> + dev_if->in_ep_regs[ep->num]-> + diepint); -+ } while (!diepint.b.inepnakeff); ++ } while (!diepint.b.inepnakeff); + diepint.b.inepnakeff = 1; + DWC_WRITE_REG32(&core_if->dev_if->in_ep_regs[ep->num]-> + diepint, diepint.d32); @@ -32902,7 +33381,7 @@ index 0000000..9b67537 + DWC_READ_REG32(&core_if-> + dev_if->in_ep_regs[ep->num]-> + diepint); -+ } while (!diepint.b.epdisabled); ++ } while (!diepint.b.epdisabled); + diepint.b.epdisabled = 1; + DWC_WRITE_REG32(&core_if->dev_if->in_ep_regs[ep->num]-> + diepint, diepint.d32); @@ -32916,7 +33395,7 @@ index 0000000..9b67537 + do { + dwc_udelay(10); + gintsts.d32 = DWC_READ_REG32(&core_if->core_global_regs->gintsts); -+ } while (!gintsts.b.goutnakeff); ++ } while (!gintsts.b.goutnakeff); + gintsts.d32 = 0; + gintsts.b.goutnakeff = 1; + DWC_WRITE_REG32(&core_if->core_global_regs->gintsts, gintsts.d32); @@ -32925,12 +33404,12 @@ index 0000000..9b67537 + depctl.b.epdis = 1; + depctl.b.snak = 1; + DWC_WRITE_REG32(&core_if->dev_if->out_ep_regs[ep->num]->doepctl, depctl.d32); -+ do ++ do + { + dwc_udelay(10); + doepint.d32 = DWC_READ_REG32(&core_if->dev_if-> + out_ep_regs[ep->num]->doepint); -+ } while (!doepint.b.epdisabled); ++ } while (!doepint.b.epdisabled); + + doepint.b.epdisabled = 1; + DWC_WRITE_REG32(&core_if->dev_if->out_ep_regs[ep->num]->doepint, doepint.d32); @@ -32938,7 +33417,7 @@ index 0000000..9b67537 + dctl.d32 = 0; + dctl.b.cgoutnak = 1; + DWC_MODIFY_REG32(&core_if->dev_if->dev_global_regs->dctl, 0, dctl.d32); -+ } ++ } + } + + /* Disable the Interrupt for this EP */ @@ -32973,8 +33452,8 @@ index 0000000..9b67537 + uint32_t xfer_est; + int i; + unsigned maxxfer_local, total_len; -+ -+ if (!ep->is_in && ep->type == DWC_OTG_EP_TYPE_INTR && ++ ++ if (!ep->is_in && ep->type == DWC_OTG_EP_TYPE_INTR && + (ep->maxpacket%4)) { + maxxfer_local = ep->maxpacket; + total_len = ep->xfer_len; @@ -33030,9 +33509,9 @@ index 0000000..9b67537 + } else { + if (maxxfer_local == ep->maxpacket) + dma_desc->status.b.bytes = xfer_est; -+ else ++ else + dma_desc->status.b.bytes = -+ xfer_est + ((4 - (xfer_est & 0x3)) & 0x3); ++ xfer_est + ((4 - (xfer_est & 0x3)) & 0x3); + } + + dma_desc->buf = ep->dma_addr + offset; @@ -33043,7 +33522,7 @@ index 0000000..9b67537 + } +} +/** -+ * This function is called when to write ISOC data into appropriate dedicated ++ * This function is called when to write ISOC data into appropriate dedicated + * periodic FIFO. + */ +static int32_t write_isoc_tx_fifo(dwc_otg_core_if_t * core_if, dwc_ep_t * dwc_ep) @@ -33139,8 +33618,8 @@ index 0000000..9b67537 + + if (ep->maxpacket > ep->maxxfer / MAX_PKT_CNT) + ep->xfer_len += (ep->maxxfer < (ep->total_len - ep->xfer_len)) ? -+ ep->maxxfer : (ep->total_len - ep->xfer_len); -+ else ++ ep->maxxfer : (ep->total_len - ep->xfer_len); ++ else + ep->xfer_len += (MAX_PKT_CNT * ep->maxpacket < (ep->total_len - ep->xfer_len)) ? + MAX_PKT_CNT * ep->maxpacket : (ep->total_len - ep->xfer_len); + @@ -33153,7 +33632,7 @@ index 0000000..9b67537 + /* Program the transfer size and packet count + * as follows: xfersize = N * maxpacket + + * short_packet pktcnt = N + (short_packet -+ * exist ? 1 : 0) ++ * exist ? 1 : 0) + */ + deptsiz.b.xfersize = ep->xfer_len - ep->xfer_count; + deptsiz.b.pktcnt = @@ -33162,8 +33641,8 @@ index 0000000..9b67537 + if (deptsiz.b.pktcnt > MAX_PKT_CNT) { + deptsiz.b.pktcnt = MAX_PKT_CNT; + deptsiz.b.xfersize = deptsiz.b.pktcnt * ep->maxpacket; -+ } -+ if (ep->type == DWC_OTG_EP_TYPE_ISOC) ++ } ++ if (ep->type == DWC_OTG_EP_TYPE_ISOC) + deptsiz.b.mc = deptsiz.b.pktcnt; + } + @@ -33222,7 +33701,7 @@ index 0000000..9b67537 + } + if (!core_if->core_params->en_multiple_tx_fifo && core_if->dma_enable) + depctl.b.nextep = core_if->nextep_seq[ep->num]; -+ ++ + if (ep->type == DWC_OTG_EP_TYPE_ISOC) { + dsts_data_t dsts = {.d32 = 0}; + if (ep->bInterval == 1) { @@ -33233,7 +33712,7 @@ index 0000000..9b67537 + if (ep->frame_num > 0x3FFF) { + ep->frm_overrun = 1; + ep->frame_num &= 0x3FFF; -+ } else ++ } else + ep->frm_overrun = 0; + if (ep->frame_num & 0x1) { + depctl.b.setd1pid = 1; @@ -33255,18 +33734,18 @@ index 0000000..9b67537 + depctl.d32 = DWC_READ_REG32(&(out_regs->doepctl)); + deptsiz.d32 = DWC_READ_REG32(&(out_regs->doeptsiz)); + -+ if (!core_if->dma_desc_enable) { ++ if (!core_if->dma_desc_enable) { + if (ep->maxpacket > ep->maxxfer / MAX_PKT_CNT) + ep->xfer_len += (ep->maxxfer < (ep->total_len - ep->xfer_len)) ? -+ ep->maxxfer : (ep->total_len - ep->xfer_len); ++ ep->maxxfer : (ep->total_len - ep->xfer_len); + else -+ ep->xfer_len += (MAX_PKT_CNT * ep->maxpacket < (ep->total_len ++ ep->xfer_len += (MAX_PKT_CNT * ep->maxpacket < (ep->total_len + - ep->xfer_len)) ? MAX_PKT_CNT * ep->maxpacket : (ep->total_len - ep->xfer_len); + } + + /* Program the transfer size and packet count as follows: + * -+ * pktcnt = N ++ * pktcnt = N + * xfersize = N * maxpacket + */ + if ((ep->xfer_len - ep->xfer_count) == 0) { @@ -33282,7 +33761,7 @@ index 0000000..9b67537 + } + if (!core_if->dma_desc_enable) { + ep->xfer_len = -+ deptsiz.b.pktcnt * ep->maxpacket + ep->xfer_count; ++ deptsiz.b.pktcnt * ep->maxpacket + ep->xfer_count; + } + deptsiz.b.xfersize = ep->xfer_len - ep->xfer_count; + } @@ -33318,7 +33797,7 @@ index 0000000..9b67537 + /* Remember initial value of doeptsiz */ + core_if->start_doeptsiz_val[ep->num] = deptsiz.d32; + DWC_WRITE_REG32(&out_regs->doeptsiz, -+ deptsiz.d32); ++ deptsiz.d32); + } + } + /** DOEPDMAn Register write */ @@ -33342,7 +33821,7 @@ index 0000000..9b67537 + if (ep->frame_num > 0x3FFF) { + ep->frm_overrun = 1; + ep->frame_num &= 0x3FFF; -+ } else ++ } else + ep->frm_overrun = 0; + + if (ep->frame_num & 0x1) { @@ -33368,9 +33847,9 @@ index 0000000..9b67537 + DWC_READ_REG32(&core_if->core_global_regs-> + gintmsk)); + -+ /* Timer is scheduling only for out bulk transfers for -+ * "Device DDMA OUT NAK Enhancement" feature to inform user -+ * about received data payload in case of timeout ++ /* Timer is scheduling only for out bulk transfers for ++ * "Device DDMA OUT NAK Enhancement" feature to inform user ++ * about received data payload in case of timeout + */ + if (core_if->core_params->dev_out_nak) { + if (ep->type == DWC_OTG_EP_TYPE_BULK) { @@ -33557,7 +34036,7 @@ index 0000000..9b67537 + /* Program the transfer size and packet count + * as follows: xfersize = N * maxpacket + + * short_packet pktcnt = N + (short_packet -+ * exist ? 1 : 0) ++ * exist ? 1 : 0) + */ + if (ep->xfer_len > ep->maxpacket) { + ep->xfer_len = ep->maxpacket; @@ -33723,7 +34202,7 @@ index 0000000..9b67537 + /* Program the transfer size and packet count + * as follows: xfersize = N * maxpacket + + * short_packet pktcnt = N + (short_packet -+ * exist ? 1 : 0) ++ * exist ? 1 : 0) + */ + + if (core_if->dma_desc_enable == 0) { @@ -33813,7 +34292,7 @@ index 0000000..9b67537 + /* Program the transfer size and packet count + * as follows: xfersize = N * maxpacket + + * short_packet pktcnt = N + (short_packet -+ * exist ? 1 : 0) ++ * exist ? 1 : 0) + */ + deptsiz.b.xfersize = ep->maxpacket; + deptsiz.b.pktcnt = 1; @@ -34645,7 +35124,7 @@ index 0000000..9b67537 + /* Program the transfer size and packet count + * as follows: xfersize = N * maxpacket + + * short_packet pktcnt = N + (short_packet -+ * exist ? 1 : 0) ++ * exist ? 1 : 0) + */ + deptsiz.b.xfersize = ep->xfer_len; + deptsiz.b.pktcnt = @@ -36165,7 +36644,7 @@ index 0000000..9b67537 + dcfg_data_t dcfg; + /* originally: dcfg.d32 = DWC_READ_REG32(&core_if->dev_if->dev_global_regs->dcfg); */ + -+ dcfg.d32 = -1; //GRAYG ++ dcfg.d32 = -1; //GRAYG + DWC_DEBUGPL(DBG_CILV, "%s - core_if(%p)\n", __func__, core_if); + if (NULL == core_if) + DWC_ERROR("reg request with NULL core_if\n"); @@ -36185,7 +36664,7 @@ index 0000000..9b67537 + core_if, core_if->dev_if, + core_if->dev_if->dev_global_regs, + &core_if->dev_if->dev_global_regs->dcfg); -+ dcfg.d32 = DWC_READ_REG32(&core_if->dev_if->dev_global_regs->dcfg); ++ dcfg.d32 = DWC_READ_REG32(&core_if->dev_if->dev_global_regs->dcfg); + } + return dcfg.b.devspd; +} @@ -36545,7 +37024,7 @@ index 0000000..9b67537 +} diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil.h b/drivers/usb/host/dwc_otg/dwc_otg_cil.h new file mode 100644 -index 0000000..d367cd1 +index 0000000..79dbf83 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_cil.h @@ -0,0 +1,1464 @@ @@ -36650,7 +37129,7 @@ index 0000000..d367cd1 + unsigned active:1; + + /** -+ * Periodic Tx FIFO # for IN EPs For INTR EP set to 0 to use non-periodic ++ * Periodic Tx FIFO # for IN EPs For INTR EP set to 0 to use non-periodic + * Tx FIFO. If dedicated Tx FIFOs are enabled Tx FIFO # FOR IN EPs*/ + unsigned tx_fifo_num:4; + /** EP type: 0 - Control, 1 - ISOC, 2 - BULK, 3 - INTR */ @@ -36720,7 +37199,7 @@ index 0000000..d367cd1 +#define MAX_DMA_DESC_CNT 256 + /** Allocated DMA Desc count */ + uint32_t desc_cnt; -+ ++ + /** bInterval */ + uint32_t bInterval; + /** Next frame num to setup next ISOC transfer */ @@ -36998,8 +37477,8 @@ index 0000000..d367cd1 + int32_t dma_enable; + + /** -+ * When DMA mode is enabled specifies whether to use address DMA or DMA -+ * Descriptor mode for accessing the data FIFOs in device mode. The driver ++ * When DMA mode is enabled specifies whether to use address DMA or DMA ++ * Descriptor mode for accessing the data FIFOs in device mode. The driver + * will automatically detect the value for this if none is specified. + * 0 - address DMA + * 1 - DMA Descriptor(default, if available) @@ -37239,22 +37718,22 @@ index 0000000..d367cd1 + */ + int32_t reload_ctl; + -+ /** DCFG: Enable device Out NAK ++ /** DCFG: Enable device Out NAK + * 0 - The core does not set NAK after Bulk Out transfer complete. + * 1 - The core sets NAK after Bulk OUT transfer complete. + */ + int32_t dev_out_nak; + -+ /** DCFG: Enable Continue on BNA ++ /** DCFG: Enable Continue on BNA + * After receiving BNA interrupt the core disables the endpoint,when the -+ * endpoint is re-enabled by the application the core starts processing ++ * endpoint is re-enabled by the application the core starts processing + * 0 - from the DOEPDMA descriptor + * 1 - from the descriptor which received the BNA. + */ + int32_t cont_on_bna; + -+ /** GAHBCFG: AHB Single Support -+ * This bit when programmed supports SINGLE transfers for remainder ++ /** GAHBCFG: AHB Single Support ++ * This bit when programmed supports SINGLE transfers for remainder + * data in a transfer for DMA mode of operation. + * 0 - in this case the remainder data will be sent using INCR burst size. + * 1 - in this case the remainder data will be sent using SINGLE burst size. @@ -37537,7 +38016,7 @@ index 0000000..d367cd1 + * also used as counter of disabled NP IN EP's */ + uint8_t start_predict; + -+ /** NextEp sequence, including EP0: nextep_seq[] = EP if non-periodic and ++ /** NextEp sequence, including EP0: nextep_seq[] = EP if non-periodic and + * active, 0xff otherwise */ + uint8_t nextep_seq[MAX_EPS_CHANNELS]; + @@ -37545,7 +38024,7 @@ index 0000000..d367cd1 + uint8_t first_in_nextep_seq; + + /** Frame number while entering to ISR - needed for ISOCs **/ -+ uint32_t frame_num; ++ uint32_t frame_num; + +}; + @@ -38015,7 +38494,7 @@ index 0000000..d367cd1 +#endif diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c new file mode 100644 -index 0000000..21804c4 +index 0000000..59fc862 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c @@ -0,0 +1,1563 @@ @@ -38334,7 +38813,7 @@ index 0000000..21804c4 + * This function handles the Connector ID Status Change Interrupt. It + * reads the OTG Interrupt Register (GOTCTL) to determine whether this + * is a Device to Host Mode transition or a Host Mode to Device -+ * Transition. ++ * Transition. + * + * This only occurs when the cable is connected/removed from the PHY + * connector. @@ -38360,7 +38839,7 @@ index 0000000..21804c4 + DWC_DEBUGPL(DBG_CIL, + " ++Connector ID Status Change Interrupt++ (%s)\n", + (dwc_otg_is_host_mode(core_if) ? "Host" : "Device")); -+ ++ + DWC_SPINUNLOCK(core_if->lock); + + /* @@ -38702,24 +39181,24 @@ index 0000000..21804c4 + uint8_t is_host = 0; + DWC_SPINUNLOCK(core_if->lock); + /* Change the core_if's lock to hcd/pcd lock depend on mode? */ -+#ifndef DWC_HOST_ONLY ++#ifndef DWC_HOST_ONLY + if (gpwrdn_temp.b.idsts) + core_if->lock = otg_dev->pcd->lock; +#endif +#ifndef DWC_DEVICE_ONLY + if (!gpwrdn_temp.b.idsts) { -+ core_if->lock = otg_dev->hcd->lock; ++ core_if->lock = otg_dev->hcd->lock; + is_host = 1; + } +#endif + DWC_PRINTF("RESTART ADP\n"); -+ if (core_if->adp.probe_enabled) ++ if (core_if->adp.probe_enabled) + dwc_otg_adp_probe_stop(core_if); -+ if (core_if->adp.sense_enabled) ++ if (core_if->adp.sense_enabled) + dwc_otg_adp_sense_stop(core_if); -+ if (core_if->adp.sense_timer_started) ++ if (core_if->adp.sense_timer_started) + DWC_TIMER_CANCEL(core_if->adp.sense_timer); -+ if (core_if->adp.vbuson_timer_started) ++ if (core_if->adp.vbuson_timer_started) + DWC_TIMER_CANCEL(core_if->adp.vbuson_timer); + core_if->adp.probe_timer_values[0] = -1; + core_if->adp.probe_timer_values[1] = -1; @@ -38727,7 +39206,7 @@ index 0000000..21804c4 + core_if->adp.vbuson_timer_started = 0; + core_if->adp.probe_counter = 0; + core_if->adp.gpwrdn = 0; -+ ++ + /* Disable PMU and restart ADP */ + gpwrdn_temp.d32 = 0; + gpwrdn_temp.b.pmuactv = 1; @@ -38738,7 +39217,7 @@ index 0000000..21804c4 + dwc_otg_adp_start(core_if, is_host); + DWC_SPINLOCK(core_if->lock); + } -+ ++ + + return 1; +} @@ -38814,7 +39293,7 @@ index 0000000..21804c4 + /* + * Initiate SRP after initial ADP probe. + */ -+ dwc_otg_initiate_srp(core_if); ++ dwc_otg_initiate_srp(core_if); + } + } + @@ -38832,7 +39311,7 @@ index 0000000..21804c4 + dwc_otg_core_if_t *core_if = otg_dev->core_if; + + DWC_PRINTF("%s called\n", __FUNCTION__); -+ ++ + if (core_if->power_down == 2) { + if (core_if->hibernation_suspend <= 0) { + DWC_PRINTF("Already exited from Hibernation\n"); @@ -38845,7 +39324,7 @@ index 0000000..21804c4 + } + + gpwrdn.d32 = DWC_READ_REG32(&core_if->core_global_regs->gpwrdn); -+ ++ + if (gpwrdn.b.idsts ^ gpwrdn_temp.b.idsts) { + retval = dwc_otg_handle_pwrdn_idsts_change(otg_dev); + } else if (gpwrdn.b.bsessvld ^ gpwrdn_temp.b.bsessvld) { @@ -39372,7 +39851,7 @@ index 0000000..21804c4 + gintsts.d32, gintmsk.d32); + } +#endif -+ if (gahbcfg.b.glblintrmsk) ++ if (gahbcfg.b.glblintrmsk) + return ((gintsts.d32 & gintmsk.d32) & gintmsk_common.d32); + else + return 0; @@ -39413,7 +39892,7 @@ index 0000000..21804c4 + gpwrdn.d32 = DWC_READ_REG32(&core_if->core_global_regs->gpwrdn); + if (dwc_otg_is_device_mode(core_if)) + core_if->frame_num = dwc_otg_get_frame_number(core_if); -+ ++ + if (core_if->lock) + DWC_SPINLOCK(core_if->lock); + @@ -39540,7 +40019,7 @@ index 0000000..21804c4 + + retval |= 1; + } -+ if (gpwrdn.b.lnstschng && gpwrdn.b.lnstchng_msk) { ++ if (gpwrdn.b.lnstschng && gpwrdn.b.lnstchng_msk) { + CLEAR_GPWRDN_INTR(core_if, lnstschng); + /* remote wakeup from hibernation */ + if (gpwrdn.b.linestate == 2 || gpwrdn.b.linestate == 1) { @@ -39549,7 +40028,7 @@ index 0000000..21804c4 + DWC_PRINTF("gpwrdn.linestate = %d\n", gpwrdn.b.linestate); + } + retval |= 1; -+ } ++ } + if (gpwrdn.b.rst_det && gpwrdn.b.rst_det_msk) { + CLEAR_GPWRDN_INTR(core_if, rst_det); + if (gpwrdn.b.linestate == 0) { @@ -39584,7 +40063,7 @@ index 0000000..21804c4 +} diff --git a/drivers/usb/host/dwc_otg/dwc_otg_core_if.h b/drivers/usb/host/dwc_otg/dwc_otg_core_if.h new file mode 100644 -index 0000000..10b68c4 +index 0000000..4138fd1 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_core_if.h @@ -0,0 +1,705 @@ @@ -39901,7 +40380,7 @@ index 0000000..10b68c4 + int32_t val); +extern int32_t dwc_otg_get_param_phy_utmi_width(dwc_otg_core_if_t * core_if); +//#define dwc_param_phy_utmi_width_default 16 -+#define dwc_param_phy_utmi_width_default 8 // Broadcom BCM2708 ++#define dwc_param_phy_utmi_width_default 8 // Broadcom BCM2708 + +/** + * Specifies whether the ULPI operates at double or single @@ -40295,7 +40774,7 @@ index 0000000..10b68c4 +#endif /* __DWC_CORE_IF_H__ */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_dbg.h b/drivers/usb/host/dwc_otg/dwc_otg_dbg.h new file mode 100644 -index 0000000..8681aa9 +index 0000000..8900318 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_dbg.h @@ -0,0 +1,116 @@ @@ -40304,7 +40783,7 @@ index 0000000..8681aa9 + * Synopsys HS OTG Linux Software Driver and documentation (hereinafter, + * "Software") is an Unsupported proprietary work of Synopsys, Inc. unless + * otherwise expressly agreed to in writing between Synopsys and you. -+ * ++ * + * The Software IS NOT an item of Licensed Software or Licensed Product under + * any End User Software License Agreement or Agreement for Licensed Product + * with Synopsys or any supplement thereto. You are permitted to use and @@ -40314,7 +40793,7 @@ index 0000000..8681aa9 + * any information contained herein except pursuant to this license grant from + * Synopsys. If you do not agree with this notice, including the disclaimer + * below, then you are not authorized to use the Software. -+ * ++ * + * THIS SOFTWARE IS BEING DISTRIBUTED BY SYNOPSYS SOLELY ON AN "AS IS" BASIS + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -40333,7 +40812,7 @@ index 0000000..8681aa9 + +/** @file + * This file defines debug levels. -+ * Debugging support vanishes in non-debug builds. ++ * Debugging support vanishes in non-debug builds. + */ + +/** @@ -40382,7 +40861,7 @@ index 0000000..8681aa9 +/** Prefix string for DWC_DEBUG print macros. */ +#define USB_DWC "DWC_otg: " + -+/** ++/** + * Print a debug message when the Global debug level variable contains + * the bit defined in lvl. + * @@ -40394,7 +40873,7 @@ index 0000000..8681aa9 + * DWC_DEBUGPL( DBG_ANY, "%s(%p)\n", __func__, _reg_base_addr); + * + *
-+ * results in:
++ * results in:
+ * + * usb-DWC_otg: dwc_otg_cil_init(ca867000) + * @@ -40417,7 +40896,7 @@ index 0000000..8681aa9 +#endif diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_otg/dwc_otg_driver.c new file mode 100644 -index 0000000..e7f99e1 +index 0000000..dcfbd66 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c @@ -0,0 +1,1700 @@ @@ -40992,11 +41471,11 @@ index 0000000..e7f99e1 + * @param _dev + */ +#ifdef LM_INTERFACE -+#define REM_RETVAL(n) ++#define REM_RETVAL(n) +static void dwc_otg_driver_remove( struct lm_device *_dev ) +{ dwc_otg_device_t *otg_dev = lm_get_drvdata(_dev); +#elif defined(PCI_INTERFACE) -+#define REM_RETVAL(n) ++#define REM_RETVAL(n) +static void dwc_otg_driver_remove( struct pci_dev *_dev ) +{ dwc_otg_device_t *otg_dev = pci_get_drvdata(_dev); +#elif defined(PLATFORM_INTERFACE) @@ -41041,7 +41520,7 @@ index 0000000..e7f99e1 + } else { + DWC_DEBUGPL(DBG_ANY, "%s: There is no installed irq!\n", __func__); + return REM_RETVAL(-ENXIO); -+ } ++ } + + if (otg_dev->core_if) { + dwc_otg_cil_remove(otg_dev->core_if); @@ -41119,7 +41598,7 @@ index 0000000..e7f99e1 + } + dev_dbg(&_dev->dev, "start=0x%08x\n", (unsigned)pci_resource_start(_dev,0)); + /* other stuff needed as well? */ -+ ++ +#elif defined(PLATFORM_INTERFACE) + dev_dbg(&_dev->dev, "start=0x%08x (len 0x%x)\n", + (unsigned)_dev->resource->start, @@ -41248,7 +41727,7 @@ index 0000000..e7f99e1 + dwc_otg_device->core_if = dwc_otg_cil_init(dwc_otg_device->os_dep.base); + DWC_DEBUGPL(DBG_HCDV, "probe of device %p given core_if %p\n", + dwc_otg_device, dwc_otg_device->core_if);//GRAYG -+ ++ + if (!dwc_otg_device->core_if) { + dev_err(&_dev->dev, "CIL initialization failed!\n"); + retval = -ENOMEM; @@ -41297,7 +41776,7 @@ index 0000000..e7f99e1 + * Install the interrupt handler for the common interrupts before + * enabling common interrupts in core_init below. + */ -+ ++ +#if defined(PLATFORM_INTERFACE) + devirq = platform_get_irq(_dev, 0); +#else @@ -41329,13 +41808,13 @@ index 0000000..e7f99e1 + ); +#endif +#endif /*IRQF_TRIGGER_LOW*/ -+ ++ + /* + * Initialize the DWC_otg core. + */ + dev_dbg(&_dev->dev, "Calling dwc_otg_core_init\n"); + dwc_otg_core_init(dwc_otg_device->core_if); -+ ++ +#ifndef DWC_HOST_ONLY + /* + * Initialize the PCD @@ -41346,7 +41825,7 @@ index 0000000..e7f99e1 + DWC_ERROR("pcd_init failed\n"); + dwc_otg_device->pcd = NULL; + goto fail; -+ } ++ } +#endif +#ifndef DWC_DEVICE_ONLY + /* @@ -41372,15 +41851,15 @@ index 0000000..e7f99e1 + + /* + * Enable the global interrupt after all the interrupt -+ * handlers are installed if there is no ADP support else ++ * handlers are installed if there is no ADP support else + * perform initial actions required for Internal ADP logic. + */ -+ if (!dwc_otg_get_param_adp_enable(dwc_otg_device->core_if)) { ++ if (!dwc_otg_get_param_adp_enable(dwc_otg_device->core_if)) { + dev_dbg(&_dev->dev, "Calling enable_global_interrupts\n"); + dwc_otg_enable_global_interrupts(dwc_otg_device->core_if); + dev_dbg(&_dev->dev, "Done\n"); + } else -+ dwc_otg_adp_start(dwc_otg_device->core_if, ++ dwc_otg_adp_start(dwc_otg_device->core_if, + dwc_otg_is_host_mode(dwc_otg_device->core_if)); + + return 0; @@ -41445,10 +41924,10 @@ index 0000000..e7f99e1 + .name = (char *)dwc_driver_name, + }, + .id_table = platform_ids, -+ ++ + .probe = dwc_otg_driver_probe, + .remove = dwc_otg_driver_remove, -+ // no 'shutdown', 'suspend', 'resume', 'suspend_late' or 'resume_early' ++ // no 'shutdown', 'suspend', 'resume', 'suspend_late' or 'resume_early' +}; +#endif + @@ -41964,7 +42443,7 @@ index 0000000..e7f99e1 + - 0: Disabled (default) + - 1: Enabled + -+ ++ + + en_multiple_tx_fifo + Specifies whether dedicatedto tx fifos are enabled for non periodic IN EPs. @@ -41995,7 +42474,7 @@ index 0000000..e7f99e1 + + + thr_ctl -+ Specifies whether to enable Thresholding for Device mode. Bits 0, 1, 2 of ++ Specifies whether to enable Thresholding for Device mode. Bits 0, 1, 2 of + this parmater specifies if thresholding is enabled for non-Iso Tx, Iso Tx and + Rx transfers accordingly. + The driver will automatically detect the value for this parameter if none is @@ -42048,7 +42527,7 @@ index 0000000..e7f99e1 + The driver will automatically detect the value for this parameter if none is + specified. + - 0: IC_USB disabled (default, if available) -+ - 1: IC_USB enable ++ - 1: IC_USB enable + + + @@ -42065,7 +42544,7 @@ index 0000000..e7f99e1 + - 0: Power Down disabled (default) + - 2: Power Down enabled + -+ ++ + + reload_ctl + Specifies whether dynamic reloading of the HFIR register is allowed during @@ -42087,9 +42566,9 @@ index 0000000..e7f99e1 + + + cont_on_bna -+ Specifies whether Enable Continue on BNA enabled or no. ++ Specifies whether Enable Continue on BNA enabled or no. + After receiving BNA interrupt the core disables the endpoint,when the -+ endpoint is re-enabled by the application the ++ endpoint is re-enabled by the application the + - 0: Core starts processing from the DOEPDMA descriptor (default) + - 1: Core starts processing from the descriptor which received the BNA. + This parameter is valid only when OTG_EN_DESC_DMA == 1b1. @@ -42098,7 +42577,7 @@ index 0000000..e7f99e1 + + ahb_single + This bit when programmed supports SINGLE transfers for remainder data -+ in a transfer for DMA mode of operation. ++ in a transfer for DMA mode of operation. + - 0: The remainder data will be sent using INCR burst size (default) + - 1: The remainder data will be sent using SINGLE burst size. + @@ -42117,13 +42596,13 @@ index 0000000..e7f99e1 + Specifies whether OTG is performing as USB OTG Revision 2.0 or Revision 1.3 + USB OTG device. + - 0: OTG 2.0 support disabled (default) -+ - 1: OTG 2.0 support enabled ++ - 1: OTG 2.0 support enabled + + +*/ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.h b/drivers/usb/host/dwc_otg/dwc_otg_driver.h new file mode 100644 -index 0000000..8a0e41b +index 0000000..6a8be63 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.h @@ -0,0 +1,86 @@ @@ -42136,7 +42615,7 @@ index 0000000..8a0e41b + * Synopsys HS OTG Linux Software Driver and documentation (hereinafter, + * "Software") is an Unsupported proprietary work of Synopsys, Inc. unless + * otherwise expressly agreed to in writing between Synopsys and you. -+ * ++ * + * The Software IS NOT an item of Licensed Software or Licensed Product under + * any End User Software License Agreement or Agreement for Licensed Product + * with Synopsys or any supplement thereto. You are permitted to use and @@ -42146,7 +42625,7 @@ index 0000000..8a0e41b + * any information contained herein except pursuant to this license grant from + * Synopsys. If you do not agree with this notice, including the disclaimer + * below, then you are not authorized to use the Software. -+ * ++ * + * THIS SOFTWARE IS BEING DISTRIBUTED BY SYNOPSYS SOLELY ON AN "AS IS" BASIS + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -42197,8 +42676,8 @@ index 0000000..8a0e41b + +} dwc_otg_device_t; + -+/*We must clear S3C24XX_EINTPEND external interrupt register -+ * because after clearing in this register trigerred IRQ from ++/*We must clear S3C24XX_EINTPEND external interrupt register ++ * because after clearing in this register trigerred IRQ from + * H/W core in kernel interrupt can be occured again before OTG + * handlers clear all IRQ sources of Core registers because of + * timing latencies and Low Level IRQ Type. @@ -42215,7 +42694,7 @@ index 0000000..8a0e41b +#endif diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c new file mode 100644 -index 0000000..434d0c4 +index 0000000..ab935c0 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -0,0 +1,3473 @@ @@ -42657,7 +43136,7 @@ index 0000000..434d0c4 + hprt0_data_t hprt0 = {.d32 = 0 }; + + DWC_DEBUGPL(DBG_HCD, "DWC OTG HCD STOP\n"); -+ ++ + /* + * The root hub should be disconnected before this function is called. + * The disconnect will clear the QTD lists (via ..._hcd_urb_dequeue) @@ -42752,16 +43231,16 @@ index 0000000..434d0c4 + DWC_ERROR("**** DWC OTG HCD URB Dequeue has NULL HCD\n"); + return -DWC_E_INVALID; + } -+ if (dwc_otg_urb == NULL) { ++ if (dwc_otg_urb == NULL) { + DWC_ERROR("**** DWC OTG HCD URB Dequeue has NULL URB\n"); + return -DWC_E_INVALID; + } -+ if (dwc_otg_urb->qtd == NULL) { ++ if (dwc_otg_urb->qtd == NULL) { + DWC_ERROR("**** DWC OTG HCD URB Dequeue with NULL QTD\n"); + return -DWC_E_INVALID; + } + urb_qtd = dwc_otg_urb->qtd; -+ if (urb_qtd->qh == NULL) { ++ if (urb_qtd->qh == NULL) { + DWC_ERROR("**** DWC OTG HCD URB Dequeue with QTD with NULL Q handler\n"); + return -DWC_E_INVALID; + } @@ -42919,8 +43398,8 @@ index 0000000..434d0c4 + return; + } + /* -+ * Hold spinlock here. Not needed in that case if bellow -+ * function is being called from ISR ++ * Hold spinlock here. Not needed in that case if bellow ++ * function is being called from ISR + */ + DWC_SPINLOCK_IRQSAVE(hcd->lock, &flags); + /* Ensure there are no QTDs or URBs left. */ @@ -43133,7 +43612,7 @@ index 0000000..434d0c4 + hcd->core_if->pwron_timer = DWC_TIMER_ALLOC("PWRON TIMER", + dwc_otg_hcd_power_up, core_if); + } -+#endif ++#endif + + /* + * Allocate space for storing data on status transactions. Normally no @@ -43231,7 +43710,7 @@ index 0000000..434d0c4 + void* ptr = NULL; + + qtd = DWC_CIRCLEQ_FIRST(&qh->qtd_list); -+ ++ + urb = qtd->urb; + + DWC_DEBUGPL(DBG_HCDV, "%s(%p,%p) - urb %x, actual_length %d\n", __func__, hcd, qh, (unsigned int)urb, urb->actual_length); @@ -43408,12 +43887,12 @@ index 0000000..434d0c4 + } + break; + } -+ /* non DWORD-aligned buffer case */ ++ /* non DWORD-aligned buffer case */ + if (ptr) { + uint32_t buf_size; + if (hc->ep_type != DWC_OTG_EP_TYPE_ISOC) { + buf_size = hcd->core_if->core_params->max_transfer_size; -+ } else { ++ } else { + buf_size = 4096; + } + if (!qh->dw_align_buf) { @@ -44594,9 +45073,9 @@ index 0000000..434d0c4 + port_status |= (1 << UHF_PORT_L1); + } + /* -+ For Synopsys HW emulation of Power down wkup_control asserts the -+ hreset_n and prst_n on suspned. This causes the HPRT0 to be zero. -+ We intentionally tell the software that port is in L2Suspend state. ++ For Synopsys HW emulation of Power down wkup_control asserts the ++ hreset_n and prst_n on suspned. This causes the HPRT0 to be zero. ++ We intentionally tell the software that port is in L2Suspend state. + Only for STE. + */ + if ((core_if->power_down == 2) @@ -44706,7 +45185,7 @@ index 0000000..434d0c4 + DWC_MODIFY_REG32(core_if->pcgcctl, 0, pcgcctl.d32); + dwc_udelay(10); + } -+#ifdef DWC_DEV_SRPCAP ++#ifdef DWC_DEV_SRPCAP + gpwrdn.d32 = 0; + gpwrdn.b.dis_vbus = 1; + DWC_MODIFY_REG32(&core_if->core_global_regs-> @@ -45282,7 +45761,7 @@ index 0000000..434d0c4 + int retval = 0; + + hcd->fops = fops; -+ if (!dwc_otg_is_device_mode(hcd->core_if) && ++ if (!dwc_otg_is_device_mode(hcd->core_if) && + (!hcd->core_if->adp_enable || hcd->core_if->adp.adp_started)) { + dwc_otg_hcd_reinit(hcd); + } else { @@ -45513,11 +45992,11 @@ index 0000000..434d0c4 + if (hc->xfer_started && hc->qh) { + dwc_otg_qtd_t *qtd; + dwc_otg_hcd_urb_t *urb; -+ ++ + DWC_CIRCLEQ_FOREACH(qtd, &hc->qh->qtd_list, qtd_list_entry) { + if (!qtd->in_process) + break; -+ ++ + urb = qtd->urb; + DWC_PRINTF(" URB Info:\n"); + DWC_PRINTF(" qtd: %p, urb: %p\n", qtd, urb); @@ -45694,7 +46173,7 @@ index 0000000..434d0c4 +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h new file mode 100644 -index 0000000..8075595 +index 0000000..bb4f67a --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h @@ -0,0 +1,824 @@ @@ -45944,8 +46423,8 @@ index 0000000..8075595 + /** Number of DMA descriptors for this QTD */ + uint8_t n_desc; + -+ /** -+ * Last activated frame(packet) index. ++ /** ++ * Last activated frame(packet) index. + * Used in Descriptor DMA mode only. + */ + uint16_t isoc_frame_index_last; @@ -46026,8 +46505,8 @@ index 0000000..8075595 + + /** @} */ + -+ /** -+ * Used instead of original buffer if ++ /** ++ * Used instead of original buffer if + * it(physical address) is not dword-aligned. + */ + uint8_t *dw_align_buf; @@ -46045,9 +46524,9 @@ index 0000000..8075595 + /** Descriptor List physical address. */ + dwc_dma_t desc_list_dma; + -+ /** ++ /** + * Xfer Bytes array. -+ * Each element corresponds to a descriptor and indicates ++ * Each element corresponds to a descriptor and indicates + * original XferSize size value for the descriptor. + */ + uint32_t *n_bytes; @@ -46384,8 +46863,8 @@ index 0000000..8075595 + DWC_CIRCLEQ_REMOVE(&qh->qtd_list, qtd, qtd_list_entry); +} + -+/** Remove and free a QTD -+ * Need to disable IRQ and hold hcd lock while calling this function out of ++/** Remove and free a QTD ++ * Need to disable IRQ and hold hcd lock while calling this function out of + * interrupt servicing chain */ +static inline void dwc_otg_hcd_qtd_remove_and_free(dwc_otg_hcd_t * hcd, + dwc_otg_qtd_t * qtd, @@ -46524,7 +47003,7 @@ index 0000000..8075595 +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c new file mode 100644 -index 0000000..d0d5fa1 +index 0000000..274967b --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c @@ -0,0 +1,1133 @@ @@ -46616,7 +47095,7 @@ index 0000000..d0d5fa1 + if (!qh->desc_list) { + retval = -DWC_E_NO_MEMORY; + DWC_ERROR("%s: DMA descriptor list allocation failed\n", __func__); -+ ++ + } + + dwc_memset(qh->desc_list, 0x00, @@ -46672,7 +47151,7 @@ index 0000000..d0d5fa1 +{ + if (!hcd->frame_list) + return; -+ ++ + DWC_DMA_FREE(4 * MAX_FRLIST_EN_NUM, hcd->frame_list, hcd->frame_list_dma); + hcd->frame_list = NULL; +} @@ -46721,7 +47200,7 @@ index 0000000..d0d5fa1 + hcfg_data_t hcfg; + + hcfg.d32 = DWC_READ_REG32(&hcd->core_if->host_if->host_global_regs->hcfg); -+ ++ + if (!hcfg.b.perschedena) { + /* already disabled */ + return; @@ -46732,8 +47211,8 @@ index 0000000..d0d5fa1 + DWC_WRITE_REG32(&hcd->core_if->host_if->host_global_regs->hcfg, hcfg.d32); +} + -+/* -+ * Activates/Deactivates FrameList entries for the channel ++/* ++ * Activates/Deactivates FrameList entries for the channel + * based on endpoint servicing period. + */ +void update_frame_list(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh, uint8_t enable) @@ -46819,7 +47298,7 @@ index 0000000..d0d5fa1 + } else + update_frame_list(hcd, qh, 0); + -+ /* ++ /* + * The condition is added to prevent double cleanup try in case of device + * disconnect. See channel cleanup in dwc_otg_hcd_disconnect_cb(). + */ @@ -46839,10 +47318,10 @@ index 0000000..d0d5fa1 + DWC_SPINLOCK_FREE(channel_lock); +} + -+/** ++/** + * Initializes a QH structure's Descriptor DMA related members. + * Allocates memory for descriptor list. -+ * On first periodic QH, allocates memory for FrameList ++ * On first periodic QH, allocates memory for FrameList + * and enables periodic scheduling. + * + * @param hcd The HCD state structure for the DWC OTG controller. @@ -46856,8 +47335,8 @@ index 0000000..d0d5fa1 + + if (qh->do_split) { + DWC_ERROR("SPLIT Transfers are not supported in Descriptor DMA.\n"); -+ return -1; -+ } ++ return -1; ++ } + + retval = desc_list_alloc(qh); + @@ -46876,10 +47355,10 @@ index 0000000..d0d5fa1 + return retval; +} + -+/** -+ * Frees descriptor list memory associated with the QH. -+ * If QH is periodic and the last, frees FrameList memory -+ * and disables periodic scheduling. ++/** ++ * Frees descriptor list memory associated with the QH. ++ * If QH is periodic and the last, frees FrameList memory ++ * and disables periodic scheduling. + * + * @param hcd The HCD state structure for the DWC OTG controller. + * @param qh The QH to init. @@ -46888,8 +47367,8 @@ index 0000000..d0d5fa1 +{ + desc_list_free(qh); + -+ /* -+ * Channel still assigned due to some reasons. ++ /* ++ * Channel still assigned due to some reasons. + * Seen on Isoc URB dequeue. Channel halted but no subsequent + * ChHalted interrupt to release the channel. Afterwards + * when it comes here from endpoint disable routine @@ -46909,7 +47388,7 @@ index 0000000..d0d5fa1 +static uint8_t frame_to_desc_idx(dwc_otg_qh_t * qh, uint16_t frame_idx) +{ + if (qh->dev_speed == DWC_OTG_EP_SPEED_HIGH) { -+ /* ++ /* + * Descriptor set(8 descriptors) index + * which is 8-aligned. + */ @@ -46919,19 +47398,19 @@ index 0000000..d0d5fa1 + } +} + -+/* -+ * Determine starting frame for Isochronous transfer. -+ * Few frames skipped to prevent race condition with HC. ++/* ++ * Determine starting frame for Isochronous transfer. ++ * Few frames skipped to prevent race condition with HC. + */ +static uint8_t calc_starting_frame(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh, + uint8_t * skip_frames) +{ + uint16_t frame = 0; + hcd->frame_number = dwc_otg_hcd_get_frame_number(hcd); -+ ++ + /* sched_frame is always frame number(not uFrame) both in FS and HS !! */ -+ -+ /* ++ ++ /* + * skip_frames is used to limit activated descriptors number + * to avoid the situation when HC services the last activated + * descriptor firstly. @@ -46945,10 +47424,10 @@ index 0000000..d0d5fa1 + * up to 11 uframes(16 in the code) may be skipped. + */ + if (qh->dev_speed == DWC_OTG_EP_SPEED_HIGH) { -+ /* ++ /* + * Consider uframe counter also, to start xfer asap. + * If half of the frame elapsed skip 2 frames otherwise -+ * just 1 frame. ++ * just 1 frame. + * Starting descriptor index must be 8-aligned, so + * if the current frame is near to complete the next one + * is skipped as well. @@ -46956,7 +47435,7 @@ index 0000000..d0d5fa1 + + if (dwc_micro_frame_num(hcd->frame_number) >= 5) { + *skip_frames = 2 * 8; -+ frame = dwc_frame_num_inc(hcd->frame_number, *skip_frames); ++ frame = dwc_frame_num_inc(hcd->frame_number, *skip_frames); + } else { + *skip_frames = 1 * 8; + frame = dwc_frame_num_inc(hcd->frame_number, *skip_frames); @@ -46964,7 +47443,7 @@ index 0000000..d0d5fa1 + + frame = dwc_full_frame_num(frame); + } else { -+ /* ++ /* + * Two frames are skipped for FS - the current and the next. + * But for descriptor programming, 1 frame(descriptor) is enough, + * see example above. @@ -46976,23 +47455,23 @@ index 0000000..d0d5fa1 + return frame; +} + -+/* ++/* + * Calculate initial descriptor index for isochronous transfer -+ * based on scheduled frame. ++ * based on scheduled frame. + */ +static uint8_t recalc_initial_desc_idx(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) +{ + uint16_t frame = 0, fr_idx, fr_idx_tmp; + uint8_t skip_frames = 0; -+ /* ++ /* + * With current ISOC processing algorithm the channel is being + * released when no more QTDs in the list(qh->ntd == 0). -+ * Thus this function is called only when qh->ntd == 0 and qh->channel == 0. ++ * Thus this function is called only when qh->ntd == 0 and qh->channel == 0. + * + * So qh->channel != NULL branch is not used and just not removed from the + * source file. It is required for another possible approach which is, -+ * do not disable and release the channel when ISOC session completed, -+ * just move QH to inactive schedule until new QTD arrives. ++ * do not disable and release the channel when ISOC session completed, ++ * just move QH to inactive schedule until new QTD arrives. + * On new QTD, the QH moved back to 'ready' schedule, + * starting frame and therefore starting desc_index are recalculated. + * In this case channel is released only on ep_disable. @@ -47001,7 +47480,7 @@ index 0000000..d0d5fa1 + /* Calculate starting descriptor index. For INTERRUPT endpoint it is always 0. */ + if (qh->channel) { + frame = calc_starting_frame(hcd, qh, &skip_frames); -+ /* ++ /* + * Calculate initial descriptor index based on FrameList current bitmap + * and servicing period. + */ @@ -47073,8 +47552,8 @@ index 0000000..d0d5fa1 + qtd->isoc_frame_index_last++; + +#ifdef ISOC_URB_GIVEBACK_ASAP -+ /* -+ * Set IOC for each descriptor corresponding to the ++ /* ++ * Set IOC for each descriptor corresponding to the + * last frame of the URB. + */ + if (qtd->isoc_frame_index_last == @@ -47098,25 +47577,25 @@ index 0000000..d0d5fa1 + qh->desc_list[idx].status.b_isoc.ioc = 1; + } +#else -+ /* -+ * Set IOC bit only for one descriptor. ++ /* ++ * Set IOC bit only for one descriptor. + * Always try to be ahead of HW processing, + * i.e. on IOC generation driver activates next descriptors but + * core continues to process descriptors followed the one with IOC set. + */ + + if (n_desc > DESCNUM_THRESHOLD) { -+ /* -+ * Move IOC "up". Required even if there is only one QTD ++ /* ++ * Move IOC "up". Required even if there is only one QTD + * in the list, cause QTDs migth continue to be queued, + * but during the activation it was only one queued. -+ * Actually more than one QTD might be in the list if this function called ++ * Actually more than one QTD might be in the list if this function called + * from XferCompletion - QTDs was queued during HW processing of the previous + * descriptor chunk. + */ + idx = dwc_desclist_idx_dec(idx, inc * ((qh->ntd + 1) / 2), qh->dev_speed); + } else { -+ /* ++ /* + * Set the IOC for the latest descriptor + * if either number of descriptor is not greather than threshold + * or no more new descriptors activated. @@ -47138,8 +47617,8 @@ index 0000000..d0d5fa1 + + hc = qh->channel; + -+ /* -+ * Start with hc->xfer_buff initialized in ++ /* ++ * Start with hc->xfer_buff initialized in + * assign_and_init_hc(), then if SG transfer consists of multiple URBs, + * this pointer re-assigned to the buffer of the currently processed QTD. + * For non-SG request there is always one QTD active. @@ -47149,7 +47628,7 @@ index 0000000..d0d5fa1 + + if (n_desc) { + /* SG request - more than 1 QTDs */ -+ hc->xfer_buff = (uint8_t *)qtd->urb->dma + qtd->urb->actual_length; ++ hc->xfer_buff = (uint8_t *)qtd->urb->dma + qtd->urb->actual_length; + hc->xfer_len = qtd->urb->length - qtd->urb->actual_length; + } + @@ -47187,8 +47666,8 @@ index 0000000..d0d5fa1 + dma_desc->buf = + ((unsigned long)hc->xfer_buff & 0xffffffff); + -+ /* -+ * Last descriptor(or single) of IN transfer ++ /* ++ * Last descriptor(or single) of IN transfer + * with actual size less than MaxPacket. + */ + if (len > hc->xfer_len) { @@ -47202,7 +47681,7 @@ index 0000000..d0d5fa1 + n_desc++; + } + while ((hc->xfer_len > 0) && (n_desc != MAX_DMA_DESC_NUM_GENERIC)); -+ ++ + + qtd->in_process = 1; + @@ -47223,7 +47702,7 @@ index 0000000..d0d5fa1 + } +} + -+/** ++/** + * For Control and Bulk endpoints initializes descriptor list + * and starts the transfer. + * @@ -47231,8 +47710,8 @@ index 0000000..d0d5fa1 + * then updates FrameList, marking appropriate entries as active. + * In case of Isochronous, the starting descriptor index is calculated based + * on the scheduled frame, but only on the first transfer descriptor within a session. -+ * Then starts the transfer via enabling the channel. -+ * For Isochronous endpoint the channel is not halted on XferComplete ++ * Then starts the transfer via enabling the channel. ++ * For Isochronous endpoint the channel is not halted on XferComplete + * interrupt so remains assigned to the endpoint(QH) until session is done. + * + * @param hcd The HCD state structure for the DWC OTG controller. @@ -47271,9 +47750,9 @@ index 0000000..d0d5fa1 + + update_frame_list(hcd, qh, 1); + -+ /* ++ /* + * Always set to max, instead of actual size. -+ * Otherwise ntd will be changed with ++ * Otherwise ntd will be changed with + * channel being enabled. Not recommended. + * + */ @@ -47310,10 +47789,10 @@ index 0000000..d0d5fa1 + return; + } else if ((halt_status == DWC_OTG_HC_XFER_AHB_ERR) || + (halt_status == DWC_OTG_HC_XFER_BABBLE_ERR)) { -+ /* ++ /* + * Channel is halted in these error cases. + * Considered as serious issues. -+ * Complete all URBs marking all frames as failed, ++ * Complete all URBs marking all frames as failed, + * irrespective whether some of the descriptors(frames) succeeded or no. + * Pass error code to completion routine as well, to + * update urb->status, some of class drivers might use it to stop @@ -47322,7 +47801,7 @@ index 0000000..d0d5fa1 + int err = (halt_status == DWC_OTG_HC_XFER_AHB_ERR) + ? (-DWC_E_IO) + : (-DWC_E_OVERFLOW); -+ ++ + DWC_CIRCLEQ_FOREACH_SAFE(qtd, qtd_tmp, &hc->qh->qtd_list, qtd_list_entry) { + for (idx = 0; idx < qtd->urb->packet_count; idx++) { + frame_desc = &qtd->urb->iso_descs[idx]; @@ -47344,14 +47823,14 @@ index 0000000..d0d5fa1 + do { + + dma_desc = &qh->desc_list[idx]; -+ ++ + frame_desc = &qtd->urb->iso_descs[qtd->isoc_frame_index]; + remain = hc->ep_is_in ? dma_desc->status.b_isoc.n_bytes : 0; + + if (dma_desc->status.b_isoc.sts == DMA_DESC_STS_PKTERR) { -+ /* -+ * XactError or, unable to complete all the transactions -+ * in the scheduled micro-frame/frame, ++ /* ++ * XactError or, unable to complete all the transactions ++ * in the scheduled micro-frame/frame, + * both indicated by DMA_DESC_STS_PKTERR. + */ + qtd->urb->error_count++; @@ -47359,7 +47838,7 @@ index 0000000..d0d5fa1 + frame_desc->status = -DWC_E_PROTOCOL; + } else { + /* Success */ -+ ++ + frame_desc->actual_length = qh->n_bytes[idx] - remain; + frame_desc->status = 0; + } @@ -47373,13 +47852,13 @@ index 0000000..d0d5fa1 + hcd->fops->complete(hcd, qtd->urb->priv, qtd->urb, 0); + dwc_otg_hcd_qtd_remove_and_free(hcd, qtd, qh); + -+ /* -+ * This check is necessary because urb_dequeue can be called ++ /* ++ * This check is necessary because urb_dequeue can be called + * from urb complete callback(sound driver example). + * All pending URBs are dequeued there, so no need for + * further processing. + */ -+ if (hc->halt_status == DWC_OTG_HC_XFER_URB_DEQUEUE) { ++ if (hc->halt_status == DWC_OTG_HC_XFER_URB_DEQUEUE) { + return; + } + @@ -47391,7 +47870,7 @@ index 0000000..d0d5fa1 + + /* Stop if IOC requested descriptor reached */ + if (dma_desc->status.b_isoc.ioc) { -+ idx = desclist_idx_inc(idx, qh->interval, hc->speed); ++ idx = desclist_idx_inc(idx, qh->interval, hc->speed); + goto stop_scan; + } + @@ -47432,9 +47911,9 @@ index 0000000..d0d5fa1 + case DWC_OTG_HC_XFER_XACT_ERR: + urb->status = -DWC_E_PROTOCOL; + break; -+ default: ++ default: + DWC_ERROR("%s: Unhandled descriptor error status (%d)\n", __func__, -+ halt_status); ++ halt_status); + break; + } + return 1; @@ -47451,7 +47930,7 @@ index 0000000..d0d5fa1 + if (qtd->control_phase == DWC_OTG_CONTROL_DATA) { + urb->actual_length += n_bytes - remain; + if (remain || urb->actual_length == urb->length) { -+ /* ++ /* + * For Control Data stage do not set urb->status=0 to prevent + * URB callback. Set it when Status phase done. See below. + */ @@ -47539,7 +48018,7 @@ index 0000000..d0d5fa1 + qtd->control_phase = DWC_OTG_CONTROL_STATUS; + DWC_DEBUGPL(DBG_HCDV, " Control data transfer done\n"); + } else if (i + 1 == qtd->n_desc) { -+ /* ++ /* + * Last descriptor for Control data stage which is + * not completed yet. + */ @@ -47556,9 +48035,9 @@ index 0000000..d0d5fa1 +stop_scan: + + if (qh->ep_type != UE_CONTROL) { -+ /* ++ /* + * Resetting the data toggle for bulk -+ * and interrupt endpoints in case of stall. See handle_hc_stall_intr() ++ * and interrupt endpoints in case of stall. See handle_hc_stall_intr() + */ + if (halt_status == DWC_OTG_HC_XFER_STALL) + qh->data_toggle = DWC_OTG_HC_PID_DATA0; @@ -47588,7 +48067,7 @@ index 0000000..d0d5fa1 + * Scans the descriptor list, updates URB's status and + * calls completion routine for the URB if it's done. + * Releases the channel to be used by other transfers. -+ * In case of Isochronous endpoint the channel is not halted until ++ * In case of Isochronous endpoint the channel is not halted until + * the end of the session, i.e. QTD list is empty. + * If periodic channel released the FrameList is updated accordingly. + * @@ -47597,7 +48076,7 @@ index 0000000..d0d5fa1 + * @param hcd The HCD state structure for the DWC OTG controller. + * @param hc Host channel, the transfer is completed on. + * @param hc_regs Host channel registers. -+ * @param halt_status Reason the channel is being halted, ++ * @param halt_status Reason the channel is being halted, + * or just XferComplete for isochronous transfer + */ +void dwc_otg_hcd_complete_xfer_ddma(dwc_otg_hcd_t * hcd, @@ -47632,7 +48111,7 @@ index 0000000..d0d5fa1 + + } + /** @todo Consider the case when period exceeds FrameList size. -+ * Frame Rollover interrupt should be used. ++ * Frame Rollover interrupt should be used. + */ + } else { + /* Scan descriptor list to complete the URB(s), then release the channel */ @@ -47663,7 +48142,7 @@ index 0000000..d0d5fa1 +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h new file mode 100644 -index 0000000..b3dc806 +index 0000000..4823167 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h @@ -0,0 +1,412 @@ @@ -47763,7 +48242,7 @@ index 0000000..b3dc806 + * @param core_if The DWC_OTG Core + * + * Returns -DWC_E_NO_MEMORY if no enough memory. -+ * Returns 0 on success ++ * Returns 0 on success + */ +extern int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd, dwc_otg_core_if_t * core_if); + @@ -47812,7 +48291,7 @@ index 0000000..b3dc806 + +/** + * Halts the DWC_otg host mode operations in a clean manner. USB transfers are -+ * stopped. ++ * stopped. + * + * @param hcd The HCD + */ @@ -47825,7 +48304,7 @@ index 0000000..b3dc806 + * @param typeReq Request Type + * @param wValue wValue from control request + * @param wIndex wIndex from control request -+ * @param buf data buffer ++ * @param buf data buffer + * @param wLength data buffer length + * + * Returns -DWC_E_INVALID if invalid argument is passed @@ -47982,7 +48461,7 @@ index 0000000..b3dc806 +/** Get status of ISOC descriptor, specified by desc_num + * + * @param dwc_otg_urb DWC_OTG URB -+ * @param desc_num ISOC descriptor number ++ * @param desc_num ISOC descriptor number + */ +extern uint32_t dwc_otg_hcd_urb_get_iso_desc_status(dwc_otg_hcd_urb_t * + dwc_otg_urb, int desc_num); @@ -48081,7 +48560,7 @@ index 0000000..b3dc806 +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c new file mode 100644 -index 0000000..63c1b55 +index 0000000..b41e164 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -0,0 +1,2106 @@ @@ -48428,7 +48907,7 @@ index 0000000..63c1b55 + + if (hprt0.b.prtconndet) { + /** @todo - check if steps performed in 'else' block should be perfromed regardles adp */ -+ if (dwc_otg_hcd->core_if->adp_enable && ++ if (dwc_otg_hcd->core_if->adp_enable && + dwc_otg_hcd->core_if->adp.vbuson_timer_started == 1) { + DWC_PRINTF("PORT CONNECT DETECTED ----------------\n"); + DWC_TIMER_CANCEL(dwc_otg_hcd->core_if->adp.vbuson_timer); @@ -48442,13 +48921,13 @@ index 0000000..63c1b55 + dwc_otg_enable_global_interrupts(dwc_otg_hcd->core_if); + cil_hcd_start(dwc_otg_hcd->core_if);*/ + } else { -+ ++ + DWC_DEBUGPL(DBG_HCD, "--Port Interrupt HPRT0=0x%08x " + "Port Connect Detected--\n", hprt0.d32); + dwc_otg_hcd->flags.b.port_connect_status_change = 1; + dwc_otg_hcd->flags.b.port_connect_status = 1; + hprt0_modify.b.prtconndet = 1; -+ ++ + /* B-Device has connected, Delete the connection timer. */ + DWC_TIMER_CANCEL(dwc_otg_hcd->conn_timer); + } @@ -48472,7 +48951,7 @@ index 0000000..63c1b55 + dwc_otg_hcd->core_if->core_global_regs; + dwc_otg_host_if_t *host_if = + dwc_otg_hcd->core_if->host_if; -+ ++ + /* Every time when port enables calculate + * HFIR.FrInterval + */ @@ -48700,7 +49179,7 @@ index 0000000..63c1b55 + xfer_done = 1; + urb->status = 0; + } -+ ++ +#ifdef DEBUG + { + hctsiz_data_t hctsiz; @@ -48781,7 +49260,7 @@ index 0000000..63c1b55 + dwc_memcpy(urb->buf + frame_desc->offset + qtd->isoc_split_offset, + hc->qh->dw_align_buf, frame_desc->actual_length); + } -+ ++ + break; + case DWC_OTG_HC_XFER_FRAME_OVERRUN: + urb->error_count++; @@ -49566,13 +50045,13 @@ index 0000000..63c1b55 + qtd->isoc_split_offset = 0; + if (++qtd->isoc_frame_index == qtd->urb->packet_count) { + hcd->fops->complete(hcd, qtd->urb->priv, qtd->urb, 0); -+ release_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_URB_COMPLETE); ++ release_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_URB_COMPLETE); + } + else -+ release_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_NO_HALT_STATUS); ++ release_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_NO_HALT_STATUS); + goto handle_nyet_done; + } -+ ++ + if (hc->ep_type == DWC_OTG_EP_TYPE_INTR || + hc->ep_type == DWC_OTG_EP_TYPE_ISOC) { + int frnum = dwc_otg_hcd_get_frame_number(hcd); @@ -50193,7 +50672,7 @@ index 0000000..63c1b55 +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c new file mode 100644 -index 0000000..4a985a6 +index 0000000..e4787f5 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c @@ -0,0 +1,893 @@ @@ -50322,10 +50801,10 @@ index 0000000..4a985a6 + + .flags = HCD_MEMORY | HCD_USB2, + -+ //.reset = ++ //.reset = + .start = hcd_start, -+ //.suspend = -+ //.resume = ++ //.suspend = ++ //.resume = + .stop = hcd_stop, + + .urb_enqueue = dwc_otg_urb_enqueue, @@ -50338,8 +50817,8 @@ index 0000000..4a985a6 + + .hub_status_data = hub_status_data, + .hub_control = hub_control, -+ //.bus_suspend = -+ //.bus_resume = ++ //.bus_suspend = ++ //.bus_resume = +}; + +/** Gets the dwc_otg_hcd from a struct usb_hcd */ @@ -50586,7 +51065,7 @@ index 0000000..4a985a6 + dmamask = DMA_BIT_MASK(32); + else + dmamask = 0; -+ ++ +#if defined(LM_INTERFACE) || defined(PLATFORM_INTERFACE) + dma_set_mask(&_dev->dev, dmamask); + dma_set_coherent_mask(&_dev->dev, dmamask); @@ -50644,7 +51123,7 @@ index 0000000..4a985a6 +#ifdef PLATFORM_INTERFACE + retval = usb_add_hcd(hcd, platform_get_irq(_dev, 0), IRQF_SHARED | IRQF_DISABLED); +#else -+ retval = usb_add_hcd(hcd, _dev->irq, IRQF_SHARED | IRQF_DISABLED); ++ retval = usb_add_hcd(hcd, _dev->irq, IRQF_SHARED | IRQF_DISABLED); +#endif + if (retval < 0) { + goto error2; @@ -50807,7 +51286,7 @@ index 0000000..4a985a6 + struct usb_host_endpoint *ep = urb->ep; +#endif +#if USB_URB_EP_LINKING -+ dwc_irqflags_t irqflags; ++ dwc_irqflags_t irqflags; +#endif + void **ref_ep_hcpriv = &ep->hcpriv; + dwc_otg_hcd_t *dwc_otg_hcd = hcd_to_dwc_otg_hcd(hcd); @@ -50863,7 +51342,7 @@ index 0000000..4a985a6 + urb->hcpriv = dwc_otg_urb; + if (!dwc_otg_urb && urb->number_of_packets) + return -ENOMEM; -+ ++ + dwc_otg_hcd_urb_set_pipeinfo(dwc_otg_urb, usb_pipedevice(urb->pipe), + usb_pipeendpoint(urb->pipe), ep_type, + usb_pipein(urb->pipe), @@ -50906,12 +51385,12 @@ index 0000000..4a985a6 + DWC_SPINLOCK_IRQSAVE(dwc_otg_hcd->lock, &irqflags); + retval = usb_hcd_link_urb_to_ep(hcd, urb); + DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, irqflags); -+ if (0 == retval) ++ if (0 == retval) +#endif + { + retval = dwc_otg_hcd_urb_enqueue(dwc_otg_hcd, dwc_otg_urb, + /*(dwc_otg_qh_t **)*/ -+ ref_ep_hcpriv, ++ ref_ep_hcpriv, + mem_flags == GFP_ATOMIC ? 1 : 0); + if (0 == retval) { + if (alloc_bandwidth) { @@ -50922,7 +51401,7 @@ index 0000000..4a985a6 + } + } else { +#if USB_URB_EP_LINKING -+ dwc_irqflags_t irqflags; ++ dwc_irqflags_t irqflags; + DWC_DEBUGPL(DBG_HCD, "DWC OTG dwc_otg_hcd_urb_enqueue failed rc %d\n", retval); + DWC_SPINLOCK_IRQSAVE(dwc_otg_hcd->lock, &irqflags); + usb_hcd_unlink_urb_from_ep(hcd, urb); @@ -50963,19 +51442,19 @@ index 0000000..4a985a6 + if (0 == rc) { + if(urb->hcpriv != NULL) { + dwc_otg_hcd_urb_dequeue(dwc_otg_hcd, -+ (dwc_otg_hcd_urb_t *)urb->hcpriv); ++ (dwc_otg_hcd_urb_t *)urb->hcpriv); + -+ DWC_FREE(urb->hcpriv); -+ urb->hcpriv = NULL; -+ } ++ DWC_FREE(urb->hcpriv); ++ urb->hcpriv = NULL; ++ } + } + + if (0 == rc) { -+ /* Higher layer software sets URB status. */ ++ /* Higher layer software sets URB status. */ +#if USB_URB_EP_LINKING + usb_hcd_unlink_urb_from_ep(hcd, urb); +#endif -+ DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, flags); ++ DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, flags); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) + usb_hcd_giveback_urb(hcd, urb); +#else @@ -50987,11 +51466,11 @@ index 0000000..4a985a6 + } + DWC_DEBUGPL(DBG_HCD, "DWC OTG HCD URB Dequeue OK\n"); + } else { -+ DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, flags); ++ DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, flags); + DWC_DEBUGPL(DBG_HCD, "DWC OTG HCD URB Dequeue failed - rc %d\n", + rc); + } -+ ++ + return rc; +} + @@ -51011,7 +51490,7 @@ index 0000000..4a985a6 +} + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30) -+/* Resets endpoint specific parameter values, in current version used to reset ++/* Resets endpoint specific parameter values, in current version used to reset + * the data toggle(as a WA). This function can be called from usb_clear_halt routine */ +static void endpoint_reset(struct usb_hcd *hcd, struct usb_host_endpoint *ep) +{ @@ -51092,7 +51571,7 @@ index 0000000..4a985a6 +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c new file mode 100644 -index 0000000..08c1669 +index 0000000..9761566 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c @@ -0,0 +1,922 @@ @@ -51105,7 +51584,7 @@ index 0000000..08c1669 + * Synopsys HS OTG Linux Software Driver and documentation (hereinafter, + * "Software") is an Unsupported proprietary work of Synopsys, Inc. unless + * otherwise expressly agreed to in writing between Synopsys and you. -+ * ++ * + * The Software IS NOT an item of Licensed Software or Licensed Product under + * any End User Software License Agreement or Agreement for Licensed Product + * with Synopsys or any supplement thereto. You are permitted to use and @@ -51115,7 +51594,7 @@ index 0000000..08c1669 + * any information contained herein except pursuant to this license grant from + * Synopsys. If you do not agree with this notice, including the disclaimer + * below, then you are not authorized to use the Software. -+ * ++ * + * THIS SOFTWARE IS BEING DISTRIBUTED BY SYNOPSYS SOLELY ON AN "AS IS" BASIS + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -51142,7 +51621,7 @@ index 0000000..08c1669 + +extern bool microframe_schedule; + -+/** ++/** + * Free each QTD in the QH's QTD-list then free the QH. QH should already be + * removed from a list. QTD list should already be empty if called from URB + * Dequeue. @@ -51243,13 +51722,13 @@ index 0000000..08c1669 + return NS_TO_US(retval); +} + -+/** ++/** + * Initializes a QH structure. + * + * @param hcd The HCD state structure for the DWC OTG controller. + * @param qh The QH to init. + * @param urb Holds the information about the device/endpoint that we need -+ * to initialize the QH. ++ * to initialize the QH. + */ +#define SCHEDULE_SLOP 10 +void qh_init(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh, dwc_otg_hcd_urb_t * urb) @@ -51270,7 +51749,7 @@ index 0000000..08c1669 + DWC_LIST_INIT(&qh->qh_list_entry); + qh->channel = NULL; + -+ /* FS/LS Enpoint on HS Hub ++ /* FS/LS Enpoint on HS Hub + * NOT virtual root hub */ + dev_speed = hcd->fops->speed(hcd, urb->priv); + @@ -51803,7 +52282,7 @@ index 0000000..08c1669 + } +} + -+/** ++/** + * Removes a QH from either the non-periodic or periodic schedule. Memory is + * not freed. + * @@ -51850,7 +52329,7 @@ index 0000000..08c1669 + */ +void dwc_otg_hcd_qh_deactivate(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh, + int sched_next_periodic_split) -+{ ++{ + if (dwc_qh_is_non_per(qh)) { + dwc_otg_hcd_qh_remove(hcd, qh); + if (!DWC_CIRCLEQ_EMPTY(&qh->qtd_list)) { @@ -51921,8 +52400,8 @@ index 0000000..08c1669 + } +} + -+/** -+ * This function allocates and initializes a QTD. ++/** ++ * This function allocates and initializes a QTD. + * + * @param urb The URB to create a QTD from. Each URB-QTD pair will end up + * pointing to each other so each pair should have a unique correlation. @@ -51942,7 +52421,7 @@ index 0000000..08c1669 + return qtd; +} + -+/** ++/** + * Initializes a QTD structure. + * + * @param qtd The QTD to initialize. @@ -52020,7 +52499,7 @@ index 0000000..08c1669 +#endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h b/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h new file mode 100644 -index 0000000..a7e9076 +index 0000000..e46d9bb --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h @@ -0,0 +1,185 @@ @@ -52130,7 +52609,7 @@ index 0000000..a7e9076 + + /** Start address of a PCI region */ + resource_size_t rsrc_start; -+ ++ + /** Length address of a PCI region */ + resource_size_t rsrc_len; +#elif defined(PLATFORM_INTERFACE) @@ -52211,7 +52690,7 @@ index 0000000..a7e9076 +#endif /* _DWC_OS_DEP_H_ */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd.c b/drivers/usb/host/dwc_otg/dwc_otg_pcd.c new file mode 100644 -index 0000000..c97d65c +index 0000000..40fb25c --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd.c @@ -0,0 +1,2708 @@ @@ -52299,7 +52778,7 @@ index 0000000..c97d65c + int32_t status) +{ + unsigned stopped = ep->stopped; -+ ++ + DWC_DEBUGPL(DBG_PCDV, "%s(ep %p req %p)\n", __func__, ep, req); + DWC_CIRCLEQ_REMOVE_INIT(&ep->queue, req, queue_entry); + @@ -52457,7 +52936,7 @@ index 0000000..c97d65c +dwc_otg_dev_dma_desc_t *dwc_otg_ep_alloc_desc_chain(dwc_dma_t * dma_desc_addr, + uint32_t count) +{ -+ return DWC_DMA_ALLOC_ATOMIC(count * sizeof(dwc_otg_dev_dma_desc_t), ++ return DWC_DMA_ALLOC_ATOMIC(count * sizeof(dwc_otg_dev_dma_desc_t), + dma_desc_addr); +} + @@ -52785,7 +53264,7 @@ index 0000000..c97d65c + /* Program the transfer size and packet count + * as follows: xfersize = N * maxpacket + + * short_packet pktcnt = N + (short_packet -+ * exist ? 1 : 0) ++ * exist ? 1 : 0) + */ + deptsiz.b.mc = ep->pkt_per_frm; + deptsiz.b.xfersize = ep->xfer_len; @@ -52868,7 +53347,7 @@ index 0000000..c97d65c + +/** + * This function stops transfer for an EP and -+ * resets the ep's variables. ++ * resets the ep's variables. + * + * @param core_if Programming view of DWC_otg controller. + * @param ep The EP to start the transfer on. @@ -53219,7 +53698,7 @@ index 0000000..c97d65c + gotgctl.d32 = DWC_READ_REG32(addr); + + core_if->srp_timer_started = 0; -+ ++ + if (core_if->adp_enable) { + if (gotgctl.b.bsesvld == 0) { + gpwrdn_data_t gpwrdn = {.d32 = 0 }; @@ -53359,9 +53838,9 @@ index 0000000..c97d65c + } + + /* -+ * Initialized the Core for Device mode here if there is nod ADP support. ++ * Initialized the Core for Device mode here if there is nod ADP support. + * Otherwise it will be done later in dwc_otg_adp_start routine. -+ */ ++ */ + if (dwc_otg_is_device_mode(core_if) /*&& !core_if->adp_enable*/) { + dwc_otg_core_dev_init(core_if); + } @@ -53478,9 +53957,9 @@ index 0000000..c97d65c + + /* Initialize SRP timer */ + core_if->srp_timer = DWC_TIMER_ALLOC("SRP TIMER", srp_timeout, core_if); -+ ++ + if (core_if->core_params->dev_out_nak) { -+ /** ++ /** + * Initialize xfer timeout timer. Implemented for + * 2.93a feature "Device DDMA OUT NAK Enhancement" + */ @@ -53490,7 +53969,7 @@ index 0000000..c97d65c + &pcd->core_if->ep_xfer_info[i]); + } + } -+ ++ + return pcd; +#ifdef DWC_UTE_CFI +fail: @@ -53661,7 +54140,7 @@ index 0000000..c97d65c +} + +/** -+ * This function is being called from gadget ++ * This function is being called from gadget + * to enable PCD endpoint. + */ +int dwc_otg_pcd_ep_enable(dwc_otg_pcd_t * pcd, @@ -53808,7 +54287,7 @@ index 0000000..c97d65c + if (ep->dwc_ep.type == DWC_OTG_EP_TYPE_ISOC) { + ep->dwc_ep.bInterval = 1 << (ep->desc->bInterval - 1); + ep->dwc_ep.frame_num = 0xFFFFFFFF; -+ } ++ } + + dwc_otg_ep_activate(GET_CORE_IF(pcd), &ep->dwc_ep); + @@ -53825,7 +54304,7 @@ index 0000000..c97d65c +} + +/** -+ * This function is being called from gadget ++ * This function is being called from gadget + * to disable PCD endpoint. + */ +int dwc_otg_pcd_ep_disable(dwc_otg_pcd_t * pcd, void *ep_handle) @@ -53874,7 +54353,7 @@ index 0000000..c97d65c + dptxfsiz.d32 = + (DWC_READ_REG32 + (&GET_CORE_IF(pcd)-> -+ core_global_regs->dtxfsiz[ep->dwc_ep.tx_fifo_num-1]) >> 16); ++ core_global_regs->dtxfsiz[ep->dwc_ep.tx_fifo_num-1]) >> 16); + gdfifocfg.b.epinfobase = gdfifocfgbase.d32 - dptxfsiz.d32; + if (GET_CORE_IF(pcd)->snpsid <= OTG_CORE_REV_2_94a) { + DWC_WRITE_REG32(&GET_CORE_IF(pcd)->core_global_regs->gdfifocfg, @@ -53939,7 +54418,7 @@ index 0000000..c97d65c + if (dwcep->xiso_active_xfers > 0) { +#if 0 //Disable this to decrease s/w overhead that is crucial for Isoc transfers + DWC_WARN("There are currently active transfers for EP%d \ -+ (active=%d; queued=%d)", dwcep->num, dwcep->xiso_active_xfers, ++ (active=%d; queued=%d)", dwcep->num, dwcep->xiso_active_xfers, + dwcep->xiso_queued_xfers); +#endif + return 0; @@ -54006,7 +54485,7 @@ index 0000000..c97d65c + /* Setup DMA Descriptor chain for OUT Isoc request */ + for (i = 0; i < ereq->pio_pkt_count; i++) { + //if ((i % (nat + 1)) == 0) -+ dwcep->xiso_frame_num = (dwcep->xiso_bInterval + ++ dwcep->xiso_frame_num = (dwcep->xiso_bInterval + + dwcep->xiso_frame_num) & 0x3FFF; + dwcep->desc_addr[i].buf = + req->dma + ddesc_iso[i].offset; @@ -54023,14 +54502,14 @@ index 0000000..c97d65c + dwcep->desc_addr[i].status.b_iso_out.ioc = 0; + dwcep->desc_addr[i].status.b_iso_out.pid = nat + 1; + dwcep->desc_addr[i].status.b_iso_out.l = 0; -+ ++ + /* Process the last descriptor */ + if (i == ereq->pio_pkt_count - 1) { + dwcep->desc_addr[i].status.b_iso_out.ioc = 1; + dwcep->desc_addr[i].status.b_iso_out.l = 1; -+ } ++ } + } -+ ++ + /* Setup and start the transfer for this endpoint */ + dwcep->xiso_active_xfers++; + DWC_WRITE_REG32(&GET_CORE_IF(pcd)-> @@ -54334,7 +54813,7 @@ index 0000000..c97d65c + + /* + * After adding request to the queue for IN ISOC wait for In Token Received -+ * when TX FIFO is empty interrupt and for OUT ISOC wait for OUT Token ++ * when TX FIFO is empty interrupt and for OUT ISOC wait for OUT Token + * Received when EP is disabled interrupt to obtain starting microframe + * (odd/even) start transfer + */ @@ -54353,7 +54832,7 @@ index 0000000..c97d65c + in_ep_regs[ep->dwc_ep.num]-> + diepctl, depctl.d32); + } -+ ++ + DWC_SPINUNLOCK_IRQRESTORE(pcd->lock, flags); + } + return 0; @@ -54449,7 +54928,7 @@ index 0000000..c97d65c + } else { + ep->dwc_ep.dma_addr = dma_buf; + ep->dwc_ep.start_xfer_buff = buf; -+ ep->dwc_ep.xfer_buff = buf; ++ ep->dwc_ep.xfer_buff = buf; + } + ep->dwc_ep.xfer_len = 0; + ep->dwc_ep.xfer_count = 0; @@ -54630,7 +55109,7 @@ index 0000000..c97d65c + + return retval; +} -+ ++ +int dwc_otg_pcd_ep_halt(dwc_otg_pcd_t * pcd, void *ep_handle, int value) +{ + dwc_otg_pcd_ep_t *ep; @@ -54839,7 +55318,7 @@ index 0000000..c97d65c + DWC_MODIFY_REG32(&core_if->dev_if->dev_global_regs->dctl, 0, dctl.d32); + dwc_udelay(no_of_usecs); + DWC_MODIFY_REG32(&core_if->dev_if->dev_global_regs->dctl, dctl.d32,0); -+ ++ + } else{ + DWC_PRINTF("NOT SUPPORTED IN HOST MODE\n"); + } @@ -55563,7 +56042,7 @@ index 0000000..c8d2e0e +#endif /* DWC_HOST_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c new file mode 100644 -index 0000000..27061d3 +index 0000000..1b1f83c --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c @@ -0,0 +1,5147 @@ @@ -55681,8 +56160,8 @@ index 0000000..27061d3 +} + +/** -+ * This function calculate the size of the payload in the memory -+ * for out endpoints and prints size for debug purposes(used in ++ * This function calculate the size of the payload in the memory ++ * for out endpoints and prints size for debug purposes(used in + * 2.93a DevOutNak feature). + */ +static inline void print_memory_payload(dwc_otg_pcd_t * pcd, dwc_ep_t * ep) @@ -55692,7 +56171,7 @@ index 0000000..27061d3 + deptsiz_data_t deptsiz_updt = {.d32 = 0 }; + int pack_num; + unsigned payload; -+ ++ + deptsiz_init.d32 = pcd->core_if->start_doeptsiz_val[ep->num]; + deptsiz_updt.d32 = + DWC_READ_REG32(&pcd->core_if->dev_if-> @@ -55709,8 +56188,8 @@ index 0000000..27061d3 + DWC_DEBUGPL(DBG_PCDV, + "Number of transfered bytes = 0x%08x\n", payload); + DWC_DEBUGPL(DBG_PCDV, -+ "Number of transfered packets = %d\n", pack_num); -+#endif ++ "Number of transfered packets = %d\n", pack_num); ++#endif +} + + @@ -56470,12 +56949,12 @@ index 0000000..27061d3 + for (i = 0; i<= core_if->dev_if->num_in_eps; ++i) { + core_if->nextep_seq[i] = 0xff; // 0xff - EP not active + } -+ core_if->nextep_seq[0] = 0; ++ core_if->nextep_seq[0] = 0; + core_if->first_in_nextep_seq = 0; + diepctl.d32 = DWC_READ_REG32(&dev_if->in_ep_regs[0]->diepctl); + diepctl.b.nextep = 0; + DWC_WRITE_REG32(&dev_if->in_ep_regs[0]->diepctl, diepctl.d32); -+ ++ + /* Update IN Endpoint Mismatch Count by active IN NP EP count + 1 */ + dcfg.d32 = DWC_READ_REG32(&dev_if->dev_global_regs->dcfg); + dcfg.b.epmscnt = 2; @@ -56507,10 +56986,10 @@ index 0000000..27061d3 + } + if (core_if->dma_desc_enable) + doepmsk.b.bna = 1; -+/* ++/* + doepmsk.b.babble = 1; + doepmsk.b.nyet = 1; -+ ++ + if (core_if->dma_enable) { + doepmsk.b.nak = 1; + } @@ -56522,15 +57001,15 @@ index 0000000..27061d3 + diepmsk.b.timeout = 1; + diepmsk.b.epdisabled = 1; + diepmsk.b.ahberr = 1; -+ diepmsk.b.intknepmis = 1; ++ diepmsk.b.intknepmis = 1; + if (!core_if->en_multiple_tx_fifo && core_if->dma_enable) -+ diepmsk.b.intknepmis = 0; ++ diepmsk.b.intknepmis = 0; + +/* if (core_if->dma_desc_enable) { + diepmsk.b.bna = 1; + } +*/ -+/* ++/* + if (core_if->dma_enable) { + diepmsk.b.nak = 1; + } @@ -56562,7 +57041,7 @@ index 0000000..27061d3 + diepmsk.b.epdisabled = 1; + diepmsk.b.ahberr = 1; + if (!core_if->en_multiple_tx_fifo && core_if->dma_enable) -+ diepmsk.b.intknepmis = 0; ++ diepmsk.b.intknepmis = 0; +/* + if (core_if->dma_desc_enable) { + diepmsk.b.bna = 1; @@ -56784,9 +57263,9 @@ index 0000000..27061d3 + + if (!core_if->en_multiple_tx_fifo && core_if->dma_enable) { + core_if->start_predict = 1; -+ ++ + DWC_DEBUGPL(DBG_PCDV, "%s(%p)\n", __func__, core_if); -+ ++ + gintsts.d32 = DWC_READ_REG32(&core_if->core_global_regs->gintsts); + if (!gintsts.b.ginnakeff) { + /* Disable EP Mismatch interrupt */ @@ -56820,8 +57299,8 @@ index 0000000..27061d3 + * core has stopped fetching data for IN endpoints due to the unavailability of + * TxFIFO space or Request Queue space. This interrupt is used by the + * application for an endpoint mismatch algorithm. -+ * -+ * @param pcd The PCD ++ * ++ * @param pcd The PCD + */ +int32_t dwc_otg_pcd_handle_ep_fetsusp_intr(dwc_otg_pcd_t * pcd) +{ @@ -56830,12 +57309,12 @@ index 0000000..27061d3 + dctl_data_t dctl; + dwc_otg_core_if_t *core_if = GET_CORE_IF(pcd); + DWC_DEBUGPL(DBG_PCDV, "%s(%p)\n", __func__, core_if); -+ ++ + /* Clear the global non-periodic IN NAK handshake */ + dctl.d32 = 0; + dctl.b.cgnpinnak = 1; -+ DWC_MODIFY_REG32(&core_if->dev_if->dev_global_regs->dctl, dctl.d32, dctl.d32); -+ ++ DWC_MODIFY_REG32(&core_if->dev_if->dev_global_regs->dctl, dctl.d32, dctl.d32); ++ + /* Mask GINTSTS.FETSUSP interrupt */ + gintmsk_data.d32 = DWC_READ_REG32(&core_if->core_global_regs->gintmsk); + gintmsk_data.b.fetsusp = 0; @@ -57419,7 +57898,7 @@ index 0000000..27061d3 +#ifdef DWC_UTE_CFI + DWC_MEMCPY(&cfi_req, &ctrl, sizeof(usb_device_request_t)); + -+ //printk(KERN_ALERT "CFI: req_type=0x%02x; req=0x%02x\n", ++ //printk(KERN_ALERT "CFI: req_type=0x%02x; req=0x%02x\n", + ctrl.bRequestType, ctrl.bRequest); + if (UT_GET_TYPE(cfi_req.bRequestType) == UT_VENDOR) { + if (cfi_req.bRequest > 0xB0 && cfi_req.bRequest < 0xBF) { @@ -57519,7 +57998,7 @@ index 0000000..27061d3 +#endif + + desc_sts.b.bytes = 0; -+ ++ + if (pcd->ep0_pending && DWC_CIRCLEQ_EMPTY(&ep->queue)) { + if (ep->dwc_ep.is_in) { +#ifdef DEBUG_EP0 @@ -57770,7 +58249,7 @@ index 0000000..27061d3 + dwc_otg_ep_start_transfer + (core_if, &ep->dwc_ep); + } else if (ep->dwc_ep.sent_zlp) { -+ /* ++ /* + * This fragment of code should initiate 0 + * length transfer in case if it is queued + * a transfer with size divisible to EPs max @@ -57856,14 +58335,14 @@ index 0000000..27061d3 + deptsiz.b.xfersize, + deptsiz.b.pktcnt); + -+ /* Check if the whole transfer was completed, ++ /* Check if the whole transfer was completed, + * if no, setup transfer for next portion of data + */ + if (ep->dwc_ep.xfer_len < ep->dwc_ep.total_len) { + dwc_otg_ep_start_transfer(core_if, + &ep->dwc_ep); + } else if (ep->dwc_ep.sent_zlp) { -+ /* ++ /* + * This fragment of code should initiate 0 + * length trasfer in case if it is queued + * a trasfer with size divisible to EPs max @@ -57924,8 +58403,8 @@ index 0000000..27061d3 +#ifdef DWC_UTE_CFI + } +#endif -+ /* Checking for interrupt Out transfers with not -+ * dword aligned mps sizes ++ /* Checking for interrupt Out transfers with not ++ * dword aligned mps sizes + */ + if (ep->dwc_ep.type == DWC_OTG_EP_TYPE_INTR && + (ep->dwc_ep.maxpacket%4)) { @@ -57941,7 +58420,7 @@ index 0000000..27061d3 + 1) * ep->dwc_ep.maxpacket + + ep->dwc_ep.xfer_len % + ep->dwc_ep.maxpacket; -+ else ++ else + ep->dwc_ep.xfer_len -= + ep->dwc_ep.desc_cnt * + ep->dwc_ep.maxpacket; @@ -57958,7 +58437,7 @@ index 0000000..27061d3 + (ep->dwc_ep. + total_len & 0x3)) & 0x3); + is_last = 1; -+ } ++ } + } else { + deptsiz.d32 = 0; + deptsiz.d32 = @@ -57971,14 +58450,14 @@ index 0000000..27061d3 + ep->dwc_ep.dma_addr += byte_count; + ep->dwc_ep.xfer_count += byte_count; + -+ /* Check if the whole transfer was completed, ++ /* Check if the whole transfer was completed, + * if no, setup transfer for next portion of data + */ + if (ep->dwc_ep.xfer_len < ep->dwc_ep.total_len) { + dwc_otg_ep_start_transfer(core_if, + &ep->dwc_ep); + } else if (ep->dwc_ep.sent_zlp) { -+ /* ++ /* + * This fragment of code should initiate 0 + * length trasfer in case if it is queued + * a trasfer with size divisible to EPs max @@ -58001,13 +58480,13 @@ index 0000000..27061d3 + } + } + } else { -+ /* Check if the whole transfer was completed, ++ /* Check if the whole transfer was completed, + * if no, setup transfer for next portion of data + */ + if (ep->dwc_ep.xfer_len < ep->dwc_ep.total_len) { + dwc_otg_ep_start_transfer(core_if, &ep->dwc_ep); + } else if (ep->dwc_ep.sent_zlp) { -+ /* ++ /* + * This fragment of code should initiate 0 + * length transfer in case if it is queued + * a transfer with size divisible to EPs max @@ -58051,7 +58530,7 @@ index 0000000..27061d3 +#endif + if (req->dw_align_buf) { + if (!ep->dwc_ep.is_in) { -+ dwc_memcpy(req->buf, req->dw_align_buf, req->length); ++ dwc_memcpy(req->buf, req->dw_align_buf, req->length); + } + DWC_DMA_FREE(req->length, req->dw_align_buf, + req->dw_align_buf_dma); @@ -58715,7 +59194,7 @@ index 0000000..27061d3 + start = 0; + dma_desc = dwc_ep->desc_addr; + } -+ ++ + + for (i = start; i < dwc_ep->desc_cnt; ++i, ++dma_desc) { + sts.d32 = dma_desc->status.d32; @@ -58976,49 +59455,49 @@ index 0000000..27061d3 + if (dtknqr1.b.wrap_bit) { + ndx = dtknqr1.b.intknwptr; + end = ndx -1; -+ if (end < 0) ++ if (end < 0) + end = TOKEN_Q_DEPTH -1; + } else { + ndx = 0; + end = dtknqr1.b.intknwptr -1; -+ if (end < 0) ++ if (end < 0) + end = 0; + } + start = ndx; -+ ++ + /* Fill seqnum[] by initial values: EP number + 31 */ + for (i=0; i <= core_if->dev_if->num_in_eps; i++) { + seqnum[i] = i +31; + } -+ ++ + /* Fill intkn_seq[] from in_tkn_epnums[0] */ -+ for (i=0; i < 6; i++) ++ for (i=0; i < 6; i++) + intkn_seq[i] = (in_tkn_epnums[0] >> ((7-i) * 4)) & 0xf; -+ ++ + if (TOKEN_Q_DEPTH > 6) { + /* Fill intkn_seq[] from in_tkn_epnums[1] */ -+ for (i=6; i < 14; i++) ++ for (i=6; i < 14; i++) + intkn_seq[i] = + (in_tkn_epnums[1] >> ((7 - (i - 6)) * 4)) & 0xf; + } -+ ++ + if (TOKEN_Q_DEPTH > 14) { + /* Fill intkn_seq[] from in_tkn_epnums[1] */ -+ for (i=14; i < 22; i++) ++ for (i=14; i < 22; i++) + intkn_seq[i] = + (in_tkn_epnums[2] >> ((7 - (i - 14)) * 4)) & 0xf; + } + + if (TOKEN_Q_DEPTH > 22) { + /* Fill intkn_seq[] from in_tkn_epnums[1] */ -+ for (i=22; i < 30; i++) ++ for (i=22; i < 30; i++) + intkn_seq[i] = + (in_tkn_epnums[3] >> ((7 - (i - 22)) * 4)) & 0xf; + } + + DWC_DEBUGPL(DBG_PCDV, "%s start=%d end=%d intkn_seq[]:\n", __func__, + start, end); -+ for (i=0; idev_if->num_in_eps; i++) { + if (core_if->nextep_seq[i] == 0xff ) + seqnum[i] = 0xff; + } -+ ++ + /* Sort seqnum[] */ + sort_done = 0; + while (!sort_done) { @@ -59052,16 +59531,16 @@ index 0000000..27061d3 + } + + ndx = start + seqnum[0]; -+ if (ndx >= TOKEN_Q_DEPTH) ++ if (ndx >= TOKEN_Q_DEPTH) + ndx = ndx % TOKEN_Q_DEPTH; + core_if->first_in_nextep_seq = intkn_seq[ndx]; -+ ++ + /* Update seqnum[] by EP numbers */ + for (i=0; i<=core_if->dev_if->num_in_eps; i++) { + ndx = start + i; + if (seqnum[i] < 31) { + ndx = start + seqnum[i]; -+ if (ndx >= TOKEN_Q_DEPTH) ++ if (ndx >= TOKEN_Q_DEPTH) + ndx = ndx % TOKEN_Q_DEPTH; + seqnum[i] = intkn_seq[ndx]; + } else { @@ -59086,8 +59565,8 @@ index 0000000..27061d3 + break; + } + } -+ -+ DWC_DEBUGPL(DBG_PCDV, "%s first_in_nextep_seq= %2d; nextep_seq[]:\n", ++ ++ DWC_DEBUGPL(DBG_PCDV, "%s first_in_nextep_seq= %2d; nextep_seq[]:\n", + __func__, core_if->first_in_nextep_seq); + for (i=0; i <= core_if->dev_if->num_in_eps; i++) { + DWC_DEBUGPL(DBG_PCDV,"%2d\n", core_if->nextep_seq[i]); @@ -59097,7 +59576,7 @@ index 0000000..27061d3 + resetctl.d32 = DWC_READ_REG32(&core_if->core_global_regs->grstctl); + resetctl.b.intknqflsh = 1; + DWC_WRITE_REG32(&core_if->core_global_regs->grstctl, resetctl.d32); -+ ++ + +} + @@ -59119,7 +59598,7 @@ index 0000000..27061d3 + uint32_t remain_to_transfer = 0; + uint8_t i; + uint32_t xfer_size; -+ ++ + ep = get_in_ep(pcd, epnum); + dwc_ep = &ep->dwc_ep; + @@ -59136,8 +59615,8 @@ index 0000000..27061d3 + + DWC_DEBUGPL(DBG_ANY, "pktcnt=%d size=%d\n", + dieptsiz.b.pktcnt, dieptsiz.b.xfersize); -+ -+ if ((core_if->start_predict == 0) || (depctl.b.eptype & 1)) { ++ ++ if ((core_if->start_predict == 0) || (depctl.b.eptype & 1)) { + if (ep->stopped) { + if (core_if->en_multiple_tx_fifo) + /* Flush the Tx FIFO */ @@ -59145,7 +59624,7 @@ index 0000000..27061d3 + /* Clear the Global IN NP NAK */ + dctl.d32 = 0; + dctl.b.cgnpinnak = 1; -+ DWC_MODIFY_REG32(&dev_if->dev_global_regs->dctl, dctl.d32, dctl.d32); ++ DWC_MODIFY_REG32(&dev_if->dev_global_regs->dctl, dctl.d32, dctl.d32); + /* Restart the transaction */ + if (dieptsiz.b.pktcnt != 0 || dieptsiz.b.xfersize != 0) { + restart_transfer(pcd, epnum); @@ -59166,11 +59645,11 @@ index 0000000..27061d3 + } + + core_if->start_predict--; -+ ++ + if (core_if->start_predict == 1) { // All NP IN Ep's disabled now + + predict_nextep_seq(core_if); -+ ++ + /* Update all active IN EP's NextEP field based of nextep_seq[] */ + for ( i = 0; i <= core_if->dev_if->num_in_eps; i++) { + depctl.d32 = @@ -59183,13 +59662,13 @@ index 0000000..27061d3 + /* Flush Shared NP TxFIFO */ + dwc_otg_flush_tx_fifo(core_if, 0); + /* Rewind buffers */ -+ if (!core_if->dma_desc_enable) { ++ if (!core_if->dma_desc_enable) { + i = core_if->first_in_nextep_seq; + do { + ep = get_in_ep(pcd, i); + dieptsiz.d32 = DWC_READ_REG32(&dev_if->in_ep_regs[i]->dieptsiz); + xfer_size = ep->dwc_ep.total_len - ep->dwc_ep.xfer_count; -+ if (xfer_size > ep->dwc_ep.maxxfer) ++ if (xfer_size > ep->dwc_ep.maxxfer) + xfer_size = ep->dwc_ep.maxxfer; + depctl.d32 = DWC_READ_REG32(&dev_if->in_ep_regs[i]->diepctl); + if (dieptsiz.b.pktcnt != 0) { @@ -59197,10 +59676,10 @@ index 0000000..27061d3 + remain_to_transfer = 0; + } else { + if ((xfer_size % ep->dwc_ep.maxpacket) == 0) { -+ remain_to_transfer = ++ remain_to_transfer = + dieptsiz.b.pktcnt * ep->dwc_ep.maxpacket; + } else { -+ remain_to_transfer = ((dieptsiz.b.pktcnt -1) * ep->dwc_ep.maxpacket) ++ remain_to_transfer = ((dieptsiz.b.pktcnt -1) * ep->dwc_ep.maxpacket) + + (xfer_size % ep->dwc_ep.maxpacket); + } + } @@ -59215,7 +59694,7 @@ index 0000000..27061d3 + } else { // dma_desc_enable + DWC_PRINTF("%s Learning Queue not supported in DDMA\n", __func__); + } -+ ++ + /* Restart transfers in predicted sequences */ + i = core_if->first_in_nextep_seq; + do { @@ -59233,16 +59712,16 @@ index 0000000..27061d3 + /* Clear the global non-periodic IN NAK handshake */ + dctl.d32 = 0; + dctl.b.cgnpinnak = 1; -+ DWC_MODIFY_REG32(&dev_if->dev_global_regs->dctl, dctl.d32, dctl.d32); -+ ++ DWC_MODIFY_REG32(&dev_if->dev_global_regs->dctl, dctl.d32, dctl.d32); ++ + /* Unmask EP Mismatch interrupt */ + gintmsk_data.d32 = 0; + gintmsk_data.b.epmismatch = 1; + DWC_MODIFY_REG32(&core_if->core_global_regs->gintmsk, 0, gintmsk_data.d32); -+ ++ + core_if->start_predict = 0; + -+ } ++ } +} + +/** @@ -59514,14 +59993,14 @@ index 0000000..27061d3 + } +#endif /* DWC_UTE_PER_IO */ + else { -+ if (dwc_ep->type == DWC_OTG_EP_TYPE_ISOC && ++ if (dwc_ep->type == DWC_OTG_EP_TYPE_ISOC && + dwc_ep->bInterval > 1) { + dwc_ep->frame_num += dwc_ep->bInterval; + if (dwc_ep->frame_num > 0x3FFF) + { + dwc_ep->frm_overrun = 1; + dwc_ep->frame_num &= 0x3FFF; -+ } else ++ } else + dwc_ep->frm_overrun = 0; + } + complete_ep(ep); @@ -59594,7 +60073,7 @@ index 0000000..27061d3 + if (diepint.b.intknepmis) { + DWC_DEBUGPL(DBG_ANY, + "EP%d IN TKN EP Mismatch\n", epnum); -+ CLEAR_IN_EP_INTR(core_if, epnum, intknepmis); ++ CLEAR_IN_EP_INTR(core_if, epnum, intknepmis); + } + /** IN Endpoint NAK Effective */ + if (diepint.b.inepnakeff) { @@ -59673,7 +60152,7 @@ index 0000000..27061d3 + if (dwc_ep->frame_num > 0x3FFF) { + dwc_ep->frm_overrun = 1; + dwc_ep->frame_num &= 0x3FFF; -+ } else ++ } else + dwc_ep->frm_overrun = 0; + } + @@ -60066,7 +60545,7 @@ index 0000000..27061d3 + print_memory_payload(pcd, dwc_ep); +#endif + } -+ complete_ep(ep); ++ complete_ep(ep); + } + + } @@ -60092,7 +60571,7 @@ index 0000000..27061d3 + gintmsk.b.goutnakeff = 1; + DWC_MODIFY_REG32(&core_if->core_global_regs->gintmsk, + 0, gintmsk.d32); -+ ++ + complete_ep(ep); + } + } @@ -60109,7 +60588,7 @@ index 0000000..27061d3 + dctl.d32); + + intr_mask.d32 = 0; -+ intr_mask.b.incomplisoout = 1; ++ intr_mask.b.incomplisoout = 1; + + /* Get any pending requests */ + if (!DWC_CIRCLEQ_EMPTY(&ep->queue)) { @@ -60193,12 +60672,12 @@ index 0000000..27061d3 + } + start_next_request(ep); + doepmsk.b.outtknepdis = 1; -+ DWC_MODIFY_REG32(&core_if->dev_if->dev_global_regs->doepmsk, ++ DWC_MODIFY_REG32(&core_if->dev_if->dev_global_regs->doepmsk, + doepmsk.d32, 0); + } + CLEAR_OUT_EP_INTR(core_if, epnum, outtknepdis); + } -+ ++ + /* NAK Interrutp */ + if (doepint.b.nak) { + DWC_DEBUGPL(DBG_ANY, "EP%d OUT NAK\n", epnum); @@ -60226,7 +60705,7 @@ index 0000000..27061d3 +static int drop_transfer(uint32_t trgt_fr, uint32_t curr_fr, uint8_t frm_overrun) +{ + int retval = 0; -+ if(!frm_overrun && curr_fr >= trgt_fr) ++ if(!frm_overrun && curr_fr >= trgt_fr) + retval = 1; + else if (frm_overrun + && (curr_fr >= trgt_fr && ((curr_fr - trgt_fr) < 0x3FFF / 2))) @@ -60308,13 +60787,13 @@ index 0000000..27061d3 + dev_if = GET_CORE_IF(pcd)->dev_if; + + DWC_DEBUGPL(DBG_PCD,"Incomplete ISO IN \n"); -+ ++ + for (i = 1; i <= dev_if->num_in_eps; ++i) { + dwc_ep = &pcd->in_ep[i-1].dwc_ep; + depctl.d32 = + DWC_READ_REG32(&dev_if->in_ep_regs[i]->diepctl); + if (depctl.b.epena && dwc_ep->type == DWC_OTG_EP_TYPE_ISOC) { -+ if (drop_transfer(dwc_ep->frame_num, GET_CORE_IF(pcd)->frame_num, ++ if (drop_transfer(dwc_ep->frame_num, GET_CORE_IF(pcd)->frame_num, + dwc_ep->frm_overrun)) + { + depctl.d32 = @@ -60428,7 +60907,7 @@ index 0000000..27061d3 + depctl.d32 = + DWC_READ_REG32(&core_if->dev_if->out_ep_regs[dwc_ep->num]->doepctl); + if (depctl.b.epena && depctl.b.dpid == (core_if->frame_num & 0x1)) { -+ core_if->dev_if->isoc_ep = dwc_ep; ++ core_if->dev_if->isoc_ep = dwc_ep; + deptsiz.d32 = + DWC_READ_REG32(&core_if->dev_if->out_ep_regs[dwc_ep->num]->doeptsiz); + break; @@ -60442,7 +60921,7 @@ index 0000000..27061d3 + /* Unmask it */ + intr_mask.b.goutnakeff = 1; + DWC_WRITE_REG32(&core_if->core_global_regs->gintmsk, intr_mask.d32); -+ } ++ } + if (!gintsts.b.goutnakeff) { + dctl.b.sgoutnak = 1; + } @@ -60457,7 +60936,7 @@ index 0000000..27061d3 + + intr_mask.d32 = 0; + intr_mask.b.incomplisoout = 1; -+ ++ +#endif /* DWC_EN_ISOC */ + + /* Clear interrupt */ @@ -60493,9 +60972,9 @@ index 0000000..27061d3 + diepctl.b.epdis = 1; + diepctl.b.snak = 1; + DWC_WRITE_REG32(&dev_if->in_ep_regs[i]->diepctl, diepctl.d32); -+ } ++ } + } -+ ++ + + /* Disable the Global IN NAK Effective Interrupt */ + intr_mask.b.ginnakeff = 1; @@ -60527,11 +61006,11 @@ index 0000000..27061d3 + intr_mask.b.goutnakeff = 1; + DWC_MODIFY_REG32(&GET_CORE_IF(pcd)->core_global_regs->gintmsk, + intr_mask.d32, 0); -+ ++ + /* If DEV OUT NAK enabled*/ + if (pcd->core_if->core_params->dev_out_nak) { + /* Run over all out endpoints to determine the ep number on -+ * which the timeout has happened ++ * which the timeout has happened + */ + for (i = 0; i <= dev_if->num_out_eps; i++) { + if ( pcd->core_if->ep_xfer_info[i].state == 2 ) @@ -60577,7 +61056,7 @@ index 0000000..27061d3 + } else + DWC_PRINTF("INTERRUPT Handler not implemented for %s\n", + "Global OUT NAK Effective\n"); -+ ++ +out: + /* Clear interrupt */ + gintsts.d32 = 0; @@ -60716,7 +61195,7 @@ index 0000000..27061d3 +#endif /* DWC_HOST_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c new file mode 100644 -index 0000000..a591d89 +index 0000000..5d310df --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c @@ -0,0 +1,1358 @@ @@ -61083,14 +61562,14 @@ index 0000000..a591d89 + if (GET_CORE_IF(pcd)->dma_enable) { + dwc_otg_device_t *otg_dev = gadget_wrapper->pcd->otg_dev; + struct device *dev = NULL; -+ ++ + if (otg_dev != NULL) + dev = DWC_OTG_OS_GETDEV(otg_dev->os_dep); -+ ++ + if (usb_req->length != 0 && + usb_req->dma == DWC_DMA_ADDR_INVALID) { + dma_addr = dma_map_single(dev, usb_req->buf, -+ usb_req->length, ++ usb_req->length, + ep->dwc_ep.is_in ? + DMA_TO_DEVICE: + DMA_FROM_DEVICE); @@ -61370,7 +61849,7 @@ index 0000000..a591d89 + /* .set_wedge = ep_wedge, */ + .set_wedge = NULL, /* uses set_halt instead */ +#endif -+ ++ + .queue = ep_queue, + .dequeue = ep_dequeue, + @@ -62080,7 +62559,7 @@ index 0000000..a591d89 +#endif /* DWC_HOST_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_regs.h b/drivers/usb/host/dwc_otg/dwc_otg_regs.h new file mode 100644 -index 0000000..0572642 +index 0000000..8e0e7b5 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_regs.h @@ -0,0 +1,2550 @@ @@ -62150,7 +62629,7 @@ index 0000000..0572642 + */ + +/****************************************************************************/ -+/** DWC_otg Core registers . ++/** DWC_otg Core registers . + * The dwc_otg_core_global_regs structure defines the size + * and relative field offsets for the Core Global registers. + */ @@ -62466,7 +62945,7 @@ index 0000000..0572642 + * to clear. + */ + unsigned rxfflsh:1; -+ /** TxFIFO Flush (TxFFlsh) (Device and Host). ++ /** TxFIFO Flush (TxFFlsh) (Device and Host). + * + * This bit is used to selectively flush a single or + * all transmit FIFOs. The application must first @@ -62652,7 +63131,7 @@ index 0000000..0572642 + +/** + * This union represents the bit fields in the FIFO Size Registers (HPTXFSIZ, -+ * GNPTXFSIZ, DPTXFSIZn, DIEPTXFn). Read the register into the d32 element ++ * GNPTXFSIZ, DPTXFSIZn, DIEPTXFn). Read the register into the d32 element + * then read out the bits using the bit elements. + */ +typedef union fifosize_data { @@ -62759,7 +63238,7 @@ index 0000000..0572642 +} gpvndctl_data_t; + +/** -+ * This union represents the bit fields in the General Purpose ++ * This union represents the bit fields in the General Purpose + * Input/Output Register (GGPIO). + * Read the register into the d32 element then read out the + * bits using the bit elements. @@ -62980,10 +63459,10 @@ index 0000000..0572642 + * LPM transaction. + * In Device mode the response of the core to + * LPM transaction received is reflected in these two bits. -+ - 0x0 : ERROR (No handshake response) ++ - 0x0 : ERROR (No handshake response) + - 0x1 : STALL + - 0x2 : NYET -+ - 0x3 : ACK ++ - 0x3 : ACK + */ + unsigned lpm_resp:2; + /** Port Sleep Status (SlpSts) (Device and Host) @@ -63045,7 +63524,7 @@ index 0000000..0572642 + /** register bits */ + struct { + /** Probe Discharge (PRB_DSCHG) -+ * These bits set the times for TADP_DSCHG. ++ * These bits set the times for TADP_DSCHG. + * These bits are defined as follows: + * 2'b00 - 4 msec + * 2'b01 - 8 msec @@ -63072,8 +63551,8 @@ index 0000000..0572642 + * 2'b11 - Reserved + */ + unsigned prb_per:2; -+ /** These bits capture the latest time it took for VBUS to ramp from -+ * VADP_SINK to VADP_PRB. ++ /** These bits capture the latest time it took for VBUS to ramp from ++ * VADP_SINK to VADP_PRB. + * 0x000 - 1 cycles + * 0x001 - 2 cycles + * 0x002 - 3 cycles @@ -63095,7 +63574,7 @@ index 0000000..0572642 + /** ADP Reset (ADPRes) + * When set, ADP controller is reset. + * This bit is valid only if OTG_Ver = 1'b1. -+ */ ++ */ + unsigned adpres:1; + /** ADP Enable (ADPEn) + * When set, the core performs either ADP probing or sensing @@ -63111,7 +63590,7 @@ index 0000000..0572642 + unsigned adp_prb_int:1; + /** + * ADP Sense Interrupt (ADP_SNS_INT) -+ * When this bit is set, it means that the VBUS voltage is greater than ++ * When this bit is set, it means that the VBUS voltage is greater than + * VADP_SNS value or VADP_SNS is reached. + * This bit is valid only if OTG_Ver = 1'b1. + */ @@ -63141,7 +63620,7 @@ index 0000000..0572642 + */ + unsigned adp_tmout_int_msk:1; + /** Access Request -+ * 2'b00 - Read/Write Valid (updated by the core) ++ * 2'b00 - Read/Write Valid (updated by the core) + * 2'b01 - Read + * 2'b00 - Write + * 2'b00 - Reserved @@ -63241,7 +63720,7 @@ index 0000000..0572642 +#define DWC_DCFG_FRAME_INTERVAL_85 1 +#define DWC_DCFG_FRAME_INTERVAL_90 2 +#define DWC_DCFG_FRAME_INTERVAL_95 3 -+ ++ + /** Enable Device OUT NAK for bulk in DDMA mode */ + unsigned endevoutnak:1; + @@ -63997,7 +64476,7 @@ index 0000000..0572642 + +/** + * This union represents the bit fields in the Host Frame Remaing/Number -+ * Register. ++ * Register. + */ +typedef union hfir_data { + /** raw register data */ @@ -64013,7 +64492,7 @@ index 0000000..0572642 + +/** + * This union represents the bit fields in the Host Frame Remaing/Number -+ * Register. ++ * Register. + */ +typedef union hfnum_data { + /** raw register data */ @@ -64085,7 +64564,7 @@ index 0000000..0572642 + +/** + * This union represents the bit fields in the Host All Interrupt -+ * Register. ++ * Register. + */ +typedef union haint_data { + /** raw register data */ @@ -64119,7 +64598,7 @@ index 0000000..0572642 + +/** + * This union represents the bit fields in the Host All Interrupt -+ * Register. ++ * Register. + */ +typedef union haintmsk_data { + /** raw register data */ @@ -64253,7 +64732,7 @@ index 0000000..0572642 + +/** + * This union represents the bit fields in the Host All Interrupt -+ * Register. ++ * Register. + */ +typedef union hcint_data { + /** raw register data */ @@ -64390,7 +64869,7 @@ index 0000000..0572642 +} hctsiz_data_t; + +/** -+ * This union represents the bit fields in the Host DMA Address ++ * This union represents the bit fields in the Host DMA Address + * Register used in Descriptor DMA mode. + */ +typedef union hcdma_data { @@ -64658,7 +65137,7 @@ index 0000000..fc45375 + done diff --git a/drivers/usb/host/dwc_otg/test/dwc_otg_test.pm b/drivers/usb/host/dwc_otg/test/dwc_otg_test.pm new file mode 100644 -index 0000000..233b04a +index 0000000..85e55fd --- /dev/null +++ b/drivers/usb/host/dwc_otg/test/dwc_otg_test.pm @@ -0,0 +1,337 @@ @@ -64668,7 +65147,7 @@ index 0000000..233b04a +use Exporter (); + +use vars qw(@ISA @EXPORT -+$sysfsdir $paramdir $errors $params ++$sysfsdir $paramdir $errors $params +); + +@ISA = qw(Exporter); @@ -64695,238 +65174,238 @@ index 0000000..233b04a + LOW => 0, + HIGH => 1 + }, -+ { ++ { + NAME => "dma_burst_size", + DEFAULT => 32, + ENUM => [1, 4, 8, 16, 32, 64, 128, 256], + LOW => 1, + HIGH => 256 + }, -+ { ++ { + NAME => "host_speed", + DEFAULT => 0, + ENUM => [], + LOW => 0, + HIGH => 1 + }, -+ { ++ { + NAME => "host_support_fs_ls_low_power", + DEFAULT => 0, + ENUM => [], + LOW => 0, + HIGH => 1 + }, -+ { ++ { + NAME => "host_ls_low_power_phy_clk", + DEFAULT => 0, + ENUM => [], + LOW => 0, + HIGH => 1 + }, -+ { ++ { + NAME => "dev_speed", + DEFAULT => 0, + ENUM => [], + LOW => 0, + HIGH => 1 + }, -+ { ++ { + NAME => "enable_dynamic_fifo", + DEFAULT => 1, + ENUM => [], + LOW => 0, + HIGH => 1 + }, -+ { ++ { + NAME => "data_fifo_size", + DEFAULT => 8192, + ENUM => [], + LOW => 32, + HIGH => 32768 + }, -+ { ++ { + NAME => "dev_rx_fifo_size", + DEFAULT => 1064, + ENUM => [], + LOW => 16, + HIGH => 32768 + }, -+ { ++ { + NAME => "dev_nperio_tx_fifo_size", + DEFAULT => 1024, + ENUM => [], + LOW => 16, + HIGH => 32768 + }, -+ { ++ { + NAME => "dev_perio_tx_fifo_size_1", + DEFAULT => 256, + ENUM => [], + LOW => 4, + HIGH => 768 + }, -+ { ++ { + NAME => "dev_perio_tx_fifo_size_2", + DEFAULT => 256, + ENUM => [], + LOW => 4, + HIGH => 768 + }, -+ { ++ { + NAME => "dev_perio_tx_fifo_size_3", + DEFAULT => 256, + ENUM => [], + LOW => 4, + HIGH => 768 + }, -+ { ++ { + NAME => "dev_perio_tx_fifo_size_4", + DEFAULT => 256, + ENUM => [], + LOW => 4, + HIGH => 768 + }, -+ { ++ { + NAME => "dev_perio_tx_fifo_size_5", + DEFAULT => 256, + ENUM => [], + LOW => 4, + HIGH => 768 + }, -+ { ++ { + NAME => "dev_perio_tx_fifo_size_6", + DEFAULT => 256, + ENUM => [], + LOW => 4, + HIGH => 768 + }, -+ { ++ { + NAME => "dev_perio_tx_fifo_size_7", + DEFAULT => 256, + ENUM => [], + LOW => 4, + HIGH => 768 + }, -+ { ++ { + NAME => "dev_perio_tx_fifo_size_8", + DEFAULT => 256, + ENUM => [], + LOW => 4, + HIGH => 768 + }, -+ { ++ { + NAME => "dev_perio_tx_fifo_size_9", + DEFAULT => 256, + ENUM => [], + LOW => 4, + HIGH => 768 + }, -+ { ++ { + NAME => "dev_perio_tx_fifo_size_10", + DEFAULT => 256, + ENUM => [], + LOW => 4, + HIGH => 768 + }, -+ { ++ { + NAME => "dev_perio_tx_fifo_size_11", + DEFAULT => 256, + ENUM => [], + LOW => 4, + HIGH => 768 + }, -+ { ++ { + NAME => "dev_perio_tx_fifo_size_12", + DEFAULT => 256, + ENUM => [], + LOW => 4, + HIGH => 768 + }, -+ { ++ { + NAME => "dev_perio_tx_fifo_size_13", + DEFAULT => 256, + ENUM => [], + LOW => 4, + HIGH => 768 + }, -+ { ++ { + NAME => "dev_perio_tx_fifo_size_14", + DEFAULT => 256, + ENUM => [], + LOW => 4, + HIGH => 768 + }, -+ { ++ { + NAME => "dev_perio_tx_fifo_size_15", + DEFAULT => 256, + ENUM => [], + LOW => 4, + HIGH => 768 + }, -+ { ++ { + NAME => "host_rx_fifo_size", + DEFAULT => 1024, + ENUM => [], + LOW => 16, + HIGH => 32768 + }, -+ { ++ { + NAME => "host_nperio_tx_fifo_size", + DEFAULT => 1024, + ENUM => [], + LOW => 16, + HIGH => 32768 + }, -+ { ++ { + NAME => "host_perio_tx_fifo_size", + DEFAULT => 1024, + ENUM => [], + LOW => 16, + HIGH => 32768 + }, -+ { ++ { + NAME => "max_transfer_size", + DEFAULT => 65535, + ENUM => [], + LOW => 2047, + HIGH => 65535 + }, -+ { ++ { + NAME => "max_packet_count", + DEFAULT => 511, + ENUM => [], + LOW => 15, + HIGH => 511 + }, -+ { ++ { + NAME => "host_channels", + DEFAULT => 12, + ENUM => [], + LOW => 1, + HIGH => 16 + }, -+ { ++ { + NAME => "dev_endpoints", + DEFAULT => 6, + ENUM => [], + LOW => 1, + HIGH => 15 + }, -+ { ++ { + NAME => "phy_type", + DEFAULT => 1, + ENUM => [], + LOW => 0, + HIGH => 2 + }, -+ { ++ { + NAME => "phy_utmi_width", + DEFAULT => 16, + ENUM => [8, 16], + LOW => 8, + HIGH => 16 + }, -+ { ++ { + NAME => "phy_ulpi_ddr", + DEFAULT => 0, + ENUM => [], @@ -64958,9 +65437,9 @@ index 0000000..233b04a + if ($params ne "") { + print "Module Parameters: $params\n"; + } -+ if (system("modprobe dwc_otg $params")) { ++ if (system("modprobe dwc_otg $params")) { + warn "Unable to load module\n"; -+ return 0; ++ return 0; + } + return 1; +} @@ -64975,7 +65454,7 @@ index 0000000..233b04a + if (defined $arg) { + warn "WARNING: $arg\n"; + } -+ ++ + if ($errors > 0) { + warn "TEST FAILED with $errors errors\n"; + return 0; @@ -65001,12 +65480,12 @@ index 0000000..233b04a +1; diff --git a/drivers/usb/host/dwc_otg/test/test_mod_param.pl b/drivers/usb/host/dwc_otg/test/test_mod_param.pl new file mode 100644 -index 0000000..e887dce +index 0000000..dc3820d --- /dev/null +++ b/drivers/usb/host/dwc_otg/test/test_mod_param.pl @@ -0,0 +1,133 @@ +#!/usr/bin/perl -w -+# ++# +# Run this program on the integrator. +# +# - Tests module parameter default values. @@ -65140,12 +65619,12 @@ index 0000000..e887dce +0; diff --git a/drivers/usb/host/dwc_otg/test/test_sysfs.pl b/drivers/usb/host/dwc_otg/test/test_sysfs.pl new file mode 100644 -index 0000000..abcf284 +index 0000000..cdc9963 --- /dev/null +++ b/drivers/usb/host/dwc_otg/test/test_sysfs.pl @@ -0,0 +1,193 @@ +#!/usr/bin/perl -w -+# ++# +# Run this program on the integrator +# - Tests select sysfs attributes. +# - Todo ... test more attributes, hnp/srp, buspower/bussuspend, etc. @@ -65338,27 +65817,27 @@ index 0000000..abcf284 +test_main(); +0; -- -1.8.1.6 +1.8.4 -From 09a0a27db122df4dc12d7cbccdc61d906f8449e6 Mon Sep 17 00:00:00 2001 +From 29686c26c808ed4c2c0fe71088a6ff7d01c2d7f1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:54:32 +0100 -Subject: [PATCH 003/113] bcm2708 watchdog driver +Subject: [PATCH 04/98] bcm2708 watchdog driver Signed-off-by: popcornmix --- drivers/watchdog/Kconfig | 6 + drivers/watchdog/Makefile | 1 + - drivers/watchdog/bcm2708_wdog.c | 385 ++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 392 insertions(+) + drivers/watchdog/bcm2708_wdog.c | 384 ++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 391 insertions(+) create mode 100644 drivers/watchdog/bcm2708_wdog.c diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig -index e89fc31..60ca320 100644 +index 362085d..8928aed 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig -@@ -391,6 +391,12 @@ config RETU_WATCHDOG +@@ -382,6 +382,12 @@ config RETU_WATCHDOG To compile this driver as a module, choose M here: the module will be called retu_wdt. @@ -65372,23 +65851,23 @@ index e89fc31..60ca320 100644 config AT32AP700X_WDT diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile -index a300b94..0e35771 100644 +index 2f26a0b..fdf37ac 100644 --- a/drivers/watchdog/Makefile +++ b/drivers/watchdog/Makefile -@@ -54,6 +54,7 @@ obj-$(CONFIG_TS72XX_WATCHDOG) += ts72xx_wdt.o +@@ -53,6 +53,7 @@ obj-$(CONFIG_TS72XX_WATCHDOG) += ts72xx_wdt.o obj-$(CONFIG_IMX2_WDT) += imx2_wdt.o obj-$(CONFIG_UX500_WATCHDOG) += ux500_wdt.o obj-$(CONFIG_RETU_WATCHDOG) += retu_wdt.o +obj-$(CONFIG_BCM2708_WDT) += bcm2708_wdog.o + obj-$(CONFIG_BCM2835_WDT) += bcm2835_wdt.o # AVR32 Architecture - obj-$(CONFIG_AT32AP700X_WDT) += at32ap700x_wdt.o diff --git a/drivers/watchdog/bcm2708_wdog.c b/drivers/watchdog/bcm2708_wdog.c new file mode 100644 -index 0000000..dd33c35 +index 0000000..2f19203 --- /dev/null +++ b/drivers/watchdog/bcm2708_wdog.c -@@ -0,0 +1,385 @@ +@@ -0,0 +1,384 @@ +/* + * Broadcom BCM2708 watchdog driver. + * @@ -65457,7 +65936,7 @@ index 0000000..dd33c35 + spin_lock_irqsave(&wdog_lock, flags); + + /* enable the watchdog */ -+ iowrite32(PM_PASSWORD | (timeout & PM_WDOG_TIME_SET), ++ iowrite32(PM_PASSWORD | (timeout & PM_WDOG_TIME_SET), + __io_address(PM_WDOG)); + cur = ioread32(__io_address(PM_RSTC)); + iowrite32(PM_PASSWORD | (cur & PM_RSTC_WRCFG_CLR) | @@ -65513,7 +65992,7 @@ index 0000000..dd33c35 + * @ppos: pointer to the position to write. No seeks allowed + * + * A write to a watchdog device is defined as a keepalive signal. -+ * ++ * + * if 'nowayout' is set then normally a close() is ignored. But + * if you write 'V' first then the close() will stop the timer. + */ @@ -65735,7 +66214,7 @@ index 0000000..dd33c35 + if (wdog_set_heartbeat(heartbeat)) { + wdog_set_heartbeat(WD_TIMO); + printk(KERN_INFO "bcm2708_wdog: heartbeat value must be " -+ "0 < heartbeat < %d, using %d\n", ++ "0 < heartbeat < %d, using %d\n", + WDOG_TICKS_TO_SECS(PM_WDOG_TIME_SET), + WD_TIMO); + } @@ -65773,27 +66252,26 @@ index 0000000..dd33c35 +MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); +MODULE_ALIAS_MISCDEV(TEMP_MINOR); +MODULE_LICENSE("GPL"); -+ -- -1.8.1.6 +1.8.4 -From 6cc7fb2c843076ba2fbe948d04c4b825c3224ef2 Mon Sep 17 00:00:00 2001 +From 9a9e3acf4ea976ce01b1d2128ecf21611794aecb Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:55:09 +0100 -Subject: [PATCH 004/113] bcm2708 framebuffer driver +Subject: [PATCH 05/98] bcm2708 framebuffer driver Signed-off-by: popcornmix --- drivers/video/Kconfig | 14 + drivers/video/Makefile | 1 + - drivers/video/bcm2708_fb.c | 487 ++++++ - drivers/video/logo/logo_linux_clut224.ppm | 2483 ++++++++++------------------- - 4 files changed, 1383 insertions(+), 1602 deletions(-) + drivers/video/bcm2708_fb.c | 491 ++++++++ + drivers/video/logo/logo_linux_clut224.ppm | 1762 ++++++++++++++--------------- + 4 files changed, 1387 insertions(+), 881 deletions(-) create mode 100644 drivers/video/bcm2708_fb.c diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig -index 2e937bd..9f4c58f 100644 +index 4cf1e1d..9c332f1 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -310,6 +310,20 @@ config FB_PM2_FIFO_DISCONNECT @@ -65831,10 +66309,10 @@ index e8bae8d..032f386 100644 obj-$(CONFIG_FB_CIRRUS) += cirrusfb.o diff --git a/drivers/video/bcm2708_fb.c b/drivers/video/bcm2708_fb.c new file mode 100644 -index 0000000..c82dd90 +index 0000000..08d9238 --- /dev/null +++ b/drivers/video/bcm2708_fb.c -@@ -0,0 +1,487 @@ +@@ -0,0 +1,491 @@ +/* + * linux/drivers/video/bcm2708_fb.c + * @@ -65872,6 +66350,12 @@ index 0000000..c82dd90 +#include +#include + ++#ifdef BCM2708_FB_DEBUG ++#define print_debug(fmt,...) pr_debug("%s:%s:%d: "fmt, MODULE_NAME, __func__, __LINE__, ##__VA_ARGS__) ++#else ++#define print_debug(fmt,...) ++#endif ++ +/* This is limited to 16 characters when displayed by X startup */ +static const char *bcm2708_name = "BCM2708 FB"; + @@ -65971,17 +66455,15 @@ index 0000000..c82dd90 +{ + /* info input, var output */ + int yres; -+ /* memory size in pixels */ -+ unsigned pixels = info->screen_size * 8 / var->bits_per_pixel; + + /* info input, var output */ -+ pr_info("bcm2708_fb_check_var info(%p) %dx%d (%dx%d), %d, %d\n", info, ++ print_debug("bcm2708_fb_check_var info(%p) %dx%d (%dx%d), %d, %d\n", info, + info->var.xres, info->var.yres, info->var.xres_virtual, + info->var.yres_virtual, (int)info->screen_size, + info->var.bits_per_pixel); -+ pr_info("bcm2708_fb_check_var var(%p) %dx%d (%dx%d), %d, %d\n", var, ++ print_debug("bcm2708_fb_check_var var(%p) %dx%d (%dx%d), %d\n", var, + var->xres, var->yres, var->xres_virtual, var->yres_virtual, -+ var->bits_per_pixel, pixels); ++ var->bits_per_pixel); + + if (!var->bits_per_pixel) + var->bits_per_pixel = 16; @@ -66047,7 +66529,7 @@ index 0000000..c82dd90 + fbinfo->base = 0; /* filled in by VC */ + fbinfo->pitch = 0; /* filled in by VC */ + -+ pr_info("bcm2708_fb_set_par info(%p) %dx%d (%dx%d), %d, %d\n", info, ++ print_debug("bcm2708_fb_set_par info(%p) %dx%d (%dx%d), %d, %d\n", info, + info->var.xres, info->var.yres, info->var.xres_virtual, + info->var.yres_virtual, (int)info->screen_size, + info->var.bits_per_pixel); @@ -66088,7 +66570,7 @@ index 0000000..c82dd90 + BUG(); /* what can we do here */ + } + } -+ pr_info ++ print_debug + ("BCM2708FB: start = %p,%p width=%d, height=%d, bpp=%d, pitch=%d size=%d success=%d\n", + (void *)fb->fb.screen_base, (void *)fb->fb.fix.smem_start, + fbinfo->xres, fbinfo->yres, fbinfo->bpp, @@ -66111,7 +66593,7 @@ index 0000000..c82dd90 +{ + struct bcm2708_fb *fb = to_bcm2708(info); + -+ /*pr_info("BCM2708FB: setcolreg %d:(%02x,%02x,%02x,%02x) %x\n", regno, red, green, blue, transp, fb->fb.fix.visual);*/ ++ /*print_debug("BCM2708FB: setcolreg %d:(%02x,%02x,%02x,%02x) %x\n", regno, red, green, blue, transp, fb->fb.fix.visual);*/ + if (fb->fb.var.bits_per_pixel <= 8) { + if (regno < 256) { + /* blue [0:4], green [5:10], red [11:15] */ @@ -66134,28 +66616,28 @@ index 0000000..c82dd90 + +static int bcm2708_fb_blank(int blank_mode, struct fb_info *info) +{ -+ /*pr_info("bcm2708_fb_blank\n"); */ ++ /*print_debug("bcm2708_fb_blank\n"); */ + return -1; +} + +static void bcm2708_fb_fillrect(struct fb_info *info, + const struct fb_fillrect *rect) +{ -+ /* (is called) pr_info("bcm2708_fb_fillrect\n"); */ ++ /* (is called) print_debug("bcm2708_fb_fillrect\n"); */ + cfb_fillrect(info, rect); +} + +static void bcm2708_fb_copyarea(struct fb_info *info, + const struct fb_copyarea *region) +{ -+ /*pr_info("bcm2708_fb_copyarea\n"); */ ++ /*print_debug("bcm2708_fb_copyarea\n"); */ + cfb_copyarea(info, region); +} + +static void bcm2708_fb_imageblit(struct fb_info *info, + const struct fb_image *image) +{ -+ /* (is called) pr_info("bcm2708_fb_imageblit\n"); */ ++ /* (is called) print_debug("bcm2708_fb_imageblit\n"); */ + cfb_imageblit(info, image); +} + @@ -66230,15 +66712,15 @@ index 0000000..c82dd90 + + fb_set_var(&fb->fb, &fb->fb.var); + -+ pr_info("BCM2708FB: registering framebuffer (%dx%d@%d)\n", fbwidth, ++ print_debug("BCM2708FB: registering framebuffer (%dx%d@%d)\n", fbwidth, + fbheight, fbdepth); + + ret = register_framebuffer(&fb->fb); -+ pr_info("BCM2708FB: register framebuffer (%d)\n", ret); ++ print_debug("BCM2708FB: register framebuffer (%d)\n", ret); + if (ret == 0) + goto out; + -+ pr_info("BCM2708FB: cannot register framebuffer (%d)\n", ret); ++ print_debug("BCM2708FB: cannot register framebuffer (%d)\n", ret); +out: + return ret; +} @@ -66323,1615 +66805,894 @@ index 0000000..c82dd90 +MODULE_PARM_DESC(fbheight, "Height of ARM Framebuffer"); +MODULE_PARM_DESC(fbdepth, "Bit depth of ARM Framebuffer"); diff --git a/drivers/video/logo/logo_linux_clut224.ppm b/drivers/video/logo/logo_linux_clut224.ppm -index 3c14e43..7626beb 100644 +index 285d552..7626beb 100644 --- a/drivers/video/logo/logo_linux_clut224.ppm +++ b/drivers/video/logo/logo_linux_clut224.ppm -@@ -1,1604 +1,883 @@ +@@ -1,883 +1,883 @@ P3 --# Standard 224-color Linux logo -80 80 +63 80 255 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 6 6 6 6 6 6 10 10 10 10 10 10 -- 10 10 10 6 6 6 6 6 6 6 6 6 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 6 6 6 10 10 10 14 14 14 -- 22 22 22 26 26 26 30 30 30 34 34 34 -- 30 30 30 30 30 30 26 26 26 18 18 18 -- 14 14 14 10 10 10 6 6 6 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 1 0 0 1 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 6 6 6 14 14 14 26 26 26 42 42 42 -- 54 54 54 66 66 66 78 78 78 78 78 78 -- 78 78 78 74 74 74 66 66 66 54 54 54 -- 42 42 42 26 26 26 18 18 18 10 10 10 -- 6 6 6 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 1 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 10 10 10 -- 22 22 22 42 42 42 66 66 66 86 86 86 -- 66 66 66 38 38 38 38 38 38 22 22 22 -- 26 26 26 34 34 34 54 54 54 66 66 66 -- 86 86 86 70 70 70 46 46 46 26 26 26 -- 14 14 14 6 6 6 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 1 0 0 1 0 0 1 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 10 10 10 26 26 26 -- 50 50 50 82 82 82 58 58 58 6 6 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 6 6 6 54 54 54 86 86 86 66 66 66 -- 38 38 38 18 18 18 6 6 6 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 6 6 6 22 22 22 50 50 50 -- 78 78 78 34 34 34 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 6 6 6 70 70 70 -- 78 78 78 46 46 46 22 22 22 6 6 6 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 1 0 0 1 0 0 1 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 6 6 6 18 18 18 42 42 42 82 82 82 -- 26 26 26 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 14 14 14 -- 46 46 46 34 34 34 6 6 6 2 2 6 -- 42 42 42 78 78 78 42 42 42 18 18 18 -- 6 6 6 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 1 0 0 0 0 0 1 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 10 10 10 30 30 30 66 66 66 58 58 58 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 26 26 26 -- 86 86 86 101 101 101 46 46 46 10 10 10 -- 2 2 6 58 58 58 70 70 70 34 34 34 -- 10 10 10 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 1 0 0 1 0 0 1 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 14 14 14 42 42 42 86 86 86 10 10 10 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 30 30 30 -- 94 94 94 94 94 94 58 58 58 26 26 26 -- 2 2 6 6 6 6 78 78 78 54 54 54 -- 22 22 22 6 6 6 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 6 6 6 -- 22 22 22 62 62 62 62 62 62 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 26 26 26 -- 54 54 54 38 38 38 18 18 18 10 10 10 -- 2 2 6 2 2 6 34 34 34 82 82 82 -- 38 38 38 14 14 14 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 1 0 0 1 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 6 6 6 -- 30 30 30 78 78 78 30 30 30 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 10 10 10 -- 10 10 10 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 78 78 78 -- 50 50 50 18 18 18 6 6 6 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 1 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 10 10 10 -- 38 38 38 86 86 86 14 14 14 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 54 54 54 -- 66 66 66 26 26 26 6 6 6 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 1 0 0 1 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 14 14 14 -- 42 42 42 82 82 82 2 2 6 2 2 6 -- 2 2 6 6 6 6 10 10 10 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 6 6 6 -- 14 14 14 10 10 10 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 18 18 18 -- 82 82 82 34 34 34 10 10 10 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 1 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 14 14 14 -- 46 46 46 86 86 86 2 2 6 2 2 6 -- 6 6 6 6 6 6 22 22 22 34 34 34 -- 6 6 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 18 18 18 34 34 34 -- 10 10 10 50 50 50 22 22 22 2 2 6 -- 2 2 6 2 2 6 2 2 6 10 10 10 -- 86 86 86 42 42 42 14 14 14 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 1 0 0 1 0 0 1 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 14 14 14 -- 46 46 46 86 86 86 2 2 6 2 2 6 -- 38 38 38 116 116 116 94 94 94 22 22 22 -- 22 22 22 2 2 6 2 2 6 2 2 6 -- 14 14 14 86 86 86 138 138 138 162 162 162 --154 154 154 38 38 38 26 26 26 6 6 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 86 86 86 46 46 46 14 14 14 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 14 14 14 -- 46 46 46 86 86 86 2 2 6 14 14 14 --134 134 134 198 198 198 195 195 195 116 116 116 -- 10 10 10 2 2 6 2 2 6 6 6 6 --101 98 89 187 187 187 210 210 210 218 218 218 --214 214 214 134 134 134 14 14 14 6 6 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 86 86 86 50 50 50 18 18 18 6 6 6 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 1 0 0 0 -- 0 0 1 0 0 1 0 0 1 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 14 14 14 -- 46 46 46 86 86 86 2 2 6 54 54 54 --218 218 218 195 195 195 226 226 226 246 246 246 -- 58 58 58 2 2 6 2 2 6 30 30 30 --210 210 210 253 253 253 174 174 174 123 123 123 --221 221 221 234 234 234 74 74 74 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 70 70 70 58 58 58 22 22 22 6 6 6 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 14 14 14 -- 46 46 46 82 82 82 2 2 6 106 106 106 --170 170 170 26 26 26 86 86 86 226 226 226 --123 123 123 10 10 10 14 14 14 46 46 46 --231 231 231 190 190 190 6 6 6 70 70 70 -- 90 90 90 238 238 238 158 158 158 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 70 70 70 58 58 58 22 22 22 6 6 6 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 1 0 0 0 -- 0 0 1 0 0 1 0 0 1 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 14 14 14 -- 42 42 42 86 86 86 6 6 6 116 116 116 --106 106 106 6 6 6 70 70 70 149 149 149 --128 128 128 18 18 18 38 38 38 54 54 54 --221 221 221 106 106 106 2 2 6 14 14 14 -- 46 46 46 190 190 190 198 198 198 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 74 74 74 62 62 62 22 22 22 6 6 6 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 1 0 0 0 -- 0 0 1 0 0 0 0 0 1 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 14 14 14 -- 42 42 42 94 94 94 14 14 14 101 101 101 --128 128 128 2 2 6 18 18 18 116 116 116 --118 98 46 121 92 8 121 92 8 98 78 10 --162 162 162 106 106 106 2 2 6 2 2 6 -- 2 2 6 195 195 195 195 195 195 6 6 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 74 74 74 62 62 62 22 22 22 6 6 6 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 1 0 0 1 -- 0 0 1 0 0 0 0 0 1 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 10 10 10 -- 38 38 38 90 90 90 14 14 14 58 58 58 --210 210 210 26 26 26 54 38 6 154 114 10 --226 170 11 236 186 11 225 175 15 184 144 12 --215 174 15 175 146 61 37 26 9 2 2 6 -- 70 70 70 246 246 246 138 138 138 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 70 70 70 66 66 66 26 26 26 6 6 6 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 10 10 10 -- 38 38 38 86 86 86 14 14 14 10 10 10 --195 195 195 188 164 115 192 133 9 225 175 15 --239 182 13 234 190 10 232 195 16 232 200 30 --245 207 45 241 208 19 232 195 16 184 144 12 --218 194 134 211 206 186 42 42 42 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 50 50 50 74 74 74 30 30 30 6 6 6 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 10 10 10 -- 34 34 34 86 86 86 14 14 14 2 2 6 --121 87 25 192 133 9 219 162 10 239 182 13 --236 186 11 232 195 16 241 208 19 244 214 54 --246 218 60 246 218 38 246 215 20 241 208 19 --241 208 19 226 184 13 121 87 25 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 50 50 50 82 82 82 34 34 34 10 10 10 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 10 10 10 -- 34 34 34 82 82 82 30 30 30 61 42 6 --180 123 7 206 145 10 230 174 11 239 182 13 --234 190 10 238 202 15 241 208 19 246 218 74 --246 218 38 246 215 20 246 215 20 246 215 20 --226 184 13 215 174 15 184 144 12 6 6 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 26 26 26 94 94 94 42 42 42 14 14 14 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 10 10 10 -- 30 30 30 78 78 78 50 50 50 104 69 6 --192 133 9 216 158 10 236 178 12 236 186 11 --232 195 16 241 208 19 244 214 54 245 215 43 --246 215 20 246 215 20 241 208 19 198 155 10 --200 144 11 216 158 10 156 118 10 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 6 6 6 90 90 90 54 54 54 18 18 18 -- 6 6 6 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 10 10 10 -- 30 30 30 78 78 78 46 46 46 22 22 22 --137 92 6 210 162 10 239 182 13 238 190 10 --238 202 15 241 208 19 246 215 20 246 215 20 --241 208 19 203 166 17 185 133 11 210 150 10 --216 158 10 210 150 10 102 78 10 2 2 6 -- 6 6 6 54 54 54 14 14 14 2 2 6 -- 2 2 6 62 62 62 74 74 74 30 30 30 -- 10 10 10 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 10 10 10 -- 34 34 34 78 78 78 50 50 50 6 6 6 -- 94 70 30 139 102 15 190 146 13 226 184 13 --232 200 30 232 195 16 215 174 15 190 146 13 --168 122 10 192 133 9 210 150 10 213 154 11 --202 150 34 182 157 106 101 98 89 2 2 6 -- 2 2 6 78 78 78 116 116 116 58 58 58 -- 2 2 6 22 22 22 90 90 90 46 46 46 -- 18 18 18 6 6 6 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 10 10 10 -- 38 38 38 86 86 86 50 50 50 6 6 6 --128 128 128 174 154 114 156 107 11 168 122 10 --198 155 10 184 144 12 197 138 11 200 144 11 --206 145 10 206 145 10 197 138 11 188 164 115 --195 195 195 198 198 198 174 174 174 14 14 14 -- 2 2 6 22 22 22 116 116 116 116 116 116 -- 22 22 22 2 2 6 74 74 74 70 70 70 -- 30 30 30 10 10 10 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 6 6 6 18 18 18 -- 50 50 50 101 101 101 26 26 26 10 10 10 --138 138 138 190 190 190 174 154 114 156 107 11 --197 138 11 200 144 11 197 138 11 192 133 9 --180 123 7 190 142 34 190 178 144 187 187 187 --202 202 202 221 221 221 214 214 214 66 66 66 -- 2 2 6 2 2 6 50 50 50 62 62 62 -- 6 6 6 2 2 6 10 10 10 90 90 90 -- 50 50 50 18 18 18 6 6 6 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 10 10 10 34 34 34 -- 74 74 74 74 74 74 2 2 6 6 6 6 --144 144 144 198 198 198 190 190 190 178 166 146 --154 121 60 156 107 11 156 107 11 168 124 44 --174 154 114 187 187 187 190 190 190 210 210 210 --246 246 246 253 253 253 253 253 253 182 182 182 -- 6 6 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 62 62 62 -- 74 74 74 34 34 34 14 14 14 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 10 10 10 22 22 22 54 54 54 -- 94 94 94 18 18 18 2 2 6 46 46 46 --234 234 234 221 221 221 190 190 190 190 190 190 --190 190 190 187 187 187 187 187 187 190 190 190 --190 190 190 195 195 195 214 214 214 242 242 242 --253 253 253 253 253 253 253 253 253 253 253 253 -- 82 82 82 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 14 14 14 -- 86 86 86 54 54 54 22 22 22 6 6 6 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 6 6 6 18 18 18 46 46 46 90 90 90 -- 46 46 46 18 18 18 6 6 6 182 182 182 --253 253 253 246 246 246 206 206 206 190 190 190 --190 190 190 190 190 190 190 190 190 190 190 190 --206 206 206 231 231 231 250 250 250 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --202 202 202 14 14 14 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 42 42 42 86 86 86 42 42 42 18 18 18 -- 6 6 6 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 6 6 6 -- 14 14 14 38 38 38 74 74 74 66 66 66 -- 2 2 6 6 6 6 90 90 90 250 250 250 --253 253 253 253 253 253 238 238 238 198 198 198 --190 190 190 190 190 190 195 195 195 221 221 221 --246 246 246 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 82 82 82 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 78 78 78 70 70 70 34 34 34 -- 14 14 14 6 6 6 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 14 14 14 -- 34 34 34 66 66 66 78 78 78 6 6 6 -- 2 2 6 18 18 18 218 218 218 253 253 253 --253 253 253 253 253 253 253 253 253 246 246 246 --226 226 226 231 231 231 246 246 246 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 178 178 178 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 18 18 18 90 90 90 62 62 62 -- 30 30 30 10 10 10 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 10 10 10 26 26 26 -- 58 58 58 90 90 90 18 18 18 2 2 6 -- 2 2 6 110 110 110 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --250 250 250 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 231 231 231 18 18 18 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 18 18 18 94 94 94 -- 54 54 54 26 26 26 10 10 10 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 6 6 6 22 22 22 50 50 50 -- 90 90 90 26 26 26 2 2 6 2 2 6 -- 14 14 14 195 195 195 250 250 250 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --250 250 250 242 242 242 54 54 54 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 38 38 38 -- 86 86 86 50 50 50 22 22 22 6 6 6 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 6 6 6 14 14 14 38 38 38 82 82 82 -- 34 34 34 2 2 6 2 2 6 2 2 6 -- 42 42 42 195 195 195 246 246 246 253 253 253 --253 253 253 253 253 253 253 253 253 250 250 250 --242 242 242 242 242 242 250 250 250 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 250 250 250 246 246 246 238 238 238 --226 226 226 231 231 231 101 101 101 6 6 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 38 38 38 82 82 82 42 42 42 14 14 14 -- 6 6 6 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 10 10 10 26 26 26 62 62 62 66 66 66 -- 2 2 6 2 2 6 2 2 6 6 6 6 -- 70 70 70 170 170 170 206 206 206 234 234 234 --246 246 246 250 250 250 250 250 250 238 238 238 --226 226 226 231 231 231 238 238 238 250 250 250 --250 250 250 250 250 250 246 246 246 231 231 231 --214 214 214 206 206 206 202 202 202 202 202 202 --198 198 198 202 202 202 182 182 182 18 18 18 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 62 62 62 66 66 66 30 30 30 -- 10 10 10 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 14 14 14 42 42 42 82 82 82 18 18 18 -- 2 2 6 2 2 6 2 2 6 10 10 10 -- 94 94 94 182 182 182 218 218 218 242 242 242 --250 250 250 253 253 253 253 253 253 250 250 250 --234 234 234 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 246 246 246 --238 238 238 226 226 226 210 210 210 202 202 202 --195 195 195 195 195 195 210 210 210 158 158 158 -- 6 6 6 14 14 14 50 50 50 14 14 14 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 6 6 6 86 86 86 46 46 46 -- 18 18 18 6 6 6 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 6 6 6 -- 22 22 22 54 54 54 70 70 70 2 2 6 -- 2 2 6 10 10 10 2 2 6 22 22 22 --166 166 166 231 231 231 250 250 250 253 253 253 --253 253 253 253 253 253 253 253 253 250 250 250 --242 242 242 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 246 246 246 --231 231 231 206 206 206 198 198 198 226 226 226 -- 94 94 94 2 2 6 6 6 6 38 38 38 -- 30 30 30 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 62 62 62 66 66 66 -- 26 26 26 10 10 10 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 10 10 10 -- 30 30 30 74 74 74 50 50 50 2 2 6 -- 26 26 26 26 26 26 2 2 6 106 106 106 --238 238 238 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 246 246 246 218 218 218 202 202 202 --210 210 210 14 14 14 2 2 6 2 2 6 -- 30 30 30 22 22 22 2 2 6 2 2 6 -- 2 2 6 2 2 6 18 18 18 86 86 86 -- 42 42 42 14 14 14 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 14 14 14 -- 42 42 42 90 90 90 22 22 22 2 2 6 -- 42 42 42 2 2 6 18 18 18 218 218 218 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 250 250 250 221 221 221 --218 218 218 101 101 101 2 2 6 14 14 14 -- 18 18 18 38 38 38 10 10 10 2 2 6 -- 2 2 6 2 2 6 2 2 6 78 78 78 -- 58 58 58 22 22 22 6 6 6 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 6 6 6 18 18 18 -- 54 54 54 82 82 82 2 2 6 26 26 26 -- 22 22 22 2 2 6 123 123 123 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 250 250 250 --238 238 238 198 198 198 6 6 6 38 38 38 -- 58 58 58 26 26 26 38 38 38 2 2 6 -- 2 2 6 2 2 6 2 2 6 46 46 46 -- 78 78 78 30 30 30 10 10 10 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 10 10 10 30 30 30 -- 74 74 74 58 58 58 2 2 6 42 42 42 -- 2 2 6 22 22 22 231 231 231 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 250 250 250 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 246 246 246 46 46 46 38 38 38 -- 42 42 42 14 14 14 38 38 38 14 14 14 -- 2 2 6 2 2 6 2 2 6 6 6 6 -- 86 86 86 46 46 46 14 14 14 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 6 6 6 14 14 14 42 42 42 -- 90 90 90 18 18 18 18 18 18 26 26 26 -- 2 2 6 116 116 116 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 250 250 250 238 238 238 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 94 94 94 6 6 6 -- 2 2 6 2 2 6 10 10 10 34 34 34 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 74 74 74 58 58 58 22 22 22 6 6 6 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 10 10 10 26 26 26 66 66 66 -- 82 82 82 2 2 6 38 38 38 6 6 6 -- 14 14 14 210 210 210 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 246 246 246 242 242 242 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 144 144 144 2 2 6 -- 2 2 6 2 2 6 2 2 6 46 46 46 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 42 42 42 74 74 74 30 30 30 10 10 10 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 6 6 6 14 14 14 42 42 42 90 90 90 -- 26 26 26 6 6 6 42 42 42 2 2 6 -- 74 74 74 250 250 250 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 242 242 242 242 242 242 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 182 182 182 2 2 6 -- 2 2 6 2 2 6 2 2 6 46 46 46 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 10 10 10 86 86 86 38 38 38 10 10 10 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 10 10 10 26 26 26 66 66 66 82 82 82 -- 2 2 6 22 22 22 18 18 18 2 2 6 --149 149 149 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 234 234 234 242 242 242 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 206 206 206 2 2 6 -- 2 2 6 2 2 6 2 2 6 38 38 38 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 6 6 6 86 86 86 46 46 46 14 14 14 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 6 6 6 -- 18 18 18 46 46 46 86 86 86 18 18 18 -- 2 2 6 34 34 34 10 10 10 6 6 6 --210 210 210 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 234 234 234 242 242 242 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 221 221 221 6 6 6 -- 2 2 6 2 2 6 6 6 6 30 30 30 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 82 82 82 54 54 54 18 18 18 -- 6 6 6 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 10 10 10 -- 26 26 26 66 66 66 62 62 62 2 2 6 -- 2 2 6 38 38 38 10 10 10 26 26 26 --238 238 238 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 231 231 231 238 238 238 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 231 231 231 6 6 6 -- 2 2 6 2 2 6 10 10 10 30 30 30 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 66 66 66 58 58 58 22 22 22 -- 6 6 6 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 10 10 10 -- 38 38 38 78 78 78 6 6 6 2 2 6 -- 2 2 6 46 46 46 14 14 14 42 42 42 --246 246 246 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 231 231 231 242 242 242 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 234 234 234 10 10 10 -- 2 2 6 2 2 6 22 22 22 14 14 14 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 66 66 66 62 62 62 22 22 22 -- 6 6 6 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 6 6 6 18 18 18 -- 50 50 50 74 74 74 2 2 6 2 2 6 -- 14 14 14 70 70 70 34 34 34 62 62 62 --250 250 250 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 231 231 231 246 246 246 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 234 234 234 14 14 14 -- 2 2 6 2 2 6 30 30 30 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 66 66 66 62 62 62 22 22 22 -- 6 6 6 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 6 6 6 18 18 18 -- 54 54 54 62 62 62 2 2 6 2 2 6 -- 2 2 6 30 30 30 46 46 46 70 70 70 --250 250 250 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 231 231 231 246 246 246 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 226 226 226 10 10 10 -- 2 2 6 6 6 6 30 30 30 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 66 66 66 58 58 58 22 22 22 -- 6 6 6 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 6 6 6 22 22 22 -- 58 58 58 62 62 62 2 2 6 2 2 6 -- 2 2 6 2 2 6 30 30 30 78 78 78 --250 250 250 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 231 231 231 246 246 246 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 206 206 206 2 2 6 -- 22 22 22 34 34 34 18 14 6 22 22 22 -- 26 26 26 18 18 18 6 6 6 2 2 6 -- 2 2 6 82 82 82 54 54 54 18 18 18 -- 6 6 6 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 6 6 6 26 26 26 -- 62 62 62 106 106 106 74 54 14 185 133 11 --210 162 10 121 92 8 6 6 6 62 62 62 --238 238 238 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 231 231 231 246 246 246 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 158 158 158 18 18 18 -- 14 14 14 2 2 6 2 2 6 2 2 6 -- 6 6 6 18 18 18 66 66 66 38 38 38 -- 6 6 6 94 94 94 50 50 50 18 18 18 -- 6 6 6 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 6 6 6 -- 10 10 10 10 10 10 18 18 18 38 38 38 -- 78 78 78 142 134 106 216 158 10 242 186 14 --246 190 14 246 190 14 156 118 10 10 10 10 -- 90 90 90 238 238 238 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 231 231 231 250 250 250 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 246 230 190 --238 204 91 238 204 91 181 142 44 37 26 9 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 38 38 38 46 46 46 -- 26 26 26 106 106 106 54 54 54 18 18 18 -- 6 6 6 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 6 6 6 14 14 14 22 22 22 -- 30 30 30 38 38 38 50 50 50 70 70 70 --106 106 106 190 142 34 226 170 11 242 186 14 --246 190 14 246 190 14 246 190 14 154 114 10 -- 6 6 6 74 74 74 226 226 226 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 231 231 231 250 250 250 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 228 184 62 --241 196 14 241 208 19 232 195 16 38 30 10 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 6 6 6 30 30 30 26 26 26 --203 166 17 154 142 90 66 66 66 26 26 26 -- 6 6 6 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 6 6 6 18 18 18 38 38 38 58 58 58 -- 78 78 78 86 86 86 101 101 101 123 123 123 --175 146 61 210 150 10 234 174 13 246 186 14 --246 190 14 246 190 14 246 190 14 238 190 10 --102 78 10 2 2 6 46 46 46 198 198 198 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 234 234 234 242 242 242 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 224 178 62 --242 186 14 241 196 14 210 166 10 22 18 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 6 6 6 121 92 8 --238 202 15 232 195 16 82 82 82 34 34 34 -- 10 10 10 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 14 14 14 38 38 38 70 70 70 154 122 46 --190 142 34 200 144 11 197 138 11 197 138 11 --213 154 11 226 170 11 242 186 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --225 175 15 46 32 6 2 2 6 22 22 22 --158 158 158 250 250 250 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 250 250 250 242 242 242 224 178 62 --239 182 13 236 186 11 213 154 11 46 32 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 61 42 6 225 175 15 --238 190 10 236 186 11 112 100 78 42 42 42 -- 14 14 14 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 6 6 6 -- 22 22 22 54 54 54 154 122 46 213 154 11 --226 170 11 230 174 11 226 170 11 226 170 11 --236 178 12 242 186 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --241 196 14 184 144 12 10 10 10 2 2 6 -- 6 6 6 116 116 116 242 242 242 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 231 231 231 198 198 198 214 170 54 --236 178 12 236 178 12 210 150 10 137 92 6 -- 18 14 6 2 2 6 2 2 6 2 2 6 -- 6 6 6 70 47 6 200 144 11 236 178 12 --239 182 13 239 182 13 124 112 88 58 58 58 -- 22 22 22 6 6 6 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 10 10 10 -- 30 30 30 70 70 70 180 133 36 226 170 11 --239 182 13 242 186 14 242 186 14 246 186 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 232 195 16 98 70 6 2 2 6 -- 2 2 6 2 2 6 66 66 66 221 221 221 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 206 206 206 198 198 198 214 166 58 --230 174 11 230 174 11 216 158 10 192 133 9 --163 110 8 116 81 8 102 78 10 116 81 8 --167 114 7 197 138 11 226 170 11 239 182 13 --242 186 14 242 186 14 162 146 94 78 78 78 -- 34 34 34 14 14 14 6 6 6 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 6 6 6 -- 30 30 30 78 78 78 190 142 34 226 170 11 --239 182 13 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 241 196 14 203 166 17 22 18 6 -- 2 2 6 2 2 6 2 2 6 38 38 38 --218 218 218 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --250 250 250 206 206 206 198 198 198 202 162 69 --226 170 11 236 178 12 224 166 10 210 150 10 --200 144 11 197 138 11 192 133 9 197 138 11 --210 150 10 226 170 11 242 186 14 246 190 14 --246 190 14 246 186 14 225 175 15 124 112 88 -- 62 62 62 30 30 30 14 14 14 6 6 6 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 10 10 10 -- 30 30 30 78 78 78 174 135 50 224 166 10 --239 182 13 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 241 196 14 139 102 15 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 78 78 78 250 250 250 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --250 250 250 214 214 214 198 198 198 190 150 46 --219 162 10 236 178 12 234 174 13 224 166 10 --216 158 10 213 154 11 213 154 11 216 158 10 --226 170 11 239 182 13 246 190 14 246 190 14 --246 190 14 246 190 14 242 186 14 206 162 42 --101 101 101 58 58 58 30 30 30 14 14 14 -- 6 6 6 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 10 10 10 -- 30 30 30 74 74 74 174 135 50 216 158 10 --236 178 12 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 241 196 14 226 184 13 -- 61 42 6 2 2 6 2 2 6 2 2 6 -- 22 22 22 238 238 238 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 226 226 226 187 187 187 180 133 36 --216 158 10 236 178 12 239 182 13 236 178 12 --230 174 11 226 170 11 226 170 11 230 174 11 --236 178 12 242 186 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 186 14 239 182 13 --206 162 42 106 106 106 66 66 66 34 34 34 -- 14 14 14 6 6 6 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 6 6 6 -- 26 26 26 70 70 70 163 133 67 213 154 11 --236 178 12 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 241 196 14 --190 146 13 18 14 6 2 2 6 2 2 6 -- 46 46 46 246 246 246 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 221 221 221 86 86 86 156 107 11 --216 158 10 236 178 12 242 186 14 246 186 14 --242 186 14 239 182 13 239 182 13 242 186 14 --242 186 14 246 186 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --242 186 14 225 175 15 142 122 72 66 66 66 -- 30 30 30 10 10 10 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 6 6 6 -- 26 26 26 70 70 70 163 133 67 210 150 10 --236 178 12 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --232 195 16 121 92 8 34 34 34 106 106 106 --221 221 221 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --242 242 242 82 82 82 18 14 6 163 110 8 --216 158 10 236 178 12 242 186 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 242 186 14 163 133 67 -- 46 46 46 18 18 18 6 6 6 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 10 10 10 -- 30 30 30 78 78 78 163 133 67 210 150 10 --236 178 12 246 186 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --241 196 14 215 174 15 190 178 144 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 218 218 218 -- 58 58 58 2 2 6 22 18 6 167 114 7 --216 158 10 236 178 12 246 186 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 186 14 242 186 14 190 150 46 -- 54 54 54 22 22 22 6 6 6 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 14 14 14 -- 38 38 38 86 86 86 180 133 36 213 154 11 --236 178 12 246 186 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 232 195 16 190 146 13 214 214 214 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 250 250 250 170 170 170 26 26 26 -- 2 2 6 2 2 6 37 26 9 163 110 8 --219 162 10 239 182 13 246 186 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 186 14 236 178 12 224 166 10 142 122 72 -- 46 46 46 18 18 18 6 6 6 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 6 6 6 18 18 18 -- 50 50 50 109 106 95 192 133 9 224 166 10 --242 186 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --242 186 14 226 184 13 210 162 10 142 110 46 --226 226 226 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --253 253 253 253 253 253 253 253 253 253 253 253 --198 198 198 66 66 66 2 2 6 2 2 6 -- 2 2 6 2 2 6 50 34 6 156 107 11 --219 162 10 239 182 13 246 186 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 242 186 14 --234 174 13 213 154 11 154 122 46 66 66 66 -- 30 30 30 10 10 10 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 6 6 6 22 22 22 -- 58 58 58 154 121 60 206 145 10 234 174 13 --242 186 14 246 186 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 186 14 236 178 12 210 162 10 163 110 8 -- 61 42 6 138 138 138 218 218 218 250 250 250 --253 253 253 253 253 253 253 253 253 250 250 250 --242 242 242 210 210 210 144 144 144 66 66 66 -- 6 6 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 61 42 6 163 110 8 --216 158 10 236 178 12 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 239 182 13 230 174 11 216 158 10 --190 142 34 124 112 88 70 70 70 38 38 38 -- 18 18 18 6 6 6 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 6 6 6 22 22 22 -- 62 62 62 168 124 44 206 145 10 224 166 10 --236 178 12 239 182 13 242 186 14 242 186 14 --246 186 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 236 178 12 216 158 10 175 118 6 -- 80 54 7 2 2 6 6 6 6 30 30 30 -- 54 54 54 62 62 62 50 50 50 38 38 38 -- 14 14 14 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 6 6 6 80 54 7 167 114 7 --213 154 11 236 178 12 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 190 14 242 186 14 239 182 13 239 182 13 --230 174 11 210 150 10 174 135 50 124 112 88 -- 82 82 82 54 54 54 34 34 34 18 18 18 -- 6 6 6 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 6 6 6 18 18 18 -- 50 50 50 158 118 36 192 133 9 200 144 11 --216 158 10 219 162 10 224 166 10 226 170 11 --230 174 11 236 178 12 239 182 13 239 182 13 --242 186 14 246 186 14 246 190 14 246 190 14 --246 190 14 246 190 14 246 190 14 246 190 14 --246 186 14 230 174 11 210 150 10 163 110 8 --104 69 6 10 10 10 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 6 6 6 91 60 6 167 114 7 --206 145 10 230 174 11 242 186 14 246 190 14 --246 190 14 246 190 14 246 186 14 242 186 14 --239 182 13 230 174 11 224 166 10 213 154 11 --180 133 36 124 112 88 86 86 86 58 58 58 -- 38 38 38 22 22 22 10 10 10 6 6 6 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 14 14 14 -- 34 34 34 70 70 70 138 110 50 158 118 36 --167 114 7 180 123 7 192 133 9 197 138 11 --200 144 11 206 145 10 213 154 11 219 162 10 --224 166 10 230 174 11 239 182 13 242 186 14 --246 186 14 246 186 14 246 186 14 246 186 14 --239 182 13 216 158 10 185 133 11 152 99 6 --104 69 6 18 14 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 2 2 6 2 2 6 2 2 6 -- 2 2 6 6 6 6 80 54 7 152 99 6 --192 133 9 219 162 10 236 178 12 239 182 13 --246 186 14 242 186 14 239 182 13 236 178 12 --224 166 10 206 145 10 192 133 9 154 121 60 -- 94 94 94 62 62 62 42 42 42 22 22 22 -- 14 14 14 6 6 6 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 6 6 6 -- 18 18 18 34 34 34 58 58 58 78 78 78 --101 98 89 124 112 88 142 110 46 156 107 11 --163 110 8 167 114 7 175 118 6 180 123 7 --185 133 11 197 138 11 210 150 10 219 162 10 --226 170 11 236 178 12 236 178 12 234 174 13 --219 162 10 197 138 11 163 110 8 130 83 6 -- 91 60 6 10 10 10 2 2 6 2 2 6 -- 18 18 18 38 38 38 38 38 38 38 38 38 -- 38 38 38 38 38 38 38 38 38 38 38 38 -- 38 38 38 38 38 38 26 26 26 2 2 6 -- 2 2 6 6 6 6 70 47 6 137 92 6 --175 118 6 200 144 11 219 162 10 230 174 11 --234 174 13 230 174 11 219 162 10 210 150 10 --192 133 9 163 110 8 124 112 88 82 82 82 -- 50 50 50 30 30 30 14 14 14 6 6 6 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 6 6 6 14 14 14 22 22 22 34 34 34 -- 42 42 42 58 58 58 74 74 74 86 86 86 --101 98 89 122 102 70 130 98 46 121 87 25 --137 92 6 152 99 6 163 110 8 180 123 7 --185 133 11 197 138 11 206 145 10 200 144 11 --180 123 7 156 107 11 130 83 6 104 69 6 -- 50 34 6 54 54 54 110 110 110 101 98 89 -- 86 86 86 82 82 82 78 78 78 78 78 78 -- 78 78 78 78 78 78 78 78 78 78 78 78 -- 78 78 78 82 82 82 86 86 86 94 94 94 --106 106 106 101 101 101 86 66 34 124 80 6 --156 107 11 180 123 7 192 133 9 200 144 11 --206 145 10 200 144 11 192 133 9 175 118 6 --139 102 15 109 106 95 70 70 70 42 42 42 -- 22 22 22 10 10 10 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 6 6 6 10 10 10 -- 14 14 14 22 22 22 30 30 30 38 38 38 -- 50 50 50 62 62 62 74 74 74 90 90 90 --101 98 89 112 100 78 121 87 25 124 80 6 --137 92 6 152 99 6 152 99 6 152 99 6 --138 86 6 124 80 6 98 70 6 86 66 30 --101 98 89 82 82 82 58 58 58 46 46 46 -- 38 38 38 34 34 34 34 34 34 34 34 34 -- 34 34 34 34 34 34 34 34 34 34 34 34 -- 34 34 34 34 34 34 38 38 38 42 42 42 -- 54 54 54 82 82 82 94 86 76 91 60 6 --134 86 6 156 107 11 167 114 7 175 118 6 --175 118 6 167 114 7 152 99 6 121 87 25 --101 98 89 62 62 62 34 34 34 18 18 18 -- 6 6 6 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 6 6 6 6 6 6 10 10 10 -- 18 18 18 22 22 22 30 30 30 42 42 42 -- 50 50 50 66 66 66 86 86 86 101 98 89 --106 86 58 98 70 6 104 69 6 104 69 6 --104 69 6 91 60 6 82 62 34 90 90 90 -- 62 62 62 38 38 38 22 22 22 14 14 14 -- 10 10 10 10 10 10 10 10 10 10 10 10 -- 10 10 10 10 10 10 6 6 6 10 10 10 -- 10 10 10 10 10 10 10 10 10 14 14 14 -- 22 22 22 42 42 42 70 70 70 89 81 66 -- 80 54 7 104 69 6 124 80 6 137 92 6 --134 86 6 116 81 8 100 82 52 86 86 86 -- 58 58 58 30 30 30 14 14 14 6 6 6 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 6 6 6 10 10 10 14 14 14 -- 18 18 18 26 26 26 38 38 38 54 54 54 -- 70 70 70 86 86 86 94 86 76 89 81 66 -- 89 81 66 86 86 86 74 74 74 50 50 50 -- 30 30 30 14 14 14 6 6 6 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 6 6 6 18 18 18 34 34 34 58 58 58 -- 82 82 82 89 81 66 89 81 66 89 81 66 -- 94 86 66 94 86 76 74 74 74 50 50 50 -- 26 26 26 14 14 14 6 6 6 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 6 6 6 6 6 6 14 14 14 18 18 18 -- 30 30 30 38 38 38 46 46 46 54 54 54 -- 50 50 50 42 42 42 30 30 30 18 18 18 -- 10 10 10 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 6 6 6 14 14 14 26 26 26 -- 38 38 38 50 50 50 58 58 58 58 58 58 -- 54 54 54 42 42 42 30 30 30 18 18 18 -- 10 10 10 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 6 6 6 -- 6 6 6 10 10 10 14 14 14 18 18 18 -- 18 18 18 14 14 14 10 10 10 6 6 6 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 6 6 6 -- 14 14 14 18 18 18 22 22 22 22 22 22 -- 18 18 18 14 14 14 10 10 10 6 6 6 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 -- 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 11 15 17 33 49 54 59 85 92 73 97 106 +-83 116 129 105 131 142 115 114 122 74 88 93 20 29 31 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 6 6 6 10 10 10 10 10 10 +-10 10 10 6 6 6 6 6 6 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 2 3 3 17 23 26 50 67 72 73 97 106 59 85 92 73 97 106 +-105 131 142 124 127 131 105 131 142 105 131 142 53 75 83 6 8 8 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 6 6 6 10 10 10 14 14 14 22 22 22 26 26 26 30 30 30 34 34 34 +-30 30 30 30 30 30 26 26 26 18 18 18 14 14 14 10 10 10 6 6 6 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 +-0 0 0 1 1 1 26 35 39 59 85 92 59 85 92 59 85 92 29 43 47 53 75 83 +-108 122 132 132 98 104 108 122 132 105 131 142 101 101 101 43 45 48 6 8 8 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-6 6 6 14 14 14 26 26 26 42 42 42 54 54 54 66 66 66 78 78 78 78 78 78 +-78 78 78 74 74 74 66 66 66 54 54 54 42 42 42 26 26 26 18 18 18 10 10 10 +-6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 +-11 15 17 27 40 45 59 85 92 59 85 92 27 40 45 31 45 49 73 97 106 93 121 133 +-108 122 132 108 122 132 105 131 142 108 122 132 105 131 142 73 97 106 26 35 39 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 10 10 +-22 22 22 42 42 42 66 66 66 86 86 86 66 66 66 38 38 38 38 38 38 22 22 22 +-26 26 26 34 34 34 54 54 54 66 66 66 86 86 86 70 70 70 46 46 46 26 26 26 +-14 14 14 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 7 12 13 21 31 35 42 59 64 +-53 75 83 53 75 83 50 67 72 42 59 64 32 40 45 42 59 64 73 97 106 116 116 116 +-132 98 104 116 116 116 108 122 132 117 104 110 105 131 142 83 116 129 50 67 72 7 12 13 +-1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 10 10 26 26 26 +-50 50 50 82 82 82 58 58 58 6 6 6 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 2 2 6 2 2 6 2 2 6 6 6 6 54 54 54 86 86 86 66 66 66 +-38 38 38 18 18 18 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 1 1 1 6 8 8 15 22 25 26 35 39 36 54 60 53 75 83 59 85 92 +-59 85 92 48 63 69 15 22 25 12 17 20 52 67 79 94 94 94 132 98 104 132 98 104 +-117 104 110 108 122 132 108 122 132 115 114 122 105 131 142 77 105 114 59 85 92 36 54 60 +-7 12 13 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 22 22 22 50 50 50 +-78 78 78 34 34 34 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 6 6 6 70 70 70 +-78 78 78 46 46 46 22 22 22 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 15 22 25 29 43 47 36 54 60 42 59 64 42 59 64 48 63 69 21 31 35 +-6 8 8 29 43 47 36 50 56 43 45 48 79 78 84 132 98 104 165 78 79 132 98 104 +-108 122 132 117 104 110 117 104 110 108 122 132 77 105 114 73 97 106 95 131 149 78 102 129 +-36 50 56 0 0 0 0 0 0 0 0 0 6 6 6 18 18 18 42 42 42 82 82 82 +-26 26 26 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 2 2 6 2 2 6 14 14 14 46 46 46 34 34 34 6 6 6 2 2 6 +-42 42 42 78 78 78 42 42 42 18 18 18 6 6 6 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-27 40 45 53 75 83 48 63 69 24 31 37 6 8 12 0 0 0 18 25 28 26 35 39 +-12 17 20 26 35 39 65 78 84 112 81 86 152 81 83 137 83 86 132 98 104 117 104 110 +-117 104 110 132 98 104 132 98 104 115 114 122 73 97 106 53 75 83 95 131 149 93 124 152 +-68 78 128 15 22 25 0 0 0 0 0 0 10 10 10 30 30 30 66 66 66 58 58 58 +-2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 2 2 6 2 2 6 26 26 26 86 86 86 101 101 101 46 46 46 10 10 10 +-2 2 6 58 58 58 70 70 70 34 34 34 10 10 10 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-36 50 56 21 30 33 4 7 7 0 0 0 1 1 1 17 12 12 69 31 31 68 59 64 +-57 59 63 21 31 35 32 40 45 86 73 69 152 81 83 152 81 83 117 104 110 132 98 104 +-152 81 83 132 98 104 108 122 132 77 105 114 77 105 114 93 121 133 95 131 149 93 124 152 +-95 131 149 53 75 83 11 15 17 0 0 0 14 14 14 42 42 42 86 86 86 10 10 10 +-2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 2 2 6 2 2 6 30 30 30 94 94 94 94 94 94 58 58 58 26 26 26 +-2 2 6 6 6 6 78 78 78 54 54 54 22 22 22 6 6 6 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-17 23 26 2 3 3 0 0 0 17 12 12 69 31 31 123 55 55 123 55 55 152 81 83 +-86 73 69 17 23 26 7 12 13 45 54 57 101 101 101 137 83 86 132 98 104 132 98 104 +-137 83 86 117 104 110 77 105 114 42 59 64 50 67 72 78 102 129 91 117 157 91 117 157 +-95 131 149 83 116 129 40 48 73 6 6 6 22 22 22 62 62 62 62 62 62 2 2 6 +-2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 2 2 6 2 2 6 26 26 26 54 54 54 38 38 38 18 18 18 10 10 10 +-2 2 6 2 2 6 34 34 34 82 82 82 38 38 38 14 14 14 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-1 1 1 1 2 2 2 3 3 28 12 12 123 55 55 174 79 79 174 79 79 174 79 79 +-152 81 83 68 59 64 26 35 39 27 40 45 79 78 84 137 83 86 165 78 79 137 83 86 +-94 94 94 48 63 69 36 50 56 50 67 72 73 97 106 93 121 133 93 124 152 93 124 152 +-95 131 149 91 118 149 78 102 129 27 40 45 30 30 30 78 78 78 30 30 30 2 2 6 +-2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 2 2 6 2 2 6 10 10 10 10 10 10 2 2 6 2 2 6 2 2 6 +-2 2 6 2 2 6 2 2 6 78 78 78 50 50 50 18 18 18 6 6 6 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-4 5 3 24 53 24 19 31 15 8 7 3 90 61 47 165 78 79 174 79 79 174 79 79 +-174 79 79 137 83 86 60 52 57 7 12 13 17 23 26 70 70 70 132 98 104 112 81 86 +-79 78 84 31 45 49 15 22 25 53 75 83 91 118 149 86 106 160 91 117 157 93 124 152 +-91 117 157 93 124 152 95 131 149 53 75 83 50 50 50 86 86 86 14 14 14 2 2 6 +-2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 2 2 6 2 2 6 54 54 54 66 66 66 26 26 26 6 6 6 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-19 31 15 34 76 34 34 76 34 19 31 15 28 12 12 123 55 55 174 79 79 174 79 79 +-174 79 79 165 78 79 112 81 86 32 40 45 15 22 25 38 53 58 65 78 84 29 31 32 +-21 30 33 42 59 64 60 80 103 78 102 129 87 112 149 84 96 162 91 117 157 93 124 152 +-91 117 157 93 124 152 93 121 133 59 85 92 57 68 71 82 85 86 2 2 6 2 2 6 +-2 2 6 6 6 6 10 10 10 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 2 2 6 2 2 6 6 6 6 14 14 14 10 10 10 2 2 6 2 2 6 +-2 2 6 2 2 6 2 2 6 18 18 18 82 82 82 34 34 34 10 10 10 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-34 76 34 40 89 40 40 89 40 34 76 34 8 15 6 48 26 18 123 55 55 174 79 79 +-174 79 79 174 79 79 137 83 86 68 59 64 32 40 45 21 30 33 31 45 49 21 31 35 +-12 17 20 48 63 69 78 102 129 81 88 166 84 96 162 91 117 157 93 124 152 91 117 157 +-93 124 152 95 131 149 83 116 129 59 85 92 57 68 71 86 86 86 2 2 6 2 2 6 +-6 6 6 6 6 6 22 22 22 34 34 34 6 6 6 2 2 6 2 2 6 2 2 6 +-2 2 6 2 2 6 18 18 18 34 34 34 10 10 10 50 50 50 22 22 22 2 2 6 +-2 2 6 2 2 6 2 2 6 10 10 10 86 86 86 42 42 42 14 14 14 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-40 89 40 40 89 40 40 89 40 40 89 40 24 53 24 6 6 6 69 31 31 123 55 55 +-123 55 55 90 61 47 69 31 31 36 32 33 21 31 35 7 12 13 18 25 28 48 63 69 +-60 80 103 68 78 128 84 101 153 84 96 162 84 96 162 91 117 157 91 117 157 84 96 162 +-91 117 157 73 97 106 48 63 69 50 67 72 57 59 63 86 86 86 2 2 6 2 2 6 +-38 38 38 116 116 116 94 94 94 22 22 22 22 22 22 2 2 6 2 2 6 2 2 6 +-14 14 14 86 86 86 124 131 137 170 170 170 151 151 151 38 38 38 26 26 26 6 6 6 +-2 2 6 2 2 6 2 2 6 2 2 6 86 86 86 46 46 46 14 14 14 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-34 76 34 40 89 40 40 89 40 40 89 40 34 76 34 19 31 15 17 12 12 48 26 18 +-48 26 18 8 7 3 10 10 22 23 29 47 51 61 92 42 59 64 21 30 33 34 45 54 +-68 78 128 81 88 166 81 82 173 86 106 160 86 106 160 84 96 162 86 106 160 87 112 149 +-91 118 149 77 105 114 52 67 79 32 40 45 50 50 50 86 86 86 2 2 6 14 14 14 +-124 131 137 198 198 198 195 195 195 116 116 116 10 10 10 2 2 6 2 2 6 6 6 6 +-101 98 89 187 187 187 210 210 210 218 218 218 214 214 214 124 131 137 14 14 14 6 6 6 +-2 2 6 2 2 6 2 2 6 2 2 6 86 86 86 50 50 50 18 18 18 6 6 6 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-19 31 15 34 76 34 40 89 40 40 89 40 40 89 40 24 53 24 8 7 3 0 0 0 +-6 8 12 28 32 52 51 61 92 54 54 122 74 77 160 68 78 128 26 35 39 6 8 8 +-34 45 54 68 78 128 84 96 162 86 106 160 86 106 160 81 88 166 84 96 162 87 112 149 +-73 97 106 36 50 56 33 49 54 18 18 18 46 46 46 86 86 86 2 2 6 54 54 54 +-218 218 218 195 195 195 226 226 226 246 246 246 58 58 58 2 2 6 2 2 6 30 30 30 +-210 210 210 253 253 253 170 170 170 124 127 131 221 221 221 234 234 234 74 74 74 2 2 6 +-2 2 6 2 2 6 2 2 6 2 2 6 70 70 70 58 58 58 22 22 22 6 6 6 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-4 5 3 24 53 24 40 89 40 40 89 40 34 76 34 12 22 15 4 5 3 4 5 3 +-13 17 26 54 54 122 78 78 174 78 78 174 78 78 174 74 77 160 51 61 92 21 31 35 +-26 35 39 53 75 83 84 101 153 81 82 173 81 88 166 84 101 153 60 80 103 60 80 103 +-53 75 83 38 53 58 42 59 64 22 22 22 46 46 46 82 82 82 2 2 6 106 106 106 +-170 170 170 26 26 26 86 86 86 226 226 226 124 127 131 10 10 10 14 14 14 46 46 46 +-231 231 231 190 190 190 6 6 6 70 70 70 90 90 90 238 238 238 151 151 151 2 2 6 +-2 2 6 2 2 6 2 2 6 2 2 6 70 70 70 58 58 58 22 22 22 6 6 6 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-1 2 2 8 15 6 24 53 24 34 76 34 19 31 15 8 15 6 63 55 20 63 55 20 +-18 18 18 40 48 73 74 77 160 78 78 174 78 78 174 81 82 173 74 77 160 52 67 79 +-17 23 26 21 31 35 60 80 103 81 88 166 74 77 160 78 102 129 36 54 60 12 17 20 +-42 59 64 48 63 69 21 31 35 18 18 18 42 42 42 86 86 86 6 6 6 116 116 116 +-106 106 106 6 6 6 70 70 70 151 151 151 124 127 131 18 18 18 38 38 38 54 54 54 +-221 221 221 106 106 106 2 2 6 14 14 14 46 46 46 190 190 190 198 198 198 2 2 6 +-2 2 6 2 2 6 2 2 6 2 2 6 74 74 74 62 62 62 22 22 22 6 6 6 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-11 15 17 0 0 0 12 22 15 19 31 15 8 15 6 63 55 20 149 139 69 149 139 69 +-63 55 20 10 10 22 54 54 122 78 78 174 78 78 174 78 78 174 81 82 173 68 78 128 +-24 31 37 6 6 6 36 50 56 60 80 103 51 61 92 42 59 64 36 50 56 31 45 49 +-29 43 47 27 40 45 6 8 8 14 14 14 42 42 42 94 94 94 14 14 14 101 101 101 +-124 127 131 2 2 6 18 18 18 116 116 116 106 107 48 121 92 8 121 92 8 98 70 6 +-170 170 170 106 106 106 2 2 6 2 2 6 2 2 6 195 195 195 195 195 195 6 6 6 +-2 2 6 2 2 6 2 2 6 2 2 6 74 74 74 62 62 62 22 22 22 6 6 6 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-26 35 39 3 5 6 1 1 1 2 3 3 35 31 12 133 118 54 175 176 80 175 176 80 +-133 118 54 35 31 12 23 29 47 54 54 122 78 78 174 78 78 174 74 77 160 68 78 128 +-51 61 92 31 45 49 26 35 39 36 50 56 29 43 47 7 12 13 21 30 33 42 59 64 +-18 25 28 7 12 13 1 1 1 10 10 10 38 38 38 90 90 90 14 14 14 58 58 58 +-210 210 210 26 26 26 62 42 6 154 114 10 226 170 11 237 188 10 220 174 15 184 138 11 +-220 174 15 174 140 55 35 31 12 2 2 6 70 70 70 246 246 246 124 131 137 2 2 6 +-2 2 6 2 2 6 2 2 6 2 2 6 70 70 70 66 66 66 26 26 26 6 6 6 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-27 40 45 17 23 26 2 3 3 1 1 1 56 77 35 165 152 80 175 176 80 175 176 80 +-175 176 80 106 107 48 22 22 22 28 32 52 54 54 122 54 54 122 51 61 92 28 32 52 +-20 27 34 31 45 49 11 15 17 7 12 13 36 50 56 31 45 49 29 43 47 36 50 56 +-6 8 8 0 0 0 0 0 0 10 10 10 38 38 38 86 86 86 14 14 14 10 10 10 +-195 195 195 198 179 130 192 133 9 220 174 15 239 182 13 237 188 10 232 195 16 239 207 25 +-237 201 50 241 208 19 232 195 16 184 138 11 198 179 130 208 206 196 42 42 42 2 2 6 +-2 2 6 2 2 6 2 2 6 2 2 6 50 50 50 74 74 74 30 30 30 6 6 6 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-15 22 25 26 35 39 15 22 25 0 0 0 35 31 12 133 118 54 175 176 80 175 176 80 +-175 176 80 165 152 80 56 77 35 6 8 12 23 29 47 13 17 26 2 2 6 0 0 0 +-1 2 2 26 35 39 26 35 39 26 35 39 42 59 64 42 59 64 20 29 31 6 8 8 +-0 0 0 0 0 0 0 0 0 10 10 10 34 34 34 86 86 86 14 14 14 2 2 6 +-121 92 8 192 133 9 219 162 10 239 182 13 237 188 10 232 195 16 241 208 19 237 201 50 +-237 201 50 239 207 25 241 208 19 241 208 19 241 208 19 230 187 11 121 92 8 2 2 6 +-2 2 6 2 2 6 2 2 6 2 2 6 50 50 50 82 82 82 34 34 34 10 10 10 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-1 2 2 15 22 25 31 45 49 6 8 12 4 5 3 63 55 20 149 139 69 175 176 80 +-175 176 80 175 176 80 106 107 48 20 16 6 1 1 1 0 0 0 2 3 3 11 15 17 +-21 30 33 36 50 56 36 50 56 24 31 37 15 22 25 6 8 8 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 10 10 10 34 34 34 82 82 82 30 30 30 62 42 6 +-180 123 7 206 145 10 230 174 11 239 182 13 237 188 10 238 202 15 241 208 19 237 201 50 +-239 207 25 241 208 19 241 208 19 241 208 19 230 187 11 220 174 15 184 138 11 6 6 6 +-2 2 6 2 2 6 2 2 6 2 2 6 26 26 26 94 94 94 42 42 42 14 14 14 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 1 2 2 29 43 47 26 35 39 3 5 6 8 7 3 106 107 48 165 152 80 +-175 176 80 149 139 69 63 55 20 4 5 3 2 3 3 12 17 20 26 35 39 26 35 39 +-17 23 26 7 12 13 6 8 8 3 5 6 1 2 2 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 10 10 10 30 30 30 78 78 78 50 50 50 104 69 6 +-192 133 9 216 158 10 236 178 12 237 188 10 232 195 16 241 208 19 237 201 50 237 201 50 +-241 208 19 241 208 19 241 208 19 204 160 10 200 144 11 216 158 10 156 118 10 2 2 6 +-2 2 6 2 2 6 2 2 6 2 2 6 6 6 6 90 90 90 54 54 54 18 18 18 +-6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 12 17 20 27 40 45 18 25 28 1 1 1 35 31 12 106 107 48 +-149 139 69 56 77 35 8 7 3 1 2 2 12 17 20 26 35 39 21 31 35 11 15 17 +-3 5 6 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 10 10 10 30 30 30 78 78 78 46 46 46 22 22 22 +-137 92 6 204 160 10 239 182 13 237 188 10 238 202 15 241 208 19 241 208 19 241 208 19 +-241 208 19 204 160 10 184 138 11 210 150 10 216 158 10 210 150 10 98 70 6 2 2 6 +-6 6 6 54 54 54 14 14 14 2 2 6 2 2 6 62 62 62 74 74 74 30 30 30 +-10 10 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 1 1 1 15 22 25 33 49 54 12 17 20 2 3 3 35 31 12 +-56 77 35 20 16 6 1 1 1 18 25 28 21 31 35 11 15 17 1 1 1 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 10 10 10 34 34 34 78 78 78 50 50 50 6 6 6 +-88 55 22 139 102 15 190 146 13 230 187 11 239 207 25 232 195 16 220 174 15 190 146 13 +-171 120 8 192 133 9 210 150 10 213 154 11 185 146 40 165 152 80 101 98 89 2 2 6 +-2 2 6 78 78 78 116 116 116 58 58 58 2 2 6 22 22 22 90 90 90 46 46 46 +-18 18 18 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 1 1 1 27 40 45 29 43 47 3 5 6 2 3 3 +-8 7 3 1 1 1 17 23 26 31 45 49 15 22 25 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 10 10 10 38 38 38 86 86 86 50 50 50 6 6 6 +-124 127 131 168 158 138 156 107 11 171 120 8 204 160 10 184 138 11 197 138 11 200 144 11 +-206 145 10 206 145 10 197 138 11 198 179 130 195 195 195 198 198 198 170 170 170 14 14 14 +-2 2 6 22 22 22 116 116 116 116 116 116 22 22 22 2 2 6 74 74 74 70 70 70 +-30 30 30 10 10 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 11 15 17 31 45 49 26 35 39 3 5 6 +-0 0 0 7 12 13 27 40 45 18 25 28 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 6 6 6 18 18 18 50 50 50 101 101 101 26 26 26 10 10 10 +-124 131 137 190 190 190 168 158 138 156 107 11 197 138 11 200 144 11 197 138 11 192 133 9 +-180 123 7 185 146 40 198 179 130 187 187 187 202 202 202 221 221 221 214 214 214 66 66 66 +-2 2 6 2 2 6 50 50 50 62 62 62 6 6 6 2 2 6 10 10 10 90 90 90 +-50 50 50 18 18 18 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 15 22 25 36 54 60 18 25 28 +-0 0 0 21 30 33 27 40 45 2 3 3 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 10 10 10 34 34 34 74 74 74 74 74 74 2 2 6 6 6 6 +-151 151 151 198 198 198 190 190 190 168 158 138 148 132 55 156 107 11 156 107 11 169 125 40 +-168 158 138 187 187 187 190 190 190 210 210 210 246 246 246 253 253 253 253 253 253 180 180 180 +-6 6 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 62 62 62 +-74 74 74 34 34 34 14 14 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 27 40 45 35 52 58 +-18 25 28 35 52 58 17 23 26 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 10 10 10 22 22 22 54 54 54 94 94 94 18 18 18 2 2 6 46 46 46 +-234 234 234 221 221 221 190 190 190 190 190 190 190 190 190 187 187 187 187 187 187 190 190 190 +-190 190 190 195 195 195 214 214 214 242 242 242 253 253 253 253 253 253 253 253 253 253 253 253 +-82 82 82 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 14 14 14 +-86 86 86 54 54 54 22 22 22 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 12 13 33 49 54 +-52 72 81 36 54 60 6 8 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-6 6 6 18 18 18 46 46 46 90 90 90 46 46 46 18 18 18 6 6 6 180 180 180 +-253 253 253 246 246 246 202 202 202 190 190 190 190 190 190 190 190 190 190 190 190 190 190 190 +-202 202 202 231 231 231 250 250 250 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-202 202 202 14 14 14 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 +-42 42 42 86 86 86 42 42 42 18 18 18 6 6 6 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 17 20 +-36 54 60 29 43 47 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 +-14 14 14 38 38 38 74 74 74 66 66 66 2 2 6 6 6 6 90 90 90 250 250 250 +-253 253 253 253 253 253 238 238 238 198 198 198 190 190 190 190 190 190 195 195 195 221 221 221 +-246 246 246 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 82 82 82 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 78 78 78 70 70 70 34 34 34 14 14 14 6 6 6 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-21 30 33 35 52 58 6 8 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 14 14 +-34 34 34 66 66 66 78 78 78 6 6 6 2 2 6 18 18 18 218 218 218 253 253 253 +-253 253 253 253 253 253 253 253 253 246 246 246 226 226 226 231 231 231 246 246 246 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 180 180 180 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 18 18 18 90 90 90 62 62 62 30 30 30 10 10 10 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-12 17 20 36 54 60 29 43 47 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 10 10 26 26 26 +-58 58 58 90 90 90 18 18 18 2 2 6 2 2 6 106 106 106 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 250 250 250 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 231 231 231 18 18 18 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 2 2 6 18 18 18 94 94 94 54 54 54 26 26 26 10 10 10 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 21 30 33 35 52 58 6 8 12 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 22 22 22 50 50 50 +-90 90 90 26 26 26 2 2 6 2 2 6 14 14 14 195 195 195 250 250 250 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-250 250 250 242 242 242 54 54 54 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 2 2 6 2 2 6 38 38 38 86 86 86 50 50 50 22 22 22 6 6 6 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 12 17 20 36 54 60 29 43 47 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 14 14 14 38 38 38 82 82 82 +-34 34 34 2 2 6 2 2 6 2 2 6 42 42 42 195 195 195 246 246 246 253 253 253 +-253 253 253 253 253 253 253 253 253 250 250 250 242 242 242 242 242 242 250 250 250 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 250 250 250 246 246 246 238 238 238 +-226 226 226 231 231 231 101 101 101 6 6 6 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 2 2 6 2 2 6 2 2 6 38 38 38 82 82 82 42 42 42 14 14 14 +-6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 21 30 33 35 52 58 6 8 12 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 10 10 10 26 26 26 62 62 62 66 66 66 +-2 2 6 2 2 6 2 2 6 6 6 6 70 70 70 170 170 170 202 202 202 234 234 234 +-246 246 246 250 250 250 250 250 250 238 238 238 226 226 226 231 231 231 238 238 238 250 250 250 +-250 250 250 250 250 250 246 246 246 231 231 231 214 214 214 202 202 202 202 202 202 202 202 202 +-198 198 198 202 202 202 180 180 180 18 18 18 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 62 62 62 66 66 66 30 30 30 +-10 10 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 12 17 20 36 54 60 29 43 47 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 14 14 14 42 42 42 82 82 82 18 18 18 +-2 2 6 2 2 6 2 2 6 10 10 10 94 94 94 180 180 180 218 218 218 242 242 242 +-250 250 250 253 253 253 253 253 253 250 250 250 234 234 234 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 246 246 246 238 238 238 226 226 226 210 210 210 202 202 202 +-195 195 195 195 195 195 210 210 210 151 151 151 6 6 6 14 14 14 50 50 50 14 14 14 +-2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 6 6 6 86 86 86 46 46 46 +-18 18 18 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 21 30 33 35 52 58 6 8 12 0 0 0 +-0 0 0 0 0 0 0 0 0 6 6 6 22 22 22 54 54 54 70 70 70 2 2 6 +-2 2 6 10 10 10 2 2 6 22 22 22 170 170 170 231 231 231 250 250 250 253 253 253 +-253 253 253 253 253 253 253 253 253 250 250 250 242 242 242 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 246 246 246 +-231 231 231 202 202 202 198 198 198 226 226 226 94 94 94 2 2 6 6 6 6 38 38 38 +-30 30 30 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 62 62 62 66 66 66 +-26 26 26 10 10 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 6 8 8 33 49 54 29 43 47 6 8 12 +-0 0 0 0 0 0 0 0 0 10 10 10 30 30 30 74 74 74 50 50 50 2 2 6 +-26 26 26 26 26 26 2 2 6 106 106 106 238 238 238 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 246 246 246 218 218 218 202 202 202 210 210 210 14 14 14 2 2 6 2 2 6 +-30 30 30 22 22 22 2 2 6 2 2 6 2 2 6 2 2 6 18 18 18 86 86 86 +-42 42 42 14 14 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 17 20 33 49 54 17 23 26 +-0 0 0 0 0 0 0 0 0 14 14 14 42 42 42 90 90 90 22 22 22 2 2 6 +-42 42 42 2 2 6 18 18 18 218 218 218 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 250 250 250 221 221 221 218 218 218 101 101 101 2 2 6 14 14 14 +-18 18 18 38 38 38 10 10 10 2 2 6 2 2 6 2 2 6 2 2 6 78 78 78 +-58 58 58 22 22 22 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 22 25 36 54 60 +-0 0 0 0 0 0 0 0 0 18 18 18 54 54 54 82 82 82 2 2 6 26 26 26 +-22 22 22 2 2 6 124 127 131 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 250 250 250 238 238 238 198 198 198 6 6 6 38 38 38 +-58 58 58 26 26 26 38 38 38 2 2 6 2 2 6 2 2 6 2 2 6 46 46 46 +-78 78 78 30 30 30 10 10 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 21 30 33 +-36 54 60 0 0 0 0 0 0 30 30 30 74 74 74 58 58 58 2 2 6 42 42 42 +-2 2 6 22 22 22 231 231 231 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 250 250 250 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 246 246 246 46 46 46 38 38 38 +-42 42 42 14 14 14 38 38 38 14 14 14 2 2 6 2 2 6 2 2 6 6 6 6 +-86 86 86 46 46 46 14 14 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-36 54 60 0 0 0 0 0 0 42 42 42 90 90 90 18 18 18 18 18 18 26 26 26 +-2 2 6 116 116 116 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 250 250 250 238 238 238 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 94 94 94 6 6 6 +-2 2 6 2 2 6 10 10 10 34 34 34 2 2 6 2 2 6 2 2 6 2 2 6 +-74 74 74 58 58 58 22 22 22 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 36 54 60 26 26 26 66 66 66 82 82 82 2 2 6 38 38 38 6 6 6 +-14 14 14 210 210 210 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 246 246 246 242 242 242 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 151 151 151 2 2 6 +-2 2 6 2 2 6 2 2 6 46 46 46 2 2 6 2 2 6 2 2 6 2 2 6 +-42 42 42 74 74 74 30 30 30 10 10 10 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-6 6 6 36 54 60 21 30 33 90 90 90 26 26 26 6 6 6 42 42 42 2 2 6 +-74 74 74 250 250 250 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 242 242 242 242 242 242 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 180 180 180 2 2 6 +-2 2 6 2 2 6 2 2 6 46 46 46 2 2 6 2 2 6 2 2 6 2 2 6 +-10 10 10 86 86 86 38 38 38 10 10 10 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-10 10 10 26 26 26 36 54 60 82 82 82 2 2 6 22 22 22 18 18 18 2 2 6 +-151 151 151 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 234 234 234 242 242 242 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 202 202 202 2 2 6 +-2 2 6 2 2 6 2 2 6 38 38 38 2 2 6 2 2 6 2 2 6 2 2 6 +-6 6 6 86 86 86 46 46 46 14 14 14 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 +-18 18 18 46 46 46 86 86 86 36 54 60 2 2 6 34 34 34 10 10 10 6 6 6 +-210 210 210 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 234 234 234 242 242 242 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 221 221 221 6 6 6 +-2 2 6 2 2 6 6 6 6 30 30 30 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 82 82 82 54 54 54 18 18 18 6 6 6 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 10 10 +-26 26 26 66 66 66 62 62 62 2 2 6 2 2 6 38 38 38 10 10 10 26 26 26 +-238 238 238 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 231 231 231 238 238 238 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 231 231 231 6 6 6 +-2 2 6 2 2 6 10 10 10 30 30 30 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 66 66 66 58 58 58 22 22 22 6 6 6 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 10 10 +-38 38 38 78 78 78 6 6 6 2 2 6 2 2 6 46 46 46 14 14 14 42 42 42 +-246 246 246 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 231 231 231 242 242 242 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 234 234 234 10 10 10 +-2 2 6 2 2 6 22 22 22 14 14 14 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 66 66 66 62 62 62 22 22 22 6 6 6 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 18 18 18 +-50 50 50 74 74 74 2 2 6 2 2 6 14 14 14 70 70 70 34 34 34 62 62 62 +-250 250 250 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 231 231 231 246 246 246 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 234 234 234 14 14 14 +-2 2 6 2 2 6 30 30 30 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 66 66 66 62 62 62 22 22 22 6 6 6 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 18 18 18 +-54 54 54 62 62 62 2 2 6 2 2 6 2 2 6 30 30 30 46 46 46 70 70 70 +-250 250 250 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 231 231 231 246 246 246 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 226 226 226 10 10 10 +-2 2 6 6 6 6 30 30 30 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 66 66 66 58 58 58 22 22 22 6 6 6 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 22 22 22 +-58 58 58 62 62 62 2 2 6 2 2 6 2 2 6 2 2 6 30 30 30 78 78 78 +-250 250 250 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 231 231 231 246 246 246 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 202 202 202 2 2 6 +-22 22 22 34 34 34 20 16 6 22 22 22 26 26 26 18 18 18 6 6 6 2 2 6 +-2 2 6 82 82 82 54 54 54 18 18 18 6 6 6 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 26 26 26 +-62 62 62 106 106 106 63 55 20 184 138 11 204 160 10 121 92 8 6 6 6 62 62 62 +-238 238 238 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 231 231 231 246 246 246 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 151 151 151 18 18 18 +-14 14 14 2 2 6 2 2 6 2 2 6 6 6 6 18 18 18 66 66 66 38 38 38 +-6 6 6 94 94 94 50 50 50 18 18 18 6 6 6 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 6 6 6 10 10 10 10 10 10 18 18 18 38 38 38 +-78 78 78 138 132 106 216 158 10 242 186 14 246 190 14 246 190 14 156 118 10 10 10 10 +-90 90 90 238 238 238 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 231 231 231 250 250 250 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 246 230 190 214 187 87 214 187 87 185 146 40 35 31 12 +-2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 38 38 38 46 46 46 +-26 26 26 106 106 106 54 54 54 18 18 18 6 6 6 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 6 6 6 14 14 14 22 22 22 30 30 30 38 38 38 50 50 50 70 70 70 +-106 106 106 185 146 40 226 170 11 242 186 14 246 190 14 246 190 14 246 190 14 154 114 10 +-6 6 6 74 74 74 226 226 226 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 231 231 231 250 250 250 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 237 201 50 241 196 14 241 208 19 232 195 16 35 31 12 +-2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 6 6 6 30 30 30 26 26 26 +-204 160 10 165 152 80 66 66 66 26 26 26 6 6 6 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-6 6 6 18 18 18 38 38 38 58 58 58 78 78 78 86 86 86 101 101 101 124 127 131 +-174 140 55 210 150 10 234 174 13 246 186 14 246 190 14 246 190 14 246 190 14 237 188 10 +-98 70 6 2 2 6 46 46 46 198 198 198 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 234 234 234 242 242 242 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 214 187 87 242 186 14 241 196 14 204 160 10 20 16 6 +-2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 6 6 6 121 92 8 +-238 202 15 232 195 16 82 82 82 34 34 34 10 10 10 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-14 14 14 38 38 38 70 70 70 148 132 55 185 146 40 200 144 11 197 138 11 197 138 11 +-213 154 11 226 170 11 242 186 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 +-220 174 15 35 31 12 2 2 6 22 22 22 151 151 151 250 250 250 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 250 250 250 242 242 242 214 187 87 239 182 13 237 188 10 213 154 11 35 31 12 +-2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 62 42 6 220 174 15 +-237 188 10 237 188 10 113 101 86 42 42 42 14 14 14 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 +-22 22 22 54 54 54 148 132 55 213 154 11 226 170 11 230 174 11 226 170 11 226 170 11 +-236 178 12 242 186 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 +-241 196 14 184 138 11 10 10 10 2 2 6 6 6 6 116 116 116 242 242 242 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 231 231 231 198 198 198 213 164 39 236 178 12 236 178 12 210 150 10 137 92 6 +-20 16 6 2 2 6 2 2 6 2 2 6 6 6 6 62 42 6 200 144 11 236 178 12 +-239 182 13 239 182 13 124 112 88 58 58 58 22 22 22 6 6 6 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 10 10 +-30 30 30 70 70 70 169 125 40 226 170 11 239 182 13 242 186 14 242 186 14 246 186 14 +-246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 +-246 190 14 232 195 16 98 70 6 2 2 6 2 2 6 2 2 6 66 66 66 221 221 221 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 202 202 202 198 198 198 213 164 39 230 174 11 230 174 11 216 158 10 192 133 9 +-163 110 8 120 80 7 98 70 6 120 80 7 167 114 7 197 138 11 226 170 11 239 182 13 +-242 186 14 242 186 14 165 152 80 78 78 78 34 34 34 14 14 14 6 6 6 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 +-30 30 30 78 78 78 185 146 40 226 170 11 239 182 13 246 190 14 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 +-246 190 14 241 196 14 204 160 10 20 16 6 2 2 6 2 2 6 2 2 6 38 38 38 +-218 218 218 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-250 250 250 202 202 202 198 198 198 213 164 39 226 170 11 236 178 12 224 166 10 210 150 10 +-200 144 11 197 138 11 192 133 9 197 138 11 210 150 10 226 170 11 242 186 14 246 190 14 +-246 190 14 246 186 14 220 174 15 124 112 88 62 62 62 30 30 30 14 14 14 6 6 6 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 10 10 +-30 30 30 78 78 78 174 140 55 224 166 10 239 182 13 246 190 14 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 +-246 190 14 246 190 14 241 196 14 139 102 15 2 2 6 2 2 6 2 2 6 2 2 6 +-78 78 78 250 250 250 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-250 250 250 214 214 214 198 198 198 185 146 40 219 162 10 236 178 12 234 174 13 224 166 10 +-216 158 10 213 154 11 213 154 11 216 158 10 226 170 11 239 182 13 246 190 14 246 190 14 +-246 190 14 246 190 14 242 186 14 213 164 39 101 101 101 58 58 58 30 30 30 14 14 14 +-6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 10 10 +-30 30 30 74 74 74 174 140 55 216 158 10 236 178 12 246 190 14 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 +-246 190 14 246 190 14 241 196 14 230 187 11 62 42 6 2 2 6 2 2 6 2 2 6 +-22 22 22 238 238 238 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 226 226 226 187 187 187 169 125 40 216 158 10 236 178 12 239 182 13 236 178 12 +-230 174 11 226 170 11 226 170 11 230 174 11 236 178 12 242 186 14 246 190 14 246 190 14 +-246 190 14 246 190 14 246 186 14 239 182 13 213 164 39 106 106 106 66 66 66 34 34 34 +-14 14 14 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 +-26 26 26 70 70 70 149 139 69 213 154 11 236 178 12 246 190 14 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 241 196 14 190 146 13 20 16 6 2 2 6 2 2 6 +-46 46 46 246 246 246 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 221 221 221 86 86 86 156 107 11 216 158 10 236 178 12 242 186 14 246 186 14 +-242 186 14 239 182 13 239 182 13 242 186 14 242 186 14 246 186 14 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 242 186 14 220 174 15 149 139 69 66 66 66 +-30 30 30 10 10 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 +-26 26 26 70 70 70 149 139 69 210 150 10 236 178 12 246 190 14 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 232 195 16 121 92 8 34 34 34 106 106 106 +-221 221 221 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-242 242 242 82 82 82 20 16 6 163 110 8 216 158 10 236 178 12 242 186 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 242 186 14 149 139 69 +-46 46 46 18 18 18 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 10 10 +-30 30 30 78 78 78 149 139 69 210 150 10 236 178 12 246 186 14 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 241 196 14 220 174 15 198 179 130 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 218 218 218 +-58 58 58 2 2 6 20 16 6 167 114 7 216 158 10 236 178 12 246 186 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 186 14 242 186 14 185 146 40 +-54 54 54 22 22 22 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 14 14 +-38 38 38 86 86 86 169 125 40 213 154 11 236 178 12 246 186 14 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 232 195 16 190 146 13 214 214 214 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 250 250 250 170 170 170 26 26 26 +-2 2 6 2 2 6 35 31 12 163 110 8 219 162 10 239 182 13 246 186 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 246 186 14 236 178 12 224 166 10 149 139 69 +-46 46 46 18 18 18 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 18 18 18 +-50 50 50 113 101 86 192 133 9 224 166 10 242 186 14 246 190 14 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 242 186 14 230 187 11 204 160 10 133 118 54 +-226 226 226 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 +-253 253 253 253 253 253 253 253 253 253 253 253 198 198 198 66 66 66 2 2 6 2 2 6 +-2 2 6 2 2 6 62 42 6 156 107 11 219 162 10 239 182 13 246 186 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 242 186 14 234 174 13 213 154 11 148 132 55 66 66 66 +-30 30 30 10 10 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 22 22 22 +-58 58 58 148 132 55 206 145 10 234 174 13 242 186 14 246 186 14 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 246 186 14 236 178 12 204 160 10 163 110 8 +-62 42 6 124 131 137 218 218 218 250 250 250 253 253 253 253 253 253 253 253 253 250 250 250 +-242 242 242 210 210 210 151 151 151 66 66 66 6 6 6 2 2 6 2 2 6 2 2 6 +-2 2 6 2 2 6 62 42 6 163 110 8 216 158 10 236 178 12 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 +-246 190 14 239 182 13 230 174 11 216 158 10 185 146 40 124 112 88 70 70 70 38 38 38 +-18 18 18 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 22 22 22 +-62 62 62 169 125 40 206 145 10 224 166 10 236 178 12 239 182 13 242 186 14 242 186 14 +-246 186 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 236 178 12 216 158 10 171 120 8 +-85 57 6 2 2 6 6 6 6 30 30 30 54 54 54 62 62 62 50 50 50 38 38 38 +-14 14 14 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 6 6 6 85 57 6 167 114 7 213 154 11 236 178 12 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 246 190 14 242 186 14 239 182 13 239 182 13 +-230 174 11 210 150 10 174 140 55 124 112 88 82 82 82 54 54 54 34 34 34 18 18 18 +-6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 18 18 18 +-50 50 50 169 125 40 192 133 9 200 144 11 216 158 10 219 162 10 224 166 10 226 170 11 +-230 174 11 236 178 12 239 182 13 239 182 13 242 186 14 246 186 14 246 190 14 246 190 14 +-246 190 14 246 190 14 246 190 14 246 190 14 246 186 14 230 174 11 210 150 10 163 110 8 +-104 69 6 10 10 10 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 6 6 6 85 57 6 167 114 7 206 145 10 230 174 11 242 186 14 246 190 14 +-246 190 14 246 190 14 246 186 14 242 186 14 239 182 13 230 174 11 224 166 10 213 154 11 +-169 125 40 124 112 88 86 86 86 58 58 58 38 38 38 22 22 22 10 10 10 6 6 6 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 14 14 +-34 34 34 70 70 70 133 118 54 169 125 40 167 114 7 180 123 7 192 133 9 197 138 11 +-200 144 11 206 145 10 213 154 11 219 162 10 224 166 10 230 174 11 239 182 13 242 186 14 +-246 186 14 246 186 14 246 186 14 246 186 14 239 182 13 216 158 10 184 138 11 152 99 6 +-104 69 6 20 16 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 2 2 6 +-2 2 6 6 6 6 85 57 6 152 99 6 192 133 9 219 162 10 236 178 12 239 182 13 +-246 186 14 242 186 14 239 182 13 236 178 12 224 166 10 206 145 10 192 133 9 148 132 55 +-94 94 94 62 62 62 42 42 42 22 22 22 14 14 14 6 6 6 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 +-18 18 18 34 34 34 58 58 58 78 78 78 101 98 89 124 112 88 133 118 54 156 107 11 +-163 110 8 167 114 7 171 120 8 180 123 7 184 138 11 197 138 11 210 150 10 219 162 10 +-226 170 11 236 178 12 236 178 12 234 174 13 219 162 10 197 138 11 163 110 8 134 84 6 +-85 57 6 10 10 10 2 2 6 2 2 6 18 18 18 38 38 38 38 38 38 38 38 38 +-38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 26 26 26 2 2 6 +-2 2 6 6 6 6 62 42 6 137 92 6 171 120 8 200 144 11 219 162 10 230 174 11 +-234 174 13 230 174 11 219 162 10 210 150 10 192 133 9 163 110 8 124 112 88 82 82 82 +-50 50 50 30 30 30 14 14 14 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-6 6 6 14 14 14 22 22 22 34 34 34 42 42 42 58 58 58 74 74 74 86 86 86 +-101 98 89 113 101 86 133 118 54 121 92 8 137 92 6 152 99 6 163 110 8 180 123 7 +-184 138 11 197 138 11 206 145 10 200 144 11 180 123 7 156 107 11 134 84 6 104 69 6 +-62 42 6 54 54 54 106 106 106 101 98 89 86 86 86 82 82 82 78 78 78 78 78 78 +-78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 82 82 82 86 86 86 94 94 94 +-106 106 106 101 101 101 90 61 47 120 80 7 156 107 11 180 123 7 192 133 9 200 144 11 +-206 145 10 200 144 11 192 133 9 171 120 8 139 102 15 113 101 86 70 70 70 42 42 42 +-22 22 22 10 10 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 6 6 6 10 10 10 14 14 14 22 22 22 30 30 30 38 38 38 +-50 50 50 62 62 62 74 74 74 90 90 90 101 98 89 113 101 86 121 92 8 120 80 7 +-137 92 6 152 99 6 152 99 6 152 99 6 134 84 6 120 80 7 98 70 6 88 55 22 +-101 98 89 82 82 82 58 58 58 46 46 46 38 38 38 34 34 34 34 34 34 34 34 34 +-34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 38 38 38 42 42 42 +-54 54 54 82 82 82 94 86 71 85 57 6 134 84 6 156 107 11 167 114 7 171 120 8 +-171 120 8 167 114 7 152 99 6 121 92 8 101 98 89 62 62 62 34 34 34 18 18 18 +-6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 6 6 6 10 10 10 +-18 18 18 22 22 22 30 30 30 42 42 42 50 50 50 66 66 66 86 86 86 101 98 89 +-94 86 71 98 70 6 104 69 6 104 69 6 104 69 6 85 57 6 88 55 22 90 90 90 +-62 62 62 38 38 38 22 22 22 14 14 14 10 10 10 10 10 10 10 10 10 10 10 10 +-10 10 10 10 10 10 6 6 6 10 10 10 10 10 10 10 10 10 10 10 10 14 14 14 +-22 22 22 42 42 42 70 70 70 94 86 71 85 57 6 104 69 6 120 80 7 137 92 6 +-134 84 6 120 80 7 94 86 71 86 86 86 58 58 58 30 30 30 14 14 14 6 6 6 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 6 6 6 10 10 10 14 14 14 18 18 18 26 26 26 38 38 38 54 54 54 +-70 70 70 86 86 86 94 86 71 94 86 71 94 86 71 86 86 86 74 74 74 50 50 50 +-30 30 30 14 14 14 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-6 6 6 18 18 18 34 34 34 58 58 58 82 82 82 94 86 71 94 86 71 94 86 71 +-94 86 71 94 86 71 74 74 74 50 50 50 26 26 26 14 14 14 6 6 6 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 6 6 6 14 14 14 18 18 18 +-30 30 30 38 38 38 46 46 46 54 54 54 50 50 50 42 42 42 30 30 30 18 18 18 +-10 10 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 6 6 6 14 14 14 26 26 26 38 38 38 50 50 50 58 58 58 58 58 58 +-54 54 54 42 42 42 30 30 30 18 18 18 10 10 10 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 +-6 6 6 10 10 10 14 14 14 18 18 18 18 18 18 14 14 14 10 10 10 6 6 6 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 6 6 6 14 14 14 18 18 18 22 22 22 22 22 22 +-18 18 18 14 14 14 10 10 10 6 6 6 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +-0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +- +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 @@ -68813,20 +68574,20 @@ index 3c14e43..7626beb 100644 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 -- -1.8.1.6 +1.8.4 -From 402ef0a356fc771bbb29bcfa785429083df25549 Mon Sep 17 00:00:00 2001 +From 64c1c9e9b7ec62217c51d9e79d80feb1b413269f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 2 Jul 2013 23:42:01 +0100 -Subject: [PATCH 005/113] bcm2708 vchiq driver +Subject: [PATCH 06/98] bcm2708 vchiq driver Signed-off-by: popcornmix --- - drivers/misc/Kconfig | 2 + + drivers/misc/Kconfig | 1 + drivers/misc/Makefile | 1 + - drivers/misc/vc04_services/Kconfig | 10 + - drivers/misc/vc04_services/Makefile | 18 + + drivers/misc/vc04_services/Kconfig | 9 + + drivers/misc/vc04_services/Makefile | 17 + .../interface/vchi/connections/connection.h | 328 ++ .../interface/vchi/message_drivers/message.h | 204 ++ drivers/misc/vc04_services/interface/vchi/vchi.h | 373 ++ @@ -68834,7 +68595,7 @@ Signed-off-by: popcornmix .../interface/vchi/vchi_cfg_internal.h | 71 + .../vc04_services/interface/vchi/vchi_common.h | 163 + .../misc/vc04_services/interface/vchi/vchi_mh.h | 42 + - .../misc/vc04_services/interface/vchiq_arm/vchiq.h | 41 + + .../misc/vc04_services/interface/vchiq_arm/vchiq.h | 40 + .../vc04_services/interface/vchiq_arm/vchiq_2835.h | 42 + .../interface/vchiq_arm/vchiq_2835_arm.c | 538 +++ .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 2808 ++++++++++++++ @@ -68842,21 +68603,21 @@ Signed-off-by: popcornmix .../interface/vchiq_arm/vchiq_build_info.h | 37 + .../vc04_services/interface/vchiq_arm/vchiq_cfg.h | 60 + .../interface/vchiq_arm/vchiq_connected.c | 119 + - .../interface/vchiq_arm/vchiq_connected.h | 51 + + .../interface/vchiq_arm/vchiq_connected.h | 50 + .../vc04_services/interface/vchiq_arm/vchiq_core.c | 3818 ++++++++++++++++++++ .../vc04_services/interface/vchiq_arm/vchiq_core.h | 703 ++++ - .../interface/vchiq_arm/vchiq_genversion | 89 + + .../interface/vchiq_arm/vchiq_genversion | 87 + .../vc04_services/interface/vchiq_arm/vchiq_if.h | 188 + .../interface/vchiq_arm/vchiq_ioctl.h | 129 + .../interface/vchiq_arm/vchiq_kern_lib.c | 454 +++ .../interface/vchiq_arm/vchiq_memdrv.h | 71 + .../interface/vchiq_arm/vchiq_pagelist.h | 58 + - .../vc04_services/interface/vchiq_arm/vchiq_proc.c | 254 ++ + .../vc04_services/interface/vchiq_arm/vchiq_proc.c | 253 ++ .../vc04_services/interface/vchiq_arm/vchiq_shim.c | 815 +++++ .../vc04_services/interface/vchiq_arm/vchiq_util.c | 120 + - .../vc04_services/interface/vchiq_arm/vchiq_util.h | 82 + + .../vc04_services/interface/vchiq_arm/vchiq_util.h | 81 + .../interface/vchiq_arm/vchiq_version.c | 59 + - 33 files changed, 12184 insertions(+) + 33 files changed, 12175 insertions(+) create mode 100644 drivers/misc/vc04_services/Kconfig create mode 100644 drivers/misc/vc04_services/Makefile create mode 100644 drivers/misc/vc04_services/interface/vchi/connections/connection.h @@ -68890,16 +68651,15 @@ Signed-off-by: popcornmix create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_version.c diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig -index c002d86..84d3100 100644 +index 8dacd4c..aa7eea4 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig -@@ -536,4 +536,6 @@ source "drivers/misc/carma/Kconfig" +@@ -537,4 +537,5 @@ source "drivers/misc/carma/Kconfig" source "drivers/misc/altera-stapl/Kconfig" source "drivers/misc/mei/Kconfig" source "drivers/misc/vmw_vmci/Kconfig" +source "drivers/misc/vc04_services/Kconfig" endmenu -+ diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index c235d5b..d72aaf2 100644 --- a/drivers/misc/Makefile @@ -68911,10 +68671,10 @@ index c235d5b..d72aaf2 100644 +obj-y += vc04_services/ diff --git a/drivers/misc/vc04_services/Kconfig b/drivers/misc/vc04_services/Kconfig new file mode 100644 -index 0000000..b48a3f3 +index 0000000..2663933 --- /dev/null +++ b/drivers/misc/vc04_services/Kconfig -@@ -0,0 +1,10 @@ +@@ -0,0 +1,9 @@ +config BCM2708_VCHIQ + tristate "Videocore VCHIQ" + depends on MACH_BCM2708 @@ -68924,13 +68684,12 @@ index 0000000..b48a3f3 + BCM2708 family of products. + Defaults to Y when the Broadcom Videocore services + are included in the build, N otherwise. -+ diff --git a/drivers/misc/vc04_services/Makefile b/drivers/misc/vc04_services/Makefile new file mode 100644 -index 0000000..1aeb20a +index 0000000..eed2a9c --- /dev/null +++ b/drivers/misc/vc04_services/Makefile -@@ -0,0 +1,18 @@ +@@ -0,0 +1,17 @@ +ifeq ($(CONFIG_MACH_BCM2708),y) + +obj-$(CONFIG_BCM2708_VCHIQ) += vchiq.o @@ -68948,7 +68707,6 @@ index 0000000..1aeb20a +EXTRA_CFLAGS += -DVCOS_VERIFY_BKPTS=1 -Idrivers/misc/vc04_services -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 + +endif -+ diff --git a/drivers/misc/vc04_services/interface/vchi/connections/connection.h b/drivers/misc/vc04_services/interface/vchi/connections/connection.h new file mode 100644 index 0000000..fef6ac3 @@ -70398,10 +70156,10 @@ index 0000000..198bd07 +#endif diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq.h new file mode 100644 -index 0000000..f87dcbd +index 0000000..ad398ba --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq.h -@@ -0,0 +1,41 @@ +@@ -0,0 +1,40 @@ +/** + * Copyright (c) 2010-2012 Broadcom. All rights reserved. + * @@ -70442,7 +70200,6 @@ index 0000000..f87dcbd +#include "vchiq_util.h" + +#endif -+ diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835.h new file mode 100644 index 0000000..7ea5c64 @@ -74303,10 +74060,10 @@ index 0000000..65f4b52 +EXPORT_SYMBOL(vchiq_add_connected_callback); diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.h new file mode 100644 -index 0000000..e4cfdcc +index 0000000..863b3e3 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.h -@@ -0,0 +1,51 @@ +@@ -0,0 +1,50 @@ +/** + * Copyright (c) 2010-2012 Broadcom. All rights reserved. + * @@ -74357,7 +74114,6 @@ index 0000000..e4cfdcc +void vchiq_call_connected_callbacks(void); + +#endif /* VCHIQ_CONNECTED_H */ -+ diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c new file mode 100644 index 0000000..2efb124 @@ -78893,10 +78649,10 @@ index 0000000..bddfc6a +#endif diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_genversion b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_genversion new file mode 100644 -index 0000000..77dd613 +index 0000000..9f5b634 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_genversion -@@ -0,0 +1,89 @@ +@@ -0,0 +1,87 @@ +#!/usr/bin/perl -w + +use strict; @@ -78940,11 +78696,11 @@ index 0000000..77dd613 + $tainted =~ s/[ \r\n]*$//; # chomp may not be enough (cygwin). + $tainted =~ s/^[ \r\n]*//; # chomp may not be enough (cygwin). + if (length $tainted) { -+ $version = join ' ', $version, "(tainted)"; -+ } -+ else { -+ $version = join ' ', $version, "(clean)"; -+ } ++ $version = join ' ', $version, "(tainted)"; ++ } ++ else { ++ $version = join ' ', $version, "(clean)"; ++ } + } + } +} @@ -78984,8 +78740,6 @@ index 0000000..77dd613 + return vchiq_build_time; +} +EOF -+ -+ diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_if.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_if.h new file mode 100644 index 0000000..50359b0 @@ -79918,10 +79672,10 @@ index 0000000..54a3ece +#endif /* VCHIQ_PAGELIST_H */ diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_proc.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_proc.c new file mode 100644 -index 0000000..dc3bdda +index 0000000..8e59676 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_proc.c -@@ -0,0 +1,254 @@ +@@ -0,0 +1,253 @@ +/** + * Copyright (c) 2010-2012 Broadcom. All rights reserved. + * @@ -80175,7 +79929,6 @@ index 0000000..dc3bdda +} + +#endif -+ diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c new file mode 100644 index 0000000..f752f8d @@ -81125,10 +80878,10 @@ index 0000000..03cece571b +} diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.h new file mode 100644 -index 0000000..7c4bf7c +index 0000000..f4d0b66 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.h -@@ -0,0 +1,82 @@ +@@ -0,0 +1,81 @@ +/** + * Copyright (c) 2010-2012 Broadcom. All rights reserved. + * @@ -81210,7 +80963,6 @@ index 0000000..7c4bf7c +extern VCHIQ_HEADER_T *vchiu_queue_pop(VCHIU_QUEUE_T *queue); + +#endif -+ diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_version.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_version.c new file mode 100644 index 0000000..b6bfa21 @@ -81277,25 +81029,25 @@ index 0000000..b6bfa21 + return vchiq_build_time; +} -- -1.8.1.6 +1.8.4 -From e1c40de1fd73e3cb5da83b1cd1009346d105c92e Mon Sep 17 00:00:00 2001 +From 4e3eba9df31db6cbdf4f1b73522e049f4e49b8dc Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:31:47 +0100 -Subject: [PATCH 006/113] cma: Add vc_cma driver to enable use of CMA +Subject: [PATCH 07/98] cma: Add vc_cma driver to enable use of CMA Signed-off-by: popcornmix --- drivers/char/Kconfig | 2 + - drivers/char/Makefile | 3 + - drivers/char/broadcom/Kconfig | 17 + - drivers/char/broadcom/Makefile | 2 + - drivers/char/broadcom/vc_cma/Makefile | 15 + - drivers/char/broadcom/vc_cma/vc_cma.c | 1145 +++++++++++++++++++++++++++++++++ + drivers/char/Makefile | 2 + + drivers/char/broadcom/Kconfig | 16 + + drivers/char/broadcom/Makefile | 1 + + drivers/char/broadcom/vc_cma/Makefile | 14 + + drivers/char/broadcom/vc_cma/vc_cma.c | 1143 +++++++++++++++++++++++++++++++++ drivers/misc/Makefile | 2 +- - include/linux/broadcom/vc_cma.h | 30 + - 8 files changed, 1215 insertions(+), 1 deletion(-) + include/linux/broadcom/vc_cma.h | 29 + + 8 files changed, 1208 insertions(+), 1 deletion(-) create mode 100644 drivers/char/broadcom/Kconfig create mode 100644 drivers/char/broadcom/Makefile create mode 100644 drivers/char/broadcom/vc_cma/Makefile @@ -81303,10 +81055,10 @@ Signed-off-by: popcornmix create mode 100644 include/linux/broadcom/vc_cma.h diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig -index 3bb6fa3..022b91c 100644 +index 1421997..3aa66f8 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig -@@ -586,6 +586,8 @@ config DEVPORT +@@ -574,6 +574,8 @@ config DEVPORT source "drivers/s390/char/Kconfig" @@ -81316,22 +81068,21 @@ index 3bb6fa3..022b91c 100644 bool "Enable device interface for some SMD packet ports" default n diff --git a/drivers/char/Makefile b/drivers/char/Makefile -index 7ff1d0d..c594502 100644 +index 7ff1d0d..fc85f0c 100644 --- a/drivers/char/Makefile +++ b/drivers/char/Makefile -@@ -62,3 +62,6 @@ obj-$(CONFIG_JS_RTC) += js-rtc.o +@@ -62,3 +62,5 @@ obj-$(CONFIG_JS_RTC) += js-rtc.o js-rtc-y = rtc.o obj-$(CONFIG_TILE_SROM) += tile-srom.o + +obj-$(CONFIG_BRCM_CHAR_DRIVERS) += broadcom/ -+ diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig new file mode 100644 -index 0000000..6ec2528 +index 0000000..ae3e8b2 --- /dev/null +++ b/drivers/char/broadcom/Kconfig -@@ -0,0 +1,17 @@ +@@ -0,0 +1,16 @@ +# +# Broadcom char driver config +# @@ -81348,21 +81099,19 @@ index 0000000..6ec2528 + default n + help + Helper for videocore CMA access. -+ diff --git a/drivers/char/broadcom/Makefile b/drivers/char/broadcom/Makefile new file mode 100644 -index 0000000..c8574c8 +index 0000000..13c5bca --- /dev/null +++ b/drivers/char/broadcom/Makefile -@@ -0,0 +1,2 @@ +@@ -0,0 +1 @@ +obj-$(CONFIG_BCM_VC_CMA) += vc_cma/ -+ diff --git a/drivers/char/broadcom/vc_cma/Makefile b/drivers/char/broadcom/vc_cma/Makefile new file mode 100644 -index 0000000..ae71918 +index 0000000..c6fcc37 --- /dev/null +++ b/drivers/char/broadcom/vc_cma/Makefile -@@ -0,0 +1,15 @@ +@@ -0,0 +1,14 @@ +EXTRA_CFLAGS += -Wall -Wstrict-prototypes -Wno-trigraphs +EXTRA_CFLAGS += -Werror +EXTRA_CFLAGS += -I"include/linux/broadcom" @@ -81377,13 +81126,12 @@ index 0000000..ae71918 +obj-$(CONFIG_BCM_VC_CMA) += vc-cma.o + +vc-cma-objs := vc_cma.o -+ diff --git a/drivers/char/broadcom/vc_cma/vc_cma.c b/drivers/char/broadcom/vc_cma/vc_cma.c new file mode 100644 -index 0000000..6d8b4df +index 0000000..0f12701 --- /dev/null +++ b/drivers/char/broadcom/vc_cma/vc_cma.c -@@ -0,0 +1,1145 @@ +@@ -0,0 +1,1143 @@ +/** + * Copyright (c) 2010-2012 Broadcom. All rights reserved. + * @@ -82471,15 +82219,13 @@ index 0000000..6d8b4df + goto out_class_destroy; + } + -+ vc_cma_proc_entry = create_proc_entry(DRIVER_NAME, 0444, NULL); ++ vc_cma_proc_entry = proc_create(DRIVER_NAME, 0444, NULL, &vc_cma_proc_fops); + if (vc_cma_proc_entry == NULL) { + rc = -EFAULT; -+ LOG_ERR("%s: create_proc_entry failed", __func__); ++ LOG_ERR("%s: proc_create failed", __func__); + goto out_device_destroy; + } + -+ vc_cma_proc_entry->proc_fops = &vc_cma_proc_fops; -+ + vc_cma_inited = 1; + return 0; + @@ -82517,7 +82263,7 @@ index 0000000..6d8b4df + LOG_DBG("%s: called", __func__); + + if (vc_cma_inited) { -+ remove_proc_entry(vc_cma_proc_entry->name, NULL); ++ remove_proc_entry(DRIVER_NAME, NULL); + device_destroy(vc_cma_class, vc_cma_devnum); + class_destroy(vc_cma_class); + cdev_del(&vc_cma_cdev); @@ -82541,10 +82287,10 @@ index d72aaf2..24b40c3 100644 +obj-$(CONFIG_BCM2708_VCHIQ) += vc04_services/ diff --git a/include/linux/broadcom/vc_cma.h b/include/linux/broadcom/vc_cma.h new file mode 100644 -index 0000000..bdc9d79 +index 0000000..5325832 --- /dev/null +++ b/include/linux/broadcom/vc_cma.h -@@ -0,0 +1,30 @@ +@@ -0,0 +1,29 @@ +/***************************************************************************** +* Copyright 2012 Broadcom Corporation. All rights reserved. +* @@ -82574,15 +82320,14 @@ index 0000000..bdc9d79 +#endif + +#endif /* VC_CMA_H */ -+ -- -1.8.1.6 +1.8.4 -From 9b742527ac0ebaa3b643857b47d043ae79dc8475 Mon Sep 17 00:00:00 2001 +From 7e01591dc9904bd0e34e50a4ba6d0dc573029f46 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 26 Mar 2012 22:15:50 +0100 -Subject: [PATCH 007/113] bcm2708: alsa sound driver +Subject: [PATCH 08/98] bcm2708: alsa sound driver Signed-off-by: popcornmix --- @@ -82590,14 +82335,14 @@ Subject: [PATCH 007/113] bcm2708: alsa sound driver arch/arm/configs/bcmrpi_defconfig | 20 + arch/arm/mach-bcm2708/bcm2708.c | 12 + sound/arm/Kconfig | 7 + - sound/arm/Makefile | 6 + + sound/arm/Makefile | 5 + sound/arm/bcm2835-ctl.c | 200 +++++++ sound/arm/bcm2835-pcm.c | 409 +++++++++++++++ sound/arm/bcm2835-vchiq.c | 844 ++++++++++++++++++++++++++++++ sound/arm/bcm2835.c | 413 +++++++++++++++ sound/arm/bcm2835.h | 155 ++++++ sound/arm/vc_vchi_audioserv_defs.h | 116 ++++ - 11 files changed, 2202 insertions(+) + 11 files changed, 2201 insertions(+) create mode 100755 sound/arm/bcm2835-ctl.c create mode 100755 sound/arm/bcm2835-pcm.c create mode 100755 sound/arm/bcm2835-vchiq.c @@ -82668,10 +82413,10 @@ index 339aabf..df947e5 100644 CONFIG_USB_HIDDEV=y CONFIG_HID_A4TECH=m diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c -index 544ed1e..18f6558 100644 +index e6459b3..a724746 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -422,6 +422,16 @@ struct platform_device bcm2708_powerman_device = { +@@ -423,6 +423,16 @@ struct platform_device bcm2708_powerman_device = { .coherent_dma_mask = 0xffffffffUL}, }; @@ -82688,15 +82433,15 @@ index 544ed1e..18f6558 100644 int __init bcm_register_device(struct platform_device *pdev) { int ret; -@@ -469,6 +479,8 @@ void __init bcm2708_init(void) +@@ -474,6 +484,8 @@ void __init bcm2708_init(void) bcm_register_device(&bcm2708_emmc_device); #endif bcm2708_init_led(); + for (i = 0; i < ARRAY_SIZE(bcm2708_alsa_devices); i++) + bcm_register_device(&bcm2708_alsa_devices[i]); - #ifdef CONFIG_BCM2708_VCMEM - { + for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { + struct amba_device *d = amba_devs[i]; diff --git a/sound/arm/Kconfig b/sound/arm/Kconfig index 885683a..f7ceafd 100644 --- a/sound/arm/Kconfig @@ -82715,10 +82460,10 @@ index 885683a..f7ceafd 100644 endif # SND_ARM diff --git a/sound/arm/Makefile b/sound/arm/Makefile -index 8c0c851..181cb57 100644 +index 8c0c851..1f5ce26 100644 --- a/sound/arm/Makefile +++ b/sound/arm/Makefile -@@ -14,3 +14,9 @@ snd-pxa2xx-lib-$(CONFIG_SND_PXA2XX_LIB_AC97) += pxa2xx-ac97-lib.o +@@ -14,3 +14,8 @@ snd-pxa2xx-lib-$(CONFIG_SND_PXA2XX_LIB_AC97) += pxa2xx-ac97-lib.o obj-$(CONFIG_SND_PXA2XX_AC97) += snd-pxa2xx-ac97.o snd-pxa2xx-ac97-objs := pxa2xx-ac97.o @@ -82727,10 +82472,9 @@ index 8c0c851..181cb57 100644 +snd-bcm2835-objs := bcm2835.o bcm2835-ctl.o bcm2835-pcm.o bcm2835-vchiq.o + +EXTRA_CFLAGS += -Idrivers/misc/vc04_services -Idrivers/misc/vc04_services/interface/vcos/linuxkernel -D__VCCOREVER__=0x04000000 -+ diff --git a/sound/arm/bcm2835-ctl.c b/sound/arm/bcm2835-ctl.c new file mode 100755 -index 0000000..c3e0f7a +index 0000000..8c5334a --- /dev/null +++ b/sound/arm/bcm2835-ctl.c @@ -0,0 +1,200 @@ @@ -82741,7 +82485,7 @@ index 0000000..c3e0f7a +* agreement governing use of this software, this software is licensed to you +* under the terms of the GNU General Public License version 2, available at +* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). -+* ++* +* Notwithstanding the above, under no circumstances may you combine this +* software in any way with any other Broadcom software provided under a +* license other than the GPL, without Broadcom's express prior written @@ -82936,7 +82680,7 @@ index 0000000..c3e0f7a +} diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c new file mode 100755 -index 0000000..4206b7e +index 0000000..ef775a4 --- /dev/null +++ b/sound/arm/bcm2835-pcm.c @@ -0,0 +1,409 @@ @@ -82947,7 +82691,7 @@ index 0000000..4206b7e +* agreement governing use of this software, this software is licensed to you +* under the terms of the GNU General Public License version 2, available at +* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). -+* ++* +* Notwithstanding the above, under no circumstances may you combine this +* software in any way with any other Broadcom software provided under a +* license other than the GPL, without Broadcom's express prior written @@ -83351,7 +83095,7 @@ index 0000000..4206b7e +} diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c new file mode 100755 -index 0000000..9ecb2d6 +index 0000000..9801410 --- /dev/null +++ b/sound/arm/bcm2835-vchiq.c @@ -0,0 +1,844 @@ @@ -83362,7 +83106,7 @@ index 0000000..9ecb2d6 +* agreement governing use of this software, this software is licensed to you +* under the terms of the GNU General Public License version 2, available at +* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). -+* ++* +* Notwithstanding the above, under no circumstances may you combine this +* software in any way with any other Broadcom software provided under a +* license other than the GPL, without Broadcom's express prior written @@ -84181,7 +83925,7 @@ index 0000000..9ecb2d6 +} + +/** -+ * Forces VC to flush(drop) its filled playback buffers and ++ * Forces VC to flush(drop) its filled playback buffers and + * return them the us. (VC->ARM) + */ +void bcm2835_audio_flush_playback_buffers(bcm2835_alsa_stream_t * alsa_stream) @@ -84201,7 +83945,7 @@ index 0000000..9ecb2d6 +MODULE_PARM_DESC(force_bulk, "Force use of vchiq bulk for audio"); diff --git a/sound/arm/bcm2835.c b/sound/arm/bcm2835.c new file mode 100755 -index 0000000..e5ac894 +index 0000000..317e7d9 --- /dev/null +++ b/sound/arm/bcm2835.c @@ -0,0 +1,413 @@ @@ -84212,7 +83956,7 @@ index 0000000..e5ac894 +* agreement governing use of this software, this software is licensed to you +* under the terms of the GNU General Public License version 2, available at +* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). -+* ++* +* Notwithstanding the above, under no circumstances may you combine this +* software in any way with any other Broadcom software provided under a +* license other than the GPL, without Broadcom's express prior written @@ -84620,7 +84364,7 @@ index 0000000..e5ac894 +MODULE_ALIAS("platform:bcm2835_alsa"); diff --git a/sound/arm/bcm2835.h b/sound/arm/bcm2835.h new file mode 100755 -index 0000000..b966e28 +index 0000000..080bd5c --- /dev/null +++ b/sound/arm/bcm2835.h @@ -0,0 +1,155 @@ @@ -84631,7 +84375,7 @@ index 0000000..b966e28 +* agreement governing use of this software, this software is licensed to you +* under the terms of the GNU General Public License version 2, available at +* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). -+* ++* +* Notwithstanding the above, under no circumstances may you combine this +* software in any way with any other Broadcom software provided under a +* license other than the GPL, without Broadcom's express prior written @@ -84902,13 +84646,13 @@ index 0000000..af3e6eb + +#endif // _VC_AUDIO_DEFS_H_ -- -1.8.1.6 +1.8.4 -From 4b2f619cd70236bf8ce6f5018e6e1cea509f0a19 Mon Sep 17 00:00:00 2001 +From 204ed24fe32df5f09c9e167a7505d36ad2d1f5b5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 008/113] Allow mac address to be set in smsc95xx +Subject: [PATCH 09/98] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- @@ -84999,20 +84743,20 @@ index 3f38ba8..60076fe 100644 if (smsc95xx_read_eeprom(dev, EEPROM_MAC_OFFSET, ETH_ALEN, dev->net->dev_addr) == 0) { -- -1.8.1.6 +1.8.4 -From a39e53dad7af023d5be0b7ecfa3fcef09e8245bc Mon Sep 17 00:00:00 2001 +From 66f3f3a3efb6eaf5163d0eebacc64ee9455b9957 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 8 May 2012 23:12:13 +0100 -Subject: [PATCH 009/113] possible fix for sdcard missing status. Thank naren +Subject: [PATCH 10/98] possible fix for sdcard missing status. Thank naren --- drivers/mmc/host/sdhci-bcm2708.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index e79723d..a405114 100644 +index d8ef77c..0514bc1 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -1173,6 +1173,14 @@ static unsigned int sdhci_bcm2708_uhs_broken(struct sdhci_host *host) @@ -85039,20 +84783,20 @@ index e79723d..a405114 100644 /*****************************************************************************\ -- -1.8.1.6 +1.8.4 -From 41e5012bbd0ff332c303adffb25fe0aaa61b821e Mon Sep 17 00:00:00 2001 +From 11eb3c7d0ba87243d8ca88091b31826f0f56cf0c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 17 May 2012 14:44:19 +0100 -Subject: [PATCH 010/113] sdcard patch improvements from naren +Subject: [PATCH 11/98] sdcard patch improvements from naren --- drivers/mmc/host/sdhci-bcm2708.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index a405114..ae8edf7 100644 +index 0514bc1..7ba715b 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -886,8 +886,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, @@ -85072,7 +84816,7 @@ index a405114..ae8edf7 100644 - while (0 != (sdhci_bcm2708_raw_readl(host, - SDHCI_PRESENT_STATE) & - state_mask) && --timeout > 0) -+ while (0 != (sdhci_bcm2708_raw_readl(host, SDHCI_PRESENT_STATE) ++ while (0 != (sdhci_bcm2708_raw_readl(host, SDHCI_PRESENT_STATE) + & state_mask) && --timeout > 0) + { + udelay(100); @@ -85101,13 +84845,13 @@ index a405114..ae8edf7 100644 /***************************************************************************** \ -- -1.8.1.6 +1.8.4 -From 0a471a2ef5220d0d59aae591ca9b4c4672caa87d Mon Sep 17 00:00:00 2001 +From 6052e4aaa113d5d1286fe38a4db003ea5aea8c25 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Mon, 4 Jun 2012 04:27:48 +0200 -Subject: [PATCH 011/113] sdhci-bcm2708: speed up DMA sync +Subject: [PATCH 12/98] sdhci-bcm2708: speed up DMA sync Experiments show that it doesn't really take that long to sync, so we can reduce the poll interval slightly. Might improve performance a bit. @@ -85116,11 +84860,11 @@ can reduce the poll interval slightly. Might improve performance a bit. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index ae8edf7..a6bdc25 100644 +index 7ba715b..fe656c0 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -897,7 +897,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, - while (0 != (sdhci_bcm2708_raw_readl(host, SDHCI_PRESENT_STATE) + while (0 != (sdhci_bcm2708_raw_readl(host, SDHCI_PRESENT_STATE) & state_mask) && --timeout > 0) { - udelay(100); @@ -85129,13 +84873,13 @@ index ae8edf7..a6bdc25 100644 } if (timeout <= 0) -- -1.8.1.6 +1.8.4 -From 90d3261b231978a660446ea386f0d93a1cdf9997 Mon Sep 17 00:00:00 2001 +From 0581204b7cf5a2a75903b8fd31236ebb0ac88e1f Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Mon, 11 Jun 2012 18:52:04 +0200 -Subject: [PATCH 012/113] sdhci-bcm2708: remove custom clock handling +Subject: [PATCH 13/98] sdhci-bcm2708: remove custom clock handling The custom clock handling code is redundant and buggy. The MMC/SDHCI subsystem does a better job than it, so remove it for good. @@ -85144,7 +84888,7 @@ subsystem does a better job than it, so remove it for good. 1 file changed, 1 insertion(+), 64 deletions(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index a6bdc25..0ed4d85 100644 +index fe656c0..18be90c 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -353,68 +353,9 @@ void sdhci_bcm2708_writeb(struct sdhci_host *host, u8 val, int reg) @@ -85230,13 +84974,13 @@ index a6bdc25..0ed4d85 100644 #ifdef CONFIG_MMC_SDHCI_BCM2708_DMA // Platform DMA operations -- -1.8.1.6 +1.8.4 -From 0ec9efa9013b6dcaae65e51bb09820ecba1eda0a Mon Sep 17 00:00:00 2001 +From e81244421acc9539f75e57fa6e62fe63453f6412 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Mon, 11 Jun 2012 18:53:59 +0200 -Subject: [PATCH 013/113] sdhci-bcm2708: add additional quirks +Subject: [PATCH 14/98] sdhci-bcm2708: add additional quirks Some additional quirks are needed for correct operation. There's no SDHCI capabilities register documented, and it always reads @@ -85248,7 +84992,7 @@ high-speed mode, so add it as well. 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 0ed4d85..3001836 100644 +index 18be90c..1be1785 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -1189,7 +1189,9 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev) @@ -85263,13 +85007,13 @@ index 0ed4d85..3001836 100644 host->flags = SDHCI_USE_PLATDMA; #endif -- -1.8.1.6 +1.8.4 -From cbcc5023b35ee7c09a2489900b8adc8ebcc1eee3 Mon Sep 17 00:00:00 2001 +From 08764b41dfc0c1262d1e05fd74ad98c88c3eccce Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Mon, 11 Jun 2012 18:57:13 +0200 -Subject: [PATCH 014/113] sdhci-bcm2708: add allow_highspeed parameter +Subject: [PATCH 15/98] sdhci-bcm2708: add allow_highspeed parameter Add a parameter to disable high-speed mode for the few cards that still might have problems. High-speed mode is enabled by default. @@ -85278,7 +85022,7 @@ still might have problems. High-speed mode is enabled by default. 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 3001836..c64de21 100644 +index 1be1785..9a6d195 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -129,6 +129,8 @@ static inline unsigned long int since_ns(hptime_t t) @@ -85300,7 +85044,7 @@ index 3001836..c64de21 100644 #endif ret = sdhci_add_host(host); -@@ -1357,8 +1360,12 @@ static void __exit sdhci_drv_exit(void) +@@ -1357,7 +1360,11 @@ static void __exit sdhci_drv_exit(void) module_init(sdhci_drv_init); module_exit(sdhci_drv_exit); @@ -85310,17 +85054,16 @@ index 3001836..c64de21 100644 MODULE_AUTHOR("Broadcom "); MODULE_LICENSE("GPL v2"); MODULE_ALIAS("platform:"DRIVER_NAME); - -+MODULE_PARM_DESC(allow_highspeed, "Allow high speed transfers modes"); + ++MODULE_PARM_DESC(allow_highspeed, "Allow high speed transfers modes"); -- -1.8.1.6 +1.8.4 -From eecd610cbe2b2890024251a69b107485f730eb54 Mon Sep 17 00:00:00 2001 +From be20d05fa501b6032876d642a4706c7226770274 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Mon, 11 Jun 2012 18:58:40 +0200 -Subject: [PATCH 015/113] sdhci-bcm2708: assume 50 MHz eMMC clock +Subject: [PATCH 16/98] sdhci-bcm2708: assume 50 MHz eMMC clock 80 MHz clock isnt't suited well to be dividable to get SD clocks of 25 MHz (default mode) or 50 MHz (high speed mode). 50 MHz are perfect to @@ -85330,7 +85073,7 @@ drive the SD interface at ideal frequencies. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index c64de21..d174938 100644 +index 9a6d195..8747f5f 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -73,7 +73,7 @@ @@ -85343,13 +85086,13 @@ index c64de21..d174938 100644 /*****************************************************************************\ * * -- -1.8.1.6 +1.8.4 -From 9608f28466b8ba9128ee024e3588834b166372cb Mon Sep 17 00:00:00 2001 +From 60b82402606de8c2aac9ae2ed5bdc12285f9bb88 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 16 Jun 2012 22:31:55 +0100 -Subject: [PATCH 016/113] Allow emmc clock to be specified as command line +Subject: [PATCH 17/98] Allow emmc clock to be specified as command line parameter --- @@ -85357,7 +85100,7 @@ Subject: [PATCH 016/113] Allow emmc clock to be specified as command line 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index d174938..0ee983c 100644 +index 8747f5f..fe889d3 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -130,6 +130,7 @@ static inline unsigned long int since_ns(hptime_t t) @@ -85385,21 +85128,20 @@ index d174938..0ee983c 100644 MODULE_DESCRIPTION("Secure Digital Host Controller Interface platform driver"); MODULE_AUTHOR("Broadcom "); -@@ -1368,4 +1370,6 @@ static void __exit sdhci_drv_exit(void) +@@ -1368,3 +1370,5 @@ static void __exit sdhci_drv_exit(void) MODULE_ALIAS("platform:"DRIVER_NAME); MODULE_PARM_DESC(allow_highspeed, "Allow high speed transfers modes"); +MODULE_PARM_DESC(emmc_clock_freq, "Specify the speed of emmc clock"); + - -- -1.8.1.6 +1.8.4 -From f574ed854666c747e1ae126caf1f13825b18a1cb Mon Sep 17 00:00:00 2001 +From 3c063db0757e7355e4da3b7ba8202d74b28a6fef Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 16 Jun 2012 22:35:38 +0100 -Subject: [PATCH 017/113] sdhci-bcm2708: raise DMA sync timeout +Subject: [PATCH 18/98] sdhci-bcm2708: raise DMA sync timeout Commit d64b84c by accident reduced the maximum overall DMA sync timeout. The maximum overall timeout was reduced from 100ms to 30ms, @@ -85413,7 +85155,7 @@ enough for most cards. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 0ee983c..b0cdd7d 100644 +index fe889d3..16c8df1 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -830,7 +830,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, @@ -85426,20 +85168,20 @@ index 0ee983c..b0cdd7d 100644 DBG("PDMA over - sync card\n"); if (data->flags & MMC_DATA_READ) -- -1.8.1.6 +1.8.4 -From a2349148e2f010d576248817eb5c94597c9494ae Mon Sep 17 00:00:00 2001 +From dbd0fbe268d2fc99bcabbe98056c34eecae3383a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 22 Jun 2012 12:57:42 +0100 -Subject: [PATCH 018/113] Use ndelay rather than udelay. Thanks lb +Subject: [PATCH 19/98] Use ndelay rather than udelay. Thanks lb --- drivers/mmc/host/sdhci-bcm2708.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index b0cdd7d..7bba950 100644 +index 16c8df1..0eb48c9 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -249,14 +249,14 @@ static void sdhci_bcm2708_raw_writel(struct sdhci_host *host, u32 val, int reg) @@ -85476,16 +85218,16 @@ index b0cdd7d..7bba950 100644 #endif writel(val, host->ioaddr + reg); -- -1.8.1.6 +1.8.4 -From 6413462d71e8ad0cad8d3938dcfd3c7e9f8fa3b4 Mon Sep 17 00:00:00 2001 +From 528074d07c49c257952d736c2d40c64466ad8fe1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:41:10 +0100 -Subject: [PATCH 019/113] Backport of Chris Boot's i2c and spi drivers. +Subject: [PATCH 20/98] Backport of Chris Boot's i2c and spi drivers. --- - arch/arm/configs/bcmrpi_cutdown_defconfig | 10 + + arch/arm/configs/bcmrpi_cutdown_defconfig | 9 + arch/arm/configs/bcmrpi_defconfig | 5 + arch/arm/mach-bcm2708/bcm2708.c | 100 ++++- arch/arm/mach-bcm2708/include/mach/platform.h | 3 + @@ -85495,15 +85237,15 @@ Subject: [PATCH 019/113] Backport of Chris Boot's i2c and spi drivers. drivers/spi/Kconfig | 8 + drivers/spi/Makefile | 1 + drivers/spi/spi-bcm2708.c | 594 ++++++++++++++++++++++++++ - 10 files changed, 1124 insertions(+), 2 deletions(-) + 10 files changed, 1123 insertions(+), 2 deletions(-) create mode 100644 drivers/i2c/busses/i2c-bcm2708.c create mode 100644 drivers/spi/spi-bcm2708.c diff --git a/arch/arm/configs/bcmrpi_cutdown_defconfig b/arch/arm/configs/bcmrpi_cutdown_defconfig -index e519412..a61a915 100644 +index e519412..2c2e29e 100644 --- a/arch/arm/configs/bcmrpi_cutdown_defconfig +++ b/arch/arm/configs/bcmrpi_cutdown_defconfig -@@ -492,3 +492,13 @@ CONFIG_CRYPTO_DEFLATE=m +@@ -492,3 +492,12 @@ CONFIG_CRYPTO_DEFLATE=m # CONFIG_CRYPTO_HW is not set CONFIG_CRC_ITU_T=y CONFIG_LIBCRC32C=y @@ -85516,7 +85258,6 @@ index e519412..a61a915 100644 +CONFIG_SPI=y +CONFIG_SPI_MASTER=y +CONFIG_SPI_BCM2708=m -+ diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig index df947e5..6219df3 100644 --- a/arch/arm/configs/bcmrpi_defconfig @@ -85534,7 +85275,7 @@ index df947e5..6219df3 100644 # CONFIG_HWMON is not set CONFIG_WATCHDOG=y diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c -index 18f6558..510be0b 100644 +index a724746..141ed61 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c @@ -31,6 +31,7 @@ @@ -85545,7 +85286,7 @@ index 18f6558..510be0b 100644 #include #include -@@ -196,7 +197,6 @@ static void __init bcm2708_clocksource_init(void) +@@ -197,7 +198,6 @@ static void __init bcm2708_clocksource_init(void) /* warning - the USB needs a clock > 34MHz */ @@ -85553,7 +85294,7 @@ index 18f6558..510be0b 100644 static struct clk sdhost_clk = { #ifdef CONFIG_ARCH_BCM2708_CHIPIT .rate = 4000000, /* 4MHz */ -@@ -204,7 +204,6 @@ static void __init bcm2708_clocksource_init(void) +@@ -205,7 +205,6 @@ static void __init bcm2708_clocksource_init(void) .rate = 250000000, /* 250MHz */ #endif }; @@ -85561,7 +85302,7 @@ index 18f6558..510be0b 100644 static struct clk_lookup lookups[] = { { /* UART0 */ -@@ -214,6 +213,15 @@ static void __init bcm2708_clocksource_init(void) +@@ -215,6 +214,15 @@ static void __init bcm2708_clocksource_init(void) { /* USB */ .dev_id = "bcm2708_usb", .clk = &osc_clk, @@ -85577,7 +85318,7 @@ index 18f6558..510be0b 100644 } }; -@@ -432,6 +440,85 @@ struct platform_device bcm2708_powerman_device = { +@@ -433,6 +441,85 @@ struct platform_device bcm2708_powerman_device = { }, }; @@ -85663,7 +85404,7 @@ index 18f6558..510be0b 100644 int __init bcm_register_device(struct platform_device *pdev) { int ret; -@@ -482,6 +569,10 @@ void __init bcm2708_init(void) +@@ -487,12 +574,21 @@ void __init bcm2708_init(void) for (i = 0; i < ARRAY_SIZE(bcm2708_alsa_devices); i++) bcm_register_device(&bcm2708_alsa_devices[i]); @@ -85671,10 +85412,9 @@ index 18f6558..510be0b 100644 + bcm_register_device(&bcm2708_bsc0_device); + bcm_register_device(&bcm2708_bsc1_device); + - #ifdef CONFIG_BCM2708_VCMEM - { - extern void vc_mem_connected_init(void); -@@ -494,6 +585,11 @@ void __init bcm2708_init(void) + for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { + struct amba_device *d = amba_devs[i]; + amba_device_register(d, &iomem_resource); } system_rev = boardrev; system_serial_low = serial; @@ -85704,10 +85444,10 @@ index 110ce07..4d3c15d 100644 #define MCORE_BASE (BCM2708_PERI_BASE + 0x0000) /* Fake frame buffer device (actually the multicore sync block*/ diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig -index 4faf02b..cc9d212 100644 +index dc6dea6..74b03eb 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig -@@ -344,6 +344,14 @@ config I2C_BCM2835 +@@ -345,6 +345,14 @@ config I2C_BCM2835 This support is also available as a module. If so, the module will be called i2c-bcm2835. @@ -85723,7 +85463,7 @@ index 4faf02b..cc9d212 100644 tristate "Blackfin TWI I2C support" depends on BLACKFIN diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile -index 8f4fc23..ef26c38 100644 +index d00997f..15622cd 100644 --- a/drivers/i2c/busses/Makefile +++ b/drivers/i2c/busses/Makefile @@ -32,6 +32,7 @@ obj-$(CONFIG_I2C_POWERMAC) += i2c-powermac.o @@ -85736,7 +85476,7 @@ index 8f4fc23..ef26c38 100644 obj-$(CONFIG_I2C_CPM) += i2c-cpm.o diff --git a/drivers/i2c/busses/i2c-bcm2708.c b/drivers/i2c/busses/i2c-bcm2708.c new file mode 100644 -index 0000000..7cae615 +index 0000000..4d451a4 --- /dev/null +++ b/drivers/i2c/busses/i2c-bcm2708.c @@ -0,0 +1,396 @@ @@ -85868,7 +85608,7 @@ index 0000000..7cae615 +static inline void bcm2708_bsc_reset(struct bcm2708_i2c *bi) +{ + bcm2708_wr(bi, BSC_C, 0); -+ bcm2708_wr(bi, BSC_S, BSC_S_CLKT | BSC_S_ERR | BSC_S_DONE); ++ bcm2708_wr(bi, BSC_S, BSC_S_CLKT | BSC_S_ERR | BSC_S_DONE); +} + +static inline void bcm2708_bsc_fifo_drain(struct bcm2708_i2c *bi) @@ -86137,7 +85877,7 @@ index 0000000..7cae615 +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig -index 92a9345..f0a2a9f 100644 +index 89cbbab..193df09 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -86,6 +86,14 @@ config SPI_BCM2835 @@ -86768,13 +86508,13 @@ index 0000000..9f1580e +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); -- -1.8.1.6 +1.8.4 -From 201b733f848e43718c63a2fb19d2f1759edb4bf9 Mon Sep 17 00:00:00 2001 +From b2c6380fa9041f817b8dd797c7c0ff330d6616ed Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 19 Jul 2012 16:00:28 +0100 -Subject: [PATCH 020/113] Add SPI_SPI_DEV module +Subject: [PATCH 21/98] Add SPI_SPI_DEV module --- arch/arm/configs/bcmrpi_defconfig | 1 + @@ -86793,58 +86533,20 @@ index 6219df3..31f5afaa 100644 # CONFIG_HWMON is not set CONFIG_WATCHDOG=y -- -1.8.1.6 +1.8.4 -From 569030543f5165fba8ef04ca35a2aa8909a762e2 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Fri, 13 Jul 2012 18:34:18 +0100 -Subject: [PATCH 021/113] Fix for quitting X hang. Interrupted mailbox reads - are not something we can reliably recover from, so down_interruptable is not - a safe call. - ---- - arch/arm/mach-bcm2708/vcio.c | 12 ++++-------- - 1 file changed, 4 insertions(+), 8 deletions(-) - -diff --git a/arch/arm/mach-bcm2708/vcio.c b/arch/arm/mach-bcm2708/vcio.c -index 799a0ac..3874051 100644 ---- a/arch/arm/mach-bcm2708/vcio.c -+++ b/arch/arm/mach-bcm2708/vcio.c -@@ -119,14 +119,10 @@ static int mbox_read(struct vc_mailbox *mbox, unsigned chan, uint32_t *data28) - if (mbox->magic != MBOX_MAGIC) - rc = -EINVAL; - else { -- if (down_interruptible(&mbox->sema[chan]) == 0) { -- *data28 = MBOX_DATA28(mbox->msg[chan]); -- mbox->msg[chan] = 0; -- rc = 0; -- } else { -- /* The wait was interrupted */ -- rc = -EINTR; -- } -+ down(&mbox->sema[chan]); -+ *data28 = MBOX_DATA28(mbox->msg[chan]); -+ mbox->msg[chan] = 0; -+ rc = 0; - } - return rc; - } --- -1.8.1.6 - - -From 294ada2e4a6c36aa47273848ec78f9fced4a5aa5 Mon Sep 17 00:00:00 2001 +From 67252012c6724325feab17f97de836d47260d9a7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 17 Jul 2012 00:48:27 +0100 -Subject: [PATCH 022/113] Add sync_after_dma module parameter +Subject: [PATCH 22/98] Add sync_after_dma module parameter --- - drivers/mmc/host/sdhci-bcm2708.c | 60 +++++++++++++++++++++------------------- - 1 file changed, 32 insertions(+), 28 deletions(-) + drivers/mmc/host/sdhci-bcm2708.c | 61 ++++++++++++++++++++++------------------ + 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 7bba950..3792b9f 100644 +index 0eb48c9..984f2cf 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -51,7 +51,6 @@ @@ -86898,12 +86600,12 @@ index 7bba950..3792b9f 100644 + else + state_mask = SDHCI_DOING_WRITE; -- while (0 != (sdhci_bcm2708_raw_readl(host, SDHCI_PRESENT_STATE) +- while (0 != (sdhci_bcm2708_raw_readl(host, SDHCI_PRESENT_STATE) - & state_mask) && --timeout > 0) - { - udelay(30); - continue; -+ while (0 != (sdhci_bcm2708_raw_readl(host, SDHCI_PRESENT_STATE) ++ while (0 != (sdhci_bcm2708_raw_readl(host, SDHCI_PRESENT_STATE) + & state_mask) && --timeout > 0) + { + udelay(1); @@ -86943,21 +86645,21 @@ index 7bba950..3792b9f 100644 MODULE_DESCRIPTION("Secure Digital Host Controller Interface platform driver"); MODULE_AUTHOR("Broadcom "); -@@ -1371,5 +1374,6 @@ static void __exit sdhci_drv_exit(void) +@@ -1371,4 +1374,6 @@ static void __exit sdhci_drv_exit(void) MODULE_PARM_DESC(allow_highspeed, "Allow high speed transfers modes"); MODULE_PARM_DESC(emmc_clock_freq, "Specify the speed of emmc clock"); +MODULE_PARM_DESC(sync_after_dma, "Block in driver until dma complete"); - ++ -- -1.8.1.6 +1.8.4 -From b3c7a66df274aa410ac682d1016a7ac31112f113 Mon Sep 17 00:00:00 2001 +From 6ad5654dd590e8525952a7a12cb8a0aa9430ee0e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:25:52 +0100 -Subject: [PATCH 023/113] sdhci-bcm2708: use extension FIFO to buffer DMA +Subject: [PATCH 23/98] sdhci-bcm2708: use extension FIFO to buffer DMA transfers The additional FIFO might speed up transfers in some cases. @@ -86966,7 +86668,7 @@ The additional FIFO might speed up transfers in some cases. 1 file changed, 11 insertions(+) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 3792b9f..326b962 100644 +index 984f2cf..9c3f304 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -74,6 +74,9 @@ @@ -87006,14 +86708,14 @@ index 3792b9f..326b962 100644 mmc_hostname(host->mmc), (unsigned long long)iomem->start, host_priv->dma_chan, host_priv->dma_irq); -- -1.8.1.6 +1.8.4 -From e2b73225a65b99319f65336b7fb86888e11008f7 Mon Sep 17 00:00:00 2001 +From 3cc0111ad1079692aedc8422c1f19d4109ea3b49 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:42:49 +0100 -Subject: [PATCH 024/113] sdhci-bcm2708: use multiblock-type transfers for - single blocks +Subject: [PATCH 24/98] sdhci-bcm2708: use multiblock-type transfers for single + blocks There are issues with both single block reads (missed completion) and writes (data loss in some cases!). Just don't do single block @@ -87026,10 +86728,10 @@ adds a quirk for this and uses it. 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c -index dd27b07..90596c5 100644 +index cd0b7f4..ed79223 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c -@@ -1294,7 +1294,7 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq, +@@ -1322,7 +1322,7 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq, brq->data.blocks = 1; } @@ -87039,7 +86741,7 @@ index dd27b07..90596c5 100644 * token, not a STOP_TRANSMISSION request. */ diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 326b962..c6d6bb0 100644 +index 9c3f304..7600c58 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -1266,6 +1266,9 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev) @@ -87053,25 +86755,25 @@ index 326b962..c6d6bb0 100644 ret = sdhci_add_host(host); diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h -index e326ae2..70020e3 100644 +index 3b0c33a..e9ae33c 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -281,6 +281,7 @@ struct mmc_host { - #define MMC_CAP2_PACKED_CMD (MMC_CAP2_PACKED_RD | \ MMC_CAP2_PACKED_WR) #define MMC_CAP2_NO_PRESCAN_POWERUP (1 << 14) /* Don't power up before scan */ + #define MMC_CAP2_SANITIZE (1 << 15) /* Support Sanitize */ +#define MMC_CAP2_FORCE_MULTIBLOCK (1 << 31) /* Always use multiblock transfers */ mmc_pm_flag_t pm_caps; /* supported pm features */ -- -1.8.1.6 +1.8.4 -From b18581317d232b74b1d334bcd632fe2d2d979347 Mon Sep 17 00:00:00 2001 +From d2a1f75842dfaa7ec20a8e5888c16f33fb62f814 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 Aug 2012 19:02:14 +0100 -Subject: [PATCH 025/113] Add module parameter for missing_status quirk. +Subject: [PATCH 25/98] Add module parameter for missing_status quirk. sdhci-bcm2708.missing_status=0 may improve interrupt latency --- @@ -87079,7 +86781,7 @@ Subject: [PATCH 025/113] Add module parameter for missing_status quirk. 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index c6d6bb0..8243593 100644 +index 7600c58..4dfa669 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -134,6 +134,7 @@ static inline unsigned long int since_ns(hptime_t t) @@ -87124,20 +86826,20 @@ index c6d6bb0..8243593 100644 -- -1.8.1.6 +1.8.4 -From 291cf0d67088f942514a25a3b64d1efddfce29ba Mon Sep 17 00:00:00 2001 +From 21c52ee182f4201b219cec12644fdba60e6dc1f1 Mon Sep 17 00:00:00 2001 From: ddv2005 Date: Sun, 5 Aug 2012 10:42:12 -0400 -Subject: [PATCH 026/113] Fix spinlock recursion in sdhci-bcm2708.c +Subject: [PATCH 26/98] Fix spinlock recursion in sdhci-bcm2708.c --- drivers/mmc/host/sdhci-bcm2708.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 8243593..7a703c2 100644 +index 4dfa669..dc94b55 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -643,11 +643,11 @@ static void schci_bcm2708_dma_go(struct sdhci_host *host) @@ -87196,187 +86898,13 @@ index 8243593..7a703c2 100644 static irqreturn_t sdhci_bcm2708_dma_irq(int irq, void *dev_id) -- -1.8.1.6 +1.8.4 -From 8c8505670a0fadd8a8247e4b1da9cfd85416007e Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Tue, 21 Aug 2012 18:49:44 +0100 -Subject: [PATCH 027/113] Read memory size for vc_mem through mailbox property - channel - ---- - arch/arm/mach-bcm2708/include/mach/vcio.h | 3 +- - arch/arm/mach-bcm2708/include/mach/vmalloc.h | 2 +- - arch/arm/mach-bcm2708/vc_mem.c | 82 +++++++++++++++++++++------- - 3 files changed, 66 insertions(+), 21 deletions(-) - -diff --git a/arch/arm/mach-bcm2708/include/mach/vcio.h b/arch/arm/mach-bcm2708/include/mach/vcio.h -index 0d7f9a5..ace4ea4 100644 ---- a/arch/arm/mach-bcm2708/include/mach/vcio.h -+++ b/arch/arm/mach-bcm2708/include/mach/vcio.h -@@ -34,7 +34,8 @@ - #define MBOX_CHAN_LEDS 4 /* for use by the leds interface */ - #define MBOX_CHAN_BUTTONS 5 /* for use by the buttons interface */ - #define MBOX_CHAN_TOUCH 6 /* for use by the touchscreen interface */ --#define MBOX_CHAN_COUNT 7 -+#define MBOX_CHAN_PROPERTY 8 /* for use by the property channel */ -+#define MBOX_CHAN_COUNT 9 - - extern int /*rc*/ bcm_mailbox_read(unsigned chan, uint32_t *data28); - extern int /*rc*/ bcm_mailbox_write(unsigned chan, uint32_t data28); -diff --git a/arch/arm/mach-bcm2708/include/mach/vmalloc.h b/arch/arm/mach-bcm2708/include/mach/vmalloc.h -index 28ecc15..502c617 100644 ---- a/arch/arm/mach-bcm2708/include/mach/vmalloc.h -+++ b/arch/arm/mach-bcm2708/include/mach/vmalloc.h -@@ -17,4 +17,4 @@ - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ --#define VMALLOC_END (0xd8000000) -+#define VMALLOC_END (0xe8000000) -diff --git a/arch/arm/mach-bcm2708/vc_mem.c b/arch/arm/mach-bcm2708/vc_mem.c -index fd9d4be..7a7748e 100644 ---- a/arch/arm/mach-bcm2708/vc_mem.c -+++ b/arch/arm/mach-bcm2708/vc_mem.c -@@ -21,6 +21,7 @@ - #include - #include - #include -+#include - - #ifdef CONFIG_ARCH_KONA - #include -@@ -30,12 +31,12 @@ - #endif - - #include "mach/vc_mem.h" --//#include "interface/vchiq_arm/vchiq_connected.h" -+#include - - #define DRIVER_NAME "vc-mem" - - // Uncomment to enable debug logging --//#define ENABLE_DBG -+#define ENABLE_DBG - - #if defined(ENABLE_DBG) - #define LOG_DBG( fmt, ... ) printk( KERN_INFO fmt "\n", ##__VA_ARGS__ ) -@@ -67,23 +68,8 @@ - * bootloader (and/or kernel). When that happens, the values of these variables - * would be calculated and assigned in the init function. - */ --#ifdef CONFIG_ARCH_KONA -- --#include --unsigned long mm_vc_mem_phys_addr = VC_EMI; -- --#elif CONFIG_ARCH_BCM2708 -- - // in the 2835 VC in mapped above ARM, but ARM has full access to VC space - unsigned long mm_vc_mem_phys_addr = 0x00000000; -- --#else -- --#include --unsigned long mm_vc_mem_phys_addr = MM_ADDR_IO_VC_EMI; -- --#endif -- - unsigned int mm_vc_mem_size = 0; - unsigned int mm_vc_mem_base = 0; - -@@ -125,6 +111,64 @@ - return 0; - } - -+ -+/* tag part of the message */ -+struct vc_msg_tag { -+ uint32_t tag_id; /* the message id */ -+ uint32_t buffer_size; /* size of the buffer (which in this case is always 8 bytes) */ -+ uint32_t data_size; /* amount of data being sent or received */ -+ uint32_t base; /* the address of memory base */ -+ uint32_t size; /* the size of memory in bytes */ -+}; -+ -+struct vc_set_msg { -+ uint32_t msg_size; /* simply, sizeof(struct vc_msg) */ -+ uint32_t request_code; /* holds various information like the success and number of bytes returned (refer to mailboxes wiki) */ -+ struct vc_msg_tag tag[2]; /* the array of tag structures above to make */ -+ uint32_t end_tag; /* an end identifier, should be set to NULL */ -+}; -+ -+#define VCMSG_GET_ARM_MEMORY 0x00010005 -+#define VCMSG_GET_VC_MEMORY 0x00010006 -+ -+static void vc_mem_update(void) -+{ -+ uint32_t success; -+ dma_addr_t vc_mem; /* the memory address accessed from videocore */ -+ struct vc_set_msg *get_mem; /* the memory address accessed from driver */ -+ -+ /* allocate some memory for the messages to use throughout the lifetime of the driver, use the larger of the two message structures */ -+ get_mem = (struct vc_set_msg *)dma_alloc_coherent(NULL, PAGE_ALIGN(sizeof(struct vc_set_msg)), &vc_mem, GFP_ATOMIC); -+ /* clear any garbage */ -+ memset(get_mem, 0, sizeof(struct vc_set_msg)); -+ /* create the message */ -+ get_mem->msg_size = sizeof(struct vc_set_msg); -+ get_mem->tag[0].tag_id = VCMSG_GET_VC_MEMORY; -+ get_mem->tag[0].buffer_size = 8; -+ get_mem->tag[0].data_size = 0; -+ get_mem->tag[1].tag_id = VCMSG_GET_ARM_MEMORY; -+ get_mem->tag[1].buffer_size = 8; -+ get_mem->tag[1].data_size = 0; -+ -+ /* send the message */ -+ wmb(); -+ bcm_mailbox_write(MBOX_CHAN_PROPERTY,(uint32_t)vc_mem); -+ bcm_mailbox_read(MBOX_CHAN_PROPERTY, &success); -+ rmb(); -+ -+ LOG_DBG("%s: resp %x, vcbase=%x vcsize=%x armbase=%x armsize=%x", __func__, get_mem->request_code, -+ get_mem->tag[0].base, get_mem->tag[0].size, get_mem->tag[1].base, get_mem->tag[1].size); -+ -+ /* check we're all good */ -+ if (get_mem->request_code & 0x80000000) { -+ mm_vc_mem_base = get_mem->tag[0].base; -+ mm_vc_mem_size = get_mem->tag[0].size+get_mem->tag[1].size; -+ mm_vc_mem_phys_addr = get_mem->tag[1].base; -+ } -+ dma_free_coherent(NULL, PAGE_ALIGN(sizeof(struct vc_set_msg)), (void *)get_mem, vc_mem); -+} -+ -+ - /**************************************************************************** - * - * vc_mem_get_size -@@ -134,7 +178,7 @@ - static void - vc_mem_get_size(void) - { -- mm_vc_mem_size = 256 * 1024 * 1024; // Static for now -+ vc_mem_update(); - } - - /**************************************************************************** -@@ -146,7 +190,7 @@ - static void - vc_mem_get_base(void) - { -- mm_vc_mem_base = 128 * 1024 * 1024; // Static for now -+ vc_mem_update(); - } - - /**************************************************************************** --- -1.8.1.6 - - -From 9beca9e15a1698575ae20d3992e6a47ba6da79f8 Mon Sep 17 00:00:00 2001 +From 67e5ecd17ad6eb1f57c3bad4ffcbb8ff0895edf2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 -Subject: [PATCH 028/113] enabling the realtime clock 1-wire chip DS1307 and +Subject: [PATCH 27/98] enabling the realtime clock 1-wire chip DS1307 and 1-wire on GPIO4 (as a module) --- @@ -87384,7 +86912,7 @@ Subject: [PATCH 028/113] enabling the realtime clock 1-wire chip DS1307 and 1 file changed, 20 insertions(+) diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c -index 510be0b..d61e747 100644 +index 141ed61..402bfe7 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c @@ -32,6 +32,7 @@ @@ -87404,8 +86932,8 @@ index 510be0b..d61e747 100644 + /* command line parameters */ static unsigned boardrev, serial; - -@@ -249,6 +253,19 @@ static void __init bcm2708_clocksource_init(void) + static unsigned uart_clock; +@@ -250,6 +254,19 @@ static void __init bcm2708_clocksource_init(void) .num_resources = ARRAY_SIZE(bcm2708_dmaman_resources), }; @@ -87425,7 +86953,7 @@ index 510be0b..d61e747 100644 static u64 fb_dmamask = DMA_BIT_MASK(DMA_MASK_BITS_COMMON); static struct platform_device bcm2708_fb_device = { -@@ -556,6 +573,9 @@ void __init bcm2708_init(void) +@@ -561,6 +578,9 @@ void __init bcm2708_init(void) #ifdef CONFIG_BCM2708_GPIO bcm_register_device(&bcm2708_gpio_device); #endif @@ -87436,13 +86964,13 @@ index 510be0b..d61e747 100644 bcm_register_device(&bcm2708_fb_device); bcm_register_device(&bcm2708_usb_device); -- -1.8.1.6 +1.8.4 -From 1a338526b40364fde7b6f2c31e1ee3ae73617763 Mon Sep 17 00:00:00 2001 +From c8cf7e1fb4669532bfad1daa3c25dce85ca7ff12 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:27:48 +0100 -Subject: [PATCH 029/113] Add low-latency mode to sdcard driver. Disable with +Subject: [PATCH 28/98] Add low-latency mode to sdcard driver. Disable with sdhci-bcm2708.enable_llm=0. Thanks ddv2005. --- @@ -87453,7 +86981,7 @@ Subject: [PATCH 029/113] Add low-latency mode to sdcard driver. Disable with 4 files changed, 145 insertions(+), 44 deletions(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 7a703c2..7ce2829 100644 +index dc94b55..6263977 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -135,6 +135,7 @@ static inline unsigned long int since_ns(hptime_t t) @@ -87533,10 +87061,10 @@ index 7a703c2..7ce2829 100644 diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c -index 179e83e..470860b 100644 +index 763dbf9..2c47d16 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c -@@ -124,6 +124,91 @@ static void sdhci_dumpregs(struct sdhci_host *host) +@@ -132,6 +132,91 @@ static void sdhci_dumpregs(struct sdhci_host *host) * Low level functions * * * \*****************************************************************************/ @@ -87628,7 +87156,7 @@ index 179e83e..470860b 100644 static void sdhci_clear_set_irqs(struct sdhci_host *host, u32 clear, u32 set) { -@@ -289,7 +374,7 @@ static void sdhci_led_control(struct led_classdev *led, +@@ -301,7 +386,7 @@ static void sdhci_led_control(struct led_classdev *led, struct sdhci_host *host = container_of(led, struct sdhci_host, led); unsigned long flags; @@ -87637,7 +87165,7 @@ index 179e83e..470860b 100644 if (host->runtime_suspended) goto out; -@@ -299,7 +384,7 @@ static void sdhci_led_control(struct led_classdev *led, +@@ -311,7 +396,7 @@ static void sdhci_led_control(struct led_classdev *led, else sdhci_activate_led(host); out: @@ -87646,7 +87174,7 @@ index 179e83e..470860b 100644 } #endif -@@ -1007,7 +1092,9 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) +@@ -1019,7 +1104,9 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) return; } timeout--; @@ -87656,7 +87184,7 @@ index 179e83e..470860b 100644 } DBG("send cmd %d - wait 0x%X irq 0x%x\n", cmd->opcode, mask, sdhci_readl(host, SDHCI_INT_STATUS)); -@@ -1234,7 +1321,9 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock) +@@ -1246,7 +1333,9 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock) return; } timeout--; @@ -87666,7 +87194,7 @@ index 179e83e..470860b 100644 } clk |= SDHCI_CLOCK_CARD_EN; -@@ -1330,7 +1419,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) +@@ -1347,7 +1436,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) sdhci_runtime_pm_get(host); @@ -87675,7 +87203,7 @@ index 179e83e..470860b 100644 WARN_ON(host->mrq != NULL); -@@ -1388,9 +1477,9 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) +@@ -1405,9 +1494,9 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) mmc->card->type == MMC_TYPE_MMC ? MMC_SEND_TUNING_BLOCK_HS200 : MMC_SEND_TUNING_BLOCK; @@ -87687,7 +87215,7 @@ index 179e83e..470860b 100644 /* Restore original mmc_request structure */ host->mrq = mrq; -@@ -1404,7 +1493,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) +@@ -1421,7 +1510,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) } mmiowb(); @@ -87696,7 +87224,7 @@ index 179e83e..470860b 100644 } static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) -@@ -1413,10 +1502,10 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) +@@ -1430,10 +1519,10 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) int vdd_bit = -1; u8 ctrl; @@ -87709,7 +87237,7 @@ index 179e83e..470860b 100644 if (host->vmmc && ios->power_mode == MMC_POWER_OFF) mmc_regulator_set_ocr(host->mmc, host->vmmc, 0); return; -@@ -1443,9 +1532,9 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) +@@ -1460,9 +1549,9 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) vdd_bit = sdhci_set_power(host, ios->vdd); if (host->vmmc && vdd_bit != -1) { @@ -87721,7 +87249,7 @@ index 179e83e..470860b 100644 } if (host->ops->platform_send_init_74_clocks) -@@ -1583,7 +1672,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) +@@ -1599,7 +1688,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) sdhci_reset(host, SDHCI_RESET_CMD | SDHCI_RESET_DATA); mmiowb(); @@ -87730,7 +87258,7 @@ index 179e83e..470860b 100644 } static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) -@@ -1631,7 +1720,7 @@ static int sdhci_check_ro(struct sdhci_host *host) +@@ -1647,7 +1736,7 @@ static int sdhci_check_ro(struct sdhci_host *host) unsigned long flags; int is_readonly; @@ -87739,7 +87267,7 @@ index 179e83e..470860b 100644 if (host->flags & SDHCI_DEVICE_DEAD) is_readonly = 0; -@@ -1641,7 +1730,7 @@ static int sdhci_check_ro(struct sdhci_host *host) +@@ -1657,7 +1746,7 @@ static int sdhci_check_ro(struct sdhci_host *host) is_readonly = !(sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_WRITE_PROTECT); @@ -87748,7 +87276,7 @@ index 179e83e..470860b 100644 /* This quirk needs to be replaced by a callback-function later */ return host->quirks & SDHCI_QUIRK_INVERTED_WRITE_PROTECT ? -@@ -1714,9 +1803,9 @@ static void sdhci_enable_sdio_irq(struct mmc_host *mmc, int enable) +@@ -1730,9 +1819,9 @@ static void sdhci_enable_sdio_irq(struct mmc_host *mmc, int enable) struct sdhci_host *host = mmc_priv(mmc); unsigned long flags; @@ -87760,16 +87288,16 @@ index 179e83e..470860b 100644 } static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host, -@@ -2060,7 +2149,7 @@ static void sdhci_card_event(struct mmc_host *mmc) - struct sdhci_host *host = mmc_priv(mmc); - unsigned long flags; +@@ -2080,7 +2169,7 @@ static void sdhci_card_event(struct mmc_host *mmc) + if (host->ops->card_event) + host->ops->card_event(host); - spin_lock_irqsave(&host->lock, flags); + sdhci_spin_lock_irqsave(host, &flags); /* Check host->mrq first in case we are runtime suspended */ - if (host->mrq && -@@ -2077,7 +2166,7 @@ static void sdhci_card_event(struct mmc_host *mmc) + if (host->mrq && !sdhci_do_get_cd(host)) { +@@ -2096,7 +2185,7 @@ static void sdhci_card_event(struct mmc_host *mmc) tasklet_schedule(&host->finish_tasklet); } @@ -87778,7 +87306,7 @@ index 179e83e..470860b 100644 } static const struct mmc_host_ops sdhci_ops = { -@@ -2116,14 +2205,14 @@ static void sdhci_tasklet_finish(unsigned long param) +@@ -2135,14 +2224,14 @@ static void sdhci_tasklet_finish(unsigned long param) host = (struct sdhci_host*)param; @@ -87795,7 +87323,7 @@ index 179e83e..470860b 100644 return; } -@@ -2161,7 +2250,7 @@ static void sdhci_tasklet_finish(unsigned long param) +@@ -2180,7 +2269,7 @@ static void sdhci_tasklet_finish(unsigned long param) #endif mmiowb(); @@ -87804,7 +87332,7 @@ index 179e83e..470860b 100644 mmc_request_done(host->mmc, mrq); sdhci_runtime_pm_put(host); -@@ -2174,7 +2263,7 @@ static void sdhci_timeout_timer(unsigned long data) +@@ -2193,7 +2282,7 @@ static void sdhci_timeout_timer(unsigned long data) host = (struct sdhci_host*)data; @@ -87813,7 +87341,7 @@ index 179e83e..470860b 100644 if (host->mrq) { pr_err("%s: Timeout waiting for hardware " -@@ -2195,7 +2284,7 @@ static void sdhci_timeout_timer(unsigned long data) +@@ -2214,7 +2303,7 @@ static void sdhci_timeout_timer(unsigned long data) } mmiowb(); @@ -87822,7 +87350,7 @@ index 179e83e..470860b 100644 } static void sdhci_tuning_timer(unsigned long data) -@@ -2205,11 +2294,11 @@ static void sdhci_tuning_timer(unsigned long data) +@@ -2224,11 +2313,11 @@ static void sdhci_tuning_timer(unsigned long data) host = (struct sdhci_host *)data; @@ -87836,7 +87364,7 @@ index 179e83e..470860b 100644 } /*****************************************************************************\ -@@ -2433,10 +2522,10 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) +@@ -2452,10 +2541,10 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) u32 intmask, unexpected = 0; int cardint = 0, max_loops = 16; @@ -87849,7 +87377,7 @@ index 179e83e..470860b 100644 pr_warning("%s: got irq while runtime suspended\n", mmc_hostname(host->mmc)); return IRQ_HANDLED; -@@ -2540,7 +2629,7 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) +@@ -2559,7 +2648,7 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) if (intmask && --max_loops) goto again; out: @@ -87858,7 +87386,7 @@ index 179e83e..470860b 100644 if (unexpected) { pr_err("%s: Unexpected interrupt 0x%08x.\n", -@@ -2702,15 +2791,15 @@ int sdhci_runtime_suspend_host(struct sdhci_host *host) +@@ -2737,15 +2826,15 @@ int sdhci_runtime_suspend_host(struct sdhci_host *host) host->flags &= ~SDHCI_NEEDS_RETUNING; } @@ -87878,7 +87406,7 @@ index 179e83e..470860b 100644 return ret; } -@@ -2736,16 +2825,16 @@ int sdhci_runtime_resume_host(struct sdhci_host *host) +@@ -2771,16 +2860,16 @@ int sdhci_runtime_resume_host(struct sdhci_host *host) sdhci_do_start_signal_voltage_switch(host, &host->mmc->ios); if ((host_flags & SDHCI_PV_ENABLED) && !(host->quirks2 & SDHCI_QUIRK2_PRESET_VALUE_BROKEN)) { @@ -87898,7 +87426,7 @@ index 179e83e..470860b 100644 host->runtime_suspended = false; -@@ -2756,7 +2845,7 @@ int sdhci_runtime_resume_host(struct sdhci_host *host) +@@ -2791,7 +2880,7 @@ int sdhci_runtime_resume_host(struct sdhci_host *host) /* Enable Card Detection */ sdhci_enable_card_detection(host); @@ -87907,7 +87435,7 @@ index 179e83e..470860b 100644 return ret; } -@@ -3248,7 +3337,7 @@ int sdhci_add_host(struct sdhci_host *host) +@@ -3287,7 +3376,7 @@ int sdhci_add_host(struct sdhci_host *host) host->tuning_timer.function = sdhci_tuning_timer; } @@ -87916,7 +87444,7 @@ index 179e83e..470860b 100644 mmc_hostname(mmc), host); if (ret) { pr_err("%s: Failed to request IRQ %d: %d\n", -@@ -3312,7 +3401,7 @@ void sdhci_remove_host(struct sdhci_host *host, int dead) +@@ -3351,7 +3440,7 @@ void sdhci_remove_host(struct sdhci_host *host, int dead) unsigned long flags; if (dead) { @@ -87925,7 +87453,7 @@ index 179e83e..470860b 100644 host->flags |= SDHCI_DEVICE_DEAD; -@@ -3324,7 +3413,7 @@ void sdhci_remove_host(struct sdhci_host *host, int dead) +@@ -3363,7 +3452,7 @@ void sdhci_remove_host(struct sdhci_host *host, int dead) tasklet_schedule(&host->finish_tasklet); } @@ -87935,10 +87463,10 @@ index 179e83e..470860b 100644 sdhci_disable_card_detection(host); diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h -index f90574e..cc393af 100644 +index 8a02ec8..4218039 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h -@@ -441,4 +441,10 @@ static inline void *sdhci_priv(struct sdhci_host *host) +@@ -442,4 +442,10 @@ static inline void *sdhci_priv(struct sdhci_host *host) extern int sdhci_runtime_resume_host(struct sdhci_host *host); #endif @@ -87950,11 +87478,11 @@ index f90574e..cc393af 100644 + #endif /* __SDHCI_HW_H */ diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h -index f3a39c1..58bfab0 100644 +index 458794c..f085d4d 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h -@@ -97,6 +97,7 @@ struct sdhci_host { - #define SDHCI_QUIRK2_PRESET_VALUE_BROKEN (1<<3) +@@ -100,6 +100,7 @@ struct sdhci_host { + #define SDHCI_QUIRK2_BROKEN_HOST_CONTROL (1<<5) int irq; /* Device IRQ */ + int second_irq; /* Additional IRQ to disable/enable in low-latency mode */ @@ -87962,13 +87490,13 @@ index f3a39c1..58bfab0 100644 const struct sdhci_ops *ops; /* Low level hw interface */ -- -1.8.1.6 +1.8.4 -From 2a920ba6ca829de9fbce51aa0c2bd30ab47fa8aa Mon Sep 17 00:00:00 2001 +From 8bfe5c9ae72152c622541ddf8a1c93f0b59fc9b7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:46:42 +0100 -Subject: [PATCH 030/113] Add FIQ patch to dwc_otg driver. Enable with +Subject: [PATCH 29/98] Add FIQ patch to dwc_otg driver. Enable with dwc_otg.fiq_fix_enable=1. Should give about 10% more ARM performance. Thanks to Gordon and Costas @@ -87999,10 +87527,10 @@ Subject: [PATCH 030/113] Add FIQ patch to dwc_otg driver. Enable with create mode 100755 drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index eb291c7..5468f1f 100644 +index 9935688..b06d944 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -373,6 +373,7 @@ config ARCH_BCM2708 +@@ -378,6 +378,7 @@ config ARCH_BCM2708 select ARM_ERRATA_411920 select MACH_BCM2708 select VC4 @@ -88023,10 +87551,10 @@ index d493d0b..f1a131b 100644 static inline void set_fiq_regs(struct pt_regs const *regs) { diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c -index 25442f4..74ff4ba 100644 +index 918875d..aac11f8 100644 --- a/arch/arm/kernel/fiq.c +++ b/arch/arm/kernel/fiq.c -@@ -145,6 +145,7 @@ void disable_fiq(int fiq) +@@ -142,6 +142,7 @@ void disable_fiq(int fiq) EXPORT_SYMBOL(set_fiq_handler); EXPORT_SYMBOL(__set_fiq_regs); /* defined in fiqasm.S */ EXPORT_SYMBOL(__get_fiq_regs); /* defined in fiqasm.S */ @@ -88100,10 +87628,10 @@ index da18725..274aa30 100644 return 0; } diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c -index d61e747..f5f262c 100644 +index 402bfe7..6bf738a 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -307,12 +307,32 @@ static void __init bcm2708_clocksource_init(void) +@@ -308,12 +308,32 @@ static void __init bcm2708_clocksource_init(void) .flags = IORESOURCE_MEM, }, [1] = { @@ -88138,7 +87666,7 @@ index d61e747..f5f262c 100644 static u64 usb_dmamask = DMA_BIT_MASK(DMA_MASK_BITS_COMMON); static struct platform_device bcm2708_usb_device = { -@@ -578,6 +598,11 @@ void __init bcm2708_init(void) +@@ -583,6 +603,11 @@ void __init bcm2708_init(void) #endif bcm_register_device(&bcm2708_systemtimer_device); bcm_register_device(&bcm2708_fb_device); @@ -88342,11 +87870,11 @@ index 4d3c15d..89e72d1 100644 #define ARM_BASE (BCM2708_PERI_BASE + 0xB000) /* BCM2708 ARM control block */ #define PM_BASE (BCM2708_PERI_BASE + 0x100000) /* Power Management, Reset controller and Watchdog registers */ diff --git a/drivers/usb/host/dwc_otg/Makefile b/drivers/usb/host/dwc_otg/Makefile -index c4c6e4e..6bd6a2e 100644 +index 5748f7d..8d177b1 100644 --- a/drivers/usb/host/dwc_otg/Makefile +++ b/drivers/usb/host/dwc_otg/Makefile @@ -36,6 +36,7 @@ dwc_otg-objs += dwc_otg_cil.o dwc_otg_cil_intr.o - dwc_otg-objs += dwc_otg_pcd_linux.o dwc_otg_pcd.o dwc_otg_pcd_intr.o + dwc_otg-objs += dwc_otg_pcd_linux.o dwc_otg_pcd.o dwc_otg_pcd_intr.o dwc_otg-objs += dwc_otg_hcd.o dwc_otg_hcd_linux.o dwc_otg_hcd_intr.o dwc_otg_hcd_queue.o dwc_otg_hcd_ddma.o dwc_otg-objs += dwc_otg_adp.o +dwc_otg-objs += dwc_otg_mphi_fix.o @@ -88354,7 +87882,7 @@ index c4c6e4e..6bd6a2e 100644 dwc_otg-objs += dwc_otg_cfi.o endif diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c -index 21804c4..b861b55 100644 +index 59fc862..096a3f1 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c @@ -45,6 +45,9 @@ @@ -88371,7 +87899,7 @@ index 21804c4..b861b55 100644 gintsts.d32, gintmsk.d32); } #endif -- if (gahbcfg.b.glblintrmsk) +- if (gahbcfg.b.glblintrmsk) + if (!fiq_fix_enable){ + if (gahbcfg.b.glblintrmsk) + return ((gintsts.d32 & gintmsk.d32) & gintmsk_common.d32); @@ -88387,7 +87915,7 @@ index 21804c4..b861b55 100644 } diff --git a/drivers/usb/host/dwc_otg/dwc_otg_dbg.h b/drivers/usb/host/dwc_otg/dwc_otg_dbg.h -index 8681aa9..2ff1532 100644 +index 8900318..ccc24e0 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_dbg.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_dbg.h @@ -49,6 +49,7 @@ static inline uint32_t SET_DEBUG_LEVEL(const uint32_t new) @@ -88399,7 +87927,7 @@ index 8681aa9..2ff1532 100644 #define DBG_CIL (0x2) /** When debug level has the DBG_CILV bit set, display CIL Verbose debug diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_otg/dwc_otg_driver.c -index e7f99e1..3ac720b 100644 +index dcfbd66..89cc25e 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_driver.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c @@ -64,6 +64,8 @@ @@ -88481,7 +88009,7 @@ index e7f99e1..3ac720b 100644 * * The following parameters may be specified when starting the module. diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -index 434d0c4..20f989e 100644 +index ab935c0..dd72d82 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -53,6 +53,8 @@ @@ -88511,7 +88039,7 @@ index 434d0c4..20f989e 100644 ret_val = DWC_OTG_TRANSACTION_NON_PERIODIC; } else { diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h -index 8075595..dd30f47 100644 +index bb4f67a..e6d6293 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h @@ -594,7 +594,7 @@ extern void dwc_otg_hcd_queue_transactions(dwc_otg_hcd_t * hcd, @@ -88524,7 +88052,7 @@ index 8075595..dd30f47 100644 dwc_otg_hcd); extern int32_t dwc_otg_hcd_handle_np_tx_fifo_empty_intr(dwc_otg_hcd_t * diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h -index b3dc806..04ca4c2 100644 +index 4823167..fb57db0 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h @@ -113,6 +113,11 @@ struct dwc_otg_hcd_function_ops { @@ -88540,7 +88068,7 @@ index b3dc806..04ca4c2 100644 * Returns private data set by * dwc_otg_hcd_set_priv_data function. diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -index 63c1b55..f1658fa 100644 +index b41e164..b7b6b0c 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -34,6 +34,11 @@ @@ -88782,7 +88310,7 @@ index 63c1b55..f1658fa 100644 - #endif /* DWC_DEVICE_ONLY */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c -index 4a985a6..9702f81 100644 +index e4787f5..2b4a14e 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c @@ -1,3 +1,4 @@ @@ -88884,7 +88412,7 @@ index 4a985a6..9702f81 100644 dwc_otg_hcd = dwc_otg_hcd_alloc_hcd(); if (!dwc_otg_hcd) { diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c -index 08c1669..ac10323 100644 +index 9761566..a9dea55 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c @@ -572,6 +572,9 @@ static int check_max_xfer_size(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) @@ -88951,7 +88479,7 @@ index 08c1669..ac10323 100644 &qh->qh_list_entry); diff --git a/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.c b/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.c new file mode 100755 -index 0000000..b70ca68 +index 0000000..50b94a8 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.c @@ -0,0 +1,113 @@ @@ -89050,7 +88578,7 @@ index 0000000..b70ca68 + gintmsk.b.wkupintr); + return; +} -+ ++ +void dwc_debug_otg_int(gotgint_data_t gotgint, const char* function_name) +{ + DWC_DEBUGPL(DBG_USER, "otg int register (from %s function):\n" @@ -89070,7 +88598,7 @@ index 0000000..b70ca68 +} diff --git a/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h b/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h new file mode 100755 -index 0000000..22f28e1 +index 0000000..660d50f --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h @@ -0,0 +1,36 @@ @@ -89078,7 +88606,7 @@ index 0000000..22f28e1 +#define __DWC_OTG_MPHI_FIX_H__ + +#define FIQ_WRITE_IO_ADDRESS(_addr_,_data_) *(volatile uint32_t *) IO_ADDRESS(_addr_) = _data_ -+#define FIQ_READ_IO_ADDRESS(_addr_) *(volatile uint32_t *) IO_ADDRESS(_addr_) ++#define FIQ_READ_IO_ADDRESS(_addr_) *(volatile uint32_t *) IO_ADDRESS(_addr_) +#define FIQ_MODIFY_IO_ADDRESS(_addr_,_clear_,_set_) FIQ_WRITE_IO_ADDRESS(_addr_ , (FIQ_READ_IO_ADDRESS(_addr_)&~_clear_)|_set_) +#define FIQ_WRITE(_addr_,_data_) *(volatile uint32_t *) _addr_ = _data_ + @@ -89088,7 +88616,7 @@ index 0000000..22f28e1 + volatile void* outdda; + volatile void* outddb; + volatile void* intstat; -+} mphi_regs_t; ++} mphi_regs_t; + +void dwc_debug_print_core_int_reg(gintsts_data_t gintsts, const char* function_name); +void dwc_debug_core_int_mask(gintsts_data_t gintmsk, const char* function_name); @@ -89111,7 +88639,7 @@ index 0000000..22f28e1 + +#endif diff --git a/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h b/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h -index a7e9076..bb1c42d 100644 +index e46d9bb..6b2c7d0 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h @@ -97,6 +97,9 @@ @@ -89125,13 +88653,13 @@ index a7e9076..bb1c42d 100644 struct lm_device *lmdev; #elif defined(PCI_INTERFACE) -- -1.8.1.6 +1.8.4 -From fff65bacabdf6369f43978e2d7e6018d8b5f2201 Mon Sep 17 00:00:00 2001 +From 80627048540879277d55c32bfd1c6baa86553a0d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 12 Apr 2013 23:58:47 +0100 -Subject: [PATCH 033/113] Add verious user config requests. +Subject: [PATCH 32/98] Add verious user config requests. CONFIG_DEVTMPFS_MOUNT, CONFIG_NFS_V4_1=y CONFIG_NFSD_V3_ACL=y CONFIG_NFSD_V4=y, drbd and IPSEC modules @@ -89538,14 +89066,14 @@ index 31f5afaa..ef43466 100644 # CONFIG_CRYPTO_HW is not set CONFIG_CRC_ITU_T=y -- -1.8.1.6 +1.8.4 -From 259c141897753d6306363a377f742afe714c63cc Mon Sep 17 00:00:00 2001 +From 50ebfebc8fa2e1744afbeb86d6e3bb7c07d26464 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 8 Sep 2012 15:17:53 +0100 -Subject: [PATCH 034/113] Avoid dynamic memory allocation for channel lock in - USB driver. Thanks ddv2005. +Subject: [PATCH 33/98] Avoid dynamic memory allocation for channel lock in USB + driver. Thanks ddv2005. --- drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 6 +++--- @@ -89555,7 +89083,7 @@ Subject: [PATCH 034/113] Avoid dynamic memory allocation for channel lock in 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -index 20f989e..0ce7e46 100644 +index dd72d82..c25db9a 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -822,6 +822,7 @@ static void dwc_otg_hcd_free(dwc_otg_hcd_t * dwc_otg_hcd) @@ -89593,7 +89121,7 @@ index 20f989e..0ce7e46 100644 } diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h -index dd30f47..6d82127 100644 +index e6d6293..f8ca2a4 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h @@ -548,7 +548,7 @@ struct dwc_otg_hcd { @@ -89606,7 +89134,7 @@ index dd30f47..6d82127 100644 * Private data that could be used by OS wrapper. */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c -index d0d5fa1..a2ceb77 100644 +index 274967b..ee920c4 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c @@ -276,7 +276,7 @@ void dump_frame_list(dwc_otg_hcd_t * hcd) @@ -89625,9 +89153,9 @@ index d0d5fa1..a2ceb77 100644 - DWC_SPINLOCK_FREE(channel_lock); } - /** + /** diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -index f1658fa..21e8f09 100644 +index b7b6b0c..76b5085 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -922,7 +922,7 @@ static void release_channel(dwc_otg_hcd_t * hcd, @@ -89648,31 +89176,28 @@ index f1658fa..21e8f09 100644 /** -- -1.8.1.6 +1.8.4 -From 9e7f197820b6389054c2bb8e49b393308291a1ce Mon Sep 17 00:00:00 2001 +From d6c1ae4ab108231b5dbe45ed16683c656fee1992 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:49:20 +0100 -Subject: [PATCH 035/113] Add cpufreq driver +Subject: [PATCH 34/98] Add cpufreq driver --- - arch/arm/Kconfig | 1 + - arch/arm/configs/bcmrpi_defconfig | 6 + - arch/arm/mach-bcm2708/include/mach/vcio.h | 81 +++++++++- - arch/arm/mach-bcm2708/vc_mem.c | 47 +++--- - arch/arm/mach-bcm2708/vcio.c | 34 +++++ - drivers/cpufreq/Kconfig.arm | 8 + - drivers/cpufreq/Makefile | 1 + - drivers/cpufreq/bcm2835-cpufreq.c | 239 ++++++++++++++++++++++++++++++ - 8 files changed, 380 insertions(+), 37 deletions(-) + arch/arm/Kconfig | 1 + + arch/arm/configs/bcmrpi_defconfig | 6 + + drivers/cpufreq/Kconfig.arm | 8 ++ + drivers/cpufreq/Makefile | 1 + + drivers/cpufreq/bcm2835-cpufreq.c | 238 ++++++++++++++++++++++++++++++++++++++ + 5 files changed, 254 insertions(+) create mode 100755 drivers/cpufreq/bcm2835-cpufreq.c diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index 5468f1f..4e36ccd 100644 +index b06d944..fe64557 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -369,6 +369,7 @@ config ARCH_BCM2708 +@@ -374,6 +374,7 @@ config ARCH_BCM2708 select HAVE_SCHED_CLOCK select NEED_MACH_MEMORY_H select CLKDEV_LOOKUP @@ -89697,222 +89222,14 @@ index ef43466..5b0a171 100644 CONFIG_CPU_IDLE=y CONFIG_VFP=y CONFIG_BINFMT_MISC=m -diff --git a/arch/arm/mach-bcm2708/include/mach/vcio.h b/arch/arm/mach-bcm2708/include/mach/vcio.h -index ace4ea4..7dfd14e 100644 ---- a/arch/arm/mach-bcm2708/include/mach/vcio.h -+++ b/arch/arm/mach-bcm2708/include/mach/vcio.h -@@ -27,17 +27,82 @@ - #define BCM_VCIO_DRIVER_NAME "bcm2708_vcio" - - /* Constants shared with the ARM identifying separate mailbox channels */ --#define MBOX_CHAN_POWER 0 /* for use by the power management interface */ --#define MBOX_CHAN_FB 1 /* for use by the frame buffer */ --#define MBOX_CHAN_VUART 2 /* for use by the virtual UART */ --#define MBOX_CHAN_VCHIQ 3 /* for use by the VCHIQ interface */ --#define MBOX_CHAN_LEDS 4 /* for use by the leds interface */ --#define MBOX_CHAN_BUTTONS 5 /* for use by the buttons interface */ --#define MBOX_CHAN_TOUCH 6 /* for use by the touchscreen interface */ -+#define MBOX_CHAN_POWER 0 /* for use by the power management interface */ -+#define MBOX_CHAN_FB 1 /* for use by the frame buffer */ -+#define MBOX_CHAN_VCHIQ 3 /* for use by the VCHIQ interface */ - #define MBOX_CHAN_PROPERTY 8 /* for use by the property channel */ --#define MBOX_CHAN_COUNT 9 -+#define MBOX_CHAN_COUNT 9 -+ -+/* Mailbox property tags */ -+enum { -+ VCMSG_PROPERTY_END = 0x00000000, -+ VCMSG_GET_FIRMWARE_REVISION = 0x00000001, -+ VCMSG_GET_BOARD_MODEL = 0x00010001, -+ VCMSG_GET_BOARD_REVISION = 0x00020002, -+ VCMSG_GET_BOARD_MAC_ADDRESS = 0x00020003, -+ VCMSG_GET_BOARD_SERIAL = 0x00020004, -+ VCMSG_GET_ARM_MEMORY = 0x00020005, -+ VCMSG_GET_VC_MEMORY = 0x00020006, -+ VCMSG_GET_CLOCKS = 0x00020007, -+ VCMSG_GET_COMMAND_LINE = 0x00050001, -+ VCMSG_GET_DMA_CHANNELS = 0x00060001, -+ VCMSG_GET_POWER_STATE = 0x00020001, -+ VCMSG_GET_TIMING = 0x00020002, -+ VCMSG_SET_POWER_STATE = 0x00028001, -+ VCMSG_GET_CLOCK_STATE = 0x00030001, -+ VCMSG_SET_CLOCK_STATE = 0x00038001, -+ VCMSG_GET_CLOCK_RATE = 0x00030002, -+ VCMSG_SET_CLOCK_RATE = 0x00038002, -+ VCMSG_GET_VOLTAGE = 0x00030003, -+ VCMSG_SET_VOLTAGE = 0x00038003, -+ VCMSG_GET_MAX_CLOCK = 0x00030004, -+ VCMSG_GET_MAX_VOLTAGE = 0x00030005, -+ VCMSG_GET_TEMPERATURE = 0x00030006, -+ VCMSG_GET_MIN_CLOCK = 0x00030007, -+ VCMSG_GET_MIN_VOLTAGE = 0x00030008, -+ VCMSG_GET_TURBO = 0x00030009, -+ VCMSG_SET_TURBO = 0x00038009, -+ VCMSG_SET_ALLOCATE_BUFFER = 0x00040001, -+ VCMSG_SET_RELEASE_BUFFER = 0x00048001, -+ VCMSG_SET_BLANK_SCREEN = 0x00040002, -+ VCMSG_TST_BLANK_SCREEN = 0x00044002, -+ VCMSG_GET_PHYSICAL_WIDTH_HEIGHT = 0x00040003, -+ VCMSG_TST_PHYSICAL_WIDTH_HEIGHT = 0x00044003, -+ VCMSG_SET_PHYSICAL_WIDTH_HEIGHT = 0x00048003, -+ VCMSG_GET_VIRTUAL_WIDTH_HEIGHT = 0x00040004, -+ VCMSG_TST_VIRTUAL_WIDTH_HEIGHT = 0x00044004, -+ VCMSG_SET_VIRTUAL_WIDTH_HEIGHT = 0x00048004, -+ VCMSG_GET_DEPTH = 0x00040005, -+ VCMSG_TST_DEPTH = 0x00044005, -+ VCMSG_SET_DEPTH = 0x00048005, -+ VCMSG_GET_PIXEL_ORDER = 0x00040006, -+ VCMSG_TST_PIXEL_ORDER = 0x00044006, -+ VCMSG_SET_PIXEL_ORDER = 0x00048006, -+ VCMSG_GET_ALPHA_MODE = 0x00040007, -+ VCMSG_TST_ALPHA_MODE = 0x00044007, -+ VCMSG_SET_ALPHA_MODE = 0x00048007, -+ VCMSG_GET_PITCH = 0x00040008, -+ VCMSG_TST_PITCH = 0x00044008, -+ VCMSG_SET_PITCH = 0x00048008, -+ VCMSG_GET_VIRTUAL_OFFSET = 0x00040009, -+ VCMSG_TST_VIRTUAL_OFFSET = 0x00044009, -+ VCMSG_SET_VIRTUAL_OFFSET = 0x00048009, -+ VCMSG_GET_OVERSCAN = 0x0004000a, -+ VCMSG_TST_OVERSCAN = 0x0004400a, -+ VCMSG_SET_OVERSCAN = 0x0004800a, -+ VCMSG_GET_PALETTE = 0x0004000b, -+ VCMSG_TST_PALETTE = 0x0004400b, -+ VCMSG_SET_PALETTE = 0x0004800b, -+ VCMSG_GET_LAYER = 0x0004000c, -+ VCMSG_TST_LAYER = 0x0004400c, -+ VCMSG_SET_LAYER = 0x0004800c, -+ VCMSG_GET_TRANSFORM = 0x0004000d, -+ VCMSG_TST_TRANSFORM = 0x0004400d, -+ VCMSG_SET_TRANSFORM = 0x0004800d, -+}; - - extern int /*rc*/ bcm_mailbox_read(unsigned chan, uint32_t *data28); - extern int /*rc*/ bcm_mailbox_write(unsigned chan, uint32_t data28); -+extern int /*rc*/ bcm_mailbox_property(void *data, int size); - - #endif -diff --git a/arch/arm/mach-bcm2708/vc_mem.c b/arch/arm/mach-bcm2708/vc_mem.c -index 7a7748e..5ef68b3 100644 ---- a/arch/arm/mach-bcm2708/vc_mem.c -+++ b/arch/arm/mach-bcm2708/vc_mem.c -@@ -128,44 +128,33 @@ struct vc_set_msg { - uint32_t end_tag; /* an end identifier, should be set to NULL */ - }; - --#define VCMSG_GET_ARM_MEMORY 0x00010005 --#define VCMSG_GET_VC_MEMORY 0x00010006 -- - static void vc_mem_update(void) - { -- uint32_t success; -- dma_addr_t vc_mem; /* the memory address accessed from videocore */ -- struct vc_set_msg *get_mem; /* the memory address accessed from driver */ -- -- /* allocate some memory for the messages to use throughout the lifetime of the driver, use the larger of the two message structures */ -- get_mem = (struct vc_set_msg *)dma_alloc_coherent(NULL, PAGE_ALIGN(sizeof(struct vc_set_msg)), &vc_mem, GFP_ATOMIC); -- /* clear any garbage */ -- memset(get_mem, 0, sizeof(struct vc_set_msg)); -+ struct vc_set_msg msg; /* the memory address accessed from driver */ -+ uint32_t s; -+ -+ memset(&msg, 0, sizeof msg); - /* create the message */ -- get_mem->msg_size = sizeof(struct vc_set_msg); -- get_mem->tag[0].tag_id = VCMSG_GET_VC_MEMORY; -- get_mem->tag[0].buffer_size = 8; -- get_mem->tag[0].data_size = 0; -- get_mem->tag[1].tag_id = VCMSG_GET_ARM_MEMORY; -- get_mem->tag[1].buffer_size = 8; -- get_mem->tag[1].data_size = 0; -+ msg.msg_size = sizeof msg; -+ msg.tag[0].tag_id = VCMSG_GET_VC_MEMORY; -+ msg.tag[0].buffer_size = 8; -+ msg.tag[0].data_size = 0; -+ msg.tag[1].tag_id = VCMSG_GET_ARM_MEMORY; -+ msg.tag[1].buffer_size = 8; -+ msg.tag[1].data_size = 0; - - /* send the message */ -- wmb(); -- bcm_mailbox_write(MBOX_CHAN_PROPERTY,(uint32_t)vc_mem); -- bcm_mailbox_read(MBOX_CHAN_PROPERTY, &success); -- rmb(); -+ s = bcm_mailbox_property(&msg, sizeof msg); - -- LOG_DBG("%s: resp %x, vcbase=%x vcsize=%x armbase=%x armsize=%x", __func__, get_mem->request_code, -- get_mem->tag[0].base, get_mem->tag[0].size, get_mem->tag[1].base, get_mem->tag[1].size); -+ LOG_DBG("%s: success=%d resp %x, vcbase=%x vcsize=%x armbase=%x armsize=%x", __func__, s, msg.request_code, -+ msg.tag[0].base, msg.tag[0].size, msg.tag[1].base, msg.tag[1].size); - - /* check we're all good */ -- if (get_mem->request_code & 0x80000000) { -- mm_vc_mem_base = get_mem->tag[0].base; -- mm_vc_mem_size = get_mem->tag[0].size+get_mem->tag[1].size; -- mm_vc_mem_phys_addr = get_mem->tag[1].base; -+ if (s == 0 && msg.request_code & 0x80000000) { -+ mm_vc_mem_base = msg.tag[0].base; -+ mm_vc_mem_size = msg.tag[0].size+msg.tag[1].size; -+ mm_vc_mem_phys_addr = msg.tag[1].base; - } -- dma_free_coherent(NULL, PAGE_ALIGN(sizeof(struct vc_set_msg)), (void *)get_mem, vc_mem); - } - - -diff --git a/arch/arm/mach-bcm2708/vcio.c b/arch/arm/mach-bcm2708/vcio.c -index 3874051..468fdef 100644 ---- a/arch/arm/mach-bcm2708/vcio.c -+++ b/arch/arm/mach-bcm2708/vcio.c -@@ -216,6 +216,40 @@ static void dev_mbox_register(const char *dev_name, struct device *dev) - mbox_dev = dev; - } - -+extern int bcm_mailbox_property(void *data, int size) -+{ -+ uint32_t success; -+ dma_addr_t mem_bus; /* the memory address accessed from videocore */ -+ void *mem_kern; /* the memory address accessed from driver */ -+ int s = 0; -+ -+ /* allocate some memory for the messages communicating with GPU */ -+ mem_kern = dma_alloc_coherent(NULL, PAGE_ALIGN(size), &mem_bus, GFP_ATOMIC); -+ if (mem_kern) { -+ /* create the message */ -+ memcpy(mem_kern, data, size); -+ -+ /* send the message */ -+ wmb(); -+ s = bcm_mailbox_write(MBOX_CHAN_PROPERTY, (uint32_t)mem_bus); -+ if (s == 0) { -+ s = bcm_mailbox_read(MBOX_CHAN_PROPERTY, &success); -+ } -+ if (s == 0) { -+ /* copy the response */ -+ rmb(); -+ memcpy(data, mem_kern, size); -+ } -+ dma_free_coherent(NULL, PAGE_ALIGN(size), mem_kern, mem_bus); -+ } else { -+ s = -ENOMEM; -+ } -+ if (s != 0) -+ printk(KERN_ERR DRIVER_NAME ": %s failed (%d)\n", __func__, s); -+ return s; -+} -+EXPORT_SYMBOL_GPL(bcm_mailbox_property); -+ - /* ---------------------------------------------------------------------- - * Platform Device for Mailbox - * -------------------------------------------------------------------- */ diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm -index 6e57543..bf40783 100644 +index de4d5d9..86b9a0a 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm -@@ -150,3 +150,11 @@ config ARM_SPEAR_CPUFREQ - default y +@@ -216,6 +216,14 @@ config ARM_SPEAR_CPUFREQ help This adds the CPUFreq driver support for SPEAr SOCs. -+ + +config ARM_BCM2835_CPUFREQ + bool "BCM2835 Driver" + default y @@ -89920,271 +89237,274 @@ index 6e57543..bf40783 100644 + This adds the CPUFreq driver for BCM2835 + + If in doubt, say N. ++ + config ARM_TEGRA_CPUFREQ + bool "TEGRA CPUFreq support" + depends on ARCH_TEGRA diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile -index 315b923..52bdd64 100644 +index d345b5a..06dd265 100644 --- a/drivers/cpufreq/Makefile +++ b/drivers/cpufreq/Makefile -@@ -72,6 +72,7 @@ obj-$(CONFIG_ARM_SA1100_CPUFREQ) += sa1100-cpufreq.o +@@ -76,6 +76,7 @@ obj-$(CONFIG_ARM_S5PV210_CPUFREQ) += s5pv210-cpufreq.o + obj-$(CONFIG_ARM_SA1100_CPUFREQ) += sa1100-cpufreq.o obj-$(CONFIG_ARM_SA1110_CPUFREQ) += sa1110-cpufreq.o obj-$(CONFIG_ARM_SPEAR_CPUFREQ) += spear-cpufreq.o - obj-$(CONFIG_ARCH_TEGRA) += tegra-cpufreq.o +obj-$(CONFIG_ARM_BCM2835_CPUFREQ) += bcm2835-cpufreq.o + obj-$(CONFIG_ARM_TEGRA_CPUFREQ) += tegra-cpufreq.o ################################################################################## - # PowerPC platform drivers diff --git a/drivers/cpufreq/bcm2835-cpufreq.c b/drivers/cpufreq/bcm2835-cpufreq.c new file mode 100755 -index 0000000..aa6fc66 +index 0000000..f9b976c --- /dev/null +++ b/drivers/cpufreq/bcm2835-cpufreq.c -@@ -0,0 +1,239 @@ -+/***************************************************************************** -+* Copyright 2011 Broadcom Corporation. All rights reserved. -+* -+* Unless you and Broadcom execute a separate written software license -+* agreement governing use of this software, this software is licensed to you -+* under the terms of the GNU General Public License version 2, available at -+* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). -+* -+* Notwithstanding the above, under no circumstances may you combine this -+* software in any way with any other Broadcom software provided under a -+* license other than the GPL, without Broadcom's express prior written -+* consent. -+*****************************************************************************/ -+ -+/***************************************************************************** -+* FILENAME: bcm2835-cpufreq.h -+* DESCRIPTION: This driver dynamically manages the CPU Frequency of the ARM -+* processor. Messages are sent to Videocore either setting or requesting the -+* frequency of the ARM in order to match an appropiate frequency to the current -+* usage of the processor. The policy which selects the frequency to use is -+* defined in the kernel .config file, but can be changed during runtime. -+*****************************************************************************/ -+ -+/* ---------- INCLUDES ---------- */ -+#include -+#include -+#include -+#include -+#include -+ -+/* ---------- DEFINES ---------- */ -+/*#define CPUFREQ_DEBUG_ENABLE*/ /* enable debugging */ -+#define MODULE_NAME "bcm2835-cpufreq" -+ -+#define VCMSG_ID_ARM_CLOCK 0x000000003 /* Clock/Voltage ID's */ -+ -+/* debug printk macros */ -+#ifdef CPUFREQ_DEBUG_ENABLE -+#define print_debug(fmt,...) pr_debug("%s:%s:%d: "fmt, MODULE_NAME, __func__, __LINE__, ##__VA_ARGS__) -+#else -+#define print_debug(fmt,...) -+#endif -+#define print_err(fmt,...) pr_err("%s:%s:%d: "fmt, MODULE_NAME, __func__,__LINE__, ##__VA_ARGS__) -+#define print_info(fmt,...) pr_info("%s: "fmt, MODULE_NAME, ##__VA_ARGS__) -+ -+/* tag part of the message */ -+struct vc_msg_tag { -+ uint32_t tag_id; /* the message id */ -+ uint32_t buffer_size; /* size of the buffer (which in this case is always 8 bytes) */ -+ uint32_t data_size; /* amount of data being sent or received */ -+ uint32_t dev_id; /* the ID of the clock/voltage to get or set */ -+ uint32_t val; /* the value (e.g. rate (in Hz)) to set */ -+}; -+ -+/* message structure to be sent to videocore */ -+struct vc_msg { -+ uint32_t msg_size; /* simply, sizeof(struct vc_msg) */ -+ uint32_t request_code; /* holds various information like the success and number of bytes returned (refer to mailboxes wiki) */ -+ struct vc_msg_tag tag; /* the tag structure above to make */ -+ uint32_t end_tag; /* an end identifier, should be set to NULL */ -+}; -+ -+/* ---------- GLOBALS ---------- */ -+static struct cpufreq_driver bcm2835_cpufreq_driver; /* the cpufreq driver global */ -+ -+/* -+ =============================================== -+ clk_rate either gets or sets the clock rates. -+ =============================================== -+*/ -+static uint32_t bcm2835_cpufreq_set_clock(int cur_rate, int arm_rate) -+{ -+ int s, actual_rate=0; -+ struct vc_msg msg; -+ -+ /* wipe all previous message data */ -+ memset(&msg, 0, sizeof msg); -+ -+ msg.msg_size = sizeof msg; -+ -+ msg.tag.tag_id = VCMSG_SET_CLOCK_RATE; -+ msg.tag.buffer_size = 8; -+ msg.tag.data_size = 8; /* we're sending the clock ID and the new rates which is a total of 2 words */ -+ msg.tag.dev_id = VCMSG_ID_ARM_CLOCK; -+ msg.tag.val = arm_rate * 1000; -+ -+ /* send the message */ -+ s = bcm_mailbox_property(&msg, sizeof msg); -+ -+ /* check if it was all ok and return the rate in KHz */ -+ if (s == 0 && (msg.request_code & 0x80000000)) -+ actual_rate = msg.tag.val/1000; -+ -+ print_debug("Setting new frequency = %d -> %d (actual %d)", cur_rate, arm_rate, actual_rate); -+ return actual_rate; -+} -+ -+static uint32_t bcm2835_cpufreq_get_clock(int tag) -+{ -+ int s; -+ int arm_rate = 0; -+ struct vc_msg msg; -+ -+ /* wipe all previous message data */ -+ memset(&msg, 0, sizeof msg); -+ -+ msg.msg_size = sizeof msg; -+ msg.tag.tag_id = tag; -+ msg.tag.buffer_size = 8; -+ msg.tag.data_size = 4; /* we're just sending the clock ID which is one word long */ -+ msg.tag.dev_id = VCMSG_ID_ARM_CLOCK; -+ -+ /* send the message */ -+ s = bcm_mailbox_property(&msg, sizeof msg); -+ -+ /* check if it was all ok and return the rate in KHz */ -+ if (s == 0 && (msg.request_code & 0x80000000)) -+ arm_rate = msg.tag.val/1000; -+ -+ print_debug("%s frequency = %d", -+ tag == VCMSG_GET_CLOCK_RATE ? "Current": -+ tag == VCMSG_GET_MIN_CLOCK ? "Min": -+ tag == VCMSG_GET_MAX_CLOCK ? "Max": -+ "Unexpected", arm_rate); -+ -+ return arm_rate; -+} -+ -+/* -+ ==================================================== -+ Module Initialisation registers the cpufreq driver -+ ==================================================== -+*/ -+static int __init bcm2835_cpufreq_module_init(void) -+{ -+ print_debug("IN"); -+ return cpufreq_register_driver(&bcm2835_cpufreq_driver); -+} -+ -+/* -+ ============= -+ Module exit -+ ============= -+*/ -+static void __exit bcm2835_cpufreq_module_exit(void) -+{ -+ print_debug("IN"); -+ cpufreq_unregister_driver(&bcm2835_cpufreq_driver); -+ return; -+} -+ -+/* -+ ============================================================== -+ Initialisation function sets up the CPU policy for first use -+ ============================================================== -+*/ -+static int bcm2835_cpufreq_driver_init(struct cpufreq_policy *policy) -+{ -+ /* measured value of how long it takes to change frequency */ -+ policy->cpuinfo.transition_latency = 355000; /* ns */ -+ -+ /* now find out what the maximum and minimum frequencies are */ -+ policy->min = policy->cpuinfo.min_freq = bcm2835_cpufreq_get_clock(VCMSG_GET_MIN_CLOCK); -+ policy->max = policy->cpuinfo.max_freq = bcm2835_cpufreq_get_clock(VCMSG_GET_MAX_CLOCK); -+ policy->cur = bcm2835_cpufreq_get_clock(VCMSG_GET_CLOCK_RATE); -+ -+ print_info("min=%d max=%d cur=%d", policy->min, policy->max, policy->cur); -+ return 0; -+} -+ -+/* -+ ================================================================================= -+ Target function chooses the most appropriate frequency from the table to enable -+ ================================================================================= -+*/ -+ -+static int bcm2835_cpufreq_driver_target(struct cpufreq_policy *policy, unsigned int target_freq, unsigned int relation) -+{ -+ unsigned int target = target_freq; -+ unsigned int cur = policy->cur; -+ print_debug("%s: min=%d max=%d cur=%d target=%d",policy->governor->name,policy->min,policy->max,policy->cur,target_freq); -+ -+ /* if we are above min and using ondemand, then just use max */ -+ if (strcmp("ondemand", policy->governor->name)==0 && target > policy->min) -+ target = policy->max; -+ /* if the frequency is the same, just quit */ -+ if (target == policy->cur) -+ return 0; -+ -+ /* otherwise were good to set the clock frequency */ -+ policy->cur = bcm2835_cpufreq_set_clock(policy->cur, target); -+ -+ if (!policy->cur) -+ { -+ print_err("Error occurred setting a new frequency (%d)!", target); -+ policy->cur = bcm2835_cpufreq_get_clock(VCMSG_GET_CLOCK_RATE); -+ return -EINVAL; -+ } -+ print_info("Freq %d->%d (min=%d max=%d target=%d request=%d)", cur, policy->cur, policy->min, policy->max, target_freq, target); -+ return 0; -+} -+ -+static unsigned int bcm2835_cpufreq_driver_get(unsigned int cpu) -+{ -+ unsigned int actual_rate = bcm2835_cpufreq_get_clock(VCMSG_GET_CLOCK_RATE); -+ print_debug("%d", actual_rate); -+ return actual_rate; -+} -+ -+/* -+ ================================================================================= -+ Verify ensures that when a policy is changed, it is suitable for the CPU to use -+ ================================================================================= -+*/ -+ -+static int bcm2835_cpufreq_driver_verify(struct cpufreq_policy *policy) -+{ -+ print_info("switching to governor %s", policy->governor->name); -+ return 0; -+} -+ -+ -+/* the CPUFreq driver */ -+static struct cpufreq_driver bcm2835_cpufreq_driver = { -+ .name = "BCM2835 CPUFreq", -+ .owner = THIS_MODULE, -+ .init = bcm2835_cpufreq_driver_init, -+ .verify = bcm2835_cpufreq_driver_verify, -+ .target = bcm2835_cpufreq_driver_target, -+ .get = bcm2835_cpufreq_driver_get -+}; -+ -+MODULE_AUTHOR("Dorian Peake and Dom Cobley"); -+MODULE_DESCRIPTION("CPU frequency driver for BCM2835 chip"); -+MODULE_LICENSE("GPL"); -+ -+module_init(bcm2835_cpufreq_module_init); -+module_exit(bcm2835_cpufreq_module_exit); -+ +@@ -0,0 +1,238 @@ ++/***************************************************************************** ++* Copyright 2011 Broadcom Corporation. All rights reserved. ++* ++* Unless you and Broadcom execute a separate written software license ++* agreement governing use of this software, this software is licensed to you ++* under the terms of the GNU General Public License version 2, available at ++* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). ++* ++* Notwithstanding the above, under no circumstances may you combine this ++* software in any way with any other Broadcom software provided under a ++* license other than the GPL, without Broadcom's express prior written ++* consent. ++*****************************************************************************/ ++ ++/***************************************************************************** ++* FILENAME: bcm2835-cpufreq.h ++* DESCRIPTION: This driver dynamically manages the CPU Frequency of the ARM ++* processor. Messages are sent to Videocore either setting or requesting the ++* frequency of the ARM in order to match an appropiate frequency to the current ++* usage of the processor. The policy which selects the frequency to use is ++* defined in the kernel .config file, but can be changed during runtime. ++*****************************************************************************/ ++ ++/* ---------- INCLUDES ---------- */ ++#include ++#include ++#include ++#include ++#include ++ ++/* ---------- DEFINES ---------- */ ++/*#define CPUFREQ_DEBUG_ENABLE*/ /* enable debugging */ ++#define MODULE_NAME "bcm2835-cpufreq" ++ ++#define VCMSG_ID_ARM_CLOCK 0x000000003 /* Clock/Voltage ID's */ ++ ++/* debug printk macros */ ++#ifdef CPUFREQ_DEBUG_ENABLE ++#define print_debug(fmt,...) pr_debug("%s:%s:%d: "fmt, MODULE_NAME, __func__, __LINE__, ##__VA_ARGS__) ++#else ++#define print_debug(fmt,...) ++#endif ++#define print_err(fmt,...) pr_err("%s:%s:%d: "fmt, MODULE_NAME, __func__,__LINE__, ##__VA_ARGS__) ++#define print_info(fmt,...) pr_info("%s: "fmt, MODULE_NAME, ##__VA_ARGS__) ++ ++/* tag part of the message */ ++struct vc_msg_tag { ++ uint32_t tag_id; /* the message id */ ++ uint32_t buffer_size; /* size of the buffer (which in this case is always 8 bytes) */ ++ uint32_t data_size; /* amount of data being sent or received */ ++ uint32_t dev_id; /* the ID of the clock/voltage to get or set */ ++ uint32_t val; /* the value (e.g. rate (in Hz)) to set */ ++}; ++ ++/* message structure to be sent to videocore */ ++struct vc_msg { ++ uint32_t msg_size; /* simply, sizeof(struct vc_msg) */ ++ uint32_t request_code; /* holds various information like the success and number of bytes returned (refer to mailboxes wiki) */ ++ struct vc_msg_tag tag; /* the tag structure above to make */ ++ uint32_t end_tag; /* an end identifier, should be set to NULL */ ++}; ++ ++/* ---------- GLOBALS ---------- */ ++static struct cpufreq_driver bcm2835_cpufreq_driver; /* the cpufreq driver global */ ++ ++/* ++ =============================================== ++ clk_rate either gets or sets the clock rates. ++ =============================================== ++*/ ++static uint32_t bcm2835_cpufreq_set_clock(int cur_rate, int arm_rate) ++{ ++ int s, actual_rate=0; ++ struct vc_msg msg; ++ ++ /* wipe all previous message data */ ++ memset(&msg, 0, sizeof msg); ++ ++ msg.msg_size = sizeof msg; ++ ++ msg.tag.tag_id = VCMSG_SET_CLOCK_RATE; ++ msg.tag.buffer_size = 8; ++ msg.tag.data_size = 8; /* we're sending the clock ID and the new rates which is a total of 2 words */ ++ msg.tag.dev_id = VCMSG_ID_ARM_CLOCK; ++ msg.tag.val = arm_rate * 1000; ++ ++ /* send the message */ ++ s = bcm_mailbox_property(&msg, sizeof msg); ++ ++ /* check if it was all ok and return the rate in KHz */ ++ if (s == 0 && (msg.request_code & 0x80000000)) ++ actual_rate = msg.tag.val/1000; ++ ++ print_debug("Setting new frequency = %d -> %d (actual %d)", cur_rate, arm_rate, actual_rate); ++ return actual_rate; ++} ++ ++static uint32_t bcm2835_cpufreq_get_clock(int tag) ++{ ++ int s; ++ int arm_rate = 0; ++ struct vc_msg msg; ++ ++ /* wipe all previous message data */ ++ memset(&msg, 0, sizeof msg); ++ ++ msg.msg_size = sizeof msg; ++ msg.tag.tag_id = tag; ++ msg.tag.buffer_size = 8; ++ msg.tag.data_size = 4; /* we're just sending the clock ID which is one word long */ ++ msg.tag.dev_id = VCMSG_ID_ARM_CLOCK; ++ ++ /* send the message */ ++ s = bcm_mailbox_property(&msg, sizeof msg); ++ ++ /* check if it was all ok and return the rate in KHz */ ++ if (s == 0 && (msg.request_code & 0x80000000)) ++ arm_rate = msg.tag.val/1000; ++ ++ print_debug("%s frequency = %d", ++ tag == VCMSG_GET_CLOCK_RATE ? "Current": ++ tag == VCMSG_GET_MIN_CLOCK ? "Min": ++ tag == VCMSG_GET_MAX_CLOCK ? "Max": ++ "Unexpected", arm_rate); ++ ++ return arm_rate; ++} ++ ++/* ++ ==================================================== ++ Module Initialisation registers the cpufreq driver ++ ==================================================== ++*/ ++static int __init bcm2835_cpufreq_module_init(void) ++{ ++ print_debug("IN"); ++ return cpufreq_register_driver(&bcm2835_cpufreq_driver); ++} ++ ++/* ++ ============= ++ Module exit ++ ============= ++*/ ++static void __exit bcm2835_cpufreq_module_exit(void) ++{ ++ print_debug("IN"); ++ cpufreq_unregister_driver(&bcm2835_cpufreq_driver); ++ return; ++} ++ ++/* ++ ============================================================== ++ Initialisation function sets up the CPU policy for first use ++ ============================================================== ++*/ ++static int bcm2835_cpufreq_driver_init(struct cpufreq_policy *policy) ++{ ++ /* measured value of how long it takes to change frequency */ ++ policy->cpuinfo.transition_latency = 355000; /* ns */ ++ ++ /* now find out what the maximum and minimum frequencies are */ ++ policy->min = policy->cpuinfo.min_freq = bcm2835_cpufreq_get_clock(VCMSG_GET_MIN_CLOCK); ++ policy->max = policy->cpuinfo.max_freq = bcm2835_cpufreq_get_clock(VCMSG_GET_MAX_CLOCK); ++ policy->cur = bcm2835_cpufreq_get_clock(VCMSG_GET_CLOCK_RATE); ++ ++ print_info("min=%d max=%d cur=%d", policy->min, policy->max, policy->cur); ++ return 0; ++} ++ ++/* ++ ================================================================================= ++ Target function chooses the most appropriate frequency from the table to enable ++ ================================================================================= ++*/ ++ ++static int bcm2835_cpufreq_driver_target(struct cpufreq_policy *policy, unsigned int target_freq, unsigned int relation) ++{ ++ unsigned int target = target_freq; ++ unsigned int cur = policy->cur; ++ print_debug("%s: min=%d max=%d cur=%d target=%d",policy->governor->name,policy->min,policy->max,policy->cur,target_freq); ++ ++ /* if we are above min and using ondemand, then just use max */ ++ if (strcmp("ondemand", policy->governor->name)==0 && target > policy->min) ++ target = policy->max; ++ /* if the frequency is the same, just quit */ ++ if (target == policy->cur) ++ return 0; ++ ++ /* otherwise were good to set the clock frequency */ ++ policy->cur = bcm2835_cpufreq_set_clock(policy->cur, target); ++ ++ if (!policy->cur) ++ { ++ print_err("Error occurred setting a new frequency (%d)!", target); ++ policy->cur = bcm2835_cpufreq_get_clock(VCMSG_GET_CLOCK_RATE); ++ return -EINVAL; ++ } ++ print_debug("Freq %d->%d (min=%d max=%d target=%d request=%d)", cur, policy->cur, policy->min, policy->max, target_freq, target); ++ return 0; ++} ++ ++static unsigned int bcm2835_cpufreq_driver_get(unsigned int cpu) ++{ ++ unsigned int actual_rate = bcm2835_cpufreq_get_clock(VCMSG_GET_CLOCK_RATE); ++ print_debug("%d", actual_rate); ++ return actual_rate; ++} ++ ++/* ++ ================================================================================= ++ Verify ensures that when a policy is changed, it is suitable for the CPU to use ++ ================================================================================= ++*/ ++ ++static int bcm2835_cpufreq_driver_verify(struct cpufreq_policy *policy) ++{ ++ print_info("switching to governor %s", policy->governor->name); ++ return 0; ++} ++ ++ ++/* the CPUFreq driver */ ++static struct cpufreq_driver bcm2835_cpufreq_driver = { ++ .name = "BCM2835 CPUFreq", ++ .owner = THIS_MODULE, ++ .init = bcm2835_cpufreq_driver_init, ++ .verify = bcm2835_cpufreq_driver_verify, ++ .target = bcm2835_cpufreq_driver_target, ++ .get = bcm2835_cpufreq_driver_get ++}; ++ ++MODULE_AUTHOR("Dorian Peake and Dom Cobley"); ++MODULE_DESCRIPTION("CPU frequency driver for BCM2835 chip"); ++MODULE_LICENSE("GPL"); ++ ++module_init(bcm2835_cpufreq_module_init); ++module_exit(bcm2835_cpufreq_module_exit); -- -1.8.1.6 +1.8.4 -From 000312ec04a3a48ba8f615a17356321bcb908ae5 Mon Sep 17 00:00:00 2001 +From 4dc2e0f78d48cc663d2bc6ace7cfffad1f757c93 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 8 Apr 2013 21:12:48 +0100 -Subject: [PATCH 036/113] Add NAK holdoff scheme. Enabled by default, disable +Subject: [PATCH 35/98] Add NAK holdoff scheme. Enabled by default, disable with dwc_otg.nak_holdoff_enable=0. Thanks gsh --- @@ -90196,7 +89516,7 @@ Subject: [PATCH 036/113] Add NAK holdoff scheme. Enabled by default, disable 5 files changed, 70 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_otg/dwc_otg_driver.c -index 3ac720b..d353a9a 100644 +index 89cc25e..d58ebd7 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_driver.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c @@ -243,6 +243,9 @@ struct dwc_otg_driver_module_params { @@ -90230,7 +89550,7 @@ index 3ac720b..d353a9a 100644 /** @page "Module Parameters" * diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -index 0ce7e46..2b7945a 100644 +index c25db9a..7f610d5 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -527,6 +527,8 @@ int dwc_otg_hcd_urb_dequeue(dwc_otg_hcd_t * hcd, @@ -90247,7 +89567,7 @@ index 0ce7e46..2b7945a 100644 } urb_qtd = dwc_otg_urb->qtd; + BUG_ON(!urb_qtd); - if (urb_qtd->qh == NULL) { + if (urb_qtd->qh == NULL) { DWC_ERROR("**** DWC OTG HCD URB Dequeue with QTD with NULL Q handler\n"); return -DWC_E_INVALID; } @@ -90292,7 +89612,7 @@ index 0ce7e46..2b7945a 100644 assign_and_init_hc(hcd, qh); diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h -index 6d82127..45e44ea 100644 +index f8ca2a4..0827b19 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h @@ -321,6 +321,11 @@ static inline void dwc_otg_hcd_fill_pipe(struct dwc_otg_hcd_pipe_info *pipe, @@ -90308,7 +89628,7 @@ index 6d82127..45e44ea 100644 uint16_t start_split_frame; diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -index 21e8f09..3e762e2 100644 +index 76b5085..aff59df 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -56,7 +56,12 @@ @@ -90354,7 +89674,7 @@ index 21e8f09..3e762e2 100644 * interrupt. Re-start the SSPLIT transfer. */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c -index ac10323..e6b2a7b 100644 +index a9dea55..ebee73a 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c @@ -181,6 +181,7 @@ void qh_init(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh, dwc_otg_hcd_urb_t * urb) @@ -90367,7 +89687,7 @@ index ac10323..e6b2a7b 100644 (dev_speed == USB_SPEED_FULL)) && @@ -764,6 +765,24 @@ void dwc_otg_hcd_qh_deactivate(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh, int sched_next_periodic_split) - { + { if (dwc_qh_is_non_per(qh)) { + + dwc_otg_qh_t *qh_tmp; @@ -90391,32 +89711,32 @@ index ac10323..e6b2a7b 100644 if (!DWC_CIRCLEQ_EMPTY(&qh->qtd_list)) { /* Add back to inactive non-periodic schedule. */ -- -1.8.1.6 +1.8.4 -From f1c804c6c5fc251e6e8f5f9a652687fb6530c5da Mon Sep 17 00:00:00 2001 +From f2f2f5c42537dc8af901f3b7dede5fa51c0b01ef Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 19:24:24 +0000 -Subject: [PATCH 037/113] Added hwmon/thermal driver for reporting core +Subject: [PATCH 36/98] Added hwmon/thermal driver for reporting core temperature. Thanks Dorian --- arch/arm/mach-bcm2708/bcm2708.c | 11 ++ - drivers/hwmon/Kconfig | 9 ++ + drivers/hwmon/Kconfig | 10 ++ drivers/hwmon/Makefile | 1 + - drivers/hwmon/bcm2835-hwmon.c | 211 ++++++++++++++++++++++++++++++++++++++ - drivers/thermal/Kconfig | 7 ++ + drivers/hwmon/bcm2835-hwmon.c | 219 ++++++++++++++++++++++++++++++++++++++ + drivers/thermal/Kconfig | 6 ++ drivers/thermal/Makefile | 1 + - drivers/thermal/bcm2835-thermal.c | 195 +++++++++++++++++++++++++++++++++++ - 7 files changed, 435 insertions(+) + drivers/thermal/bcm2835-thermal.c | 208 ++++++++++++++++++++++++++++++++++++ + 7 files changed, 456 insertions(+) create mode 100644 drivers/hwmon/bcm2835-hwmon.c create mode 100644 drivers/thermal/bcm2835-thermal.c diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c -index f5f262c..2875cd2 100644 +index 6bf738a..a3a5333 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -556,6 +556,14 @@ struct platform_device bcm2708_powerman_device = { +@@ -557,6 +557,14 @@ struct platform_device bcm2708_powerman_device = { .resource = bcm2708_bsc1_resources, }; @@ -90431,25 +89751,26 @@ index f5f262c..2875cd2 100644 int __init bcm_register_device(struct platform_device *pdev) { int ret; -@@ -618,6 +626,9 @@ void __init bcm2708_init(void) +@@ -623,6 +631,9 @@ void __init bcm2708_init(void) bcm_register_device(&bcm2708_bsc0_device); bcm_register_device(&bcm2708_bsc1_device); + bcm_register_device(&bcm2835_hwmon_device); + bcm_register_device(&bcm2835_thermal_device); + - #ifdef CONFIG_BCM2708_VCMEM - { - extern void vc_mem_connected_init(void); + for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { + struct amba_device *d = amba_devs[i]; + amba_device_register(d, &iomem_resource); diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig -index 0428e8a..dd3a6e0 100644 +index e989f7f..9447135 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig -@@ -1528,6 +1528,15 @@ config SENSORS_MC13783_ADC +@@ -1543,6 +1543,16 @@ config SENSORS_MC13783_ADC help Support for the A/D converter on MC13783 and MC13892 PMIC. +config SENSORS_BCM2835 ++ depends on THERMAL_BCM2835=n + tristate "Broadcom BCM2835 HWMON Driver" + help + If you say yes here you get support for the hardware @@ -90462,10 +89783,10 @@ index 0428e8a..dd3a6e0 100644 comment "ACPI drivers" diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile -index d17d3e6..a922c03 100644 +index 4f0fb52..4c22d31 100644 --- a/drivers/hwmon/Makefile +++ b/drivers/hwmon/Makefile -@@ -140,6 +140,7 @@ obj-$(CONFIG_SENSORS_W83L785TS) += w83l785ts.o +@@ -141,6 +141,7 @@ obj-$(CONFIG_SENSORS_W83L785TS) += w83l785ts.o obj-$(CONFIG_SENSORS_W83L786NG) += w83l786ng.o obj-$(CONFIG_SENSORS_WM831X) += wm831x-hwmon.o obj-$(CONFIG_SENSORS_WM8350) += wm8350-hwmon.o @@ -90475,11 +89796,23 @@ index d17d3e6..a922c03 100644 diff --git a/drivers/hwmon/bcm2835-hwmon.c b/drivers/hwmon/bcm2835-hwmon.c new file mode 100644 -index 0000000..4976387 +index 0000000..5bbed45 --- /dev/null +++ b/drivers/hwmon/bcm2835-hwmon.c -@@ -0,0 +1,211 @@ -+//bcm2835-hwmon.c +@@ -0,0 +1,219 @@ ++/***************************************************************************** ++* Copyright 2011 Broadcom Corporation. All rights reserved. ++* ++* Unless you and Broadcom execute a separate written software license ++* agreement governing use of this software, this software is licensed to you ++* under the terms of the GNU General Public License version 2, available at ++* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). ++* ++* Notwithstanding the above, under no circumstances may you combine this ++* software in any way with any other Broadcom software provided under a ++* license other than the GPL, without Broadcom's express prior written ++* consent. ++*****************************************************************************/ + +#include +#include @@ -90506,12 +89839,12 @@ index 0000000..4976387 + +#define VC_TAG_GET_TEMP 0x00030006 +#define VC_TAG_GET_MAX_TEMP 0x0003000A ++ ++/* --- STRUCTS --- */ +struct bcm2835_hwmon_data { + struct device *hwmon_dev; +}; + -+/* --- STRUCTS --- */ -+ +/* tag part of the message */ +struct vc_msg_tag { + uint32_t tag_id; /* the tag ID for the temperature */ @@ -90545,16 +89878,12 @@ index 0000000..4976387 + +static SENSOR_DEVICE_ATTR(name, S_IRUGO,bcm2835_get_name,NULL,0); +static SENSOR_DEVICE_ATTR(temp1_input,S_IRUGO,bcm2835_get_temp,NULL,TEMP); -+static SENSOR_DEVICE_ATTR(temp,S_IRUGO,bcm2835_get_temp,NULL,TEMP); +static SENSOR_DEVICE_ATTR(temp1_max,S_IRUGO,bcm2835_get_temp,NULL,MAX_TEMP); -+static SENSOR_DEVICE_ATTR(trip_point_0_temp,S_IRUGO,bcm2835_get_temp,NULL,MAX_TEMP); + +static struct attribute* bcm2835_attributes[] = { + &sensor_dev_attr_name.dev_attr.attr, + &sensor_dev_attr_temp1_input.dev_attr.attr, + &sensor_dev_attr_temp1_max.dev_attr.attr, -+ &sensor_dev_attr_temp.dev_attr.attr, -+ &sensor_dev_attr_trip_point_0_temp.dev_attr.attr, + NULL, +}; + @@ -90691,10 +90020,10 @@ index 0000000..4976387 + +module_platform_driver(bcm2835_hwmon_driver); diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig -index 5e3c025..5f16fc0 100644 +index e988c81..724f06c 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig -@@ -169,4 +169,11 @@ config INTEL_POWERCLAMP +@@ -169,6 +169,12 @@ config INTEL_POWERCLAMP enforce idle time which results in more package C-state residency. The user interface is exposed via generic thermal framework. @@ -90704,25 +90033,40 @@ index 5e3c025..5f16fc0 100644 + This will enable temperature monitoring for the Broadcom BCM2835 + chip. If built as a module, it will be called 'bcm2835-thermal'. + - endif -+ + config X86_PKG_TEMP_THERMAL + tristate "X86 package temperature thermal driver" + depends on X86_THERMAL_VECTOR diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile -index c054d41..7893ed1 100644 +index 67184a2..ea5ef4d 100644 --- a/drivers/thermal/Makefile +++ b/drivers/thermal/Makefile -@@ -23,4 +23,5 @@ obj-$(CONFIG_DB8500_THERMAL) += db8500_thermal.o +@@ -23,5 +23,6 @@ obj-$(CONFIG_DB8500_THERMAL) += db8500_thermal.o obj-$(CONFIG_ARMADA_THERMAL) += armada_thermal.o obj-$(CONFIG_DB8500_CPUFREQ_COOLING) += db8500_cpufreq_cooling.o obj-$(CONFIG_INTEL_POWERCLAMP) += intel_powerclamp.o +obj-$(CONFIG_THERMAL_BCM2835) += bcm2835-thermal.o - + obj-$(CONFIG_X86_PKG_TEMP_THERMAL) += x86_pkg_temp_thermal.o + obj-$(CONFIG_TI_SOC_THERMAL) += ti-soc-thermal/ diff --git a/drivers/thermal/bcm2835-thermal.c b/drivers/thermal/bcm2835-thermal.c new file mode 100644 -index 0000000..f1ecdb2 +index 0000000..3f9a733 --- /dev/null +++ b/drivers/thermal/bcm2835-thermal.c -@@ -0,0 +1,195 @@ -+//bcm2835-thermal.c +@@ -0,0 +1,208 @@ ++/***************************************************************************** ++* Copyright 2011 Broadcom Corporation. All rights reserved. ++* ++* Unless you and Broadcom execute a separate written software license ++* agreement governing use of this software, this software is licensed to you ++* under the terms of the GNU General Public License version 2, available at ++* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). ++* ++* Notwithstanding the above, under no circumstances may you combine this ++* software in any way with any other Broadcom software provided under a ++* license other than the GPL, without Broadcom's express prior written ++* consent. ++*****************************************************************************/ ++ +#include +#include +#include @@ -90918,27 +90262,119 @@ index 0000000..f1ecdb2 + +module_platform_driver(bcm2835_thermal_driver); -- -1.8.1.6 +1.8.4 -From cfdeee5942afe981f36878896b4ab5abe013efb7 Mon Sep 17 00:00:00 2001 +From 78eb99419ecbc288ab57ac8b1c777e5189d4c228 Mon Sep 17 00:00:00 2001 From: popcornmix -Date: Fri, 12 Apr 2013 23:59:27 +0100 -Subject: [PATCH 038/113] Add config options for thermal sensor, L2TP, - RT2800USB_UNKNOWN, and various I2C and SPI RTCs. Tidy of thermal driver. +Date: Wed, 4 Sep 2013 21:49:26 +0100 +Subject: [PATCH 37/98] Add config options +Increase to CONFIG_MMC_BLOCK_MINORS=32 +and enable CONFIG_JUMP_LABEL +See: https://github.com/raspberrypi/linux/pull/348 + +Move to SLUB memory allocator. +See: https://github.com/raspberrypi/linux/pull/349 --- - arch/arm/configs/bcmrpi_defconfig | 33 +++++++++++++++++++++++++++++++++ - drivers/hwmon/Kconfig | 1 + - drivers/hwmon/bcm2835-hwmon.c | 22 +++++++++++++++------- - drivers/thermal/bcm2835-thermal.c | 15 ++++++++++++++- - 4 files changed, 63 insertions(+), 8 deletions(-) + arch/arm/configs/bcmrpi_defconfig | 273 ++++++++++++-------------------------- + 1 file changed, 83 insertions(+), 190 deletions(-) diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 5b0a171..d11f688 100644 +index 5b0a171..fdda50b 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig -@@ -217,6 +217,7 @@ CONFIG_BRIDGE_EBT_SNAT=m +@@ -1,12 +1,17 @@ + # CONFIG_ARM_PATCH_PHYS_VIRT is not set +-CONFIG_EXPERIMENTAL=y + # CONFIG_LOCALVERSION_AUTO is not set + CONFIG_SYSVIPC=y + CONFIG_POSIX_MQUEUE=y +-CONFIG_BSD_PROCESS_ACCT=y +-CONFIG_BSD_PROCESS_ACCT_V3=y + CONFIG_FHANDLE=y + CONFIG_AUDIT=y ++CONFIG_NO_HZ=y ++CONFIG_HIGH_RES_TIMERS=y ++CONFIG_BSD_PROCESS_ACCT=y ++CONFIG_BSD_PROCESS_ACCT_V3=y ++CONFIG_TASKSTATS=y ++CONFIG_TASK_DELAY_ACCT=y ++CONFIG_TASK_XACCT=y ++CONFIG_TASK_IO_ACCOUNTING=y + CONFIG_IKCONFIG=y + CONFIG_IKCONFIG_PROC=y + CONFIG_CGROUP_FREEZER=y +@@ -18,20 +23,20 @@ CONFIG_NAMESPACES=y + CONFIG_SCHED_AUTOGROUP=y + CONFIG_EMBEDDED=y + # CONFIG_COMPAT_BRK is not set +-CONFIG_SLAB=y + CONFIG_PROFILING=y + CONFIG_OPROFILE=m + CONFIG_KPROBES=y ++CONFIG_JUMP_LABEL=y + CONFIG_MODULES=y + CONFIG_MODULE_UNLOAD=y + CONFIG_MODVERSIONS=y + CONFIG_MODULE_SRCVERSION_ALL=y + # CONFIG_BLK_DEV_BSG is not set + CONFIG_BLK_DEV_THROTTLING=y ++CONFIG_PARTITION_ADVANCED=y ++CONFIG_MAC_PARTITION=y + CONFIG_CFQ_GROUP_IOSCHED=y + CONFIG_ARCH_BCM2708=y +-CONFIG_NO_HZ=y +-CONFIG_HIGH_RES_TIMERS=y + CONFIG_AEABI=y + CONFIG_SECCOMP=y + CONFIG_CC_STACKPROTECTOR=y +@@ -41,9 +46,10 @@ CONFIG_CMDLINE="dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,11520 + CONFIG_KEXEC=y + CONFIG_CPU_FREQ=y + CONFIG_CPU_FREQ_STAT=m +-CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +-CONFIG_CPU_FREQ_GOV_POWERSAVE=y ++CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y ++CONFIG_CPU_FREQ_GOV_PERFORMANCE=y + CONFIG_CPU_FREQ_GOV_USERSPACE=y ++CONFIG_CPU_FREQ_GOV_ONDEMAND=y + CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y + CONFIG_CPU_IDLE=y + CONFIG_VFP=y +@@ -97,10 +103,8 @@ CONFIG_NETFILTER_XT_TARGET_AUDIT=m + CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m + CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m + CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +-CONFIG_NETFILTER_XT_TARGET_CT=m + CONFIG_NETFILTER_XT_TARGET_DSCP=m + CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +-CONFIG_NETFILTER_XT_TARGET_LED=m + CONFIG_NETFILTER_XT_TARGET_MARK=m + CONFIG_NETFILTER_XT_TARGET_NFLOG=m + CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +@@ -166,12 +170,7 @@ CONFIG_IP_NF_MATCH_ECN=m + CONFIG_IP_NF_MATCH_TTL=m + CONFIG_IP_NF_FILTER=m + CONFIG_IP_NF_TARGET_REJECT=m +-CONFIG_IP_NF_TARGET_LOG=m + CONFIG_IP_NF_TARGET_ULOG=m +-CONFIG_NF_NAT=m +-CONFIG_IP_NF_TARGET_MASQUERADE=m +-CONFIG_IP_NF_TARGET_NETMAP=m +-CONFIG_IP_NF_TARGET_REDIRECT=m + CONFIG_IP_NF_MANGLE=m + CONFIG_IP_NF_TARGET_ECN=m + CONFIG_IP_NF_TARGET_TTL=m +@@ -190,7 +189,6 @@ CONFIG_IP6_NF_MATCH_IPV6HEADER=m + CONFIG_IP6_NF_MATCH_MH=m + CONFIG_IP6_NF_MATCH_RT=m + CONFIG_IP6_NF_TARGET_HL=m +-CONFIG_IP6_NF_TARGET_LOG=m + CONFIG_IP6_NF_FILTER=m + CONFIG_IP6_NF_TARGET_REJECT=m + CONFIG_IP6_NF_MANGLE=m +@@ -217,6 +215,7 @@ CONFIG_BRIDGE_EBT_SNAT=m CONFIG_BRIDGE_EBT_LOG=m CONFIG_BRIDGE_EBT_ULOG=m CONFIG_BRIDGE_EBT_NFLOG=m @@ -90946,15 +90382,126 @@ index 5b0a171..d11f688 100644 CONFIG_BRIDGE=m CONFIG_VLAN_8021Q=m CONFIG_VLAN_8021Q_GVRP=y -@@ -353,6 +354,7 @@ CONFIG_RT2500USB=m - CONFIG_RT73USB=m - CONFIG_RT2800USB=m - CONFIG_RT2800USB_RT53XX=y +@@ -280,8 +279,6 @@ CONFIG_USB_IRDA=m + CONFIG_SIGMATEL_FIR=m + CONFIG_MCS_FIR=m + CONFIG_BT=m +-CONFIG_BT_L2CAP=y +-CONFIG_BT_SCO=y + CONFIG_BT_RFCOMM=m + CONFIG_BT_RFCOMM_TTY=y + CONFIG_BT_BNEP=m +@@ -313,7 +310,6 @@ CONFIG_BLK_DEV_DRBD=m + CONFIG_BLK_DEV_NBD=m + CONFIG_BLK_DEV_RAM=y + CONFIG_CDROM_PKTCDVD=m +-CONFIG_MISC_DEVICES=y + CONFIG_SCSI=y + # CONFIG_SCSI_PROC_FS is not set + CONFIG_BLK_DEV_SD=m +@@ -322,44 +318,16 @@ CONFIG_SCSI_MULTI_LUN=y + # CONFIG_SCSI_LOWLEVEL is not set + CONFIG_MD=y + CONFIG_NETDEVICES=y ++CONFIG_NETCONSOLE=m + CONFIG_TUN=m +-CONFIG_PHYLIB=m + CONFIG_MDIO_BITBANG=m +-CONFIG_NET_ETHERNET=y +-# CONFIG_NETDEV_1000 is not set +-# CONFIG_NETDEV_10000 is not set +-CONFIG_LIBERTAS_THINFIRM=m +-CONFIG_LIBERTAS_THINFIRM_USB=m +-CONFIG_AT76C50X_USB=m +-CONFIG_USB_ZD1201=m +-CONFIG_USB_NET_RNDIS_WLAN=m +-CONFIG_RTL8187=m +-CONFIG_MAC80211_HWSIM=m +-CONFIG_ATH_COMMON=m +-CONFIG_ATH9K=m +-CONFIG_ATH9K_HTC=m +-CONFIG_CARL9170=m +-CONFIG_B43=m +-CONFIG_B43LEGACY=m +-CONFIG_HOSTAP=m +-CONFIG_IWM=m +-CONFIG_LIBERTAS=m +-CONFIG_LIBERTAS_USB=m +-CONFIG_LIBERTAS_SDIO=m +-CONFIG_P54_COMMON=m +-CONFIG_P54_USB=m +-CONFIG_RT2X00=m +-CONFIG_RT2500USB=m +-CONFIG_RT73USB=m +-CONFIG_RT2800USB=m +-CONFIG_RT2800USB_RT53XX=y +-CONFIG_WL1251=m +-CONFIG_WL12XX_MENU=m +-CONFIG_ZD1211RW=m +-CONFIG_MWIFIEX=m +-CONFIG_MWIFIEX_SDIO=m +-CONFIG_RTL8192CU=m +-CONFIG_WIMAX_I2400M_USB=m ++CONFIG_PPP=m ++CONFIG_PPP_BSDCOMP=m ++CONFIG_PPP_DEFLATE=m ++CONFIG_PPP_ASYNC=m ++CONFIG_PPP_SYNC_TTY=m ++CONFIG_SLIP=m ++CONFIG_SLIP_COMPRESSED=y + CONFIG_USB_CATC=m + CONFIG_USB_KAWETH=m + CONFIG_USB_PEGASUS=m +@@ -386,14 +354,32 @@ CONFIG_USB_NET_INT51X1=m + CONFIG_USB_IPHETH=m + CONFIG_USB_SIERRA_NET=m + CONFIG_USB_VL600=m +-CONFIG_PPP=m +-CONFIG_PPP_ASYNC=m +-CONFIG_PPP_SYNC_TTY=m +-CONFIG_PPP_DEFLATE=m +-CONFIG_PPP_BSDCOMP=m +-CONFIG_SLIP=m +-CONFIG_SLIP_COMPRESSED=y +-CONFIG_NETCONSOLE=m ++CONFIG_LIBERTAS_THINFIRM=m ++CONFIG_LIBERTAS_THINFIRM_USB=m ++CONFIG_AT76C50X_USB=m ++CONFIG_USB_ZD1201=m ++CONFIG_USB_NET_RNDIS_WLAN=m ++CONFIG_RTL8187=m ++CONFIG_MAC80211_HWSIM=m ++CONFIG_B43=m ++CONFIG_B43LEGACY=m ++CONFIG_HOSTAP=m ++CONFIG_LIBERTAS=m ++CONFIG_LIBERTAS_USB=m ++CONFIG_LIBERTAS_SDIO=m ++CONFIG_P54_COMMON=m ++CONFIG_P54_USB=m ++CONFIG_RT2X00=m ++CONFIG_RT2500USB=m ++CONFIG_RT73USB=m ++CONFIG_RT2800USB=m ++CONFIG_RT2800USB_RT53XX=y +CONFIG_RT2800USB_UNKNOWN=y - CONFIG_WL1251=m - CONFIG_WL12XX_MENU=m - CONFIG_ZD1211RW=m -@@ -432,6 +434,8 @@ CONFIG_SPI_BCM2708=m ++CONFIG_ZD1211RW=m ++CONFIG_MWIFIEX=m ++CONFIG_MWIFIEX_SDIO=m ++CONFIG_RTL8192CU=m ++CONFIG_WIMAX_I2400M_USB=m + CONFIG_INPUT_POLLDEV=m + # CONFIG_INPUT_MOUSEDEV_PSAUX is not set + CONFIG_INPUT_JOYDEV=m +@@ -402,7 +388,6 @@ CONFIG_INPUT_EVDEV=m + # CONFIG_INPUT_MOUSE is not set + CONFIG_INPUT_MISC=y + CONFIG_INPUT_AD714X=m +-CONFIG_INPUT_ATI_REMOTE=m + CONFIG_INPUT_ATI_REMOTE2=m + CONFIG_INPUT_KEYSPAN_REMOTE=m + CONFIG_INPUT_POWERMATE=m +@@ -432,118 +417,11 @@ CONFIG_SPI_BCM2708=m CONFIG_SPI_SPIDEV=m CONFIG_GPIO_SYSFS=y # CONFIG_HWMON is not set @@ -90963,10 +90510,170 @@ index 5b0a171..d11f688 100644 CONFIG_WATCHDOG=y CONFIG_BCM2708_WDT=m CONFIG_MEDIA_SUPPORT=m -@@ -716,6 +720,35 @@ CONFIG_LEDS_GPIO=y - CONFIG_LEDS_TRIGGER_TIMER=m - CONFIG_LEDS_TRIGGER_HEARTBEAT=m - CONFIG_LEDS_TRIGGER_DEFAULT_ON=m +-CONFIG_VIDEO_DEV=m +-CONFIG_DVB_CORE=m +-CONFIG_RC_ATI_REMOTE=m +-CONFIG_IR_IMON=m +-CONFIG_IR_MCEUSB=m +-CONFIG_IR_REDRAT3=m +-CONFIG_IR_STREAMZAP=m +-CONFIG_RC_LOOPBACK=m +-CONFIG_MEDIA_ATTACH=y +-CONFIG_USB_VIDEO_CLASS=m +-CONFIG_USB_M5602=m +-CONFIG_USB_STV06XX=m +-CONFIG_USB_GL860=m +-CONFIG_USB_GSPCA_BENQ=m +-CONFIG_USB_GSPCA_CONEX=m +-CONFIG_USB_GSPCA_CPIA1=m +-CONFIG_USB_GSPCA_ETOMS=m +-CONFIG_USB_GSPCA_FINEPIX=m +-CONFIG_USB_GSPCA_JEILINJ=m +-CONFIG_USB_GSPCA_KINECT=m +-CONFIG_USB_GSPCA_KONICA=m +-CONFIG_USB_GSPCA_MARS=m +-CONFIG_USB_GSPCA_MR97310A=m +-CONFIG_USB_GSPCA_NW80X=m +-CONFIG_USB_GSPCA_OV519=m +-CONFIG_USB_GSPCA_OV534=m +-CONFIG_USB_GSPCA_OV534_9=m +-CONFIG_USB_GSPCA_PAC207=m +-CONFIG_USB_GSPCA_PAC7302=m +-CONFIG_USB_GSPCA_PAC7311=m +-CONFIG_USB_GSPCA_SE401=m +-CONFIG_USB_GSPCA_SN9C2028=m +-CONFIG_USB_GSPCA_SN9C20X=m +-CONFIG_USB_GSPCA_SONIXB=m +-CONFIG_USB_GSPCA_SONIXJ=m +-CONFIG_USB_GSPCA_SPCA500=m +-CONFIG_USB_GSPCA_SPCA501=m +-CONFIG_USB_GSPCA_SPCA505=m +-CONFIG_USB_GSPCA_SPCA506=m +-CONFIG_USB_GSPCA_SPCA508=m +-CONFIG_USB_GSPCA_SPCA561=m +-CONFIG_USB_GSPCA_SPCA1528=m +-CONFIG_USB_GSPCA_SQ905=m +-CONFIG_USB_GSPCA_SQ905C=m +-CONFIG_USB_GSPCA_SQ930X=m +-CONFIG_USB_GSPCA_STK014=m +-CONFIG_USB_GSPCA_STV0680=m +-CONFIG_USB_GSPCA_SUNPLUS=m +-CONFIG_USB_GSPCA_T613=m +-CONFIG_USB_GSPCA_TV8532=m +-CONFIG_USB_GSPCA_VC032X=m +-CONFIG_USB_GSPCA_VICAM=m +-CONFIG_USB_GSPCA_XIRLINK_CIT=m +-CONFIG_USB_GSPCA_ZC3XX=m +-CONFIG_VIDEO_PVRUSB2=m +-CONFIG_VIDEO_HDPVR=m +-CONFIG_VIDEO_EM28XX=m +-CONFIG_VIDEO_EM28XX_ALSA=m +-CONFIG_VIDEO_EM28XX_DVB=m +-CONFIG_VIDEO_TLG2300=m +-CONFIG_VIDEO_CX231XX=m +-CONFIG_VIDEO_CX231XX_ALSA=m +-CONFIG_VIDEO_CX231XX_DVB=m +-CONFIG_VIDEO_USBVISION=m +-CONFIG_USB_ET61X251=m +-CONFIG_USB_SN9C102=m +-CONFIG_USB_PWC=m +-CONFIG_USB_ZR364XX=m +-CONFIG_USB_STKWEBCAM=m +-CONFIG_USB_S2255=m +-CONFIG_USB_DSBR=m +-CONFIG_RADIO_SI470X=y +-CONFIG_USB_SI470X=m +-CONFIG_USB_MR800=m +-CONFIG_DVB_USB=m +-CONFIG_DVB_USB_A800=m +-CONFIG_DVB_USB_DIBUSB_MB=m +-CONFIG_DVB_USB_DIBUSB_MC=m +-CONFIG_DVB_USB_DIB0700=m +-CONFIG_DVB_USB_UMT_010=m +-CONFIG_DVB_USB_CXUSB=m +-CONFIG_DVB_USB_M920X=m +-CONFIG_DVB_USB_GL861=m +-CONFIG_DVB_USB_AU6610=m +-CONFIG_DVB_USB_DIGITV=m +-CONFIG_DVB_USB_VP7045=m +-CONFIG_DVB_USB_VP702X=m +-CONFIG_DVB_USB_GP8PSK=m +-CONFIG_DVB_USB_NOVA_T_USB2=m +-CONFIG_DVB_USB_TTUSB2=m +-CONFIG_DVB_USB_DTT200U=m +-CONFIG_DVB_USB_OPERA1=m +-CONFIG_DVB_USB_AF9005=m +-CONFIG_DVB_USB_AF9005_REMOTE=m +-CONFIG_DVB_USB_DW2102=m +-CONFIG_DVB_USB_CINERGY_T2=m +-CONFIG_DVB_USB_ANYSEE=m +-CONFIG_DVB_USB_DTV5100=m +-CONFIG_DVB_USB_AF9015=m +-CONFIG_DVB_USB_CE6230=m +-CONFIG_DVB_USB_FRIIO=m +-CONFIG_DVB_USB_EC168=m +-CONFIG_DVB_USB_AZ6027=m +-CONFIG_DVB_USB_LME2510=m +-CONFIG_DVB_USB_TECHNISAT_USB2=m +-CONFIG_SMS_SIANO_MDTV=m +-CONFIG_SMS_USB_DRV=m +-CONFIG_DVB_B2C2_FLEXCOP=m +-CONFIG_DVB_B2C2_FLEXCOP_USB=m + CONFIG_FB=y + CONFIG_FB_BCM2708=y + CONFIG_FRAMEBUFFER_CONSOLE=y +@@ -570,8 +448,6 @@ CONFIG_SND_USB_UA101=m + CONFIG_SND_USB_CAIAQ=m + CONFIG_SND_USB_6FIRE=m + CONFIG_SOUND_PRIME=m +-CONFIG_HID_PID=y +-CONFIG_USB_HIDDEV=y + CONFIG_HID_A4TECH=m + CONFIG_HID_ACRUX=m + CONFIG_HID_APPLE=m +@@ -602,7 +478,6 @@ CONFIG_HID_ORTEK=m + CONFIG_HID_PANTHERLORD=m + CONFIG_HID_PETALYNX=m + CONFIG_HID_PICOLCD=m +-CONFIG_HID_QUANTA=m + CONFIG_HID_ROCCAT=m + CONFIG_HID_SAMSUNG=m + CONFIG_HID_SONY=m +@@ -612,10 +487,10 @@ CONFIG_HID_GREENASIA=m + CONFIG_HID_SMARTJOYPLUS=m + CONFIG_HID_TOPSEED=m + CONFIG_HID_THRUSTMASTER=m +-CONFIG_HID_WACOM=m +-CONFIG_HID_WIIMOTE=m + CONFIG_HID_ZEROPLUS=m + CONFIG_HID_ZYDACRON=m ++CONFIG_HID_PID=y ++CONFIG_USB_HIDDEV=y + CONFIG_USB=y + CONFIG_USB_ANNOUNCE_NEW_DEVICES=y + CONFIG_USB_MON=m +@@ -634,8 +509,6 @@ CONFIG_USB_STORAGE_ONETOUCH=m + CONFIG_USB_STORAGE_KARMA=m + CONFIG_USB_STORAGE_CYPRESS_ATACB=m + CONFIG_USB_STORAGE_ENE_UB6250=m +-CONFIG_USB_UAS=m +-CONFIG_USB_LIBUSUAL=y + CONFIG_USB_MDC800=m + CONFIG_USB_MICROTEK=m + CONFIG_USB_SERIAL=m +@@ -708,14 +581,40 @@ CONFIG_USB_TEST=m + CONFIG_USB_ISIGHTFW=m + CONFIG_USB_YUREX=m + CONFIG_MMC=y ++CONFIG_MMC_BLOCK_MINORS=32 + CONFIG_MMC_SDHCI=y + CONFIG_MMC_SDHCI_PLTFM=y + CONFIG_MMC_SDHCI_BCM2708=y + CONFIG_MMC_SDHCI_BCM2708_DMA=y +-CONFIG_LEDS_GPIO=y +-CONFIG_LEDS_TRIGGER_TIMER=m +-CONFIG_LEDS_TRIGGER_HEARTBEAT=m +-CONFIG_LEDS_TRIGGER_DEFAULT_ON=m +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_DS1307=m +CONFIG_RTC_DRV_DS1374=m @@ -90999,300 +90706,58 @@ index 5b0a171..d11f688 100644 CONFIG_UIO=m CONFIG_UIO_PDRV=m CONFIG_UIO_PDRV_GENIRQ=m -diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig -index dd3a6e0..760940b 100644 ---- a/drivers/hwmon/Kconfig -+++ b/drivers/hwmon/Kconfig -@@ -1529,6 +1529,7 @@ config SENSORS_MC13783_ADC - Support for the A/D converter on MC13783 and MC13892 PMIC. - - config SENSORS_BCM2835 -+ depends on THERMAL_BCM2835=n - tristate "Broadcom BCM2835 HWMON Driver" - help - If you say yes here you get support for the hardware -diff --git a/drivers/hwmon/bcm2835-hwmon.c b/drivers/hwmon/bcm2835-hwmon.c -index 4976387..5bbed45 100644 ---- a/drivers/hwmon/bcm2835-hwmon.c -+++ b/drivers/hwmon/bcm2835-hwmon.c -@@ -1,4 +1,16 @@ --//bcm2835-hwmon.c -+/***************************************************************************** -+* Copyright 2011 Broadcom Corporation. All rights reserved. -+* -+* Unless you and Broadcom execute a separate written software license -+* agreement governing use of this software, this software is licensed to you -+* under the terms of the GNU General Public License version 2, available at -+* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). -+* -+* Notwithstanding the above, under no circumstances may you combine this -+* software in any way with any other Broadcom software provided under a -+* license other than the GPL, without Broadcom's express prior written -+* consent. -+*****************************************************************************/ - - #include - #include -@@ -25,12 +37,12 @@ - - #define VC_TAG_GET_TEMP 0x00030006 - #define VC_TAG_GET_MAX_TEMP 0x0003000A -+ -+/* --- STRUCTS --- */ - struct bcm2835_hwmon_data { - struct device *hwmon_dev; - }; - --/* --- STRUCTS --- */ -- - /* tag part of the message */ - struct vc_msg_tag { - uint32_t tag_id; /* the tag ID for the temperature */ -@@ -64,16 +76,12 @@ struct vc_msg { - - static SENSOR_DEVICE_ATTR(name, S_IRUGO,bcm2835_get_name,NULL,0); - static SENSOR_DEVICE_ATTR(temp1_input,S_IRUGO,bcm2835_get_temp,NULL,TEMP); --static SENSOR_DEVICE_ATTR(temp,S_IRUGO,bcm2835_get_temp,NULL,TEMP); - static SENSOR_DEVICE_ATTR(temp1_max,S_IRUGO,bcm2835_get_temp,NULL,MAX_TEMP); --static SENSOR_DEVICE_ATTR(trip_point_0_temp,S_IRUGO,bcm2835_get_temp,NULL,MAX_TEMP); - - static struct attribute* bcm2835_attributes[] = { - &sensor_dev_attr_name.dev_attr.attr, - &sensor_dev_attr_temp1_input.dev_attr.attr, - &sensor_dev_attr_temp1_max.dev_attr.attr, -- &sensor_dev_attr_temp.dev_attr.attr, -- &sensor_dev_attr_trip_point_0_temp.dev_attr.attr, - NULL, - }; - -diff --git a/drivers/thermal/bcm2835-thermal.c b/drivers/thermal/bcm2835-thermal.c -index f1ecdb2..3f9a733 100644 ---- a/drivers/thermal/bcm2835-thermal.c -+++ b/drivers/thermal/bcm2835-thermal.c -@@ -1,4 +1,17 @@ --//bcm2835-thermal.c -+/***************************************************************************** -+* Copyright 2011 Broadcom Corporation. All rights reserved. -+* -+* Unless you and Broadcom execute a separate written software license -+* agreement governing use of this software, this software is licensed to you -+* under the terms of the GNU General Public License version 2, available at -+* http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). -+* -+* Notwithstanding the above, under no circumstances may you combine this -+* software in any way with any other Broadcom software provided under a -+* license other than the GPL, without Broadcom's express prior written -+* consent. -+*****************************************************************************/ -+ - #include - #include - #include +@@ -764,7 +663,6 @@ CONFIG_SQUASHFS_XATTR=y + CONFIG_SQUASHFS_LZO=y + CONFIG_SQUASHFS_XZ=y + CONFIG_NFS_FS=y +-CONFIG_NFS_V3=y + CONFIG_NFS_V3_ACL=y + CONFIG_NFS_V4=y + CONFIG_ROOT_NFS=y +@@ -778,9 +676,6 @@ CONFIG_CIFS_XATTR=y + CONFIG_CIFS_POSIX=y + CONFIG_9P_FS=m + CONFIG_9P_FS_POSIX_ACL=y +-CONFIG_PARTITION_ADVANCED=y +-CONFIG_MAC_PARTITION=y +-CONFIG_EFI_PARTITION=y + CONFIG_NLS_DEFAULT="utf8" + CONFIG_NLS_CODEPAGE_437=y + CONFIG_NLS_CODEPAGE_737=m +@@ -828,7 +723,6 @@ CONFIG_DEBUG_INFO=y + CONFIG_DEBUG_MEMORY_INIT=y + CONFIG_BOOT_PRINTK_DELAY=y + CONFIG_LATENCYTOP=y +-CONFIG_SYSCTL_SYSCALL_CHECK=y + CONFIG_IRQSOFF_TRACER=y + CONFIG_SCHED_TRACER=y + CONFIG_STACK_TRACER=y +@@ -844,7 +738,6 @@ CONFIG_CRYPTO_HMAC=y + CONFIG_CRYPTO_XCBC=m + CONFIG_CRYPTO_MD5=y + CONFIG_CRYPTO_SHA1=y +-CONFIG_CRYPTO_SHA256=m + CONFIG_CRYPTO_SHA512=m + CONFIG_CRYPTO_TGR192=m + CONFIG_CRYPTO_WP512=m -- -1.8.1.6 +1.8.4 -From 0cafd4ffcb046d31c19c97b091f69e1e5f674d5b Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Thu, 28 Mar 2013 01:19:54 +0000 -Subject: [PATCH 039/113] 2708fb: Remove some unnecessary dmesg output. - ---- - drivers/video/bcm2708_fb.c | 34 +++++++++++++++++++--------------- - 1 file changed, 19 insertions(+), 15 deletions(-) - -diff --git a/drivers/video/bcm2708_fb.c b/drivers/video/bcm2708_fb.c -index c82dd90..08d9238 100644 ---- a/drivers/video/bcm2708_fb.c -+++ b/drivers/video/bcm2708_fb.c -@@ -35,6 +35,12 @@ - #include - #include - -+#ifdef BCM2708_FB_DEBUG -+#define print_debug(fmt,...) pr_debug("%s:%s:%d: "fmt, MODULE_NAME, __func__, __LINE__, ##__VA_ARGS__) -+#else -+#define print_debug(fmt,...) -+#endif -+ - /* This is limited to 16 characters when displayed by X startup */ - static const char *bcm2708_name = "BCM2708 FB"; - -@@ -134,17 +140,15 @@ static int bcm2708_fb_check_var(struct fb_var_screeninfo *var, - { - /* info input, var output */ - int yres; -- /* memory size in pixels */ -- unsigned pixels = info->screen_size * 8 / var->bits_per_pixel; - - /* info input, var output */ -- pr_info("bcm2708_fb_check_var info(%p) %dx%d (%dx%d), %d, %d\n", info, -+ print_debug("bcm2708_fb_check_var info(%p) %dx%d (%dx%d), %d, %d\n", info, - info->var.xres, info->var.yres, info->var.xres_virtual, - info->var.yres_virtual, (int)info->screen_size, - info->var.bits_per_pixel); -- pr_info("bcm2708_fb_check_var var(%p) %dx%d (%dx%d), %d, %d\n", var, -+ print_debug("bcm2708_fb_check_var var(%p) %dx%d (%dx%d), %d\n", var, - var->xres, var->yres, var->xres_virtual, var->yres_virtual, -- var->bits_per_pixel, pixels); -+ var->bits_per_pixel); - - if (!var->bits_per_pixel) - var->bits_per_pixel = 16; -@@ -210,7 +214,7 @@ static int bcm2708_fb_set_par(struct fb_info *info) - fbinfo->base = 0; /* filled in by VC */ - fbinfo->pitch = 0; /* filled in by VC */ - -- pr_info("bcm2708_fb_set_par info(%p) %dx%d (%dx%d), %d, %d\n", info, -+ print_debug("bcm2708_fb_set_par info(%p) %dx%d (%dx%d), %d, %d\n", info, - info->var.xres, info->var.yres, info->var.xres_virtual, - info->var.yres_virtual, (int)info->screen_size, - info->var.bits_per_pixel); -@@ -251,7 +255,7 @@ static int bcm2708_fb_set_par(struct fb_info *info) - BUG(); /* what can we do here */ - } - } -- pr_info -+ print_debug - ("BCM2708FB: start = %p,%p width=%d, height=%d, bpp=%d, pitch=%d size=%d success=%d\n", - (void *)fb->fb.screen_base, (void *)fb->fb.fix.smem_start, - fbinfo->xres, fbinfo->yres, fbinfo->bpp, -@@ -274,7 +278,7 @@ static int bcm2708_fb_setcolreg(unsigned int regno, unsigned int red, - { - struct bcm2708_fb *fb = to_bcm2708(info); - -- /*pr_info("BCM2708FB: setcolreg %d:(%02x,%02x,%02x,%02x) %x\n", regno, red, green, blue, transp, fb->fb.fix.visual);*/ -+ /*print_debug("BCM2708FB: setcolreg %d:(%02x,%02x,%02x,%02x) %x\n", regno, red, green, blue, transp, fb->fb.fix.visual);*/ - if (fb->fb.var.bits_per_pixel <= 8) { - if (regno < 256) { - /* blue [0:4], green [5:10], red [11:15] */ -@@ -297,28 +301,28 @@ static int bcm2708_fb_setcolreg(unsigned int regno, unsigned int red, - - static int bcm2708_fb_blank(int blank_mode, struct fb_info *info) - { -- /*pr_info("bcm2708_fb_blank\n"); */ -+ /*print_debug("bcm2708_fb_blank\n"); */ - return -1; - } - - static void bcm2708_fb_fillrect(struct fb_info *info, - const struct fb_fillrect *rect) - { -- /* (is called) pr_info("bcm2708_fb_fillrect\n"); */ -+ /* (is called) print_debug("bcm2708_fb_fillrect\n"); */ - cfb_fillrect(info, rect); - } - - static void bcm2708_fb_copyarea(struct fb_info *info, - const struct fb_copyarea *region) - { -- /*pr_info("bcm2708_fb_copyarea\n"); */ -+ /*print_debug("bcm2708_fb_copyarea\n"); */ - cfb_copyarea(info, region); - } - - static void bcm2708_fb_imageblit(struct fb_info *info, - const struct fb_image *image) - { -- /* (is called) pr_info("bcm2708_fb_imageblit\n"); */ -+ /* (is called) print_debug("bcm2708_fb_imageblit\n"); */ - cfb_imageblit(info, image); - } - -@@ -393,15 +397,15 @@ static int bcm2708_fb_register(struct bcm2708_fb *fb) - - fb_set_var(&fb->fb, &fb->fb.var); - -- pr_info("BCM2708FB: registering framebuffer (%dx%d@%d)\n", fbwidth, -+ print_debug("BCM2708FB: registering framebuffer (%dx%d@%d)\n", fbwidth, - fbheight, fbdepth); - - ret = register_framebuffer(&fb->fb); -- pr_info("BCM2708FB: register framebuffer (%d)\n", ret); -+ print_debug("BCM2708FB: register framebuffer (%d)\n", ret); - if (ret == 0) - goto out; - -- pr_info("BCM2708FB: cannot register framebuffer (%d)\n", ret); -+ print_debug("BCM2708FB: cannot register framebuffer (%d)\n", ret); - out: - return ret; - } --- -1.8.1.6 - - -From 3c11cdf591a62c3eac631870aaa77d6a80372b5e Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Thu, 28 Mar 2013 01:20:34 +0000 -Subject: [PATCH 040/113] cpufreq: Remove some unnecessary dmesg output. - ---- - drivers/cpufreq/bcm2835-cpufreq.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/cpufreq/bcm2835-cpufreq.c b/drivers/cpufreq/bcm2835-cpufreq.c -index aa6fc66..6ff1edb 100755 ---- a/drivers/cpufreq/bcm2835-cpufreq.c -+++ b/drivers/cpufreq/bcm2835-cpufreq.c -@@ -196,7 +196,7 @@ static int bcm2835_cpufreq_driver_target(struct cpufreq_policy *policy, unsigned - policy->cur = bcm2835_cpufreq_get_clock(VCMSG_GET_CLOCK_RATE); - return -EINVAL; - } -- print_info("Freq %d->%d (min=%d max=%d target=%d request=%d)", cur, policy->cur, policy->min, policy->max, target_freq, target); -+ print_debug("Freq %d->%d (min=%d max=%d target=%d request=%d)", cur, policy->cur, policy->min, policy->max, target_freq, target); - return 0; - } - --- -1.8.1.6 - - -From 4c074cf000920de7743875ba0c2494f414f3e008 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Mon, 17 Sep 2012 22:57:29 +0100 -Subject: [PATCH 041/113] Switch to powersave governor. We'll enable ondemand - in the distribution - ---- - arch/arm/configs/bcmrpi_defconfig | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index d11f688..c1afa47 100644 ---- a/arch/arm/configs/bcmrpi_defconfig -+++ b/arch/arm/configs/bcmrpi_defconfig -@@ -41,9 +41,10 @@ CONFIG_CMDLINE="dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,11520 - CONFIG_KEXEC=y - CONFIG_CPU_FREQ=y - CONFIG_CPU_FREQ_STAT=m --CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y --CONFIG_CPU_FREQ_GOV_POWERSAVE=y -+CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y -+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y - CONFIG_CPU_FREQ_GOV_USERSPACE=y -+CONFIG_CPU_FREQ_GOV_ONDEMAND=y - CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y - CONFIG_CPU_IDLE=y - CONFIG_VFP=y --- -1.8.1.6 - - -From 5f50086a7239b91561881bd295571887e94fe274 Mon Sep 17 00:00:00 2001 +From 91b3d218bc17bce57c7e99c88c9f82c805e69fdf Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Apr 2013 12:16:36 +0100 -Subject: [PATCH 042/113] Enable multiple ALSA channels +Subject: [PATCH 38/98] Enable multiple ALSA channels --- arch/arm/mach-bcm2708/bcm2708.c | 54 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 48 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c -index 2875cd2..27e9553 100644 +index a3a5333..e010515 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -469,12 +469,54 @@ struct platform_device bcm2708_powerman_device = { +@@ -470,12 +470,54 @@ struct platform_device bcm2708_powerman_device = { static struct platform_device bcm2708_alsa_devices[] = { @@ -91354,13 +90819,13 @@ index 2875cd2..27e9553 100644 static struct resource bcm2708_spi_resources[] = { -- -1.8.1.6 +1.8.4 -From 52a6863fd533ffa018168ccbccb6f26684607cb1 Mon Sep 17 00:00:00 2001 +From d6237e975e005f8c38aa9efe914c82ec3d9251a1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Oct 2012 20:08:19 +0100 -Subject: [PATCH 043/113] set i2c speed via module-parameter or menuconfig. +Subject: [PATCH 39/98] set i2c speed via module-parameter or menuconfig. Thanks FrankBoesing --- @@ -91369,10 +90834,10 @@ Subject: [PATCH 043/113] set i2c speed via module-parameter or menuconfig. 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig -index cc9d212..9ee5811 100644 +index 74b03eb..6d40a22 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig -@@ -352,6 +352,17 @@ config I2C_BCM2708 +@@ -353,6 +353,17 @@ config I2C_BCM2708 support for the BCM2708. BSC is a Broadcom proprietary bus compatible with I2C/TWI/SMBus. @@ -91391,7 +90856,7 @@ index cc9d212..9ee5811 100644 tristate "Blackfin TWI I2C support" depends on BLACKFIN diff --git a/drivers/i2c/busses/i2c-bcm2708.c b/drivers/i2c/busses/i2c-bcm2708.c -index 7cae615..3391889 100644 +index 4d451a4..ac9df18 100644 --- a/drivers/i2c/busses/i2c-bcm2708.c +++ b/drivers/i2c/busses/i2c-bcm2708.c @@ -66,11 +66,15 @@ @@ -91432,13 +90897,13 @@ index 7cae615..3391889 100644 return 0; -- -1.8.1.6 +1.8.4 -From cd88777d0adfc6630157543118aba6bfa494c286 Mon Sep 17 00:00:00 2001 +From f34f6a03f8deb2ffa48ce71b0a863c70c62e0f16 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Oct 2012 21:31:48 +0100 -Subject: [PATCH 044/113] Allow the number of cycles delay between sdcard +Subject: [PATCH 40/98] Allow the number of cycles delay between sdcard peripheral writes to be specified on command line with sdhci-bcm2708.cycle_delay @@ -91447,7 +90912,7 @@ Subject: [PATCH 044/113] Allow the number of cycles delay between sdcard 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 7ce2829..ffd7310 100644 +index 6263977..499d1a8 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -77,6 +77,8 @@ @@ -91477,312 +90942,23 @@ index 7ce2829..ffd7310 100644 MODULE_DESCRIPTION("Secure Digital Host Controller Interface platform driver"); MODULE_AUTHOR("Broadcom "); -- -1.8.1.6 +1.8.4 -From 0dc9549e5aa15fe2bd68e1c71e478d83e9bce346 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Wed, 17 Apr 2013 14:37:25 +0100 -Subject: [PATCH 045/113] Fix vc-mem by using module parameters - ---- - arch/arm/mach-bcm2708/bcm2708.c | 12 ++--- - arch/arm/mach-bcm2708/vc_mem.c | 99 +++++++++-------------------------------- - 2 files changed, 28 insertions(+), 83 deletions(-) - -diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c -index 27e9553..e010515 100644 ---- a/arch/arm/mach-bcm2708/bcm2708.c -+++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -77,6 +77,7 @@ - - /* command line parameters */ - static unsigned boardrev, serial; -+static unsigned uart_clock; - - static void __init bcm2708_init_led(void); - -@@ -633,8 +634,12 @@ void __init bcm2708_init(void) - { - int i; - -+ printk("bcm2708.uart_clock = %d\n", uart_clock); - pm_power_off = bcm2708_power_off; - -+ if (uart_clock) -+ lookups[0].clk->rate = uart_clock; -+ - for (i = 0; i < ARRAY_SIZE(lookups); i++) - clkdev_add(&lookups[i]); - -@@ -671,12 +676,6 @@ void __init bcm2708_init(void) - bcm_register_device(&bcm2835_hwmon_device); - bcm_register_device(&bcm2835_thermal_device); - --#ifdef CONFIG_BCM2708_VCMEM -- { -- extern void vc_mem_connected_init(void); -- vc_mem_connected_init(); -- } --#endif - for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { - struct amba_device *d = amba_devs[i]; - amba_device_register(d, &iomem_resource); -@@ -842,3 +841,4 @@ void __init bcm2708_init_early(void) - - module_param(boardrev, uint, 0644); - module_param(serial, uint, 0644); -+module_param(uart_clock, uint, 0644); -diff --git a/arch/arm/mach-bcm2708/vc_mem.c b/arch/arm/mach-bcm2708/vc_mem.c -index 5ef68b3..057f74f 100644 ---- a/arch/arm/mach-bcm2708/vc_mem.c -+++ b/arch/arm/mach-bcm2708/vc_mem.c -@@ -36,7 +36,7 @@ - #define DRIVER_NAME "vc-mem" - - // Uncomment to enable debug logging --#define ENABLE_DBG -+// #define ENABLE_DBG - - #if defined(ENABLE_DBG) - #define LOG_DBG( fmt, ... ) printk( KERN_INFO fmt "\n", ##__VA_ARGS__ ) -@@ -77,6 +77,11 @@ - EXPORT_SYMBOL(mm_vc_mem_size); - EXPORT_SYMBOL(mm_vc_mem_base); - -+static uint phys_addr = 0; -+static uint mem_size = 0; -+static uint mem_base = 0; -+ -+ - /**************************************************************************** - * - * vc_mem_open -@@ -111,53 +116,6 @@ - return 0; - } - -- --/* tag part of the message */ --struct vc_msg_tag { -- uint32_t tag_id; /* the message id */ -- uint32_t buffer_size; /* size of the buffer (which in this case is always 8 bytes) */ -- uint32_t data_size; /* amount of data being sent or received */ -- uint32_t base; /* the address of memory base */ -- uint32_t size; /* the size of memory in bytes */ --}; -- --struct vc_set_msg { -- uint32_t msg_size; /* simply, sizeof(struct vc_msg) */ -- uint32_t request_code; /* holds various information like the success and number of bytes returned (refer to mailboxes wiki) */ -- struct vc_msg_tag tag[2]; /* the array of tag structures above to make */ -- uint32_t end_tag; /* an end identifier, should be set to NULL */ --}; -- --static void vc_mem_update(void) --{ -- struct vc_set_msg msg; /* the memory address accessed from driver */ -- uint32_t s; -- -- memset(&msg, 0, sizeof msg); -- /* create the message */ -- msg.msg_size = sizeof msg; -- msg.tag[0].tag_id = VCMSG_GET_VC_MEMORY; -- msg.tag[0].buffer_size = 8; -- msg.tag[0].data_size = 0; -- msg.tag[1].tag_id = VCMSG_GET_ARM_MEMORY; -- msg.tag[1].buffer_size = 8; -- msg.tag[1].data_size = 0; -- -- /* send the message */ -- s = bcm_mailbox_property(&msg, sizeof msg); -- -- LOG_DBG("%s: success=%d resp %x, vcbase=%x vcsize=%x armbase=%x armsize=%x", __func__, s, msg.request_code, -- msg.tag[0].base, msg.tag[0].size, msg.tag[1].base, msg.tag[1].size); -- -- /* check we're all good */ -- if (s == 0 && msg.request_code & 0x80000000) { -- mm_vc_mem_base = msg.tag[0].base; -- mm_vc_mem_size = msg.tag[0].size+msg.tag[1].size; -- mm_vc_mem_phys_addr = msg.tag[1].base; -- } --} -- -- - /**************************************************************************** - * - * vc_mem_get_size -@@ -167,7 +125,6 @@ static void vc_mem_update(void) - static void - vc_mem_get_size(void) - { -- vc_mem_update(); - } - - /**************************************************************************** -@@ -179,7 +136,6 @@ static void vc_mem_update(void) - static void - vc_mem_get_base(void) - { -- vc_mem_update(); - } - - /**************************************************************************** -@@ -191,7 +147,6 @@ static void vc_mem_update(void) - int - vc_mem_get_current_size(void) - { -- vc_mem_get_size(); - return mm_vc_mem_size; - } - -@@ -382,25 +337,26 @@ static void vc_mem_update(void) - - /**************************************************************************** - * --* vc_mem_connected_init --* --* This function is called once the videocore has been connected. -+* vc_mem_init - * - ***************************************************************************/ - --void --vc_mem_connected_init(void) -+static int __init -+vc_mem_init(void) - { - int rc = -EFAULT; - struct device *dev; - - LOG_DBG("%s: called", __func__); - -+ mm_vc_mem_phys_addr = phys_addr; -+ mm_vc_mem_size = mem_size; -+ mm_vc_mem_base = mem_base; -+ - vc_mem_get_size(); - -- printk("vc-mem: mm_vc_mem_phys_addr = 0x%08lx\n", mm_vc_mem_phys_addr); -- printk("vc-mem: mm_vc_mem_size = 0x%08x (%u MiB)\n", -- mm_vc_mem_size, mm_vc_mem_size / (1024 * 1024)); -+ printk("vc-mem: phys_addr:0x%08lx mem_base=0x%08x mem_size:0x%08x(%u MiB)\n", -+ mm_vc_mem_phys_addr, mm_vc_mem_base, mm_vc_mem_size, mm_vc_mem_size / (1024 * 1024)); - - if ((rc = alloc_chrdev_region(&vc_mem_devnum, 0, 1, DRIVER_NAME)) < 0) { - LOG_ERR("%s: alloc_chrdev_region failed (rc=%d)", __func__, rc); -@@ -440,7 +396,7 @@ static void vc_mem_update(void) - #endif - - vc_mem_inited = 1; -- return; -+ return 0; - - out_device_destroy: - device_destroy(vc_mem_class, vc_mem_devnum); -@@ -456,23 +412,7 @@ static void vc_mem_update(void) - unregister_chrdev_region(vc_mem_devnum, 1); - - out_err: -- return; --} -- --/**************************************************************************** --* --* vc_mem_init --* --***************************************************************************/ -- --static int __init --vc_mem_init(void) --{ -- printk(KERN_INFO "vc-mem: Videocore memory driver\n"); -- -- //vchiq_add_connected_callback(vc_mem_connected_init); -- -- return 0; -+ return -1; - } - - /**************************************************************************** -@@ -501,3 +441,8 @@ static void vc_mem_update(void) - module_exit(vc_mem_exit); - MODULE_LICENSE("GPL"); - MODULE_AUTHOR("Broadcom Corporation"); -+ -+module_param(phys_addr, uint, 0644); -+module_param(mem_size, uint, 0644); -+module_param(mem_base, uint, 0644); -+ --- -1.8.1.6 - - -From f0cea32b4797cb78f383c99a185e6c0073de9fc6 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Fri, 5 Oct 2012 22:44:47 +0100 -Subject: [PATCH 046/113] Support dummy vc-mem ioctl used by vcdbg - ---- - arch/arm/mach-bcm2708/include/mach/vc_mem.h | 1 + - arch/arm/mach-bcm2708/vc_mem.c | 14 ++++++++++++++ - 2 files changed, 15 insertions(+) - -diff --git a/arch/arm/mach-bcm2708/include/mach/vc_mem.h b/arch/arm/mach-bcm2708/include/mach/vc_mem.h -index 9d41c3a..d29125b 100644 ---- a/arch/arm/mach-bcm2708/include/mach/vc_mem.h -+++ b/arch/arm/mach-bcm2708/include/mach/vc_mem.h -@@ -22,6 +22,7 @@ - #define VC_MEM_IOC_MEM_PHYS_ADDR _IOR( VC_MEM_IOC_MAGIC, 0, unsigned long ) - #define VC_MEM_IOC_MEM_SIZE _IOR( VC_MEM_IOC_MAGIC, 1, unsigned int ) - #define VC_MEM_IOC_MEM_BASE _IOR( VC_MEM_IOC_MAGIC, 2, unsigned int ) -+#define VC_MEM_IOC_MEM_LOAD _IOR( VC_MEM_IOC_MAGIC, 3, unsigned int ) - - #if defined( __KERNEL__ ) - #define VC_MEM_TO_ARM_ADDR_MASK 0x3FFFFFFF -diff --git a/arch/arm/mach-bcm2708/vc_mem.c b/arch/arm/mach-bcm2708/vc_mem.c -index 057f74f..aeae4d5 100644 ---- a/arch/arm/mach-bcm2708/vc_mem.c -+++ b/arch/arm/mach-bcm2708/vc_mem.c -@@ -208,6 +208,20 @@ - } - break; - } -+ case VC_MEM_IOC_MEM_LOAD: -+ { -+ // Get the videocore memory base -+ vc_mem_get_base(); -+ -+ LOG_DBG("%s: VC_MEM_IOC_MEM_LOAD=%u", __func__, -+ mm_vc_mem_base); -+ -+ if (copy_to_user((void *) arg, &mm_vc_mem_base, -+ sizeof (mm_vc_mem_base)) != 0) { -+ rc = -EFAULT; -+ } -+ break; -+ } - default: - { - return -ENOTTY; --- -1.8.1.6 - - -From 7d46f7dab9f58dc747e852b664a2cbcdaf62a4f3 Mon Sep 17 00:00:00 2001 +From 36d5a52753988822d3c86dcb8a197625ef5281bb Mon Sep 17 00:00:00 2001 From: dero Date: Mon, 19 Nov 2012 12:46:06 +0100 -Subject: [PATCH 047/113] Lazy CRC quirk: Implemented retrying mechanisms for - SD SSR and SCR, disabled missing_status and spurious CRC ACMD51 quirks by +Subject: [PATCH 41/98] Lazy CRC quirk: Implemented retrying mechanisms for SD + SSR and SCR, disabled missing_status and spurious CRC ACMD51 quirks by default (should be fixed by the retrying-mechanishm) --- - drivers/mmc/core/sd.c | 115 +++++++++++++++++++++++++++++++++------ + drivers/mmc/core/sd.c | 111 ++++++++++++++++++++++++++++++++++----- drivers/mmc/host/sdhci-bcm2708.c | 11 +++- - 2 files changed, 108 insertions(+), 18 deletions(-) + 2 files changed, 106 insertions(+), 16 deletions(-) diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c -index 9e645e1..1ee6cf3 100644 +index 176d125..84288a9 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -13,6 +13,8 @@ @@ -91844,7 +91020,7 @@ index 9e645e1..1ee6cf3 100644 + touch_nmi_watchdog(); // we are still alive! + } + } -+ ++ + if( err) + { + pr_err("%s: failed to read SD Configuration register (SCR) after %d tries during %lu ms, error %d\n", mmc_hostname(card->host), tries, retry_timeout_ms, err ); @@ -91859,7 +91035,7 @@ index 9e645e1..1ee6cf3 100644 + err = mmc_decode_scr(card); + if (err) + return err; -+ ++ + return err; +} + @@ -91875,41 +91051,39 @@ index 9e645e1..1ee6cf3 100644 u32 *ssr; if (!(card->csd.cmdclass & CCC_APP_SPEC)) { -@@ -227,15 +288,41 @@ static int mmc_read_ssr(struct mmc_card *card) - ssr = kmalloc(64, GFP_KERNEL); +@@ -228,14 +289,40 @@ static int mmc_read_ssr(struct mmc_card *card) if (!ssr) return -ENOMEM; -- + - err = mmc_app_sd_status(card, ssr); - if (err) { - pr_warning("%s: problem reading SD Status " - "register.\n", mmc_hostname(card->host)); - err = 0; -+ + timeout_at= jiffies + msecs_to_jiffies( retry_timeout_ms ); + tries= 0; -+ ++ + while( tries < retry_min_tries || time_before( jiffies, timeout_at ) ) + { + unsigned long delay_at; + tries++; -+ ++ + err= mmc_app_sd_status(card, ssr); + if( !err ) + break; // sucess!!! -+ ++ + touch_nmi_watchdog(); // we are still alive! -+ ++ + // delay + delay_at= jiffies + msecs_to_jiffies( retry_delay_ms ); + while( time_before( jiffies, delay_at ) ) + { + mdelay( 1 ); + touch_nmi_watchdog(); // we are still alive! -+ } ++ } + } -+ -+ if( err) ++ ++ if( err) + { + pr_err("%s: failed to read SD Status register (SSR) after %d tries during %lu ms, error %d\n", mmc_hostname(card->host), tries, retry_timeout_ms, err ); goto out; @@ -91923,7 +91097,7 @@ index 9e645e1..1ee6cf3 100644 for (i = 0; i < 16; i++) ssr[i] = be32_to_cpu(ssr[i]); -@@ -808,15 +895,11 @@ int mmc_sd_setup_card(struct mmc_host *host, struct mmc_card *card, +@@ -813,14 +900,10 @@ int mmc_sd_setup_card(struct mmc_host *host, struct mmc_card *card, if (!reinit) { /* @@ -91936,15 +91110,13 @@ index 9e645e1..1ee6cf3 100644 - - err = mmc_decode_scr(card); - if (err) -- return err; -+ err = mmc_read_scr(card); -+ if( err ) -+ return err; ++ err = mmc_read_scr(card); ++ if( err ) + return err; /* - * Fetch and process SD Status register. diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index ffd7310..3556ed3 100644 +index 499d1a8..5dabf7a 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -137,6 +137,7 @@ static inline unsigned long int since_ns(hptime_t t) @@ -92001,13 +91173,13 @@ index ffd7310..3556ed3 100644 -- -1.8.1.6 +1.8.4 -From 214f5b84197d030bb6be4214b750a3f070bacd91 Mon Sep 17 00:00:00 2001 +From 9039ad73f20b3c912f08ee9928ef73d2f4a33ba0 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 28 Mar 2013 00:10:32 +0000 -Subject: [PATCH 048/113] bcm2708: Add vc_cma driver to enable use of CMA +Subject: [PATCH 42/98] bcm2708: Add vc_cma driver to enable use of CMA --- arch/arm/mach-bcm2708/bcm2708.c | 18 ++++++++++++++++++ @@ -92065,13 +91237,13 @@ index e010515..9d38d40 100644 module_param(boardrev, uint, 0644); -- -1.8.1.6 +1.8.4 -From b052cfe5c038d97f45f8d620e0182c66135aebef Mon Sep 17 00:00:00 2001 +From 927798c6f84694cdf3f1d4049dc8d0bc310f74a6 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 24 Oct 2012 22:00:43 +0100 -Subject: [PATCH 049/113] Fix reboot with new restart method of machine driver +Subject: [PATCH 43/98] Fix reboot with new restart method of machine driver --- arch/arm/mach-bcm2708/bcm2708.c | 18 +++++++++++++++++- @@ -92146,20 +91318,20 @@ index bc9d458..2d0b821 100644 - #endif -- -1.8.1.6 +1.8.4 -From 41f569ca2bd0437b34a670fb44cdfb49b6ac68a3 Mon Sep 17 00:00:00 2001 +From 0fa0203afc42678c9cb4719c5710d5a5f043abd0 Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Sun, 4 Nov 2012 15:55:01 +0000 -Subject: [PATCH 050/113] Make sure we wait for the reset to finish +Subject: [PATCH 44/98] Make sure we wait for the reset to finish --- drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -index 3e762e2..e8c91e7 100644 +index aff59df..1a23d4b 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -232,6 +232,8 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) @@ -92172,28 +91344,28 @@ index 3e762e2..e8c91e7 100644 mphi_int_count = 0; } -- -1.8.1.6 +1.8.4 -From 933d56caab97524b18e22c9b27e6c10688fabc3e Mon Sep 17 00:00:00 2001 +From 397afe17888dafc5c5125c95fdca52d85f0add42 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 19 Nov 2012 18:27:05 +0000 -Subject: [PATCH 051/113] Add Simon Hall's dma helper module, useful in future +Subject: [PATCH 45/98] Add Simon Hall's dma helper module, useful in future for X acceleration --- arch/arm/mach-bcm2708/Kconfig | 7 + arch/arm/mach-bcm2708/Makefile | 3 + - arch/arm/mach-bcm2708/dmaer.c | 887 ++++++++++++++++++++++++ + arch/arm/mach-bcm2708/dmaer.c | 886 ++++++++++++++++++++++++ arch/arm/mach-bcm2708/include/mach/vc_support.h | 69 ++ - arch/arm/mach-bcm2708/vc_support.c | 319 +++++++++ - 5 files changed, 1285 insertions(+) + arch/arm/mach-bcm2708/vc_support.c | 318 +++++++++ + 5 files changed, 1283 insertions(+) create mode 100755 arch/arm/mach-bcm2708/dmaer.c create mode 100755 arch/arm/mach-bcm2708/include/mach/vc_support.h create mode 100755 arch/arm/mach-bcm2708/vc_support.c diff --git a/arch/arm/mach-bcm2708/Kconfig b/arch/arm/mach-bcm2708/Kconfig -index 63bb76c..2a24db6 100644 +index 9355841..cfa8779 100644 --- a/arch/arm/mach-bcm2708/Kconfig +++ b/arch/arm/mach-bcm2708/Kconfig @@ -31,4 +31,11 @@ config BCM2708_NOL2CACHE @@ -92209,22 +91381,22 @@ index 63bb76c..2a24db6 100644 + endmenu diff --git a/arch/arm/mach-bcm2708/Makefile b/arch/arm/mach-bcm2708/Makefile -index 164ecb2..0da162c 100644 +index a722f3f..03b504b 100644 --- a/arch/arm/mach-bcm2708/Makefile +++ b/arch/arm/mach-bcm2708/Makefile -@@ -6,3 +6,6 @@ obj-$(CONFIG_MACH_BCM2708) += clock.o bcm2708.o armctrl.o vcio.o power.o dma.o +@@ -5,3 +5,6 @@ + obj-$(CONFIG_MACH_BCM2708) += clock.o bcm2708.o armctrl.o vcio.o power.o dma.o obj-$(CONFIG_BCM2708_GPIO) += bcm2708_gpio.o obj-$(CONFIG_BCM2708_VCMEM) += vc_mem.o - ++ +obj-$(CONFIG_BCM2708_DMAER) += dmaer_master.o +dmaer_master-objs := dmaer.o vc_support.o -+ diff --git a/arch/arm/mach-bcm2708/dmaer.c b/arch/arm/mach-bcm2708/dmaer.c new file mode 100755 -index 0000000..d1bc0fa +index 0000000..5b0f0ff --- /dev/null +++ b/arch/arm/mach-bcm2708/dmaer.c -@@ -0,0 +1,887 @@ +@@ -0,0 +1,886 @@ +#include +#include +#include @@ -92465,10 +91637,10 @@ index 0000000..d1bc0fa + else + { + bus_addr = (unsigned long)UserVirtualToBus(pUser); -+ ++ + if (!bus_addr) + return 0; -+ ++ + g_cbVirtAddr = virtual_page; + g_cbBusAddr = bus_addr & ~4095; + g_cacheMiss++; @@ -92524,7 +91696,7 @@ index 0000000..d1bc0fa +static int Open(struct inode *pInode, struct file *pFile) +{ + PRINTK(KERN_DEBUG "file opening: %d/%d\n", imajor(pInode), iminor(pInode)); -+ ++ + //check which device we are + if (iminor(pInode) == 0) //4k + { @@ -92537,7 +91709,7 @@ index 0000000..d1bc0fa + } + else + return -EINVAL; -+ ++ + //todo there will be trouble if two different processes open the files + + //reset after any file is opened @@ -92554,7 +91726,7 @@ index 0000000..d1bc0fa + PRINTK(KERN_DEBUG "file closing, %d pages tracked\n", g_trackedPages); + if (g_trackedPages) + PRINTK(KERN_ERR "we\'re leaking memory!\n"); -+ ++ + //wait for any dmas to finish + DmaWaitAll(); + @@ -92582,7 +91754,7 @@ index 0000000..d1bc0fa + struct DmaControlBlock kernCB; + struct DmaControlBlock __user *pUNext; + void __iomem *pSourceBus, __iomem *pDestBus; -+ ++ + //get the control block into kernel memory so we can work on it + if (copy_from_user(&kernCB, pUserCB, sizeof(struct DmaControlBlock)) != 0) + { @@ -92590,7 +91762,7 @@ index 0000000..d1bc0fa + *pError = 1; + return 0; + } -+ ++ + if (kernCB.m_pSourceAddr == 0 || kernCB.m_pDestAddr == 0) + { + PRINTK(KERN_ERR "faulty source (%p) dest (%p) addresses for user cb %p\n", @@ -92610,16 +91782,16 @@ index 0000000..d1bc0fa + *pError = 1; + return 0; + } -+ ++ + //update the user structure with the new bus addresses + kernCB.m_pSourceAddr = pSourceBus; + kernCB.m_pDestAddr = pDestBus; + + PRINTK_VERBOSE(KERN_DEBUG "final source %p dest %p\n", kernCB.m_pSourceAddr, kernCB.m_pDestAddr); -+ ++ + //sort out the bus address for the next block + pUNext = kernCB.m_pNext; -+ ++ + if (kernCB.m_pNext) + { + void __iomem *pNextBus; @@ -92635,7 +91807,7 @@ index 0000000..d1bc0fa + //update the pointer with the bus address + kernCB.m_pNext = pNextBus; + } -+ ++ + //write it back to user space + if (copy_to_user(pUserCB, &kernCB, sizeof(struct DmaControlBlock)) != 0) + { @@ -92653,7 +91825,7 @@ index 0000000..d1bc0fa +static int DmaKick(struct DmaControlBlock __user *pUserCB) +{ + void __iomem *pBusCB; -+ ++ + pBusCB = UserVirtualToBusViaCbCache(pUserCB); + if (!pBusCB) + { @@ -92664,7 +91836,7 @@ index 0000000..d1bc0fa + //flush_cache_all(); + + bcm_dma_start(g_pDmaChanBase, (dma_addr_t)pBusCB); -+ ++ + return 0; +} + @@ -92678,9 +91850,9 @@ index 0000000..d1bc0fa + time_before = jiffies; + //bcm_dma_wait_idle(g_pDmaChanBase); + dsb(); -+ ++ + cs = readl(g_pDmaChanBase); -+ ++ + while ((cs & 1) == 1) + { + cs = readl(g_pDmaChanBase); @@ -92743,7 +91915,7 @@ index 0000000..d1bc0fa + FlushAddrCache(); + + DmaKick((struct DmaControlBlock __user *)arg); -+ ++ + if (cmd != DMA_PREPARE_KICK_WAIT) + break; +/* case DMA_WAIT_ONE: @@ -92823,7 +91995,7 @@ index 0000000..d1bc0fa +{ + struct PageList *pPages; + struct VmaPageList *pVmaList; -+ ++ + PRINTK_VERBOSE(KERN_DEBUG "MMAP vma %p, length %ld (%s %d)\n", + pVma, pVma->vm_end - pVma->vm_start, + current->comm, current->pid); @@ -92841,7 +92013,7 @@ index 0000000..d1bc0fa + //clear the page list + pPages->m_used = 0; + pPages->m_pNext = 0; -+ ++ + //insert our vma and new page list somewhere + if (!pVma->vm_private_data) + { @@ -92907,9 +92079,9 @@ index 0000000..d1bc0fa +{ + struct VmaPageList *pVmaList; + int freed = 0; -+ ++ + PRINTK_VERBOSE(KERN_DEBUG "vma close %p private %p (%s %d)\n", pVma, pVma->vm_private_data, current->comm, current->pid); -+ ++ + //wait for any dmas to finish + DmaWaitAll(); + @@ -92920,7 +92092,7 @@ index 0000000..d1bc0fa + if (pVmaList) + { + struct PageList *pPages; -+ ++ + pVmaList->m_refCount--; + + if (pVmaList->m_refCount == 0) @@ -92961,7 +92133,7 @@ index 0000000..d1bc0fa + kfree(pPages); + pPages = next; + } -+ ++ + //remove our vma from the list + kfree(pVmaList); + pVma->vm_private_data = 0; @@ -92989,7 +92161,7 @@ index 0000000..d1bc0fa + current->comm, current->pid); + PRINTK_VERBOSE(KERN_DEBUG "FAULT\n"); + pVmf->page = alloc_page(GFP_KERNEL); -+ ++ + if (pVmf->page) + { + PRINTK_VERBOSE(KERN_DEBUG "alloc page virtual %p\n", page_address(pVmf->page)); @@ -93003,13 +92175,13 @@ index 0000000..d1bc0fa + else + { + struct VmaPageList *pVmaList; -+ ++ + get_page(pVmf->page); + g_trackedPages++; -+ ++ + //find our vma in the list + pVmaList = (struct VmaPageList *)pVma->vm_private_data; -+ ++ + if (pVmaList) + { + PRINTK_VERBOSE(KERN_DEBUG "vma found (%s %d)\n", current->comm, current->pid); @@ -93021,7 +92193,7 @@ index 0000000..d1bc0fa + pVmaList->m_pPageTail->m_pNext = (struct PageList *)kmalloc(sizeof(struct PageList), GFP_KERNEL); + if (!pVmaList->m_pPageTail->m_pNext) + return -ENOMEM; -+ ++ + //update the tail pointer + pVmaList->m_pPageTail = pVmaList->m_pPageTail->m_pNext; + pVmaList->m_pPageTail->m_used = 0; @@ -93029,13 +92201,13 @@ index 0000000..d1bc0fa + } + + PRINTK_VERBOSE(KERN_DEBUG "adding page to list (%s %d)\n", current->comm, current->pid); -+ ++ + pVmaList->m_pPageTail->m_pPages[pVmaList->m_pPageTail->m_used] = pVmf->page; + pVmaList->m_pPageTail->m_used++; + } + else + PRINTK(KERN_ERR "returned page for vma we don\'t know %p (%s %d)\n", pVma, current->comm, current->pid); -+ ++ + return 0; + } +} @@ -93051,7 +92223,7 @@ index 0000000..d1bc0fa + } + else + PRINTK(KERN_DEBUG "major device number %d\n", MAJOR(g_majorMinor)); -+ ++ + PRINTK(KERN_DEBUG "vma list size %d, page list size %d, page size %ld\n", + sizeof(struct VmaPageList), sizeof(struct PageList), PAGE_SIZE); + @@ -93061,19 +92233,19 @@ index 0000000..d1bc0fa + //uncomment to force to channel 0 + //result = 0; + //g_pDmaChanBase = 0xce808000; -+ ++ + if (result < 0) + { + PRINTK(KERN_ERR "failed to allocate dma channel\n"); + cdev_del(&g_cDev); + unregister_chrdev_region(g_majorMinor, 1); + } -+ ++ + //reset the channel + PRINTK(KERN_DEBUG "allocated dma channel %d (%p), initial state %08x\n", result, g_pDmaChanBase, *g_pDmaChanBase); + *g_pDmaChanBase = 1 << 31; + PRINTK(KERN_DEBUG "post-reset %08x\n", *g_pDmaChanBase); -+ ++ + g_dmaChan = result; + + //clear the cache stats @@ -93084,7 +92256,7 @@ index 0000000..d1bc0fa + cdev_init(&g_cDev, &g_fOps); + g_cDev.owner = THIS_MODULE; + g_cDev.ops = &g_fOps; -+ ++ + result = cdev_add(&g_cDev, g_majorMinor, 1); + if (result < 0) + { @@ -93093,7 +92265,7 @@ index 0000000..d1bc0fa + bcm_dma_chan_free(g_dmaChan); + return result; + } -+ ++ + return 0; +} + @@ -93111,7 +92283,6 @@ index 0000000..d1bc0fa +MODULE_AUTHOR("Simon Hall"); +module_init(dmaer_init); +module_exit(dmaer_exit); -+ diff --git a/arch/arm/mach-bcm2708/include/mach/vc_support.h b/arch/arm/mach-bcm2708/include/mach/vc_support.h new file mode 100755 index 0000000..70e809f @@ -93189,10 +92360,10 @@ index 0000000..70e809f +#endif diff --git a/arch/arm/mach-bcm2708/vc_support.c b/arch/arm/mach-bcm2708/vc_support.c new file mode 100755 -index 0000000..5cb1335 +index 0000000..0bc41c4 --- /dev/null +++ b/arch/arm/mach-bcm2708/vc_support.c -@@ -0,0 +1,319 @@ +@@ -0,0 +1,318 @@ +/* + * vc_support.c + * @@ -93511,15 +92682,14 @@ index 0000000..5cb1335 + return 1; + } +} -+ -- -1.8.1.6 +1.8.4 -From cbb8914064ed2273517a66fe6d479e9dcb7fa5f6 Mon Sep 17 00:00:00 2001 +From 20def2275a9ab4dcc3566769ea88a386c02dc849 Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 -Subject: [PATCH 052/113] lirc: added support for RaspberryPi GPIO +Subject: [PATCH 46/98] lirc: added support for RaspberryPi GPIO --- drivers/staging/media/lirc/Kconfig | 6 + @@ -94251,260 +93421,20 @@ index 0000000..96acab0 +module_param(debug, bool, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(debug, "Enable debugging messages"); -- -1.8.1.6 +1.8.4 -From d83a0f6019a8b6d047f6bb9e856c7181172a99c7 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Sun, 25 Nov 2012 18:28:09 +0000 -Subject: [PATCH 053/113] Allow mailbox driver to be called from user code - though ioctl - ---- - arch/arm/mach-bcm2708/include/mach/vcio.h | 33 +++++++ - arch/arm/mach-bcm2708/vcio.c | 137 +++++++++++++++++++++++++++++- - 2 files changed, 168 insertions(+), 2 deletions(-) - -diff --git a/arch/arm/mach-bcm2708/include/mach/vcio.h b/arch/arm/mach-bcm2708/include/mach/vcio.h -index 7dfd14e..b522ba9 100644 ---- a/arch/arm/mach-bcm2708/include/mach/vcio.h -+++ b/arch/arm/mach-bcm2708/include/mach/vcio.h -@@ -105,4 +105,37 @@ enum { - extern int /*rc*/ bcm_mailbox_write(unsigned chan, uint32_t data28); - extern int /*rc*/ bcm_mailbox_property(void *data, int size); - -+#include -+ -+/* -+ * The major device number. We can't rely on dynamic -+ * registration any more, because ioctls need to know -+ * it. -+ */ -+#define MAJOR_NUM 100 -+ -+/* -+ * Set the message of the device driver -+ */ -+#define IOCTL_MBOX_PROPERTY _IOWR(MAJOR_NUM, 0, char *) -+/* -+ * _IOWR means that we're creating an ioctl command -+ * number for passing information from a user process -+ * to the kernel module and from the kernel module to user process -+ * -+ * The first arguments, MAJOR_NUM, is the major device -+ * number we're using. -+ * -+ * The second argument is the number of the command -+ * (there could be several with different meanings). -+ * -+ * The third argument is the type we want to get from -+ * the process to the kernel. -+ */ -+ -+/* -+ * The name of the device file -+ */ -+#define DEVICE_FILE_NAME "char_dev" -+ - #endif -diff --git a/arch/arm/mach-bcm2708/vcio.c b/arch/arm/mach-bcm2708/vcio.c -index 468fdef..09b78b5 100644 ---- a/arch/arm/mach-bcm2708/vcio.c -+++ b/arch/arm/mach-bcm2708/vcio.c -@@ -37,6 +37,9 @@ - #include - #include - -+#include -+ -+ - #define DRIVER_NAME BCM_VCIO_DRIVER_NAME - - /* ---------------------------------------------------------------------- -@@ -216,6 +219,33 @@ static void dev_mbox_register(const char *dev_name, struct device *dev) - mbox_dev = dev; - } - -+static int mbox_copy_from_user(void *dst, const void *src, int size) -+{ -+ if ( (uint32_t)src < TASK_SIZE) -+ { -+ return copy_from_user(dst, src, size); -+ } -+ else -+ { -+ memcpy( dst, src, size ); -+ return 0; -+ } -+} -+ -+static int mbox_copy_to_user(void *dst, const void *src, int size) -+{ -+ if ( (uint32_t)dst < TASK_SIZE) -+ { -+ return copy_to_user(dst, src, size); -+ } -+ else -+ { -+ memcpy( dst, src, size ); -+ return 0; -+ } -+} -+ -+ - extern int bcm_mailbox_property(void *data, int size) - { - uint32_t success; -@@ -227,7 +257,7 @@ extern int bcm_mailbox_property(void *data, int size) - mem_kern = dma_alloc_coherent(NULL, PAGE_ALIGN(size), &mem_bus, GFP_ATOMIC); - if (mem_kern) { - /* create the message */ -- memcpy(mem_kern, data, size); -+ mbox_copy_from_user(mem_kern, data, size); - - /* send the message */ - wmb(); -@@ -238,7 +268,7 @@ extern int bcm_mailbox_property(void *data, int size) - if (s == 0) { - /* copy the response */ - rmb(); -- memcpy(data, mem_kern, size); -+ mbox_copy_to_user(data, mem_kern, size); - } - dma_free_coherent(NULL, PAGE_ALIGN(size), mem_kern, mem_bus); - } else { -@@ -254,6 +284,93 @@ extern int bcm_mailbox_property(void *data, int size) - * Platform Device for Mailbox - * -------------------------------------------------------------------- */ - -+/* -+ * Is the device open right now? Used to prevent -+ * concurent access into the same device -+ */ -+static int Device_Open = 0; -+ -+/* -+ * This is called whenever a process attempts to open the device file -+ */ -+static int device_open(struct inode *inode, struct file *file) -+{ -+ /* -+ * We don't want to talk to two processes at the same time -+ */ -+ if (Device_Open) -+ return -EBUSY; -+ -+ Device_Open++; -+ /* -+ * Initialize the message -+ */ -+ try_module_get(THIS_MODULE); -+ return 0; -+} -+ -+static int device_release(struct inode *inode, struct file *file) -+{ -+ /* -+ * We're now ready for our next caller -+ */ -+ Device_Open--; -+ -+ module_put(THIS_MODULE); -+ return 0; -+} -+ -+/* -+ * This function is called whenever a process tries to do an ioctl on our -+ * device file. We get two extra parameters (additional to the inode and file -+ * structures, which all device functions get): the number of the ioctl called -+ * and the parameter given to the ioctl function. -+ * -+ * If the ioctl is write or read/write (meaning output is returned to the -+ * calling process), the ioctl call returns the output of this function. -+ * -+ */ -+static long device_ioctl(struct file *file, /* see include/linux/fs.h */ -+ unsigned int ioctl_num, /* number and param for ioctl */ -+ unsigned long ioctl_param) -+{ -+ unsigned size; -+ /* -+ * Switch according to the ioctl called -+ */ -+ switch (ioctl_num) { -+ case IOCTL_MBOX_PROPERTY: -+ /* -+ * Receive a pointer to a message (in user space) and set that -+ * to be the device's message. Get the parameter given to -+ * ioctl by the process. -+ */ -+ mbox_copy_from_user(&size, (void *)ioctl_param, sizeof size); -+ return bcm_mailbox_property((void *)ioctl_param, size); -+ break; -+ default: -+ printk(KERN_ERR DRIVER_NAME "unknown ioctl: %d\n", ioctl_num); -+ return -EINVAL; -+ } -+ -+ return 0; -+} -+ -+/* Module Declarations */ -+ -+/* -+ * This structure will hold the functions to be called -+ * when a process does something to the device we -+ * created. Since a pointer to this structure is kept in -+ * the devices table, it can't be local to -+ * init_module. NULL is for unimplemented functios. -+ */ -+struct file_operations fops = { -+ .unlocked_ioctl = device_ioctl, -+ .open = device_open, -+ .release = device_release, /* a.k.a. close */ -+}; -+ - static int bcm_vcio_probe(struct platform_device *pdev) - { - int ret = 0; -@@ -286,6 +403,22 @@ static int bcm_vcio_probe(struct platform_device *pdev) - __io_address(ARM_0_MAIL0_RD)); - } - } -+ -+ if (ret == 0) { -+ /* -+ * Register the character device -+ */ -+ ret = register_chrdev(MAJOR_NUM, DEVICE_FILE_NAME, &fops); -+ -+ /* -+ * Negative values signify an error -+ */ -+ if (ret < 0) { -+ printk(KERN_ERR DRIVER_NAME -+ "Failed registering the character device %d\n", ret); -+ return ret; -+ } -+ } - return ret; - } - --- -1.8.1.6 - - -From b37195943149a1addd276900703eab170ce33055 Mon Sep 17 00:00:00 2001 +From f3c764b1a2ac492c762721e88e3ef8e1a4ab7b64 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 11 Dec 2012 18:23:03 +0000 -Subject: [PATCH 054/113] Default to dwc_otp.lpm_enable=0 +Subject: [PATCH 47/98] Default to dwc_otp.lpm_enable=0 --- drivers/usb/host/dwc_otg/dwc_otg_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_otg/dwc_otg_driver.c -index d353a9a..cea8fcb 100644 +index d58ebd7..c2bb596 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_driver.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c @@ -228,7 +228,7 @@ struct dwc_otg_driver_module_params { @@ -94517,13 +93447,13 @@ index d353a9a..cea8fcb 100644 .ahb_thr_ratio = -1, .power_down = -1, -- -1.8.1.6 +1.8.4 -From 4cc2022aca695d77259b686c9f75705e3f7263f0 Mon Sep 17 00:00:00 2001 +From 510c702cee5c8d99638af2967cdffeb15ee15291 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 11 Dec 2012 19:04:27 +0000 -Subject: [PATCH 055/113] Increase default coherent pool so vchiq starts up +Subject: [PATCH 48/98] Increase default coherent pool so vchiq starts up --- arch/arm/mach-bcm2708/bcm2708.c | 4 +--- @@ -94545,56 +93475,13 @@ index 9f456e9..87fd348 100644 static void __init board_reserve(void) -- -1.8.1.6 +1.8.4 -From 8db963b8d5be89e46676139848d4538ed552ed0b Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Mon, 7 Jan 2013 21:34:59 +0000 -Subject: [PATCH 056/113] Add mutex around bcm_mailbox_property function - ---- - arch/arm/mach-bcm2708/vcio.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/arch/arm/mach-bcm2708/vcio.c b/arch/arm/mach-bcm2708/vcio.c -index 09b78b5..599eb63 100644 ---- a/arch/arm/mach-bcm2708/vcio.c -+++ b/arch/arm/mach-bcm2708/vcio.c -@@ -245,7 +245,7 @@ static int mbox_copy_to_user(void *dst, const void *src, int size) - } - } - -- -+static DEFINE_MUTEX(mailbox_lock); - extern int bcm_mailbox_property(void *data, int size) - { - uint32_t success; -@@ -253,6 +253,7 @@ extern int bcm_mailbox_property(void *data, int size) - void *mem_kern; /* the memory address accessed from driver */ - int s = 0; - -+ mutex_lock(&mailbox_lock); - /* allocate some memory for the messages communicating with GPU */ - mem_kern = dma_alloc_coherent(NULL, PAGE_ALIGN(size), &mem_bus, GFP_ATOMIC); - if (mem_kern) { -@@ -276,6 +277,8 @@ extern int bcm_mailbox_property(void *data, int size) - } - if (s != 0) - printk(KERN_ERR DRIVER_NAME ": %s failed (%d)\n", __func__, s); -+ -+ mutex_unlock(&mailbox_lock); - return s; - } - EXPORT_SYMBOL_GPL(bcm_mailbox_property); --- -1.8.1.6 - - -From a2b04bdc07d4187f69a8987bec7747598cca6786 Mon Sep 17 00:00:00 2001 +From d778ff805f77c7c41b961ae5cee9cd726fc7e311 Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 9 Jan 2013 16:12:04 +0000 -Subject: [PATCH 057/113] dwc_otg: fix bug in dwc_otg_hcd.c resulting in silent +Subject: [PATCH 49/98] dwc_otg: fix bug in dwc_otg_hcd.c resulting in silent kernel memory corruption, escalating to OOPS under high USB load. --- @@ -94603,7 +93490,7 @@ Subject: [PATCH 057/113] dwc_otg: fix bug in dwc_otg_hcd.c resulting in silent 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -index 2b7945a..d5c94f4 100644 +index 7f610d5..9d30a59 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -500,8 +500,6 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_t * hcd, @@ -94616,7 +93503,7 @@ index 2b7945a..d5c94f4 100644 intr_mask.d32 = DWC_READ_REG32(&hcd->core_if->core_global_regs->gintmsk); if (!intr_mask.b.sofintr && retval == 0) { diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c -index e6b2a7b..b337e1b 100644 +index ebee73a..b3efaf4 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c @@ -946,6 +946,7 @@ int dwc_otg_hcd_qtd_add(dwc_otg_qtd_t * qtd, @@ -94628,13 +93515,13 @@ index e6b2a7b..b337e1b 100644 DWC_SPINUNLOCK_IRQRESTORE(hcd->lock, flags); -- -1.8.1.6 +1.8.4 -From a7247aee8bfa56a3c5bab4e13f832c4faf4c7ebd Mon Sep 17 00:00:00 2001 +From 043148c2a8cad1331d569f9fefd4c9b640e4e2cb Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 21 Jan 2013 23:03:53 +0000 -Subject: [PATCH 058/113] Return error value from bcm2708_setup_state. Thanks +Subject: [PATCH 50/98] Return error value from bcm2708_setup_state. Thanks notro --- @@ -94654,13 +93541,13 @@ index 9f1580e..8513704 100644 dev_dbg(&spi->dev, -- -1.8.1.6 +1.8.4 -From dce892d144e982b53af979489e0034ba677e8334 Mon Sep 17 00:00:00 2001 +From ed10330b78520fb29709da4cc11c548ad152bcb4 Mon Sep 17 00:00:00 2001 From: Kamal Mostafa Date: Mon, 22 Oct 2012 15:52:44 -0700 -Subject: [PATCH 059/113] spi/spi-bcm2708: respect per-transfer SPI clock +Subject: [PATCH 51/98] spi/spi-bcm2708: respect per-transfer SPI clock speed_hz value The bcm2708 SPI driver's bcm2708_process_transfer() was ignoring the @@ -94702,20 +93589,20 @@ index 8513704..b74aa32 100644 if (ret) return ret; -- -1.8.1.6 +1.8.4 -From f9f3d616a9189f682c4e5b7d08db4952e64e5bf7 Mon Sep 17 00:00:00 2001 +From 3db63bd3b35cb20f6ff7c64b82e6095ca128e334 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:51:55 +0100 -Subject: [PATCH 060/113] Add hwrng (hardware random number generator) driver +Subject: [PATCH 52/98] Add hwrng (hardware random number generator) driver --- arch/arm/mach-bcm2708/include/mach/platform.h | 1 + - drivers/char/hw_random/Kconfig | 12 +++ + drivers/char/hw_random/Kconfig | 11 +++ drivers/char/hw_random/Makefile | 1 + drivers/char/hw_random/bcm2708-rng.c | 117 ++++++++++++++++++++++++++ - 4 files changed, 131 insertions(+) + 4 files changed, 130 insertions(+) create mode 100755 drivers/char/hw_random/bcm2708-rng.c diff --git a/arch/arm/mach-bcm2708/include/mach/platform.h b/arch/arm/mach-bcm2708/include/mach/platform.h @@ -94731,10 +93618,10 @@ index 89e72d1..992a630 100644 #define UART0_BASE (BCM2708_PERI_BASE + 0x201000) /* Uart 0 */ #define MMCI0_BASE (BCM2708_PERI_BASE + 0x202000) /* MMC interface */ diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig -index 2f9dbf7..d725a53 100644 +index 40a8654..2e485d71 100644 --- a/drivers/char/hw_random/Kconfig +++ b/drivers/char/hw_random/Kconfig -@@ -314,3 +314,15 @@ config HW_RANDOM_TPM +@@ -314,3 +314,14 @@ config HW_RANDOM_TPM module will be called tpm-rng. If unsure, say Y. @@ -94749,7 +93636,6 @@ index 2f9dbf7..d725a53 100644 + module will be called bcm2708-rng. + + If unsure, say N. -+ diff --git a/drivers/char/hw_random/Makefile b/drivers/char/hw_random/Makefile index bed467c..18fc4d4 100644 --- a/drivers/char/hw_random/Makefile @@ -94883,115 +93769,115 @@ index 0000000..1ffa7d7 +MODULE_DESCRIPTION("BCM2708 H/W Random Number Generator (RNG) driver"); +MODULE_LICENSE("GPL and additional rights"); -- -1.8.1.6 +1.8.4 -From bcacc6fdab7df493ac55f76e801672f62bb6f767 Mon Sep 17 00:00:00 2001 +From 6cc39a2058056ffb7e3d3eaf8b9b6625ed320879 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 7 Feb 2013 17:04:13 +0000 -Subject: [PATCH 061/113] Add missing newlines to log messages +Subject: [PATCH 53/98] Add missing newlines to log messages --- drivers/cpufreq/bcm2835-cpufreq.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/cpufreq/bcm2835-cpufreq.c b/drivers/cpufreq/bcm2835-cpufreq.c -index 6ff1edb..5a19212 100755 +index f9b976c..397fed0 100755 --- a/drivers/cpufreq/bcm2835-cpufreq.c +++ b/drivers/cpufreq/bcm2835-cpufreq.c @@ -91,7 +91,7 @@ static uint32_t bcm2835_cpufreq_set_clock(int cur_rate, int arm_rate) - if (s == 0 && (msg.request_code & 0x80000000)) - actual_rate = msg.tag.val/1000; - -- print_debug("Setting new frequency = %d -> %d (actual %d)", cur_rate, arm_rate, actual_rate); -+ print_debug("Setting new frequency = %d -> %d (actual %d)\n", cur_rate, arm_rate, actual_rate); - return actual_rate; - } - + if (s == 0 && (msg.request_code & 0x80000000)) + actual_rate = msg.tag.val/1000; + +- print_debug("Setting new frequency = %d -> %d (actual %d)", cur_rate, arm_rate, actual_rate); ++ print_debug("Setting new frequency = %d -> %d (actual %d)\n", cur_rate, arm_rate, actual_rate); + return actual_rate; + } + @@ -117,7 +117,7 @@ static uint32_t bcm2835_cpufreq_get_clock(int tag) - if (s == 0 && (msg.request_code & 0x80000000)) - arm_rate = msg.tag.val/1000; - -- print_debug("%s frequency = %d", -+ print_debug("%s frequency = %d\n", - tag == VCMSG_GET_CLOCK_RATE ? "Current": - tag == VCMSG_GET_MIN_CLOCK ? "Min": - tag == VCMSG_GET_MAX_CLOCK ? "Max": + if (s == 0 && (msg.request_code & 0x80000000)) + arm_rate = msg.tag.val/1000; + +- print_debug("%s frequency = %d", ++ print_debug("%s frequency = %d\n", + tag == VCMSG_GET_CLOCK_RATE ? "Current": + tag == VCMSG_GET_MIN_CLOCK ? "Min": + tag == VCMSG_GET_MAX_CLOCK ? "Max": @@ -133,7 +133,7 @@ static uint32_t bcm2835_cpufreq_get_clock(int tag) - */ - static int __init bcm2835_cpufreq_module_init(void) - { -- print_debug("IN"); -+ print_debug("IN\n"); - return cpufreq_register_driver(&bcm2835_cpufreq_driver); - } - + */ + static int __init bcm2835_cpufreq_module_init(void) + { +- print_debug("IN"); ++ print_debug("IN\n"); + return cpufreq_register_driver(&bcm2835_cpufreq_driver); + } + @@ -144,7 +144,7 @@ static int __init bcm2835_cpufreq_module_init(void) - */ - static void __exit bcm2835_cpufreq_module_exit(void) - { -- print_debug("IN"); -+ print_debug("IN\n"); - cpufreq_unregister_driver(&bcm2835_cpufreq_driver); - return; - } + */ + static void __exit bcm2835_cpufreq_module_exit(void) + { +- print_debug("IN"); ++ print_debug("IN\n"); + cpufreq_unregister_driver(&bcm2835_cpufreq_driver); + return; + } @@ -164,7 +164,7 @@ static int bcm2835_cpufreq_driver_init(struct cpufreq_policy *policy) - policy->max = policy->cpuinfo.max_freq = bcm2835_cpufreq_get_clock(VCMSG_GET_MAX_CLOCK); - policy->cur = bcm2835_cpufreq_get_clock(VCMSG_GET_CLOCK_RATE); - -- print_info("min=%d max=%d cur=%d", policy->min, policy->max, policy->cur); -+ print_info("min=%d max=%d cur=%d\n", policy->min, policy->max, policy->cur); - return 0; - } - + policy->max = policy->cpuinfo.max_freq = bcm2835_cpufreq_get_clock(VCMSG_GET_MAX_CLOCK); + policy->cur = bcm2835_cpufreq_get_clock(VCMSG_GET_CLOCK_RATE); + +- print_info("min=%d max=%d cur=%d", policy->min, policy->max, policy->cur); ++ print_info("min=%d max=%d cur=%d\n", policy->min, policy->max, policy->cur); + return 0; + } + @@ -178,7 +178,7 @@ static int bcm2835_cpufreq_driver_target(struct cpufreq_policy *policy, unsigned - { - unsigned int target = target_freq; - unsigned int cur = policy->cur; -- print_debug("%s: min=%d max=%d cur=%d target=%d",policy->governor->name,policy->min,policy->max,policy->cur,target_freq); -+ print_debug("%s: min=%d max=%d cur=%d target=%d\n",policy->governor->name,policy->min,policy->max,policy->cur,target_freq); - - /* if we are above min and using ondemand, then just use max */ - if (strcmp("ondemand", policy->governor->name)==0 && target > policy->min) + { + unsigned int target = target_freq; + unsigned int cur = policy->cur; +- print_debug("%s: min=%d max=%d cur=%d target=%d",policy->governor->name,policy->min,policy->max,policy->cur,target_freq); ++ print_debug("%s: min=%d max=%d cur=%d target=%d\n",policy->governor->name,policy->min,policy->max,policy->cur,target_freq); + + /* if we are above min and using ondemand, then just use max */ + if (strcmp("ondemand", policy->governor->name)==0 && target > policy->min) @@ -192,18 +192,18 @@ static int bcm2835_cpufreq_driver_target(struct cpufreq_policy *policy, unsigned - - if (!policy->cur) - { -- print_err("Error occurred setting a new frequency (%d)!", target); -+ print_err("Error occurred setting a new frequency (%d)!\n", target); - policy->cur = bcm2835_cpufreq_get_clock(VCMSG_GET_CLOCK_RATE); - return -EINVAL; - } -- print_debug("Freq %d->%d (min=%d max=%d target=%d request=%d)", cur, policy->cur, policy->min, policy->max, target_freq, target); -+ print_debug("Freq %d->%d (min=%d max=%d target=%d request=%d)\n", cur, policy->cur, policy->min, policy->max, target_freq, target); - return 0; - } - - static unsigned int bcm2835_cpufreq_driver_get(unsigned int cpu) - { - unsigned int actual_rate = bcm2835_cpufreq_get_clock(VCMSG_GET_CLOCK_RATE); -- print_debug("%d", actual_rate); -+ print_debug("cpu=%d\n", actual_rate); - return actual_rate; - } - + + if (!policy->cur) + { +- print_err("Error occurred setting a new frequency (%d)!", target); ++ print_err("Error occurred setting a new frequency (%d)!\n", target); + policy->cur = bcm2835_cpufreq_get_clock(VCMSG_GET_CLOCK_RATE); + return -EINVAL; + } +- print_debug("Freq %d->%d (min=%d max=%d target=%d request=%d)", cur, policy->cur, policy->min, policy->max, target_freq, target); ++ print_debug("Freq %d->%d (min=%d max=%d target=%d request=%d)\n", cur, policy->cur, policy->min, policy->max, target_freq, target); + return 0; + } + + static unsigned int bcm2835_cpufreq_driver_get(unsigned int cpu) + { + unsigned int actual_rate = bcm2835_cpufreq_get_clock(VCMSG_GET_CLOCK_RATE); +- print_debug("%d", actual_rate); ++ print_debug("cpu=%d\n", actual_rate); + return actual_rate; + } + @@ -215,7 +215,7 @@ static unsigned int bcm2835_cpufreq_driver_get(unsigned int cpu) - - static int bcm2835_cpufreq_driver_verify(struct cpufreq_policy *policy) - { -- print_info("switching to governor %s", policy->governor->name); -+ print_info("switching to governor %s\n", policy->governor->name); - return 0; - } - + + static int bcm2835_cpufreq_driver_verify(struct cpufreq_policy *policy) + { +- print_info("switching to governor %s", policy->governor->name); ++ print_info("switching to governor %s\n", policy->governor->name); + return 0; + } + -- -1.8.1.6 +1.8.4 -From 7ad225340ad6ff96af2fdb53fead00b88b5b542a Mon Sep 17 00:00:00 2001 +From 0171249253522fa6cf702cdd2f1f2cc3502e94b9 Mon Sep 17 00:00:00 2001 From: Technion Date: Mon, 11 Feb 2013 22:08:53 +1100 -Subject: [PATCH 062/113] Changed wording on logging. Previously, we received +Subject: [PATCH 54/98] Changed wording on logging. Previously, we received errors like this: mmc0: could read SD Status register (SSR) at the 3th attempt A more sensible response is now returned. A typo also fixed in comments. @@ -95001,7 +93887,7 @@ Subject: [PATCH 062/113] Changed wording on logging. Previously, we received 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c -index 1ee6cf3..90228f9 100644 +index 84288a9..d144d66 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -238,7 +238,7 @@ static int mmc_read_scr(struct mmc_card *card) @@ -95023,13 +93909,13 @@ index 1ee6cf3..90228f9 100644 for (i = 0; i < 16; i++) -- -1.8.1.6 +1.8.4 -From c512532d50bfb31f942c20aa57c51d2486ee770e Mon Sep 17 00:00:00 2001 +From b320a9e0cd696edaba7613662f7454998cc22bfc Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 15 Feb 2013 22:36:47 +0000 -Subject: [PATCH 063/113] dwc_otg: Fix unsafe access of QTD during URB enqueue +Subject: [PATCH 55/98] dwc_otg: Fix unsafe access of QTD during URB enqueue In dwc_otg_hcd_urb_enqueue during qtd creation, it was possible that the transaction could complete almost immediately after the qtd was assigned @@ -95046,7 +93932,7 @@ that had no periodic endpoints (e.g. USB pendrive or some wlan devices). 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -index d5c94f4..e653d84 100644 +index 9d30a59..35d03d1 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -462,6 +462,8 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_t * hcd, @@ -95100,7 +93986,7 @@ index d5c94f4..e653d84 100644 } diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c -index b337e1b..b3e6e52 100644 +index b3efaf4..1554be5 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c @@ -937,7 +937,7 @@ int dwc_otg_hcd_qtd_add(dwc_otg_qtd_t * qtd, @@ -95113,13 +93999,13 @@ index b337e1b..b3e6e52 100644 } } -- -1.8.1.6 +1.8.4 -From b0e6cda506f41eb9d9bcd4e5dc638549ac82869a Mon Sep 17 00:00:00 2001 +From 408a58e3132f49bc38d2f1e3dc488aa21d8da1af Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 15 Feb 2013 22:38:40 +0000 -Subject: [PATCH 064/113] dwc_otg: Fix incorrect URB allocation error handling +Subject: [PATCH 56/98] dwc_otg: Fix incorrect URB allocation error handling If the memory allocation for a dwc_otg_urb failed, the kernel would OOPS because for some reason a member of the *unallocated* struct was set to @@ -95129,7 +94015,7 @@ zero. Error handling changed to fail correctly. 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -index e653d84..fcec97f 100644 +index 35d03d1..6fe30e3 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -3136,17 +3136,13 @@ dwc_otg_hcd_urb_t *dwc_otg_hcd_urb_alloc(dwc_otg_hcd_t * hcd, @@ -95157,13 +94043,13 @@ index e653d84..fcec97f 100644 } -- -1.8.1.6 +1.8.4 -From d692b0b337cc5e093c29a3268a3c53366e4106ac Mon Sep 17 00:00:00 2001 +From 52953b25d6d738c7681395b6f1df9228fc026241 Mon Sep 17 00:00:00 2001 From: pjennings Date: Wed, 20 Feb 2013 17:51:43 -0600 -Subject: [PATCH 065/113] Added inverted transmitter support +Subject: [PATCH 57/98] Added inverted transmitter support --- drivers/staging/media/lirc/lirc_rpi.c | 17 +++++++++++------ @@ -95241,13 +94127,13 @@ index 96acab0..5bb0dfe 100644 module_param(debug, bool, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(debug, "Enable debugging messages"); -- -1.8.1.6 +1.8.4 -From 33d55fa26325a0165f4b2fbfc795896fde043982 Mon Sep 17 00:00:00 2001 +From e469227a5d9315971fd94bf646166305c647cca4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 24 Feb 2013 16:30:57 +0000 -Subject: [PATCH 066/113] Add retry on error and tidy of temperature driver +Subject: [PATCH 58/98] Add retry on error and tidy of temperature driver --- drivers/thermal/bcm2835-thermal.c | 78 ++++++++++++++------------------------- @@ -95371,14 +94257,14 @@ index 3f9a733..85fceb5 100644 static int bcm2835_get_trip_type(struct thermal_zone_device * thermal_dev, int trip_num, enum thermal_trip_type *trip_type) { -- -1.8.1.6 +1.8.4 -From 0b6fc3c07e41feb561e19075fa1f4dd263d66104 Mon Sep 17 00:00:00 2001 +From 098816e91e648d607ae2b41ee7d7141e65d687ce Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 28 Feb 2013 16:52:51 +0000 -Subject: [PATCH 067/113] dwc_otg: fix potential use-after-free case in - interrupt handler +Subject: [PATCH 59/98] dwc_otg: fix potential use-after-free case in interrupt + handler If a transaction had previously aborted, certain interrupts are enabled to track error counts and reset where necessary. On IN @@ -95392,7 +94278,7 @@ the QTD memory space with a 1-byte length being overwritten to 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -index e8c91e7..0c81a64 100644 +index 1a23d4b..7af455d 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -2223,7 +2223,8 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc_otg_hcd_t * dwc_otg_hcd, uint32_t num) @@ -95406,14 +94292,14 @@ index e8c91e7..0c81a64 100644 if (hcint.b.nyet) { retval |= handle_hc_nyet_intr(dwc_otg_hcd, hc, hc_regs, qtd); -- -1.8.1.6 +1.8.4 -From e68c54361fc71f822d24336ad2affe6a4a6e6cb6 Mon Sep 17 00:00:00 2001 +From 7183dceb7d585cf4f7afc430b04fefd244dd943e Mon Sep 17 00:00:00 2001 From: P33M Date: Sun, 3 Mar 2013 14:45:53 +0000 -Subject: [PATCH 068/113] dwc_otg: add handling of SPLIT transaction data - toggle errors +Subject: [PATCH 60/98] dwc_otg: add handling of SPLIT transaction data toggle + errors Previously a data toggle error on packets from a USB1.1 device behind a TT would result in the Pi locking up as the driver never handled @@ -95425,7 +94311,7 @@ for devices that have a broken initial toggle state (FT8U232/FT232BM). 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -index 0c81a64..16e8c6c 100644 +index 7af455d..a27dacd 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -1921,13 +1921,20 @@ static int32_t handle_hc_datatglerr_intr(dwc_otg_hcd_t * hcd, @@ -95464,13 +94350,13 @@ index 0c81a64..16e8c6c 100644 if (hcint.b.nyet) { /* -- -1.8.1.6 +1.8.4 -From ece0467d1974612055aeb8f779eb8a23b89ad9bc Mon Sep 17 00:00:00 2001 +From ff6407232b5a82b64b5bc523264aff3e31d3d04e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 21:14:28 +0100 -Subject: [PATCH 069/113] Add bitbanging pullups, use them for w1-gpio +Subject: [PATCH 61/98] Add bitbanging pullups, use them for w1-gpio Allows parasite power to work, uses module option pullup=1 --- @@ -95481,10 +94367,10 @@ Allows parasite power to work, uses module option pullup=1 4 files changed, 50 insertions(+), 10 deletions(-) diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c -index 46d9701..f615f80 100644 +index f54ece2..217bddb 100644 --- a/drivers/w1/masters/w1-gpio.c +++ b/drivers/w1/masters/w1-gpio.c -@@ -23,6 +23,9 @@ +@@ -22,6 +22,9 @@ #include "../w1.h" #include "../w1_int.h" @@ -95494,7 +94380,7 @@ index 46d9701..f615f80 100644 static void w1_gpio_write_bit_dir(void *data, u8 bit) { struct w1_gpio_platform_data *pdata = data; -@@ -47,6 +50,16 @@ static u8 w1_gpio_read_bit(void *data) +@@ -46,6 +49,16 @@ static u8 w1_gpio_read_bit(void *data) return gpio_get_value(pdata->pin) ? 1 : 0; } @@ -95511,7 +94397,7 @@ index 46d9701..f615f80 100644 #if defined(CONFIG_OF) static struct of_device_id w1_gpio_dt_ids[] = { { .compatible = "w1-gpio" }, -@@ -133,6 +146,13 @@ static int w1_gpio_probe(struct platform_device *pdev) +@@ -127,6 +140,13 @@ static int w1_gpio_probe(struct platform_device *pdev) master->write_bit = w1_gpio_write_bit_dir; } @@ -95606,13 +94492,13 @@ index e10acc2..667fdd5 100644 } } -- -1.8.1.6 +1.8.4 -From d760ca2b00179795065bf4632550b299a50ecb11 Mon Sep 17 00:00:00 2001 +From 7263e590695cecb72c1c16eeab2fdebf86fe9831 Mon Sep 17 00:00:00 2001 From: notro Date: Sat, 26 Jan 2013 20:38:03 +0100 -Subject: [PATCH 070/113] spi-bcm2708: add 9-bit support using LoSSI mode +Subject: [PATCH 62/98] spi-bcm2708: add 9-bit support using LoSSI mode --- drivers/spi/spi-bcm2708.c | 30 ++++++++++++++++++++++++++++-- @@ -95679,13 +94565,13 @@ index b74aa32..abaa5a6 100644 return ret; -- -1.8.1.6 +1.8.4 -From 9179356d935522018b105ba6a08771ee6bb48c9b Mon Sep 17 00:00:00 2001 +From fc5ba144c17d0de46e37f82db0e55884c9d2912d Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 21 Mar 2013 19:36:17 +0000 -Subject: [PATCH 071/113] dwc_otg: implement tasklet for returning URBs to +Subject: [PATCH 63/98] dwc_otg: implement tasklet for returning URBs to usbcore hcd layer The dwc_otg driver interrupt handler for transfer completion will spend @@ -95710,7 +94596,7 @@ devices are active at once. 6 files changed, 73 insertions(+), 17 deletions(-) diff --git a/drivers/usb/host/dwc_common_port/dwc_common_linux.c b/drivers/usb/host/dwc_common_port/dwc_common_linux.c -index f00a9ff..6814e51 100644 +index 440bcfc..1788812 100644 --- a/drivers/usb/host/dwc_common_port/dwc_common_linux.c +++ b/drivers/usb/host/dwc_common_port/dwc_common_linux.c @@ -991,6 +991,11 @@ void DWC_TASK_SCHEDULE(dwc_tasklet_t *task) @@ -95755,7 +94641,7 @@ index 89cc325..4ce560d 100644 /* * Tail queue functions. diff --git a/drivers/usb/host/dwc_common_port/dwc_os.h b/drivers/usb/host/dwc_common_port/dwc_os.h -index 308ddd5..8eb24ea 100644 +index 9ffe929..09ed244 100644 --- a/drivers/usb/host/dwc_common_port/dwc_os.h +++ b/drivers/usb/host/dwc_common_port/dwc_os.h @@ -981,6 +981,8 @@ extern void DWC_WORKQ_SCHEDULE_DELAYED(dwc_workq_t *workq, dwc_work_callback_t c @@ -95768,7 +94654,7 @@ index 308ddd5..8eb24ea 100644 /** @name Timer * diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -index fcec97f..91eefecd 100644 +index 6fe30e3..533b17d 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -40,6 +40,9 @@ @@ -95841,7 +94727,7 @@ index fcec97f..91eefecd 100644 if (hcd->core_if->power_down == 2) { /* Initialize Power on timer for Host power up in case hibernation */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h -index 45e44ea..0493dbf 100644 +index 0827b19..0ba7558 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h @@ -374,6 +374,13 @@ static inline void dwc_otg_hcd_fill_pipe(struct dwc_otg_hcd_pipe_info *pipe, @@ -95869,7 +94755,7 @@ index 45e44ea..0493dbf 100644 dwc_spinlock_t *lock; dwc_spinlock_t *channel_lock; diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c -index 9702f81..7bb133a 100644 +index 2b4a14e..39787e3 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c @@ -271,7 +271,7 @@ static int _complete(dwc_otg_hcd_t * hcd, void *urb_handle, @@ -95924,39 +94810,13 @@ index 9702f81..7bb133a 100644 } -- -1.8.1.6 +1.8.4 -From 7315208ea871604a45fc6bf677c75938baa49262 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Tue, 16 Apr 2013 15:36:01 +0100 -Subject: [PATCH 073/113] Add v6wbi_flush_kern_tlb_range to allow zsmalloc to - be built as a module - ---- - arch/arm/kernel/armksyms.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c -index 60d3b73..cba4d28 100644 ---- a/arch/arm/kernel/armksyms.c -+++ b/arch/arm/kernel/armksyms.c -@@ -156,3 +156,7 @@ - #ifdef CONFIG_ARM_PATCH_PHYS_VIRT - EXPORT_SYMBOL(__pv_phys_offset); - #endif -+ -+extern void v6wbi_flush_kern_tlb_range(void); -+EXPORT_SYMBOL(v6wbi_flush_kern_tlb_range); -+ --- -1.8.1.6 - - -From 7456280527cb3c4686be43c0e18821869a5bf572 Mon Sep 17 00:00:00 2001 +From 98434c9fee536931b9286c5dd52c271b58130d72 Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 22 Apr 2013 00:08:36 +0100 -Subject: [PATCH 074/113] dwc_otg: fix NAK holdoff and allow on split +Subject: [PATCH 65/98] dwc_otg: fix NAK holdoff and allow on split transactions only This corrects a bug where if a single active non-periodic endpoint @@ -95974,7 +94834,7 @@ only split transactions get held off. 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -index 91eefecd..eaa8f38 100644 +index 533b17d..73f7643 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -46,7 +46,7 @@ @@ -96023,13 +94883,13 @@ index 91eefecd..eaa8f38 100644 DWC_SPINLOCK_IRQSAVE(channel_lock, &flags); if (hcd->available_host_channels < 1) { -- -1.8.1.6 +1.8.4 -From 63e843506d0027823f926dd003f0ef541db13cf4 Mon Sep 17 00:00:00 2001 +From 528ac5e9e0e149d5d64648c6b03aa14726b0d8aa Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 26 Apr 2013 10:08:31 -0700 -Subject: [PATCH 075/113] Merge pull request #286 from +Subject: [PATCH 66/98] Merge pull request #286 from martinezjavier/rpi-3.6.y-dev add mmap support and some cleanups to bcm2835 ALSA driver @@ -96041,7 +94901,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver 4 files changed, 124 insertions(+), 70 deletions(-) diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c -index 4206b7e..21e435b 100755 +index ef775a4..7e8b8d9 100755 --- a/sound/arm/bcm2835-pcm.c +++ b/sound/arm/bcm2835-pcm.c @@ -19,7 +19,8 @@ @@ -96156,7 +95016,7 @@ index 4206b7e..21e435b 100755 /* create a pcm device */ diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c -index 9ecb2d6..169d899 100755 +index 9801410..4013d83 100755 --- a/sound/arm/bcm2835-vchiq.c +++ b/sound/arm/bcm2835-vchiq.c @@ -27,6 +27,7 @@ @@ -96368,7 +95228,7 @@ index 9ecb2d6..169d899 100755 VC_AUDIO_MSG_T m; AUDIO_INSTANCE_T *instance = alsa_stream->instance; diff --git a/sound/arm/bcm2835.c b/sound/arm/bcm2835.c -index e5ac894..d5ad830 100755 +index 317e7d9..e2047a7 100755 --- a/sound/arm/bcm2835.c +++ b/sound/arm/bcm2835.c @@ -110,20 +110,20 @@ static int snd_bcm2835_alsa_probe(struct platform_device *pdev) @@ -96487,7 +95347,7 @@ index e5ac894..d5ad830 100755 } diff --git a/sound/arm/bcm2835.h b/sound/arm/bcm2835.h -index b966e28..08c763d 100755 +index 080bd5c..36afee3 100755 --- a/sound/arm/bcm2835.h +++ b/sound/arm/bcm2835.h @@ -23,6 +23,7 @@ @@ -96507,232 +95367,13 @@ index b966e28..08c763d 100755 struct semaphore buffers_update_sem; struct semaphore control_sem; -- -1.8.1.6 +1.8.4 -From 3201bce360adb5c8345ad98a1b082e6f594175e0 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Tue, 7 May 2013 22:20:24 +0100 -Subject: [PATCH 076/113] Add quick config. - -This is designed for quick compiling when developing. -No modules are needed and it includes all Pi specific drivers ---- - arch/arm/configs/bcmrpi_quick_defconfig | 197 ++++++++++++++++++++++++++++++++ - 1 file changed, 197 insertions(+) - create mode 100644 arch/arm/configs/bcmrpi_quick_defconfig - -diff --git a/arch/arm/configs/bcmrpi_quick_defconfig b/arch/arm/configs/bcmrpi_quick_defconfig -new file mode 100644 -index 0000000..e5efe75 ---- /dev/null -+++ b/arch/arm/configs/bcmrpi_quick_defconfig -@@ -0,0 +1,197 @@ -+# CONFIG_ARM_PATCH_PHYS_VIRT is not set -+CONFIG_LOCALVERSION="-quick" -+# CONFIG_LOCALVERSION_AUTO is not set -+# CONFIG_SWAP is not set -+CONFIG_SYSVIPC=y -+CONFIG_POSIX_MQUEUE=y -+CONFIG_NO_HZ=y -+CONFIG_HIGH_RES_TIMERS=y -+CONFIG_IKCONFIG=y -+CONFIG_IKCONFIG_PROC=y -+CONFIG_KALLSYMS_ALL=y -+CONFIG_EMBEDDED=y -+CONFIG_PERF_EVENTS=y -+# CONFIG_COMPAT_BRK is not set -+CONFIG_SLAB=y -+CONFIG_MODULES=y -+CONFIG_MODULE_UNLOAD=y -+CONFIG_MODVERSIONS=y -+CONFIG_MODULE_SRCVERSION_ALL=y -+# CONFIG_BLK_DEV_BSG is not set -+CONFIG_ARCH_BCM2708=y -+CONFIG_PREEMPT=y -+CONFIG_AEABI=y -+CONFIG_UACCESS_WITH_MEMCPY=y -+CONFIG_ZBOOT_ROM_TEXT=0x0 -+CONFIG_ZBOOT_ROM_BSS=0x0 -+CONFIG_CMDLINE="dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" -+CONFIG_CPU_FREQ=y -+CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y -+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -+CONFIG_CPU_FREQ_GOV_USERSPACE=y -+CONFIG_CPU_FREQ_GOV_ONDEMAND=y -+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -+CONFIG_CPU_IDLE=y -+CONFIG_VFP=y -+CONFIG_BINFMT_MISC=y -+CONFIG_NET=y -+CONFIG_PACKET=y -+CONFIG_UNIX=y -+CONFIG_INET=y -+CONFIG_IP_MULTICAST=y -+CONFIG_IP_PNP=y -+CONFIG_IP_PNP_DHCP=y -+CONFIG_IP_PNP_RARP=y -+CONFIG_SYN_COOKIES=y -+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -+# CONFIG_INET_XFRM_MODE_TUNNEL is not set -+# CONFIG_INET_XFRM_MODE_BEET is not set -+# CONFIG_INET_LRO is not set -+# CONFIG_INET_DIAG is not set -+# CONFIG_IPV6 is not set -+# CONFIG_WIRELESS is not set -+CONFIG_DEVTMPFS=y -+CONFIG_DEVTMPFS_MOUNT=y -+CONFIG_BLK_DEV_LOOP=y -+CONFIG_BLK_DEV_RAM=y -+CONFIG_SCSI=y -+# CONFIG_SCSI_PROC_FS is not set -+# CONFIG_SCSI_LOWLEVEL is not set -+CONFIG_NETDEVICES=y -+# CONFIG_NET_VENDOR_BROADCOM is not set -+# CONFIG_NET_VENDOR_CIRRUS is not set -+# CONFIG_NET_VENDOR_FARADAY is not set -+# CONFIG_NET_VENDOR_INTEL is not set -+# CONFIG_NET_VENDOR_MARVELL is not set -+# CONFIG_NET_VENDOR_MICREL is not set -+# CONFIG_NET_VENDOR_NATSEMI is not set -+# CONFIG_NET_VENDOR_SEEQ is not set -+# CONFIG_NET_VENDOR_STMICRO is not set -+# CONFIG_NET_VENDOR_WIZNET is not set -+CONFIG_USB_USBNET=y -+# CONFIG_USB_NET_AX8817X is not set -+# CONFIG_USB_NET_CDCETHER is not set -+# CONFIG_USB_NET_CDC_NCM is not set -+CONFIG_USB_NET_SMSC95XX=y -+# CONFIG_USB_NET_NET1080 is not set -+# CONFIG_USB_NET_CDC_SUBSET is not set -+# CONFIG_USB_NET_ZAURUS is not set -+# CONFIG_WLAN is not set -+# CONFIG_INPUT_MOUSEDEV is not set -+CONFIG_INPUT_EVDEV=y -+# CONFIG_INPUT_KEYBOARD is not set -+# CONFIG_INPUT_MOUSE is not set -+# CONFIG_SERIO is not set -+CONFIG_VT_HW_CONSOLE_BINDING=y -+# CONFIG_LEGACY_PTYS is not set -+# CONFIG_DEVKMEM is not set -+CONFIG_SERIAL_AMBA_PL011=y -+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -+CONFIG_TTY_PRINTK=y -+CONFIG_HW_RANDOM=y -+CONFIG_HW_RANDOM_BCM2708=y -+CONFIG_RAW_DRIVER=y -+CONFIG_THERMAL=y -+CONFIG_THERMAL_BCM2835=y -+CONFIG_WATCHDOG=y -+CONFIG_BCM2708_WDT=y -+CONFIG_REGULATOR=y -+CONFIG_REGULATOR_DEBUG=y -+CONFIG_REGULATOR_FIXED_VOLTAGE=y -+CONFIG_REGULATOR_VIRTUAL_CONSUMER=y -+CONFIG_REGULATOR_USERSPACE_CONSUMER=y -+CONFIG_FB=y -+CONFIG_FB_BCM2708=y -+CONFIG_FRAMEBUFFER_CONSOLE=y -+CONFIG_LOGO=y -+# CONFIG_LOGO_LINUX_MONO is not set -+# CONFIG_LOGO_LINUX_VGA16 is not set -+CONFIG_SOUND=y -+CONFIG_SND=y -+CONFIG_SND_BCM2835=y -+# CONFIG_SND_USB is not set -+CONFIG_USB=y -+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -+CONFIG_USB_DWCOTG=y -+CONFIG_MMC=y -+CONFIG_MMC_SDHCI=y -+CONFIG_MMC_SDHCI_PLTFM=y -+CONFIG_MMC_SDHCI_BCM2708=y -+CONFIG_MMC_SDHCI_BCM2708_DMA=y -+CONFIG_NEW_LEDS=y -+CONFIG_LEDS_CLASS=y -+CONFIG_LEDS_TRIGGERS=y -+# CONFIG_IOMMU_SUPPORT is not set -+CONFIG_EXT4_FS=y -+CONFIG_EXT4_FS_POSIX_ACL=y -+CONFIG_EXT4_FS_SECURITY=y -+CONFIG_AUTOFS4_FS=y -+CONFIG_FSCACHE=y -+CONFIG_CACHEFILES=y -+CONFIG_MSDOS_FS=y -+CONFIG_VFAT_FS=y -+CONFIG_FAT_DEFAULT_IOCHARSET="ascii" -+CONFIG_TMPFS=y -+CONFIG_TMPFS_POSIX_ACL=y -+CONFIG_CONFIGFS_FS=y -+# CONFIG_MISC_FILESYSTEMS is not set -+CONFIG_NFS_FS=y -+CONFIG_NFS_V3_ACL=y -+CONFIG_NFS_V4=y -+CONFIG_ROOT_NFS=y -+CONFIG_NFS_FSCACHE=y -+CONFIG_NLS_DEFAULT="utf8" -+CONFIG_NLS_CODEPAGE_437=y -+CONFIG_NLS_CODEPAGE_737=y -+CONFIG_NLS_CODEPAGE_775=y -+CONFIG_NLS_CODEPAGE_850=y -+CONFIG_NLS_CODEPAGE_852=y -+CONFIG_NLS_CODEPAGE_855=y -+CONFIG_NLS_CODEPAGE_857=y -+CONFIG_NLS_CODEPAGE_860=y -+CONFIG_NLS_CODEPAGE_861=y -+CONFIG_NLS_CODEPAGE_862=y -+CONFIG_NLS_CODEPAGE_863=y -+CONFIG_NLS_CODEPAGE_864=y -+CONFIG_NLS_CODEPAGE_865=y -+CONFIG_NLS_CODEPAGE_866=y -+CONFIG_NLS_CODEPAGE_869=y -+CONFIG_NLS_CODEPAGE_936=y -+CONFIG_NLS_CODEPAGE_950=y -+CONFIG_NLS_CODEPAGE_932=y -+CONFIG_NLS_CODEPAGE_949=y -+CONFIG_NLS_CODEPAGE_874=y -+CONFIG_NLS_ISO8859_8=y -+CONFIG_NLS_CODEPAGE_1250=y -+CONFIG_NLS_CODEPAGE_1251=y -+CONFIG_NLS_ASCII=y -+CONFIG_NLS_ISO8859_1=y -+CONFIG_NLS_ISO8859_2=y -+CONFIG_NLS_ISO8859_3=y -+CONFIG_NLS_ISO8859_4=y -+CONFIG_NLS_ISO8859_5=y -+CONFIG_NLS_ISO8859_6=y -+CONFIG_NLS_ISO8859_7=y -+CONFIG_NLS_ISO8859_9=y -+CONFIG_NLS_ISO8859_13=y -+CONFIG_NLS_ISO8859_14=y -+CONFIG_NLS_ISO8859_15=y -+CONFIG_NLS_UTF8=y -+CONFIG_PRINTK_TIME=y -+CONFIG_DEBUG_FS=y -+CONFIG_DETECT_HUNG_TASK=y -+# CONFIG_DEBUG_PREEMPT is not set -+# CONFIG_DEBUG_BUGVERBOSE is not set -+# CONFIG_FTRACE is not set -+CONFIG_KGDB=y -+CONFIG_KGDB_KDB=y -+# CONFIG_ARM_UNWIND is not set -+CONFIG_CRYPTO_CBC=y -+CONFIG_CRYPTO_HMAC=y -+CONFIG_CRYPTO_MD5=y -+CONFIG_CRYPTO_SHA1=y -+CONFIG_CRYPTO_DES=y -+# CONFIG_CRYPTO_ANSI_CPRNG is not set -+# CONFIG_CRYPTO_HW is not set -+CONFIG_CRC_ITU_T=y -+CONFIG_LIBCRC32C=y --- -1.8.1.6 - - -From 558c1be0b32edbe4aa7b172a5ce3ede01b832e60 Mon Sep 17 00:00:00 2001 +From 02ea18b94aa294b60e8add5713a25d8044d516b7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 10 May 2013 19:42:38 +0100 -Subject: [PATCH 077/113] mmc: suppress sdcard warnings we are happy about by +Subject: [PATCH 67/98] mmc: suppress sdcard warnings we are happy about by default --- @@ -96740,7 +95381,7 @@ Subject: [PATCH 077/113] mmc: suppress sdcard warnings we are happy about by 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index 3556ed3..c2409b9 100644 +index 5dabf7a..455ad78 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -139,6 +139,7 @@ static inline unsigned long int since_ns(hptime_t t) @@ -96795,13 +95436,13 @@ index 3556ed3..c2409b9 100644 -- -1.8.1.6 +1.8.4 -From 52e57a2f21ebcff9bde56e4dbaee44e6fcf0c280 Mon Sep 17 00:00:00 2001 +From eea9b9c8b9ed28a50e01572330670ff7678e2d63 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 14 May 2013 11:42:25 +0100 -Subject: [PATCH 078/113] Allow reboot=q on command line to set a flag that +Subject: [PATCH 68/98] Allow reboot=q on command line to set a flag that bootcode.bin can use to boot from alternate partition --- @@ -96829,13 +95470,13 @@ index 87fd348..1ed4d73 100644 pm_rstc = readl(__io_address(PM_RSTC)); -- -1.8.1.6 +1.8.4 -From 1d5db5511083852610efbf193776a7d4279bcaa6 Mon Sep 17 00:00:00 2001 +From 6d987a9dadeb0a557f7a842770f1c3ef42edf8d5 Mon Sep 17 00:00:00 2001 From: hutorny Date: Mon, 13 May 2013 10:26:14 +0300 -Subject: [PATCH 080/113] Update bcm2708.c to use CONFIG_BCM2708_SPIDEV rather +Subject: [PATCH 70/98] Update bcm2708.c to use CONFIG_BCM2708_SPIDEV rather than CONFIG_SPI --- @@ -96844,7 +95485,7 @@ Subject: [PATCH 080/113] Update bcm2708.c to use CONFIG_BCM2708_SPIDEV rather 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-bcm2708/Kconfig b/arch/arm/mach-bcm2708/Kconfig -index 2a24db6..1dfd0a4 100644 +index cfa8779..314ee38 100644 --- a/arch/arm/mach-bcm2708/Kconfig +++ b/arch/arm/mach-bcm2708/Kconfig @@ -38,4 +38,11 @@ config BCM2708_DMAER @@ -96853,11 +95494,11 @@ index 2a24db6..1dfd0a4 100644 +config BCM2708_SPIDEV + bool "Bind spidev to SPI0 master" -+ depends on MACH_BCM2708 ++ depends on MACH_BCM2708 + depends on SPI + default y -+ help -+ Binds spidev driver to the SPI0 master ++ help ++ Binds spidev driver to the SPI0 master endmenu diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c index 1ed4d73..68c577a 100644 @@ -96882,20 +95523,20 @@ index 1ed4d73..68c577a 100644 ARRAY_SIZE(bcm2708_spi_devices)); #endif -- -1.8.1.6 +1.8.4 -From 21859458a2ad78b303036841508cf285abcae6a5 Mon Sep 17 00:00:00 2001 +From 4c355ddaebff658e385a2232958cd22ccb8ef20e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 8 Jun 2013 22:14:13 +0100 -Subject: [PATCH 082/113] Only init gpio pins of selected i2c bus +Subject: [PATCH 72/98] Only init gpio pins of selected i2c bus --- drivers/i2c/busses/i2c-bcm2708.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-bcm2708.c b/drivers/i2c/busses/i2c-bcm2708.c -index 3391889..edc90c0 100644 +index ac9df18..13a4cd7 100644 --- a/drivers/i2c/busses/i2c-bcm2708.c +++ b/drivers/i2c/busses/i2c-bcm2708.c @@ -97,7 +97,7 @@ struct bcm2708_i2c { @@ -96929,20 +95570,20 @@ index 3391889..edc90c0 100644 bi = kzalloc(sizeof(*bi), GFP_KERNEL); if (!bi) -- -1.8.1.6 +1.8.4 -From 777e8971980a501b06f2a1eced61b0f0ae1b1b86 Mon Sep 17 00:00:00 2001 +From e7aeccf765f45674a1c45f90f0fc219dc1f8df37 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 13 Jun 2013 16:46:54 +0100 -Subject: [PATCH 083/113] Avoid responding to unexpected I2C interrupts +Subject: [PATCH 73/98] Avoid responding to unexpected I2C interrupts --- drivers/i2c/busses/i2c-bcm2708.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/i2c/busses/i2c-bcm2708.c b/drivers/i2c/busses/i2c-bcm2708.c -index edc90c0..33f4e7d 100644 +index 13a4cd7..72750c7 100644 --- a/drivers/i2c/busses/i2c-bcm2708.c +++ b/drivers/i2c/busses/i2c-bcm2708.c @@ -175,6 +175,11 @@ static irqreturn_t bcm2708_i2c_interrupt(int irq, void *dev_id) @@ -96966,13 +95607,13 @@ index edc90c0..33f4e7d 100644 return handled ? IRQ_HANDLED : IRQ_NONE; -- -1.8.1.6 +1.8.4 -From 54093a51d14812febe1ae4b955a506503e364c7f Mon Sep 17 00:00:00 2001 +From bd5ac92d8c102fe8c3283f8e8f00cd3c91bd1300 Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 -Subject: [PATCH 084/113] Speed up console framebuffer imageblit function +Subject: [PATCH 74/98] Speed up console framebuffer imageblit function Especially on platforms with a slower CPU but a relatively high framebuffer fill bandwidth, like current ARM devices, the existing @@ -97181,13 +95822,13 @@ index baed57d..ce91bf2 100644 start_index, pitch_index); } else -- -1.8.1.6 +1.8.4 -From 3673a5a0f802d1c47d51bd105eb31f67d8c1f028 Mon Sep 17 00:00:00 2001 +From afee0c44e9701678f2063bcfc845771ee6424f0d Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 -Subject: [PATCH 085/113] fbdev: add FBIOCOPYAREA ioctl +Subject: [PATCH 75/98] fbdev: add FBIOCOPYAREA ioctl Based on the patch authored by Ali Gholami Rudi at https://lkml.org/lkml/2009/7/13/153 @@ -97202,7 +95843,7 @@ Signed-off-by: Siarhei Siamashka 2 files changed, 35 insertions(+) diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c -index 098bfc6..da8e53b 100644 +index 36e1fe2..1aa4d46 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -1074,6 +1074,25 @@ static int fb_check_caps(struct fb_info *info, struct fb_var_screeninfo *var, @@ -97255,7 +95896,7 @@ index 098bfc6..da8e53b 100644 default: if (!lock_fb_info(info)) return -ENODEV; -@@ -1345,6 +1374,7 @@ static long fb_compat_ioctl(struct file *file, unsigned int cmd, +@@ -1347,6 +1376,7 @@ static long fb_compat_ioctl(struct file *file, unsigned int cmd, case FBIOPAN_DISPLAY: case FBIOGET_CON2FBMAP: case FBIOPUT_CON2FBMAP: @@ -97280,13 +95921,13 @@ index fb795c3..fa72af0 100644 #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ #define FB_TYPE_PLANES 1 /* Non interleaved planes */ -- -1.8.1.6 +1.8.4 -From f34c976767863abb6963a10a1d94aa5417900387 Mon Sep 17 00:00:00 2001 +From b43c057eceb68103bc55fdd2b0eaac0541b0b602 Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 16:00:25 +0300 -Subject: [PATCH 086/113] bcm2708_fb: DMA acceleration for fb_copyarea +Subject: [PATCH 76/98] bcm2708_fb: DMA acceleration for fb_copyarea Based on http://www.raspberrypi.org/phpBB3/viewtopic.php?p=62425#p62425 Also used Simon's dmaer_master module as a reference for tweaking DMA @@ -97527,14 +96168,14 @@ index 08d9238..c10c5ee 100644 fb->dma); kfree(fb); -- -1.8.1.6 +1.8.4 -From 959ec6a678a85afa12a0a12928d10f3f6faafec3 Mon Sep 17 00:00:00 2001 +From 0683cbcae13b09f3baf002f6905cdee9548505fd Mon Sep 17 00:00:00 2001 From: Mike Bradley Date: Mon, 17 Jun 2013 11:31:42 -0700 -Subject: [PATCH 087/113] dwc_otg: Call usb_hcd_unlink_urb_from_ep with lock - held in completion handler +Subject: [PATCH 77/98] dwc_otg: Call usb_hcd_unlink_urb_from_ep with lock held + in completion handler usb_hcd_unlink_urb_from_ep must be called with the HCD lock held. Calling it asynchronously in the tasklet was not safe (regression in @@ -97555,7 +96196,7 @@ eliminated. 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -index eaa8f38..9c2e71a 100644 +index 73f7643..fe03c43 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -704,6 +704,7 @@ static void completion_tasklet_func(void *ptr) @@ -97575,7 +96216,7 @@ index eaa8f38..9c2e71a 100644 DWC_SPINLOCK_IRQSAVE(hcd->lock, &flags); diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c -index 7bb133a..fef557d 100644 +index 39787e3..5e6a26a 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c @@ -265,13 +265,15 @@ static void free_bus_bandwidth(struct usb_hcd *hcd, uint32_t bw, @@ -97617,19 +96258,19 @@ index 7bb133a..fef557d 100644 return 0; } -- -1.8.1.6 +1.8.4 -From c86f2ba722813909e73bed14f1151edcce7732f3 Mon Sep 17 00:00:00 2001 +From 10b42226b71ff181ced123e9f93f60f9b186b827 Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Thu, 4 Apr 2013 11:05:21 +0100 -Subject: [PATCH 088/113] USB fix using a FIQ to implement split transactions +Subject: [PATCH 78/98] USB fix using a FIQ to implement split transactions This commit adds a FIQ implementaion that schedules the split transactions using a FIQ so we don't get held off by the interrupt latency of Linux --- - .../usb/host/dwc_common_port/dwc_common_linux.c | 7 +- + .../usb/host/dwc_common_port/dwc_common_linux.c | 5 + drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c | 37 +- drivers/usb/host/dwc_otg/dwc_otg_driver.c | 6 +- drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 125 ++++- @@ -97637,12 +96278,12 @@ held off by the interrupt latency of Linux drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 538 ++++++++++++++++++--- drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 18 +- drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c | 31 +- - drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h | 26 +- + drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h | 24 +- drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c | 2 +- - 10 files changed, 696 insertions(+), 114 deletions(-) + 10 files changed, 694 insertions(+), 112 deletions(-) diff --git a/drivers/usb/host/dwc_common_port/dwc_common_linux.c b/drivers/usb/host/dwc_common_port/dwc_common_linux.c -index 6814e51..0812d3a 100644 +index 1788812..0812d3a 100644 --- a/drivers/usb/host/dwc_common_port/dwc_common_linux.c +++ b/drivers/usb/host/dwc_common_port/dwc_common_linux.c @@ -580,7 +580,12 @@ void DWC_WRITE_REG64(uint64_t volatile *reg, uint64_t value) @@ -97658,17 +96299,8 @@ index 6814e51..0812d3a 100644 } #if 0 -@@ -1301,7 +1306,7 @@ int DWC_WORKQ_PENDING(dwc_workq_t *wq) - EXPORT_SYMBOL(__DWC_DEBUG); - #endif - --EXPORT_SYMBOL(__DWC_DMA_ALLOC); -+EXPORT_SYMBOL(__DWC_DMA_ALLOC); - EXPORT_SYMBOL(__DWC_DMA_ALLOC_ATOMIC); - EXPORT_SYMBOL(__DWC_DMA_FREE); - EXPORT_SYMBOL(__DWC_ALLOC); diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c -index b861b55..b5a007d 100644 +index 096a3f1..2f8b3bd 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c @@ -47,8 +47,6 @@ @@ -97760,7 +96392,7 @@ index b861b55..b5a007d 100644 DWC_DEBUGPL(DBG_ANY, "gpwrdn=%08x\n", gpwrdn.d32); diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_otg/dwc_otg_driver.c -index cea8fcb..6c89a69 100644 +index c2bb596..176dc14 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_driver.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c @@ -242,7 +242,8 @@ struct dwc_otg_driver_module_params { @@ -97791,7 +96423,7 @@ index cea8fcb..6c89a69 100644 /** @page "Module Parameters" * diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -index 9c2e71a..af9108c 100644 +index fe03c43..ec00b13 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -45,6 +45,7 @@ @@ -98017,7 +96649,7 @@ index 9c2e71a..af9108c 100644 queue_transaction(hcd, qh->channel, tx_status.b.nptxfspcavail); diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h -index 0493dbf..d3d6e997 100644 +index 0ba7558..de1ccb1 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h @@ -168,10 +168,10 @@ static inline void dwc_otg_hcd_fill_pipe(struct dwc_otg_hcd_pipe_info *pipe, @@ -98074,7 +96706,7 @@ index 0493dbf..d3d6e997 100644 dwc_otg_hcd); extern int32_t dwc_otg_hcd_handle_np_tx_fifo_empty_intr(dwc_otg_hcd_t * diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -index 16e8c6c..e8b4d35 100644 +index a27dacd..8e5789f 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -38,6 +38,7 @@ @@ -98847,7 +97479,7 @@ index 16e8c6c..e8b4d35 100644 if (hcint.b.ahberr) { retval |= handle_hc_ahberr_intr(dwc_otg_hcd, hc, hc_regs, qtd); diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c -index fef557d..0d6f5f4 100644 +index 5e6a26a..d1c5c2b 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c @@ -392,7 +392,11 @@ static int _complete(dwc_otg_hcd_t * hcd, void *urb_handle, @@ -98898,14 +97530,14 @@ index fef557d..0d6f5f4 100644 @@ -839,6 +849,8 @@ static int dwc_otg_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) usb_hcd_unlink_urb_from_ep(hcd, urb); #endif - DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, flags); + DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, flags); + + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) usb_hcd_giveback_urb(hcd, urb); #else diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c -index b3e6e52..8125307 100644 +index 1554be5..7b92025 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c @@ -41,6 +41,7 @@ @@ -98935,7 +97567,7 @@ index b3e6e52..8125307 100644 deschedule_periodic(hcd, qh); hcd->periodic_qh_count--; @@ -766,21 +771,21 @@ void dwc_otg_hcd_qh_deactivate(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh, - { + { if (dwc_qh_is_non_per(qh)) { - dwc_otg_qh_t *qh_tmp; @@ -98970,7 +97602,7 @@ index b3e6e52..8125307 100644 dwc_otg_hcd_qh_remove(hcd, qh); diff --git a/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h b/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h -index 22f28e1..ca17379 100755 +index 660d50f..ca17379 100755 --- a/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h @@ -1,10 +1,7 @@ @@ -98978,7 +97610,7 @@ index 22f28e1..ca17379 100755 #define __DWC_OTG_MPHI_FIX_H__ - -#define FIQ_WRITE_IO_ADDRESS(_addr_,_data_) *(volatile uint32_t *) IO_ADDRESS(_addr_) = _data_ --#define FIQ_READ_IO_ADDRESS(_addr_) *(volatile uint32_t *) IO_ADDRESS(_addr_) +-#define FIQ_READ_IO_ADDRESS(_addr_) *(volatile uint32_t *) IO_ADDRESS(_addr_) -#define FIQ_MODIFY_IO_ADDRESS(_addr_,_clear_,_set_) FIQ_WRITE_IO_ADDRESS(_addr_ , (FIQ_READ_IO_ADDRESS(_addr_)&~_clear_)|_set_) -#define FIQ_WRITE(_addr_,_data_) *(volatile uint32_t *) _addr_ = _data_ +#define FIQ_WRITE(_addr_,_data_) (*(volatile uint32_t *) (_addr_) = (_data_)) @@ -98986,14 +97618,7 @@ index 22f28e1..ca17379 100755 typedef struct { volatile void* base; -@@ -12,13 +9,13 @@ - volatile void* outdda; - volatile void* outddb; - volatile void* intstat; --} mphi_regs_t; -+} mphi_regs_t; - - void dwc_debug_print_core_int_reg(gintsts_data_t gintsts, const char* function_name); +@@ -18,7 +15,7 @@ void dwc_debug_core_int_mask(gintsts_data_t gintmsk, const char* function_name); void dwc_debug_otg_int(gotgint_data_t gotgint, const char* function_name); @@ -99026,7 +97651,7 @@ index 22f28e1..ca17379 100755 + #endif diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c -index 27061d3..9720937 100644 +index 1b1f83c..c8590b5 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c @@ -4276,7 +4276,7 @@ static int32_t dwc_otg_pcd_handle_out_ep_intr(dwc_otg_pcd_t * pcd) @@ -99039,13 +97664,13 @@ index 27061d3..9720937 100644 if (status.b.sr) { -- -1.8.1.6 +1.8.4 -From eb48f7faf9e10f6eca20a043d2d65146ebcd7683 Mon Sep 17 00:00:00 2001 +From 7384de894b44619cf98a55d040dcded0653f7f1b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 11:39:46 +0100 -Subject: [PATCH 089/113] dwc_otg: fix device attributes and avoid kernel +Subject: [PATCH 79/98] dwc_otg: fix device attributes and avoid kernel warnings on boot --- @@ -99053,7 +97678,7 @@ Subject: [PATCH 089/113] dwc_otg: fix device attributes and avoid kernel 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_attr.c b/drivers/usb/host/dwc_otg/dwc_otg_attr.c -index 95eb7f8..9602fda 100644 +index fab2961..af1cd4d 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_attr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_attr.c @@ -909,7 +909,7 @@ static ssize_t regdump_show(struct device *_dev, @@ -99111,438 +97736,13 @@ index 95eb7f8..9602fda 100644 #ifdef CONFIG_USB_DWC_OTG_LPM -- -1.8.1.6 +1.8.4 -From 8bb9a012ed98c50b9c827e515efa3ca71b94d51f Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Wed, 3 Jul 2013 13:55:00 +0100 -Subject: [PATCH 090/113] hack: fix for incorrect uart fifo size detection - ---- - drivers/tty/serial/amba-pl011.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c -index e2774f9..5254f10 100644 ---- a/drivers/tty/serial/amba-pl011.c -+++ b/drivers/tty/serial/amba-pl011.c -@@ -84,7 +84,7 @@ struct vendor_data { - - static unsigned int get_fifosize_arm(unsigned int periphid) - { -- unsigned int rev = (periphid >> 20) & 0xf; -+ unsigned int rev = 0; //(periphid >> 20) & 0xf; - return rev < 3 ? 16 : 32; - } - --- -1.8.1.6 - - -From 58879fbbd67263ca40d585272ed93b3c90619b8a Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Sat, 6 Jul 2013 15:25:50 +0100 -Subject: [PATCH 091/113] Re-enable RTL8192CU driver - ---- - arch/arm/configs/bcmrpi_defconfig | 230 +++++++------------------------------- - 1 file changed, 42 insertions(+), 188 deletions(-) - -diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index c1afa47..f488d9e 100644 ---- a/arch/arm/configs/bcmrpi_defconfig -+++ b/arch/arm/configs/bcmrpi_defconfig -@@ -1,12 +1,13 @@ - # CONFIG_ARM_PATCH_PHYS_VIRT is not set --CONFIG_EXPERIMENTAL=y - # CONFIG_LOCALVERSION_AUTO is not set - CONFIG_SYSVIPC=y - CONFIG_POSIX_MQUEUE=y --CONFIG_BSD_PROCESS_ACCT=y --CONFIG_BSD_PROCESS_ACCT_V3=y - CONFIG_FHANDLE=y - CONFIG_AUDIT=y -+CONFIG_NO_HZ=y -+CONFIG_HIGH_RES_TIMERS=y -+CONFIG_BSD_PROCESS_ACCT=y -+CONFIG_BSD_PROCESS_ACCT_V3=y - CONFIG_IKCONFIG=y - CONFIG_IKCONFIG_PROC=y - CONFIG_CGROUP_FREEZER=y -@@ -28,10 +29,10 @@ CONFIG_MODVERSIONS=y - CONFIG_MODULE_SRCVERSION_ALL=y - # CONFIG_BLK_DEV_BSG is not set - CONFIG_BLK_DEV_THROTTLING=y -+CONFIG_PARTITION_ADVANCED=y -+CONFIG_MAC_PARTITION=y - CONFIG_CFQ_GROUP_IOSCHED=y - CONFIG_ARCH_BCM2708=y --CONFIG_NO_HZ=y --CONFIG_HIGH_RES_TIMERS=y - CONFIG_AEABI=y - CONFIG_SECCOMP=y - CONFIG_CC_STACKPROTECTOR=y -@@ -98,10 +99,8 @@ CONFIG_NETFILTER_XT_TARGET_AUDIT=m - CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m - CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m - CONFIG_NETFILTER_XT_TARGET_CONNMARK=m --CONFIG_NETFILTER_XT_TARGET_CT=m - CONFIG_NETFILTER_XT_TARGET_DSCP=m - CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m --CONFIG_NETFILTER_XT_TARGET_LED=m - CONFIG_NETFILTER_XT_TARGET_MARK=m - CONFIG_NETFILTER_XT_TARGET_NFLOG=m - CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -@@ -167,12 +166,7 @@ CONFIG_IP_NF_MATCH_ECN=m - CONFIG_IP_NF_MATCH_TTL=m - CONFIG_IP_NF_FILTER=m - CONFIG_IP_NF_TARGET_REJECT=m --CONFIG_IP_NF_TARGET_LOG=m - CONFIG_IP_NF_TARGET_ULOG=m --CONFIG_NF_NAT=m --CONFIG_IP_NF_TARGET_MASQUERADE=m --CONFIG_IP_NF_TARGET_NETMAP=m --CONFIG_IP_NF_TARGET_REDIRECT=m - CONFIG_IP_NF_MANGLE=m - CONFIG_IP_NF_TARGET_ECN=m - CONFIG_IP_NF_TARGET_TTL=m -@@ -191,7 +185,6 @@ CONFIG_IP6_NF_MATCH_IPV6HEADER=m - CONFIG_IP6_NF_MATCH_MH=m - CONFIG_IP6_NF_MATCH_RT=m - CONFIG_IP6_NF_TARGET_HL=m --CONFIG_IP6_NF_TARGET_LOG=m - CONFIG_IP6_NF_FILTER=m - CONFIG_IP6_NF_TARGET_REJECT=m - CONFIG_IP6_NF_MANGLE=m -@@ -282,8 +275,6 @@ CONFIG_USB_IRDA=m - CONFIG_SIGMATEL_FIR=m - CONFIG_MCS_FIR=m - CONFIG_BT=m --CONFIG_BT_L2CAP=y --CONFIG_BT_SCO=y - CONFIG_BT_RFCOMM=m - CONFIG_BT_RFCOMM_TTY=y - CONFIG_BT_BNEP=m -@@ -315,7 +306,6 @@ CONFIG_BLK_DEV_DRBD=m - CONFIG_BLK_DEV_NBD=m - CONFIG_BLK_DEV_RAM=y - CONFIG_CDROM_PKTCDVD=m --CONFIG_MISC_DEVICES=y - CONFIG_SCSI=y - # CONFIG_SCSI_PROC_FS is not set - CONFIG_BLK_DEV_SD=m -@@ -324,45 +314,16 @@ CONFIG_SCSI_MULTI_LUN=y - # CONFIG_SCSI_LOWLEVEL is not set - CONFIG_MD=y - CONFIG_NETDEVICES=y -+CONFIG_NETCONSOLE=m - CONFIG_TUN=m --CONFIG_PHYLIB=m - CONFIG_MDIO_BITBANG=m --CONFIG_NET_ETHERNET=y --# CONFIG_NETDEV_1000 is not set --# CONFIG_NETDEV_10000 is not set --CONFIG_LIBERTAS_THINFIRM=m --CONFIG_LIBERTAS_THINFIRM_USB=m --CONFIG_AT76C50X_USB=m --CONFIG_USB_ZD1201=m --CONFIG_USB_NET_RNDIS_WLAN=m --CONFIG_RTL8187=m --CONFIG_MAC80211_HWSIM=m --CONFIG_ATH_COMMON=m --CONFIG_ATH9K=m --CONFIG_ATH9K_HTC=m --CONFIG_CARL9170=m --CONFIG_B43=m --CONFIG_B43LEGACY=m --CONFIG_HOSTAP=m --CONFIG_IWM=m --CONFIG_LIBERTAS=m --CONFIG_LIBERTAS_USB=m --CONFIG_LIBERTAS_SDIO=m --CONFIG_P54_COMMON=m --CONFIG_P54_USB=m --CONFIG_RT2X00=m --CONFIG_RT2500USB=m --CONFIG_RT73USB=m --CONFIG_RT2800USB=m --CONFIG_RT2800USB_RT53XX=y --CONFIG_RT2800USB_UNKNOWN=y --CONFIG_WL1251=m --CONFIG_WL12XX_MENU=m --CONFIG_ZD1211RW=m --CONFIG_MWIFIEX=m --CONFIG_MWIFIEX_SDIO=m --CONFIG_RTL8192CU=m --CONFIG_WIMAX_I2400M_USB=m -+CONFIG_PPP=m -+CONFIG_PPP_BSDCOMP=m -+CONFIG_PPP_DEFLATE=m -+CONFIG_PPP_ASYNC=m -+CONFIG_PPP_SYNC_TTY=m -+CONFIG_SLIP=m -+CONFIG_SLIP_COMPRESSED=y - CONFIG_USB_CATC=m - CONFIG_USB_KAWETH=m - CONFIG_USB_PEGASUS=m -@@ -389,14 +350,32 @@ CONFIG_USB_NET_INT51X1=m - CONFIG_USB_IPHETH=m - CONFIG_USB_SIERRA_NET=m - CONFIG_USB_VL600=m --CONFIG_PPP=m --CONFIG_PPP_ASYNC=m --CONFIG_PPP_SYNC_TTY=m --CONFIG_PPP_DEFLATE=m --CONFIG_PPP_BSDCOMP=m --CONFIG_SLIP=m --CONFIG_SLIP_COMPRESSED=y --CONFIG_NETCONSOLE=m -+CONFIG_LIBERTAS_THINFIRM=m -+CONFIG_LIBERTAS_THINFIRM_USB=m -+CONFIG_AT76C50X_USB=m -+CONFIG_USB_ZD1201=m -+CONFIG_USB_NET_RNDIS_WLAN=m -+CONFIG_RTL8187=m -+CONFIG_MAC80211_HWSIM=m -+CONFIG_B43=m -+CONFIG_B43LEGACY=m -+CONFIG_HOSTAP=m -+CONFIG_LIBERTAS=m -+CONFIG_LIBERTAS_USB=m -+CONFIG_LIBERTAS_SDIO=m -+CONFIG_P54_COMMON=m -+CONFIG_P54_USB=m -+CONFIG_RT2X00=m -+CONFIG_RT2500USB=m -+CONFIG_RT73USB=m -+CONFIG_RT2800USB=m -+CONFIG_RT2800USB_RT53XX=y -+CONFIG_RT2800USB_UNKNOWN=y -+CONFIG_ZD1211RW=m -+CONFIG_MWIFIEX=m -+CONFIG_MWIFIEX_SDIO=m -+CONFIG_RTL8192CU=m -+CONFIG_WIMAX_I2400M_USB=m - CONFIG_INPUT_POLLDEV=m - # CONFIG_INPUT_MOUSEDEV_PSAUX is not set - CONFIG_INPUT_JOYDEV=m -@@ -405,7 +384,6 @@ CONFIG_INPUT_EVDEV=m - # CONFIG_INPUT_MOUSE is not set - CONFIG_INPUT_MISC=y - CONFIG_INPUT_AD714X=m --CONFIG_INPUT_ATI_REMOTE=m - CONFIG_INPUT_ATI_REMOTE2=m - CONFIG_INPUT_KEYSPAN_REMOTE=m - CONFIG_INPUT_POWERMATE=m -@@ -440,115 +418,6 @@ CONFIG_THERMAL_BCM2835=y - CONFIG_WATCHDOG=y - CONFIG_BCM2708_WDT=m - CONFIG_MEDIA_SUPPORT=m --CONFIG_VIDEO_DEV=m --CONFIG_DVB_CORE=m --CONFIG_RC_ATI_REMOTE=m --CONFIG_IR_IMON=m --CONFIG_IR_MCEUSB=m --CONFIG_IR_REDRAT3=m --CONFIG_IR_STREAMZAP=m --CONFIG_RC_LOOPBACK=m --CONFIG_MEDIA_ATTACH=y --CONFIG_USB_VIDEO_CLASS=m --CONFIG_USB_M5602=m --CONFIG_USB_STV06XX=m --CONFIG_USB_GL860=m --CONFIG_USB_GSPCA_BENQ=m --CONFIG_USB_GSPCA_CONEX=m --CONFIG_USB_GSPCA_CPIA1=m --CONFIG_USB_GSPCA_ETOMS=m --CONFIG_USB_GSPCA_FINEPIX=m --CONFIG_USB_GSPCA_JEILINJ=m --CONFIG_USB_GSPCA_KINECT=m --CONFIG_USB_GSPCA_KONICA=m --CONFIG_USB_GSPCA_MARS=m --CONFIG_USB_GSPCA_MR97310A=m --CONFIG_USB_GSPCA_NW80X=m --CONFIG_USB_GSPCA_OV519=m --CONFIG_USB_GSPCA_OV534=m --CONFIG_USB_GSPCA_OV534_9=m --CONFIG_USB_GSPCA_PAC207=m --CONFIG_USB_GSPCA_PAC7302=m --CONFIG_USB_GSPCA_PAC7311=m --CONFIG_USB_GSPCA_SE401=m --CONFIG_USB_GSPCA_SN9C2028=m --CONFIG_USB_GSPCA_SN9C20X=m --CONFIG_USB_GSPCA_SONIXB=m --CONFIG_USB_GSPCA_SONIXJ=m --CONFIG_USB_GSPCA_SPCA500=m --CONFIG_USB_GSPCA_SPCA501=m --CONFIG_USB_GSPCA_SPCA505=m --CONFIG_USB_GSPCA_SPCA506=m --CONFIG_USB_GSPCA_SPCA508=m --CONFIG_USB_GSPCA_SPCA561=m --CONFIG_USB_GSPCA_SPCA1528=m --CONFIG_USB_GSPCA_SQ905=m --CONFIG_USB_GSPCA_SQ905C=m --CONFIG_USB_GSPCA_SQ930X=m --CONFIG_USB_GSPCA_STK014=m --CONFIG_USB_GSPCA_STV0680=m --CONFIG_USB_GSPCA_SUNPLUS=m --CONFIG_USB_GSPCA_T613=m --CONFIG_USB_GSPCA_TV8532=m --CONFIG_USB_GSPCA_VC032X=m --CONFIG_USB_GSPCA_VICAM=m --CONFIG_USB_GSPCA_XIRLINK_CIT=m --CONFIG_USB_GSPCA_ZC3XX=m --CONFIG_VIDEO_PVRUSB2=m --CONFIG_VIDEO_HDPVR=m --CONFIG_VIDEO_EM28XX=m --CONFIG_VIDEO_EM28XX_ALSA=m --CONFIG_VIDEO_EM28XX_DVB=m --CONFIG_VIDEO_TLG2300=m --CONFIG_VIDEO_CX231XX=m --CONFIG_VIDEO_CX231XX_ALSA=m --CONFIG_VIDEO_CX231XX_DVB=m --CONFIG_VIDEO_USBVISION=m --CONFIG_USB_ET61X251=m --CONFIG_USB_SN9C102=m --CONFIG_USB_PWC=m --CONFIG_USB_ZR364XX=m --CONFIG_USB_STKWEBCAM=m --CONFIG_USB_S2255=m --CONFIG_USB_DSBR=m --CONFIG_RADIO_SI470X=y --CONFIG_USB_SI470X=m --CONFIG_USB_MR800=m --CONFIG_DVB_USB=m --CONFIG_DVB_USB_A800=m --CONFIG_DVB_USB_DIBUSB_MB=m --CONFIG_DVB_USB_DIBUSB_MC=m --CONFIG_DVB_USB_DIB0700=m --CONFIG_DVB_USB_UMT_010=m --CONFIG_DVB_USB_CXUSB=m --CONFIG_DVB_USB_M920X=m --CONFIG_DVB_USB_GL861=m --CONFIG_DVB_USB_AU6610=m --CONFIG_DVB_USB_DIGITV=m --CONFIG_DVB_USB_VP7045=m --CONFIG_DVB_USB_VP702X=m --CONFIG_DVB_USB_GP8PSK=m --CONFIG_DVB_USB_NOVA_T_USB2=m --CONFIG_DVB_USB_TTUSB2=m --CONFIG_DVB_USB_DTT200U=m --CONFIG_DVB_USB_OPERA1=m --CONFIG_DVB_USB_AF9005=m --CONFIG_DVB_USB_AF9005_REMOTE=m --CONFIG_DVB_USB_DW2102=m --CONFIG_DVB_USB_CINERGY_T2=m --CONFIG_DVB_USB_ANYSEE=m --CONFIG_DVB_USB_DTV5100=m --CONFIG_DVB_USB_AF9015=m --CONFIG_DVB_USB_CE6230=m --CONFIG_DVB_USB_FRIIO=m --CONFIG_DVB_USB_EC168=m --CONFIG_DVB_USB_AZ6027=m --CONFIG_DVB_USB_LME2510=m --CONFIG_DVB_USB_TECHNISAT_USB2=m --CONFIG_SMS_SIANO_MDTV=m --CONFIG_SMS_USB_DRV=m --CONFIG_DVB_B2C2_FLEXCOP=m --CONFIG_DVB_B2C2_FLEXCOP_USB=m - CONFIG_FB=y - CONFIG_FB_BCM2708=y - CONFIG_FRAMEBUFFER_CONSOLE=y -@@ -575,8 +444,6 @@ CONFIG_SND_USB_UA101=m - CONFIG_SND_USB_CAIAQ=m - CONFIG_SND_USB_6FIRE=m - CONFIG_SOUND_PRIME=m --CONFIG_HID_PID=y --CONFIG_USB_HIDDEV=y - CONFIG_HID_A4TECH=m - CONFIG_HID_ACRUX=m - CONFIG_HID_APPLE=m -@@ -607,7 +474,6 @@ CONFIG_HID_ORTEK=m - CONFIG_HID_PANTHERLORD=m - CONFIG_HID_PETALYNX=m - CONFIG_HID_PICOLCD=m --CONFIG_HID_QUANTA=m - CONFIG_HID_ROCCAT=m - CONFIG_HID_SAMSUNG=m - CONFIG_HID_SONY=m -@@ -617,10 +483,10 @@ CONFIG_HID_GREENASIA=m - CONFIG_HID_SMARTJOYPLUS=m - CONFIG_HID_TOPSEED=m - CONFIG_HID_THRUSTMASTER=m --CONFIG_HID_WACOM=m --CONFIG_HID_WIIMOTE=m - CONFIG_HID_ZEROPLUS=m - CONFIG_HID_ZYDACRON=m -+CONFIG_HID_PID=y -+CONFIG_USB_HIDDEV=y - CONFIG_USB=y - CONFIG_USB_ANNOUNCE_NEW_DEVICES=y - CONFIG_USB_MON=m -@@ -639,8 +505,6 @@ CONFIG_USB_STORAGE_ONETOUCH=m - CONFIG_USB_STORAGE_KARMA=m - CONFIG_USB_STORAGE_CYPRESS_ATACB=m - CONFIG_USB_STORAGE_ENE_UB6250=m --CONFIG_USB_UAS=m --CONFIG_USB_LIBUSUAL=y - CONFIG_USB_MDC800=m - CONFIG_USB_MICROTEK=m - CONFIG_USB_SERIAL=m -@@ -717,10 +581,6 @@ CONFIG_MMC_SDHCI=y - CONFIG_MMC_SDHCI_PLTFM=y - CONFIG_MMC_SDHCI_BCM2708=y - CONFIG_MMC_SDHCI_BCM2708_DMA=y --CONFIG_LEDS_GPIO=y --CONFIG_LEDS_TRIGGER_TIMER=m --CONFIG_LEDS_TRIGGER_HEARTBEAT=m --CONFIG_LEDS_TRIGGER_DEFAULT_ON=m - CONFIG_RTC_CLASS=y - CONFIG_RTC_DRV_DS1307=m - CONFIG_RTC_DRV_DS1374=m -@@ -798,7 +658,6 @@ CONFIG_SQUASHFS_XATTR=y - CONFIG_SQUASHFS_LZO=y - CONFIG_SQUASHFS_XZ=y - CONFIG_NFS_FS=y --CONFIG_NFS_V3=y - CONFIG_NFS_V3_ACL=y - CONFIG_NFS_V4=y - CONFIG_ROOT_NFS=y -@@ -812,9 +671,6 @@ CONFIG_CIFS_XATTR=y - CONFIG_CIFS_POSIX=y - CONFIG_9P_FS=m - CONFIG_9P_FS_POSIX_ACL=y --CONFIG_PARTITION_ADVANCED=y --CONFIG_MAC_PARTITION=y --CONFIG_EFI_PARTITION=y - CONFIG_NLS_DEFAULT="utf8" - CONFIG_NLS_CODEPAGE_437=y - CONFIG_NLS_CODEPAGE_737=m -@@ -862,7 +718,6 @@ CONFIG_DEBUG_INFO=y - CONFIG_DEBUG_MEMORY_INIT=y - CONFIG_BOOT_PRINTK_DELAY=y - CONFIG_LATENCYTOP=y --CONFIG_SYSCTL_SYSCALL_CHECK=y - CONFIG_IRQSOFF_TRACER=y - CONFIG_SCHED_TRACER=y - CONFIG_STACK_TRACER=y -@@ -878,7 +733,6 @@ CONFIG_CRYPTO_HMAC=y - CONFIG_CRYPTO_XCBC=m - CONFIG_CRYPTO_MD5=y - CONFIG_CRYPTO_SHA1=y --CONFIG_CRYPTO_SHA256=m - CONFIG_CRYPTO_SHA512=m - CONFIG_CRYPTO_TGR192=m - CONFIG_CRYPTO_WP512=m --- -1.8.1.6 - - -From dd7311fd0207b7e45124ea274f358279c5aeadf6 Mon Sep 17 00:00:00 2001 +From b5994a121f2e14ac22599dcd52fbf88014b442d2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 10 Jul 2013 23:53:31 +0100 -Subject: [PATCH 093/113] sdhci-bcm2807: Increase sync_after_dma timeout +Subject: [PATCH 81/98] sdhci-bcm2807: Increase sync_after_dma timeout The current timeout is being hit with some cards that complete successfully with a longer timeout. The timeout is not handled well, and is believed to be a code path that causes corruption. @@ -99552,7 +97752,7 @@ The timeout is not handled well, and is believed to be a code path that causes c 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c -index c2409b9..4770680 100644 +index 455ad78..7f79f54 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -842,7 +842,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, @@ -99565,13 +97765,13 @@ index c2409b9..4770680 100644 DBG("PDMA over - sync card\n"); if (data->flags & MMC_DATA_READ) -- -1.8.1.6 +1.8.4 -From 11a2600b6e675fa01834e93863603ed699f943c5 Mon Sep 17 00:00:00 2001 +From 98a35f04b5bec52b249476f33248c169a803082d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 15 Jul 2013 23:55:52 +0100 -Subject: [PATCH 094/113] dcw_otg: avoid logging function that can cause panics +Subject: [PATCH 82/98] dcw_otg: avoid logging function that can cause panics See: https://github.com/raspberrypi/firmware/issues/21 Thanks to cleverca22 for fix @@ -99580,7 +97780,7 @@ Thanks to cleverca22 for fix 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_attr.c b/drivers/usb/host/dwc_otg/dwc_otg_attr.c -index 9602fda..c6966af 100644 +index af1cd4d..9da0c92 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_attr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_attr.c @@ -920,7 +920,7 @@ static ssize_t spramdump_show(struct device *_dev, @@ -99593,13 +97793,13 @@ index 9602fda..c6966af 100644 return sprintf(buf, "SPRAM Dump\n"); } -- -1.8.1.6 +1.8.4 -From 443c09c58738c3187a0f378ae3d071f969017f0b Mon Sep 17 00:00:00 2001 +From cfa89df22ac4dce5b4347f0aaedc52e36d8ca9cd Mon Sep 17 00:00:00 2001 From: P33M Date: Sat, 13 Jul 2013 20:41:26 +0100 -Subject: [PATCH 095/113] dwc_otg: mask correct interrupts after transaction +Subject: [PATCH 83/98] dwc_otg: mask correct interrupts after transaction error recovery The dwc_otg driver will unmask certain interrupts on a transaction @@ -99616,7 +97816,7 @@ from being generated if the FIQ is enabled. 1 file changed, 21 insertions(+) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -index e8b4d35..27b673f 100644 +index 8e5789f..fd73e41 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -1851,7 +1851,11 @@ static int32_t handle_hc_nak_intr(dwc_otg_hcd_t * hcd, @@ -99663,13 +97863,13 @@ index e8b4d35..27b673f 100644 } -- -1.8.1.6 +1.8.4 -From a1a1f1c9b76f15428952abb98814e57ba4116ca9 Mon Sep 17 00:00:00 2001 +From 1c6c2da01833eaf24e572bb5d98e872bd7ec15b9 Mon Sep 17 00:00:00 2001 From: P33M Date: Sat, 13 Jul 2013 21:48:41 +0100 -Subject: [PATCH 096/113] dwc_otg: fiq: prevent FIQ thrash and incorrect state +Subject: [PATCH 84/98] dwc_otg: fiq: prevent FIQ thrash and incorrect state passing to IRQ In the case of a transaction to a device that had previously aborted @@ -99691,7 +97891,7 @@ it was possible to confuse the IRQ handler. 1 file changed, 21 insertions(+) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -index 27b673f..d655363 100644 +index fd73e41..2ec0565 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -324,6 +324,27 @@ int fiq_hcintr_handle(int channel, hfnum_data_t hfnum) @@ -99723,20 +97923,20 @@ index 27b673f..d655363 100644 // Clear the interrupt, this will also clear the HAINT bit FIQ_WRITE((dwc_regs_base + 0x500 + (channel * 0x20) + 0x8), hcint.d32); -- -1.8.1.6 +1.8.4 -From e7944421831da467a3f51a098e6cc0f6ebb4114a Mon Sep 17 00:00:00 2001 +From 209604d729b57d3bd3b23502b63db04ce60e85f2 Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Mon, 8 Jul 2013 04:12:19 +0100 -Subject: [PATCH 097/113] Fix function tracing +Subject: [PATCH 85/98] Fix function tracing --- drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -index d655363..765451b 100644 +index 2ec0565..083b1c3 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -77,7 +77,7 @@ @@ -99791,37 +97991,35 @@ index d655363..765451b 100644 /* entry takes care to store registers we will be treading on here */ -- -1.8.1.6 +1.8.4 -From bb0c18e85d74ab863a4d1fe91df06bda88b5d0d7 Mon Sep 17 00:00:00 2001 +From f4b655bb91e1acd6edb035c376c2d521d76f1950 Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 18 Jul 2013 16:32:41 +0100 -Subject: [PATCH 098/113] dwc_otg: whitespace cleanup in dwc_otg_urb_enqueue +Subject: [PATCH 86/98] dwc_otg: whitespace cleanup in dwc_otg_urb_enqueue --- - drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 59 ++++++++++++++-------------- - 1 file changed, 29 insertions(+), 30 deletions(-) + drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 53 ++++++++++++++-------------- + 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c -index 0d6f5f4..0f72bd5 100644 +index d1c5c2b..315c803 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c -@@ -733,10 +733,10 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd, +@@ -733,9 +733,9 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd, if(dwc_otg_urb == NULL) return -ENOMEM; - urb->hcpriv = dwc_otg_urb; - if (!dwc_otg_urb && urb->number_of_packets) - return -ENOMEM; -- + urb->hcpriv = dwc_otg_urb; + if (!dwc_otg_urb && urb->number_of_packets) + return -ENOMEM; -+ + dwc_otg_hcd_urb_set_pipeinfo(dwc_otg_urb, usb_pipedevice(urb->pipe), usb_pipeendpoint(urb->pipe), ep_type, - usb_pipein(urb->pipe), @@ -776,36 +776,35 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd, } @@ -99830,14 +98028,13 @@ index 0d6f5f4..0f72bd5 100644 + DWC_SPINLOCK_IRQSAVE(dwc_otg_hcd->lock, &irqflags); retval = usb_hcd_link_urb_to_ep(hcd, urb); - DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, irqflags); -- if (0 == retval) + DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, irqflags); -+ if (0 == retval) + if (0 == retval) #endif - { - retval = dwc_otg_hcd_urb_enqueue(dwc_otg_hcd, dwc_otg_urb, - /*(dwc_otg_qh_t **)*/ -- ref_ep_hcpriv, +- ref_ep_hcpriv, - mem_flags == GFP_ATOMIC ? 1 : 0); - if (0 == retval) { - if (alloc_bandwidth) { @@ -99861,12 +98058,11 @@ index 0d6f5f4..0f72bd5 100644 + } + } else { #if USB_URB_EP_LINKING -- dwc_irqflags_t irqflags; + dwc_irqflags_t irqflags; - DWC_DEBUGPL(DBG_HCD, "DWC OTG dwc_otg_hcd_urb_enqueue failed rc %d\n", retval); - DWC_SPINLOCK_IRQSAVE(dwc_otg_hcd->lock, &irqflags); - usb_hcd_unlink_urb_from_ep(hcd, urb); - DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, irqflags); -+ dwc_irqflags_t irqflags; + DWC_DEBUGPL(DBG_HCD, "DWC OTG dwc_otg_hcd_urb_enqueue failed rc %d\n", retval); + DWC_SPINLOCK_IRQSAVE(dwc_otg_hcd->lock, &irqflags); + usb_hcd_unlink_urb_from_ep(hcd, urb); @@ -99885,13 +98081,13 @@ index 0d6f5f4..0f72bd5 100644 } -- -1.8.1.6 +1.8.4 -From 5c7bbdc95f5ec139f242623b27d5407dc33561f8 Mon Sep 17 00:00:00 2001 +From b222727cdf29a3fe84504c960401ce365cf4c924 Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 18 Jul 2013 17:07:26 +0100 -Subject: [PATCH 099/113] dwc_otg: prevent OOPSes during device disconnects +Subject: [PATCH 87/98] dwc_otg: prevent OOPSes during device disconnects The dwc_otg_urb_enqueue function is thread-unsafe. In particular the access of urb->hcpriv, usb_hcd_link_urb_to_ep, dwc_otg_urb->qtd and @@ -99911,7 +98107,7 @@ critical section. 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -index af9108c..a1970dc 100644 +index ec00b13..aeabbb1 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -464,7 +464,6 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_t * hcd, @@ -99936,7 +98132,7 @@ index af9108c..a1970dc 100644 return retval; } diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c -index 0f72bd5..ad03ff1 100644 +index 315c803..87e517d 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c @@ -679,9 +679,7 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd, @@ -99944,7 +98140,7 @@ index 0f72bd5..ad03ff1 100644 struct usb_host_endpoint *ep = urb->ep; #endif -#if USB_URB_EP_LINKING - dwc_irqflags_t irqflags; + dwc_irqflags_t irqflags; -#endif void **ref_ep_hcpriv = &ep->hcpriv; dwc_otg_hcd_t *dwc_otg_hcd = hcd_to_dwc_otg_hcd(hcd); @@ -99992,7 +98188,7 @@ index 0f72bd5..ad03ff1 100644 } diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c -index 8125307..5aed416 100644 +index 7b92025..db95851 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c @@ -919,6 +919,7 @@ void dwc_otg_hcd_qtd_init(dwc_otg_qtd_t * qtd, dwc_otg_hcd_urb_t * urb) @@ -100029,14 +98225,14 @@ index 8125307..5aed416 100644 return retval; -- -1.8.1.6 +1.8.4 -From 77978b94828ec1ba2f264bec64681a0470bb323e Mon Sep 17 00:00:00 2001 +From aed74e90a046ffda736b3c4f730a83600b9cd670 Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 22 Jul 2013 14:08:26 +0100 -Subject: [PATCH 100/113] dwc_otg: prevent BUG() in TT allocation if hub - address is > 16 +Subject: [PATCH 88/98] dwc_otg: prevent BUG() in TT allocation if hub address + is > 16 A fixed-size array is used to track TT allocation. This was previously set to 16 which caused a crash because @@ -100055,7 +98251,7 @@ for debug only for tracking which frame an allocate happened in. 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -index a1970dc..3c619b4 100644 +index aeabbb1..f743702 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -983,7 +983,9 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd, dwc_otg_core_if_t * core_if) @@ -100090,7 +98286,7 @@ index a1970dc..3c619b4 100644 } diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h -index d3d6e997..80a3af2 100644 +index de1ccb1..0007fa1 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h @@ -577,8 +577,10 @@ struct dwc_otg_hcd { @@ -100107,7 +98303,7 @@ index d3d6e997..80a3af2 100644 /** Frame List DMA address */ dma_addr_t frame_list_dma; diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -index 765451b..dbff763 100644 +index 083b1c3..c76910d 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -1419,8 +1419,9 @@ static void release_channel(dwc_otg_hcd_t * hcd, @@ -100122,101 +98318,13 @@ index 765451b..dbff763 100644 } -- -1.8.1.6 +1.8.4 -From f2d66d64db0b312bfb9ae91d82ea1cfc1f3edf3b Mon Sep 17 00:00:00 2001 -From: Alexander Kolesen -Date: Mon, 22 Jul 2013 15:23:32 +0300 -Subject: [PATCH 101/113] bcm_vc_cma: create_proc_entry replaced by proc_create - -Commit 80e928f7 kills create_proc_entry, so need to get rid if it and replace by proc_create - -drivers/char/broadcom/vc_cma/vc_cma.c: In function 'vc_cma_init': -drivers/char/broadcom/vc_cma/vc_cma.c:1088:2: error: implicit declaration of function 'create_proc_entry' [-Werror=implicit-function-declaration] -drivers/char/broadcom/vc_cma/vc_cma.c:1088:20: error: assignment makes pointer from integer without a cast [-Werror] -drivers/char/broadcom/vc_cma/vc_cma.c:1095:19: error: dereferencing pointer to incomplete type -drivers/char/broadcom/vc_cma/vc_cma.c: In function 'vc_cma_exit': -drivers/char/broadcom/vc_cma/vc_cma.c:1134:38: error: dereferencing pointer to incomplete type -cc1: all warnings being treated as errors -distcc[13074] ERROR: compile drivers/char/broadcom/vc_cma/vc_cma.c on localhost failed -make[4]: *** [drivers/char/broadcom/vc_cma/vc_cma.o] Error 1 -make[3]: *** [drivers/char/broadcom/vc_cma] Error 2 -make[2]: *** [drivers/char/broadcom] Error 2 -make[1]: *** [drivers/char] Error 2 -make: *** [drivers] Error 2 ---- - drivers/char/broadcom/vc_cma/vc_cma.c | 10 ++++------ - 1 file changed, 4 insertions(+), 6 deletions(-) - -diff --git a/drivers/char/broadcom/vc_cma/vc_cma.c b/drivers/char/broadcom/vc_cma/vc_cma.c -index 6d8b4df..fe80887 100644 ---- a/drivers/char/broadcom/vc_cma/vc_cma.c -+++ b/drivers/char/broadcom/vc_cma/vc_cma.c -@@ -1085,15 +1085,13 @@ static int vc_cma_init(void) - goto out_class_destroy; - } - -- vc_cma_proc_entry = create_proc_entry(DRIVER_NAME, 0444, NULL); -+ vc_cma_proc_entry = proc_create(DRIVER_NAME, 0444, NULL, &vc_cma_proc_fops); - if (vc_cma_proc_entry == NULL) { - rc = -EFAULT; -- LOG_ERR("%s: create_proc_entry failed", __func__); -+ LOG_ERR("%s: proc_create failed", __func__); - goto out_device_destroy; - } -- -- vc_cma_proc_entry->proc_fops = &vc_cma_proc_fops; -- -+ - vc_cma_inited = 1; - return 0; - -@@ -1131,7 +1129,7 @@ static void __exit vc_cma_exit(void) - LOG_DBG("%s: called", __func__); - - if (vc_cma_inited) { -- remove_proc_entry(vc_cma_proc_entry->name, NULL); -+ remove_proc_entry(DRIVER_NAME, NULL); - device_destroy(vc_cma_class, vc_cma_devnum); - class_destroy(vc_cma_class); - cdev_del(&vc_cma_cdev); --- -1.8.1.6 - - -From 091b8bb04d9581126f3d04eb7796e5ab48daff26 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Tue, 23 Jul 2013 12:29:27 +0100 -Subject: [PATCH 102/113] config: Add back in CONFIG_TASKSTATS - ---- - arch/arm/configs/bcmrpi_defconfig | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index f488d9e..194c0d6 100644 ---- a/arch/arm/configs/bcmrpi_defconfig -+++ b/arch/arm/configs/bcmrpi_defconfig -@@ -8,6 +8,10 @@ CONFIG_NO_HZ=y - CONFIG_HIGH_RES_TIMERS=y - CONFIG_BSD_PROCESS_ACCT=y - CONFIG_BSD_PROCESS_ACCT_V3=y -+CONFIG_TASKSTATS=y -+CONFIG_TASK_DELAY_ACCT=y -+CONFIG_TASK_XACCT=y -+CONFIG_TASK_IO_ACCOUNTING=y - CONFIG_IKCONFIG=y - CONFIG_IKCONFIG_PROC=y - CONFIG_CGROUP_FREEZER=y --- -1.8.1.6 - - -From fb7d7d539d327f77c8ba789e68b9e6e512151e07 Mon Sep 17 00:00:00 2001 +From e866cf025cd42df58ab2068cba237a803d28531b Mon Sep 17 00:00:00 2001 From: P33M Date: Tue, 23 Jul 2013 14:15:32 +0100 -Subject: [PATCH 103/113] dwc_otg: make channel halts with unknown state less +Subject: [PATCH 89/98] dwc_otg: make channel halts with unknown state less damaging If the IRQ received a channel halt interrupt through the FIQ @@ -100229,7 +98337,7 @@ Add catchall handling to treat as a transaction error and retry. 1 file changed, 12 insertions(+) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -index dbff763..488defb 100644 +index c76910d..5fd8613 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -2578,12 +2578,24 @@ static void handle_hc_chhltd_intr_dma(dwc_otg_hcd_t * hcd, @@ -100258,13 +98366,13 @@ index dbff763..488defb 100644 } -- -1.8.1.6 +1.8.4 -From c20d78831a20a6c56d7a49b15ce826951aa9d4a9 Mon Sep 17 00:00:00 2001 +From 3394d2d3d4ff0a694a76fe67ab822eee30531aa7 Mon Sep 17 00:00:00 2001 From: P33M Date: Tue, 30 Jul 2013 09:58:48 +0100 -Subject: [PATCH 104/113] dwc_otg: fiq_split: use TTs with more granularity +Subject: [PATCH 90/98] dwc_otg: fiq_split: use TTs with more granularity This fixes certain issues with split transaction scheduling. @@ -100282,7 +98390,7 @@ This commit will mainly affect USB audio playback. 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -index 3c619b4..c42172f 100644 +index f743702..489b765 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -1356,6 +1356,7 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) @@ -100337,7 +98445,7 @@ index 3c619b4..c42172f 100644 } hcd->available_host_channels--; diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -index 488defb..7d521d9 100644 +index 5fd8613..a959a49 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -1328,10 +1328,20 @@ static void release_channel(dwc_otg_hcd_t * hcd, @@ -100351,7 +98459,7 @@ index 488defb..7d521d9 100644 + if(fiq_split_enable && hc->do_split) { + if(!hc->ep_is_in && hc->ep_type == UE_ISOCHRONOUS) { -+ if(hc->xact_pos == DWC_HCSPLIT_XACTPOS_MID || ++ if(hc->xact_pos == DWC_HCSPLIT_XACTPOS_MID || + hc->xact_pos == DWC_HCSPLIT_XACTPOS_BEGIN) { + hog_port = 1; + } @@ -100381,13 +98489,13 @@ index 488defb..7d521d9 100644 /* Try to queue more transfers now that there's a free channel. */ -- -1.8.1.6 +1.8.4 -From fbf9d1e976d66a8c78a378c81dfba9151c8ded51 Mon Sep 17 00:00:00 2001 +From b1bfbb1915325d7eca03e33659ff90eb07062d66 Mon Sep 17 00:00:00 2001 From: Matthew Hails Date: Mon, 13 May 2013 14:22:48 +0100 -Subject: [PATCH 105/113] VCHIQ: Fix mem leak of USER_SERVICE_T objects. +Subject: [PATCH 91/98] VCHIQ: Fix mem leak of USER_SERVICE_T objects. The userdata for VCHIQ services created through the ioctl API is a kmalloced structure. These objects were getting leaked, most @@ -100559,13 +98667,13 @@ index 62965c6..be9735f 100644 if (service) { status = vchiq_open_service_internal(service, current->pid); -- -1.8.1.6 +1.8.4 -From 52777010e9f8db211007f48ef03a2d4bd5af5977 Mon Sep 17 00:00:00 2001 +From abaa5025cfedb517ae41bf312522c475a18119bc Mon Sep 17 00:00:00 2001 From: Philip Taylor Date: Tue, 28 May 2013 17:20:49 +0100 -Subject: [PATCH 106/113] vchiq_util: Fix race condition in push/pop +Subject: [PATCH 92/98] vchiq_util: Fix race condition in push/pop The lack of memory barriers could (very rarely) result in vchiu_queue_pop reading the next value before it had been written @@ -100635,13 +98743,13 @@ index 03cece571b..c2eefef 100644 up(&queue->pop); -- -1.8.1.6 +1.8.4 -From 6d41e9434fda6ce8b3cc965d03e5ad8c440f0b40 Mon Sep 17 00:00:00 2001 +From 8a46856b89047002657183e23e10f95c62b183f7 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 2 Aug 2013 10:04:18 +0100 -Subject: [PATCH 107/113] dwc_otg: fix potential sleep while atomic during urb +Subject: [PATCH 93/98] dwc_otg: fix potential sleep while atomic during urb enqueue Fixes a regression introduced with eb1b482a. Kmalloc called from @@ -100653,7 +98761,7 @@ critical section. 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c -index ad03ff1..80690f9 100644 +index 87e517d..88c0544 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c @@ -781,8 +781,7 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd, @@ -100667,13 +98775,13 @@ index ad03ff1..80690f9 100644 if (alloc_bandwidth) { allocate_bus_bandwidth(hcd, -- -1.8.1.6 +1.8.4 -From 05eea29e29f313323299bf5a23e7fa18bb5b57cf Mon Sep 17 00:00:00 2001 +From e645415e6b6bb20411efa607fcd6255074cd256a Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 5 Aug 2013 11:42:12 +0100 -Subject: [PATCH 108/113] dwc_otg: make fiq_split_enable imply fiq_fix_enable +Subject: [PATCH 94/98] dwc_otg: make fiq_split_enable imply fiq_fix_enable Failing to set up the FIQ correctly would result in "IRQ 32: nobody cared" errors in dmesg. @@ -100682,7 +98790,7 @@ Failing to set up the FIQ correctly would result in 1 file changed, 6 insertions(+) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_otg/dwc_otg_driver.c -index 6c89a69..4735f51 100644 +index 176dc14..f06c3d2 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_driver.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c @@ -1070,6 +1070,12 @@ static int __init dwc_otg_driver_init(void) @@ -100699,13 +98807,13 @@ index 6c89a69..4735f51 100644 DWC_DRIVER_VERSION, #ifdef LM_INTERFACE -- -1.8.1.6 +1.8.4 -From 2a097e935336c7db990f856599864533d6d5fbb7 Mon Sep 17 00:00:00 2001 +From 69f33fc4b90b0a5daa5f23186726e1deea5c4945 Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 5 Aug 2013 11:47:12 +0100 -Subject: [PATCH 109/113] dwc_otg: prevent crashes on host port disconnects +Subject: [PATCH 95/98] dwc_otg: prevent crashes on host port disconnects Fix several issues resulting in crashes or inconsistent state if a Model A root port was disconnected. @@ -100730,7 +98838,7 @@ if a Model A root port was disconnected. 3 files changed, 48 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -index c42172f..be1d25b 100644 +index 489b765..1904f6a 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -59,6 +59,11 @@ @@ -100828,7 +98936,7 @@ index c42172f..be1d25b 100644 dwc_otg_hcd->fops->disconnect(dwc_otg_hcd); } diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -index 7d521d9..19abea0 100644 +index a959a49..3a549a1 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -2660,6 +2660,13 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc_otg_hcd_t * dwc_otg_hcd, uint32_t num) @@ -100846,7 +98954,7 @@ index 7d521d9..19abea0 100644 hcint.d32 = DWC_READ_REG32(&hc_regs->hcint); diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c -index 80690f9..0d49b50 100644 +index 88c0544..ae4271a 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c @@ -309,6 +309,9 @@ static int _complete(dwc_otg_hcd_t * hcd, void *urb_handle, @@ -100860,13 +98968,13 @@ index 80690f9..0d49b50 100644 if (status) { DWC_PRINTF("Uknown urb status %d\n", status); -- -1.8.1.6 +1.8.4 -From c10aa3b9d00e8c63a8c2166ec9a4fd34a1101544 Mon Sep 17 00:00:00 2001 +From 1b35f8f34cfe123a2acd0fbb6ebced1f41c74b1f Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 5 Aug 2013 13:17:58 +0100 -Subject: [PATCH 110/113] dwc_otg: prevent leaking URBs during enqueue +Subject: [PATCH 96/98] dwc_otg: prevent leaking URBs during enqueue A dwc_otg_urb would get leaked if the HCD enqueue function failed for any reason. Free the URB at the appropriate points. @@ -100875,7 +98983,7 @@ failed for any reason. Free the URB at the appropriate points. 1 file changed, 8 insertions(+) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c -index 0d49b50..d3949da 100644 +index ae4271a..ee8eec9 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c @@ -797,11 +797,19 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd, @@ -100899,126 +99007,42 @@ index 0d49b50..d3949da 100644 return retval; } -- -1.8.1.6 +1.8.4 -From 2baec0f9a0dbfd601908318a523383004bea123c Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Thu, 15 Aug 2013 15:24:40 +0100 -Subject: [PATCH 111/113] Increase to CONFIG_MMC_BLOCK_MINORS=32 and enable - CONFIG_JUMP_LABEL See: https://github.com/raspberrypi/linux/pull/348 - ---- - arch/arm/configs/bcmrpi_defconfig | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig -index 194c0d6..1a97514 100644 ---- a/arch/arm/configs/bcmrpi_defconfig -+++ b/arch/arm/configs/bcmrpi_defconfig -@@ -27,6 +27,7 @@ CONFIG_SLAB=y - CONFIG_PROFILING=y - CONFIG_OPROFILE=m - CONFIG_KPROBES=y -+CONFIG_JUMP_LABEL=y - CONFIG_MODULES=y - CONFIG_MODULE_UNLOAD=y - CONFIG_MODVERSIONS=y -@@ -581,6 +582,7 @@ CONFIG_USB_TEST=m - CONFIG_USB_ISIGHTFW=m - CONFIG_USB_YUREX=m - CONFIG_MMC=y -+CONFIG_MMC_BLOCK_MINORS=32 - CONFIG_MMC_SDHCI=y - CONFIG_MMC_SDHCI_PLTFM=y - CONFIG_MMC_SDHCI_BCM2708=y --- -1.8.1.6 - - -From b9af5161cac76a91b14dba869a1ed5f8169aa226 Mon Sep 17 00:00:00 2001 -From: Russell King -Date: Thu, 8 Aug 2013 11:51:21 +0100 -Subject: [PATCH 112/113] ARM: Fix FIQ code on VIVT CPUs - -Aaro Koskinen reports the following oops: -Installing fiq handler from c001b110, length 0x164 -Unable to handle kernel paging request at virtual address ffff1224 -pgd = c0004000 -[ffff1224] *pgd=00000000, *pte=11fff0cb, *ppte=11fff00a -... -[] (set_fiq_handler+0x0/0x6c) from [] (ams_delta_init_fiq+0xa8/0x160) - r6:00000164 r5:c001b110 r4:00000000 r3:fefecb4c -[] (ams_delta_init_fiq+0x0/0x160) from [] (ams_delta_init+0xd4/0x114) - r6:00000000 r5:fffece10 r4:c037a9e0 -[] (ams_delta_init+0x0/0x114) from [] (customize_machine+0x24/0x30) - -This is because the vectors page is now write-protected, and to change -code in there we must write to its original alias. Make that change, -and adjust the cache flushing such that the code will become visible -to the instruction stream on VIVT CPUs. - -Reported-by: Aaro Koskinen -Tested-by: Aaro Koskinen -Signed-off-by: Russell King ---- - arch/arm/kernel/fiq.c | 8 ++------ - 1 file changed, 2 insertions(+), 6 deletions(-) - -diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c -index 74ff4ba..9ac7935 100644 ---- a/arch/arm/kernel/fiq.c -+++ b/arch/arm/kernel/fiq.c -@@ -84,17 +84,13 @@ int show_fiq_list(struct seq_file *p, int prec) - - void set_fiq_handler(void *start, unsigned int length) - { --#if defined(CONFIG_CPU_USE_DOMAINS) -- void *base = (void *)0xffff0000; --#else - void *base = vectors_page; --#endif - unsigned offset = FIQ_OFFSET; - - memcpy(base + offset, start, length); -+ if (!cache_is_vipt_nonaliasing()) -+ flush_icache_range(base + offset, offset + length); - flush_icache_range(0xffff0000 + offset, 0xffff0000 + offset + length); -- if (!vectors_high()) -- flush_icache_range(offset, offset + length); - } - - int claim_fiq(struct fiq_handler *f) --- -1.8.1.6 - - -From 2ed7ca02343ab6d10262f99fcf2b4e189d1aabed Mon Sep 17 00:00:00 2001 +From 9f8c1e55a0726ab617725053a499d257bc013ffa Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 19 Aug 2013 15:21:22 +0100 -Subject: [PATCH 113/113] Changes for new NOOBS multi partition booting from - gsh +Subject: [PATCH 97/98] Changes for new NOOBS multi partition booting from gsh --- - arch/arm/kernel/process.c | 2 +- - arch/arm/mach-bcm2708/bcm2708.c | 52 +++++++++++++++++++++++++++++++++-------- - 2 files changed, 43 insertions(+), 11 deletions(-) + arch/arm/kernel/process.c | 10 ++++++++ + arch/arm/mach-bcm2708/bcm2708.c | 56 ++++++++++++++++++++++++++++++++--------- + 2 files changed, 54 insertions(+), 12 deletions(-) diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c -index 5bc2615..1b06c55 100644 +index 94f6b05..dd67686 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c -@@ -174,7 +174,7 @@ void arch_cpu_idle(void) +@@ -176,6 +176,16 @@ void arch_cpu_idle(void) default_idle(); } --static char reboot_mode = 'h'; -+char reboot_mode = 'h'; - - int __init reboot_setup(char *str) - { ++char bcm2708_reboot_mode = 'h'; ++ ++int __init reboot_setup(char *str) ++{ ++ bcm2708_reboot_mode = str[0]; ++ return 1; ++} ++ ++__setup("reboot=", reboot_setup); ++ + /* + * Called by kexec, immediately prior to machine_kexec(). + * diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c -index 68c577a..5662c1a 100644 +index 68c577a..3fe7626 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c @@ -83,6 +83,7 @@ @@ -101029,12 +99053,13 @@ index 68c577a..5662c1a 100644 static void __init bcm2708_init_led(void); -@@ -624,20 +625,42 @@ int __init bcm_register_device(struct platform_device *pdev) +@@ -624,20 +625,43 @@ int __init bcm_register_device(struct platform_device *pdev) return ret; } +-static void bcm2708_restart(char mode, const char *cmd) +int calc_rsts(int partition) -+{ + { + return PM_PASSWORD | + ((partition & (1 << 0)) << 0) | + ((partition & (1 << 1)) << 1) | @@ -101044,15 +99069,17 @@ index 68c577a..5662c1a 100644 + ((partition & (1 << 5)) << 5); +} + - static void bcm2708_restart(char mode, const char *cmd) - { ++static void bcm2708_restart(enum reboot_mode mode, const char *cmd) ++{ ++ extern char bcm2708_reboot_mode; uint32_t pm_rstc, pm_wdog; uint32_t timeout = 10; + uint32_t pm_rsts = 0; - /* For quick reset notification add reboot=q to cmdline - */ - if(mode == 'q') +- if(mode == 'q') ++ if(bcm2708_reboot_mode == 'q') { - uint32_t pm_rsts = readl(__io_address(PM_RSTS)); + // NOOBS < 1.3 booting with reboot=q @@ -101060,7 +99087,7 @@ index 68c577a..5662c1a 100644 pm_rsts = PM_PASSWORD | pm_rsts | PM_RSTS_HADWRQ_SET; - writel(pm_rsts, __io_address(PM_RSTS)); + } -+ else if(mode == 'p') ++ else if(bcm2708_reboot_mode == 'p') + { + // NOOBS < 1.3 halting + pm_rsts = readl(__io_address(PM_RSTS)); @@ -101076,7 +99103,7 @@ index 68c577a..5662c1a 100644 /* Setup watchdog for reset */ pm_rstc = readl(__io_address(PM_RSTC)); -@@ -651,12 +674,20 @@ static void bcm2708_restart(char mode, const char *cmd) +@@ -651,12 +675,19 @@ static void bcm2708_restart(char mode, const char *cmd) /* We can't really power off, but if we do the normal reset scheme, and indicate to bootcode.bin not to reboot, then most of the chip will be powered off */ static void bcm2708_power_off(void) { @@ -101086,9 +99113,8 @@ index 68c577a..5662c1a 100644 - writel(pm_rsts, __io_address(PM_RSTS)); - /* continue with normal reset mechanism */ - bcm2708_restart(0, ""); -+ extern char reboot_mode; -+ -+ if(reboot_mode == 'q') ++ extern char bcm2708_reboot_mode; ++ if(bcm2708_reboot_mode == 'q') + { + // NOOBS < v1.3 + bcm2708_restart('p', ""); @@ -101109,5 +99135,43 @@ index 68c577a..5662c1a 100644 module_param(uart_clock, uint, 0644); +module_param(reboot_part, uint, 0644); -- -1.8.1.6 +1.8.4 + + +From d7474694bdc9836af17f4b4d839509f9aad7ffa7 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 20 Mar 2013 09:58:21 +0000 +Subject: [PATCH 98/98] SW-11786: Fix USE_AFTER_FREE defect (61220) + +In the error paths of parse_open, only unlock the service if it is not +NULL. In the fail path, NULL the service after it is unlocked to +prevent a double unlock. +--- + drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c +index 9f66704..f35ed4f 100644 +--- a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c ++++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c +@@ -1492,6 +1492,7 @@ static const char *msg_type_str(unsigned int msg_type) + version, version_min); + vchiq_loud_error_footer(); + unlock_service(service); ++ service = NULL; + goto fail_open; + } + service->peer_version = version; +@@ -1557,7 +1558,8 @@ static const char *msg_type_str(unsigned int msg_type) + return 1; + + bail_not_ready: +- unlock_service(service); ++ if (service) ++ unlock_service(service); + + return 0; + } +-- +1.8.4