1
0
Files
Greg Kroah-Hartman 6e3051fb4d Merge 4.9.236 into android-4.9-q
Changes in 4.9.236
	HID: core: Correctly handle ReportSize being zero
	HID: core: Sanitize event code and type when mapping input
	perf record/stat: Explicitly call out event modifiers in the documentation
	hwmon: (applesmc) check status earlier.
	nvmet: Disable keep-alive timer when kato is cleared to 0h
	ceph: don't allow setlease on cephfs
	s390: don't trace preemption in percpu macros
	xen/xenbus: Fix granting of vmalloc'd memory
	dmaengine: of-dma: Fix of_dma_router_xlate's of_dma_xlate handling
	batman-adv: Avoid uninitialized chaddr when handling DHCP
	batman-adv: bla: use netif_rx_ni when not in interrupt context
	dmaengine: at_hdmac: check return value of of_find_device_by_node() in at_dma_xlate()
	MIPS: mm: BMIPS5000 has inclusive physical caches
	MIPS: BMIPS: Also call bmips_cpu_setup() for secondary cores
	netfilter: nf_tables: add NFTA_SET_USERDATA if not null
	netfilter: nf_tables: incorrect enum nft_list_attributes definition
	netfilter: nf_tables: fix destination register zeroing
	net: hns: Fix memleak in hns_nic_dev_probe
	ravb: Fixed to be able to unload modules
	net: arc_emac: Fix memleak in arc_mdio_probe
	dmaengine: pl330: Fix burst length if burst size is smaller than bus width
	bnxt_en: Check for zero dir entries in NVRAM.
	bnxt_en: Fix PCI AER error recovery flow
	fix regression in "epoll: Keep a reference on files added to the check list"
	tg3: Fix soft lockup when tg3_reset_task() fails.
	iommu/vt-d: Serialize IOMMU GCMD register modifications
	thermal: ti-soc-thermal: Fix bogus thermal shutdowns for omap4430
	include/linux/log2.h: add missing () around n in roundup_pow_of_two()
	btrfs: drop path before adding new uuid tree entry
	btrfs: Remove redundant extent_buffer_get in get_old_root
	btrfs: Remove extraneous extent_buffer_get from tree_mod_log_rewind
	btrfs: set the lockdep class for log tree extent buffers
	uaccess: Add non-pagefault user-space read functions
	uaccess: Add non-pagefault user-space write function
	btrfs: fix potential deadlock in the search ioctl
	net: usb: qmi_wwan: add Telit 0x1050 composition
	drivers: net: usb: qmi_wwan: add QMI_QUIRK_SET_DTR for Telit PID 0x1201
	qmi_wwan: new Telewell and Sierra device IDs
	usb: qmi_wwan: add D-Link DWM-222 A2 device ID
	ALSA: ca0106: fix error code handling
	ALSA: pcm: oss: Remove superfluous WARN_ON() for mulaw sanity check
	ALSA: firewire-digi00x: exclude Avid Adrenaline from detection
	block: allow for_each_bvec to support zero len bvec
	block: Move SECTOR_SIZE and SECTOR_SHIFT definitions into <linux/blkdev.h>
	libata: implement ATA_HORKAGE_MAX_TRIM_128M and apply to Sandisks
	dm cache metadata: Avoid returning cmd->bm wild pointer on error
	dm thin metadata: Avoid returning cmd->bm wild pointer on error
	mm: slub: fix conversion of freelist_corrupted()
	vfio/type1: Support faulting PFNMAP vmas
	vfio-pci: Fault mmaps to enable vma tracking
	vfio-pci: Invalidate mmaps and block MMIO access on disabled memory
	KVM: arm64: Add kvm_extable for vaxorcism code
	KVM: arm64: Defer guest entry when an asynchronous exception is pending
	KVM: arm64: Survive synchronous exceptions caused by AT instructions
	KVM: arm64: Set HCR_EL2.PTW to prevent AT taking synchronous exception
	net: refactor bind_bucket fastreuse into helper
	net: initialize fastreuse on inet_inherit_port
	vfio/pci: Fix SR-IOV VF handling with MMIO blocking
	checkpatch: fix the usage of capture group ( ... )
	mm/hugetlb: fix a race between hugetlb sysctl handlers
	cfg80211: regulatory: reject invalid hints
	net: usb: Fix uninit-was-stored issue in asix_read_phy_addr()
	ALSA; firewire-tascam: exclude Tascam FE-8 from detection
	fs/affs: use octal for permissions
	affs: fix basic permission bits to actually work
	net: ethernet: mlx4: Fix memory allocation in mlx4_buddy_init()
	bnxt: don't enable NAPI until rings are ready
	netlabel: fix problems with mapping removal
	sctp: not disable bh in the whole sctp_get_port_local()
	net: disable netpoll on fresh napis
	Linux 4.9.236

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I707909fadc45a09f6ecdacb81a294421af163664
2020-09-12 21:03:26 +03:00

180 lines
5.2 KiB
C

/*
* OMAP4xxx bandgap registers, bitfields and temperature definitions
*
* Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
* Contact:
* Eduardo Valentin <eduardo.valentin@ti.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
#ifndef __OMAP4XXX_BANDGAP_H
#define __OMAP4XXX_BANDGAP_H
/**
* *** OMAP4430 ***
*
* Below, in sequence, are the Register definitions,
* the bitfields and the temperature definitions for OMAP4430.
*/
/**
* OMAP4430 register definitions
*
* Registers are defined as offsets. The offsets are
* relative to FUSE_OPP_BGAP on 4430.
*/
/* OMAP4430.FUSE_OPP_BGAP */
#define OMAP4430_FUSE_OPP_BGAP 0x0
/* OMAP4430.TEMP_SENSOR */
#define OMAP4430_TEMP_SENSOR_CTRL_OFFSET 0xCC
/**
* Register and bit definitions for OMAP4430
*
* All the macros bellow define the required bits for
* controlling temperature on OMAP4430. Bit defines are
* grouped by register.
*/
/* OMAP4430.TEMP_SENSOR bits */
#define OMAP4430_BGAP_TEMPSOFF_MASK BIT(12)
#define OMAP4430_BGAP_TSHUT_MASK BIT(11)
#define OMAP4430_SINGLE_MODE_MASK BIT(10)
#define OMAP4430_BGAP_TEMP_SENSOR_SOC_MASK BIT(9)
#define OMAP4430_BGAP_TEMP_SENSOR_EOCZ_MASK BIT(8)
#define OMAP4430_BGAP_TEMP_SENSOR_DTEMP_MASK (0xff << 0)
/**
* Temperature limits and thresholds for OMAP4430
*
* All the macros bellow are definitions for handling the
* ADC conversions and representation of temperature limits
* and thresholds for OMAP4430.
*/
/*
* ADC conversion table limits. Ignore values outside the TRM listed
* range to avoid bogus thermal shutdowns. See omap4430 TRM chapter
* "18.4.10.2.3 ADC Codes Versus Temperature".
*/
#define OMAP4430_ADC_START_VALUE 13
#define OMAP4430_ADC_END_VALUE 107
/* bandgap clock limits (no control on 4430) */
#define OMAP4430_MAX_FREQ 32768
#define OMAP4430_MIN_FREQ 32768
/* sensor limits */
#define OMAP4430_MIN_TEMP -40000
#define OMAP4430_MAX_TEMP 125000
#define OMAP4430_HYST_VAL 5000
/**
* *** OMAP4460 *** Applicable for OMAP4470
*
* Below, in sequence, are the Register definitions,
* the bitfields and the temperature definitions for OMAP4460.
*/
/**
* OMAP4460 register definitions
*
* Registers are defined as offsets. The offsets are
* relative to FUSE_OPP_BGAP on 4460.
*/
/* OMAP4460.FUSE_OPP_BGAP */
#define OMAP4460_FUSE_OPP_BGAP 0x0
/* OMAP4460.TEMP_SENSOR */
#define OMAP4460_TEMP_SENSOR_CTRL_OFFSET 0xCC
/* OMAP4460.BANDGAP_CTRL */
#define OMAP4460_BGAP_CTRL_OFFSET 0x118
/* OMAP4460.BANDGAP_COUNTER */
#define OMAP4460_BGAP_COUNTER_OFFSET 0x11C
/* OMAP4460.BANDGAP_THRESHOLD */
#define OMAP4460_BGAP_THRESHOLD_OFFSET 0x120
/* OMAP4460.TSHUT_THRESHOLD */
#define OMAP4460_BGAP_TSHUT_OFFSET 0x124
/* OMAP4460.BANDGAP_STATUS */
#define OMAP4460_BGAP_STATUS_OFFSET 0x128
/**
* Register bitfields for OMAP4460
*
* All the macros bellow define the required bits for
* controlling temperature on OMAP4460. Bit defines are
* grouped by register.
*/
/* OMAP4460.TEMP_SENSOR bits */
#define OMAP4460_BGAP_TEMPSOFF_MASK BIT(13)
#define OMAP4460_BGAP_TEMP_SENSOR_SOC_MASK BIT(11)
#define OMAP4460_BGAP_TEMP_SENSOR_EOCZ_MASK BIT(10)
#define OMAP4460_BGAP_TEMP_SENSOR_DTEMP_MASK (0x3ff << 0)
/* OMAP4460.BANDGAP_CTRL bits */
#define OMAP4460_SINGLE_MODE_MASK BIT(31)
#define OMAP4460_MASK_HOT_MASK BIT(1)
#define OMAP4460_MASK_COLD_MASK BIT(0)
/* OMAP4460.BANDGAP_COUNTER bits */
#define OMAP4460_COUNTER_MASK (0xffffff << 0)
/* OMAP4460.BANDGAP_THRESHOLD bits */
#define OMAP4460_T_HOT_MASK (0x3ff << 16)
#define OMAP4460_T_COLD_MASK (0x3ff << 0)
/* OMAP4460.TSHUT_THRESHOLD bits */
#define OMAP4460_TSHUT_HOT_MASK (0x3ff << 16)
#define OMAP4460_TSHUT_COLD_MASK (0x3ff << 0)
/* OMAP4460.BANDGAP_STATUS bits */
#define OMAP4460_CLEAN_STOP_MASK BIT(3)
#define OMAP4460_BGAP_ALERT_MASK BIT(2)
#define OMAP4460_HOT_FLAG_MASK BIT(1)
#define OMAP4460_COLD_FLAG_MASK BIT(0)
/**
* Temperature limits and thresholds for OMAP4460
*
* All the macros bellow are definitions for handling the
* ADC conversions and representation of temperature limits
* and thresholds for OMAP4460.
*/
/* ADC conversion table limits */
#define OMAP4460_ADC_START_VALUE 530
#define OMAP4460_ADC_END_VALUE 932
/* bandgap clock limits */
#define OMAP4460_MAX_FREQ 1500000
#define OMAP4460_MIN_FREQ 1000000
/* sensor limits */
#define OMAP4460_MIN_TEMP -40000
#define OMAP4460_MAX_TEMP 123000
#define OMAP4460_HYST_VAL 5000
/* interrupts thresholds */
#define OMAP4460_TSHUT_HOT 900 /* 122 deg C */
#define OMAP4460_TSHUT_COLD 895 /* 100 deg C */
#define OMAP4460_T_HOT 800 /* 73 deg C */
#define OMAP4460_T_COLD 795 /* 71 deg C */
#endif /* __OMAP4XXX_BANDGAP_H */