mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 13:44:15 +08:00
Merge branch 'tip/rtmutex' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into core/locking
*git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace tip/rtmutex: rtmutex: Simplify PI algorithm and make highest prio task get lock
This commit is contained in:
commit
51563cd53c
1
.mailmap
1
.mailmap
@ -23,6 +23,7 @@ Andy Adamson <andros@citi.umich.edu>
|
||||
Arnaud Patard <arnaud.patard@rtp-net.org>
|
||||
Arnd Bergmann <arnd@arndb.de>
|
||||
Axel Dyks <xl@xlsigned.net>
|
||||
Axel Lin <axel.lin@gmail.com>
|
||||
Ben Gardner <bgardner@wabtec.com>
|
||||
Ben M Cahill <ben.m.cahill@intel.com>
|
||||
Björn Steinbrink <B.Steinbrink@gmx.de>
|
||||
|
@ -217,8 +217,8 @@ X!Isound/sound_firmware.c
|
||||
<chapter id="uart16x50">
|
||||
<title>16x50 UART Driver</title>
|
||||
!Iinclude/linux/serial_core.h
|
||||
!Edrivers/serial/serial_core.c
|
||||
!Edrivers/serial/8250.c
|
||||
!Edrivers/tty/serial/serial_core.c
|
||||
!Edrivers/tty/serial/8250.c
|
||||
</chapter>
|
||||
|
||||
<chapter id="fbdev">
|
||||
|
@ -43,11 +43,11 @@ parameter is applicable:
|
||||
AVR32 AVR32 architecture is enabled.
|
||||
AX25 Appropriate AX.25 support is enabled.
|
||||
BLACKFIN Blackfin architecture is enabled.
|
||||
DRM Direct Rendering Management support is enabled.
|
||||
DYNAMIC_DEBUG Build in debug messages and enable them at runtime
|
||||
EDD BIOS Enhanced Disk Drive Services (EDD) is enabled
|
||||
EFI EFI Partitioning (GPT) is enabled
|
||||
EIDE EIDE/ATAPI support is enabled.
|
||||
DRM Direct Rendering Management support is enabled.
|
||||
DYNAMIC_DEBUG Build in debug messages and enable them at runtime
|
||||
FB The frame buffer device is enabled.
|
||||
GCOV GCOV profiling is enabled.
|
||||
HW Appropriate hardware is enabled.
|
||||
|
22
MAINTAINERS
22
MAINTAINERS
@ -3674,6 +3674,28 @@ F: include/linux/key-type.h
|
||||
F: include/keys/
|
||||
F: security/keys/
|
||||
|
||||
KEYS-TRUSTED
|
||||
M: David Safford <safford@watson.ibm.com>
|
||||
M: Mimi Zohar <zohar@us.ibm.com>
|
||||
L: linux-security-module@vger.kernel.org
|
||||
L: keyrings@linux-nfs.org
|
||||
S: Supported
|
||||
F: Documentation/keys-trusted-encrypted.txt
|
||||
F: include/keys/trusted-type.h
|
||||
F: security/keys/trusted.c
|
||||
F: security/keys/trusted.h
|
||||
|
||||
KEYS-ENCRYPTED
|
||||
M: Mimi Zohar <zohar@us.ibm.com>
|
||||
M: David Safford <safford@watson.ibm.com>
|
||||
L: linux-security-module@vger.kernel.org
|
||||
L: keyrings@linux-nfs.org
|
||||
S: Supported
|
||||
F: Documentation/keys-trusted-encrypted.txt
|
||||
F: include/keys/encrypted-type.h
|
||||
F: security/keys/encrypted.c
|
||||
F: security/keys/encrypted.h
|
||||
|
||||
KGDB / KDB /debug_core
|
||||
M: Jason Wessel <jason.wessel@windriver.com>
|
||||
W: http://kgdb.wiki.kernel.org/
|
||||
|
@ -50,6 +50,12 @@
|
||||
#define SCPCELLID2 0xFF8
|
||||
#define SCPCELLID3 0xFFC
|
||||
|
||||
#define SCCTRL_TIMEREN0SEL_REFCLK (0 << 15)
|
||||
#define SCCTRL_TIMEREN0SEL_TIMCLK (1 << 15)
|
||||
|
||||
#define SCCTRL_TIMEREN1SEL_REFCLK (0 << 17)
|
||||
#define SCCTRL_TIMEREN1SEL_TIMCLK (1 << 17)
|
||||
|
||||
static inline void sysctl_soft_reset(void __iomem *base)
|
||||
{
|
||||
/* writing any value to SCSYSSTAT reg will reset system */
|
||||
|
@ -188,7 +188,7 @@
|
||||
* translation for translating DMA addresses. Use the driver
|
||||
* DMA support - see dma-mapping.h.
|
||||
*/
|
||||
static inline unsigned long virt_to_phys(void *x)
|
||||
static inline unsigned long virt_to_phys(const volatile void *x)
|
||||
{
|
||||
return __virt_to_phys((unsigned long)(x));
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ static void twd_set_mode(enum clock_event_mode mode,
|
||||
/* timer load already set up */
|
||||
ctrl = TWD_TIMER_CONTROL_ENABLE | TWD_TIMER_CONTROL_IT_ENABLE
|
||||
| TWD_TIMER_CONTROL_PERIODIC;
|
||||
__raw_writel(twd_timer_rate / HZ, twd_base + TWD_TIMER_LOAD);
|
||||
break;
|
||||
case CLOCK_EVT_MODE_ONESHOT:
|
||||
/* period set, and timer enabled in 'next_event' hook */
|
||||
@ -81,7 +82,7 @@ int twd_timer_ack(void)
|
||||
|
||||
static void __cpuinit twd_calibrate_rate(void)
|
||||
{
|
||||
unsigned long load, count;
|
||||
unsigned long count;
|
||||
u64 waitjiffies;
|
||||
|
||||
/*
|
||||
@ -116,10 +117,6 @@ static void __cpuinit twd_calibrate_rate(void)
|
||||
printk("%lu.%02luMHz.\n", twd_timer_rate / 1000000,
|
||||
(twd_timer_rate / 1000000) % 100);
|
||||
}
|
||||
|
||||
load = twd_timer_rate / HZ;
|
||||
|
||||
__raw_writel(load, twd_base + TWD_TIMER_LOAD);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -427,6 +427,13 @@ void __init ep93xx_gpio_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* Set Ports C, D, E, G, and H for GPIO use */
|
||||
ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_KEYS |
|
||||
EP93XX_SYSCON_DEVCFG_GONK |
|
||||
EP93XX_SYSCON_DEVCFG_EONIDE |
|
||||
EP93XX_SYSCON_DEVCFG_GONIDE |
|
||||
EP93XX_SYSCON_DEVCFG_HONIDE);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(ep93xx_gpio_banks); i++)
|
||||
gpiochip_add(&ep93xx_gpio_banks[i].chip);
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ config ARCH_OMAP730
|
||||
depends on ARCH_OMAP1
|
||||
bool "OMAP730 Based System"
|
||||
select CPU_ARM926T
|
||||
select OMAP_MPU_TIMER
|
||||
select ARCH_OMAP_OTG
|
||||
|
||||
config ARCH_OMAP850
|
||||
@ -22,6 +23,7 @@ config ARCH_OMAP15XX
|
||||
default y
|
||||
bool "OMAP15xx Based System"
|
||||
select CPU_ARM925T
|
||||
select OMAP_MPU_TIMER
|
||||
|
||||
config ARCH_OMAP16XX
|
||||
depends on ARCH_OMAP1
|
||||
|
@ -3,12 +3,11 @@
|
||||
#
|
||||
|
||||
# Common support
|
||||
obj-y := io.o id.o sram.o irq.o mux.o flash.o serial.o devices.o dma.o
|
||||
obj-y := io.o id.o sram.o time.o irq.o mux.o flash.o serial.o devices.o dma.o
|
||||
obj-y += clock.o clock_data.o opp_data.o
|
||||
|
||||
obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
|
||||
|
||||
obj-$(CONFIG_OMAP_MPU_TIMER) += time.o
|
||||
obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o
|
||||
|
||||
# Power Management
|
||||
|
@ -44,16 +44,21 @@
|
||||
#include <linux/clocksource.h>
|
||||
#include <linux/clockchips.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
#include <asm/system.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <asm/leds.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/sched_clock.h>
|
||||
|
||||
#include <asm/mach/irq.h>
|
||||
#include <asm/mach/time.h>
|
||||
|
||||
#include <plat/common.h>
|
||||
|
||||
#ifdef CONFIG_OMAP_MPU_TIMER
|
||||
|
||||
#define OMAP_MPU_TIMER_BASE OMAP_MPU_TIMER1_BASE
|
||||
#define OMAP_MPU_TIMER_OFFSET 0x100
|
||||
|
||||
@ -67,7 +72,7 @@ typedef struct {
|
||||
((volatile omap_mpu_timer_regs_t*)OMAP1_IO_ADDRESS(OMAP_MPU_TIMER_BASE + \
|
||||
(n)*OMAP_MPU_TIMER_OFFSET))
|
||||
|
||||
static inline unsigned long omap_mpu_timer_read(int nr)
|
||||
static inline unsigned long notrace omap_mpu_timer_read(int nr)
|
||||
{
|
||||
volatile omap_mpu_timer_regs_t* timer = omap_mpu_timer_base(nr);
|
||||
return timer->read_tim;
|
||||
@ -212,6 +217,32 @@ static struct clocksource clocksource_mpu = {
|
||||
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
|
||||
};
|
||||
|
||||
static DEFINE_CLOCK_DATA(cd);
|
||||
|
||||
static inline unsigned long long notrace _omap_mpu_sched_clock(void)
|
||||
{
|
||||
u32 cyc = mpu_read(&clocksource_mpu);
|
||||
return cyc_to_sched_clock(&cd, cyc, (u32)~0);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_OMAP_32K_TIMER
|
||||
unsigned long long notrace sched_clock(void)
|
||||
{
|
||||
return _omap_mpu_sched_clock();
|
||||
}
|
||||
#else
|
||||
static unsigned long long notrace omap_mpu_sched_clock(void)
|
||||
{
|
||||
return _omap_mpu_sched_clock();
|
||||
}
|
||||
#endif
|
||||
|
||||
static void notrace mpu_update_sched_clock(void)
|
||||
{
|
||||
u32 cyc = mpu_read(&clocksource_mpu);
|
||||
update_sched_clock(&cd, cyc, (u32)~0);
|
||||
}
|
||||
|
||||
static void __init omap_init_clocksource(unsigned long rate)
|
||||
{
|
||||
static char err[] __initdata = KERN_ERR
|
||||
@ -219,17 +250,13 @@ static void __init omap_init_clocksource(unsigned long rate)
|
||||
|
||||
setup_irq(INT_TIMER2, &omap_mpu_timer2_irq);
|
||||
omap_mpu_timer_start(1, ~0, 1);
|
||||
init_sched_clock(&cd, mpu_update_sched_clock, 32, rate);
|
||||
|
||||
if (clocksource_register_hz(&clocksource_mpu, rate))
|
||||
printk(err, clocksource_mpu.name);
|
||||
}
|
||||
|
||||
/*
|
||||
* ---------------------------------------------------------------------------
|
||||
* Timer initialization
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static void __init omap_timer_init(void)
|
||||
static void __init omap_mpu_timer_init(void)
|
||||
{
|
||||
struct clk *ck_ref = clk_get(NULL, "ck_ref");
|
||||
unsigned long rate;
|
||||
@ -246,6 +273,66 @@ static void __init omap_timer_init(void)
|
||||
omap_init_clocksource(rate);
|
||||
}
|
||||
|
||||
#else
|
||||
static inline void omap_mpu_timer_init(void)
|
||||
{
|
||||
pr_err("Bogus timer, should not happen\n");
|
||||
}
|
||||
#endif /* CONFIG_OMAP_MPU_TIMER */
|
||||
|
||||
#if defined(CONFIG_OMAP_MPU_TIMER) && defined(CONFIG_OMAP_32K_TIMER)
|
||||
static unsigned long long (*preferred_sched_clock)(void);
|
||||
|
||||
unsigned long long notrace sched_clock(void)
|
||||
{
|
||||
if (!preferred_sched_clock)
|
||||
return 0;
|
||||
|
||||
return preferred_sched_clock();
|
||||
}
|
||||
|
||||
static inline void preferred_sched_clock_init(bool use_32k_sched_clock)
|
||||
{
|
||||
if (use_32k_sched_clock)
|
||||
preferred_sched_clock = omap_32k_sched_clock;
|
||||
else
|
||||
preferred_sched_clock = omap_mpu_sched_clock;
|
||||
}
|
||||
#else
|
||||
static inline void preferred_sched_clock_init(bool use_32k_sched_clcok)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline int omap_32k_timer_usable(void)
|
||||
{
|
||||
int res = false;
|
||||
|
||||
if (cpu_is_omap730() || cpu_is_omap15xx())
|
||||
return res;
|
||||
|
||||
#ifdef CONFIG_OMAP_32K_TIMER
|
||||
res = omap_32k_timer_init();
|
||||
#endif
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
* ---------------------------------------------------------------------------
|
||||
* Timer initialization
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static void __init omap_timer_init(void)
|
||||
{
|
||||
if (omap_32k_timer_usable()) {
|
||||
preferred_sched_clock_init(1);
|
||||
} else {
|
||||
omap_mpu_timer_init();
|
||||
preferred_sched_clock_init(0);
|
||||
}
|
||||
}
|
||||
|
||||
struct sys_timer omap_timer = {
|
||||
.init = omap_timer_init,
|
||||
};
|
||||
|
@ -52,10 +52,9 @@
|
||||
#include <asm/irq.h>
|
||||
#include <asm/mach/irq.h>
|
||||
#include <asm/mach/time.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/dmtimer.h>
|
||||
|
||||
struct sys_timer omap_timer;
|
||||
|
||||
/*
|
||||
* ---------------------------------------------------------------------------
|
||||
* 32KHz OS timer
|
||||
@ -181,14 +180,14 @@ static __init void omap_init_32k_timer(void)
|
||||
* Timer initialization
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
static void __init omap_timer_init(void)
|
||||
bool __init omap_32k_timer_init(void)
|
||||
{
|
||||
omap_init_clocksource_32k();
|
||||
|
||||
#ifdef CONFIG_OMAP_DM_TIMER
|
||||
omap_dm_timer_init();
|
||||
#endif
|
||||
omap_init_32k_timer();
|
||||
}
|
||||
|
||||
struct sys_timer omap_timer = {
|
||||
.init = omap_timer_init,
|
||||
};
|
||||
return true;
|
||||
}
|
||||
|
@ -124,8 +124,9 @@ static inline void cm_t3517_init_hecc(void) {}
|
||||
#if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE)
|
||||
#define RTC_IO_GPIO (153)
|
||||
#define RTC_WR_GPIO (154)
|
||||
#define RTC_RD_GPIO (160)
|
||||
#define RTC_RD_GPIO (53)
|
||||
#define RTC_CS_GPIO (163)
|
||||
#define RTC_CS_EN_GPIO (160)
|
||||
|
||||
struct v3020_platform_data cm_t3517_v3020_pdata = {
|
||||
.use_gpio = 1,
|
||||
@ -145,6 +146,16 @@ static struct platform_device cm_t3517_rtc_device = {
|
||||
|
||||
static void __init cm_t3517_init_rtc(void)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = gpio_request(RTC_CS_EN_GPIO, "rtc cs en");
|
||||
if (err) {
|
||||
pr_err("CM-T3517: rtc cs en gpio request failed: %d\n", err);
|
||||
return;
|
||||
}
|
||||
|
||||
gpio_direction_output(RTC_CS_EN_GPIO, 1);
|
||||
|
||||
platform_device_register(&cm_t3517_rtc_device);
|
||||
}
|
||||
#else
|
||||
@ -214,12 +225,12 @@ static struct mtd_partition cm_t3517_nand_partitions[] = {
|
||||
},
|
||||
{
|
||||
.name = "linux",
|
||||
.offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */
|
||||
.offset = MTDPART_OFS_APPEND, /* Offset = 0x2A0000 */
|
||||
.size = 32 * NAND_BLOCK_SIZE,
|
||||
},
|
||||
{
|
||||
.name = "rootfs",
|
||||
.offset = MTDPART_OFS_APPEND, /* Offset = 0x680000 */
|
||||
.offset = MTDPART_OFS_APPEND, /* Offset = 0x6A0000 */
|
||||
.size = MTDPART_SIZ_FULL,
|
||||
},
|
||||
};
|
||||
@ -256,11 +267,19 @@ static void __init cm_t3517_init_irq(void)
|
||||
static struct omap_board_mux board_mux[] __initdata = {
|
||||
/* GPIO186 - Green LED */
|
||||
OMAP3_MUX(SYS_CLKOUT2, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
|
||||
/* RTC GPIOs: IO, WR#, RD#, CS# */
|
||||
|
||||
/* RTC GPIOs: */
|
||||
/* IO - GPIO153 */
|
||||
OMAP3_MUX(MCBSP4_DR, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
|
||||
/* WR# - GPIO154 */
|
||||
OMAP3_MUX(MCBSP4_DX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
|
||||
OMAP3_MUX(MCBSP_CLKS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
|
||||
/* RD# - GPIO53 */
|
||||
OMAP3_MUX(GPMC_NCS2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
|
||||
/* CS# - GPIO163 */
|
||||
OMAP3_MUX(UART3_CTS_RCTX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
|
||||
/* CS EN - GPIO160 */
|
||||
OMAP3_MUX(MCBSP_CLKS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
|
||||
|
||||
/* HSUSB1 RESET */
|
||||
OMAP3_MUX(UART2_TX, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
|
||||
/* HSUSB2 RESET */
|
||||
|
@ -275,8 +275,7 @@ static struct twl4030_gpio_platform_data devkit8000_gpio_data = {
|
||||
.irq_base = TWL4030_GPIO_IRQ_BASE,
|
||||
.irq_end = TWL4030_GPIO_IRQ_END,
|
||||
.use_leds = true,
|
||||
.pullups = BIT(1),
|
||||
.pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13)
|
||||
.pulldowns = BIT(1) | BIT(2) | BIT(6) | BIT(8) | BIT(13)
|
||||
| BIT(15) | BIT(16) | BIT(17),
|
||||
.setup = devkit8000_twl_gpio_setup,
|
||||
};
|
||||
|
@ -34,7 +34,6 @@
|
||||
#include "cm2_44xx.h"
|
||||
#include "cm-regbits-44xx.h"
|
||||
#include "prm44xx.h"
|
||||
#include "prm44xx.h"
|
||||
#include "prm-regbits-44xx.h"
|
||||
#include "control.h"
|
||||
#include "scrm44xx.h"
|
||||
|
@ -423,6 +423,12 @@ int clkdm_add_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2)
|
||||
{
|
||||
struct clkdm_dep *cd;
|
||||
|
||||
if (!cpu_is_omap24xx() && !cpu_is_omap34xx()) {
|
||||
pr_err("clockdomain: %s/%s: %s: not yet implemented\n",
|
||||
clkdm1->name, clkdm2->name, __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!clkdm1 || !clkdm2)
|
||||
return -EINVAL;
|
||||
|
||||
@ -458,6 +464,12 @@ int clkdm_del_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2)
|
||||
{
|
||||
struct clkdm_dep *cd;
|
||||
|
||||
if (!cpu_is_omap24xx() && !cpu_is_omap34xx()) {
|
||||
pr_err("clockdomain: %s/%s: %s: not yet implemented\n",
|
||||
clkdm1->name, clkdm2->name, __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!clkdm1 || !clkdm2)
|
||||
return -EINVAL;
|
||||
|
||||
@ -500,6 +512,12 @@ int clkdm_read_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2)
|
||||
if (!clkdm1 || !clkdm2)
|
||||
return -EINVAL;
|
||||
|
||||
if (!cpu_is_omap24xx() && !cpu_is_omap34xx()) {
|
||||
pr_err("clockdomain: %s/%s: %s: not yet implemented\n",
|
||||
clkdm1->name, clkdm2->name, __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
cd = _clkdm_deps_lookup(clkdm2, clkdm1->wkdep_srcs);
|
||||
if (IS_ERR(cd)) {
|
||||
pr_debug("clockdomain: hardware cannot set/clear wake up of "
|
||||
@ -527,6 +545,12 @@ int clkdm_clear_all_wkdeps(struct clockdomain *clkdm)
|
||||
struct clkdm_dep *cd;
|
||||
u32 mask = 0;
|
||||
|
||||
if (!cpu_is_omap24xx() && !cpu_is_omap34xx()) {
|
||||
pr_err("clockdomain: %s: %s: not yet implemented\n",
|
||||
clkdm->name, __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!clkdm)
|
||||
return -EINVAL;
|
||||
|
||||
@ -830,8 +854,7 @@ void omap2_clkdm_allow_idle(struct clockdomain *clkdm)
|
||||
* dependency code and data for OMAP4.
|
||||
*/
|
||||
if (cpu_is_omap44xx()) {
|
||||
WARN_ONCE(1, "clockdomain: OMAP4 wakeup/sleep dependency "
|
||||
"support is not yet implemented\n");
|
||||
pr_err("clockdomain: %s: OMAP4 wakeup/sleep dependency support: not yet implemented\n", clkdm->name);
|
||||
} else {
|
||||
if (atomic_read(&clkdm->usecount) > 0)
|
||||
_clkdm_add_autodeps(clkdm);
|
||||
@ -872,8 +895,7 @@ void omap2_clkdm_deny_idle(struct clockdomain *clkdm)
|
||||
* dependency code and data for OMAP4.
|
||||
*/
|
||||
if (cpu_is_omap44xx()) {
|
||||
WARN_ONCE(1, "clockdomain: OMAP4 wakeup/sleep dependency "
|
||||
"support is not yet implemented\n");
|
||||
pr_err("clockdomain: %s: OMAP4 wakeup/sleep dependency support: not yet implemented\n", clkdm->name);
|
||||
} else {
|
||||
if (atomic_read(&clkdm->usecount) > 0)
|
||||
_clkdm_del_autodeps(clkdm);
|
||||
|
@ -30,8 +30,6 @@
|
||||
#include "cm1_44xx.h"
|
||||
#include "cm2_44xx.h"
|
||||
|
||||
#include "cm1_44xx.h"
|
||||
#include "cm2_44xx.h"
|
||||
#include "cm-regbits-44xx.h"
|
||||
#include "prm44xx.h"
|
||||
#include "prcm44xx.h"
|
||||
|
@ -134,7 +134,7 @@ static void omap2_enter_full_retention(void)
|
||||
|
||||
/* Block console output in case it is on one of the OMAP UARTs */
|
||||
if (!is_suspending())
|
||||
if (try_acquire_console_sem())
|
||||
if (!console_trylock())
|
||||
goto no_sleep;
|
||||
|
||||
omap_uart_prepare_idle(0);
|
||||
@ -151,7 +151,7 @@ static void omap2_enter_full_retention(void)
|
||||
omap_uart_resume_idle(0);
|
||||
|
||||
if (!is_suspending())
|
||||
release_console_sem();
|
||||
console_unlock();
|
||||
|
||||
no_sleep:
|
||||
if (omap2_pm_debug) {
|
||||
|
@ -398,7 +398,7 @@ void omap_sram_idle(void)
|
||||
if (!is_suspending())
|
||||
if (per_next_state < PWRDM_POWER_ON ||
|
||||
core_next_state < PWRDM_POWER_ON)
|
||||
if (try_acquire_console_sem())
|
||||
if (!console_trylock())
|
||||
goto console_still_active;
|
||||
|
||||
/* PER */
|
||||
@ -481,7 +481,7 @@ void omap_sram_idle(void)
|
||||
}
|
||||
|
||||
if (!is_suspending())
|
||||
release_console_sem();
|
||||
console_unlock();
|
||||
|
||||
console_still_active:
|
||||
/* Disable IO-PAD and IO-CHAIN wakeup */
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include <plat/prcm.h>
|
||||
|
||||
#include "powerdomain.h"
|
||||
#include "prm-regbits-34xx.h"
|
||||
#include "prm.h"
|
||||
#include "prm-regbits-24xx.h"
|
||||
#include "prm-regbits-34xx.h"
|
||||
|
@ -812,7 +812,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata)
|
||||
|
||||
oh->dev_attr = uart;
|
||||
|
||||
acquire_console_sem(); /* in case the earlycon is on the UART */
|
||||
console_lock(); /* in case the earlycon is on the UART */
|
||||
|
||||
/*
|
||||
* Because of early UART probing, UART did not get idled
|
||||
@ -838,7 +838,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata)
|
||||
omap_uart_block_sleep(uart);
|
||||
uart->timeout = DEFAULT_TIMEOUT;
|
||||
|
||||
release_console_sem();
|
||||
console_unlock();
|
||||
|
||||
if ((cpu_is_omap34xx() && uart->padconf) ||
|
||||
(uart->wk_en && uart->wk_mask)) {
|
||||
|
@ -42,6 +42,8 @@
|
||||
|
||||
#include "timer-gp.h"
|
||||
|
||||
#include <plat/common.h>
|
||||
|
||||
/* MAX_GPTIMER_ID: number of GPTIMERs on the chip */
|
||||
#define MAX_GPTIMER_ID 12
|
||||
|
||||
@ -176,10 +178,14 @@ static void __init omap2_gp_clockevent_init(void)
|
||||
/*
|
||||
* When 32k-timer is enabled, don't use GPTimer for clocksource
|
||||
* instead, just leave default clocksource which uses the 32k
|
||||
* sync counter. See clocksource setup in see plat-omap/common.c.
|
||||
* sync counter. See clocksource setup in plat-omap/counter_32k.c
|
||||
*/
|
||||
|
||||
static inline void __init omap2_gp_clocksource_init(void) {}
|
||||
static void __init omap2_gp_clocksource_init(void)
|
||||
{
|
||||
omap_init_clocksource_32k();
|
||||
}
|
||||
|
||||
#else
|
||||
/*
|
||||
* clocksource
|
||||
|
@ -2,52 +2,56 @@ menu "RealView platform type"
|
||||
depends on ARCH_REALVIEW
|
||||
|
||||
config MACH_REALVIEW_EB
|
||||
bool "Support RealView/EB platform"
|
||||
bool "Support RealView(R) Emulation Baseboard"
|
||||
select ARM_GIC
|
||||
help
|
||||
Include support for the ARM(R) RealView Emulation Baseboard platform.
|
||||
Include support for the ARM(R) RealView(R) Emulation Baseboard
|
||||
platform.
|
||||
|
||||
config REALVIEW_EB_A9MP
|
||||
bool "Support Multicore Cortex-A9"
|
||||
bool "Support Multicore Cortex-A9 Tile"
|
||||
depends on MACH_REALVIEW_EB
|
||||
select CPU_V7
|
||||
help
|
||||
Enable support for the Cortex-A9MPCore tile on the Realview platform.
|
||||
Enable support for the Cortex-A9MPCore tile fitted to the
|
||||
Realview(R) Emulation Baseboard platform.
|
||||
|
||||
config REALVIEW_EB_ARM11MP
|
||||
bool "Support ARM11MPCore tile"
|
||||
bool "Support ARM11MPCore Tile"
|
||||
depends on MACH_REALVIEW_EB
|
||||
select CPU_V6
|
||||
select ARCH_HAS_BARRIERS if SMP
|
||||
help
|
||||
Enable support for the ARM11MPCore tile on the Realview platform.
|
||||
Enable support for the ARM11MPCore tile fitted to the Realview(R)
|
||||
Emulation Baseboard platform.
|
||||
|
||||
config REALVIEW_EB_ARM11MP_REVB
|
||||
bool "Support ARM11MPCore RevB tile"
|
||||
bool "Support ARM11MPCore RevB Tile"
|
||||
depends on REALVIEW_EB_ARM11MP
|
||||
help
|
||||
Enable support for the ARM11MPCore RevB tile on the Realview
|
||||
platform. Since there are device address differences, a
|
||||
kernel built with this option enabled is not compatible with
|
||||
other revisions of the ARM11MPCore tile.
|
||||
Enable support for the ARM11MPCore Revision B tile on the
|
||||
Realview(R) Emulation Baseboard platform. Since there are device
|
||||
address differences, a kernel built with this option enabled is
|
||||
not compatible with other revisions of the ARM11MPCore tile.
|
||||
|
||||
config MACH_REALVIEW_PB11MP
|
||||
bool "Support RealView/PB11MPCore platform"
|
||||
bool "Support RealView(R) Platform Baseboard for ARM11MPCore"
|
||||
select CPU_V6
|
||||
select ARM_GIC
|
||||
select HAVE_PATA_PLATFORM
|
||||
select ARCH_HAS_BARRIERS if SMP
|
||||
help
|
||||
Include support for the ARM(R) RealView MPCore Platform Baseboard.
|
||||
PB11MPCore is a platform with an on-board ARM11MPCore and has
|
||||
Include support for the ARM(R) RealView(R) Platform Baseboard for
|
||||
the ARM11MPCore. This platform has an on-board ARM11MPCore and has
|
||||
support for PCI-E and Compact Flash.
|
||||
|
||||
config MACH_REALVIEW_PB1176
|
||||
bool "Support RealView/PB1176 platform"
|
||||
bool "Support RealView(R) Platform Baseboard for ARM1176JZF-S"
|
||||
select CPU_V6
|
||||
select ARM_GIC
|
||||
help
|
||||
Include support for the ARM(R) RealView ARM1176 Platform Baseboard.
|
||||
Include support for the ARM(R) RealView(R) Platform Baseboard for
|
||||
ARM1176JZF-S.
|
||||
|
||||
config REALVIEW_PB1176_SECURE_FLASH
|
||||
bool "Allow access to the secure flash memory block"
|
||||
@ -59,23 +63,24 @@ config REALVIEW_PB1176_SECURE_FLASH
|
||||
block (64MB @ 0x3c000000) is required.
|
||||
|
||||
config MACH_REALVIEW_PBA8
|
||||
bool "Support RealView/PB-A8 platform"
|
||||
bool "Support RealView(R) Platform Baseboard for Cortex(tm)-A8 platform"
|
||||
select CPU_V7
|
||||
select ARM_GIC
|
||||
select HAVE_PATA_PLATFORM
|
||||
help
|
||||
Include support for the ARM(R) RealView Cortex-A8 Platform Baseboard.
|
||||
PB-A8 is a platform with an on-board Cortex-A8 and has support for
|
||||
PCI-E and Compact Flash.
|
||||
Include support for the ARM(R) RealView Platform Baseboard for
|
||||
Cortex(tm)-A8. This platform has an on-board Cortex-A8 and has
|
||||
support for PCI-E and Compact Flash.
|
||||
|
||||
config MACH_REALVIEW_PBX
|
||||
bool "Support RealView/PBX platform"
|
||||
bool "Support RealView(R) Platform Baseboard Explore"
|
||||
select ARM_GIC
|
||||
select HAVE_PATA_PLATFORM
|
||||
select ARCH_SPARSEMEM_ENABLE if CPU_V7 && !REALVIEW_HIGH_PHYS_OFFSET
|
||||
select ZONE_DMA if SPARSEMEM
|
||||
help
|
||||
Include support for the ARM(R) RealView PBX platform.
|
||||
Include support for the ARM(R) RealView(R) Platform Baseboard
|
||||
Explore.
|
||||
|
||||
config REALVIEW_HIGH_PHYS_OFFSET
|
||||
bool "High physical base address for the RealView platform"
|
||||
|
@ -41,7 +41,7 @@ volatile int __cpuinitdata pen_release = -1;
|
||||
* observers, irrespective of whether they're taking part in coherency
|
||||
* or not. This is necessary for the hotplug code to work reliably.
|
||||
*/
|
||||
static void write_pen_release(int val)
|
||||
static void __cpuinit write_pen_release(int val)
|
||||
{
|
||||
pen_release = val;
|
||||
smp_wmb();
|
||||
|
@ -60,6 +60,8 @@ endchoice
|
||||
|
||||
config MACH_AG5EVM
|
||||
bool "AG5EVM board"
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
select SH_LCD_MIPI_DSI
|
||||
depends on ARCH_SH73A0
|
||||
|
||||
config MACH_MACKEREL
|
||||
|
@ -34,9 +34,10 @@
|
||||
#include <linux/input/sh_keysc.h>
|
||||
#include <linux/mmc/host.h>
|
||||
#include <linux/mmc/sh_mmcif.h>
|
||||
|
||||
#include <linux/sh_clk.h>
|
||||
#include <video/sh_mobile_lcdc.h>
|
||||
#include <video/sh_mipi_dsi.h>
|
||||
#include <sound/sh_fsi.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/sh73a0.h>
|
||||
#include <mach/common.h>
|
||||
@ -183,11 +184,165 @@ static struct platform_device mmc_device = {
|
||||
.resource = sh_mmcif_resources,
|
||||
};
|
||||
|
||||
/* IrDA */
|
||||
static struct resource irda_resources[] = {
|
||||
[0] = {
|
||||
.start = 0xE6D00000,
|
||||
.end = 0xE6D01FD4 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = gic_spi(95),
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device irda_device = {
|
||||
.name = "sh_irda",
|
||||
.id = 0,
|
||||
.resource = irda_resources,
|
||||
.num_resources = ARRAY_SIZE(irda_resources),
|
||||
};
|
||||
|
||||
static unsigned char lcd_backlight_seq[3][2] = {
|
||||
{ 0x04, 0x07 },
|
||||
{ 0x23, 0x80 },
|
||||
{ 0x03, 0x01 },
|
||||
};
|
||||
|
||||
static void lcd_backlight_on(void)
|
||||
{
|
||||
struct i2c_adapter *a;
|
||||
struct i2c_msg msg;
|
||||
int k;
|
||||
|
||||
a = i2c_get_adapter(1);
|
||||
for (k = 0; a && k < 3; k++) {
|
||||
msg.addr = 0x6d;
|
||||
msg.buf = &lcd_backlight_seq[k][0];
|
||||
msg.len = 2;
|
||||
msg.flags = 0;
|
||||
if (i2c_transfer(a, &msg, 1) != 1)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void lcd_backlight_reset(void)
|
||||
{
|
||||
gpio_set_value(GPIO_PORT235, 0);
|
||||
mdelay(24);
|
||||
gpio_set_value(GPIO_PORT235, 1);
|
||||
}
|
||||
|
||||
static void lcd_on(void *board_data, struct fb_info *info)
|
||||
{
|
||||
lcd_backlight_on();
|
||||
}
|
||||
|
||||
static void lcd_off(void *board_data)
|
||||
{
|
||||
lcd_backlight_reset();
|
||||
}
|
||||
|
||||
/* LCDC0 */
|
||||
static const struct fb_videomode lcdc0_modes[] = {
|
||||
{
|
||||
.name = "R63302(QHD)",
|
||||
.xres = 544,
|
||||
.yres = 961,
|
||||
.left_margin = 72,
|
||||
.right_margin = 600,
|
||||
.hsync_len = 16,
|
||||
.upper_margin = 8,
|
||||
.lower_margin = 8,
|
||||
.vsync_len = 2,
|
||||
.sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT,
|
||||
},
|
||||
};
|
||||
|
||||
static struct sh_mobile_lcdc_info lcdc0_info = {
|
||||
.clock_source = LCDC_CLK_PERIPHERAL,
|
||||
.ch[0] = {
|
||||
.chan = LCDC_CHAN_MAINLCD,
|
||||
.interface_type = RGB24,
|
||||
.clock_divider = 1,
|
||||
.flags = LCDC_FLAGS_DWPOL,
|
||||
.lcd_size_cfg.width = 44,
|
||||
.lcd_size_cfg.height = 79,
|
||||
.bpp = 16,
|
||||
.lcd_cfg = lcdc0_modes,
|
||||
.num_cfg = ARRAY_SIZE(lcdc0_modes),
|
||||
.board_cfg = {
|
||||
.display_on = lcd_on,
|
||||
.display_off = lcd_off,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
static struct resource lcdc0_resources[] = {
|
||||
[0] = {
|
||||
.name = "LCDC0",
|
||||
.start = 0xfe940000, /* P4-only space */
|
||||
.end = 0xfe943fff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = intcs_evt2irq(0x580),
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device lcdc0_device = {
|
||||
.name = "sh_mobile_lcdc_fb",
|
||||
.num_resources = ARRAY_SIZE(lcdc0_resources),
|
||||
.resource = lcdc0_resources,
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = &lcdc0_info,
|
||||
.coherent_dma_mask = ~0,
|
||||
},
|
||||
};
|
||||
|
||||
/* MIPI-DSI */
|
||||
static struct resource mipidsi0_resources[] = {
|
||||
[0] = {
|
||||
.start = 0xfeab0000,
|
||||
.end = 0xfeab3fff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = 0xfeab4000,
|
||||
.end = 0xfeab7fff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
|
||||
static struct sh_mipi_dsi_info mipidsi0_info = {
|
||||
.data_format = MIPI_RGB888,
|
||||
.lcd_chan = &lcdc0_info.ch[0],
|
||||
.vsynw_offset = 20,
|
||||
.clksrc = 1,
|
||||
.flags = SH_MIPI_DSI_HSABM,
|
||||
};
|
||||
|
||||
static struct platform_device mipidsi0_device = {
|
||||
.name = "sh-mipi-dsi",
|
||||
.num_resources = ARRAY_SIZE(mipidsi0_resources),
|
||||
.resource = mipidsi0_resources,
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = &mipidsi0_info,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device *ag5evm_devices[] __initdata = {
|
||||
ð_device,
|
||||
&keysc_device,
|
||||
&fsi_device,
|
||||
&mmc_device,
|
||||
&irda_device,
|
||||
&lcdc0_device,
|
||||
&mipidsi0_device,
|
||||
};
|
||||
|
||||
static struct map_desc ag5evm_io_desc[] __initdata = {
|
||||
@ -224,6 +379,8 @@ void __init ag5evm_init_irq(void)
|
||||
__raw_writew(__raw_readw(PINTCR0A) | (2<<10), PINTCR0A);
|
||||
}
|
||||
|
||||
#define DSI0PHYCR 0xe615006c
|
||||
|
||||
static void __init ag5evm_init(void)
|
||||
{
|
||||
sh73a0_pinmux_init();
|
||||
@ -287,6 +444,25 @@ static void __init ag5evm_init(void)
|
||||
gpio_request(GPIO_FN_FSIAISLD, NULL);
|
||||
gpio_request(GPIO_FN_FSIAOSLD, NULL);
|
||||
|
||||
/* IrDA */
|
||||
gpio_request(GPIO_FN_PORT241_IRDA_OUT, NULL);
|
||||
gpio_request(GPIO_FN_PORT242_IRDA_IN, NULL);
|
||||
gpio_request(GPIO_FN_PORT243_IRDA_FIRSEL, NULL);
|
||||
|
||||
/* LCD panel */
|
||||
gpio_request(GPIO_PORT217, NULL); /* RESET */
|
||||
gpio_direction_output(GPIO_PORT217, 0);
|
||||
mdelay(1);
|
||||
gpio_set_value(GPIO_PORT217, 1);
|
||||
|
||||
/* LCD backlight controller */
|
||||
gpio_request(GPIO_PORT235, NULL); /* RESET */
|
||||
gpio_direction_output(GPIO_PORT235, 0);
|
||||
lcd_backlight_reset();
|
||||
|
||||
/* MIPI-DSI clock setup */
|
||||
__raw_writel(0x2a809010, DSI0PHYCR);
|
||||
|
||||
#ifdef CONFIG_CACHE_L2X0
|
||||
/* Shared attribute override enable, 64K*8way */
|
||||
l2x0_init(__io(0xf0100000), 0x00460000, 0xc2000fff);
|
||||
|
@ -347,7 +347,6 @@ static void __init g3evm_init(void)
|
||||
gpio_request(GPIO_FN_IRDA_OUT, NULL);
|
||||
gpio_request(GPIO_FN_IRDA_IN, NULL);
|
||||
gpio_request(GPIO_FN_IRDA_FIRSEL, NULL);
|
||||
set_irq_type(evt2irq(0x480), IRQ_TYPE_LEVEL_LOW);
|
||||
|
||||
sh7367_add_standard_devices();
|
||||
|
||||
|
@ -169,9 +169,8 @@
|
||||
* SW1 | SW33
|
||||
* | bit1 | bit2 | bit3 | bit4
|
||||
* -------------+------+------+------+-------
|
||||
* MMC0 OFF | OFF | ON | ON | X
|
||||
* MMC1 ON | OFF | ON | X | ON
|
||||
* SDHI1 OFF | ON | X | OFF | ON
|
||||
* MMC0 OFF | OFF | X | ON | X (Use MMCIF)
|
||||
* SDHI1 OFF | ON | X | OFF | X (Use MFD_SH_MOBILE_SDHI)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -234,7 +234,9 @@ static int pllc2_set_rate(struct clk *clk, unsigned long rate)
|
||||
|
||||
value = __raw_readl(PLLC2CR) & ~(0x3f << 24);
|
||||
|
||||
__raw_writel((value & ~0x80000000) | ((idx + 19) << 24), PLLC2CR);
|
||||
__raw_writel(value | ((idx + 19) << 24), PLLC2CR);
|
||||
|
||||
clk->rate = clk->freq_table[idx].frequency;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -118,8 +118,16 @@ static unsigned long pll_recalc(struct clk *clk)
|
||||
{
|
||||
unsigned long mult = 1;
|
||||
|
||||
if (__raw_readl(PLLECR) & (1 << clk->enable_bit))
|
||||
if (__raw_readl(PLLECR) & (1 << clk->enable_bit)) {
|
||||
mult = (((__raw_readl(clk->enable_reg) >> 24) & 0x3f) + 1);
|
||||
/* handle CFG bit for PLL1 and PLL2 */
|
||||
switch (clk->enable_bit) {
|
||||
case 1:
|
||||
case 2:
|
||||
if (__raw_readl(clk->enable_reg) & (1 << 20))
|
||||
mult *= 2;
|
||||
}
|
||||
}
|
||||
|
||||
return clk->parent->rate * mult;
|
||||
}
|
||||
@ -212,7 +220,7 @@ enum { DIV4_I, DIV4_ZG, DIV4_M3, DIV4_B, DIV4_M1, DIV4_M2,
|
||||
static struct clk div4_clks[DIV4_NR] = {
|
||||
[DIV4_I] = DIV4(FRQCRA, 20, 0xfff, CLK_ENABLE_ON_INIT),
|
||||
[DIV4_ZG] = DIV4(FRQCRA, 16, 0xbff, CLK_ENABLE_ON_INIT),
|
||||
[DIV4_M3] = DIV4(FRQCRA, 8, 0xfff, CLK_ENABLE_ON_INIT),
|
||||
[DIV4_M3] = DIV4(FRQCRA, 12, 0xfff, CLK_ENABLE_ON_INIT),
|
||||
[DIV4_B] = DIV4(FRQCRA, 8, 0xfff, CLK_ENABLE_ON_INIT),
|
||||
[DIV4_M1] = DIV4(FRQCRA, 4, 0xfff, 0),
|
||||
[DIV4_M2] = DIV4(FRQCRA, 0, 0xfff, 0),
|
||||
@ -255,10 +263,10 @@ static struct clk div6_clks[DIV6_NR] = {
|
||||
};
|
||||
|
||||
enum { MSTP001,
|
||||
MSTP125, MSTP116,
|
||||
MSTP125, MSTP118, MSTP116, MSTP100,
|
||||
MSTP219,
|
||||
MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200,
|
||||
MSTP331, MSTP329, MSTP323, MSTP312,
|
||||
MSTP331, MSTP329, MSTP325, MSTP323, MSTP312,
|
||||
MSTP411, MSTP410, MSTP403,
|
||||
MSTP_NR };
|
||||
|
||||
@ -268,7 +276,9 @@ enum { MSTP001,
|
||||
static struct clk mstp_clks[MSTP_NR] = {
|
||||
[MSTP001] = MSTP(&div4_clks[DIV4_HP], SMSTPCR0, 1, 0), /* IIC2 */
|
||||
[MSTP125] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR1, 25, 0), /* TMU0 */
|
||||
[MSTP118] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 18, 0), /* DSITX0 */
|
||||
[MSTP116] = MSTP(&div4_clks[DIV4_HP], SMSTPCR1, 16, 0), /* IIC0 */
|
||||
[MSTP100] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 0, 0), /* LCDC0 */
|
||||
[MSTP219] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 19, 0), /* SCIFA7 */
|
||||
[MSTP207] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 7, 0), /* SCIFA5 */
|
||||
[MSTP206] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 6, 0), /* SCIFB */
|
||||
@ -279,6 +289,7 @@ static struct clk mstp_clks[MSTP_NR] = {
|
||||
[MSTP200] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 0, 0), /* SCIFA4 */
|
||||
[MSTP331] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 31, 0), /* SCIFA6 */
|
||||
[MSTP329] = MSTP(&r_clk, SMSTPCR3, 29, 0), /* CMT10 */
|
||||
[MSTP325] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 25, 0), /* IrDA */
|
||||
[MSTP323] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 23, 0), /* IIC1 */
|
||||
[MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMCIF0 */
|
||||
[MSTP411] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 11, 0), /* IIC3 */
|
||||
@ -288,16 +299,25 @@ static struct clk mstp_clks[MSTP_NR] = {
|
||||
|
||||
#define CLKDEV_CON_ID(_id, _clk) { .con_id = _id, .clk = _clk }
|
||||
#define CLKDEV_DEV_ID(_id, _clk) { .dev_id = _id, .clk = _clk }
|
||||
#define CLKDEV_ICK_ID(_cid, _did, _clk) { .con_id = _cid, .dev_id = _did, .clk = _clk }
|
||||
|
||||
static struct clk_lookup lookups[] = {
|
||||
/* main clocks */
|
||||
CLKDEV_CON_ID("r_clk", &r_clk),
|
||||
|
||||
/* DIV6 clocks */
|
||||
CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]),
|
||||
CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]),
|
||||
CLKDEV_ICK_ID("dsi0p_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]),
|
||||
CLKDEV_ICK_ID("dsi1p_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]),
|
||||
|
||||
/* MSTP32 clocks */
|
||||
CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* I2C2 */
|
||||
CLKDEV_DEV_ID("sh_mobile_lcdc_fb.0", &mstp_clks[MSTP100]), /* LCDC0 */
|
||||
CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP125]), /* TMU00 */
|
||||
CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP125]), /* TMU01 */
|
||||
CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* I2C0 */
|
||||
CLKDEV_DEV_ID("sh-mipi-dsi.0", &mstp_clks[MSTP118]), /* DSITX */
|
||||
CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP219]), /* SCIFA7 */
|
||||
CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */
|
||||
CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP206]), /* SCIFB */
|
||||
@ -308,6 +328,7 @@ static struct clk_lookup lookups[] = {
|
||||
CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */
|
||||
CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP331]), /* SCIFA6 */
|
||||
CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */
|
||||
CLKDEV_DEV_ID("sh_irda.0", &mstp_clks[MSTP325]), /* IrDA */
|
||||
CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* I2C1 */
|
||||
CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMCIF0 */
|
||||
CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* I2C3 */
|
||||
|
@ -365,6 +365,7 @@ static struct intc_desc intca_desc __initdata = {
|
||||
|
||||
enum {
|
||||
UNUSED_INTCS = 0,
|
||||
ENABLED_INTCS,
|
||||
|
||||
INTCS,
|
||||
|
||||
@ -413,7 +414,7 @@ enum {
|
||||
CMT4,
|
||||
DSITX1_DSITX1_0,
|
||||
DSITX1_DSITX1_1,
|
||||
/* MFIS2 */
|
||||
MFIS2_INTCS, /* Priority always enabled using ENABLED_INTCS */
|
||||
CPORTS2R,
|
||||
/* CEC */
|
||||
JPU6E,
|
||||
@ -477,7 +478,7 @@ static struct intc_vect intcs_vectors[] = {
|
||||
INTCS_VECT(CMT4, 0x1980),
|
||||
INTCS_VECT(DSITX1_DSITX1_0, 0x19a0),
|
||||
INTCS_VECT(DSITX1_DSITX1_1, 0x19c0),
|
||||
/* MFIS2 */
|
||||
INTCS_VECT(MFIS2_INTCS, 0x1a00),
|
||||
INTCS_VECT(CPORTS2R, 0x1a20),
|
||||
/* CEC */
|
||||
INTCS_VECT(JPU6E, 0x1a80),
|
||||
@ -543,7 +544,7 @@ static struct intc_mask_reg intcs_mask_registers[] = {
|
||||
{ 0, TMU1_TUNI2, TMU1_TUNI1, TMU1_TUNI0,
|
||||
CMT4, DSITX1_DSITX1_0, DSITX1_DSITX1_1, 0 } },
|
||||
{ 0xffd5019c, 0xffd501dc, 8, /* IMR7SA3 / IMCR7SA3 */
|
||||
{ 0, CPORTS2R, 0, 0,
|
||||
{ MFIS2_INTCS, CPORTS2R, 0, 0,
|
||||
JPU6E, 0, 0, 0 } },
|
||||
{ 0xffd20104, 0, 16, /* INTAMASK */
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
@ -571,7 +572,8 @@ static struct intc_prio_reg intcs_prio_registers[] = {
|
||||
{ 0xffd50030, 0, 16, 4, /* IPRMS3 */ { TMU1, 0, 0, 0 } },
|
||||
{ 0xffd50034, 0, 16, 4, /* IPRNS3 */ { CMT4, DSITX1_DSITX1_0,
|
||||
DSITX1_DSITX1_1, 0 } },
|
||||
{ 0xffd50038, 0, 16, 4, /* IPROS3 */ { 0, CPORTS2R, 0, 0 } },
|
||||
{ 0xffd50038, 0, 16, 4, /* IPROS3 */ { ENABLED_INTCS, CPORTS2R,
|
||||
0, 0 } },
|
||||
{ 0xffd5003c, 0, 16, 4, /* IPRPS3 */ { JPU6E, 0, 0, 0 } },
|
||||
};
|
||||
|
||||
@ -590,6 +592,7 @@ static struct resource intcs_resources[] __initdata = {
|
||||
|
||||
static struct intc_desc intcs_desc __initdata = {
|
||||
.name = "sh7372-intcs",
|
||||
.force_enable = ENABLED_INTCS,
|
||||
.resource = intcs_resources,
|
||||
.num_resources = ARRAY_SIZE(intcs_resources),
|
||||
.hw = INTC_HW_DESC(intcs_vectors, intcs_groups, intcs_mask_registers,
|
||||
|
@ -252,10 +252,11 @@ static irqreturn_t sh73a0_intcs_demux(int irq, void *dev_id)
|
||||
|
||||
void __init sh73a0_init_irq(void)
|
||||
{
|
||||
void __iomem *gic_base = __io(0xf0001000);
|
||||
void __iomem *gic_dist_base = __io(0xf0001000);
|
||||
void __iomem *gic_cpu_base = __io(0xf0000100);
|
||||
void __iomem *intevtsa = ioremap_nocache(0xffd20100, PAGE_SIZE);
|
||||
|
||||
gic_init(0, 29, gic_base, gic_base);
|
||||
gic_init(0, 29, gic_dist_base, gic_cpu_base);
|
||||
|
||||
register_intc_controller(&intcs_desc);
|
||||
|
||||
|
61
arch/arm/mach-tegra/include/mach/kbc.h
Normal file
61
arch/arm/mach-tegra/include/mach/kbc.h
Normal file
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Platform definitions for tegra-kbc keyboard input driver
|
||||
*
|
||||
* Copyright (c) 2010-2011, NVIDIA Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef ASMARM_ARCH_TEGRA_KBC_H
|
||||
#define ASMARM_ARCH_TEGRA_KBC_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/input/matrix_keypad.h>
|
||||
|
||||
#ifdef CONFIG_ARCH_TEGRA_2x_SOC
|
||||
#define KBC_MAX_GPIO 24
|
||||
#define KBC_MAX_KPENT 8
|
||||
#else
|
||||
#define KBC_MAX_GPIO 20
|
||||
#define KBC_MAX_KPENT 7
|
||||
#endif
|
||||
|
||||
#define KBC_MAX_ROW 16
|
||||
#define KBC_MAX_COL 8
|
||||
#define KBC_MAX_KEY (KBC_MAX_ROW * KBC_MAX_COL)
|
||||
|
||||
struct tegra_kbc_pin_cfg {
|
||||
bool is_row;
|
||||
unsigned char num;
|
||||
};
|
||||
|
||||
struct tegra_kbc_wake_key {
|
||||
u8 row:4;
|
||||
u8 col:4;
|
||||
};
|
||||
|
||||
struct tegra_kbc_platform_data {
|
||||
unsigned int debounce_cnt;
|
||||
unsigned int repeat_cnt;
|
||||
|
||||
unsigned int wake_cnt; /* 0:wake on any key >1:wake on wake_cfg */
|
||||
const struct tegra_kbc_wake_key *wake_cfg;
|
||||
|
||||
struct tegra_kbc_pin_cfg pin_cfg[KBC_MAX_GPIO];
|
||||
const struct matrix_keymap_data *keymap_data;
|
||||
|
||||
bool wakeup;
|
||||
};
|
||||
#endif
|
@ -2,17 +2,19 @@ menu "Versatile platform type"
|
||||
depends on ARCH_VERSATILE
|
||||
|
||||
config ARCH_VERSATILE_PB
|
||||
bool "Support Versatile/PB platform"
|
||||
bool "Support Versatile Platform Baseboard for ARM926EJ-S"
|
||||
select CPU_ARM926T
|
||||
select MIGHT_HAVE_PCI
|
||||
default y
|
||||
help
|
||||
Include support for the ARM(R) Versatile/PB platform.
|
||||
Include support for the ARM(R) Versatile Platform Baseboard
|
||||
for the ARM926EJ-S.
|
||||
|
||||
config MACH_VERSATILE_AB
|
||||
bool "Support Versatile/AB platform"
|
||||
bool "Support Versatile Application Baseboard for ARM926EJ-S"
|
||||
select CPU_ARM926T
|
||||
help
|
||||
Include support for the ARM(R) Versatile/AP platform.
|
||||
Include support for the ARM(R) Versatile Application Baseboard
|
||||
for the ARM926EJ-S.
|
||||
|
||||
endmenu
|
||||
|
@ -39,7 +39,7 @@ volatile int __cpuinitdata pen_release = -1;
|
||||
* observers, irrespective of whether they're taking part in coherency
|
||||
* or not. This is necessary for the hotplug code to work reliably.
|
||||
*/
|
||||
static void write_pen_release(int val)
|
||||
static void __cpuinit write_pen_release(int val)
|
||||
{
|
||||
pen_release = val;
|
||||
smp_wmb();
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <asm/mach/time.h>
|
||||
#include <asm/hardware/arm_timer.h>
|
||||
#include <asm/hardware/timer-sp.h>
|
||||
#include <asm/hardware/sp810.h>
|
||||
|
||||
#include <mach/motherboard.h>
|
||||
|
||||
@ -50,8 +51,16 @@ void __init v2m_map_io(struct map_desc *tile, size_t num)
|
||||
|
||||
static void __init v2m_timer_init(void)
|
||||
{
|
||||
u32 scctrl;
|
||||
|
||||
versatile_sched_clock_init(MMIO_P2V(V2M_SYS_24MHZ), 24000000);
|
||||
|
||||
/* Select 1MHz TIMCLK as the reference clock for SP804 timers */
|
||||
scctrl = readl(MMIO_P2V(V2M_SYSCTL + SCCTRL));
|
||||
scctrl |= SCCTRL_TIMEREN0SEL_TIMCLK;
|
||||
scctrl |= SCCTRL_TIMEREN1SEL_TIMCLK;
|
||||
writel(scctrl, MMIO_P2V(V2M_SYSCTL + SCCTRL));
|
||||
|
||||
writel(0, MMIO_P2V(V2M_TIMER0) + TIMER_CTRL);
|
||||
writel(0, MMIO_P2V(V2M_TIMER1) + TIMER_CTRL);
|
||||
|
||||
|
@ -144,12 +144,9 @@ config OMAP_IOMMU_DEBUG
|
||||
config OMAP_IOMMU_IVA2
|
||||
bool
|
||||
|
||||
choice
|
||||
prompt "System timer"
|
||||
default OMAP_32K_TIMER if !ARCH_OMAP15XX
|
||||
|
||||
config OMAP_MPU_TIMER
|
||||
bool "Use mpu timer"
|
||||
depends on ARCH_OMAP1
|
||||
help
|
||||
Select this option if you want to use the OMAP mpu timer. This
|
||||
timer provides more intra-tick resolution than the 32KHz timer,
|
||||
@ -158,6 +155,7 @@ config OMAP_MPU_TIMER
|
||||
config OMAP_32K_TIMER
|
||||
bool "Use 32KHz timer"
|
||||
depends on ARCH_OMAP16XX || ARCH_OMAP2PLUS
|
||||
default y if (ARCH_OMAP16XX || ARCH_OMAP2PLUS)
|
||||
help
|
||||
Select this option if you want to enable the OMAP 32KHz timer.
|
||||
This timer saves power compared to the OMAP_MPU_TIMER, and has
|
||||
@ -165,8 +163,6 @@ config OMAP_32K_TIMER
|
||||
intra-tick resolution than OMAP_MPU_TIMER. The 32KHz timer is
|
||||
currently only available for OMAP16XX, 24XX, 34XX and OMAP4.
|
||||
|
||||
endchoice
|
||||
|
||||
config OMAP3_L2_AUX_SECURE_SAVE_RESTORE
|
||||
bool "OMAP3 HS/EMU save and restore for L2 AUX control register"
|
||||
depends on ARCH_OMAP3 && PM
|
||||
|
@ -36,8 +36,6 @@
|
||||
|
||||
#define OMAP16XX_TIMER_32K_SYNCHRONIZED 0xfffbc410
|
||||
|
||||
#if !(defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP15XX))
|
||||
|
||||
#include <linux/clocksource.h>
|
||||
|
||||
/*
|
||||
@ -122,12 +120,24 @@ static DEFINE_CLOCK_DATA(cd);
|
||||
#define SC_MULT 4000000000u
|
||||
#define SC_SHIFT 17
|
||||
|
||||
unsigned long long notrace sched_clock(void)
|
||||
static inline unsigned long long notrace _omap_32k_sched_clock(void)
|
||||
{
|
||||
u32 cyc = clocksource_32k.read(&clocksource_32k);
|
||||
return cyc_to_fixed_sched_clock(&cd, cyc, (u32)~0, SC_MULT, SC_SHIFT);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_OMAP_MPU_TIMER
|
||||
unsigned long long notrace sched_clock(void)
|
||||
{
|
||||
return _omap_32k_sched_clock();
|
||||
}
|
||||
#else
|
||||
unsigned long long notrace omap_32k_sched_clock(void)
|
||||
{
|
||||
return _omap_32k_sched_clock();
|
||||
}
|
||||
#endif
|
||||
|
||||
static void notrace omap_update_sched_clock(void)
|
||||
{
|
||||
u32 cyc = clocksource_32k.read(&clocksource_32k);
|
||||
@ -160,7 +170,7 @@ void read_persistent_clock(struct timespec *ts)
|
||||
*ts = *tsp;
|
||||
}
|
||||
|
||||
static int __init omap_init_clocksource_32k(void)
|
||||
int __init omap_init_clocksource_32k(void)
|
||||
{
|
||||
static char err[] __initdata = KERN_ERR
|
||||
"%s: can't register clocksource!\n";
|
||||
@ -195,7 +205,3 @@ static int __init omap_init_clocksource_32k(void)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
arch_initcall(omap_init_clocksource_32k);
|
||||
|
||||
#endif /* !(defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP15XX)) */
|
||||
|
||||
|
@ -53,7 +53,7 @@ enum { DMA_CHAIN_STARTED, DMA_CHAIN_NOTSTARTED };
|
||||
#endif
|
||||
|
||||
#define OMAP_DMA_ACTIVE 0x01
|
||||
#define OMAP2_DMA_CSR_CLEAR_MASK 0xffe
|
||||
#define OMAP2_DMA_CSR_CLEAR_MASK 0xffffffff
|
||||
|
||||
#define OMAP_FUNC_MUX_ARM_BASE (0xfffe1000 + 0xec)
|
||||
|
||||
@ -1873,7 +1873,7 @@ static int omap2_dma_handle_ch(int ch)
|
||||
printk(KERN_INFO "DMA misaligned error with device %d\n",
|
||||
dma_chan[ch].dev_id);
|
||||
|
||||
p->dma_write(OMAP2_DMA_CSR_CLEAR_MASK, CSR, ch);
|
||||
p->dma_write(status, CSR, ch);
|
||||
p->dma_write(1 << ch, IRQSTATUS_L0, ch);
|
||||
/* read back the register to flush the write */
|
||||
p->dma_read(IRQSTATUS_L0, ch);
|
||||
@ -1893,10 +1893,9 @@ static int omap2_dma_handle_ch(int ch)
|
||||
OMAP_DMA_CHAIN_INCQHEAD(chain_id);
|
||||
|
||||
status = p->dma_read(CSR, ch);
|
||||
p->dma_write(status, CSR, ch);
|
||||
}
|
||||
|
||||
p->dma_write(status, CSR, ch);
|
||||
|
||||
if (likely(dma_chan[ch].callback != NULL))
|
||||
dma_chan[ch].callback(ch, status, dma_chan[ch].data);
|
||||
|
||||
|
@ -35,6 +35,9 @@ struct sys_timer;
|
||||
|
||||
extern void omap_map_common_io(void);
|
||||
extern struct sys_timer omap_timer;
|
||||
extern bool omap_32k_timer_init(void);
|
||||
extern int __init omap_init_clocksource_32k(void);
|
||||
extern unsigned long long notrace omap_32k_sched_clock(void);
|
||||
|
||||
extern void omap_reserve(void);
|
||||
|
||||
|
@ -610,17 +610,17 @@ static void amiga_mem_console_write(struct console *co, const char *s,
|
||||
|
||||
static int __init amiga_savekmsg_setup(char *arg)
|
||||
{
|
||||
static struct resource debug_res = { .name = "Debug" };
|
||||
|
||||
if (!MACH_IS_AMIGA || strcmp(arg, "mem"))
|
||||
goto done;
|
||||
return 0;
|
||||
|
||||
if (!AMIGAHW_PRESENT(CHIP_RAM)) {
|
||||
printk("Warning: no chipram present for debugging\n");
|
||||
goto done;
|
||||
if (amiga_chip_size < SAVEKMSG_MAXMEM) {
|
||||
pr_err("Not enough chipram for debugging\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
savekmsg = amiga_chip_alloc_res(SAVEKMSG_MAXMEM, &debug_res);
|
||||
/* Just steal the block, the chipram allocator isn't functional yet */
|
||||
amiga_chip_size -= SAVEKMSG_MAXMEM;
|
||||
savekmsg = (void *)ZTWO_VADDR(CHIP_PHYSADDR + amiga_chip_size);
|
||||
savekmsg->magic1 = SAVEKMSG_MAGIC1;
|
||||
savekmsg->magic2 = SAVEKMSG_MAGIC2;
|
||||
savekmsg->magicptr = ZTWO_PADDR(savekmsg);
|
||||
@ -628,8 +628,6 @@ static int __init amiga_savekmsg_setup(char *arg)
|
||||
|
||||
amiga_console_driver.write = amiga_mem_console_write;
|
||||
register_console(&amiga_console_driver);
|
||||
|
||||
done:
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -388,9 +388,9 @@ void __init atari_init_IRQ(void)
|
||||
}
|
||||
|
||||
if (ATARIHW_PRESENT(SCC) && !atari_SCC_reset_done) {
|
||||
scc.cha_a_ctrl = 9;
|
||||
atari_scc.cha_a_ctrl = 9;
|
||||
MFPDELAY();
|
||||
scc.cha_a_ctrl = (char) 0xc0; /* hardware reset */
|
||||
atari_scc.cha_a_ctrl = (char) 0xc0; /* hardware reset */
|
||||
}
|
||||
|
||||
if (ATARIHW_PRESENT(SCU)) {
|
||||
|
@ -315,7 +315,7 @@ void __init config_atari(void)
|
||||
ATARIHW_SET(SCC_DMA);
|
||||
printk("SCC_DMA ");
|
||||
}
|
||||
if (scc_test(&scc.cha_a_ctrl)) {
|
||||
if (scc_test(&atari_scc.cha_a_ctrl)) {
|
||||
ATARIHW_SET(SCC);
|
||||
printk("SCC ");
|
||||
}
|
||||
|
@ -53,9 +53,9 @@ static inline void ata_scc_out(char c)
|
||||
{
|
||||
do {
|
||||
MFPDELAY();
|
||||
} while (!(scc.cha_b_ctrl & 0x04)); /* wait for tx buf empty */
|
||||
} while (!(atari_scc.cha_b_ctrl & 0x04)); /* wait for tx buf empty */
|
||||
MFPDELAY();
|
||||
scc.cha_b_data = c;
|
||||
atari_scc.cha_b_data = c;
|
||||
}
|
||||
|
||||
static void atari_scc_console_write(struct console *co, const char *str,
|
||||
@ -140,9 +140,9 @@ int atari_scc_console_wait_key(struct console *co)
|
||||
{
|
||||
do {
|
||||
MFPDELAY();
|
||||
} while (!(scc.cha_b_ctrl & 0x01)); /* wait for rx buf filled */
|
||||
} while (!(atari_scc.cha_b_ctrl & 0x01)); /* wait for rx buf filled */
|
||||
MFPDELAY();
|
||||
return scc.cha_b_data;
|
||||
return atari_scc.cha_b_data;
|
||||
}
|
||||
|
||||
int atari_midi_console_wait_key(struct console *co)
|
||||
@ -185,9 +185,9 @@ static void __init atari_init_mfp_port(int cflag)
|
||||
|
||||
#define SCC_WRITE(reg, val) \
|
||||
do { \
|
||||
scc.cha_b_ctrl = (reg); \
|
||||
atari_scc.cha_b_ctrl = (reg); \
|
||||
MFPDELAY(); \
|
||||
scc.cha_b_ctrl = (val); \
|
||||
atari_scc.cha_b_ctrl = (val); \
|
||||
MFPDELAY(); \
|
||||
} while (0)
|
||||
|
||||
@ -240,7 +240,7 @@ static void __init atari_init_scc_port(int cflag)
|
||||
reg3 = (cflag & CSIZE) == CS8 ? 0xc0 : 0x40;
|
||||
reg5 = (cflag & CSIZE) == CS8 ? 0x60 : 0x20 | 0x82 /* assert DTR/RTS */;
|
||||
|
||||
(void)scc.cha_b_ctrl; /* reset reg pointer */
|
||||
(void)atari_scc.cha_b_ctrl; /* reset reg pointer */
|
||||
SCC_WRITE(9, 0xc0); /* reset */
|
||||
LONG_DELAY(); /* extra delay after WR9 access */
|
||||
SCC_WRITE(4, (cflag & PARENB) ? ((cflag & PARODD) ? 0x01 : 0x03)
|
||||
|
@ -449,7 +449,7 @@ struct SCC
|
||||
u_char char_dummy3;
|
||||
u_char cha_b_data;
|
||||
};
|
||||
# define scc ((*(volatile struct SCC*)SCC_BAS))
|
||||
# define atari_scc ((*(volatile struct SCC*)SCC_BAS))
|
||||
|
||||
/* The ESCC (Z85230) in an Atari ST. The channels are reversed! */
|
||||
# define st_escc ((*(volatile struct SCC*)0xfffffa31))
|
||||
|
@ -81,18 +81,6 @@ static inline char *strncpy(char *dest, const char *src, size_t n)
|
||||
strcpy(__d + strlen(__d), (s)); \
|
||||
})
|
||||
|
||||
#define __HAVE_ARCH_STRCHR
|
||||
static inline char *strchr(const char *s, int c)
|
||||
{
|
||||
char sc, ch = c;
|
||||
|
||||
for (; (sc = *s++) != ch; ) {
|
||||
if (!sc)
|
||||
return NULL;
|
||||
}
|
||||
return (char *)s - 1;
|
||||
}
|
||||
|
||||
#ifndef CONFIG_COLDFIRE
|
||||
#define __HAVE_ARCH_STRCMP
|
||||
static inline int strcmp(const char *cs, const char *ct)
|
||||
|
@ -169,11 +169,11 @@ static int __init pdc_console_tty_driver_init(void)
|
||||
|
||||
struct console *tmp;
|
||||
|
||||
acquire_console_sem();
|
||||
console_lock();
|
||||
for_each_console(tmp)
|
||||
if (tmp == &pdc_cons)
|
||||
break;
|
||||
release_console_sem();
|
||||
console_unlock();
|
||||
|
||||
if (!tmp) {
|
||||
printk(KERN_INFO "PDC console driver not registered anymore, not creating %s\n", pdc_cons.name);
|
||||
|
@ -596,6 +596,7 @@ static void record_and_restart(struct perf_event *event, unsigned long val,
|
||||
if (left <= 0)
|
||||
left = period;
|
||||
record = 1;
|
||||
event->hw.last_period = event->hw.sample_period;
|
||||
}
|
||||
if (left < 0x80000000LL)
|
||||
val = 0x80000000LL - left;
|
||||
|
@ -15,6 +15,7 @@ config SUPERH
|
||||
select HAVE_KERNEL_GZIP
|
||||
select HAVE_KERNEL_BZIP2
|
||||
select HAVE_KERNEL_LZMA
|
||||
select HAVE_KERNEL_XZ
|
||||
select HAVE_KERNEL_LZO
|
||||
select HAVE_SYSCALL_TRACEPOINTS
|
||||
select HAVE_REGS_AND_STACK_ACCESS_API
|
||||
|
@ -200,7 +200,7 @@ endif
|
||||
libs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y)
|
||||
libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y)
|
||||
|
||||
BOOT_TARGETS = uImage uImage.bz2 uImage.gz uImage.lzma uImage.lzo \
|
||||
BOOT_TARGETS = uImage uImage.bz2 uImage.gz uImage.lzma uImage.xz uImage.lzo \
|
||||
uImage.srec uImage.bin zImage vmlinux.bin vmlinux.srec \
|
||||
romImage
|
||||
PHONY += $(BOOT_TARGETS)
|
||||
@ -230,5 +230,6 @@ define archhelp
|
||||
@echo '* uImage.gz - Kernel-only image for U-Boot (gzip)'
|
||||
@echo ' uImage.bz2 - Kernel-only image for U-Boot (bzip2)'
|
||||
@echo ' uImage.lzma - Kernel-only image for U-Boot (lzma)'
|
||||
@echo ' uImage.xz - Kernel-only image for U-Boot (xz)'
|
||||
@echo ' uImage.lzo - Kernel-only image for U-Boot (lzo)'
|
||||
endef
|
||||
|
@ -1294,6 +1294,7 @@ static int __init arch_setup(void)
|
||||
i2c_register_board_info(1, i2c1_devices,
|
||||
ARRAY_SIZE(i2c1_devices));
|
||||
|
||||
#if defined(CONFIG_VIDEO_SH_VOU) || defined(CONFIG_VIDEO_SH_VOU_MODULE)
|
||||
/* VOU */
|
||||
gpio_request(GPIO_FN_DV_D15, NULL);
|
||||
gpio_request(GPIO_FN_DV_D14, NULL);
|
||||
@ -1325,6 +1326,7 @@ static int __init arch_setup(void)
|
||||
|
||||
/* Remove reset */
|
||||
gpio_set_value(GPIO_PTG4, 1);
|
||||
#endif
|
||||
|
||||
return platform_add_devices(ecovec_devices,
|
||||
ARRAY_SIZE(ecovec_devices));
|
||||
|
@ -24,12 +24,13 @@ suffix-y := bin
|
||||
suffix-$(CONFIG_KERNEL_GZIP) := gz
|
||||
suffix-$(CONFIG_KERNEL_BZIP2) := bz2
|
||||
suffix-$(CONFIG_KERNEL_LZMA) := lzma
|
||||
suffix-$(CONFIG_KERNEL_XZ) := xz
|
||||
suffix-$(CONFIG_KERNEL_LZO) := lzo
|
||||
|
||||
targets := zImage vmlinux.srec romImage uImage uImage.srec uImage.gz \
|
||||
uImage.bz2 uImage.lzma uImage.lzo uImage.bin
|
||||
uImage.bz2 uImage.lzma uImage.xz uImage.lzo uImage.bin
|
||||
extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \
|
||||
vmlinux.bin.lzo
|
||||
vmlinux.bin.xz vmlinux.bin.lzo
|
||||
subdir- := compressed romimage
|
||||
|
||||
$(obj)/zImage: $(obj)/compressed/vmlinux FORCE
|
||||
@ -76,6 +77,9 @@ $(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
|
||||
$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
|
||||
$(call if_changed,lzma)
|
||||
|
||||
$(obj)/vmlinux.bin.xz: $(obj)/vmlinux.bin FORCE
|
||||
$(call if_changed,xzkern)
|
||||
|
||||
$(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE
|
||||
$(call if_changed,lzo)
|
||||
|
||||
@ -88,6 +92,9 @@ $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz
|
||||
$(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma
|
||||
$(call if_changed,uimage,lzma)
|
||||
|
||||
$(obj)/uImage.xz: $(obj)/vmlinux.bin.xz
|
||||
$(call if_changed,uimage,xz)
|
||||
|
||||
$(obj)/uImage.lzo: $(obj)/vmlinux.bin.lzo
|
||||
$(call if_changed,uimage,lzo)
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
targets := vmlinux vmlinux.bin vmlinux.bin.gz \
|
||||
vmlinux.bin.bz2 vmlinux.bin.lzma \
|
||||
vmlinux.bin.lzo \
|
||||
vmlinux.bin.xz vmlinux.bin.lzo \
|
||||
head_$(BITS).o misc.o piggy.o
|
||||
|
||||
OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/cache.o
|
||||
@ -50,6 +50,8 @@ $(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE
|
||||
$(call if_changed,bzip2)
|
||||
$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE
|
||||
$(call if_changed,lzma)
|
||||
$(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y) FORCE
|
||||
$(call if_changed,xzkern)
|
||||
$(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE
|
||||
$(call if_changed,lzo)
|
||||
|
||||
|
@ -61,6 +61,10 @@ static unsigned long free_mem_end_ptr;
|
||||
#include "../../../../lib/decompress_unlzma.c"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KERNEL_XZ
|
||||
#include "../../../../lib/decompress_unxz.c"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KERNEL_LZO
|
||||
#include "../../../../lib/decompress_unlzo.c"
|
||||
#endif
|
||||
|
@ -134,6 +134,7 @@ typedef pte_t *pte_addr_t;
|
||||
extern void pgtable_cache_init(void);
|
||||
|
||||
struct vm_area_struct;
|
||||
struct mm_struct;
|
||||
|
||||
extern void __update_cache(struct vm_area_struct *vma,
|
||||
unsigned long address, pte_t pte);
|
||||
|
@ -230,10 +230,10 @@ static struct platform_device *sh7750_devices[] __initdata = {
|
||||
static int __init sh7750_devices_setup(void)
|
||||
{
|
||||
if (mach_is_rts7751r2d()) {
|
||||
platform_register_device(&scif_device);
|
||||
platform_device_register(&scif_device);
|
||||
} else {
|
||||
platform_register_device(&sci_device);
|
||||
platform_register_device(&scif_device);
|
||||
platform_device_register(&sci_device);
|
||||
platform_device_register(&scif_device);
|
||||
}
|
||||
|
||||
return platform_add_devices(sh7750_devices,
|
||||
|
@ -17,6 +17,7 @@
|
||||
static DEFINE_PER_CPU(struct cpu, cpu_devices);
|
||||
|
||||
cpumask_t cpu_core_map[NR_CPUS];
|
||||
EXPORT_SYMBOL(cpu_core_map);
|
||||
|
||||
static cpumask_t cpu_coregroup_map(unsigned int cpu)
|
||||
{
|
||||
|
@ -1,48 +1,8 @@
|
||||
#ifndef _ASM_X86_CACHEFLUSH_H
|
||||
#define _ASM_X86_CACHEFLUSH_H
|
||||
|
||||
/* Keep includes the same across arches. */
|
||||
#include <linux/mm.h>
|
||||
|
||||
/* Caches aren't brain-dead on the intel. */
|
||||
static inline void flush_cache_all(void) { }
|
||||
static inline void flush_cache_mm(struct mm_struct *mm) { }
|
||||
static inline void flush_cache_dup_mm(struct mm_struct *mm) { }
|
||||
static inline void flush_cache_range(struct vm_area_struct *vma,
|
||||
unsigned long start, unsigned long end) { }
|
||||
static inline void flush_cache_page(struct vm_area_struct *vma,
|
||||
unsigned long vmaddr, unsigned long pfn) { }
|
||||
#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0
|
||||
static inline void flush_dcache_page(struct page *page) { }
|
||||
static inline void flush_dcache_mmap_lock(struct address_space *mapping) { }
|
||||
static inline void flush_dcache_mmap_unlock(struct address_space *mapping) { }
|
||||
static inline void flush_icache_range(unsigned long start,
|
||||
unsigned long end) { }
|
||||
static inline void flush_icache_page(struct vm_area_struct *vma,
|
||||
struct page *page) { }
|
||||
static inline void flush_icache_user_range(struct vm_area_struct *vma,
|
||||
struct page *page,
|
||||
unsigned long addr,
|
||||
unsigned long len) { }
|
||||
static inline void flush_cache_vmap(unsigned long start, unsigned long end) { }
|
||||
static inline void flush_cache_vunmap(unsigned long start,
|
||||
unsigned long end) { }
|
||||
|
||||
static inline void copy_to_user_page(struct vm_area_struct *vma,
|
||||
struct page *page, unsigned long vaddr,
|
||||
void *dst, const void *src,
|
||||
unsigned long len)
|
||||
{
|
||||
memcpy(dst, src, len);
|
||||
}
|
||||
|
||||
static inline void copy_from_user_page(struct vm_area_struct *vma,
|
||||
struct page *page, unsigned long vaddr,
|
||||
void *dst, const void *src,
|
||||
unsigned long len)
|
||||
{
|
||||
memcpy(dst, src, len);
|
||||
}
|
||||
#include <asm-generic/cacheflush.h>
|
||||
|
||||
#ifdef CONFIG_X86_PAT
|
||||
/*
|
||||
|
@ -32,5 +32,6 @@ extern void arch_unregister_cpu(int);
|
||||
|
||||
DECLARE_PER_CPU(int, cpu_state);
|
||||
|
||||
int __cpuinit mwait_usable(const struct cpuinfo_x86 *);
|
||||
|
||||
#endif /* _ASM_X86_CPU_H */
|
||||
|
@ -14,7 +14,7 @@
|
||||
do { \
|
||||
asm goto("1:" \
|
||||
JUMP_LABEL_INITIAL_NOP \
|
||||
".pushsection __jump_table, \"a\" \n\t"\
|
||||
".pushsection __jump_table, \"aw\" \n\t"\
|
||||
_ASM_PTR "1b, %l[" #label "], %c0 \n\t" \
|
||||
".popsection \n\t" \
|
||||
: : "i" (key) : : label); \
|
||||
|
@ -558,13 +558,12 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
|
||||
static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr,
|
||||
pmd_t *pmdp, pmd_t pmd)
|
||||
{
|
||||
#if PAGETABLE_LEVELS >= 3
|
||||
if (sizeof(pmdval_t) > sizeof(long))
|
||||
/* 5 arg words */
|
||||
pv_mmu_ops.set_pmd_at(mm, addr, pmdp, pmd);
|
||||
else
|
||||
PVOP_VCALL4(pv_mmu_ops.set_pmd_at, mm, addr, pmdp, pmd.pmd);
|
||||
#endif
|
||||
PVOP_VCALL4(pv_mmu_ops.set_pmd_at, mm, addr, pmdp,
|
||||
native_pmd_val(pmd));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -45,6 +45,7 @@ static const struct _cache_table __cpuinitconst cache_table[] =
|
||||
{ 0x0a, LVL_1_DATA, 8 }, /* 2 way set assoc, 32 byte line size */
|
||||
{ 0x0c, LVL_1_DATA, 16 }, /* 4-way set assoc, 32 byte line size */
|
||||
{ 0x0d, LVL_1_DATA, 16 }, /* 4-way set assoc, 64 byte line size */
|
||||
{ 0x0e, LVL_1_DATA, 24 }, /* 6-way set assoc, 64 byte line size */
|
||||
{ 0x21, LVL_2, 256 }, /* 8-way set assoc, 64 byte line size */
|
||||
{ 0x22, LVL_3, 512 }, /* 4-way set assoc, sectored cache, 64 byte line size */
|
||||
{ 0x23, LVL_3, MB(1) }, /* 8-way set assoc, sectored cache, 64 byte line size */
|
||||
@ -66,6 +67,7 @@ static const struct _cache_table __cpuinitconst cache_table[] =
|
||||
{ 0x45, LVL_2, MB(2) }, /* 4-way set assoc, 32 byte line size */
|
||||
{ 0x46, LVL_3, MB(4) }, /* 4-way set assoc, 64 byte line size */
|
||||
{ 0x47, LVL_3, MB(8) }, /* 8-way set assoc, 64 byte line size */
|
||||
{ 0x48, LVL_2, MB(3) }, /* 12-way set assoc, 64 byte line size */
|
||||
{ 0x49, LVL_3, MB(4) }, /* 16-way set assoc, 64 byte line size */
|
||||
{ 0x4a, LVL_3, MB(6) }, /* 12-way set assoc, 64 byte line size */
|
||||
{ 0x4b, LVL_3, MB(8) }, /* 16-way set assoc, 64 byte line size */
|
||||
@ -87,6 +89,7 @@ static const struct _cache_table __cpuinitconst cache_table[] =
|
||||
{ 0x7c, LVL_2, MB(1) }, /* 8-way set assoc, sectored cache, 64 byte line size */
|
||||
{ 0x7d, LVL_2, MB(2) }, /* 8-way set assoc, 64 byte line size */
|
||||
{ 0x7f, LVL_2, 512 }, /* 2-way set assoc, 64 byte line size */
|
||||
{ 0x80, LVL_2, 512 }, /* 8-way set assoc, 64 byte line size */
|
||||
{ 0x82, LVL_2, 256 }, /* 8-way set assoc, 32 byte line size */
|
||||
{ 0x83, LVL_2, 512 }, /* 8-way set assoc, 32 byte line size */
|
||||
{ 0x84, LVL_2, MB(1) }, /* 8-way set assoc, 32 byte line size */
|
||||
|
@ -59,6 +59,7 @@ struct thermal_state {
|
||||
|
||||
/* Callback to handle core threshold interrupts */
|
||||
int (*platform_thermal_notify)(__u64 msr_val);
|
||||
EXPORT_SYMBOL(platform_thermal_notify);
|
||||
|
||||
static DEFINE_PER_CPU(struct thermal_state, thermal_state);
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <linux/utsname.h>
|
||||
#include <trace/events/power.h>
|
||||
#include <linux/hw_breakpoint.h>
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/system.h>
|
||||
#include <asm/apic.h>
|
||||
#include <asm/syscalls.h>
|
||||
@ -505,7 +506,7 @@ static void poll_idle(void)
|
||||
#define MWAIT_ECX_EXTENDED_INFO 0x01
|
||||
#define MWAIT_EDX_C1 0xf0
|
||||
|
||||
static int __cpuinit mwait_usable(const struct cpuinfo_x86 *c)
|
||||
int __cpuinit mwait_usable(const struct cpuinfo_x86 *c)
|
||||
{
|
||||
u32 eax, ebx, ecx, edx;
|
||||
|
||||
|
@ -1402,8 +1402,9 @@ static inline void mwait_play_dead(void)
|
||||
unsigned int highest_subcstate = 0;
|
||||
int i;
|
||||
void *mwait_ptr;
|
||||
struct cpuinfo_x86 *c = __this_cpu_ptr(&cpu_info);
|
||||
|
||||
if (!cpu_has(__this_cpu_ptr(&cpu_info), X86_FEATURE_MWAIT))
|
||||
if (!(cpu_has(c, X86_FEATURE_MWAIT) && mwait_usable(c)))
|
||||
return;
|
||||
if (!cpu_has(__this_cpu_ptr(&cpu_info), X86_FEATURE_CLFLSH))
|
||||
return;
|
||||
|
@ -68,6 +68,7 @@ static struct _intel_private {
|
||||
phys_addr_t gma_bus_addr;
|
||||
u32 PGETBL_save;
|
||||
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;
|
||||
@ -869,21 +870,12 @@ static int intel_fake_agp_free_gatt_table(struct agp_bridge_data *bridge)
|
||||
|
||||
static int intel_fake_agp_configure(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!intel_enable_gtt())
|
||||
return -EIO;
|
||||
|
||||
intel_private.clear_fake_agp = true;
|
||||
agp_bridge->gart_bus_addr = intel_private.gma_bus_addr;
|
||||
|
||||
for (i = 0; i < intel_private.base.gtt_total_entries; i++) {
|
||||
intel_private.driver->write_entry(intel_private.scratch_page_dma,
|
||||
i, 0);
|
||||
}
|
||||
readl(intel_private.gtt+i-1); /* PCI Posting. */
|
||||
|
||||
global_cache_flush();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -945,6 +937,13 @@ static int intel_fake_agp_insert_entries(struct agp_memory *mem,
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
|
||||
if (intel_private.clear_fake_agp) {
|
||||
int start = intel_private.base.stolen_size / PAGE_SIZE;
|
||||
int end = intel_private.base.gtt_mappable_entries;
|
||||
intel_gtt_clear_range(start, end - start);
|
||||
intel_private.clear_fake_agp = false;
|
||||
}
|
||||
|
||||
if (INTEL_GTT_GEN == 1 && type == AGP_DCACHE_MEMORY)
|
||||
return i810_insert_dcache_entries(mem, pg_start, type);
|
||||
|
||||
|
@ -183,16 +183,16 @@ bfin_jc_circ_write(const unsigned char *buf, int count)
|
||||
}
|
||||
|
||||
#ifndef CONFIG_BFIN_JTAG_COMM_CONSOLE
|
||||
# define acquire_console_sem()
|
||||
# define release_console_sem()
|
||||
# define console_lock()
|
||||
# define console_unlock()
|
||||
#endif
|
||||
static int
|
||||
bfin_jc_write(struct tty_struct *tty, const unsigned char *buf, int count)
|
||||
{
|
||||
int i;
|
||||
acquire_console_sem();
|
||||
console_lock();
|
||||
i = bfin_jc_circ_write(buf, count);
|
||||
release_console_sem();
|
||||
console_unlock();
|
||||
wake_up_process(bfin_jc_kthread);
|
||||
return i;
|
||||
}
|
||||
|
@ -364,12 +364,14 @@ 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 <= 0)
|
||||
/* 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
|
||||
return 2 * 60 * HZ;
|
||||
else
|
||||
return duration;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tpm_calc_ordinal_duration);
|
||||
|
||||
|
@ -493,9 +493,6 @@ static int tpm_tis_init(struct device *dev, resource_size_t start,
|
||||
"1.2 TPM (device-id 0x%X, rev-id %d)\n",
|
||||
vendor >> 16, ioread8(chip->vendor.iobase + TPM_RID(0)));
|
||||
|
||||
if (is_itpm(to_pnp_dev(dev)))
|
||||
itpm = 1;
|
||||
|
||||
if (itpm)
|
||||
dev_info(dev, "Intel iTPM workaround enabled\n");
|
||||
|
||||
@ -637,6 +634,9 @@ static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev,
|
||||
else
|
||||
interrupts = 0;
|
||||
|
||||
if (is_itpm(pnp_dev))
|
||||
itpm = 1;
|
||||
|
||||
return tpm_tis_init(&pnp_dev->dev, start, len, irq);
|
||||
}
|
||||
|
||||
|
@ -202,17 +202,21 @@ static int __init init_acpi_pm_clocksource(void)
|
||||
printk(KERN_INFO "PM-Timer had inconsistent results:"
|
||||
" 0x%#llx, 0x%#llx - aborting.\n",
|
||||
value1, value2);
|
||||
pmtmr_ioport = 0;
|
||||
return -EINVAL;
|
||||
}
|
||||
if (i == ACPI_PM_READ_CHECKS) {
|
||||
printk(KERN_INFO "PM-Timer failed consistency check "
|
||||
" (0x%#llx) - aborting.\n", value1);
|
||||
pmtmr_ioport = 0;
|
||||
return -ENODEV;
|
||||
}
|
||||
}
|
||||
|
||||
if (verify_pmtmr_rate() != 0)
|
||||
if (verify_pmtmr_rate() != 0){
|
||||
pmtmr_ioport = 0;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
return clocksource_register_hz(&clocksource_acpi_pm,
|
||||
PMTMR_TICKS_PER_SEC);
|
||||
|
@ -196,9 +196,9 @@ static void __init setup_clkevents(struct atmel_tc *tc, int clk32k_divisor_idx)
|
||||
clkevt.clkevt.min_delta_ns = clockevent_delta2ns(1, &clkevt.clkevt) + 1;
|
||||
clkevt.clkevt.cpumask = cpumask_of(0);
|
||||
|
||||
setup_irq(irq, &tc_irqaction);
|
||||
|
||||
clockevents_register_device(&clkevt.clkevt);
|
||||
|
||||
setup_irq(irq, &tc_irqaction);
|
||||
}
|
||||
|
||||
#else /* !CONFIG_GENERIC_CLOCKEVENTS */
|
||||
|
@ -187,7 +187,7 @@ MODULE_DEVICE_TABLE(pci, lnw_gpio_ids);
|
||||
|
||||
static void lnw_irq_handler(unsigned irq, struct irq_desc *desc)
|
||||
{
|
||||
struct lnw_gpio *lnw = (struct lnw_gpio *)get_irq_data(irq);
|
||||
struct lnw_gpio *lnw = get_irq_data(irq);
|
||||
u32 base, gpio;
|
||||
void __iomem *gedr;
|
||||
u32 gedr_v;
|
||||
@ -206,7 +206,12 @@ static void lnw_irq_handler(unsigned irq, struct irq_desc *desc)
|
||||
/* clear the edge detect status bit */
|
||||
writel(gedr_v, gedr);
|
||||
}
|
||||
desc->chip->eoi(irq);
|
||||
|
||||
if (desc->chip->irq_eoi)
|
||||
desc->chip->irq_eoi(irq_get_irq_data(irq));
|
||||
else
|
||||
dev_warn(lnw->chip.dev, "missing EOI handler for irq %d\n", irq);
|
||||
|
||||
}
|
||||
|
||||
static int __devinit lnw_gpio_probe(struct pci_dev *pdev,
|
||||
|
@ -100,7 +100,10 @@ config DRM_I830
|
||||
config DRM_I915
|
||||
tristate "i915 driver"
|
||||
depends on AGP_INTEL
|
||||
# we need shmfs for the swappable backing store, and in particular
|
||||
# the shmem_readpage() which depends upon tmpfs
|
||||
select SHMEM
|
||||
select TMPFS
|
||||
select DRM_KMS_HELPER
|
||||
select FB_CFB_FILLRECT
|
||||
select FB_CFB_COPYAREA
|
||||
|
@ -152,7 +152,7 @@ static int i915_initialize(struct drm_device * dev, drm_i915_init_t * init)
|
||||
{
|
||||
drm_i915_private_t *dev_priv = dev->dev_private;
|
||||
struct drm_i915_master_private *master_priv = dev->primary->master->driver_priv;
|
||||
struct intel_ring_buffer *ring = LP_RING(dev_priv);
|
||||
int ret;
|
||||
|
||||
master_priv->sarea = drm_getsarea(dev);
|
||||
if (master_priv->sarea) {
|
||||
@ -163,33 +163,22 @@ static int i915_initialize(struct drm_device * dev, drm_i915_init_t * init)
|
||||
}
|
||||
|
||||
if (init->ring_size != 0) {
|
||||
if (ring->obj != NULL) {
|
||||
if (LP_RING(dev_priv)->obj != NULL) {
|
||||
i915_dma_cleanup(dev);
|
||||
DRM_ERROR("Client tried to initialize ringbuffer in "
|
||||
"GEM mode\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ring->size = init->ring_size;
|
||||
|
||||
ring->map.offset = init->ring_start;
|
||||
ring->map.size = init->ring_size;
|
||||
ring->map.type = 0;
|
||||
ring->map.flags = 0;
|
||||
ring->map.mtrr = 0;
|
||||
|
||||
drm_core_ioremap_wc(&ring->map, dev);
|
||||
|
||||
if (ring->map.handle == NULL) {
|
||||
ret = intel_render_ring_init_dri(dev,
|
||||
init->ring_start,
|
||||
init->ring_size);
|
||||
if (ret) {
|
||||
i915_dma_cleanup(dev);
|
||||
DRM_ERROR("can not ioremap virtual address for"
|
||||
" ring buffer\n");
|
||||
return -ENOMEM;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
ring->virtual_start = ring->map.handle;
|
||||
|
||||
dev_priv->cpp = init->cpp;
|
||||
dev_priv->back_offset = init->back_offset;
|
||||
dev_priv->front_offset = init->front_offset;
|
||||
@ -1226,9 +1215,15 @@ static int i915_load_modeset_init(struct drm_device *dev)
|
||||
if (ret)
|
||||
DRM_INFO("failed to find VBIOS tables\n");
|
||||
|
||||
/* if we have > 1 VGA cards, then disable the radeon VGA resources */
|
||||
/* If we have > 1 VGA cards, then we need to arbitrate access
|
||||
* to the common VGA resources.
|
||||
*
|
||||
* If we are a secondary display controller (!PCI_DISPLAY_CLASS_VGA),
|
||||
* then we do not take part in VGA arbitration and the
|
||||
* vga_client_register() fails with -ENODEV.
|
||||
*/
|
||||
ret = vga_client_register(dev->pdev, dev, NULL, i915_vga_set_decode);
|
||||
if (ret)
|
||||
if (ret && ret != -ENODEV)
|
||||
goto cleanup_ringbuffer;
|
||||
|
||||
intel_register_dsm_handler();
|
||||
|
@ -60,7 +60,7 @@ extern int intel_agp_enabled;
|
||||
|
||||
#define INTEL_VGA_DEVICE(id, info) { \
|
||||
.class = PCI_CLASS_DISPLAY_VGA << 8, \
|
||||
.class_mask = 0xffff00, \
|
||||
.class_mask = 0xff0000, \
|
||||
.vendor = 0x8086, \
|
||||
.device = id, \
|
||||
.subvendor = PCI_ANY_ID, \
|
||||
@ -752,6 +752,9 @@ static int __init i915_init(void)
|
||||
driver.driver_features &= ~DRIVER_MODESET;
|
||||
#endif
|
||||
|
||||
if (!(driver.driver_features & DRIVER_MODESET))
|
||||
driver.get_vblank_timestamp = NULL;
|
||||
|
||||
return drm_init(&driver);
|
||||
}
|
||||
|
||||
|
@ -543,8 +543,11 @@ typedef struct drm_i915_private {
|
||||
/** List of all objects in gtt_space. Used to restore gtt
|
||||
* mappings on resume */
|
||||
struct list_head gtt_list;
|
||||
/** End of mappable part of GTT */
|
||||
|
||||
/** Usable portion of the GTT for GEM */
|
||||
unsigned long gtt_start;
|
||||
unsigned long gtt_mappable_end;
|
||||
unsigned long gtt_end;
|
||||
|
||||
struct io_mapping *gtt_mapping;
|
||||
int gtt_mtrr;
|
||||
|
@ -140,12 +140,16 @@ void i915_gem_do_init(struct drm_device *dev,
|
||||
{
|
||||
drm_i915_private_t *dev_priv = dev->dev_private;
|
||||
|
||||
drm_mm_init(&dev_priv->mm.gtt_space, start,
|
||||
end - start);
|
||||
drm_mm_init(&dev_priv->mm.gtt_space, start, end - start);
|
||||
|
||||
dev_priv->mm.gtt_start = start;
|
||||
dev_priv->mm.gtt_mappable_end = mappable_end;
|
||||
dev_priv->mm.gtt_end = end;
|
||||
dev_priv->mm.gtt_total = end - start;
|
||||
dev_priv->mm.mappable_gtt_total = min(end, mappable_end) - start;
|
||||
dev_priv->mm.gtt_mappable_end = mappable_end;
|
||||
|
||||
/* Take over this portion of the GTT */
|
||||
intel_gtt_clear_range(start / PAGE_SIZE, (end-start) / PAGE_SIZE);
|
||||
}
|
||||
|
||||
int
|
||||
@ -1857,7 +1861,7 @@ i915_gem_retire_requests_ring(struct drm_device *dev,
|
||||
|
||||
seqno = ring->get_seqno(ring);
|
||||
|
||||
for (i = 0; i < I915_NUM_RINGS; i++)
|
||||
for (i = 0; i < ARRAY_SIZE(ring->sync_seqno); i++)
|
||||
if (seqno >= ring->sync_seqno[i])
|
||||
ring->sync_seqno[i] = 0;
|
||||
|
||||
|
@ -1175,7 +1175,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
|
||||
goto err;
|
||||
|
||||
seqno = i915_gem_next_request_seqno(dev, ring);
|
||||
for (i = 0; i < I915_NUM_RINGS-1; i++) {
|
||||
for (i = 0; i < ARRAY_SIZE(ring->sync_seqno); i++) {
|
||||
if (seqno < ring->sync_seqno[i]) {
|
||||
/* The GPU can not handle its semaphore value wrapping,
|
||||
* so every billion or so execbuffers, we need to stall
|
||||
|
@ -34,6 +34,10 @@ void i915_gem_restore_gtt_mappings(struct drm_device *dev)
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
struct drm_i915_gem_object *obj;
|
||||
|
||||
/* First fill our portion of the GTT with scratch pages */
|
||||
intel_gtt_clear_range(dev_priv->mm.gtt_start / PAGE_SIZE,
|
||||
(dev_priv->mm.gtt_end - dev_priv->mm.gtt_start) / PAGE_SIZE);
|
||||
|
||||
list_for_each_entry(obj, &dev_priv->mm.gtt_list, gtt_list) {
|
||||
i915_gem_clflush_object(obj);
|
||||
|
||||
|
@ -274,24 +274,35 @@ int i915_get_crtc_scanoutpos(struct drm_device *dev, int pipe,
|
||||
return ret;
|
||||
}
|
||||
|
||||
int i915_get_vblank_timestamp(struct drm_device *dev, int crtc,
|
||||
int i915_get_vblank_timestamp(struct drm_device *dev, int pipe,
|
||||
int *max_error,
|
||||
struct timeval *vblank_time,
|
||||
unsigned flags)
|
||||
{
|
||||
struct drm_crtc *drmcrtc;
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
struct drm_crtc *crtc;
|
||||
|
||||
if (crtc < 0 || crtc >= dev->num_crtcs) {
|
||||
DRM_ERROR("Invalid crtc %d\n", crtc);
|
||||
if (pipe < 0 || pipe >= dev_priv->num_pipe) {
|
||||
DRM_ERROR("Invalid crtc %d\n", pipe);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Get drm_crtc to timestamp: */
|
||||
drmcrtc = intel_get_crtc_for_pipe(dev, crtc);
|
||||
crtc = intel_get_crtc_for_pipe(dev, pipe);
|
||||
if (crtc == NULL) {
|
||||
DRM_ERROR("Invalid crtc %d\n", pipe);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!crtc->enabled) {
|
||||
DRM_DEBUG_KMS("crtc %d is disabled\n", pipe);
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
/* Helper routine in DRM core does all the work: */
|
||||
return drm_calc_vbltimestamp_from_scanoutpos(dev, crtc, max_error,
|
||||
vblank_time, flags, drmcrtc);
|
||||
return drm_calc_vbltimestamp_from_scanoutpos(dev, pipe, max_error,
|
||||
vblank_time, flags,
|
||||
crtc);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -348,8 +359,12 @@ static void notify_ring(struct drm_device *dev,
|
||||
struct intel_ring_buffer *ring)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
u32 seqno = ring->get_seqno(ring);
|
||||
u32 seqno;
|
||||
|
||||
if (ring->obj == NULL)
|
||||
return;
|
||||
|
||||
seqno = ring->get_seqno(ring);
|
||||
trace_i915_gem_request_complete(dev, seqno);
|
||||
|
||||
ring->irq_seqno = seqno;
|
||||
@ -831,6 +846,8 @@ static void i915_capture_error_state(struct drm_device *dev)
|
||||
i++;
|
||||
error->pinned_bo_count = i - error->active_bo_count;
|
||||
|
||||
error->active_bo = NULL;
|
||||
error->pinned_bo = NULL;
|
||||
if (i) {
|
||||
error->active_bo = kmalloc(sizeof(*error->active_bo)*i,
|
||||
GFP_ATOMIC);
|
||||
@ -1278,12 +1295,12 @@ static int i915_wait_irq(struct drm_device * dev, int irq_nr)
|
||||
if (master_priv->sarea_priv)
|
||||
master_priv->sarea_priv->perf_boxes |= I915_BOX_WAIT;
|
||||
|
||||
ret = -ENODEV;
|
||||
if (ring->irq_get(ring)) {
|
||||
DRM_WAIT_ON(ret, ring->irq_queue, 3 * DRM_HZ,
|
||||
READ_BREADCRUMB(dev_priv) >= irq_nr);
|
||||
ring->irq_put(ring);
|
||||
}
|
||||
} else if (wait_for(READ_BREADCRUMB(dev_priv) >= irq_nr, 3000))
|
||||
ret = -EBUSY;
|
||||
|
||||
if (ret == -EBUSY) {
|
||||
DRM_ERROR("EBUSY -- rec: %d emitted: %d\n",
|
||||
|
@ -513,6 +513,10 @@
|
||||
#define GEN6_BLITTER_SYNC_STATUS (1 << 24)
|
||||
#define GEN6_BLITTER_USER_INTERRUPT (1 << 22)
|
||||
|
||||
#define GEN6_BLITTER_ECOSKPD 0x221d0
|
||||
#define GEN6_BLITTER_LOCK_SHIFT 16
|
||||
#define GEN6_BLITTER_FBC_NOTIFY (1<<3)
|
||||
|
||||
#define GEN6_BSD_SLEEP_PSMI_CONTROL 0x12050
|
||||
#define GEN6_BSD_SLEEP_PSMI_CONTROL_RC_ILDL_MESSAGE_MODIFY_MASK (1 << 16)
|
||||
#define GEN6_BSD_SLEEP_PSMI_CONTROL_RC_ILDL_MESSAGE_DISABLE (1 << 0)
|
||||
@ -2626,6 +2630,8 @@
|
||||
#define DISPLAY_PORT_PLL_BIOS_2 0x46014
|
||||
|
||||
#define PCH_DSPCLK_GATE_D 0x42020
|
||||
# define DPFCUNIT_CLOCK_GATE_DISABLE (1 << 9)
|
||||
# define DPFCRUNIT_CLOCK_GATE_DISABLE (1 << 8)
|
||||
# define DPFDUNIT_CLOCK_GATE_DISABLE (1 << 7)
|
||||
# define DPARBUNIT_CLOCK_GATE_DISABLE (1 << 5)
|
||||
|
||||
|
@ -1213,6 +1213,26 @@ static bool g4x_fbc_enabled(struct drm_device *dev)
|
||||
return I915_READ(DPFC_CONTROL) & DPFC_CTL_EN;
|
||||
}
|
||||
|
||||
static void sandybridge_blit_fbc_update(struct drm_device *dev)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
u32 blt_ecoskpd;
|
||||
|
||||
/* Make sure blitter notifies FBC of writes */
|
||||
__gen6_force_wake_get(dev_priv);
|
||||
blt_ecoskpd = I915_READ(GEN6_BLITTER_ECOSKPD);
|
||||
blt_ecoskpd |= GEN6_BLITTER_FBC_NOTIFY <<
|
||||
GEN6_BLITTER_LOCK_SHIFT;
|
||||
I915_WRITE(GEN6_BLITTER_ECOSKPD, blt_ecoskpd);
|
||||
blt_ecoskpd |= GEN6_BLITTER_FBC_NOTIFY;
|
||||
I915_WRITE(GEN6_BLITTER_ECOSKPD, blt_ecoskpd);
|
||||
blt_ecoskpd &= ~(GEN6_BLITTER_FBC_NOTIFY <<
|
||||
GEN6_BLITTER_LOCK_SHIFT);
|
||||
I915_WRITE(GEN6_BLITTER_ECOSKPD, blt_ecoskpd);
|
||||
POSTING_READ(GEN6_BLITTER_ECOSKPD);
|
||||
__gen6_force_wake_put(dev_priv);
|
||||
}
|
||||
|
||||
static void ironlake_enable_fbc(struct drm_crtc *crtc, unsigned long interval)
|
||||
{
|
||||
struct drm_device *dev = crtc->dev;
|
||||
@ -1266,6 +1286,7 @@ static void ironlake_enable_fbc(struct drm_crtc *crtc, unsigned long interval)
|
||||
I915_WRITE(SNB_DPFC_CTL_SA,
|
||||
SNB_CPU_FENCE_ENABLE | dev_priv->cfb_fence);
|
||||
I915_WRITE(DPFC_CPU_FENCE_OFFSET, crtc->y);
|
||||
sandybridge_blit_fbc_update(dev);
|
||||
}
|
||||
|
||||
DRM_DEBUG_KMS("enabled fbc on plane %d\n", intel_crtc->plane);
|
||||
@ -6286,7 +6307,9 @@ void intel_enable_clock_gating(struct drm_device *dev)
|
||||
|
||||
if (IS_GEN5(dev)) {
|
||||
/* Required for FBC */
|
||||
dspclk_gate |= DPFDUNIT_CLOCK_GATE_DISABLE;
|
||||
dspclk_gate |= DPFCUNIT_CLOCK_GATE_DISABLE |
|
||||
DPFCRUNIT_CLOCK_GATE_DISABLE |
|
||||
DPFDUNIT_CLOCK_GATE_DISABLE;
|
||||
/* Required for CxSR */
|
||||
dspclk_gate |= DPARBUNIT_CLOCK_GATE_DISABLE;
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/acpi_io.h>
|
||||
#include <acpi/video.h>
|
||||
|
||||
#include "drmP.h"
|
||||
@ -476,7 +477,7 @@ int intel_opregion_setup(struct drm_device *dev)
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
base = ioremap(asls, OPREGION_SIZE);
|
||||
base = acpi_os_ioremap(asls, OPREGION_SIZE);
|
||||
if (!base)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -34,6 +34,14 @@
|
||||
#include "i915_trace.h"
|
||||
#include "intel_drv.h"
|
||||
|
||||
static inline int ring_space(struct intel_ring_buffer *ring)
|
||||
{
|
||||
int space = (ring->head & HEAD_ADDR) - (ring->tail + 8);
|
||||
if (space < 0)
|
||||
space += ring->size;
|
||||
return space;
|
||||
}
|
||||
|
||||
static u32 i915_gem_get_seqno(struct drm_device *dev)
|
||||
{
|
||||
drm_i915_private_t *dev_priv = dev->dev_private;
|
||||
@ -204,11 +212,9 @@ static int init_ring_common(struct intel_ring_buffer *ring)
|
||||
if (!drm_core_check_feature(ring->dev, DRIVER_MODESET))
|
||||
i915_kernel_lost_context(ring->dev);
|
||||
else {
|
||||
ring->head = I915_READ_HEAD(ring) & HEAD_ADDR;
|
||||
ring->head = I915_READ_HEAD(ring);
|
||||
ring->tail = I915_READ_TAIL(ring) & TAIL_ADDR;
|
||||
ring->space = ring->head - (ring->tail + 8);
|
||||
if (ring->space < 0)
|
||||
ring->space += ring->size;
|
||||
ring->space = ring_space(ring);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -921,32 +927,34 @@ static int intel_wrap_ring_buffer(struct intel_ring_buffer *ring)
|
||||
}
|
||||
|
||||
ring->tail = 0;
|
||||
ring->space = ring->head - 8;
|
||||
ring->space = ring_space(ring);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int intel_wait_ring_buffer(struct intel_ring_buffer *ring, int n)
|
||||
{
|
||||
int reread = 0;
|
||||
struct drm_device *dev = ring->dev;
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
unsigned long end;
|
||||
u32 head;
|
||||
|
||||
/* If the reported head position has wrapped or hasn't advanced,
|
||||
* fallback to the slow and accurate path.
|
||||
*/
|
||||
head = intel_read_status_page(ring, 4);
|
||||
if (head > ring->head) {
|
||||
ring->head = head;
|
||||
ring->space = ring_space(ring);
|
||||
if (ring->space >= n)
|
||||
return 0;
|
||||
}
|
||||
|
||||
trace_i915_ring_wait_begin (dev);
|
||||
end = jiffies + 3 * HZ;
|
||||
do {
|
||||
/* If the reported head position has wrapped or hasn't advanced,
|
||||
* fallback to the slow and accurate path.
|
||||
*/
|
||||
head = intel_read_status_page(ring, 4);
|
||||
if (reread)
|
||||
head = I915_READ_HEAD(ring);
|
||||
ring->head = head & HEAD_ADDR;
|
||||
ring->space = ring->head - (ring->tail + 8);
|
||||
if (ring->space < 0)
|
||||
ring->space += ring->size;
|
||||
ring->head = I915_READ_HEAD(ring);
|
||||
ring->space = ring_space(ring);
|
||||
if (ring->space >= n) {
|
||||
trace_i915_ring_wait_end(dev);
|
||||
return 0;
|
||||
@ -961,7 +969,6 @@ int intel_wait_ring_buffer(struct intel_ring_buffer *ring, int n)
|
||||
msleep(1);
|
||||
if (atomic_read(&dev_priv->mm.wedged))
|
||||
return -EAGAIN;
|
||||
reread = 1;
|
||||
} while (!time_after(jiffies, end));
|
||||
trace_i915_ring_wait_end (dev);
|
||||
return -EBUSY;
|
||||
@ -1292,6 +1299,48 @@ int intel_init_render_ring_buffer(struct drm_device *dev)
|
||||
return intel_init_ring_buffer(dev, ring);
|
||||
}
|
||||
|
||||
int intel_render_ring_init_dri(struct drm_device *dev, u64 start, u32 size)
|
||||
{
|
||||
drm_i915_private_t *dev_priv = dev->dev_private;
|
||||
struct intel_ring_buffer *ring = &dev_priv->ring[RCS];
|
||||
|
||||
*ring = render_ring;
|
||||
if (INTEL_INFO(dev)->gen >= 6) {
|
||||
ring->add_request = gen6_add_request;
|
||||
ring->irq_get = gen6_render_ring_get_irq;
|
||||
ring->irq_put = gen6_render_ring_put_irq;
|
||||
} else if (IS_GEN5(dev)) {
|
||||
ring->add_request = pc_render_add_request;
|
||||
ring->get_seqno = pc_render_get_seqno;
|
||||
}
|
||||
|
||||
ring->dev = dev;
|
||||
INIT_LIST_HEAD(&ring->active_list);
|
||||
INIT_LIST_HEAD(&ring->request_list);
|
||||
INIT_LIST_HEAD(&ring->gpu_write_list);
|
||||
|
||||
ring->size = size;
|
||||
ring->effective_size = ring->size;
|
||||
if (IS_I830(ring->dev))
|
||||
ring->effective_size -= 128;
|
||||
|
||||
ring->map.offset = start;
|
||||
ring->map.size = size;
|
||||
ring->map.type = 0;
|
||||
ring->map.flags = 0;
|
||||
ring->map.mtrr = 0;
|
||||
|
||||
drm_core_ioremap_wc(&ring->map, dev);
|
||||
if (ring->map.handle == NULL) {
|
||||
DRM_ERROR("can not ioremap virtual address for"
|
||||
" ring buffer\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
ring->virtual_start = (void __force __iomem *)ring->map.handle;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int intel_init_bsd_ring_buffer(struct drm_device *dev)
|
||||
{
|
||||
drm_i915_private_t *dev_priv = dev->dev_private;
|
||||
|
@ -166,4 +166,7 @@ int intel_init_blt_ring_buffer(struct drm_device *dev);
|
||||
u32 intel_ring_get_active_head(struct intel_ring_buffer *ring);
|
||||
void intel_ring_setup_status_page(struct intel_ring_buffer *ring);
|
||||
|
||||
/* DRI warts */
|
||||
int intel_render_ring_init_dri(struct drm_device *dev, u64 start, u32 size);
|
||||
|
||||
#endif /* _INTEL_RINGBUFFER_H_ */
|
||||
|
@ -234,9 +234,9 @@ nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state)
|
||||
pci_set_power_state(pdev, PCI_D3hot);
|
||||
}
|
||||
|
||||
acquire_console_sem();
|
||||
console_lock();
|
||||
nouveau_fbcon_set_suspend(dev, 1);
|
||||
release_console_sem();
|
||||
console_unlock();
|
||||
nouveau_fbcon_restore_accel(dev);
|
||||
return 0;
|
||||
|
||||
@ -359,9 +359,9 @@ nouveau_pci_resume(struct pci_dev *pdev)
|
||||
nv_crtc->lut.depth = 0;
|
||||
}
|
||||
|
||||
acquire_console_sem();
|
||||
console_lock();
|
||||
nouveau_fbcon_set_suspend(dev, 0);
|
||||
release_console_sem();
|
||||
console_unlock();
|
||||
|
||||
nouveau_fbcon_zfill_all(dev);
|
||||
|
||||
|
@ -606,14 +606,9 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,
|
||||
args.v1.usPixelClock = cpu_to_le16(mode->clock / 10);
|
||||
args.v1.ucTransmitterID = radeon_encoder->encoder_id;
|
||||
args.v1.ucEncodeMode = encoder_mode;
|
||||
if (encoder_mode == ATOM_ENCODER_MODE_DP) {
|
||||
if (ss_enabled)
|
||||
args.v1.ucConfig |=
|
||||
ADJUST_DISPLAY_CONFIG_SS_ENABLE;
|
||||
} else if (encoder_mode == ATOM_ENCODER_MODE_LVDS) {
|
||||
if (ss_enabled)
|
||||
args.v1.ucConfig |=
|
||||
ADJUST_DISPLAY_CONFIG_SS_ENABLE;
|
||||
}
|
||||
|
||||
atom_execute_table(rdev->mode_info.atom_context,
|
||||
index, (uint32_t *)&args);
|
||||
@ -624,12 +619,12 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,
|
||||
args.v3.sInput.ucTransmitterID = radeon_encoder->encoder_id;
|
||||
args.v3.sInput.ucEncodeMode = encoder_mode;
|
||||
args.v3.sInput.ucDispPllConfig = 0;
|
||||
if (ss_enabled)
|
||||
args.v3.sInput.ucDispPllConfig |=
|
||||
DISPPLL_CONFIG_SS_ENABLE;
|
||||
if (radeon_encoder->devices & (ATOM_DEVICE_DFP_SUPPORT)) {
|
||||
struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
|
||||
if (encoder_mode == ATOM_ENCODER_MODE_DP) {
|
||||
if (ss_enabled)
|
||||
args.v3.sInput.ucDispPllConfig |=
|
||||
DISPPLL_CONFIG_SS_ENABLE;
|
||||
args.v3.sInput.ucDispPllConfig |=
|
||||
DISPPLL_CONFIG_COHERENT_MODE;
|
||||
/* 16200 or 27000 */
|
||||
@ -649,18 +644,11 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,
|
||||
}
|
||||
} else if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) {
|
||||
if (encoder_mode == ATOM_ENCODER_MODE_DP) {
|
||||
if (ss_enabled)
|
||||
args.v3.sInput.ucDispPllConfig |=
|
||||
DISPPLL_CONFIG_SS_ENABLE;
|
||||
args.v3.sInput.ucDispPllConfig |=
|
||||
DISPPLL_CONFIG_COHERENT_MODE;
|
||||
/* 16200 or 27000 */
|
||||
args.v3.sInput.usPixelClock = cpu_to_le16(dp_clock / 10);
|
||||
} else if (encoder_mode == ATOM_ENCODER_MODE_LVDS) {
|
||||
if (ss_enabled)
|
||||
args.v3.sInput.ucDispPllConfig |=
|
||||
DISPPLL_CONFIG_SS_ENABLE;
|
||||
} else {
|
||||
} else if (encoder_mode != ATOM_ENCODER_MODE_LVDS) {
|
||||
if (mode->clock > 165000)
|
||||
args.v3.sInput.ucDispPllConfig |=
|
||||
DISPPLL_CONFIG_DUAL_LINK;
|
||||
|
@ -2201,6 +2201,9 @@ static int evergreen_gpu_soft_reset(struct radeon_device *rdev)
|
||||
struct evergreen_mc_save save;
|
||||
u32 grbm_reset = 0;
|
||||
|
||||
if (!(RREG32(GRBM_STATUS) & GUI_ACTIVE))
|
||||
return 0;
|
||||
|
||||
dev_info(rdev->dev, "GPU softreset \n");
|
||||
dev_info(rdev->dev, " GRBM_STATUS=0x%08X\n",
|
||||
RREG32(GRBM_STATUS));
|
||||
|
@ -3522,7 +3522,7 @@ int r100_ring_test(struct radeon_device *rdev)
|
||||
if (i < rdev->usec_timeout) {
|
||||
DRM_INFO("ring test succeeded in %d usecs\n", i);
|
||||
} else {
|
||||
DRM_ERROR("radeon: ring test failed (sracth(0x%04X)=0x%08X)\n",
|
||||
DRM_ERROR("radeon: ring test failed (scratch(0x%04X)=0x%08X)\n",
|
||||
scratch, tmp);
|
||||
r = -EINVAL;
|
||||
}
|
||||
|
@ -1287,6 +1287,9 @@ int r600_gpu_soft_reset(struct radeon_device *rdev)
|
||||
S_008014_CB2_BUSY(1) | S_008014_CB3_BUSY(1);
|
||||
u32 tmp;
|
||||
|
||||
if (!(RREG32(GRBM_STATUS) & GUI_ACTIVE))
|
||||
return 0;
|
||||
|
||||
dev_info(rdev->dev, "GPU softreset \n");
|
||||
dev_info(rdev->dev, " R_008010_GRBM_STATUS=0x%08X\n",
|
||||
RREG32(R_008010_GRBM_STATUS));
|
||||
|
@ -387,15 +387,11 @@ static bool radeon_atom_apply_quirks(struct drm_device *dev,
|
||||
*line_mux = 0x90;
|
||||
}
|
||||
|
||||
/* mac rv630 */
|
||||
if ((dev->pdev->device == 0x9588) &&
|
||||
(dev->pdev->subsystem_vendor == 0x106b) &&
|
||||
(dev->pdev->subsystem_device == 0x00a6)) {
|
||||
if ((supported_device == ATOM_DEVICE_TV1_SUPPORT) &&
|
||||
(*connector_type == DRM_MODE_CONNECTOR_DVII)) {
|
||||
*connector_type = DRM_MODE_CONNECTOR_9PinDIN;
|
||||
*line_mux = CONNECTOR_7PIN_DIN_ENUM_ID1;
|
||||
}
|
||||
/* mac rv630, rv730, others */
|
||||
if ((supported_device == ATOM_DEVICE_TV1_SUPPORT) &&
|
||||
(*connector_type == DRM_MODE_CONNECTOR_DVII)) {
|
||||
*connector_type = DRM_MODE_CONNECTOR_9PinDIN;
|
||||
*line_mux = CONNECTOR_7PIN_DIN_ENUM_ID1;
|
||||
}
|
||||
|
||||
/* ASUS HD 3600 XT board lists the DVI port as HDMI */
|
||||
|
@ -891,9 +891,9 @@ int radeon_suspend_kms(struct drm_device *dev, pm_message_t state)
|
||||
pci_disable_device(dev->pdev);
|
||||
pci_set_power_state(dev->pdev, PCI_D3hot);
|
||||
}
|
||||
acquire_console_sem();
|
||||
console_lock();
|
||||
radeon_fbdev_set_suspend(rdev, 1);
|
||||
release_console_sem();
|
||||
console_unlock();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -905,11 +905,11 @@ int radeon_resume_kms(struct drm_device *dev)
|
||||
if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
|
||||
return 0;
|
||||
|
||||
acquire_console_sem();
|
||||
console_lock();
|
||||
pci_set_power_state(dev->pdev, PCI_D0);
|
||||
pci_restore_state(dev->pdev);
|
||||
if (pci_enable_device(dev->pdev)) {
|
||||
release_console_sem();
|
||||
console_unlock();
|
||||
return -1;
|
||||
}
|
||||
pci_set_master(dev->pdev);
|
||||
@ -920,7 +920,7 @@ int radeon_resume_kms(struct drm_device *dev)
|
||||
radeon_restore_bios_scratch_regs(rdev);
|
||||
|
||||
radeon_fbdev_set_suspend(rdev, 0);
|
||||
release_console_sem();
|
||||
console_unlock();
|
||||
|
||||
/* reset hpd state */
|
||||
radeon_hpd_init(rdev);
|
||||
|
@ -48,7 +48,7 @@
|
||||
* - 2.5.0 - add get accel 2 to work around ddx breakage for evergreen
|
||||
* - 2.6.0 - add tiling config query (r6xx+), add initial HiZ support (r300->r500)
|
||||
* 2.7.0 - fixups for r600 2D tiling support. (no external ABI change), add eg dyn gpr regs
|
||||
* 2.8.0 - pageflip support, r500 US_FORMAT regs. r500 ARGB2101010 colorbuf, r300->r500 CMASK
|
||||
* 2.8.0 - pageflip support, r500 US_FORMAT regs. r500 ARGB2101010 colorbuf, r300->r500 CMASK, clock crystal query
|
||||
*/
|
||||
#define KMS_DRIVER_MAJOR 2
|
||||
#define KMS_DRIVER_MINOR 8
|
||||
|
@ -110,11 +110,14 @@ void radeon_driver_irq_uninstall_kms(struct drm_device *dev)
|
||||
|
||||
int radeon_irq_kms_init(struct radeon_device *rdev)
|
||||
{
|
||||
int i;
|
||||
int r = 0;
|
||||
|
||||
INIT_WORK(&rdev->hotplug_work, radeon_hotplug_work_func);
|
||||
|
||||
spin_lock_init(&rdev->irq.sw_lock);
|
||||
for (i = 0; i < rdev->num_crtc; i++)
|
||||
spin_lock_init(&rdev->irq.pflip_lock[i]);
|
||||
r = drm_vblank_init(rdev->ddev, rdev->num_crtc);
|
||||
if (r) {
|
||||
return r;
|
||||
|
@ -201,6 +201,10 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
|
||||
}
|
||||
radeon_set_filp_rights(dev, &rdev->cmask_filp, filp, &value);
|
||||
break;
|
||||
case RADEON_INFO_CLOCK_CRYSTAL_FREQ:
|
||||
/* return clock value in KHz */
|
||||
value = rdev->clock.spll.reference_freq * 10;
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG_KMS("Invalid request %d\n", info->request);
|
||||
return -EINVAL;
|
||||
|
@ -636,7 +636,7 @@ int vga_client_register(struct pci_dev *pdev, void *cookie,
|
||||
void (*irq_set_state)(void *cookie, bool state),
|
||||
unsigned int (*set_vga_decode)(void *cookie, bool decode))
|
||||
{
|
||||
int ret = -1;
|
||||
int ret = -ENODEV;
|
||||
struct vga_device *vgadev;
|
||||
unsigned long flags;
|
||||
|
||||
|
@ -263,7 +263,7 @@ static void __setup_broadcast_timer(void *arg)
|
||||
clockevents_notify(reason, &cpu);
|
||||
}
|
||||
|
||||
static int __cpuinit setup_broadcast_cpuhp_notify(struct notifier_block *n,
|
||||
static int setup_broadcast_cpuhp_notify(struct notifier_block *n,
|
||||
unsigned long action, void *hcpu)
|
||||
{
|
||||
int hotcpu = (unsigned long)hcpu;
|
||||
@ -273,15 +273,11 @@ static int __cpuinit setup_broadcast_cpuhp_notify(struct notifier_block *n,
|
||||
smp_call_function_single(hotcpu, __setup_broadcast_timer,
|
||||
(void *)true, 1);
|
||||
break;
|
||||
case CPU_DOWN_PREPARE:
|
||||
smp_call_function_single(hotcpu, __setup_broadcast_timer,
|
||||
(void *)false, 1);
|
||||
break;
|
||||
}
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
static struct notifier_block __cpuinitdata setup_broadcast_notifier = {
|
||||
static struct notifier_block setup_broadcast_notifier = {
|
||||
.notifier_call = setup_broadcast_cpuhp_notify,
|
||||
};
|
||||
|
||||
|
@ -343,6 +343,16 @@ config KEYBOARD_NOMADIK
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called nmk-ske-keypad.
|
||||
|
||||
config KEYBOARD_TEGRA
|
||||
tristate "NVIDIA Tegra internal matrix keyboard controller support"
|
||||
depends on ARCH_TEGRA
|
||||
help
|
||||
Say Y here if you want to use a matrix keyboard connected directly
|
||||
to the internal keyboard controller on Tegra SoCs.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called tegra-kbc.
|
||||
|
||||
config KEYBOARD_OPENCORES
|
||||
tristate "OpenCores Keyboard Controller"
|
||||
help
|
||||
|
@ -42,6 +42,7 @@ obj-$(CONFIG_KEYBOARD_STMPE) += stmpe-keypad.o
|
||||
obj-$(CONFIG_KEYBOARD_STOWAWAY) += stowaway.o
|
||||
obj-$(CONFIG_KEYBOARD_SUNKBD) += sunkbd.o
|
||||
obj-$(CONFIG_KEYBOARD_TC3589X) += tc3589x-keypad.o
|
||||
obj-$(CONFIG_KEYBOARD_TEGRA) += tegra-kbc.o
|
||||
obj-$(CONFIG_KEYBOARD_TNETV107X) += tnetv107x-keypad.o
|
||||
obj-$(CONFIG_KEYBOARD_TWL4030) += twl4030_keypad.o
|
||||
obj-$(CONFIG_KEYBOARD_XTKBD) += xtkbd.o
|
||||
|
@ -322,7 +322,7 @@ static void gpio_keys_report_event(struct gpio_button_data *bdata)
|
||||
struct gpio_keys_button *button = bdata->button;
|
||||
struct input_dev *input = bdata->input;
|
||||
unsigned int type = button->type ?: EV_KEY;
|
||||
int state = (gpio_get_value(button->gpio) ? 1 : 0) ^ button->active_low;
|
||||
int state = (gpio_get_value_cansleep(button->gpio) ? 1 : 0) ^ button->active_low;
|
||||
|
||||
input_event(input, type, button->code, !!state);
|
||||
input_sync(input);
|
||||
@ -410,8 +410,8 @@ static int __devinit gpio_keys_setup_key(struct platform_device *pdev,
|
||||
if (!button->can_disable)
|
||||
irqflags |= IRQF_SHARED;
|
||||
|
||||
error = request_irq(irq, gpio_keys_isr, irqflags, desc, bdata);
|
||||
if (error) {
|
||||
error = request_any_context_irq(irq, gpio_keys_isr, irqflags, desc, bdata);
|
||||
if (error < 0) {
|
||||
dev_err(dev, "Unable to claim irq %d; error %d\n",
|
||||
irq, error);
|
||||
goto fail3;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user