Merge branch 'devel-cleanup' into omap-for-linus
Conflicts: arch/arm/mach-omap2/timer-gp.c
This commit is contained in:
commit
12d7d4e0ed
|
@ -28,6 +28,7 @@ modules.builtin
|
|||
*.gz
|
||||
*.bz2
|
||||
*.lzma
|
||||
*.xz
|
||||
*.lzo
|
||||
*.patch
|
||||
*.gcno
|
||||
|
|
|
@ -82,6 +82,11 @@
|
|||
</sect1>
|
||||
</chapter>
|
||||
|
||||
<chapter id="fs_events">
|
||||
<title>Events based on file descriptors</title>
|
||||
!Efs/eventfd.c
|
||||
</chapter>
|
||||
|
||||
<chapter id="sysfs">
|
||||
<title>The Filesystem for Exporting Kernel Objects</title>
|
||||
!Efs/sysfs/file.c
|
||||
|
|
|
@ -51,7 +51,8 @@ Supported chips:
|
|||
* JEDEC JC 42.4 compliant temperature sensor chips
|
||||
Prefix: 'jc42'
|
||||
Addresses scanned: I2C 0x18 - 0x1f
|
||||
Datasheet: -
|
||||
Datasheet:
|
||||
http://www.jedec.org/sites/default/files/docs/4_01_04R19.pdf
|
||||
|
||||
Author:
|
||||
Guenter Roeck <guenter.roeck@ericsson.com>
|
||||
|
@ -60,7 +61,11 @@ Author:
|
|||
Description
|
||||
-----------
|
||||
|
||||
This driver implements support for JEDEC JC 42.4 compliant temperature sensors.
|
||||
This driver implements support for JEDEC JC 42.4 compliant temperature sensors,
|
||||
which are used on many DDR3 memory modules for mobile devices and servers. Some
|
||||
systems use the sensor to prevent memory overheating by automatically throttling
|
||||
the memory controller.
|
||||
|
||||
The driver auto-detects the chips listed above, but can be manually instantiated
|
||||
to support other JC 42.4 compliant chips.
|
||||
|
||||
|
@ -81,15 +86,19 @@ limits. The chip supports only a single register to configure the hysteresis,
|
|||
which applies to all limits. This register can be written by writing into
|
||||
temp1_crit_hyst. Other hysteresis attributes are read-only.
|
||||
|
||||
If the BIOS has configured the sensor for automatic temperature management, it
|
||||
is likely that it has locked the registers, i.e., that the temperature limits
|
||||
cannot be changed.
|
||||
|
||||
Sysfs entries
|
||||
-------------
|
||||
|
||||
temp1_input Temperature (RO)
|
||||
temp1_min Minimum temperature (RW)
|
||||
temp1_max Maximum temperature (RW)
|
||||
temp1_crit Critical high temperature (RW)
|
||||
temp1_min Minimum temperature (RO or RW)
|
||||
temp1_max Maximum temperature (RO or RW)
|
||||
temp1_crit Critical high temperature (RO or RW)
|
||||
|
||||
temp1_crit_hyst Critical hysteresis temperature (RW)
|
||||
temp1_crit_hyst Critical hysteresis temperature (RO or RW)
|
||||
temp1_max_hyst Maximum hysteresis temperature (RO)
|
||||
|
||||
temp1_min_alarm Temperature low alarm
|
||||
|
|
|
@ -9,6 +9,8 @@ Supported chips:
|
|||
Socket S1G3: Athlon II, Sempron, Turion II
|
||||
* AMD Family 11h processors:
|
||||
Socket S1G2: Athlon (X2), Sempron (X2), Turion X2 (Ultra)
|
||||
* AMD Family 12h processors: "Llano"
|
||||
* AMD Family 14h processors: "Brazos" (C/E/G-Series)
|
||||
|
||||
Prefix: 'k10temp'
|
||||
Addresses scanned: PCI space
|
||||
|
@ -17,10 +19,14 @@ Supported chips:
|
|||
http://support.amd.com/us/Processor_TechDocs/31116.pdf
|
||||
BIOS and Kernel Developer's Guide (BKDG) for AMD Family 11h Processors:
|
||||
http://support.amd.com/us/Processor_TechDocs/41256.pdf
|
||||
BIOS and Kernel Developer's Guide (BKDG) for AMD Family 14h Models 00h-0Fh Processors:
|
||||
http://support.amd.com/us/Processor_TechDocs/43170.pdf
|
||||
Revision Guide for AMD Family 10h Processors:
|
||||
http://support.amd.com/us/Processor_TechDocs/41322.pdf
|
||||
Revision Guide for AMD Family 11h Processors:
|
||||
http://support.amd.com/us/Processor_TechDocs/41788.pdf
|
||||
Revision Guide for AMD Family 14h Models 00h-0Fh Processors:
|
||||
http://support.amd.com/us/Processor_TechDocs/47534.pdf
|
||||
AMD Family 11h Processor Power and Thermal Data Sheet for Notebooks:
|
||||
http://support.amd.com/us/Processor_TechDocs/43373.pdf
|
||||
AMD Family 10h Server and Workstation Processor Power and Thermal Data Sheet:
|
||||
|
@ -34,7 +40,7 @@ Description
|
|||
-----------
|
||||
|
||||
This driver permits reading of the internal temperature sensor of AMD
|
||||
Family 10h and 11h processors.
|
||||
Family 10h/11h/12h/14h processors.
|
||||
|
||||
All these processors have a sensor, but on those for Socket F or AM2+,
|
||||
the sensor may return inconsistent values (erratum 319). The driver
|
||||
|
|
|
@ -144,6 +144,11 @@ a fixed number of characters. This limit depends on the architecture
|
|||
and is between 256 and 4096 characters. It is defined in the file
|
||||
./include/asm/setup.h as COMMAND_LINE_SIZE.
|
||||
|
||||
Finally, the [KMG] suffix is commonly described after a number of kernel
|
||||
parameter values. These 'K', 'M', and 'G' letters represent the _binary_
|
||||
multipliers 'Kilo', 'Mega', and 'Giga', equalling 2^10, 2^20, and 2^30
|
||||
bytes respectively. Such letter suffixes can also be entirely omitted.
|
||||
|
||||
|
||||
acpi= [HW,ACPI,X86]
|
||||
Advanced Configuration and Power Interface
|
||||
|
@ -545,16 +550,20 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||
Format:
|
||||
<first_slot>,<last_slot>,<port>,<enum_bit>[,<debug>]
|
||||
|
||||
crashkernel=nn[KMG]@ss[KMG]
|
||||
[KNL] Reserve a chunk of physical memory to
|
||||
hold a kernel to switch to with kexec on panic.
|
||||
crashkernel=size[KMG][@offset[KMG]]
|
||||
[KNL] Using kexec, Linux can switch to a 'crash kernel'
|
||||
upon panic. This parameter reserves the physical
|
||||
memory region [offset, offset + size] for that kernel
|
||||
image. If '@offset' is omitted, then a suitable offset
|
||||
is selected automatically. Check
|
||||
Documentation/kdump/kdump.txt for further details.
|
||||
|
||||
crashkernel=range1:size1[,range2:size2,...][@offset]
|
||||
[KNL] Same as above, but depends on the memory
|
||||
in the running system. The syntax of range is
|
||||
start-[end] where start and end are both
|
||||
a memory unit (amount[KMG]). See also
|
||||
Documentation/kdump/kdump.txt for a example.
|
||||
Documentation/kdump/kdump.txt for an example.
|
||||
|
||||
cs89x0_dma= [HW,NET]
|
||||
Format: <dma>
|
||||
|
@ -1262,10 +1271,9 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||
6 (KERN_INFO) informational
|
||||
7 (KERN_DEBUG) debug-level messages
|
||||
|
||||
log_buf_len=n Sets the size of the printk ring buffer, in bytes.
|
||||
Format: { n | nk | nM }
|
||||
n must be a power of two. The default size
|
||||
is set in the kernel config file.
|
||||
log_buf_len=n[KMG] Sets the size of the printk ring buffer,
|
||||
in bytes. n must be a power of two. The default
|
||||
size is set in the kernel config file.
|
||||
|
||||
logo.nologo [FB] Disables display of the built-in Linux logo.
|
||||
This may be used to provide more screen space for
|
||||
|
|
|
@ -4,6 +4,8 @@ obj- := dummy.o
|
|||
# List of programs to build
|
||||
hostprogs-y := ifenslave
|
||||
|
||||
HOSTCFLAGS_ifenslave.o += -I$(objtree)/usr/include
|
||||
|
||||
# Tell kbuild to always build the programs
|
||||
always := $(hostprogs-y)
|
||||
|
||||
|
|
|
@ -190,9 +190,9 @@ resources, scheduled and executed.
|
|||
* Long running CPU intensive workloads which can be better
|
||||
managed by the system scheduler.
|
||||
|
||||
WQ_FREEZEABLE
|
||||
WQ_FREEZABLE
|
||||
|
||||
A freezeable wq participates in the freeze phase of the system
|
||||
A freezable wq participates in the freeze phase of the system
|
||||
suspend operations. Work items on the wq are drained and no
|
||||
new work item starts execution until thawed.
|
||||
|
||||
|
|
14
MAINTAINERS
14
MAINTAINERS
|
@ -885,7 +885,7 @@ S: Supported
|
|||
|
||||
ARM/QUALCOMM MSM MACHINE SUPPORT
|
||||
M: David Brown <davidb@codeaurora.org>
|
||||
M: Daniel Walker <dwalker@codeaurora.org>
|
||||
M: Daniel Walker <dwalker@fifo99.com>
|
||||
M: Bryan Huntsman <bryanh@codeaurora.org>
|
||||
L: linux-arm-msm@vger.kernel.org
|
||||
F: arch/arm/mach-msm/
|
||||
|
@ -1692,6 +1692,13 @@ M: Andy Whitcroft <apw@canonical.com>
|
|||
S: Supported
|
||||
F: scripts/checkpatch.pl
|
||||
|
||||
CHINESE DOCUMENTATION
|
||||
M: Harry Wei <harryxiyou@gmail.com>
|
||||
L: xiyoulinuxkernelgroup@googlegroups.com
|
||||
L: linux-kernel@zh-kernel.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
F: Documentation/zh_CN/
|
||||
|
||||
CISCO VIC ETHERNET NIC DRIVER
|
||||
M: Vasanthy Kolluri <vkolluri@cisco.com>
|
||||
M: Roopa Prabhu <roprabhu@cisco.com>
|
||||
|
@ -2873,7 +2880,6 @@ M: Guenter Roeck <guenter.roeck@ericsson.com>
|
|||
L: lm-sensors@lm-sensors.org
|
||||
W: http://www.lm-sensors.org/
|
||||
T: quilt kernel.org/pub/linux/kernel/people/jdelvare/linux-2.6/jdelvare-hwmon/
|
||||
T: quilt kernel.org/pub/linux/kernel/people/groeck/linux-staging/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git
|
||||
S: Maintained
|
||||
F: Documentation/hwmon/
|
||||
|
@ -5267,7 +5273,7 @@ S: Maintained
|
|||
F: drivers/net/wireless/rtl818x/rtl8180/
|
||||
|
||||
RTL8187 WIRELESS DRIVER
|
||||
M: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
|
||||
M: Herton Ronaldo Krzesinski <herton@canonical.com>
|
||||
M: Hin-Tak Leung <htl10@users.sourceforge.net>
|
||||
M: Larry Finger <Larry.Finger@lwfinger.net>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
|
@ -6105,7 +6111,7 @@ S: Maintained
|
|||
F: security/tomoyo/
|
||||
|
||||
TOPSTAR LAPTOP EXTRAS DRIVER
|
||||
M: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
|
||||
M: Herton Ronaldo Krzesinski <herton@canonical.com>
|
||||
L: platform-driver-x86@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/platform/x86/topstar-laptop.c
|
||||
|
|
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
|||
VERSION = 2
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 38
|
||||
EXTRAVERSION = -rc5
|
||||
EXTRAVERSION = -rc7
|
||||
NAME = Flesh-Eating Bats with Fangs
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
|
|
@ -1177,6 +1177,31 @@ config ARM_ERRATA_743622
|
|||
visible impact on the overall performance or power consumption of the
|
||||
processor.
|
||||
|
||||
config ARM_ERRATA_751472
|
||||
bool "ARM errata: Interrupted ICIALLUIS may prevent completion of broadcasted operation"
|
||||
depends on CPU_V7 && SMP
|
||||
help
|
||||
This option enables the workaround for the 751472 Cortex-A9 (prior
|
||||
to r3p0) erratum. An interrupted ICIALLUIS operation may prevent the
|
||||
completion of a following broadcasted operation if the second
|
||||
operation is received by a CPU before the ICIALLUIS has completed,
|
||||
potentially leading to corrupted entries in the cache or TLB.
|
||||
|
||||
config ARM_ERRATA_753970
|
||||
bool "ARM errata: cache sync operation may be faulty"
|
||||
depends on CACHE_PL310
|
||||
help
|
||||
This option enables the workaround for the 753970 PL310 (r3p0) erratum.
|
||||
|
||||
Under some condition the effect of cache sync operation on
|
||||
the store buffer still remains when the operation completes.
|
||||
This means that the store buffer is always asked to drain and
|
||||
this prevents it from merging any further writes. The workaround
|
||||
is to replace the normal offset of cache sync operation (0x730)
|
||||
by another offset targeting an unmapped PL310 register 0x740.
|
||||
This has the same effect as the cache sync operation: store buffer
|
||||
drain and waiting for all buffers empty.
|
||||
|
||||
endmenu
|
||||
|
||||
source "arch/arm/common/Kconfig"
|
||||
|
|
|
@ -15,7 +15,7 @@ ifeq ($(CONFIG_CPU_ENDIAN_BE8),y)
|
|||
LDFLAGS_vmlinux += --be8
|
||||
endif
|
||||
|
||||
OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
|
||||
OBJCOPYFLAGS :=-O binary -R .comment -S
|
||||
GZFLAGS :=-9
|
||||
#KBUILD_CFLAGS +=-pipe
|
||||
# Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb:
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
font.c
|
||||
piggy.gz
|
||||
lib1funcs.S
|
||||
piggy.gzip
|
||||
piggy.lzo
|
||||
piggy.lzma
|
||||
vmlinux
|
||||
vmlinux.lds
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#define L2X0_RAW_INTR_STAT 0x21C
|
||||
#define L2X0_INTR_CLEAR 0x220
|
||||
#define L2X0_CACHE_SYNC 0x730
|
||||
#define L2X0_DUMMY_REG 0x740
|
||||
#define L2X0_INV_LINE_PA 0x770
|
||||
#define L2X0_INV_WAY 0x77C
|
||||
#define L2X0_CLEAN_LINE_PA 0x7B0
|
||||
|
|
|
@ -58,6 +58,9 @@
|
|||
|
||||
static inline void sysctl_soft_reset(void __iomem *base)
|
||||
{
|
||||
/* switch to slow mode */
|
||||
writel(0x2, base + SCCTRL);
|
||||
|
||||
/* writing any value to SCSYSSTAT reg will reset system */
|
||||
writel(0, base + SCSYSSTAT);
|
||||
}
|
||||
|
|
|
@ -18,16 +18,34 @@
|
|||
#define __ASMARM_TLB_H
|
||||
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/tlbflush.h>
|
||||
|
||||
#ifndef CONFIG_MMU
|
||||
|
||||
#include <linux/pagemap.h>
|
||||
|
||||
#define tlb_flush(tlb) ((void) tlb)
|
||||
|
||||
#include <asm-generic/tlb.h>
|
||||
|
||||
#else /* !CONFIG_MMU */
|
||||
|
||||
#include <linux/swap.h>
|
||||
#include <asm/pgalloc.h>
|
||||
#include <asm/tlbflush.h>
|
||||
|
||||
/*
|
||||
* We need to delay page freeing for SMP as other CPUs can access pages
|
||||
* which have been removed but not yet had their TLB entries invalidated.
|
||||
* Also, as ARMv7 speculative prefetch can drag new entries into the TLB,
|
||||
* we need to apply this same delaying tactic to ensure correct operation.
|
||||
*/
|
||||
#if defined(CONFIG_SMP) || defined(CONFIG_CPU_32v7)
|
||||
#define tlb_fast_mode(tlb) 0
|
||||
#define FREE_PTE_NR 500
|
||||
#else
|
||||
#define tlb_fast_mode(tlb) 1
|
||||
#define FREE_PTE_NR 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* TLB handling. This allows us to remove pages from the page
|
||||
|
@ -36,12 +54,58 @@
|
|||
struct mmu_gather {
|
||||
struct mm_struct *mm;
|
||||
unsigned int fullmm;
|
||||
struct vm_area_struct *vma;
|
||||
unsigned long range_start;
|
||||
unsigned long range_end;
|
||||
unsigned int nr;
|
||||
struct page *pages[FREE_PTE_NR];
|
||||
};
|
||||
|
||||
DECLARE_PER_CPU(struct mmu_gather, mmu_gathers);
|
||||
|
||||
/*
|
||||
* This is unnecessarily complex. There's three ways the TLB shootdown
|
||||
* code is used:
|
||||
* 1. Unmapping a range of vmas. See zap_page_range(), unmap_region().
|
||||
* tlb->fullmm = 0, and tlb_start_vma/tlb_end_vma will be called.
|
||||
* tlb->vma will be non-NULL.
|
||||
* 2. Unmapping all vmas. See exit_mmap().
|
||||
* tlb->fullmm = 1, and tlb_start_vma/tlb_end_vma will be called.
|
||||
* tlb->vma will be non-NULL. Additionally, page tables will be freed.
|
||||
* 3. Unmapping argument pages. See shift_arg_pages().
|
||||
* tlb->fullmm = 0, but tlb_start_vma/tlb_end_vma will not be called.
|
||||
* tlb->vma will be NULL.
|
||||
*/
|
||||
static inline void tlb_flush(struct mmu_gather *tlb)
|
||||
{
|
||||
if (tlb->fullmm || !tlb->vma)
|
||||
flush_tlb_mm(tlb->mm);
|
||||
else if (tlb->range_end > 0) {
|
||||
flush_tlb_range(tlb->vma, tlb->range_start, tlb->range_end);
|
||||
tlb->range_start = TASK_SIZE;
|
||||
tlb->range_end = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static inline void tlb_add_flush(struct mmu_gather *tlb, unsigned long addr)
|
||||
{
|
||||
if (!tlb->fullmm) {
|
||||
if (addr < tlb->range_start)
|
||||
tlb->range_start = addr;
|
||||
if (addr + PAGE_SIZE > tlb->range_end)
|
||||
tlb->range_end = addr + PAGE_SIZE;
|
||||
}
|
||||
}
|
||||
|
||||
static inline void tlb_flush_mmu(struct mmu_gather *tlb)
|
||||
{
|
||||
tlb_flush(tlb);
|
||||
if (!tlb_fast_mode(tlb)) {
|
||||
free_pages_and_swap_cache(tlb->pages, tlb->nr);
|
||||
tlb->nr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static inline struct mmu_gather *
|
||||
tlb_gather_mmu(struct mm_struct *mm, unsigned int full_mm_flush)
|
||||
{
|
||||
|
@ -49,6 +113,8 @@ tlb_gather_mmu(struct mm_struct *mm, unsigned int full_mm_flush)
|
|||
|
||||
tlb->mm = mm;
|
||||
tlb->fullmm = full_mm_flush;
|
||||
tlb->vma = NULL;
|
||||
tlb->nr = 0;
|
||||
|
||||
return tlb;
|
||||
}
|
||||
|
@ -56,8 +122,7 @@ tlb_gather_mmu(struct mm_struct *mm, unsigned int full_mm_flush)
|
|||
static inline void
|
||||
tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)
|
||||
{
|
||||
if (tlb->fullmm)
|
||||
flush_tlb_mm(tlb->mm);
|
||||
tlb_flush_mmu(tlb);
|
||||
|
||||
/* keep the page table cache within bounds */
|
||||
check_pgt_cache();
|
||||
|
@ -71,12 +136,7 @@ tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)
|
|||
static inline void
|
||||
tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep, unsigned long addr)
|
||||
{
|
||||
if (!tlb->fullmm) {
|
||||
if (addr < tlb->range_start)
|
||||
tlb->range_start = addr;
|
||||
if (addr + PAGE_SIZE > tlb->range_end)
|
||||
tlb->range_end = addr + PAGE_SIZE;
|
||||
}
|
||||
tlb_add_flush(tlb, addr);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -89,6 +149,7 @@ tlb_start_vma(struct mmu_gather *tlb, struct vm_area_struct *vma)
|
|||
{
|
||||
if (!tlb->fullmm) {
|
||||
flush_cache_range(vma, vma->vm_start, vma->vm_end);
|
||||
tlb->vma = vma;
|
||||
tlb->range_start = TASK_SIZE;
|
||||
tlb->range_end = 0;
|
||||
}
|
||||
|
@ -97,12 +158,30 @@ tlb_start_vma(struct mmu_gather *tlb, struct vm_area_struct *vma)
|
|||
static inline void
|
||||
tlb_end_vma(struct mmu_gather *tlb, struct vm_area_struct *vma)
|
||||
{
|
||||
if (!tlb->fullmm && tlb->range_end > 0)
|
||||
flush_tlb_range(vma, tlb->range_start, tlb->range_end);
|
||||
if (!tlb->fullmm)
|
||||
tlb_flush(tlb);
|
||||
}
|
||||
|
||||
#define tlb_remove_page(tlb,page) free_page_and_swap_cache(page)
|
||||
#define pte_free_tlb(tlb, ptep, addr) pte_free((tlb)->mm, ptep)
|
||||
static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page)
|
||||
{
|
||||
if (tlb_fast_mode(tlb)) {
|
||||
free_page_and_swap_cache(page);
|
||||
} else {
|
||||
tlb->pages[tlb->nr++] = page;
|
||||
if (tlb->nr >= FREE_PTE_NR)
|
||||
tlb_flush_mmu(tlb);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte,
|
||||
unsigned long addr)
|
||||
{
|
||||
pgtable_page_dtor(pte);
|
||||
tlb_add_flush(tlb, addr);
|
||||
tlb_remove_page(tlb, pte);
|
||||
}
|
||||
|
||||
#define pte_free_tlb(tlb, ptep, addr) __pte_free_tlb(tlb, ptep, addr)
|
||||
#define pmd_free_tlb(tlb, pmdp, addr) pmd_free((tlb)->mm, pmdp)
|
||||
|
||||
#define tlb_migrate_finish(mm) do { } while (0)
|
||||
|
|
|
@ -10,12 +10,7 @@
|
|||
#ifndef _ASMARM_TLBFLUSH_H
|
||||
#define _ASMARM_TLBFLUSH_H
|
||||
|
||||
|
||||
#ifndef CONFIG_MMU
|
||||
|
||||
#define tlb_flush(tlb) ((void) tlb)
|
||||
|
||||
#else /* CONFIG_MMU */
|
||||
#ifdef CONFIG_MMU
|
||||
|
||||
#include <asm/glue.h>
|
||||
|
||||
|
|
|
@ -1437,7 +1437,7 @@ arm_kprobe_decode_insn(kprobe_opcode_t insn, struct arch_specific_insn *asi)
|
|||
|
||||
return space_cccc_1100_010x(insn, asi);
|
||||
|
||||
} else if ((insn & 0x0e000000) == 0x0c400000) {
|
||||
} else if ((insn & 0x0e000000) == 0x0c000000) {
|
||||
|
||||
return space_cccc_110x(insn, asi);
|
||||
|
||||
|
|
|
@ -97,28 +97,34 @@ set_irq_affinity(int irq,
|
|||
irq, cpu);
|
||||
return err;
|
||||
#else
|
||||
return 0;
|
||||
return -EINVAL;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int
|
||||
init_cpu_pmu(void)
|
||||
{
|
||||
int i, err = 0;
|
||||
int i, irqs, err = 0;
|
||||
struct platform_device *pdev = pmu_devices[ARM_PMU_DEVICE_CPU];
|
||||
|
||||
if (!pdev) {
|
||||
err = -ENODEV;
|
||||
goto out;
|
||||
}
|
||||
if (!pdev)
|
||||
return -ENODEV;
|
||||
|
||||
for (i = 0; i < pdev->num_resources; ++i) {
|
||||
irqs = pdev->num_resources;
|
||||
|
||||
/*
|
||||
* If we have a single PMU interrupt that we can't shift, assume that
|
||||
* we're running on a uniprocessor machine and continue.
|
||||
*/
|
||||
if (irqs == 1 && !irq_can_set_affinity(platform_get_irq(pdev, 0)))
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < irqs; ++i) {
|
||||
err = set_irq_affinity(platform_get_irq(pdev, i), i);
|
||||
if (err)
|
||||
break;
|
||||
}
|
||||
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
@ -226,8 +226,8 @@ int cpu_architecture(void)
|
|||
* Register 0 and check for VMSAv7 or PMSAv7 */
|
||||
asm("mrc p15, 0, %0, c0, c1, 4"
|
||||
: "=r" (mmfr0));
|
||||
if ((mmfr0 & 0x0000000f) == 0x00000003 ||
|
||||
(mmfr0 & 0x000000f0) == 0x00000030)
|
||||
if ((mmfr0 & 0x0000000f) >= 0x00000003 ||
|
||||
(mmfr0 & 0x000000f0) >= 0x00000030)
|
||||
cpu_arch = CPU_ARCH_ARMv7;
|
||||
else if ((mmfr0 & 0x0000000f) == 0x00000002 ||
|
||||
(mmfr0 & 0x000000f0) == 0x00000020)
|
||||
|
|
|
@ -474,7 +474,9 @@ setup_return(struct pt_regs *regs, struct k_sigaction *ka,
|
|||
unsigned long handler = (unsigned long)ka->sa.sa_handler;
|
||||
unsigned long retcode;
|
||||
int thumb = 0;
|
||||
unsigned long cpsr = regs->ARM_cpsr & ~PSR_f;
|
||||
unsigned long cpsr = regs->ARM_cpsr & ~(PSR_f | PSR_E_BIT);
|
||||
|
||||
cpsr |= PSR_ENDSTATE;
|
||||
|
||||
/*
|
||||
* Maybe we need to deliver a 32-bit signal to a 26-bit task.
|
||||
|
|
|
@ -21,6 +21,12 @@
|
|||
#define ARM_CPU_KEEP(x)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SMP_ON_UP) && !defined(CONFIG_DEBUG_SPINLOCK)
|
||||
#define ARM_EXIT_KEEP(x) x
|
||||
#else
|
||||
#define ARM_EXIT_KEEP(x)
|
||||
#endif
|
||||
|
||||
OUTPUT_ARCH(arm)
|
||||
ENTRY(stext)
|
||||
|
||||
|
@ -43,6 +49,7 @@ SECTIONS
|
|||
_sinittext = .;
|
||||
HEAD_TEXT
|
||||
INIT_TEXT
|
||||
ARM_EXIT_KEEP(EXIT_TEXT)
|
||||
_einittext = .;
|
||||
ARM_CPU_DISCARD(PROC_INFO)
|
||||
__arch_info_begin = .;
|
||||
|
@ -67,6 +74,7 @@ SECTIONS
|
|||
#ifndef CONFIG_XIP_KERNEL
|
||||
__init_begin = _stext;
|
||||
INIT_DATA
|
||||
ARM_EXIT_KEEP(EXIT_DATA)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -162,6 +170,7 @@ SECTIONS
|
|||
. = ALIGN(PAGE_SIZE);
|
||||
__init_begin = .;
|
||||
INIT_DATA
|
||||
ARM_EXIT_KEEP(EXIT_DATA)
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
__init_end = .;
|
||||
#endif
|
||||
|
@ -247,6 +256,8 @@ SECTIONS
|
|||
}
|
||||
#endif
|
||||
|
||||
NOTES
|
||||
|
||||
BSS_SECTION(0, 0, 0)
|
||||
_end = .;
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ static int _dpll_test_fint(struct clk *clk, u8 n)
|
|||
dd = clk->dpll_data;
|
||||
|
||||
/* DPLL divider must result in a valid jitter correction val */
|
||||
fint = clk->parent->rate / (n + 1);
|
||||
fint = clk->parent->rate / n;
|
||||
if (fint < DPLL_FINT_BAND1_MIN) {
|
||||
|
||||
pr_debug("rejecting n=%d due to Fint failure, "
|
||||
|
|
|
@ -334,7 +334,7 @@ static struct omap_mbox mbox_iva_info = {
|
|||
.priv = &omap2_mbox_iva_priv,
|
||||
};
|
||||
|
||||
struct omap_mbox *omap2_mboxes[] = { &mbox_iva_info, &mbox_dsp_info, NULL };
|
||||
struct omap_mbox *omap2_mboxes[] = { &mbox_dsp_info, &mbox_iva_info, NULL };
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ARCH_OMAP4)
|
||||
|
|
|
@ -605,7 +605,7 @@ static void __init omap_mux_dbg_create_entry(
|
|||
list_for_each_entry(e, &partition->muxmodes, node) {
|
||||
struct omap_mux *m = &e->mux;
|
||||
|
||||
(void)debugfs_create_file(m->muxnames[0], S_IWUGO, mux_dbg_dir,
|
||||
(void)debugfs_create_file(m->muxnames[0], S_IWUSR, mux_dbg_dir,
|
||||
m, &omap_mux_dbg_signal_fops);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -637,14 +637,14 @@ static int __init pm_dbg_init(void)
|
|||
|
||||
}
|
||||
|
||||
(void) debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUGO, d,
|
||||
(void) debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUSR, d,
|
||||
&enable_off_mode, &pm_dbg_option_fops);
|
||||
(void) debugfs_create_file("sleep_while_idle", S_IRUGO | S_IWUGO, d,
|
||||
(void) debugfs_create_file("sleep_while_idle", S_IRUGO | S_IWUSR, d,
|
||||
&sleep_while_idle, &pm_dbg_option_fops);
|
||||
(void) debugfs_create_file("wakeup_timer_seconds", S_IRUGO | S_IWUGO, d,
|
||||
(void) debugfs_create_file("wakeup_timer_seconds", S_IRUGO | S_IWUSR, d,
|
||||
&wakeup_timer_seconds, &pm_dbg_option_fops);
|
||||
(void) debugfs_create_file("wakeup_timer_milliseconds",
|
||||
S_IRUGO | S_IWUGO, d, &wakeup_timer_milliseconds,
|
||||
S_IRUGO | S_IWUSR, d, &wakeup_timer_milliseconds,
|
||||
&pm_dbg_option_fops);
|
||||
pm_dbg_init_done = 1;
|
||||
|
||||
|
|
|
@ -38,8 +38,8 @@
|
|||
#define OMAP4430_PRCM_MPU_CPU1_INST 0x0800
|
||||
|
||||
/* PRCM_MPU clockdomain register offsets (from instance start) */
|
||||
#define OMAP4430_PRCM_MPU_CPU0_MPU_CDOFFS 0x0000
|
||||
#define OMAP4430_PRCM_MPU_CPU1_MPU_CDOFFS 0x0000
|
||||
#define OMAP4430_PRCM_MPU_CPU0_MPU_CDOFFS 0x0018
|
||||
#define OMAP4430_PRCM_MPU_CPU1_MPU_CDOFFS 0x0018
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -900,7 +900,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
|
|||
return PTR_ERR(dbg_dir);
|
||||
}
|
||||
|
||||
(void) debugfs_create_file("autocomp", S_IRUGO | S_IWUGO, dbg_dir,
|
||||
(void) debugfs_create_file("autocomp", S_IRUGO | S_IWUSR, dbg_dir,
|
||||
(void *)sr_info, &pm_sr_fops);
|
||||
(void) debugfs_create_x32("errweight", S_IRUGO, dbg_dir,
|
||||
&sr_info->err_weight);
|
||||
|
@ -939,7 +939,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
|
|||
strcpy(name, "volt_");
|
||||
sprintf(volt_name, "%d", volt_data[i].volt_nominal);
|
||||
strcat(name, volt_name);
|
||||
(void) debugfs_create_x32(name, S_IRUGO | S_IWUGO, nvalue_dir,
|
||||
(void) debugfs_create_x32(name, S_IRUGO | S_IWUSR, nvalue_dir,
|
||||
&(sr_info->nvalue_table[i].nvalue));
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include <asm/mach/time.h>
|
||||
#include <plat/dmtimer.h>
|
||||
#include <asm/localtimer.h>
|
||||
#include <asm/sched_clock.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/omap_hwmod.h>
|
||||
|
||||
|
@ -195,6 +196,7 @@ static void __init omap2_gp_clocksource_init(void)
|
|||
/*
|
||||
* clocksource
|
||||
*/
|
||||
static DEFINE_CLOCK_DATA(cd);
|
||||
static struct omap_dm_timer *gpt_clocksource;
|
||||
static cycle_t clocksource_read_cycles(struct clocksource *cs)
|
||||
{
|
||||
|
@ -209,6 +211,15 @@ static struct clocksource clocksource_gpt = {
|
|||
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
|
||||
};
|
||||
|
||||
static void notrace dmtimer_update_sched_clock(void)
|
||||
{
|
||||
u32 cyc;
|
||||
|
||||
cyc = omap_dm_timer_read_counter(gpt_clocksource);
|
||||
|
||||
update_sched_clock(&cd, cyc, (u32)~0);
|
||||
}
|
||||
|
||||
/* Setup free-running counter for clocksource */
|
||||
static void __init omap2_gp_clocksource_init(void)
|
||||
{
|
||||
|
@ -229,6 +240,8 @@ static void __init omap2_gp_clocksource_init(void)
|
|||
|
||||
omap_dm_timer_set_load_start(gpt, 1, 0);
|
||||
|
||||
init_sched_clock(&cd, dmtimer_update_sched_clock, 32, tick_rate);
|
||||
|
||||
if (clocksource_register_hz(&clocksource_gpt, tick_rate))
|
||||
printk(err2, clocksource_gpt.name);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* linux/arch/arm/mach-s5p6442/include/mach/map.h
|
||||
*
|
||||
* Copyright (c) 2010 Samsung Electronics Co., Ltd.
|
||||
* Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com/
|
||||
*
|
||||
* S5P6442 - Memory map definitions
|
||||
|
@ -16,56 +16,61 @@
|
|||
#include <plat/map-base.h>
|
||||
#include <plat/map-s5p.h>
|
||||
|
||||
#define S5P6442_PA_CHIPID (0xE0000000)
|
||||
#define S5P_PA_CHIPID S5P6442_PA_CHIPID
|
||||
#define S5P6442_PA_SDRAM 0x20000000
|
||||
|
||||
#define S5P6442_PA_SYSCON (0xE0100000)
|
||||
#define S5P_PA_SYSCON S5P6442_PA_SYSCON
|
||||
#define S5P6442_PA_I2S0 0xC0B00000
|
||||
#define S5P6442_PA_I2S1 0xF2200000
|
||||
|
||||
#define S5P6442_PA_GPIO (0xE0200000)
|
||||
#define S5P6442_PA_CHIPID 0xE0000000
|
||||
|
||||
#define S5P6442_PA_VIC0 (0xE4000000)
|
||||
#define S5P6442_PA_VIC1 (0xE4100000)
|
||||
#define S5P6442_PA_VIC2 (0xE4200000)
|
||||
#define S5P6442_PA_SYSCON 0xE0100000
|
||||
|
||||
#define S5P6442_PA_SROMC (0xE7000000)
|
||||
#define S5P_PA_SROMC S5P6442_PA_SROMC
|
||||
#define S5P6442_PA_GPIO 0xE0200000
|
||||
|
||||
#define S5P6442_PA_VIC0 0xE4000000
|
||||
#define S5P6442_PA_VIC1 0xE4100000
|
||||
#define S5P6442_PA_VIC2 0xE4200000
|
||||
|
||||
#define S5P6442_PA_SROMC 0xE7000000
|
||||
|
||||
#define S5P6442_PA_MDMA 0xE8000000
|
||||
#define S5P6442_PA_PDMA 0xE9000000
|
||||
|
||||
#define S5P6442_PA_TIMER (0xEA000000)
|
||||
#define S5P_PA_TIMER S5P6442_PA_TIMER
|
||||
#define S5P6442_PA_TIMER 0xEA000000
|
||||
|
||||
#define S5P6442_PA_SYSTIMER (0xEA100000)
|
||||
#define S5P6442_PA_SYSTIMER 0xEA100000
|
||||
|
||||
#define S5P6442_PA_WATCHDOG (0xEA200000)
|
||||
#define S5P6442_PA_WATCHDOG 0xEA200000
|
||||
|
||||
#define S5P6442_PA_UART (0xEC000000)
|
||||
#define S5P6442_PA_UART 0xEC000000
|
||||
|
||||
#define S5P_PA_UART0 (S5P6442_PA_UART + 0x0)
|
||||
#define S5P_PA_UART1 (S5P6442_PA_UART + 0x400)
|
||||
#define S5P_PA_UART2 (S5P6442_PA_UART + 0x800)
|
||||
#define S5P_SZ_UART SZ_256
|
||||
|
||||
#define S5P6442_PA_IIC0 (0xEC100000)
|
||||
|
||||
#define S5P6442_PA_SDRAM (0x20000000)
|
||||
#define S5P_PA_SDRAM S5P6442_PA_SDRAM
|
||||
#define S5P6442_PA_IIC0 0xEC100000
|
||||
|
||||
#define S5P6442_PA_SPI 0xEC300000
|
||||
|
||||
/* I2S */
|
||||
#define S5P6442_PA_I2S0 0xC0B00000
|
||||
#define S5P6442_PA_I2S1 0xF2200000
|
||||
|
||||
/* PCM */
|
||||
#define S5P6442_PA_PCM0 0xF2400000
|
||||
#define S5P6442_PA_PCM1 0xF2500000
|
||||
|
||||
/* compatibiltiy defines. */
|
||||
#define S3C_PA_WDT S5P6442_PA_WATCHDOG
|
||||
#define S3C_PA_UART S5P6442_PA_UART
|
||||
/* Compatibiltiy Defines */
|
||||
|
||||
#define S3C_PA_IIC S5P6442_PA_IIC0
|
||||
#define S3C_PA_WDT S5P6442_PA_WATCHDOG
|
||||
|
||||
#define S5P_PA_CHIPID S5P6442_PA_CHIPID
|
||||
#define S5P_PA_SDRAM S5P6442_PA_SDRAM
|
||||
#define S5P_PA_SROMC S5P6442_PA_SROMC
|
||||
#define S5P_PA_SYSCON S5P6442_PA_SYSCON
|
||||
#define S5P_PA_TIMER S5P6442_PA_TIMER
|
||||
|
||||
/* UART */
|
||||
|
||||
#define S3C_PA_UART S5P6442_PA_UART
|
||||
|
||||
#define S5P_PA_UART(x) (S3C_PA_UART + ((x) * S3C_UART_OFFSET))
|
||||
#define S5P_PA_UART0 S5P_PA_UART(0)
|
||||
#define S5P_PA_UART1 S5P_PA_UART(1)
|
||||
#define S5P_PA_UART2 S5P_PA_UART(2)
|
||||
|
||||
#define S5P_SZ_UART SZ_256
|
||||
|
||||
#endif /* __ASM_ARCH_MAP_H */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* linux/arch/arm/mach-s5p64x0/include/mach/map.h
|
||||
*
|
||||
* Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
|
||||
* Copyright (c) 2009-2011 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* S5P64X0 - Memory map definitions
|
||||
|
@ -16,30 +16,63 @@
|
|||
#include <plat/map-base.h>
|
||||
#include <plat/map-s5p.h>
|
||||
|
||||
#define S5P64X0_PA_SDRAM (0x20000000)
|
||||
#define S5P64X0_PA_SDRAM 0x20000000
|
||||
|
||||
#define S5P64X0_PA_CHIPID 0xE0000000
|
||||
|
||||
#define S5P64X0_PA_SYSCON 0xE0100000
|
||||
|
||||
#define S5P64X0_PA_GPIO 0xE0308000
|
||||
|
||||
#define S5P64X0_PA_VIC0 0xE4000000
|
||||
#define S5P64X0_PA_VIC1 0xE4100000
|
||||
|
||||
#define S5P64X0_PA_SROMC 0xE7000000
|
||||
|
||||
#define S5P64X0_PA_PDMA 0xE9000000
|
||||
|
||||
#define S5P64X0_PA_TIMER 0xEA000000
|
||||
#define S5P64X0_PA_RTC 0xEA100000
|
||||
#define S5P64X0_PA_WDT 0xEA200000
|
||||
|
||||
#define S5P6440_PA_IIC0 0xEC104000
|
||||
#define S5P6440_PA_IIC1 0xEC20F000
|
||||
#define S5P6450_PA_IIC0 0xEC100000
|
||||
#define S5P6450_PA_IIC1 0xEC200000
|
||||
|
||||
#define S5P64X0_PA_SPI0 0xEC400000
|
||||
#define S5P64X0_PA_SPI1 0xEC500000
|
||||
|
||||
#define S5P64X0_PA_HSOTG 0xED100000
|
||||
|
||||
#define S5P64X0_PA_HSMMC(x) (0xED800000 + ((x) * 0x100000))
|
||||
|
||||
#define S5P64X0_PA_I2S 0xF2000000
|
||||
#define S5P6450_PA_I2S1 0xF2800000
|
||||
#define S5P6450_PA_I2S2 0xF2900000
|
||||
|
||||
#define S5P64X0_PA_PCM 0xF2100000
|
||||
|
||||
#define S5P64X0_PA_ADC 0xF3000000
|
||||
|
||||
/* Compatibiltiy Defines */
|
||||
|
||||
#define S3C_PA_HSMMC0 S5P64X0_PA_HSMMC(0)
|
||||
#define S3C_PA_HSMMC1 S5P64X0_PA_HSMMC(1)
|
||||
#define S3C_PA_HSMMC2 S5P64X0_PA_HSMMC(2)
|
||||
#define S3C_PA_IIC S5P6440_PA_IIC0
|
||||
#define S3C_PA_IIC1 S5P6440_PA_IIC1
|
||||
#define S3C_PA_RTC S5P64X0_PA_RTC
|
||||
#define S3C_PA_WDT S5P64X0_PA_WDT
|
||||
|
||||
#define S5P64X0_PA_CHIPID (0xE0000000)
|
||||
#define S5P_PA_CHIPID S5P64X0_PA_CHIPID
|
||||
|
||||
#define S5P64X0_PA_SYSCON (0xE0100000)
|
||||
#define S5P_PA_SYSCON S5P64X0_PA_SYSCON
|
||||
|
||||
#define S5P64X0_PA_GPIO (0xE0308000)
|
||||
|
||||
#define S5P64X0_PA_VIC0 (0xE4000000)
|
||||
#define S5P64X0_PA_VIC1 (0xE4100000)
|
||||
|
||||
#define S5P64X0_PA_SROMC (0xE7000000)
|
||||
#define S5P_PA_SROMC S5P64X0_PA_SROMC
|
||||
|
||||
#define S5P64X0_PA_PDMA (0xE9000000)
|
||||
|
||||
#define S5P64X0_PA_TIMER (0xEA000000)
|
||||
#define S5P_PA_SYSCON S5P64X0_PA_SYSCON
|
||||
#define S5P_PA_TIMER S5P64X0_PA_TIMER
|
||||
|
||||
#define S5P64X0_PA_RTC (0xEA100000)
|
||||
#define SAMSUNG_PA_ADC S5P64X0_PA_ADC
|
||||
|
||||
#define S5P64X0_PA_WDT (0xEA200000)
|
||||
/* UART */
|
||||
|
||||
#define S5P6440_PA_UART(x) (0xEC000000 + ((x) * S3C_UART_OFFSET))
|
||||
#define S5P6450_PA_UART(x) ((x < 5) ? (0xEC800000 + ((x) * S3C_UART_OFFSET)) : (0xEC000000))
|
||||
|
@ -53,36 +86,4 @@
|
|||
|
||||
#define S5P_SZ_UART SZ_256
|
||||
|
||||
#define S5P6440_PA_IIC0 (0xEC104000)
|
||||
#define S5P6440_PA_IIC1 (0xEC20F000)
|
||||
#define S5P6450_PA_IIC0 (0xEC100000)
|
||||
#define S5P6450_PA_IIC1 (0xEC200000)
|
||||
|
||||
#define S5P64X0_PA_SPI0 (0xEC400000)
|
||||
#define S5P64X0_PA_SPI1 (0xEC500000)
|
||||
|
||||
#define S5P64X0_PA_HSOTG (0xED100000)
|
||||
|
||||
#define S5P64X0_PA_HSMMC(x) (0xED800000 + ((x) * 0x100000))
|
||||
|
||||
#define S5P64X0_PA_I2S (0xF2000000)
|
||||
#define S5P6450_PA_I2S1 0xF2800000
|
||||
#define S5P6450_PA_I2S2 0xF2900000
|
||||
|
||||
#define S5P64X0_PA_PCM (0xF2100000)
|
||||
|
||||
#define S5P64X0_PA_ADC (0xF3000000)
|
||||
|
||||
/* compatibiltiy defines. */
|
||||
|
||||
#define S3C_PA_HSMMC0 S5P64X0_PA_HSMMC(0)
|
||||
#define S3C_PA_HSMMC1 S5P64X0_PA_HSMMC(1)
|
||||
#define S3C_PA_HSMMC2 S5P64X0_PA_HSMMC(2)
|
||||
#define S3C_PA_IIC S5P6440_PA_IIC0
|
||||
#define S3C_PA_IIC1 S5P6440_PA_IIC1
|
||||
#define S3C_PA_RTC S5P64X0_PA_RTC
|
||||
#define S3C_PA_WDT S5P64X0_PA_WDT
|
||||
|
||||
#define SAMSUNG_PA_ADC S5P64X0_PA_ADC
|
||||
|
||||
#endif /* __ASM_ARCH_MAP_H */
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
/* linux/arch/arm/mach-s5pc100/include/mach/map.h
|
||||
*
|
||||
* Copyright (c) 2011 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com/
|
||||
*
|
||||
* Copyright 2009 Samsung Electronics Co.
|
||||
* Byungho Min <bhmin@samsung.com>
|
||||
|
@ -16,145 +19,115 @@
|
|||
#include <plat/map-base.h>
|
||||
#include <plat/map-s5p.h>
|
||||
|
||||
/*
|
||||
* map-base.h has already defined virtual memory address
|
||||
* S3C_VA_IRQ S3C_ADDR(0x00000000) irq controller(s)
|
||||
* S3C_VA_SYS S3C_ADDR(0x00100000) system control
|
||||
* S3C_VA_MEM S3C_ADDR(0x00200000) system control (not used)
|
||||
* S3C_VA_TIMER S3C_ADDR(0x00300000) timer block
|
||||
* S3C_VA_WATCHDOG S3C_ADDR(0x00400000) watchdog
|
||||
* S3C_VA_UART S3C_ADDR(0x01000000) UART
|
||||
*
|
||||
* S5PC100 specific virtual memory address can be defined here
|
||||
* S5PC1XX_VA_GPIO S3C_ADDR(0x00500000) GPIO
|
||||
*
|
||||
*/
|
||||
#define S5PC100_PA_SDRAM 0x20000000
|
||||
|
||||
#define S5PC100_PA_ONENAND_BUF (0xB0000000)
|
||||
#define S5PC100_SZ_ONENAND_BUF (SZ_256M - SZ_32M)
|
||||
#define S5PC100_PA_ONENAND 0xE7100000
|
||||
#define S5PC100_PA_ONENAND_BUF 0xB0000000
|
||||
|
||||
/* Chip ID */
|
||||
#define S5PC100_PA_CHIPID 0xE0000000
|
||||
|
||||
#define S5PC100_PA_CHIPID (0xE0000000)
|
||||
#define S5P_PA_CHIPID S5PC100_PA_CHIPID
|
||||
#define S5PC100_PA_SYSCON 0xE0100000
|
||||
|
||||
#define S5PC100_PA_SYSCON (0xE0100000)
|
||||
#define S5P_PA_SYSCON S5PC100_PA_SYSCON
|
||||
#define S5PC100_PA_OTHERS 0xE0200000
|
||||
|
||||
#define S5PC100_PA_OTHERS (0xE0200000)
|
||||
#define S5PC100_VA_OTHERS (S3C_VA_SYS + 0x10000)
|
||||
#define S5PC100_PA_GPIO 0xE0300000
|
||||
|
||||
#define S5PC100_PA_GPIO (0xE0300000)
|
||||
#define S5PC1XX_VA_GPIO S3C_ADDR(0x00500000)
|
||||
#define S5PC100_PA_VIC0 0xE4000000
|
||||
#define S5PC100_PA_VIC1 0xE4100000
|
||||
#define S5PC100_PA_VIC2 0xE4200000
|
||||
|
||||
/* Interrupt */
|
||||
#define S5PC100_PA_VIC0 (0xE4000000)
|
||||
#define S5PC100_PA_VIC1 (0xE4100000)
|
||||
#define S5PC100_PA_VIC2 (0xE4200000)
|
||||
#define S5PC100_VA_VIC S3C_VA_IRQ
|
||||
#define S5PC100_VA_VIC_OFFSET 0x10000
|
||||
#define S5PC1XX_VA_VIC(x) (S5PC100_VA_VIC + ((x) * S5PC100_VA_VIC_OFFSET))
|
||||
#define S5PC100_PA_SROMC 0xE7000000
|
||||
|
||||
#define S5PC100_PA_SROMC (0xE7000000)
|
||||
#define S5P_PA_SROMC S5PC100_PA_SROMC
|
||||
#define S5PC100_PA_CFCON 0xE7800000
|
||||
|
||||
#define S5PC100_PA_ONENAND (0xE7100000)
|
||||
#define S5PC100_PA_MDMA 0xE8100000
|
||||
#define S5PC100_PA_PDMA0 0xE9000000
|
||||
#define S5PC100_PA_PDMA1 0xE9200000
|
||||
|
||||
#define S5PC100_PA_CFCON (0xE7800000)
|
||||
#define S5PC100_PA_TIMER 0xEA000000
|
||||
#define S5PC100_PA_SYSTIMER 0xEA100000
|
||||
#define S5PC100_PA_WATCHDOG 0xEA200000
|
||||
#define S5PC100_PA_RTC 0xEA300000
|
||||
|
||||
/* DMA */
|
||||
#define S5PC100_PA_MDMA (0xE8100000)
|
||||
#define S5PC100_PA_PDMA0 (0xE9000000)
|
||||
#define S5PC100_PA_PDMA1 (0xE9200000)
|
||||
#define S5PC100_PA_UART 0xEC000000
|
||||
|
||||
/* Timer */
|
||||
#define S5PC100_PA_TIMER (0xEA000000)
|
||||
#define S5P_PA_TIMER S5PC100_PA_TIMER
|
||||
#define S5PC100_PA_IIC0 0xEC100000
|
||||
#define S5PC100_PA_IIC1 0xEC200000
|
||||
|
||||
#define S5PC100_PA_SYSTIMER (0xEA100000)
|
||||
|
||||
#define S5PC100_PA_WATCHDOG (0xEA200000)
|
||||
#define S5PC100_PA_RTC (0xEA300000)
|
||||
|
||||
#define S5PC100_PA_UART (0xEC000000)
|
||||
|
||||
#define S5P_PA_UART0 (S5PC100_PA_UART + 0x0)
|
||||
#define S5P_PA_UART1 (S5PC100_PA_UART + 0x400)
|
||||
#define S5P_PA_UART2 (S5PC100_PA_UART + 0x800)
|
||||
#define S5P_PA_UART3 (S5PC100_PA_UART + 0xC00)
|
||||
#define S5P_SZ_UART SZ_256
|
||||
|
||||
#define S5PC100_PA_IIC0 (0xEC100000)
|
||||
#define S5PC100_PA_IIC1 (0xEC200000)
|
||||
|
||||
/* SPI */
|
||||
#define S5PC100_PA_SPI0 0xEC300000
|
||||
#define S5PC100_PA_SPI1 0xEC400000
|
||||
#define S5PC100_PA_SPI2 0xEC500000
|
||||
|
||||
/* USB HS OTG */
|
||||
#define S5PC100_PA_USB_HSOTG (0xED200000)
|
||||
#define S5PC100_PA_USB_HSPHY (0xED300000)
|
||||
#define S5PC100_PA_USB_HSOTG 0xED200000
|
||||
#define S5PC100_PA_USB_HSPHY 0xED300000
|
||||
|
||||
#define S5PC100_PA_FB (0xEE000000)
|
||||
#define S5PC100_PA_HSMMC(x) (0xED800000 + ((x) * 0x100000))
|
||||
|
||||
#define S5PC100_PA_FIMC0 (0xEE200000)
|
||||
#define S5PC100_PA_FIMC1 (0xEE300000)
|
||||
#define S5PC100_PA_FIMC2 (0xEE400000)
|
||||
#define S5PC100_PA_FB 0xEE000000
|
||||
|
||||
#define S5PC100_PA_I2S0 (0xF2000000)
|
||||
#define S5PC100_PA_I2S1 (0xF2100000)
|
||||
#define S5PC100_PA_I2S2 (0xF2200000)
|
||||
#define S5PC100_PA_FIMC0 0xEE200000
|
||||
#define S5PC100_PA_FIMC1 0xEE300000
|
||||
#define S5PC100_PA_FIMC2 0xEE400000
|
||||
|
||||
#define S5PC100_PA_I2S0 0xF2000000
|
||||
#define S5PC100_PA_I2S1 0xF2100000
|
||||
#define S5PC100_PA_I2S2 0xF2200000
|
||||
|
||||
#define S5PC100_PA_AC97 0xF2300000
|
||||
|
||||
/* PCM */
|
||||
#define S5PC100_PA_PCM0 0xF2400000
|
||||
#define S5PC100_PA_PCM1 0xF2500000
|
||||
|
||||
#define S5PC100_PA_SPDIF 0xF2600000
|
||||
|
||||
#define S5PC100_PA_TSADC (0xF3000000)
|
||||
#define S5PC100_PA_TSADC 0xF3000000
|
||||
|
||||
/* KEYPAD */
|
||||
#define S5PC100_PA_KEYPAD (0xF3100000)
|
||||
#define S5PC100_PA_KEYPAD 0xF3100000
|
||||
|
||||
#define S5PC100_PA_HSMMC(x) (0xED800000 + ((x) * 0x100000))
|
||||
/* Compatibiltiy Defines */
|
||||
|
||||
#define S5PC100_PA_SDRAM (0x20000000)
|
||||
#define S5P_PA_SDRAM S5PC100_PA_SDRAM
|
||||
|
||||
/* compatibiltiy defines. */
|
||||
#define S3C_PA_UART S5PC100_PA_UART
|
||||
#define S3C_PA_IIC S5PC100_PA_IIC0
|
||||
#define S3C_PA_IIC1 S5PC100_PA_IIC1
|
||||
#define S3C_PA_FB S5PC100_PA_FB
|
||||
#define S3C_PA_G2D S5PC100_PA_G2D
|
||||
#define S3C_PA_G3D S5PC100_PA_G3D
|
||||
#define S3C_PA_JPEG S5PC100_PA_JPEG
|
||||
#define S3C_PA_ROTATOR S5PC100_PA_ROTATOR
|
||||
#define S5P_VA_VIC0 S5PC1XX_VA_VIC(0)
|
||||
#define S5P_VA_VIC1 S5PC1XX_VA_VIC(1)
|
||||
#define S5P_VA_VIC2 S5PC1XX_VA_VIC(2)
|
||||
#define S3C_PA_USB_HSOTG S5PC100_PA_USB_HSOTG
|
||||
#define S3C_PA_USB_HSPHY S5PC100_PA_USB_HSPHY
|
||||
#define S3C_PA_HSMMC0 S5PC100_PA_HSMMC(0)
|
||||
#define S3C_PA_HSMMC1 S5PC100_PA_HSMMC(1)
|
||||
#define S3C_PA_HSMMC2 S5PC100_PA_HSMMC(2)
|
||||
#define S3C_PA_IIC S5PC100_PA_IIC0
|
||||
#define S3C_PA_IIC1 S5PC100_PA_IIC1
|
||||
#define S3C_PA_KEYPAD S5PC100_PA_KEYPAD
|
||||
#define S3C_PA_WDT S5PC100_PA_WATCHDOG
|
||||
#define S3C_PA_TSADC S5PC100_PA_TSADC
|
||||
#define S3C_PA_ONENAND S5PC100_PA_ONENAND
|
||||
#define S3C_PA_ONENAND_BUF S5PC100_PA_ONENAND_BUF
|
||||
#define S3C_SZ_ONENAND_BUF S5PC100_SZ_ONENAND_BUF
|
||||
#define S3C_PA_RTC S5PC100_PA_RTC
|
||||
#define S3C_PA_TSADC S5PC100_PA_TSADC
|
||||
#define S3C_PA_USB_HSOTG S5PC100_PA_USB_HSOTG
|
||||
#define S3C_PA_USB_HSPHY S5PC100_PA_USB_HSPHY
|
||||
#define S3C_PA_WDT S5PC100_PA_WATCHDOG
|
||||
|
||||
#define S5P_PA_CHIPID S5PC100_PA_CHIPID
|
||||
#define S5P_PA_FIMC0 S5PC100_PA_FIMC0
|
||||
#define S5P_PA_FIMC1 S5PC100_PA_FIMC1
|
||||
#define S5P_PA_FIMC2 S5PC100_PA_FIMC2
|
||||
#define S5P_PA_SDRAM S5PC100_PA_SDRAM
|
||||
#define S5P_PA_SROMC S5PC100_PA_SROMC
|
||||
#define S5P_PA_SYSCON S5PC100_PA_SYSCON
|
||||
#define S5P_PA_TIMER S5PC100_PA_TIMER
|
||||
|
||||
#define SAMSUNG_PA_ADC S5PC100_PA_TSADC
|
||||
#define SAMSUNG_PA_CFCON S5PC100_PA_CFCON
|
||||
#define SAMSUNG_PA_KEYPAD S5PC100_PA_KEYPAD
|
||||
|
||||
#define S5P_PA_FIMC0 S5PC100_PA_FIMC0
|
||||
#define S5P_PA_FIMC1 S5PC100_PA_FIMC1
|
||||
#define S5P_PA_FIMC2 S5PC100_PA_FIMC2
|
||||
#define S5PC100_VA_OTHERS (S3C_VA_SYS + 0x10000)
|
||||
|
||||
#endif /* __ASM_ARCH_C100_MAP_H */
|
||||
#define S3C_SZ_ONENAND_BUF (SZ_256M - SZ_32M)
|
||||
|
||||
/* UART */
|
||||
|
||||
#define S3C_PA_UART S5PC100_PA_UART
|
||||
|
||||
#define S5P_PA_UART(x) (S3C_PA_UART + ((x) * S3C_UART_OFFSET))
|
||||
#define S5P_PA_UART0 S5P_PA_UART(0)
|
||||
#define S5P_PA_UART1 S5P_PA_UART(1)
|
||||
#define S5P_PA_UART2 S5P_PA_UART(2)
|
||||
#define S5P_PA_UART3 S5P_PA_UART(3)
|
||||
|
||||
#define S5P_SZ_UART SZ_256
|
||||
|
||||
#endif /* __ASM_ARCH_MAP_H */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* linux/arch/arm/mach-s5pv210/include/mach/map.h
|
||||
*
|
||||
* Copyright (c) 2010 Samsung Electronics Co., Ltd.
|
||||
* Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com/
|
||||
*
|
||||
* S5PV210 - Memory map definitions
|
||||
|
@ -16,104 +16,81 @@
|
|||
#include <plat/map-base.h>
|
||||
#include <plat/map-s5p.h>
|
||||
|
||||
#define S5PV210_PA_SROM_BANK5 (0xA8000000)
|
||||
#define S5PV210_PA_SDRAM 0x20000000
|
||||
|
||||
#define S5PC110_PA_ONENAND (0xB0000000)
|
||||
#define S5P_PA_ONENAND S5PC110_PA_ONENAND
|
||||
#define S5PV210_PA_SROM_BANK5 0xA8000000
|
||||
|
||||
#define S5PC110_PA_ONENAND_DMA (0xB0600000)
|
||||
#define S5P_PA_ONENAND_DMA S5PC110_PA_ONENAND_DMA
|
||||
#define S5PC110_PA_ONENAND 0xB0000000
|
||||
#define S5PC110_PA_ONENAND_DMA 0xB0600000
|
||||
|
||||
#define S5PV210_PA_CHIPID (0xE0000000)
|
||||
#define S5P_PA_CHIPID S5PV210_PA_CHIPID
|
||||
#define S5PV210_PA_CHIPID 0xE0000000
|
||||
|
||||
#define S5PV210_PA_SYSCON (0xE0100000)
|
||||
#define S5P_PA_SYSCON S5PV210_PA_SYSCON
|
||||
#define S5PV210_PA_SYSCON 0xE0100000
|
||||
|
||||
#define S5PV210_PA_GPIO (0xE0200000)
|
||||
#define S5PV210_PA_GPIO 0xE0200000
|
||||
|
||||
#define S5PV210_PA_SPDIF 0xE1100000
|
||||
|
||||
/* SPI */
|
||||
#define S5PV210_PA_SPI0 0xE1300000
|
||||
#define S5PV210_PA_SPI1 0xE1400000
|
||||
|
||||
#define S5PV210_PA_KEYPAD (0xE1600000)
|
||||
#define S5PV210_PA_KEYPAD 0xE1600000
|
||||
|
||||
#define S5PV210_PA_IIC0 (0xE1800000)
|
||||
#define S5PV210_PA_IIC1 (0xFAB00000)
|
||||
#define S5PV210_PA_IIC2 (0xE1A00000)
|
||||
#define S5PV210_PA_ADC 0xE1700000
|
||||
|
||||
#define S5PV210_PA_TIMER (0xE2500000)
|
||||
#define S5P_PA_TIMER S5PV210_PA_TIMER
|
||||
#define S5PV210_PA_IIC0 0xE1800000
|
||||
#define S5PV210_PA_IIC1 0xFAB00000
|
||||
#define S5PV210_PA_IIC2 0xE1A00000
|
||||
|
||||
#define S5PV210_PA_SYSTIMER (0xE2600000)
|
||||
#define S5PV210_PA_AC97 0xE2200000
|
||||
|
||||
#define S5PV210_PA_WATCHDOG (0xE2700000)
|
||||
#define S5PV210_PA_PCM0 0xE2300000
|
||||
#define S5PV210_PA_PCM1 0xE1200000
|
||||
#define S5PV210_PA_PCM2 0xE2B00000
|
||||
|
||||
#define S5PV210_PA_RTC (0xE2800000)
|
||||
#define S5PV210_PA_UART (0xE2900000)
|
||||
#define S5PV210_PA_TIMER 0xE2500000
|
||||
#define S5PV210_PA_SYSTIMER 0xE2600000
|
||||
#define S5PV210_PA_WATCHDOG 0xE2700000
|
||||
#define S5PV210_PA_RTC 0xE2800000
|
||||
|
||||
#define S5P_PA_UART0 (S5PV210_PA_UART + 0x0)
|
||||
#define S5P_PA_UART1 (S5PV210_PA_UART + 0x400)
|
||||
#define S5P_PA_UART2 (S5PV210_PA_UART + 0x800)
|
||||
#define S5P_PA_UART3 (S5PV210_PA_UART + 0xC00)
|
||||
#define S5PV210_PA_UART 0xE2900000
|
||||
|
||||
#define S5P_SZ_UART SZ_256
|
||||
#define S5PV210_PA_SROMC 0xE8000000
|
||||
|
||||
#define S3C_VA_UARTx(x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET))
|
||||
#define S5PV210_PA_CFCON 0xE8200000
|
||||
|
||||
#define S5PV210_PA_SROMC (0xE8000000)
|
||||
#define S5P_PA_SROMC S5PV210_PA_SROMC
|
||||
#define S5PV210_PA_HSMMC(x) (0xEB000000 + ((x) * 0x100000))
|
||||
|
||||
#define S5PV210_PA_CFCON (0xE8200000)
|
||||
#define S5PV210_PA_HSOTG 0xEC000000
|
||||
#define S5PV210_PA_HSPHY 0xEC100000
|
||||
|
||||
#define S5PV210_PA_IIS0 0xEEE30000
|
||||
#define S5PV210_PA_IIS1 0xE2100000
|
||||
#define S5PV210_PA_IIS2 0xE2A00000
|
||||
|
||||
#define S5PV210_PA_DMC0 0xF0000000
|
||||
#define S5PV210_PA_DMC1 0xF1400000
|
||||
|
||||
#define S5PV210_PA_VIC0 0xF2000000
|
||||
#define S5PV210_PA_VIC1 0xF2100000
|
||||
#define S5PV210_PA_VIC2 0xF2200000
|
||||
#define S5PV210_PA_VIC3 0xF2300000
|
||||
|
||||
#define S5PV210_PA_FB 0xF8000000
|
||||
|
||||
#define S5PV210_PA_MDMA 0xFA200000
|
||||
#define S5PV210_PA_PDMA0 0xE0900000
|
||||
#define S5PV210_PA_PDMA1 0xE0A00000
|
||||
|
||||
#define S5PV210_PA_FB (0xF8000000)
|
||||
|
||||
#define S5PV210_PA_FIMC0 (0xFB200000)
|
||||
#define S5PV210_PA_FIMC1 (0xFB300000)
|
||||
#define S5PV210_PA_FIMC2 (0xFB400000)
|
||||
|
||||
#define S5PV210_PA_HSMMC(x) (0xEB000000 + ((x) * 0x100000))
|
||||
|
||||
#define S5PV210_PA_HSOTG (0xEC000000)
|
||||
#define S5PV210_PA_HSPHY (0xEC100000)
|
||||
|
||||
#define S5PV210_PA_VIC0 (0xF2000000)
|
||||
#define S5PV210_PA_VIC1 (0xF2100000)
|
||||
#define S5PV210_PA_VIC2 (0xF2200000)
|
||||
#define S5PV210_PA_VIC3 (0xF2300000)
|
||||
|
||||
#define S5PV210_PA_SDRAM (0x20000000)
|
||||
#define S5P_PA_SDRAM S5PV210_PA_SDRAM
|
||||
|
||||
/* S/PDIF */
|
||||
#define S5PV210_PA_SPDIF 0xE1100000
|
||||
|
||||
/* I2S */
|
||||
#define S5PV210_PA_IIS0 0xEEE30000
|
||||
#define S5PV210_PA_IIS1 0xE2100000
|
||||
#define S5PV210_PA_IIS2 0xE2A00000
|
||||
|
||||
/* PCM */
|
||||
#define S5PV210_PA_PCM0 0xE2300000
|
||||
#define S5PV210_PA_PCM1 0xE1200000
|
||||
#define S5PV210_PA_PCM2 0xE2B00000
|
||||
|
||||
/* AC97 */
|
||||
#define S5PV210_PA_AC97 0xE2200000
|
||||
|
||||
#define S5PV210_PA_ADC (0xE1700000)
|
||||
|
||||
#define S5PV210_PA_DMC0 (0xF0000000)
|
||||
#define S5PV210_PA_DMC1 (0xF1400000)
|
||||
|
||||
#define S5PV210_PA_MIPI_CSIS 0xFA600000
|
||||
|
||||
/* compatibiltiy defines. */
|
||||
#define S3C_PA_UART S5PV210_PA_UART
|
||||
#define S5PV210_PA_FIMC0 0xFB200000
|
||||
#define S5PV210_PA_FIMC1 0xFB300000
|
||||
#define S5PV210_PA_FIMC2 0xFB400000
|
||||
|
||||
/* Compatibiltiy Defines */
|
||||
|
||||
#define S3C_PA_FB S5PV210_PA_FB
|
||||
#define S3C_PA_HSMMC0 S5PV210_PA_HSMMC(0)
|
||||
#define S3C_PA_HSMMC1 S5PV210_PA_HSMMC(1)
|
||||
#define S3C_PA_HSMMC2 S5PV210_PA_HSMMC(2)
|
||||
|
@ -121,17 +98,38 @@
|
|||
#define S3C_PA_IIC S5PV210_PA_IIC0
|
||||
#define S3C_PA_IIC1 S5PV210_PA_IIC1
|
||||
#define S3C_PA_IIC2 S5PV210_PA_IIC2
|
||||
#define S3C_PA_FB S5PV210_PA_FB
|
||||
#define S3C_PA_RTC S5PV210_PA_RTC
|
||||
#define S3C_PA_WDT S5PV210_PA_WATCHDOG
|
||||
#define S3C_PA_USB_HSOTG S5PV210_PA_HSOTG
|
||||
#define S3C_PA_WDT S5PV210_PA_WATCHDOG
|
||||
|
||||
#define S5P_PA_CHIPID S5PV210_PA_CHIPID
|
||||
#define S5P_PA_FIMC0 S5PV210_PA_FIMC0
|
||||
#define S5P_PA_FIMC1 S5PV210_PA_FIMC1
|
||||
#define S5P_PA_FIMC2 S5PV210_PA_FIMC2
|
||||
#define S5P_PA_MIPI_CSIS0 S5PV210_PA_MIPI_CSIS
|
||||
#define S5P_PA_ONENAND S5PC110_PA_ONENAND
|
||||
#define S5P_PA_ONENAND_DMA S5PC110_PA_ONENAND_DMA
|
||||
#define S5P_PA_SDRAM S5PV210_PA_SDRAM
|
||||
#define S5P_PA_SROMC S5PV210_PA_SROMC
|
||||
#define S5P_PA_SYSCON S5PV210_PA_SYSCON
|
||||
#define S5P_PA_TIMER S5PV210_PA_TIMER
|
||||
|
||||
#define SAMSUNG_PA_ADC S5PV210_PA_ADC
|
||||
#define SAMSUNG_PA_CFCON S5PV210_PA_CFCON
|
||||
#define SAMSUNG_PA_KEYPAD S5PV210_PA_KEYPAD
|
||||
|
||||
/* UART */
|
||||
|
||||
#define S3C_VA_UARTx(x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET))
|
||||
|
||||
#define S3C_PA_UART S5PV210_PA_UART
|
||||
|
||||
#define S5P_PA_UART(x) (S3C_PA_UART + ((x) * S3C_UART_OFFSET))
|
||||
#define S5P_PA_UART0 S5P_PA_UART(0)
|
||||
#define S5P_PA_UART1 S5P_PA_UART(1)
|
||||
#define S5P_PA_UART2 S5P_PA_UART(2)
|
||||
#define S5P_PA_UART3 S5P_PA_UART(3)
|
||||
|
||||
#define S5P_SZ_UART SZ_256
|
||||
|
||||
#endif /* __ASM_ARCH_MAP_H */
|
||||
|
|
|
@ -149,7 +149,7 @@ static struct regulator_init_data aquila_ldo2_data = {
|
|||
|
||||
static struct regulator_init_data aquila_ldo3_data = {
|
||||
.constraints = {
|
||||
.name = "VUSB/MIPI_1.1V",
|
||||
.name = "VUSB+MIPI_1.1V",
|
||||
.min_uV = 1100000,
|
||||
.max_uV = 1100000,
|
||||
.apply_uV = 1,
|
||||
|
@ -197,7 +197,7 @@ static struct regulator_init_data aquila_ldo7_data = {
|
|||
|
||||
static struct regulator_init_data aquila_ldo8_data = {
|
||||
.constraints = {
|
||||
.name = "VUSB/VADC_3.3V",
|
||||
.name = "VUSB+VADC_3.3V",
|
||||
.min_uV = 3300000,
|
||||
.max_uV = 3300000,
|
||||
.apply_uV = 1,
|
||||
|
@ -207,7 +207,7 @@ static struct regulator_init_data aquila_ldo8_data = {
|
|||
|
||||
static struct regulator_init_data aquila_ldo9_data = {
|
||||
.constraints = {
|
||||
.name = "VCC/VCAM_2.8V",
|
||||
.name = "VCC+VCAM_2.8V",
|
||||
.min_uV = 2800000,
|
||||
.max_uV = 2800000,
|
||||
.apply_uV = 1,
|
||||
|
@ -381,9 +381,12 @@ static struct max8998_platform_data aquila_max8998_pdata = {
|
|||
.buck1_set1 = S5PV210_GPH0(3),
|
||||
.buck1_set2 = S5PV210_GPH0(4),
|
||||
.buck2_set3 = S5PV210_GPH0(5),
|
||||
.buck1_max_voltage1 = 1200000,
|
||||
.buck1_max_voltage2 = 1200000,
|
||||
.buck2_max_voltage = 1200000,
|
||||
.buck1_voltage1 = 1200000,
|
||||
.buck1_voltage2 = 1200000,
|
||||
.buck1_voltage3 = 1200000,
|
||||
.buck1_voltage4 = 1200000,
|
||||
.buck2_voltage1 = 1200000,
|
||||
.buck2_voltage2 = 1200000,
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
@ -288,7 +288,7 @@ static struct regulator_init_data goni_ldo2_data = {
|
|||
|
||||
static struct regulator_init_data goni_ldo3_data = {
|
||||
.constraints = {
|
||||
.name = "VUSB/MIPI_1.1V",
|
||||
.name = "VUSB+MIPI_1.1V",
|
||||
.min_uV = 1100000,
|
||||
.max_uV = 1100000,
|
||||
.apply_uV = 1,
|
||||
|
@ -337,7 +337,7 @@ static struct regulator_init_data goni_ldo7_data = {
|
|||
|
||||
static struct regulator_init_data goni_ldo8_data = {
|
||||
.constraints = {
|
||||
.name = "VUSB/VADC_3.3V",
|
||||
.name = "VUSB+VADC_3.3V",
|
||||
.min_uV = 3300000,
|
||||
.max_uV = 3300000,
|
||||
.apply_uV = 1,
|
||||
|
@ -347,7 +347,7 @@ static struct regulator_init_data goni_ldo8_data = {
|
|||
|
||||
static struct regulator_init_data goni_ldo9_data = {
|
||||
.constraints = {
|
||||
.name = "VCC/VCAM_2.8V",
|
||||
.name = "VCC+VCAM_2.8V",
|
||||
.min_uV = 2800000,
|
||||
.max_uV = 2800000,
|
||||
.apply_uV = 1,
|
||||
|
@ -521,9 +521,12 @@ static struct max8998_platform_data goni_max8998_pdata = {
|
|||
.buck1_set1 = S5PV210_GPH0(3),
|
||||
.buck1_set2 = S5PV210_GPH0(4),
|
||||
.buck2_set3 = S5PV210_GPH0(5),
|
||||
.buck1_max_voltage1 = 1200000,
|
||||
.buck1_max_voltage2 = 1200000,
|
||||
.buck2_max_voltage = 1200000,
|
||||
.buck1_voltage1 = 1200000,
|
||||
.buck1_voltage2 = 1200000,
|
||||
.buck1_voltage3 = 1200000,
|
||||
.buck1_voltage4 = 1200000,
|
||||
.buck2_voltage1 = 1200000,
|
||||
.buck2_voltage2 = 1200000,
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* linux/arch/arm/mach-s5pv310/include/mach/map.h
|
||||
*
|
||||
* Copyright (c) 2010 Samsung Electronics Co., Ltd.
|
||||
* Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com/
|
||||
*
|
||||
* S5PV310 - Memory map definitions
|
||||
|
@ -23,90 +23,43 @@
|
|||
|
||||
#include <plat/map-s5p.h>
|
||||
|
||||
#define S5PV310_PA_SYSRAM (0x02025000)
|
||||
#define S5PV310_PA_SYSRAM 0x02025000
|
||||
|
||||
#define S5PV310_PA_SROM_BANK(x) (0x04000000 + ((x) * 0x01000000))
|
||||
|
||||
#define S5PC210_PA_ONENAND (0x0C000000)
|
||||
#define S5P_PA_ONENAND S5PC210_PA_ONENAND
|
||||
|
||||
#define S5PC210_PA_ONENAND_DMA (0x0C600000)
|
||||
#define S5P_PA_ONENAND_DMA S5PC210_PA_ONENAND_DMA
|
||||
|
||||
#define S5PV310_PA_CHIPID (0x10000000)
|
||||
#define S5P_PA_CHIPID S5PV310_PA_CHIPID
|
||||
|
||||
#define S5PV310_PA_SYSCON (0x10010000)
|
||||
#define S5P_PA_SYSCON S5PV310_PA_SYSCON
|
||||
|
||||
#define S5PV310_PA_PMU (0x10020000)
|
||||
|
||||
#define S5PV310_PA_CMU (0x10030000)
|
||||
|
||||
#define S5PV310_PA_WATCHDOG (0x10060000)
|
||||
#define S5PV310_PA_RTC (0x10070000)
|
||||
|
||||
#define S5PV310_PA_DMC0 (0x10400000)
|
||||
|
||||
#define S5PV310_PA_COMBINER (0x10448000)
|
||||
|
||||
#define S5PV310_PA_COREPERI (0x10500000)
|
||||
#define S5PV310_PA_GIC_CPU (0x10500100)
|
||||
#define S5PV310_PA_TWD (0x10500600)
|
||||
#define S5PV310_PA_GIC_DIST (0x10501000)
|
||||
#define S5PV310_PA_L2CC (0x10502000)
|
||||
|
||||
/* DMA */
|
||||
#define S5PV310_PA_MDMA 0x10810000
|
||||
#define S5PV310_PA_PDMA0 0x12680000
|
||||
#define S5PV310_PA_PDMA1 0x12690000
|
||||
|
||||
#define S5PV310_PA_GPIO1 (0x11400000)
|
||||
#define S5PV310_PA_GPIO2 (0x11000000)
|
||||
#define S5PV310_PA_GPIO3 (0x03860000)
|
||||
|
||||
#define S5PV310_PA_MIPI_CSIS0 0x11880000
|
||||
#define S5PV310_PA_MIPI_CSIS1 0x11890000
|
||||
|
||||
#define S5PV310_PA_HSMMC(x) (0x12510000 + ((x) * 0x10000))
|
||||
|
||||
#define S5PV310_PA_SROMC (0x12570000)
|
||||
#define S5P_PA_SROMC S5PV310_PA_SROMC
|
||||
|
||||
/* S/PDIF */
|
||||
#define S5PV310_PA_SPDIF 0xE1100000
|
||||
|
||||
/* I2S */
|
||||
#define S5PV310_PA_I2S0 0x03830000
|
||||
#define S5PV310_PA_I2S1 0xE3100000
|
||||
#define S5PV310_PA_I2S2 0xE2A00000
|
||||
|
||||
/* PCM */
|
||||
#define S5PV310_PA_PCM0 0x03840000
|
||||
#define S5PV310_PA_PCM1 0x13980000
|
||||
#define S5PV310_PA_PCM2 0x13990000
|
||||
|
||||
/* AC97 */
|
||||
#define S5PV310_PA_AC97 0x139A0000
|
||||
#define S5PV310_PA_SROM_BANK(x) (0x04000000 + ((x) * 0x01000000))
|
||||
|
||||
#define S5PV310_PA_UART (0x13800000)
|
||||
#define S5PC210_PA_ONENAND 0x0C000000
|
||||
#define S5PC210_PA_ONENAND_DMA 0x0C600000
|
||||
|
||||
#define S5P_PA_UART(x) (S5PV310_PA_UART + ((x) * S3C_UART_OFFSET))
|
||||
#define S5P_PA_UART0 S5P_PA_UART(0)
|
||||
#define S5P_PA_UART1 S5P_PA_UART(1)
|
||||
#define S5P_PA_UART2 S5P_PA_UART(2)
|
||||
#define S5P_PA_UART3 S5P_PA_UART(3)
|
||||
#define S5P_PA_UART4 S5P_PA_UART(4)
|
||||
#define S5PV310_PA_CHIPID 0x10000000
|
||||
|
||||
#define S5P_SZ_UART SZ_256
|
||||
#define S5PV310_PA_SYSCON 0x10010000
|
||||
#define S5PV310_PA_PMU 0x10020000
|
||||
#define S5PV310_PA_CMU 0x10030000
|
||||
|
||||
#define S5PV310_PA_IIC(x) (0x13860000 + ((x) * 0x10000))
|
||||
#define S5PV310_PA_WATCHDOG 0x10060000
|
||||
#define S5PV310_PA_RTC 0x10070000
|
||||
|
||||
#define S5PV310_PA_TIMER (0x139D0000)
|
||||
#define S5P_PA_TIMER S5PV310_PA_TIMER
|
||||
#define S5PV310_PA_DMC0 0x10400000
|
||||
|
||||
#define S5PV310_PA_SDRAM (0x40000000)
|
||||
#define S5P_PA_SDRAM S5PV310_PA_SDRAM
|
||||
#define S5PV310_PA_COMBINER 0x10448000
|
||||
|
||||
#define S5PV310_PA_COREPERI 0x10500000
|
||||
#define S5PV310_PA_GIC_CPU 0x10500100
|
||||
#define S5PV310_PA_TWD 0x10500600
|
||||
#define S5PV310_PA_GIC_DIST 0x10501000
|
||||
#define S5PV310_PA_L2CC 0x10502000
|
||||
|
||||
#define S5PV310_PA_MDMA 0x10810000
|
||||
#define S5PV310_PA_PDMA0 0x12680000
|
||||
#define S5PV310_PA_PDMA1 0x12690000
|
||||
|
||||
#define S5PV310_PA_SYSMMU_MDMA 0x10A40000
|
||||
#define S5PV310_PA_SYSMMU_SSS 0x10A50000
|
||||
|
@ -125,8 +78,31 @@
|
|||
#define S5PV310_PA_SYSMMU_MFC_L 0x13620000
|
||||
#define S5PV310_PA_SYSMMU_MFC_R 0x13630000
|
||||
|
||||
/* compatibiltiy defines. */
|
||||
#define S3C_PA_UART S5PV310_PA_UART
|
||||
#define S5PV310_PA_GPIO1 0x11400000
|
||||
#define S5PV310_PA_GPIO2 0x11000000
|
||||
#define S5PV310_PA_GPIO3 0x03860000
|
||||
|
||||
#define S5PV310_PA_MIPI_CSIS0 0x11880000
|
||||
#define S5PV310_PA_MIPI_CSIS1 0x11890000
|
||||
|
||||
#define S5PV310_PA_HSMMC(x) (0x12510000 + ((x) * 0x10000))
|
||||
|
||||
#define S5PV310_PA_SROMC 0x12570000
|
||||
|
||||
#define S5PV310_PA_UART 0x13800000
|
||||
|
||||
#define S5PV310_PA_IIC(x) (0x13860000 + ((x) * 0x10000))
|
||||
|
||||
#define S5PV310_PA_AC97 0x139A0000
|
||||
|
||||
#define S5PV310_PA_TIMER 0x139D0000
|
||||
|
||||
#define S5PV310_PA_SDRAM 0x40000000
|
||||
|
||||
#define S5PV310_PA_SPDIF 0xE1100000
|
||||
|
||||
/* Compatibiltiy Defines */
|
||||
|
||||
#define S3C_PA_HSMMC0 S5PV310_PA_HSMMC(0)
|
||||
#define S3C_PA_HSMMC1 S5PV310_PA_HSMMC(1)
|
||||
#define S3C_PA_HSMMC2 S5PV310_PA_HSMMC(2)
|
||||
|
@ -141,7 +117,28 @@
|
|||
#define S3C_PA_IIC7 S5PV310_PA_IIC(7)
|
||||
#define S3C_PA_RTC S5PV310_PA_RTC
|
||||
#define S3C_PA_WDT S5PV310_PA_WATCHDOG
|
||||
|
||||
#define S5P_PA_CHIPID S5PV310_PA_CHIPID
|
||||
#define S5P_PA_MIPI_CSIS0 S5PV310_PA_MIPI_CSIS0
|
||||
#define S5P_PA_MIPI_CSIS1 S5PV310_PA_MIPI_CSIS1
|
||||
#define S5P_PA_ONENAND S5PC210_PA_ONENAND
|
||||
#define S5P_PA_ONENAND_DMA S5PC210_PA_ONENAND_DMA
|
||||
#define S5P_PA_SDRAM S5PV310_PA_SDRAM
|
||||
#define S5P_PA_SROMC S5PV310_PA_SROMC
|
||||
#define S5P_PA_SYSCON S5PV310_PA_SYSCON
|
||||
#define S5P_PA_TIMER S5PV310_PA_TIMER
|
||||
|
||||
/* UART */
|
||||
|
||||
#define S3C_PA_UART S5PV310_PA_UART
|
||||
|
||||
#define S5P_PA_UART(x) (S3C_PA_UART + ((x) * S3C_UART_OFFSET))
|
||||
#define S5P_PA_UART0 S5P_PA_UART(0)
|
||||
#define S5P_PA_UART1 S5P_PA_UART(1)
|
||||
#define S5P_PA_UART2 S5P_PA_UART(2)
|
||||
#define S5P_PA_UART3 S5P_PA_UART(3)
|
||||
#define S5P_PA_UART4 S5P_PA_UART(4)
|
||||
|
||||
#define S5P_SZ_UART SZ_256
|
||||
|
||||
#endif /* __ASM_ARCH_MAP_H */
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
#define SPEAR320_SMII1_BASE 0xAB000000
|
||||
#define SPEAR320_SMII1_SIZE 0x01000000
|
||||
|
||||
#define SPEAR320_SOC_CONFIG_BASE 0xB4000000
|
||||
#define SPEAR320_SOC_CONFIG_BASE 0xB3000000
|
||||
#define SPEAR320_SOC_CONFIG_SIZE 0x00000070
|
||||
/* Interrupt registers offsets and masks */
|
||||
#define INT_STS_MASK_REG 0x04
|
||||
|
|
|
@ -57,5 +57,6 @@ struct tegra_kbc_platform_data {
|
|||
const struct matrix_keymap_data *keymap_data;
|
||||
|
||||
bool wakeup;
|
||||
bool use_fn_map;
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -49,7 +49,13 @@ static inline void cache_wait(void __iomem *reg, unsigned long mask)
|
|||
static inline void cache_sync(void)
|
||||
{
|
||||
void __iomem *base = l2x0_base;
|
||||
|
||||
#ifdef CONFIG_ARM_ERRATA_753970
|
||||
/* write to an unmmapped register */
|
||||
writel_relaxed(0, base + L2X0_DUMMY_REG);
|
||||
#else
|
||||
writel_relaxed(0, base + L2X0_CACHE_SYNC);
|
||||
#endif
|
||||
cache_wait(base + L2X0_CACHE_SYNC, 1);
|
||||
}
|
||||
|
||||
|
|
|
@ -264,6 +264,12 @@ __v7_setup:
|
|||
orreq r10, r10, #1 << 6 @ set bit #6
|
||||
mcreq p15, 0, r10, c15, c0, 1 @ write diagnostic register
|
||||
#endif
|
||||
#ifdef CONFIG_ARM_ERRATA_751472
|
||||
cmp r6, #0x30 @ present prior to r3p0
|
||||
mrclt p15, 0, r10, c15, c0, 1 @ read diagnostic register
|
||||
orrlt r10, r10, #1 << 11 @ set bit #11
|
||||
mcrlt p15, 0, r10, c15, c0, 1 @ write diagnostic register
|
||||
#endif
|
||||
|
||||
3: mov r10, #0
|
||||
#ifdef HARVARD_CACHE
|
||||
|
|
|
@ -101,7 +101,7 @@ static int omap_target(struct cpufreq_policy *policy,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int __init omap_cpu_init(struct cpufreq_policy *policy)
|
||||
static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
|
||||
{
|
||||
int result = 0;
|
||||
|
||||
|
|
|
@ -322,15 +322,18 @@ static void omap_mbox_fini(struct omap_mbox *mbox)
|
|||
|
||||
struct omap_mbox *omap_mbox_get(const char *name, struct notifier_block *nb)
|
||||
{
|
||||
struct omap_mbox *mbox;
|
||||
int ret;
|
||||
struct omap_mbox *_mbox, *mbox = NULL;
|
||||
int i, ret;
|
||||
|
||||
if (!mboxes)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
for (mbox = *mboxes; mbox; mbox++)
|
||||
if (!strcmp(mbox->name, name))
|
||||
for (i = 0; (_mbox = mboxes[i]); i++) {
|
||||
if (!strcmp(_mbox->name, name)) {
|
||||
mbox = _mbox;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!mbox)
|
||||
return ERR_PTR(-ENOENT);
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
static struct resource s5p_uart0_resource[] = {
|
||||
[0] = {
|
||||
.start = S5P_PA_UART0,
|
||||
.end = S5P_PA_UART0 + S5P_SZ_UART,
|
||||
.end = S5P_PA_UART0 + S5P_SZ_UART - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
|
@ -51,7 +51,7 @@ static struct resource s5p_uart0_resource[] = {
|
|||
static struct resource s5p_uart1_resource[] = {
|
||||
[0] = {
|
||||
.start = S5P_PA_UART1,
|
||||
.end = S5P_PA_UART1 + S5P_SZ_UART,
|
||||
.end = S5P_PA_UART1 + S5P_SZ_UART - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
|
@ -74,7 +74,7 @@ static struct resource s5p_uart1_resource[] = {
|
|||
static struct resource s5p_uart2_resource[] = {
|
||||
[0] = {
|
||||
.start = S5P_PA_UART2,
|
||||
.end = S5P_PA_UART2 + S5P_SZ_UART,
|
||||
.end = S5P_PA_UART2 + S5P_SZ_UART - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
|
@ -98,7 +98,7 @@ static struct resource s5p_uart3_resource[] = {
|
|||
#if CONFIG_SERIAL_SAMSUNG_UARTS > 3
|
||||
[0] = {
|
||||
.start = S5P_PA_UART3,
|
||||
.end = S5P_PA_UART3 + S5P_SZ_UART,
|
||||
.end = S5P_PA_UART3 + S5P_SZ_UART - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
|
@ -123,7 +123,7 @@ static struct resource s5p_uart4_resource[] = {
|
|||
#if CONFIG_SERIAL_SAMSUNG_UARTS > 4
|
||||
[0] = {
|
||||
.start = S5P_PA_UART4,
|
||||
.end = S5P_PA_UART4 + S5P_SZ_UART,
|
||||
.end = S5P_PA_UART4 + S5P_SZ_UART - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
|
@ -148,7 +148,7 @@ static struct resource s5p_uart5_resource[] = {
|
|||
#if CONFIG_SERIAL_SAMSUNG_UARTS > 5
|
||||
[0] = {
|
||||
.start = S5P_PA_UART5,
|
||||
.end = S5P_PA_UART5 + S5P_SZ_UART,
|
||||
.end = S5P_PA_UART5 + S5P_SZ_UART - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
|
|
|
@ -58,4 +58,3 @@ void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *pd)
|
|||
|
||||
s3c_device_ts.dev.platform_data = npd;
|
||||
}
|
||||
EXPORT_SYMBOL(s3c24xx_ts_set_platdata);
|
||||
|
|
|
@ -24,10 +24,10 @@ static inline void putc(int c)
|
|||
{
|
||||
void __iomem *base = (void __iomem *)SPEAR_DBG_UART_BASE;
|
||||
|
||||
while (readl(base + UART01x_FR) & UART01x_FR_TXFF)
|
||||
while (readl_relaxed(base + UART01x_FR) & UART01x_FR_TXFF)
|
||||
barrier();
|
||||
|
||||
writel(c, base + UART01x_DR);
|
||||
writel_relaxed(c, base + UART01x_DR);
|
||||
}
|
||||
|
||||
static inline void flush(void)
|
||||
|
|
|
@ -14,6 +14,6 @@
|
|||
#ifndef __PLAT_VMALLOC_H
|
||||
#define __PLAT_VMALLOC_H
|
||||
|
||||
#define VMALLOC_END 0xF0000000
|
||||
#define VMALLOC_END 0xF0000000UL
|
||||
|
||||
#endif /* __PLAT_VMALLOC_H */
|
||||
|
|
|
@ -72,11 +72,6 @@ SECTIONS
|
|||
INIT_TEXT_SECTION(PAGE_SIZE)
|
||||
.init.data : { INIT_DATA }
|
||||
.init.setup : { INIT_SETUP(16) }
|
||||
#ifdef CONFIG_ETRAX_ARCH_V32
|
||||
__start___param = .;
|
||||
__param : { *(__param) }
|
||||
__stop___param = .;
|
||||
#endif
|
||||
.initcall.init : {
|
||||
INIT_CALLS
|
||||
}
|
||||
|
|
|
@ -133,11 +133,12 @@ unsigned long decompress_kernel(void)
|
|||
unsigned long output_addr;
|
||||
unsigned char *output;
|
||||
|
||||
check_ipl_parmblock((void *) 0, (unsigned long) output + SZ__bss_start);
|
||||
output_addr = ((unsigned long) &_end + HEAP_SIZE + 4095UL) & -4096UL;
|
||||
check_ipl_parmblock((void *) 0, output_addr + SZ__bss_start);
|
||||
memset(&_bss, 0, &_ebss - &_bss);
|
||||
free_mem_ptr = (unsigned long)&_end;
|
||||
free_mem_end_ptr = free_mem_ptr + HEAP_SIZE;
|
||||
output = (unsigned char *) ((free_mem_end_ptr + 4095UL) & -4096UL);
|
||||
output = (unsigned char *) output_addr;
|
||||
|
||||
#ifdef CONFIG_BLK_DEV_INITRD
|
||||
/*
|
||||
|
|
|
@ -38,6 +38,7 @@ int s390_sha_update(struct shash_desc *desc, const u8 *data, unsigned int len)
|
|||
BUG_ON(ret != bsize);
|
||||
data += bsize - index;
|
||||
len -= bsize - index;
|
||||
index = 0;
|
||||
}
|
||||
|
||||
/* process as many blocks as possible */
|
||||
|
|
|
@ -36,14 +36,19 @@
|
|||
|
||||
static inline int atomic_read(const atomic_t *v)
|
||||
{
|
||||
barrier();
|
||||
return v->counter;
|
||||
int c;
|
||||
|
||||
asm volatile(
|
||||
" l %0,%1\n"
|
||||
: "=d" (c) : "Q" (v->counter));
|
||||
return c;
|
||||
}
|
||||
|
||||
static inline void atomic_set(atomic_t *v, int i)
|
||||
{
|
||||
v->counter = i;
|
||||
barrier();
|
||||
asm volatile(
|
||||
" st %1,%0\n"
|
||||
: "=Q" (v->counter) : "d" (i));
|
||||
}
|
||||
|
||||
static inline int atomic_add_return(int i, atomic_t *v)
|
||||
|
@ -128,14 +133,19 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u)
|
|||
|
||||
static inline long long atomic64_read(const atomic64_t *v)
|
||||
{
|
||||
barrier();
|
||||
return v->counter;
|
||||
long long c;
|
||||
|
||||
asm volatile(
|
||||
" lg %0,%1\n"
|
||||
: "=d" (c) : "Q" (v->counter));
|
||||
return c;
|
||||
}
|
||||
|
||||
static inline void atomic64_set(atomic64_t *v, long long i)
|
||||
{
|
||||
v->counter = i;
|
||||
barrier();
|
||||
asm volatile(
|
||||
" stg %1,%0\n"
|
||||
: "=Q" (v->counter) : "d" (i));
|
||||
}
|
||||
|
||||
static inline long long atomic64_add_return(long long i, atomic64_t *v)
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
#define L1_CACHE_BYTES 256
|
||||
#define L1_CACHE_SHIFT 8
|
||||
#define NET_SKB_PAD 32
|
||||
|
||||
#define __read_mostly __attribute__((__section__(".data..read_mostly")))
|
||||
|
||||
|
|
|
@ -43,4 +43,6 @@ static inline u64 picl_value(unsigned int nmi_hz)
|
|||
|
||||
extern u64 pcr_enable;
|
||||
|
||||
extern int pcr_arch_init(void);
|
||||
|
||||
#endif /* __PCR_H */
|
||||
|
|
|
@ -255,10 +255,9 @@ static inline iopte_t *alloc_npages(struct device *dev, struct iommu *iommu,
|
|||
static int iommu_alloc_ctx(struct iommu *iommu)
|
||||
{
|
||||
int lowest = iommu->ctx_lowest_free;
|
||||
int sz = IOMMU_NUM_CTXS - lowest;
|
||||
int n = find_next_zero_bit(iommu->ctx_bitmap, sz, lowest);
|
||||
int n = find_next_zero_bit(iommu->ctx_bitmap, IOMMU_NUM_CTXS, lowest);
|
||||
|
||||
if (unlikely(n == sz)) {
|
||||
if (unlikely(n == IOMMU_NUM_CTXS)) {
|
||||
n = find_next_zero_bit(iommu->ctx_bitmap, lowest, 1);
|
||||
if (unlikely(n == lowest)) {
|
||||
printk(KERN_WARNING "IOMMU: Ran out of contexts.\n");
|
||||
|
|
|
@ -167,5 +167,3 @@ out_unregister:
|
|||
unregister_perf_hsvc();
|
||||
return err;
|
||||
}
|
||||
|
||||
early_initcall(pcr_arch_init);
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#include <asm/mdesc.h>
|
||||
#include <asm/ldc.h>
|
||||
#include <asm/hypervisor.h>
|
||||
#include <asm/pcr.h>
|
||||
|
||||
#include "cpumap.h"
|
||||
|
||||
|
@ -1358,6 +1359,7 @@ void __cpu_die(unsigned int cpu)
|
|||
|
||||
void __init smp_cpus_done(unsigned int max_cpus)
|
||||
{
|
||||
pcr_arch_init();
|
||||
}
|
||||
|
||||
void smp_send_reschedule(int cpu)
|
||||
|
|
|
@ -24,9 +24,9 @@ retl_efault:
|
|||
.globl __do_int_store
|
||||
__do_int_store:
|
||||
ld [%o2], %g1
|
||||
cmp %1, 2
|
||||
cmp %o1, 2
|
||||
be 2f
|
||||
cmp %1, 4
|
||||
cmp %o1, 4
|
||||
be 1f
|
||||
srl %g1, 24, %g2
|
||||
srl %g1, 16, %g7
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/string.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/bitmap.h>
|
||||
|
||||
#include <asm/bitext.h>
|
||||
|
||||
|
@ -80,8 +80,7 @@ int bit_map_string_get(struct bit_map *t, int len, int align)
|
|||
while (test_bit(offset + i, t->map) == 0) {
|
||||
i++;
|
||||
if (i == len) {
|
||||
for (i = 0; i < len; i++)
|
||||
__set_bit(offset + i, t->map);
|
||||
bitmap_set(t->map, offset, len);
|
||||
if (offset == t->first_free)
|
||||
t->first_free = find_next_zero_bit
|
||||
(t->map, t->size,
|
||||
|
|
|
@ -88,6 +88,7 @@ extern int acpi_disabled;
|
|||
extern int acpi_pci_disabled;
|
||||
extern int acpi_skip_timer_override;
|
||||
extern int acpi_use_timer_override;
|
||||
extern int acpi_fix_pin2_polarity;
|
||||
|
||||
extern u8 acpi_sci_flags;
|
||||
extern int acpi_sci_override_gsi;
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#define ARCH_P4_CNTRVAL_BITS (40)
|
||||
#define ARCH_P4_CNTRVAL_MASK ((1ULL << ARCH_P4_CNTRVAL_BITS) - 1)
|
||||
#define ARCH_P4_UNFLAGGED_BIT ((1ULL) << (ARCH_P4_CNTRVAL_BITS - 1))
|
||||
|
||||
#define P4_ESCR_EVENT_MASK 0x7e000000U
|
||||
#define P4_ESCR_EVENT_SHIFT 25
|
||||
|
|
|
@ -34,7 +34,7 @@ static inline void smpboot_restore_warm_reset_vector(void)
|
|||
*/
|
||||
CMOS_WRITE(0, 0xf);
|
||||
|
||||
*((volatile long *)phys_to_virt(apic->trampoline_phys_low)) = 0;
|
||||
*((volatile u32 *)phys_to_virt(apic->trampoline_phys_low)) = 0;
|
||||
}
|
||||
|
||||
static inline void __init smpboot_setup_io_apic(void)
|
||||
|
|
|
@ -72,6 +72,7 @@ u8 acpi_sci_flags __initdata;
|
|||
int acpi_sci_override_gsi __initdata;
|
||||
int acpi_skip_timer_override __initdata;
|
||||
int acpi_use_timer_override __initdata;
|
||||
int acpi_fix_pin2_polarity __initdata;
|
||||
|
||||
#ifdef CONFIG_X86_LOCAL_APIC
|
||||
static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
|
||||
|
@ -415,11 +416,16 @@ acpi_parse_int_src_ovr(struct acpi_subtable_header * header,
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (acpi_skip_timer_override &&
|
||||
intsrc->source_irq == 0 && intsrc->global_irq == 2) {
|
||||
if (intsrc->source_irq == 0 && intsrc->global_irq == 2) {
|
||||
if (acpi_skip_timer_override) {
|
||||
printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n");
|
||||
return 0;
|
||||
}
|
||||
if (acpi_fix_pin2_polarity && (intsrc->inti_flags & ACPI_MADT_POLARITY_MASK)) {
|
||||
intsrc->inti_flags &= ~ACPI_MADT_POLARITY_MASK;
|
||||
printk(PREFIX "BIOS IRQ0 pin2 override: forcing polarity to high active.\n");
|
||||
}
|
||||
}
|
||||
|
||||
mp_override_legacy_irq(intsrc->source_irq,
|
||||
intsrc->inti_flags & ACPI_MADT_POLARITY_MASK,
|
||||
|
|
|
@ -284,7 +284,7 @@ static int __init apbt_clockevent_register(void)
|
|||
memcpy(&adev->evt, &apbt_clockevent, sizeof(struct clock_event_device));
|
||||
|
||||
if (mrst_timer_options == MRST_TIMER_LAPIC_APBT) {
|
||||
apbt_clockevent.rating = APBT_CLOCKEVENT_RATING - 100;
|
||||
adev->evt.rating = APBT_CLOCKEVENT_RATING - 100;
|
||||
global_clock_event = &adev->evt;
|
||||
printk(KERN_DEBUG "%s clockevent registered as global\n",
|
||||
global_clock_event->name);
|
||||
|
|
|
@ -770,9 +770,14 @@ static inline int p4_pmu_clear_cccr_ovf(struct hw_perf_event *hwc)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/* it might be unflagged overflow */
|
||||
rdmsrl(hwc->event_base + hwc->idx, v);
|
||||
if (!(v & ARCH_P4_CNTRVAL_MASK))
|
||||
/*
|
||||
* In some circumstances the overflow might issue an NMI but did
|
||||
* not set P4_CCCR_OVF bit. Because a counter holds a negative value
|
||||
* we simply check for high bit being set, if it's cleared it means
|
||||
* the counter has reached zero value and continued counting before
|
||||
* real NMI signal was received:
|
||||
*/
|
||||
if (!(v & ARCH_P4_UNFLAGGED_BIT))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -143,15 +143,10 @@ static void __init ati_bugs(int num, int slot, int func)
|
|||
|
||||
static u32 __init ati_sbx00_rev(int num, int slot, int func)
|
||||
{
|
||||
u32 old, d;
|
||||
u32 d;
|
||||
|
||||
d = read_pci_config(num, slot, func, 0x70);
|
||||
old = d;
|
||||
d &= ~(1<<8);
|
||||
write_pci_config(num, slot, func, 0x70, d);
|
||||
d = read_pci_config(num, slot, func, 0x8);
|
||||
d &= 0xff;
|
||||
write_pci_config(num, slot, func, 0x70, old);
|
||||
|
||||
return d;
|
||||
}
|
||||
|
@ -160,11 +155,14 @@ static void __init ati_bugs_contd(int num, int slot, int func)
|
|||
{
|
||||
u32 d, rev;
|
||||
|
||||
if (acpi_use_timer_override)
|
||||
rev = ati_sbx00_rev(num, slot, func);
|
||||
if (rev >= 0x40)
|
||||
acpi_fix_pin2_polarity = 1;
|
||||
|
||||
if (rev > 0x13)
|
||||
return;
|
||||
|
||||
rev = ati_sbx00_rev(num, slot, func);
|
||||
if (rev > 0x13)
|
||||
if (acpi_use_timer_override)
|
||||
return;
|
||||
|
||||
/* check for IRQ0 interrupt swap */
|
||||
|
|
|
@ -285,6 +285,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
|
|||
DMI_MATCH(DMI_BOARD_NAME, "P4S800"),
|
||||
},
|
||||
},
|
||||
{ /* Handle problems with rebooting on VersaLogic Menlow boards */
|
||||
.callback = set_bios_reboot,
|
||||
.ident = "VersaLogic Menlow based board",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "VersaLogic Corporation"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "VersaLogic Menlow board"),
|
||||
},
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
|
|
|
@ -2777,6 +2777,8 @@ static int dr_interception(struct vcpu_svm *svm)
|
|||
kvm_register_write(&svm->vcpu, reg, val);
|
||||
}
|
||||
|
||||
skip_emulated_instruction(&svm->vcpu);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -1355,7 +1355,7 @@ int invalidate_partition(struct gendisk *disk, int partno)
|
|||
struct block_device *bdev = bdget_disk(disk, partno);
|
||||
if (bdev) {
|
||||
fsync_bdev(bdev);
|
||||
res = __invalidate_device(bdev);
|
||||
res = __invalidate_device(bdev, true);
|
||||
bdput(bdev);
|
||||
}
|
||||
return res;
|
||||
|
|
|
@ -294,9 +294,11 @@ int blkdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd,
|
|||
return -EINVAL;
|
||||
if (get_user(n, (int __user *) arg))
|
||||
return -EFAULT;
|
||||
if (!(mode & FMODE_EXCL) &&
|
||||
blkdev_get(bdev, mode | FMODE_EXCL, &bdev) < 0)
|
||||
if (!(mode & FMODE_EXCL)) {
|
||||
bdgrab(bdev);
|
||||
if (blkdev_get(bdev, mode | FMODE_EXCL, &bdev) < 0)
|
||||
return -EBUSY;
|
||||
}
|
||||
ret = set_blocksize(bdev, n);
|
||||
if (!(mode & FMODE_EXCL))
|
||||
blkdev_put(bdev, mode | FMODE_EXCL);
|
||||
|
|
|
@ -866,7 +866,8 @@ static int popen(struct atm_vcc *vcc)
|
|||
}
|
||||
|
||||
skb = alloc_skb(sizeof(*header), GFP_ATOMIC);
|
||||
if (!skb && net_ratelimit()) {
|
||||
if (!skb) {
|
||||
if (net_ratelimit())
|
||||
dev_warn(&card->dev->dev, "Failed to allocate sk_buff in popen()\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
|
|
@ -3281,7 +3281,7 @@ static int set_geometry(unsigned int cmd, struct floppy_struct *g,
|
|||
struct block_device *bdev = opened_bdev[cnt];
|
||||
if (!bdev || ITYPE(drive_state[cnt].fd_device) != type)
|
||||
continue;
|
||||
__invalidate_device(bdev);
|
||||
__invalidate_device(bdev, true);
|
||||
}
|
||||
mutex_unlock(&open_lock);
|
||||
} else {
|
||||
|
|
|
@ -39,6 +39,11 @@ static struct usb_device_id ath3k_table[] = {
|
|||
/* Atheros AR3011 with sflash firmware*/
|
||||
{ USB_DEVICE(0x0CF3, 0x3002) },
|
||||
|
||||
/* Atheros AR9285 Malbec with sflash firmware */
|
||||
{ USB_DEVICE(0x03F0, 0x311D) },
|
||||
|
||||
/* Atheros AR5BBU12 with sflash firmware */
|
||||
{ USB_DEVICE(0x0489, 0xE02C) },
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
|
||||
|
|
|
@ -102,6 +102,12 @@ static struct usb_device_id blacklist_table[] = {
|
|||
/* Atheros 3011 with sflash firmware */
|
||||
{ USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE },
|
||||
|
||||
/* Atheros AR9285 Malbec with sflash firmware */
|
||||
{ USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE },
|
||||
|
||||
/* Atheros AR5BBU12 with sflash firmware */
|
||||
{ USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },
|
||||
|
||||
/* Broadcom BCM2035 */
|
||||
{ USB_DEVICE(0x0a5c, 0x2035), .driver_info = BTUSB_WRONG_SCO_MTU },
|
||||
{ USB_DEVICE(0x0a5c, 0x200a), .driver_info = BTUSB_WRONG_SCO_MTU },
|
||||
|
@ -826,7 +832,7 @@ static void btusb_work(struct work_struct *work)
|
|||
|
||||
if (hdev->conn_hash.sco_num > 0) {
|
||||
if (!test_bit(BTUSB_DID_ISO_RESUME, &data->flags)) {
|
||||
err = usb_autopm_get_interface(data->isoc);
|
||||
err = usb_autopm_get_interface(data->isoc ? data->isoc : data->intf);
|
||||
if (err < 0) {
|
||||
clear_bit(BTUSB_ISOC_RUNNING, &data->flags);
|
||||
usb_kill_anchored_urbs(&data->isoc_anchor);
|
||||
|
@ -855,7 +861,7 @@ static void btusb_work(struct work_struct *work)
|
|||
|
||||
__set_isoc_interface(hdev, 0);
|
||||
if (test_and_clear_bit(BTUSB_DID_ISO_RESUME, &data->flags))
|
||||
usb_autopm_put_interface(data->isoc);
|
||||
usb_autopm_put_interface(data->isoc ? data->isoc : data->intf);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1038,8 +1044,6 @@ static int btusb_probe(struct usb_interface *intf,
|
|||
|
||||
usb_set_intfdata(intf, data);
|
||||
|
||||
usb_enable_autosuspend(interface_to_usbdev(intf));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -773,19 +773,24 @@ int __init agp_amd64_init(void)
|
|||
#else
|
||||
printk(KERN_INFO PFX "You can boot with agp=try_unsupported\n");
|
||||
#endif
|
||||
pci_unregister_driver(&agp_amd64_pci_driver);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* First check that we have at least one AMD64 NB */
|
||||
if (!pci_dev_present(amd_nb_misc_ids))
|
||||
if (!pci_dev_present(amd_nb_misc_ids)) {
|
||||
pci_unregister_driver(&agp_amd64_pci_driver);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* Look for any AGP bridge */
|
||||
agp_amd64_pci_driver.id_table = agp_amd64_pci_promisc_table;
|
||||
err = driver_attach(&agp_amd64_pci_driver.driver);
|
||||
if (err == 0 && agp_bridges_found == 0)
|
||||
if (err == 0 && agp_bridges_found == 0) {
|
||||
pci_unregister_driver(&agp_amd64_pci_driver);
|
||||
err = -ENODEV;
|
||||
}
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
@ -130,6 +130,7 @@
|
|||
#define INTEL_GMCH_GMS_STOLEN_352M (0xd << 4)
|
||||
|
||||
#define I915_IFPADDR 0x60
|
||||
#define I830_HIC 0x70
|
||||
|
||||
/* Intel 965G registers */
|
||||
#define I965_MSAC 0x62
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/pagemap.h>
|
||||
#include <linux/agp_backend.h>
|
||||
#include <linux/delay.h>
|
||||
#include <asm/smp.h>
|
||||
#include "agp.h"
|
||||
#include "intel-agp.h"
|
||||
|
@ -70,12 +71,8 @@ static struct _intel_private {
|
|||
u32 __iomem *gtt; /* I915G */
|
||||
bool clear_fake_agp; /* on first access via agp, fill with scratch */
|
||||
int num_dcache_entries;
|
||||
union {
|
||||
void __iomem *i9xx_flush_page;
|
||||
void *i8xx_flush_page;
|
||||
};
|
||||
char *i81x_gtt_table;
|
||||
struct page *i8xx_page;
|
||||
struct resource ifp_resource;
|
||||
int resource_valid;
|
||||
struct page *scratch_page;
|
||||
|
@ -722,28 +719,6 @@ static int intel_fake_agp_fetch_size(void)
|
|||
|
||||
static void i830_cleanup(void)
|
||||
{
|
||||
if (intel_private.i8xx_flush_page) {
|
||||
kunmap(intel_private.i8xx_flush_page);
|
||||
intel_private.i8xx_flush_page = NULL;
|
||||
}
|
||||
|
||||
__free_page(intel_private.i8xx_page);
|
||||
intel_private.i8xx_page = NULL;
|
||||
}
|
||||
|
||||
static void intel_i830_setup_flush(void)
|
||||
{
|
||||
/* return if we've already set the flush mechanism up */
|
||||
if (intel_private.i8xx_page)
|
||||
return;
|
||||
|
||||
intel_private.i8xx_page = alloc_page(GFP_KERNEL);
|
||||
if (!intel_private.i8xx_page)
|
||||
return;
|
||||
|
||||
intel_private.i8xx_flush_page = kmap(intel_private.i8xx_page);
|
||||
if (!intel_private.i8xx_flush_page)
|
||||
i830_cleanup();
|
||||
}
|
||||
|
||||
/* The chipset_flush interface needs to get data that has already been
|
||||
|
@ -758,14 +733,27 @@ static void intel_i830_setup_flush(void)
|
|||
*/
|
||||
static void i830_chipset_flush(void)
|
||||
{
|
||||
unsigned int *pg = intel_private.i8xx_flush_page;
|
||||
unsigned long timeout = jiffies + msecs_to_jiffies(1000);
|
||||
|
||||
memset(pg, 0, 1024);
|
||||
/* Forcibly evict everything from the CPU write buffers.
|
||||
* clflush appears to be insufficient.
|
||||
*/
|
||||
wbinvd_on_all_cpus();
|
||||
|
||||
if (cpu_has_clflush)
|
||||
clflush_cache_range(pg, 1024);
|
||||
else if (wbinvd_on_all_cpus() != 0)
|
||||
printk(KERN_ERR "Timed out waiting for cache flush.\n");
|
||||
/* Now we've only seen documents for this magic bit on 855GM,
|
||||
* we hope it exists for the other gen2 chipsets...
|
||||
*
|
||||
* Also works as advertised on my 845G.
|
||||
*/
|
||||
writel(readl(intel_private.registers+I830_HIC) | (1<<31),
|
||||
intel_private.registers+I830_HIC);
|
||||
|
||||
while (readl(intel_private.registers+I830_HIC) & (1<<31)) {
|
||||
if (time_after(jiffies, timeout))
|
||||
break;
|
||||
|
||||
udelay(50);
|
||||
}
|
||||
}
|
||||
|
||||
static void i830_write_entry(dma_addr_t addr, unsigned int entry,
|
||||
|
@ -849,8 +837,6 @@ static int i830_setup(void)
|
|||
|
||||
intel_private.gtt_bus_addr = reg_addr + I810_PTE_BASE;
|
||||
|
||||
intel_i830_setup_flush();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -830,8 +830,7 @@ static void monitor_card(unsigned long p)
|
|||
test_bit(IS_ANY_T1, &dev->flags))) {
|
||||
DEBUGP(4, dev, "Perform AUTOPPS\n");
|
||||
set_bit(IS_AUTOPPS_ACT, &dev->flags);
|
||||
ptsreq.protocol = ptsreq.protocol =
|
||||
(0x01 << dev->proto);
|
||||
ptsreq.protocol = (0x01 << dev->proto);
|
||||
ptsreq.flags = 0x01;
|
||||
ptsreq.pts1 = 0x00;
|
||||
ptsreq.pts2 = 0x00;
|
||||
|
|
|
@ -78,7 +78,6 @@ static void signalled_reboot_callback(void *callback_data)
|
|||
static int ipwireless_probe(struct pcmcia_device *p_dev, void *priv_data)
|
||||
{
|
||||
struct ipw_dev *ipw = priv_data;
|
||||
struct resource *io_resource;
|
||||
int ret;
|
||||
|
||||
p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH;
|
||||
|
@ -92,9 +91,12 @@ static int ipwireless_probe(struct pcmcia_device *p_dev, void *priv_data)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
io_resource = request_region(p_dev->resource[0]->start,
|
||||
if (!request_region(p_dev->resource[0]->start,
|
||||
resource_size(p_dev->resource[0]),
|
||||
IPWIRELESS_PCCARD_NAME);
|
||||
IPWIRELESS_PCCARD_NAME)) {
|
||||
ret = -EBUSY;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
p_dev->resource[2]->flags |=
|
||||
WIN_DATA_WIDTH_16 | WIN_MEMORY_TYPE_CM | WIN_ENABLE;
|
||||
|
@ -105,22 +107,25 @@ static int ipwireless_probe(struct pcmcia_device *p_dev, void *priv_data)
|
|||
|
||||
ret = pcmcia_map_mem_page(p_dev, p_dev->resource[2], p_dev->card_addr);
|
||||
if (ret != 0)
|
||||
goto exit2;
|
||||
goto exit1;
|
||||
|
||||
ipw->is_v2_card = resource_size(p_dev->resource[2]) == 0x100;
|
||||
|
||||
ipw->attr_memory = ioremap(p_dev->resource[2]->start,
|
||||
ipw->common_memory = ioremap(p_dev->resource[2]->start,
|
||||
resource_size(p_dev->resource[2]));
|
||||
request_mem_region(p_dev->resource[2]->start,
|
||||
if (!request_mem_region(p_dev->resource[2]->start,
|
||||
resource_size(p_dev->resource[2]),
|
||||
IPWIRELESS_PCCARD_NAME);
|
||||
IPWIRELESS_PCCARD_NAME)) {
|
||||
ret = -EBUSY;
|
||||
goto exit2;
|
||||
}
|
||||
|
||||
p_dev->resource[3]->flags |= WIN_DATA_WIDTH_16 | WIN_MEMORY_TYPE_AM |
|
||||
WIN_ENABLE;
|
||||
p_dev->resource[3]->end = 0; /* this used to be 0x1000 */
|
||||
ret = pcmcia_request_window(p_dev, p_dev->resource[3], 0);
|
||||
if (ret != 0)
|
||||
goto exit2;
|
||||
goto exit3;
|
||||
|
||||
ret = pcmcia_map_mem_page(p_dev, p_dev->resource[3], 0);
|
||||
if (ret != 0)
|
||||
|
@ -128,23 +133,28 @@ static int ipwireless_probe(struct pcmcia_device *p_dev, void *priv_data)
|
|||
|
||||
ipw->attr_memory = ioremap(p_dev->resource[3]->start,
|
||||
resource_size(p_dev->resource[3]));
|
||||
request_mem_region(p_dev->resource[3]->start,
|
||||
if (!request_mem_region(p_dev->resource[3]->start,
|
||||
resource_size(p_dev->resource[3]),
|
||||
IPWIRELESS_PCCARD_NAME);
|
||||
IPWIRELESS_PCCARD_NAME)) {
|
||||
ret = -EBUSY;
|
||||
goto exit4;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
exit4:
|
||||
iounmap(ipw->attr_memory);
|
||||
exit3:
|
||||
exit2:
|
||||
if (ipw->common_memory) {
|
||||
release_mem_region(p_dev->resource[2]->start,
|
||||
resource_size(p_dev->resource[2]));
|
||||
exit2:
|
||||
iounmap(ipw->common_memory);
|
||||
}
|
||||
exit1:
|
||||
release_resource(io_resource);
|
||||
release_region(p_dev->resource[0]->start,
|
||||
resource_size(p_dev->resource[0]));
|
||||
exit:
|
||||
pcmcia_disable_device(p_dev);
|
||||
return -1;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int config_ipwireless(struct ipw_dev *ipw)
|
||||
|
@ -219,6 +229,8 @@ exit:
|
|||
|
||||
static void release_ipwireless(struct ipw_dev *ipw)
|
||||
{
|
||||
release_region(ipw->link->resource[0]->start,
|
||||
resource_size(ipw->link->resource[0]));
|
||||
if (ipw->common_memory) {
|
||||
release_mem_region(ipw->link->resource[2]->start,
|
||||
resource_size(ipw->link->resource[2]));
|
||||
|
|
|
@ -364,14 +364,12 @@ unsigned long tpm_calc_ordinal_duration(struct tpm_chip *chip,
|
|||
tpm_protected_ordinal_duration[ordinal &
|
||||
TPM_PROTECTED_ORDINAL_MASK];
|
||||
|
||||
if (duration_idx != TPM_UNDEFINED) {
|
||||
if (duration_idx != TPM_UNDEFINED)
|
||||
duration = chip->vendor.duration[duration_idx];
|
||||
/* if duration is 0, it's because chip->vendor.duration wasn't */
|
||||
/* filled yet, so we set the lowest timeout just to give enough */
|
||||
/* time for tpm_get_timeouts() to succeed */
|
||||
return (duration <= 0 ? HZ : duration);
|
||||
} else
|
||||
if (duration <= 0)
|
||||
return 2 * 60 * HZ;
|
||||
else
|
||||
return duration;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tpm_calc_ordinal_duration);
|
||||
|
||||
|
@ -577,11 +575,9 @@ duration:
|
|||
if (rc)
|
||||
return;
|
||||
|
||||
if (be32_to_cpu(tpm_cmd.header.out.return_code) != 0 ||
|
||||
be32_to_cpu(tpm_cmd.header.out.length)
|
||||
!= sizeof(tpm_cmd.header.out) + sizeof(u32) + 3 * sizeof(u32))
|
||||
if (be32_to_cpu(tpm_cmd.header.out.return_code)
|
||||
!= 3 * sizeof(u32))
|
||||
return;
|
||||
|
||||
duration_cap = &tpm_cmd.params.getcap_out.cap.duration;
|
||||
chip->vendor.duration[TPM_SHORT] =
|
||||
usecs_to_jiffies(be32_to_cpu(duration_cap->tpm_short));
|
||||
|
@ -941,18 +937,6 @@ ssize_t tpm_show_caps_1_2(struct device * dev,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(tpm_show_caps_1_2);
|
||||
|
||||
ssize_t tpm_show_timeouts(struct device *dev, struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
struct tpm_chip *chip = dev_get_drvdata(dev);
|
||||
|
||||
return sprintf(buf, "%d %d %d\n",
|
||||
jiffies_to_usecs(chip->vendor.duration[TPM_SHORT]),
|
||||
jiffies_to_usecs(chip->vendor.duration[TPM_MEDIUM]),
|
||||
jiffies_to_usecs(chip->vendor.duration[TPM_LONG]));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tpm_show_timeouts);
|
||||
|
||||
ssize_t tpm_store_cancel(struct device *dev, struct device_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
|
|
|
@ -56,8 +56,6 @@ extern ssize_t tpm_show_owned(struct device *, struct device_attribute *attr,
|
|||
char *);
|
||||
extern ssize_t tpm_show_temp_deactivated(struct device *,
|
||||
struct device_attribute *attr, char *);
|
||||
extern ssize_t tpm_show_timeouts(struct device *,
|
||||
struct device_attribute *attr, char *);
|
||||
|
||||
struct tpm_chip;
|
||||
|
||||
|
|
|
@ -376,7 +376,6 @@ static DEVICE_ATTR(temp_deactivated, S_IRUGO, tpm_show_temp_deactivated,
|
|||
NULL);
|
||||
static DEVICE_ATTR(caps, S_IRUGO, tpm_show_caps_1_2, NULL);
|
||||
static DEVICE_ATTR(cancel, S_IWUSR | S_IWGRP, NULL, tpm_store_cancel);
|
||||
static DEVICE_ATTR(timeouts, S_IRUGO, tpm_show_timeouts, NULL);
|
||||
|
||||
static struct attribute *tis_attrs[] = {
|
||||
&dev_attr_pubek.attr,
|
||||
|
@ -386,8 +385,7 @@ static struct attribute *tis_attrs[] = {
|
|||
&dev_attr_owned.attr,
|
||||
&dev_attr_temp_deactivated.attr,
|
||||
&dev_attr_caps.attr,
|
||||
&dev_attr_cancel.attr,
|
||||
&dev_attr_timeouts.attr, NULL,
|
||||
&dev_attr_cancel.attr, NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group tis_attr_grp = {
|
||||
|
|
|
@ -164,8 +164,10 @@ static void vblank_disable_and_save(struct drm_device *dev, int crtc)
|
|||
* available. In that case we can't account for this and just
|
||||
* hope for the best.
|
||||
*/
|
||||
if ((vblrc > 0) && (abs(diff_ns) > 1000000))
|
||||
if ((vblrc > 0) && (abs64(diff_ns) > 1000000)) {
|
||||
atomic_inc(&dev->_vblank_count[crtc]);
|
||||
smp_mb__after_atomic_inc();
|
||||
}
|
||||
|
||||
/* Invalidate all timestamps while vblank irq's are off. */
|
||||
clear_vblank_timestamps(dev, crtc);
|
||||
|
@ -491,6 +493,12 @@ void drm_calc_timestamping_constants(struct drm_crtc *crtc)
|
|||
/* Dot clock in Hz: */
|
||||
dotclock = (u64) crtc->hwmode.clock * 1000;
|
||||
|
||||
/* Fields of interlaced scanout modes are only halve a frame duration.
|
||||
* Double the dotclock to get halve the frame-/line-/pixelduration.
|
||||
*/
|
||||
if (crtc->hwmode.flags & DRM_MODE_FLAG_INTERLACE)
|
||||
dotclock *= 2;
|
||||
|
||||
/* Valid dotclock? */
|
||||
if (dotclock > 0) {
|
||||
/* Convert scanline length in pixels and video dot clock to
|
||||
|
@ -603,14 +611,6 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, int crtc,
|
|||
return -EAGAIN;
|
||||
}
|
||||
|
||||
/* Don't know yet how to handle interlaced or
|
||||
* double scan modes. Just no-op for now.
|
||||
*/
|
||||
if (mode->flags & (DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLSCAN)) {
|
||||
DRM_DEBUG("crtc %d: Noop due to unsupported mode.\n", crtc);
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
/* Get current scanout position with system timestamp.
|
||||
* Repeat query up to DRM_TIMESTAMP_MAXRETRIES times
|
||||
* if single query takes longer than max_error nanoseconds.
|
||||
|
@ -858,10 +858,11 @@ static void drm_update_vblank_count(struct drm_device *dev, int crtc)
|
|||
if (rc) {
|
||||
tslot = atomic_read(&dev->_vblank_count[crtc]) + diff;
|
||||
vblanktimestamp(dev, crtc, tslot) = t_vblank;
|
||||
smp_wmb();
|
||||
}
|
||||
|
||||
smp_mb__before_atomic_inc();
|
||||
atomic_add(diff, &dev->_vblank_count[crtc]);
|
||||
smp_mb__after_atomic_inc();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1011,7 +1012,8 @@ int drm_modeset_ctl(struct drm_device *dev, void *data,
|
|||
struct drm_file *file_priv)
|
||||
{
|
||||
struct drm_modeset_ctl *modeset = data;
|
||||
int crtc, ret = 0;
|
||||
int ret = 0;
|
||||
unsigned int crtc;
|
||||
|
||||
/* If drm_vblank_init() hasn't been called yet, just no-op */
|
||||
if (!dev->num_crtcs)
|
||||
|
@ -1293,15 +1295,16 @@ bool drm_handle_vblank(struct drm_device *dev, int crtc)
|
|||
* e.g., due to spurious vblank interrupts. We need to
|
||||
* ignore those for accounting.
|
||||
*/
|
||||
if (abs(diff_ns) > DRM_REDUNDANT_VBLIRQ_THRESH_NS) {
|
||||
if (abs64(diff_ns) > DRM_REDUNDANT_VBLIRQ_THRESH_NS) {
|
||||
/* Store new timestamp in ringbuffer. */
|
||||
vblanktimestamp(dev, crtc, vblcount + 1) = tvblank;
|
||||
smp_wmb();
|
||||
|
||||
/* Increment cooked vblank count. This also atomically commits
|
||||
* the timestamp computed above.
|
||||
*/
|
||||
smp_mb__before_atomic_inc();
|
||||
atomic_inc(&dev->_vblank_count[crtc]);
|
||||
smp_mb__after_atomic_inc();
|
||||
} else {
|
||||
DRM_DEBUG("crtc %d: Redundant vblirq ignored. diff_ns = %d\n",
|
||||
crtc, (int) diff_ns);
|
||||
|
|
|
@ -184,7 +184,7 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev)
|
|||
static bool
|
||||
i915_tiling_ok(struct drm_device *dev, int stride, int size, int tiling_mode)
|
||||
{
|
||||
int tile_width;
|
||||
int tile_width, tile_height;
|
||||
|
||||
/* Linear is always fine */
|
||||
if (tiling_mode == I915_TILING_NONE)
|
||||
|
@ -215,6 +215,20 @@ i915_tiling_ok(struct drm_device *dev, int stride, int size, int tiling_mode)
|
|||
}
|
||||
}
|
||||
|
||||
if (IS_GEN2(dev) ||
|
||||
(tiling_mode == I915_TILING_Y && HAS_128_BYTE_Y_TILING(dev)))
|
||||
tile_height = 32;
|
||||
else
|
||||
tile_height = 8;
|
||||
/* i8xx is strange: It has 2 interleaved rows of tiles, so needs an even
|
||||
* number of tile rows. */
|
||||
if (IS_GEN2(dev))
|
||||
tile_height *= 2;
|
||||
|
||||
/* Size needs to be aligned to a full tile row */
|
||||
if (size & (tile_height * stride - 1))
|
||||
return false;
|
||||
|
||||
/* 965+ just needs multiples of tile width */
|
||||
if (INTEL_INFO(dev)->gen >= 4) {
|
||||
if (stride & (tile_width - 1))
|
||||
|
|
|
@ -316,6 +316,8 @@ static void i915_hotplug_work_func(struct work_struct *work)
|
|||
struct drm_mode_config *mode_config = &dev->mode_config;
|
||||
struct intel_encoder *encoder;
|
||||
|
||||
DRM_DEBUG_KMS("running encoder hotplug functions\n");
|
||||
|
||||
list_for_each_entry(encoder, &mode_config->encoder_list, base.head)
|
||||
if (encoder->hot_plug)
|
||||
encoder->hot_plug(encoder);
|
||||
|
@ -1649,9 +1651,7 @@ static int ironlake_irq_postinstall(struct drm_device *dev)
|
|||
} else {
|
||||
hotplug_mask = SDE_CRT_HOTPLUG | SDE_PORTB_HOTPLUG |
|
||||
SDE_PORTC_HOTPLUG | SDE_PORTD_HOTPLUG;
|
||||
hotplug_mask |= SDE_AUX_MASK | SDE_FDI_MASK | SDE_TRANS_MASK;
|
||||
I915_WRITE(FDI_RXA_IMR, 0);
|
||||
I915_WRITE(FDI_RXB_IMR, 0);
|
||||
hotplug_mask |= SDE_AUX_MASK;
|
||||
}
|
||||
|
||||
dev_priv->pch_irq_mask = ~hotplug_mask;
|
||||
|
|
|
@ -1553,17 +1553,7 @@
|
|||
|
||||
/* Backlight control */
|
||||
#define BLC_PWM_CTL 0x61254
|
||||
#define BACKLIGHT_MODULATION_FREQ_SHIFT (17)
|
||||
#define BLC_PWM_CTL2 0x61250 /* 965+ only */
|
||||
#define BLM_COMBINATION_MODE (1 << 30)
|
||||
/*
|
||||
* This is the most significant 15 bits of the number of backlight cycles in a
|
||||
* complete cycle of the modulated backlight control.
|
||||
*
|
||||
* The actual value is this field multiplied by two.
|
||||
*/
|
||||
#define BACKLIGHT_MODULATION_FREQ_MASK (0x7fff << 17)
|
||||
#define BLM_LEGACY_MODE (1 << 16)
|
||||
/*
|
||||
* This is the number of cycles out of the backlight modulation cycle for which
|
||||
* the backlight is on.
|
||||
|
|
|
@ -1630,19 +1630,19 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
|
|||
struct drm_i915_gem_object *obj = to_intel_framebuffer(old_fb)->obj;
|
||||
|
||||
wait_event(dev_priv->pending_flip_queue,
|
||||
atomic_read(&dev_priv->mm.wedged) ||
|
||||
atomic_read(&obj->pending_flip) == 0);
|
||||
|
||||
/* Big Hammer, we also need to ensure that any pending
|
||||
* MI_WAIT_FOR_EVENT inside a user batch buffer on the
|
||||
* current scanout is retired before unpinning the old
|
||||
* framebuffer.
|
||||
*
|
||||
* This should only fail upon a hung GPU, in which case we
|
||||
* can safely continue.
|
||||
*/
|
||||
ret = i915_gem_object_flush_gpu(obj, false);
|
||||
if (ret) {
|
||||
i915_gem_object_unpin(to_intel_framebuffer(crtc->fb)->obj);
|
||||
mutex_unlock(&dev->struct_mutex);
|
||||
return ret;
|
||||
}
|
||||
(void) ret;
|
||||
}
|
||||
|
||||
ret = intel_pipe_set_base_atomic(crtc, crtc->fb, x, y,
|
||||
|
@ -2045,6 +2045,31 @@ static void intel_crtc_wait_for_pending_flips(struct drm_crtc *crtc)
|
|||
atomic_read(&obj->pending_flip) == 0);
|
||||
}
|
||||
|
||||
static bool intel_crtc_driving_pch(struct drm_crtc *crtc)
|
||||
{
|
||||
struct drm_device *dev = crtc->dev;
|
||||
struct drm_mode_config *mode_config = &dev->mode_config;
|
||||
struct intel_encoder *encoder;
|
||||
|
||||
/*
|
||||
* If there's a non-PCH eDP on this crtc, it must be DP_A, and that
|
||||
* must be driven by its own crtc; no sharing is possible.
|
||||
*/
|
||||
list_for_each_entry(encoder, &mode_config->encoder_list, base.head) {
|
||||
if (encoder->base.crtc != crtc)
|
||||
continue;
|
||||
|
||||
switch (encoder->type) {
|
||||
case INTEL_OUTPUT_EDP:
|
||||
if (!intel_encoder_is_pch_edp(&encoder->base))
|
||||
return false;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void ironlake_crtc_enable(struct drm_crtc *crtc)
|
||||
{
|
||||
struct drm_device *dev = crtc->dev;
|
||||
|
@ -2053,6 +2078,7 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)
|
|||
int pipe = intel_crtc->pipe;
|
||||
int plane = intel_crtc->plane;
|
||||
u32 reg, temp;
|
||||
bool is_pch_port = false;
|
||||
|
||||
if (intel_crtc->active)
|
||||
return;
|
||||
|
@ -2066,7 +2092,56 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)
|
|||
I915_WRITE(PCH_LVDS, temp | LVDS_PORT_EN);
|
||||
}
|
||||
|
||||
is_pch_port = intel_crtc_driving_pch(crtc);
|
||||
|
||||
if (is_pch_port)
|
||||
ironlake_fdi_enable(crtc);
|
||||
else {
|
||||
/* disable CPU FDI tx and PCH FDI rx */
|
||||
reg = FDI_TX_CTL(pipe);
|
||||
temp = I915_READ(reg);
|
||||
I915_WRITE(reg, temp & ~FDI_TX_ENABLE);
|
||||
POSTING_READ(reg);
|
||||
|
||||
reg = FDI_RX_CTL(pipe);
|
||||
temp = I915_READ(reg);
|
||||
temp &= ~(0x7 << 16);
|
||||
temp |= (I915_READ(PIPECONF(pipe)) & PIPE_BPC_MASK) << 11;
|
||||
I915_WRITE(reg, temp & ~FDI_RX_ENABLE);
|
||||
|
||||
POSTING_READ(reg);
|
||||
udelay(100);
|
||||
|
||||
/* Ironlake workaround, disable clock pointer after downing FDI */
|
||||
if (HAS_PCH_IBX(dev))
|
||||
I915_WRITE(FDI_RX_CHICKEN(pipe),
|
||||
I915_READ(FDI_RX_CHICKEN(pipe) &
|
||||
~FDI_RX_PHASE_SYNC_POINTER_ENABLE));
|
||||
|
||||
/* still set train pattern 1 */
|
||||
reg = FDI_TX_CTL(pipe);
|
||||
temp = I915_READ(reg);
|
||||
temp &= ~FDI_LINK_TRAIN_NONE;
|
||||
temp |= FDI_LINK_TRAIN_PATTERN_1;
|
||||
I915_WRITE(reg, temp);
|
||||
|
||||
reg = FDI_RX_CTL(pipe);
|
||||
temp = I915_READ(reg);
|
||||
if (HAS_PCH_CPT(dev)) {
|
||||
temp &= ~FDI_LINK_TRAIN_PATTERN_MASK_CPT;
|
||||
temp |= FDI_LINK_TRAIN_PATTERN_1_CPT;
|
||||
} else {
|
||||
temp &= ~FDI_LINK_TRAIN_NONE;
|
||||
temp |= FDI_LINK_TRAIN_PATTERN_1;
|
||||
}
|
||||
/* BPC in FDI rx is consistent with that in PIPECONF */
|
||||
temp &= ~(0x07 << 16);
|
||||
temp |= (I915_READ(PIPECONF(pipe)) & PIPE_BPC_MASK) << 11;
|
||||
I915_WRITE(reg, temp);
|
||||
|
||||
POSTING_READ(reg);
|
||||
udelay(100);
|
||||
}
|
||||
|
||||
/* Enable panel fitting for LVDS */
|
||||
if (dev_priv->pch_pf_size &&
|
||||
|
@ -2100,6 +2175,10 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)
|
|||
intel_flush_display_plane(dev, plane);
|
||||
}
|
||||
|
||||
/* Skip the PCH stuff if possible */
|
||||
if (!is_pch_port)
|
||||
goto done;
|
||||
|
||||
/* For PCH output, training FDI link */
|
||||
if (IS_GEN6(dev))
|
||||
gen6_fdi_link_train(crtc);
|
||||
|
@ -2184,7 +2263,7 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)
|
|||
I915_WRITE(reg, temp | TRANS_ENABLE);
|
||||
if (wait_for(I915_READ(reg) & TRANS_STATE_ENABLE, 100))
|
||||
DRM_ERROR("failed to enable transcoder %d\n", pipe);
|
||||
|
||||
done:
|
||||
intel_crtc_load_lut(crtc);
|
||||
intel_update_fbc(dev);
|
||||
intel_crtc_update_cursor(crtc, true);
|
||||
|
@ -6496,7 +6575,7 @@ static void ironlake_disable_rc6(struct drm_device *dev)
|
|||
POSTING_READ(RSTDBYCTL);
|
||||
}
|
||||
|
||||
ironlake_disable_rc6(dev);
|
||||
ironlake_teardown_rc6(dev);
|
||||
}
|
||||
|
||||
static int ironlake_setup_rc6(struct drm_device *dev)
|
||||
|
|
|
@ -30,8 +30,6 @@
|
|||
|
||||
#include "intel_drv.h"
|
||||
|
||||
#define PCI_LBPC 0xf4 /* legacy/combination backlight modes */
|
||||
|
||||
void
|
||||
intel_fixed_panel_mode(struct drm_display_mode *fixed_mode,
|
||||
struct drm_display_mode *adjusted_mode)
|
||||
|
@ -112,19 +110,6 @@ done:
|
|||
dev_priv->pch_pf_size = (width << 16) | height;
|
||||
}
|
||||
|
||||
static int is_backlight_combination_mode(struct drm_device *dev)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
|
||||
if (INTEL_INFO(dev)->gen >= 4)
|
||||
return I915_READ(BLC_PWM_CTL2) & BLM_COMBINATION_MODE;
|
||||
|
||||
if (IS_GEN2(dev))
|
||||
return I915_READ(BLC_PWM_CTL) & BLM_LEGACY_MODE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u32 i915_read_blc_pwm_ctl(struct drm_i915_private *dev_priv)
|
||||
{
|
||||
u32 val;
|
||||
|
@ -181,9 +166,6 @@ u32 intel_panel_get_max_backlight(struct drm_device *dev)
|
|||
if (INTEL_INFO(dev)->gen < 4)
|
||||
max &= ~1;
|
||||
}
|
||||
|
||||
if (is_backlight_combination_mode(dev))
|
||||
max *= 0xff;
|
||||
}
|
||||
|
||||
DRM_DEBUG_DRIVER("max backlight PWM = %d\n", max);
|
||||
|
@ -201,15 +183,6 @@ u32 intel_panel_get_backlight(struct drm_device *dev)
|
|||
val = I915_READ(BLC_PWM_CTL) & BACKLIGHT_DUTY_CYCLE_MASK;
|
||||
if (IS_PINEVIEW(dev))
|
||||
val >>= 1;
|
||||
|
||||
if (is_backlight_combination_mode(dev)){
|
||||
u8 lbpc;
|
||||
|
||||
val &= ~1;
|
||||
pci_read_config_byte(dev->pdev, PCI_LBPC, &lbpc);
|
||||
val *= lbpc;
|
||||
val >>= 1;
|
||||
}
|
||||
}
|
||||
|
||||
DRM_DEBUG_DRIVER("get backlight PWM = %d\n", val);
|
||||
|
@ -232,16 +205,6 @@ void intel_panel_set_backlight(struct drm_device *dev, u32 level)
|
|||
|
||||
if (HAS_PCH_SPLIT(dev))
|
||||
return intel_pch_panel_set_backlight(dev, level);
|
||||
|
||||
if (is_backlight_combination_mode(dev)){
|
||||
u32 max = intel_panel_get_max_backlight(dev);
|
||||
u8 lpbc;
|
||||
|
||||
lpbc = level * 0xfe / max + 1;
|
||||
level /= lpbc;
|
||||
pci_write_config_byte(dev->pdev, PCI_LBPC, lpbc);
|
||||
}
|
||||
|
||||
tmp = I915_READ(BLC_PWM_CTL);
|
||||
if (IS_PINEVIEW(dev)) {
|
||||
tmp &= ~(BACKLIGHT_DUTY_CYCLE_MASK - 1);
|
||||
|
|
|
@ -6228,7 +6228,7 @@ parse_dcb15_entry(struct drm_device *dev, struct dcb_table *dcb,
|
|||
entry->tvconf.has_component_output = false;
|
||||
break;
|
||||
case OUTPUT_LVDS:
|
||||
if ((conn & 0x00003f00) != 0x10)
|
||||
if ((conn & 0x00003f00) >> 8 != 0x10)
|
||||
entry->lvdsconf.use_straps_for_mode = true;
|
||||
entry->lvdsconf.use_power_scripts = true;
|
||||
break;
|
||||
|
|
|
@ -49,7 +49,10 @@ nouveau_bo_del_ttm(struct ttm_buffer_object *bo)
|
|||
DRM_ERROR("bo %p still attached to GEM object\n", bo);
|
||||
|
||||
nv10_mem_put_tile_region(dev, nvbo->tile, NULL);
|
||||
if (nvbo->vma.node) {
|
||||
nouveau_vm_unmap(&nvbo->vma);
|
||||
nouveau_vm_put(&nvbo->vma);
|
||||
}
|
||||
kfree(nvbo);
|
||||
}
|
||||
|
||||
|
@ -128,6 +131,7 @@ nouveau_bo_new(struct drm_device *dev, struct nouveau_channel *chan,
|
|||
}
|
||||
}
|
||||
|
||||
nvbo->bo.mem.num_pages = size >> PAGE_SHIFT;
|
||||
nouveau_bo_placement_set(nvbo, flags, 0);
|
||||
|
||||
nvbo->channel = chan;
|
||||
|
@ -166,17 +170,17 @@ static void
|
|||
set_placement_range(struct nouveau_bo *nvbo, uint32_t type)
|
||||
{
|
||||
struct drm_nouveau_private *dev_priv = nouveau_bdev(nvbo->bo.bdev);
|
||||
int vram_pages = dev_priv->vram_size >> PAGE_SHIFT;
|
||||
|
||||
if (dev_priv->card_type == NV_10 &&
|
||||
nvbo->tile_mode && (type & TTM_PL_FLAG_VRAM)) {
|
||||
nvbo->tile_mode && (type & TTM_PL_FLAG_VRAM) &&
|
||||
nvbo->bo.mem.num_pages < vram_pages / 2) {
|
||||
/*
|
||||
* Make sure that the color and depth buffers are handled
|
||||
* by independent memory controller units. Up to a 9x
|
||||
* speed up when alpha-blending and depth-test are enabled
|
||||
* at the same time.
|
||||
*/
|
||||
int vram_pages = dev_priv->vram_size >> PAGE_SHIFT;
|
||||
|
||||
if (nvbo->tile_flags & NOUVEAU_GEM_TILE_ZETA) {
|
||||
nvbo->placement.fpfn = vram_pages / 2;
|
||||
nvbo->placement.lpfn = ~0;
|
||||
|
@ -785,7 +789,7 @@ nouveau_bo_move_flipd(struct ttm_buffer_object *bo, bool evict, bool intr,
|
|||
if (ret)
|
||||
goto out;
|
||||
|
||||
ret = ttm_bo_move_ttm(bo, evict, no_wait_reserve, no_wait_gpu, new_mem);
|
||||
ret = ttm_bo_move_ttm(bo, true, no_wait_reserve, no_wait_gpu, new_mem);
|
||||
out:
|
||||
ttm_bo_mem_put(bo, &tmp_mem);
|
||||
return ret;
|
||||
|
@ -811,11 +815,11 @@ nouveau_bo_move_flips(struct ttm_buffer_object *bo, bool evict, bool intr,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = ttm_bo_move_ttm(bo, evict, no_wait_reserve, no_wait_gpu, &tmp_mem);
|
||||
ret = ttm_bo_move_ttm(bo, true, no_wait_reserve, no_wait_gpu, &tmp_mem);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
ret = nouveau_bo_move_m2mf(bo, evict, intr, no_wait_reserve, no_wait_gpu, new_mem);
|
||||
ret = nouveau_bo_move_m2mf(bo, true, intr, no_wait_reserve, no_wait_gpu, new_mem);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
|
|
|
@ -507,6 +507,7 @@ nouveau_connector_native_mode(struct drm_connector *connector)
|
|||
int high_w = 0, high_h = 0, high_v = 0;
|
||||
|
||||
list_for_each_entry(mode, &nv_connector->base.probed_modes, head) {
|
||||
mode->vrefresh = drm_mode_vrefresh(mode);
|
||||
if (helper->mode_valid(connector, mode) != MODE_OK ||
|
||||
(mode->flags & DRM_MODE_FLAG_INTERLACE))
|
||||
continue;
|
||||
|
|
|
@ -543,7 +543,7 @@ nouveau_pm_resume(struct drm_device *dev)
|
|||
struct nouveau_pm_engine *pm = &dev_priv->engine.pm;
|
||||
struct nouveau_pm_level *perflvl;
|
||||
|
||||
if (pm->cur == &pm->boot)
|
||||
if (!pm->cur || pm->cur == &pm->boot)
|
||||
return;
|
||||
|
||||
perflvl = pm->cur;
|
||||
|
|
|
@ -342,8 +342,8 @@ static void nv04_dfp_mode_set(struct drm_encoder *encoder,
|
|||
if (nv_encoder->dcb->type == OUTPUT_LVDS) {
|
||||
bool duallink, dummy;
|
||||
|
||||
nouveau_bios_parse_lvds_table(dev, nv_connector->native_mode->
|
||||
clock, &duallink, &dummy);
|
||||
nouveau_bios_parse_lvds_table(dev, output_mode->clock,
|
||||
&duallink, &dummy);
|
||||
if (duallink)
|
||||
regp->fp_control |= (8 << 28);
|
||||
} else
|
||||
|
@ -518,8 +518,6 @@ static void nv04_lvds_dpms(struct drm_encoder *encoder, int mode)
|
|||
return;
|
||||
|
||||
if (nv_encoder->dcb->lvdsconf.use_power_scripts) {
|
||||
struct nouveau_connector *nv_connector = nouveau_encoder_connector_get(nv_encoder);
|
||||
|
||||
/* when removing an output, crtc may not be set, but PANEL_OFF
|
||||
* must still be run
|
||||
*/
|
||||
|
@ -527,12 +525,8 @@ static void nv04_lvds_dpms(struct drm_encoder *encoder, int mode)
|
|||
nv04_dfp_get_bound_head(dev, nv_encoder->dcb);
|
||||
|
||||
if (mode == DRM_MODE_DPMS_ON) {
|
||||
if (!nv_connector->native_mode) {
|
||||
NV_ERROR(dev, "Not turning on LVDS without native mode\n");
|
||||
return;
|
||||
}
|
||||
call_lvds_script(dev, nv_encoder->dcb, head,
|
||||
LVDS_PANEL_ON, nv_connector->native_mode->clock);
|
||||
LVDS_PANEL_ON, nv_encoder->mode.clock);
|
||||
} else
|
||||
/* pxclk of 0 is fine for PANEL_OFF, and for a
|
||||
* disconnected LVDS encoder there is no native_mode
|
||||
|
|
|
@ -211,30 +211,35 @@ nv40_graph_set_tile_region(struct drm_device *dev, int i)
|
|||
struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i];
|
||||
|
||||
switch (dev_priv->chipset) {
|
||||
case 0x44:
|
||||
case 0x4a:
|
||||
case 0x40:
|
||||
case 0x41: /* guess */
|
||||
case 0x42:
|
||||
case 0x43:
|
||||
case 0x45: /* guess */
|
||||
case 0x4e:
|
||||
nv_wr32(dev, NV20_PGRAPH_TSIZE(i), tile->pitch);
|
||||
nv_wr32(dev, NV20_PGRAPH_TLIMIT(i), tile->limit);
|
||||
nv_wr32(dev, NV20_PGRAPH_TILE(i), tile->addr);
|
||||
break;
|
||||
|
||||
case 0x46:
|
||||
case 0x47:
|
||||
case 0x49:
|
||||
case 0x4b:
|
||||
nv_wr32(dev, NV47_PGRAPH_TSIZE(i), tile->pitch);
|
||||
nv_wr32(dev, NV47_PGRAPH_TLIMIT(i), tile->limit);
|
||||
nv_wr32(dev, NV47_PGRAPH_TILE(i), tile->addr);
|
||||
nv_wr32(dev, NV40_PGRAPH_TSIZE1(i), tile->pitch);
|
||||
nv_wr32(dev, NV40_PGRAPH_TLIMIT1(i), tile->limit);
|
||||
nv_wr32(dev, NV40_PGRAPH_TILE1(i), tile->addr);
|
||||
break;
|
||||
|
||||
default:
|
||||
case 0x44:
|
||||
case 0x4a:
|
||||
nv_wr32(dev, NV20_PGRAPH_TSIZE(i), tile->pitch);
|
||||
nv_wr32(dev, NV20_PGRAPH_TLIMIT(i), tile->limit);
|
||||
nv_wr32(dev, NV20_PGRAPH_TILE(i), tile->addr);
|
||||
break;
|
||||
case 0x46:
|
||||
case 0x47:
|
||||
case 0x49:
|
||||
case 0x4b:
|
||||
case 0x4c:
|
||||
case 0x67:
|
||||
default:
|
||||
nv_wr32(dev, NV47_PGRAPH_TSIZE(i), tile->pitch);
|
||||
nv_wr32(dev, NV47_PGRAPH_TLIMIT(i), tile->limit);
|
||||
nv_wr32(dev, NV47_PGRAPH_TILE(i), tile->addr);
|
||||
nv_wr32(dev, NV40_PGRAPH_TSIZE1(i), tile->pitch);
|
||||
nv_wr32(dev, NV40_PGRAPH_TLIMIT1(i), tile->limit);
|
||||
nv_wr32(dev, NV40_PGRAPH_TILE1(i), tile->addr);
|
||||
|
@ -396,17 +401,20 @@ nv40_graph_init(struct drm_device *dev)
|
|||
break;
|
||||
default:
|
||||
switch (dev_priv->chipset) {
|
||||
case 0x46:
|
||||
case 0x47:
|
||||
case 0x49:
|
||||
case 0x4b:
|
||||
nv_wr32(dev, 0x400DF0, nv_rd32(dev, NV04_PFB_CFG0));
|
||||
nv_wr32(dev, 0x400DF4, nv_rd32(dev, NV04_PFB_CFG1));
|
||||
break;
|
||||
default:
|
||||
case 0x41:
|
||||
case 0x42:
|
||||
case 0x43:
|
||||
case 0x45:
|
||||
case 0x4e:
|
||||
case 0x44:
|
||||
case 0x4a:
|
||||
nv_wr32(dev, 0x4009F0, nv_rd32(dev, NV04_PFB_CFG0));
|
||||
nv_wr32(dev, 0x4009F4, nv_rd32(dev, NV04_PFB_CFG1));
|
||||
break;
|
||||
default:
|
||||
nv_wr32(dev, 0x400DF0, nv_rd32(dev, NV04_PFB_CFG0));
|
||||
nv_wr32(dev, 0x400DF4, nv_rd32(dev, NV04_PFB_CFG1));
|
||||
break;
|
||||
}
|
||||
nv_wr32(dev, 0x4069F0, nv_rd32(dev, NV04_PFB_CFG0));
|
||||
nv_wr32(dev, 0x4069F4, nv_rd32(dev, NV04_PFB_CFG1));
|
||||
|
|
|
@ -557,9 +557,9 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,
|
|||
|
||||
/* use recommended ref_div for ss */
|
||||
if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) {
|
||||
pll->flags |= RADEON_PLL_PREFER_MINM_OVER_MAXP;
|
||||
if (ss_enabled) {
|
||||
if (ss->refdiv) {
|
||||
pll->flags |= RADEON_PLL_PREFER_MINM_OVER_MAXP;
|
||||
pll->flags |= RADEON_PLL_USE_REF_DIV;
|
||||
pll->reference_div = ss->refdiv;
|
||||
if (ASIC_IS_AVIVO(rdev))
|
||||
|
@ -662,10 +662,12 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,
|
|||
index, (uint32_t *)&args);
|
||||
adjusted_clock = le32_to_cpu(args.v3.sOutput.ulDispPllFreq) * 10;
|
||||
if (args.v3.sOutput.ucRefDiv) {
|
||||
pll->flags |= RADEON_PLL_USE_FRAC_FB_DIV;
|
||||
pll->flags |= RADEON_PLL_USE_REF_DIV;
|
||||
pll->reference_div = args.v3.sOutput.ucRefDiv;
|
||||
}
|
||||
if (args.v3.sOutput.ucPostDiv) {
|
||||
pll->flags |= RADEON_PLL_USE_FRAC_FB_DIV;
|
||||
pll->flags |= RADEON_PLL_USE_POST_DIV;
|
||||
pll->post_div = args.v3.sOutput.ucPostDiv;
|
||||
}
|
||||
|
|
|
@ -3490,7 +3490,7 @@ void r100_cs_track_clear(struct radeon_device *rdev, struct r100_cs_track *track
|
|||
track->num_texture = 16;
|
||||
track->maxy = 4096;
|
||||
track->separate_cube = 0;
|
||||
track->aaresolve = true;
|
||||
track->aaresolve = false;
|
||||
track->aa.robj = NULL;
|
||||
}
|
||||
|
||||
|
@ -3801,8 +3801,6 @@ static int r100_startup(struct radeon_device *rdev)
|
|||
r100_mc_program(rdev);
|
||||
/* Resume clock */
|
||||
r100_clock_startup(rdev);
|
||||
/* Initialize GPU configuration (# pipes, ...) */
|
||||
// r100_gpu_init(rdev);
|
||||
/* Initialize GART (initialize after TTM so we can allocate
|
||||
* memory through TTM but finalize after TTM) */
|
||||
r100_enable_bm(rdev);
|
||||
|
|
|
@ -910,6 +910,7 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
|
|||
track->textures[i].compress_format = R100_TRACK_COMP_NONE;
|
||||
break;
|
||||
case R300_TX_FORMAT_X16:
|
||||
case R300_TX_FORMAT_FL_I16:
|
||||
case R300_TX_FORMAT_Y8X8:
|
||||
case R300_TX_FORMAT_Z5Y6X5:
|
||||
case R300_TX_FORMAT_Z6Y5X5:
|
||||
|
@ -922,6 +923,7 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
|
|||
track->textures[i].compress_format = R100_TRACK_COMP_NONE;
|
||||
break;
|
||||
case R300_TX_FORMAT_Y16X16:
|
||||
case R300_TX_FORMAT_FL_I16A16:
|
||||
case R300_TX_FORMAT_Z11Y11X10:
|
||||
case R300_TX_FORMAT_Z10Y11X11:
|
||||
case R300_TX_FORMAT_W8Z8Y8X8:
|
||||
|
|
|
@ -971,7 +971,7 @@ void radeon_compute_pll_legacy(struct radeon_pll *pll,
|
|||
max_fractional_feed_div = pll->max_frac_feedback_div;
|
||||
}
|
||||
|
||||
for (post_div = min_post_div; post_div <= max_post_div; ++post_div) {
|
||||
for (post_div = max_post_div; post_div >= min_post_div; --post_div) {
|
||||
uint32_t ref_div;
|
||||
|
||||
if ((pll->flags & RADEON_PLL_NO_ODD_POST_DIV) && (post_div & 1))
|
||||
|
|
|
@ -113,11 +113,14 @@ static int radeonfb_create_pinned_object(struct radeon_fbdev *rfbdev,
|
|||
u32 tiling_flags = 0;
|
||||
int ret;
|
||||
int aligned_size, size;
|
||||
int height = mode_cmd->height;
|
||||
|
||||
/* need to align pitch with crtc limits */
|
||||
mode_cmd->pitch = radeon_align_pitch(rdev, mode_cmd->width, mode_cmd->bpp, fb_tiled) * ((mode_cmd->bpp + 1) / 8);
|
||||
|
||||
size = mode_cmd->pitch * mode_cmd->height;
|
||||
if (rdev->family >= CHIP_R600)
|
||||
height = ALIGN(mode_cmd->height, 8);
|
||||
size = mode_cmd->pitch * height;
|
||||
aligned_size = ALIGN(size, PAGE_SIZE);
|
||||
ret = radeon_gem_object_create(rdev, aligned_size, 0,
|
||||
RADEON_GEM_DOMAIN_VRAM,
|
||||
|
|
|
@ -238,13 +238,13 @@ config SENSORS_K8TEMP
|
|||
will be called k8temp.
|
||||
|
||||
config SENSORS_K10TEMP
|
||||
tristate "AMD Phenom/Sempron/Turion/Opteron temperature sensor"
|
||||
tristate "AMD Family 10h/11h/12h/14h temperature sensor"
|
||||
depends on X86 && PCI
|
||||
help
|
||||
If you say yes here you get support for the temperature
|
||||
sensor(s) inside your CPU. Supported are later revisions of
|
||||
the AMD Family 10h and all revisions of the AMD Family 11h
|
||||
microarchitectures.
|
||||
the AMD Family 10h and all revisions of the AMD Family 11h,
|
||||
12h (Llano), and 14h (Brazos) microarchitectures.
|
||||
|
||||
This driver can also be built as a module. If so, the module
|
||||
will be called k10temp.
|
||||
|
@ -455,13 +455,14 @@ config SENSORS_JZ4740
|
|||
called jz4740-hwmon.
|
||||
|
||||
config SENSORS_JC42
|
||||
tristate "JEDEC JC42.4 compliant temperature sensors"
|
||||
tristate "JEDEC JC42.4 compliant memory module temperature sensors"
|
||||
depends on I2C
|
||||
help
|
||||
If you say yes here you get support for Jedec JC42.4 compliant
|
||||
temperature sensors. Support will include, but not be limited to,
|
||||
ADT7408, CAT34TS02,, CAT6095, MAX6604, MCP9805, MCP98242, MCP98243,
|
||||
MCP9843, SE97, SE98, STTS424, TSE2002B3, and TS3000B3.
|
||||
If you say yes here, you get support for JEDEC JC42.4 compliant
|
||||
temperature sensors, which are used on many DDR3 memory modules for
|
||||
mobile devices and servers. Support will include, but not be limited
|
||||
to, ADT7408, CAT34TS02, CAT6095, MAX6604, MCP9805, MCP98242, MCP98243,
|
||||
MCP9843, SE97, SE98, STTS424(E), TSE2002B3, and TS3000B3.
|
||||
|
||||
This driver can also be built as a module. If so, the module
|
||||
will be called jc42.
|
||||
|
@ -574,7 +575,7 @@ config SENSORS_LM85
|
|||
help
|
||||
If you say yes here you get support for National Semiconductor LM85
|
||||
sensor chips and clones: ADM1027, ADT7463, ADT7468, EMC6D100,
|
||||
EMC6D101 and EMC6D102.
|
||||
EMC6D101, EMC6D102, and EMC6D103.
|
||||
|
||||
This driver can also be built as a module. If so, the module
|
||||
will be called lm85.
|
||||
|
|
|
@ -242,6 +242,7 @@ static const struct i2c_device_id ad7414_id[] = {
|
|||
{ "ad7414", 0 },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, ad7414_id);
|
||||
|
||||
static struct i2c_driver ad7414_driver = {
|
||||
.driver = {
|
||||
|
|
|
@ -334,6 +334,7 @@ static const struct i2c_device_id adt7411_id[] = {
|
|||
{ "adt7411", 0 },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, adt7411_id);
|
||||
|
||||
static struct i2c_driver adt7411_driver = {
|
||||
.driver = {
|
||||
|
|
|
@ -53,6 +53,8 @@ static const unsigned short normal_i2c[] = {
|
|||
|
||||
/* Configuration register defines */
|
||||
#define JC42_CFG_CRIT_ONLY (1 << 2)
|
||||
#define JC42_CFG_TCRIT_LOCK (1 << 6)
|
||||
#define JC42_CFG_EVENT_LOCK (1 << 7)
|
||||
#define JC42_CFG_SHUTDOWN (1 << 8)
|
||||
#define JC42_CFG_HYST_SHIFT 9
|
||||
#define JC42_CFG_HYST_MASK 0x03
|
||||
|
@ -332,7 +334,7 @@ static ssize_t set_temp_crit_hyst(struct device *dev,
|
|||
{
|
||||
struct i2c_client *client = to_i2c_client(dev);
|
||||
struct jc42_data *data = i2c_get_clientdata(client);
|
||||
long val;
|
||||
unsigned long val;
|
||||
int diff, hyst;
|
||||
int err;
|
||||
int ret = count;
|
||||
|
@ -380,14 +382,14 @@ static ssize_t show_alarm(struct device *dev,
|
|||
|
||||
static DEVICE_ATTR(temp1_input, S_IRUGO,
|
||||
show_temp_input, NULL);
|
||||
static DEVICE_ATTR(temp1_crit, S_IWUSR | S_IRUGO,
|
||||
static DEVICE_ATTR(temp1_crit, S_IRUGO,
|
||||
show_temp_crit, set_temp_crit);
|
||||
static DEVICE_ATTR(temp1_min, S_IWUSR | S_IRUGO,
|
||||
static DEVICE_ATTR(temp1_min, S_IRUGO,
|
||||
show_temp_min, set_temp_min);
|
||||
static DEVICE_ATTR(temp1_max, S_IWUSR | S_IRUGO,
|
||||
static DEVICE_ATTR(temp1_max, S_IRUGO,
|
||||
show_temp_max, set_temp_max);
|
||||
|
||||
static DEVICE_ATTR(temp1_crit_hyst, S_IWUSR | S_IRUGO,
|
||||
static DEVICE_ATTR(temp1_crit_hyst, S_IRUGO,
|
||||
show_temp_crit_hyst, set_temp_crit_hyst);
|
||||
static DEVICE_ATTR(temp1_max_hyst, S_IRUGO,
|
||||
show_temp_max_hyst, NULL);
|
||||
|
@ -412,8 +414,31 @@ static struct attribute *jc42_attributes[] = {
|
|||
NULL
|
||||
};
|
||||
|
||||
static mode_t jc42_attribute_mode(struct kobject *kobj,
|
||||
struct attribute *attr, int index)
|
||||
{
|
||||
struct device *dev = container_of(kobj, struct device, kobj);
|
||||
struct i2c_client *client = to_i2c_client(dev);
|
||||
struct jc42_data *data = i2c_get_clientdata(client);
|
||||
unsigned int config = data->config;
|
||||
bool readonly;
|
||||
|
||||
if (attr == &dev_attr_temp1_crit.attr)
|
||||
readonly = config & JC42_CFG_TCRIT_LOCK;
|
||||
else if (attr == &dev_attr_temp1_min.attr ||
|
||||
attr == &dev_attr_temp1_max.attr)
|
||||
readonly = config & JC42_CFG_EVENT_LOCK;
|
||||
else if (attr == &dev_attr_temp1_crit_hyst.attr)
|
||||
readonly = config & (JC42_CFG_EVENT_LOCK | JC42_CFG_TCRIT_LOCK);
|
||||
else
|
||||
readonly = true;
|
||||
|
||||
return S_IRUGO | (readonly ? 0 : S_IWUSR);
|
||||
}
|
||||
|
||||
static const struct attribute_group jc42_group = {
|
||||
.attrs = jc42_attributes,
|
||||
.is_visible = jc42_attribute_mode,
|
||||
};
|
||||
|
||||
/* Return 0 if detection is successful, -ENODEV otherwise */
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue