mirror of
https://github.com/torvalds/linux.git
synced 2024-12-23 11:21:33 +00:00
Merge branch 'depends/i2c/lpc32xx' into next/dt
As a prerequisite for merging the lpc32xx DT changes, this pulls in the depends/i2c/lpc32xx branch that contains changes to the pnx-i2c driver, which are already in the i2c tree. The branch is available also on git://git.antcom.de/linux-2.6.git lpc32xx/i2c Roland Stigge <stigge@antcom.de> writes: this is the series of the 4 patches adding device tree support to i2c-pnx (used by LPC32xx) that Wolfram Sang already applied to the i2c subsystem. Since both drivers/i2c/ and mach-lpc32xx are touched here, there will probably be conflicts that you need to be aware of. I'm posting this again for arm-soc since the actual mach-lpc32xx specific DT conversion builds upon those changes (see next pull request), especially in arch/arm/mach-lpc32xx/common.c. Wolfram already gave permission to merge this via arm-soc, but please coordinate and tell me if I can help resolving this. Further, this implicitly updates the next/dt branch to v3.4-rc4, which causes a trivial conflict from a change in one branch in code that gets removed in another. Signed-off-by: Arnd Bergmann <arnd@arndb.de> [olof: rebuilt branch due to drop of an early merge] Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
commit
48bfdb216e
@ -1,6 +1,6 @@
|
||||
<refentry id="V4L2-PIX-FMT-NV12M">
|
||||
<refmeta>
|
||||
<refentrytitle>V4L2_PIX_FMT_NV12M ('NV12M')</refentrytitle>
|
||||
<refentrytitle>V4L2_PIX_FMT_NV12M ('NM12')</refentrytitle>
|
||||
&manvol;
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<refentry id="V4L2-PIX-FMT-YUV420M">
|
||||
<refmeta>
|
||||
<refentrytitle>V4L2_PIX_FMT_YUV420M ('YU12M')</refentrytitle>
|
||||
<refentrytitle>V4L2_PIX_FMT_YUV420M ('YM12')</refentrytitle>
|
||||
&manvol;
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
|
36
Documentation/devicetree/bindings/i2c/pnx.txt
Normal file
36
Documentation/devicetree/bindings/i2c/pnx.txt
Normal file
@ -0,0 +1,36 @@
|
||||
* NXP PNX I2C Controller
|
||||
|
||||
Required properties:
|
||||
|
||||
- reg: Offset and length of the register set for the device
|
||||
- compatible: should be "nxp,pnx-i2c"
|
||||
- interrupts: configure one interrupt line
|
||||
- #address-cells: always 1 (for i2c addresses)
|
||||
- #size-cells: always 0
|
||||
- interrupt-parent: the phandle for the interrupt controller that
|
||||
services interrupts for this device.
|
||||
|
||||
Optional properties:
|
||||
|
||||
- clock-frequency: desired I2C bus clock frequency in Hz, Default: 100000 Hz
|
||||
|
||||
Examples:
|
||||
|
||||
i2c1: i2c@400a0000 {
|
||||
compatible = "nxp,pnx-i2c";
|
||||
reg = <0x400a0000 0x100>;
|
||||
interrupt-parent = <&mic>;
|
||||
interrupts = <51 0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
i2c2: i2c@400a8000 {
|
||||
compatible = "nxp,pnx-i2c";
|
||||
reg = <0x400a8000 0x100>;
|
||||
interrupt-parent = <&mic>;
|
||||
interrupts = <50 0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
clock-frequency = <100000>;
|
||||
};
|
@ -2321,9 +2321,9 @@ S: Supported
|
||||
F: drivers/acpi/dock.c
|
||||
|
||||
DOCUMENTATION
|
||||
M: Randy Dunlap <rdunlap@xenotime.net>
|
||||
M: Rob Landley <rob@landley.net>
|
||||
L: linux-doc@vger.kernel.org
|
||||
T: quilt http://xenotime.net/kernel-doc-patches/current/
|
||||
T: TBD
|
||||
S: Maintained
|
||||
F: Documentation/
|
||||
|
||||
|
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc3
|
||||
EXTRAVERSION = -rc4
|
||||
NAME = Saber-toothed Squirrel
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -112,6 +112,7 @@ CONFIG_WATCHDOG=y
|
||||
CONFIG_IMX2_WDT=y
|
||||
CONFIG_MFD_MC13XXX=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_REGULATOR_MC13783=y
|
||||
CONFIG_REGULATOR_MC13892=y
|
||||
CONFIG_FB=y
|
||||
|
@ -8,8 +8,6 @@ CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_LBDAF is not set
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
CONFIG_ARCH_U8500=y
|
||||
CONFIG_UX500_SOC_DB5500=y
|
||||
CONFIG_UX500_SOC_DB8500=y
|
||||
CONFIG_MACH_HREFV60=y
|
||||
CONFIG_MACH_SNOWBALL=y
|
||||
CONFIG_MACH_U5500=y
|
||||
@ -39,7 +37,6 @@ CONFIG_CAIF=y
|
||||
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_SIZE=65536
|
||||
CONFIG_MISC_DEVICES=y
|
||||
CONFIG_AB8500_PWM=y
|
||||
CONFIG_SENSORS_BH1780=y
|
||||
CONFIG_NETDEVICES=y
|
||||
@ -65,16 +62,18 @@ CONFIG_SERIAL_AMBA_PL011=y
|
||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_NOMADIK=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_NOMADIK=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_PL022=y
|
||||
CONFIG_GPIO_STMPE=y
|
||||
CONFIG_GPIO_TC3589X=y
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_AB8500_BM=y
|
||||
CONFIG_AB8500_BATTERY_THERM_ON_BATCTRL=y
|
||||
CONFIG_MFD_STMPE=y
|
||||
CONFIG_MFD_TC3589X=y
|
||||
CONFIG_AB5500_CORE=y
|
||||
CONFIG_AB8500_CORE=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_REGULATOR_AB8500=y
|
||||
# CONFIG_HID_SUPPORT is not set
|
||||
CONFIG_USB_GADGET=y
|
||||
|
@ -1173,7 +1173,6 @@ void __init at91_add_device_serial(void)
|
||||
printk(KERN_INFO "AT91: No default serial console defined.\n");
|
||||
}
|
||||
#else
|
||||
void __init __deprecated at91_init_serial(struct at91_uart_config *config) {}
|
||||
void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
|
||||
void __init at91_set_serial_console(unsigned portnr) {}
|
||||
void __init at91_add_device_serial(void) {}
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/clockchips.h>
|
||||
#include <linux/export.h>
|
||||
|
||||
#include <asm/mach/time.h>
|
||||
|
||||
@ -176,6 +177,7 @@ static struct clock_event_device clkevt = {
|
||||
};
|
||||
|
||||
void __iomem *at91_st_base;
|
||||
EXPORT_SYMBOL_GPL(at91_st_base);
|
||||
|
||||
void __init at91rm9200_ioremap_st(u32 addr)
|
||||
{
|
||||
|
@ -117,7 +117,7 @@ static struct i2c_board_info __initdata ek_i2c_devices[] = {
|
||||
};
|
||||
|
||||
#define EK_FLASH_BASE AT91_CHIPSELECT_0
|
||||
#define EK_FLASH_SIZE SZ_2M
|
||||
#define EK_FLASH_SIZE SZ_8M
|
||||
|
||||
static struct physmap_flash_data ek_flash_data = {
|
||||
.width = 2,
|
||||
|
@ -85,8 +85,6 @@ static struct resource dm9000_resource[] = {
|
||||
.flags = IORESOURCE_MEM
|
||||
},
|
||||
[2] = {
|
||||
.start = AT91_PIN_PC11,
|
||||
.end = AT91_PIN_PC11,
|
||||
.flags = IORESOURCE_IRQ
|
||||
| IORESOURCE_IRQ_LOWEDGE | IORESOURCE_IRQ_HIGHEDGE,
|
||||
}
|
||||
@ -130,6 +128,8 @@ static struct sam9_smc_config __initdata dm9000_smc_config = {
|
||||
|
||||
static void __init ek_add_device_dm9000(void)
|
||||
{
|
||||
struct resource *r = &dm9000_resource[2];
|
||||
|
||||
/* Configure chip-select 2 (DM9000) */
|
||||
sam9_smc_configure(0, 2, &dm9000_smc_config);
|
||||
|
||||
@ -139,6 +139,7 @@ static void __init ek_add_device_dm9000(void)
|
||||
/* Configure Interrupt pin as input, no pull-up */
|
||||
at91_set_gpio_input(AT91_PIN_PC11, 0);
|
||||
|
||||
r->start = r->end = gpio_to_irq(AT91_PIN_PC11);
|
||||
platform_device_register(&dm9000_device);
|
||||
}
|
||||
#else
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "generic.h"
|
||||
|
||||
void __iomem *at91_pmc_base;
|
||||
EXPORT_SYMBOL_GPL(at91_pmc_base);
|
||||
|
||||
/*
|
||||
* There's a lot more which can be done with clocks, including cpufreq
|
||||
|
@ -25,7 +25,7 @@ extern void __iomem *at91_pmc_base;
|
||||
#define at91_pmc_write(field, value) \
|
||||
__raw_writel(value, at91_pmc_base + field)
|
||||
#else
|
||||
.extern at91_aic_base
|
||||
.extern at91_pmc_base
|
||||
#endif
|
||||
|
||||
#define AT91_PMC_SCER 0x00 /* System Clock Enable Register */
|
||||
|
@ -54,6 +54,7 @@ void __init at91_init_interrupts(unsigned int *priority)
|
||||
}
|
||||
|
||||
void __iomem *at91_ramc_base[2];
|
||||
EXPORT_SYMBOL_GPL(at91_ramc_base);
|
||||
|
||||
void __init at91_ioremap_ramc(int id, u32 addr, u32 size)
|
||||
{
|
||||
@ -292,6 +293,7 @@ void __init at91_ioremap_rstc(u32 base_addr)
|
||||
}
|
||||
|
||||
void __iomem *at91_matrix_base;
|
||||
EXPORT_SYMBOL_GPL(at91_matrix_base);
|
||||
|
||||
void __init at91_ioremap_matrix(u32 base_addr)
|
||||
{
|
||||
|
@ -52,8 +52,8 @@
|
||||
#include <mach/csp/chipcHw_inline.h>
|
||||
#include <mach/csp/tmrHw_reg.h>
|
||||
|
||||
static AMBA_APB_DEVICE(uartA, "uarta", MM_ADDR_IO_UARTA, { IRQ_UARTA }, NULL);
|
||||
static AMBA_APB_DEVICE(uartB, "uartb", MM_ADDR_IO_UARTB, { IRQ_UARTB }, NULL);
|
||||
static AMBA_APB_DEVICE(uartA, "uartA", 0, MM_ADDR_IO_UARTA, {IRQ_UARTA}, NULL);
|
||||
static AMBA_APB_DEVICE(uartB, "uartB", 0, MM_ADDR_IO_UARTB, {IRQ_UARTB}, NULL);
|
||||
|
||||
static struct clk pll1_clk = {
|
||||
.name = "PLL1",
|
||||
|
@ -35,7 +35,7 @@ static const struct of_dev_auxdata imx27_auxdata_lookup[] __initconst = {
|
||||
static int __init imx27_avic_add_irq_domain(struct device_node *np,
|
||||
struct device_node *interrupt_parent)
|
||||
{
|
||||
irq_domain_add_simple(np, 0);
|
||||
irq_domain_add_legacy(np, 64, 0, 0, &irq_domain_simple_ops, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -44,7 +44,9 @@ static int __init imx27_gpio_add_irq_domain(struct device_node *np,
|
||||
{
|
||||
static int gpio_irq_base = MXC_GPIO_IRQ_START + ARCH_NR_GPIOS;
|
||||
|
||||
irq_domain_add_simple(np, gpio_irq_base);
|
||||
gpio_irq_base -= 32;
|
||||
irq_domain_add_legacy(np, 32, gpio_irq_base, 0, &irq_domain_simple_ops,
|
||||
NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ static void imx5_idle(void)
|
||||
}
|
||||
clk_enable(gpc_dvfs_clk);
|
||||
mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF);
|
||||
if (tzic_enable_wake() != 0)
|
||||
if (!tzic_enable_wake())
|
||||
cpu_do_idle();
|
||||
clk_disable(gpc_dvfs_clk);
|
||||
}
|
||||
|
@ -27,7 +27,6 @@
|
||||
|
||||
#include <asm/mach/map.h>
|
||||
|
||||
#include <mach/i2c.h>
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/platform.h>
|
||||
#include "common.h"
|
||||
@ -53,46 +52,64 @@ struct platform_device lpc32xx_watchdog_device = {
|
||||
/*
|
||||
* I2C busses
|
||||
*/
|
||||
static struct i2c_pnx_data i2c0_data = {
|
||||
.name = I2C_CHIP_NAME "1",
|
||||
.base = LPC32XX_I2C1_BASE,
|
||||
.irq = IRQ_LPC32XX_I2C_1,
|
||||
static struct resource i2c0_resources[] = {
|
||||
[0] = {
|
||||
.start = LPC32XX_I2C1_BASE,
|
||||
.end = LPC32XX_I2C1_BASE + 0x100 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = IRQ_LPC32XX_I2C_1,
|
||||
.end = IRQ_LPC32XX_I2C_1,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct i2c_pnx_data i2c1_data = {
|
||||
.name = I2C_CHIP_NAME "2",
|
||||
.base = LPC32XX_I2C2_BASE,
|
||||
.irq = IRQ_LPC32XX_I2C_2,
|
||||
static struct resource i2c1_resources[] = {
|
||||
[0] = {
|
||||
.start = LPC32XX_I2C2_BASE,
|
||||
.end = LPC32XX_I2C2_BASE + 0x100 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = IRQ_LPC32XX_I2C_2,
|
||||
.end = IRQ_LPC32XX_I2C_2,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct i2c_pnx_data i2c2_data = {
|
||||
.name = "USB-I2C",
|
||||
.base = LPC32XX_OTG_I2C_BASE,
|
||||
.irq = IRQ_LPC32XX_USB_I2C,
|
||||
static struct resource i2c2_resources[] = {
|
||||
[0] = {
|
||||
.start = LPC32XX_OTG_I2C_BASE,
|
||||
.end = LPC32XX_OTG_I2C_BASE + 0x100 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = IRQ_LPC32XX_USB_I2C,
|
||||
.end = IRQ_LPC32XX_USB_I2C,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
struct platform_device lpc32xx_i2c0_device = {
|
||||
.name = "pnx-i2c",
|
||||
.name = "pnx-i2c.0",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = &i2c0_data,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(i2c0_resources),
|
||||
.resource = i2c0_resources,
|
||||
};
|
||||
|
||||
struct platform_device lpc32xx_i2c1_device = {
|
||||
.name = "pnx-i2c",
|
||||
.name = "pnx-i2c.1",
|
||||
.id = 1,
|
||||
.dev = {
|
||||
.platform_data = &i2c1_data,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(i2c1_resources),
|
||||
.resource = i2c1_resources,
|
||||
};
|
||||
|
||||
struct platform_device lpc32xx_i2c2_device = {
|
||||
.name = "pnx-i2c",
|
||||
.name = "pnx-i2c.2",
|
||||
.id = 2,
|
||||
.dev = {
|
||||
.platform_data = &i2c2_data,
|
||||
},
|
||||
.num_resources = ARRAY_SIZE(i2c2_resources),
|
||||
.resource = i2c2_resources,
|
||||
};
|
||||
|
||||
/* TSC (Touch Screen Controller) */
|
||||
|
@ -1,63 +0,0 @@
|
||||
/*
|
||||
* PNX4008-specific tweaks for I2C IP3204 block
|
||||
*
|
||||
* Author: Vitaly Wool <vwool@ru.mvista.com>
|
||||
*
|
||||
* 2005 (c) MontaVista Software, Inc. This file is licensed under
|
||||
* the terms of the GNU General Public License version 2. This program
|
||||
* is licensed "as is" without any warranty of any kind, whether express
|
||||
* or implied.
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_I2C_H
|
||||
#define __ASM_ARCH_I2C_H
|
||||
|
||||
enum {
|
||||
mstatus_tdi = 0x00000001,
|
||||
mstatus_afi = 0x00000002,
|
||||
mstatus_nai = 0x00000004,
|
||||
mstatus_drmi = 0x00000008,
|
||||
mstatus_active = 0x00000020,
|
||||
mstatus_scl = 0x00000040,
|
||||
mstatus_sda = 0x00000080,
|
||||
mstatus_rff = 0x00000100,
|
||||
mstatus_rfe = 0x00000200,
|
||||
mstatus_tff = 0x00000400,
|
||||
mstatus_tfe = 0x00000800,
|
||||
};
|
||||
|
||||
enum {
|
||||
mcntrl_tdie = 0x00000001,
|
||||
mcntrl_afie = 0x00000002,
|
||||
mcntrl_naie = 0x00000004,
|
||||
mcntrl_drmie = 0x00000008,
|
||||
mcntrl_daie = 0x00000020,
|
||||
mcntrl_rffie = 0x00000040,
|
||||
mcntrl_tffie = 0x00000080,
|
||||
mcntrl_reset = 0x00000100,
|
||||
mcntrl_cdbmode = 0x00000400,
|
||||
};
|
||||
|
||||
enum {
|
||||
rw_bit = 1 << 0,
|
||||
start_bit = 1 << 8,
|
||||
stop_bit = 1 << 9,
|
||||
};
|
||||
|
||||
#define I2C_REG_RX(a) ((a)->ioaddr) /* Rx FIFO reg (RO) */
|
||||
#define I2C_REG_TX(a) ((a)->ioaddr) /* Tx FIFO reg (WO) */
|
||||
#define I2C_REG_STS(a) ((a)->ioaddr + 0x04) /* Status reg (RO) */
|
||||
#define I2C_REG_CTL(a) ((a)->ioaddr + 0x08) /* Ctl reg */
|
||||
#define I2C_REG_CKL(a) ((a)->ioaddr + 0x0c) /* Clock divider low */
|
||||
#define I2C_REG_CKH(a) ((a)->ioaddr + 0x10) /* Clock divider high */
|
||||
#define I2C_REG_ADR(a) ((a)->ioaddr + 0x14) /* I2C address */
|
||||
#define I2C_REG_RFL(a) ((a)->ioaddr + 0x18) /* Rx FIFO level (RO) */
|
||||
#define I2C_REG_TFL(a) ((a)->ioaddr + 0x1c) /* Tx FIFO level (RO) */
|
||||
#define I2C_REG_RXB(a) ((a)->ioaddr + 0x20) /* Num of bytes Rx-ed (RO) */
|
||||
#define I2C_REG_TXB(a) ((a)->ioaddr + 0x24) /* Num of bytes Tx-ed (RO) */
|
||||
#define I2C_REG_TXS(a) ((a)->ioaddr + 0x28) /* Tx slave FIFO (RO) */
|
||||
#define I2C_REG_STFL(a) ((a)->ioaddr + 0x2c) /* Tx slave FIFO level (RO) */
|
||||
|
||||
#define I2C_CHIP_NAME "PNX4008-I2C"
|
||||
|
||||
#endif /* __ASM_ARCH_I2C_H */
|
@ -27,6 +27,7 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
|
||||
#include <plat/mux.h>
|
||||
|
||||
|
@ -47,9 +47,9 @@ static int omap1_dm_timer_set_src(struct platform_device *pdev,
|
||||
int n = (pdev->id - 1) << 1;
|
||||
u32 l;
|
||||
|
||||
l = __raw_readl(MOD_CONF_CTRL_1) & ~(0x03 << n);
|
||||
l = omap_readl(MOD_CONF_CTRL_1) & ~(0x03 << n);
|
||||
l |= source << n;
|
||||
__raw_writel(l, MOD_CONF_CTRL_1);
|
||||
omap_writel(l, MOD_CONF_CTRL_1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <linux/usb/otg.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/i2c/twl.h>
|
||||
#include <linux/mfd/twl6040.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
#include <linux/regulator/fixed.h>
|
||||
@ -560,7 +561,7 @@ static struct regulator_init_data sdp4430_vusim = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct twl4030_codec_data twl6040_codec = {
|
||||
static struct twl6040_codec_data twl6040_codec = {
|
||||
/* single-step ramp for headset and handsfree */
|
||||
.hs_left_step = 0x0f,
|
||||
.hs_right_step = 0x0f,
|
||||
@ -568,7 +569,7 @@ static struct twl4030_codec_data twl6040_codec = {
|
||||
.hf_right_step = 0x1d,
|
||||
};
|
||||
|
||||
static struct twl4030_vibra_data twl6040_vibra = {
|
||||
static struct twl6040_vibra_data twl6040_vibra = {
|
||||
.vibldrv_res = 8,
|
||||
.vibrdrv_res = 3,
|
||||
.viblmotor_res = 10,
|
||||
@ -577,16 +578,14 @@ static struct twl4030_vibra_data twl6040_vibra = {
|
||||
.vddvibr_uV = 0, /* fixed volt supply - VBAT */
|
||||
};
|
||||
|
||||
static struct twl4030_audio_data twl6040_audio = {
|
||||
static struct twl6040_platform_data twl6040_data = {
|
||||
.codec = &twl6040_codec,
|
||||
.vibra = &twl6040_vibra,
|
||||
.audpwron_gpio = 127,
|
||||
.naudint_irq = OMAP44XX_IRQ_SYS_2N,
|
||||
.irq_base = TWL6040_CODEC_IRQ_BASE,
|
||||
};
|
||||
|
||||
static struct twl4030_platform_data sdp4430_twldata = {
|
||||
.audio = &twl6040_audio,
|
||||
/* Regulators */
|
||||
.vusim = &sdp4430_vusim,
|
||||
.vaux1 = &sdp4430_vaux1,
|
||||
@ -617,7 +616,8 @@ static int __init omap4_i2c_init(void)
|
||||
TWL_COMMON_REGULATOR_VCXIO |
|
||||
TWL_COMMON_REGULATOR_VUSB |
|
||||
TWL_COMMON_REGULATOR_CLK32KG);
|
||||
omap4_pmic_init("twl6030", &sdp4430_twldata);
|
||||
omap4_pmic_init("twl6030", &sdp4430_twldata,
|
||||
&twl6040_data, OMAP44XX_IRQ_SYS_2N);
|
||||
omap_register_i2c_bus(2, 400, NULL, 0);
|
||||
omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo,
|
||||
ARRAY_SIZE(sdp4430_i2c_3_boardinfo));
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/usb/otg.h>
|
||||
#include <linux/i2c/twl.h>
|
||||
#include <linux/mfd/twl6040.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
#include <linux/regulator/fixed.h>
|
||||
#include <linux/wl12xx.h>
|
||||
@ -284,7 +285,7 @@ static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct twl4030_codec_data twl6040_codec = {
|
||||
static struct twl6040_codec_data twl6040_codec = {
|
||||
/* single-step ramp for headset and handsfree */
|
||||
.hs_left_step = 0x0f,
|
||||
.hs_right_step = 0x0f,
|
||||
@ -292,17 +293,14 @@ static struct twl4030_codec_data twl6040_codec = {
|
||||
.hf_right_step = 0x1d,
|
||||
};
|
||||
|
||||
static struct twl4030_audio_data twl6040_audio = {
|
||||
static struct twl6040_platform_data twl6040_data = {
|
||||
.codec = &twl6040_codec,
|
||||
.audpwron_gpio = 127,
|
||||
.naudint_irq = OMAP44XX_IRQ_SYS_2N,
|
||||
.irq_base = TWL6040_CODEC_IRQ_BASE,
|
||||
};
|
||||
|
||||
/* Panda board uses the common PMIC configuration */
|
||||
static struct twl4030_platform_data omap4_panda_twldata = {
|
||||
.audio = &twl6040_audio,
|
||||
};
|
||||
static struct twl4030_platform_data omap4_panda_twldata;
|
||||
|
||||
/*
|
||||
* Display monitor features are burnt in their EEPROM as EDID data. The EEPROM
|
||||
@ -326,7 +324,8 @@ static int __init omap4_panda_i2c_init(void)
|
||||
TWL_COMMON_REGULATOR_VCXIO |
|
||||
TWL_COMMON_REGULATOR_VUSB |
|
||||
TWL_COMMON_REGULATOR_CLK32KG);
|
||||
omap4_pmic_init("twl6030", &omap4_panda_twldata);
|
||||
omap4_pmic_init("twl6030", &omap4_panda_twldata,
|
||||
&twl6040_data, OMAP44XX_IRQ_SYS_2N);
|
||||
omap_register_i2c_bus(2, 400, NULL, 0);
|
||||
/*
|
||||
* Bus 3 is attached to the DVI port where devices like the pico DLP
|
||||
|
@ -1422,6 +1422,9 @@ static int _ocp_softreset(struct omap_hwmod *oh)
|
||||
goto dis_opt_clks;
|
||||
_write_sysconfig(v, oh);
|
||||
|
||||
if (oh->class->sysc->srst_udelay)
|
||||
udelay(oh->class->sysc->srst_udelay);
|
||||
|
||||
if (oh->class->sysc->sysc_flags & SYSS_HAS_RESET_STATUS)
|
||||
omap_test_timeout((omap_hwmod_read(oh,
|
||||
oh->class->sysc->syss_offs)
|
||||
@ -1903,10 +1906,20 @@ void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs)
|
||||
*/
|
||||
int omap_hwmod_softreset(struct omap_hwmod *oh)
|
||||
{
|
||||
if (!oh)
|
||||
u32 v;
|
||||
int ret;
|
||||
|
||||
if (!oh || !(oh->_sysc_cache))
|
||||
return -EINVAL;
|
||||
|
||||
return _ocp_softreset(oh);
|
||||
v = oh->_sysc_cache;
|
||||
ret = _set_softreset(oh, &v);
|
||||
if (ret)
|
||||
goto error;
|
||||
_write_sysconfig(v, oh);
|
||||
|
||||
error:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1000,7 +1000,6 @@ static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = {
|
||||
.flags = OMAP_FIREWALL_L4,
|
||||
}
|
||||
},
|
||||
.flags = OCPIF_SWSUP_IDLE,
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
|
@ -1049,7 +1049,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = {
|
||||
.slave = &omap2430_dss_venc_hwmod,
|
||||
.clk = "dss_ick",
|
||||
.addr = omap2_dss_venc_addrs,
|
||||
.flags = OCPIF_SWSUP_IDLE,
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
|
@ -1676,7 +1676,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
|
||||
.flags = OMAP_FIREWALL_L4,
|
||||
}
|
||||
},
|
||||
.flags = OCPIF_SWSUP_IDLE,
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
|
@ -2594,6 +2594,15 @@ static struct omap_hwmod omap44xx_ipu_hwmod = {
|
||||
static struct omap_hwmod_class_sysconfig omap44xx_iss_sysc = {
|
||||
.rev_offs = 0x0000,
|
||||
.sysc_offs = 0x0010,
|
||||
/*
|
||||
* ISS needs 100 OCP clk cycles delay after a softreset before
|
||||
* accessing sysconfig again.
|
||||
* The lowest frequency at the moment for L3 bus is 100 MHz, so
|
||||
* 1usec delay is needed. Add an x2 margin to be safe (2 usecs).
|
||||
*
|
||||
* TODO: Indicate errata when available.
|
||||
*/
|
||||
.srst_udelay = 2,
|
||||
.sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_RESET_STATUS |
|
||||
SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
|
||||
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
|
||||
|
@ -108,8 +108,14 @@ static void omap_uart_set_noidle(struct platform_device *pdev)
|
||||
static void omap_uart_set_smartidle(struct platform_device *pdev)
|
||||
{
|
||||
struct omap_device *od = to_omap_device(pdev);
|
||||
u8 idlemode;
|
||||
|
||||
omap_hwmod_set_slave_idlemode(od->hwmods[0], HWMOD_IDLEMODE_SMART);
|
||||
if (od->hwmods[0]->class->sysc->idlemodes & SIDLE_SMART_WKUP)
|
||||
idlemode = HWMOD_IDLEMODE_SMART_WKUP;
|
||||
else
|
||||
idlemode = HWMOD_IDLEMODE_SMART;
|
||||
|
||||
omap_hwmod_set_slave_idlemode(od->hwmods[0], idlemode);
|
||||
}
|
||||
|
||||
#else
|
||||
@ -120,124 +126,8 @@ static void omap_uart_set_smartidle(struct platform_device *pdev) {}
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
#ifdef CONFIG_OMAP_MUX
|
||||
static struct omap_device_pad default_uart1_pads[] __initdata = {
|
||||
{
|
||||
.name = "uart1_cts.uart1_cts",
|
||||
.enable = OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
|
||||
},
|
||||
{
|
||||
.name = "uart1_rts.uart1_rts",
|
||||
.enable = OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
|
||||
},
|
||||
{
|
||||
.name = "uart1_tx.uart1_tx",
|
||||
.enable = OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
|
||||
},
|
||||
{
|
||||
.name = "uart1_rx.uart1_rx",
|
||||
.flags = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
|
||||
.enable = OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
|
||||
.idle = OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_device_pad default_uart2_pads[] __initdata = {
|
||||
{
|
||||
.name = "uart2_cts.uart2_cts",
|
||||
.enable = OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
|
||||
},
|
||||
{
|
||||
.name = "uart2_rts.uart2_rts",
|
||||
.enable = OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
|
||||
},
|
||||
{
|
||||
.name = "uart2_tx.uart2_tx",
|
||||
.enable = OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
|
||||
},
|
||||
{
|
||||
.name = "uart2_rx.uart2_rx",
|
||||
.flags = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
|
||||
.enable = OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
|
||||
.idle = OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_device_pad default_uart3_pads[] __initdata = {
|
||||
{
|
||||
.name = "uart3_cts_rctx.uart3_cts_rctx",
|
||||
.enable = OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
|
||||
},
|
||||
{
|
||||
.name = "uart3_rts_sd.uart3_rts_sd",
|
||||
.enable = OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
|
||||
},
|
||||
{
|
||||
.name = "uart3_tx_irtx.uart3_tx_irtx",
|
||||
.enable = OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
|
||||
},
|
||||
{
|
||||
.name = "uart3_rx_irrx.uart3_rx_irrx",
|
||||
.flags = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
|
||||
.enable = OMAP_PIN_INPUT | OMAP_MUX_MODE0,
|
||||
.idle = OMAP_PIN_INPUT | OMAP_MUX_MODE0,
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_device_pad default_omap36xx_uart4_pads[] __initdata = {
|
||||
{
|
||||
.name = "gpmc_wait2.uart4_tx",
|
||||
.enable = OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
|
||||
},
|
||||
{
|
||||
.name = "gpmc_wait3.uart4_rx",
|
||||
.flags = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
|
||||
.enable = OMAP_PIN_INPUT | OMAP_MUX_MODE2,
|
||||
.idle = OMAP_PIN_INPUT | OMAP_MUX_MODE2,
|
||||
},
|
||||
};
|
||||
|
||||
static struct omap_device_pad default_omap4_uart4_pads[] __initdata = {
|
||||
{
|
||||
.name = "uart4_tx.uart4_tx",
|
||||
.enable = OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
|
||||
},
|
||||
{
|
||||
.name = "uart4_rx.uart4_rx",
|
||||
.flags = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP,
|
||||
.enable = OMAP_PIN_INPUT | OMAP_MUX_MODE0,
|
||||
.idle = OMAP_PIN_INPUT | OMAP_MUX_MODE0,
|
||||
},
|
||||
};
|
||||
|
||||
static void omap_serial_fill_default_pads(struct omap_board_data *bdata)
|
||||
{
|
||||
switch (bdata->id) {
|
||||
case 0:
|
||||
bdata->pads = default_uart1_pads;
|
||||
bdata->pads_cnt = ARRAY_SIZE(default_uart1_pads);
|
||||
break;
|
||||
case 1:
|
||||
bdata->pads = default_uart2_pads;
|
||||
bdata->pads_cnt = ARRAY_SIZE(default_uart2_pads);
|
||||
break;
|
||||
case 2:
|
||||
bdata->pads = default_uart3_pads;
|
||||
bdata->pads_cnt = ARRAY_SIZE(default_uart3_pads);
|
||||
break;
|
||||
case 3:
|
||||
if (cpu_is_omap44xx()) {
|
||||
bdata->pads = default_omap4_uart4_pads;
|
||||
bdata->pads_cnt =
|
||||
ARRAY_SIZE(default_omap4_uart4_pads);
|
||||
} else if (cpu_is_omap3630()) {
|
||||
bdata->pads = default_omap36xx_uart4_pads;
|
||||
bdata->pads_cnt =
|
||||
ARRAY_SIZE(default_omap36xx_uart4_pads);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
static void omap_serial_fill_default_pads(struct omap_board_data *bdata) {}
|
||||
|
@ -37,6 +37,16 @@ static struct i2c_board_info __initdata pmic_i2c_board_info = {
|
||||
.flags = I2C_CLIENT_WAKE,
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata omap4_i2c1_board_info[] = {
|
||||
{
|
||||
.addr = 0x48,
|
||||
.flags = I2C_CLIENT_WAKE,
|
||||
},
|
||||
{
|
||||
I2C_BOARD_INFO("twl6040", 0x4b),
|
||||
},
|
||||
};
|
||||
|
||||
void __init omap_pmic_init(int bus, u32 clkrate,
|
||||
const char *pmic_type, int pmic_irq,
|
||||
struct twl4030_platform_data *pmic_data)
|
||||
@ -49,14 +59,31 @@ void __init omap_pmic_init(int bus, u32 clkrate,
|
||||
omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1);
|
||||
}
|
||||
|
||||
void __init omap4_pmic_init(const char *pmic_type,
|
||||
struct twl4030_platform_data *pmic_data,
|
||||
struct twl6040_platform_data *twl6040_data, int twl6040_irq)
|
||||
{
|
||||
/* PMIC part*/
|
||||
strncpy(omap4_i2c1_board_info[0].type, pmic_type,
|
||||
sizeof(omap4_i2c1_board_info[0].type));
|
||||
omap4_i2c1_board_info[0].irq = OMAP44XX_IRQ_SYS_1N;
|
||||
omap4_i2c1_board_info[0].platform_data = pmic_data;
|
||||
|
||||
/* TWL6040 audio IC part */
|
||||
omap4_i2c1_board_info[1].irq = twl6040_irq;
|
||||
omap4_i2c1_board_info[1].platform_data = twl6040_data;
|
||||
|
||||
omap_register_i2c_bus(1, 400, omap4_i2c1_board_info, 2);
|
||||
|
||||
}
|
||||
|
||||
void __init omap_pmic_late_init(void)
|
||||
{
|
||||
/* Init the OMAP TWL parameters (if PMIC has been registerd) */
|
||||
if (!pmic_i2c_board_info.irq)
|
||||
return;
|
||||
|
||||
omap3_twl_init();
|
||||
omap4_twl_init();
|
||||
if (pmic_i2c_board_info.irq)
|
||||
omap3_twl_init();
|
||||
if (omap4_i2c1_board_info[0].irq)
|
||||
omap4_twl_init();
|
||||
}
|
||||
|
||||
#if defined(CONFIG_ARCH_OMAP3)
|
||||
|
@ -29,6 +29,7 @@
|
||||
|
||||
|
||||
struct twl4030_platform_data;
|
||||
struct twl6040_platform_data;
|
||||
|
||||
void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq,
|
||||
struct twl4030_platform_data *pmic_data);
|
||||
@ -46,12 +47,9 @@ static inline void omap3_pmic_init(const char *pmic_type,
|
||||
omap_pmic_init(1, 2600, pmic_type, INT_34XX_SYS_NIRQ, pmic_data);
|
||||
}
|
||||
|
||||
static inline void omap4_pmic_init(const char *pmic_type,
|
||||
struct twl4030_platform_data *pmic_data)
|
||||
{
|
||||
/* Phoenix Audio IC needs I2C1 to start with 400 KHz or less */
|
||||
omap_pmic_init(1, 400, pmic_type, OMAP44XX_IRQ_SYS_1N, pmic_data);
|
||||
}
|
||||
void omap4_pmic_init(const char *pmic_type,
|
||||
struct twl4030_platform_data *pmic_data,
|
||||
struct twl6040_platform_data *audio_data, int twl6040_irq);
|
||||
|
||||
void omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
|
||||
u32 pdata_flags, u32 regulators_flags);
|
||||
|
@ -16,48 +16,62 @@
|
||||
#include <linux/err.h>
|
||||
#include <mach/platform.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/i2c.h>
|
||||
|
||||
static struct i2c_pnx_data i2c0_data = {
|
||||
.name = I2C_CHIP_NAME "0",
|
||||
.base = PNX4008_I2C1_BASE,
|
||||
.irq = I2C_1_INT,
|
||||
static struct resource i2c0_resources[] = {
|
||||
{
|
||||
.start = PNX4008_I2C1_BASE,
|
||||
.end = PNX4008_I2C1_BASE + SZ_4K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.start = I2C_1_INT,
|
||||
.end = I2C_1_INT,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct i2c_pnx_data i2c1_data = {
|
||||
.name = I2C_CHIP_NAME "1",
|
||||
.base = PNX4008_I2C2_BASE,
|
||||
.irq = I2C_2_INT,
|
||||
static struct resource i2c1_resources[] = {
|
||||
{
|
||||
.start = PNX4008_I2C2_BASE,
|
||||
.end = PNX4008_I2C2_BASE + SZ_4K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.start = I2C_2_INT,
|
||||
.end = I2C_2_INT,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct i2c_pnx_data i2c2_data = {
|
||||
.name = "USB-I2C",
|
||||
.base = (PNX4008_USB_CONFIG_BASE + 0x300),
|
||||
.irq = USB_I2C_INT,
|
||||
static struct resource i2c2_resources[] = {
|
||||
{
|
||||
.start = PNX4008_USB_CONFIG_BASE + 0x300,
|
||||
.end = PNX4008_USB_CONFIG_BASE + 0x300 + SZ_4K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}, {
|
||||
.start = USB_I2C_INT,
|
||||
.end = USB_I2C_INT,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device i2c0_device = {
|
||||
.name = "pnx-i2c",
|
||||
.name = "pnx-i2c.0",
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = &i2c0_data,
|
||||
},
|
||||
.resource = i2c0_resources,
|
||||
.num_resources = ARRAY_SIZE(i2c0_resources),
|
||||
};
|
||||
|
||||
static struct platform_device i2c1_device = {
|
||||
.name = "pnx-i2c",
|
||||
.name = "pnx-i2c.1",
|
||||
.id = 1,
|
||||
.dev = {
|
||||
.platform_data = &i2c1_data,
|
||||
},
|
||||
.resource = i2c1_resources,
|
||||
.num_resources = ARRAY_SIZE(i2c1_resources),
|
||||
};
|
||||
|
||||
static struct platform_device i2c2_device = {
|
||||
.name = "pnx-i2c",
|
||||
.name = "pnx-i2c.2",
|
||||
.id = 2,
|
||||
.dev = {
|
||||
.platform_data = &i2c2_data,
|
||||
},
|
||||
.resource = i2c2_resources,
|
||||
.num_resources = ARRAY_SIZE(i2c2_resources),
|
||||
};
|
||||
|
||||
static struct platform_device *devices[] __initdata = {
|
||||
|
@ -1,64 +0,0 @@
|
||||
/*
|
||||
* PNX4008-specific tweaks for I2C IP3204 block
|
||||
*
|
||||
* Author: Vitaly Wool <vwool@ru.mvista.com>
|
||||
*
|
||||
* 2005 (c) MontaVista Software, Inc. This file is licensed under
|
||||
* the terms of the GNU General Public License version 2. This program
|
||||
* is licensed "as is" without any warranty of any kind, whether express
|
||||
* or implied.
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_I2C_H__
|
||||
#define __ASM_ARCH_I2C_H__
|
||||
|
||||
enum {
|
||||
mstatus_tdi = 0x00000001,
|
||||
mstatus_afi = 0x00000002,
|
||||
mstatus_nai = 0x00000004,
|
||||
mstatus_drmi = 0x00000008,
|
||||
mstatus_active = 0x00000020,
|
||||
mstatus_scl = 0x00000040,
|
||||
mstatus_sda = 0x00000080,
|
||||
mstatus_rff = 0x00000100,
|
||||
mstatus_rfe = 0x00000200,
|
||||
mstatus_tff = 0x00000400,
|
||||
mstatus_tfe = 0x00000800,
|
||||
};
|
||||
|
||||
enum {
|
||||
mcntrl_tdie = 0x00000001,
|
||||
mcntrl_afie = 0x00000002,
|
||||
mcntrl_naie = 0x00000004,
|
||||
mcntrl_drmie = 0x00000008,
|
||||
mcntrl_daie = 0x00000020,
|
||||
mcntrl_rffie = 0x00000040,
|
||||
mcntrl_tffie = 0x00000080,
|
||||
mcntrl_reset = 0x00000100,
|
||||
mcntrl_cdbmode = 0x00000400,
|
||||
};
|
||||
|
||||
enum {
|
||||
rw_bit = 1 << 0,
|
||||
start_bit = 1 << 8,
|
||||
stop_bit = 1 << 9,
|
||||
};
|
||||
|
||||
#define I2C_REG_RX(a) ((a)->ioaddr) /* Rx FIFO reg (RO) */
|
||||
#define I2C_REG_TX(a) ((a)->ioaddr) /* Tx FIFO reg (WO) */
|
||||
#define I2C_REG_STS(a) ((a)->ioaddr + 0x04) /* Status reg (RO) */
|
||||
#define I2C_REG_CTL(a) ((a)->ioaddr + 0x08) /* Ctl reg */
|
||||
#define I2C_REG_CKL(a) ((a)->ioaddr + 0x0c) /* Clock divider low */
|
||||
#define I2C_REG_CKH(a) ((a)->ioaddr + 0x10) /* Clock divider high */
|
||||
#define I2C_REG_ADR(a) ((a)->ioaddr + 0x14) /* I2C address */
|
||||
#define I2C_REG_RFL(a) ((a)->ioaddr + 0x18) /* Rx FIFO level (RO) */
|
||||
#define I2C_REG_TFL(a) ((a)->ioaddr + 0x1c) /* Tx FIFO level (RO) */
|
||||
#define I2C_REG_RXB(a) ((a)->ioaddr + 0x20) /* Num of bytes Rx-ed (RO) */
|
||||
#define I2C_REG_TXB(a) ((a)->ioaddr + 0x24) /* Num of bytes Tx-ed (RO) */
|
||||
#define I2C_REG_TXS(a) ((a)->ioaddr + 0x28) /* Tx slave FIFO (RO) */
|
||||
#define I2C_REG_STFL(a) ((a)->ioaddr + 0x2c) /* Tx slave FIFO level (RO) */
|
||||
|
||||
#define HCLK_MHZ 13
|
||||
#define I2C_CHIP_NAME "PNX4008-I2C"
|
||||
|
||||
#endif /* __ASM_ARCH_I2C_H___ */
|
@ -17,6 +17,7 @@ config UX500_SOC_DB5500
|
||||
config UX500_SOC_DB8500
|
||||
bool
|
||||
select MFD_DB8500_PRCMU
|
||||
select REGULATOR
|
||||
select REGULATOR_DB8500_PRCMU
|
||||
select CPU_FREQ_TABLE if CPU_FREQ
|
||||
|
||||
|
@ -99,7 +99,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
|
||||
*/
|
||||
write_pen_release(cpu_logical_map(cpu));
|
||||
|
||||
gic_raise_softirq(cpumask_of(cpu), 1);
|
||||
smp_send_reschedule(cpu);
|
||||
|
||||
timeout = jiffies + (1 * HZ);
|
||||
while (time_before(jiffies, timeout)) {
|
||||
|
@ -305,6 +305,7 @@ struct omap_hwmod_sysc_fields {
|
||||
* @rev_offs: IP block revision register offset (from module base addr)
|
||||
* @sysc_offs: OCP_SYSCONFIG register offset (from module base addr)
|
||||
* @syss_offs: OCP_SYSSTATUS register offset (from module base addr)
|
||||
* @srst_udelay: Delay needed after doing a softreset in usecs
|
||||
* @idlemodes: One or more of {SIDLE,MSTANDBY}_{OFF,FORCE,SMART}
|
||||
* @sysc_flags: SYS{C,S}_HAS* flags indicating SYSCONFIG bits supported
|
||||
* @clockact: the default value of the module CLOCKACTIVITY bits
|
||||
@ -330,9 +331,10 @@ struct omap_hwmod_class_sysconfig {
|
||||
u16 sysc_offs;
|
||||
u16 syss_offs;
|
||||
u16 sysc_flags;
|
||||
struct omap_hwmod_sysc_fields *sysc_fields;
|
||||
u8 srst_udelay;
|
||||
u8 idlemodes;
|
||||
u8 clockact;
|
||||
struct omap_hwmod_sysc_fields *sysc_fields;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -348,7 +348,6 @@ u32 omap3_configure_core_dpll(u32 m2, u32 unlock_dll, u32 f, u32 inc,
|
||||
sdrc_actim_ctrl_b_1, sdrc_mr_1);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
void omap3_sram_restore_context(void)
|
||||
{
|
||||
omap_sram_ceil = omap_sram_base + omap_sram_size;
|
||||
@ -358,17 +357,18 @@ void omap3_sram_restore_context(void)
|
||||
omap3_sram_configure_core_dpll_sz);
|
||||
omap_push_sram_idle();
|
||||
}
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
#endif /* CONFIG_ARCH_OMAP3 */
|
||||
|
||||
static inline int omap34xx_sram_init(void)
|
||||
{
|
||||
#if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM)
|
||||
omap3_sram_restore_context();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
static inline int omap34xx_sram_init(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_ARCH_OMAP3 */
|
||||
|
||||
static inline int am33xx_sram_init(void)
|
||||
{
|
||||
|
@ -106,15 +106,16 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
|
||||
return -EFAULT;
|
||||
|
||||
{
|
||||
register unsigned long r8 __asm ("r8") = 0;
|
||||
register unsigned long r8 __asm ("r8");
|
||||
unsigned long prev;
|
||||
__asm__ __volatile__(
|
||||
" mf;; \n"
|
||||
" mov ar.ccv=%3;; \n"
|
||||
"[1:] cmpxchg4.acq %0=[%1],%2,ar.ccv \n"
|
||||
" mov %0=r0 \n"
|
||||
" mov ar.ccv=%4;; \n"
|
||||
"[1:] cmpxchg4.acq %1=[%2],%3,ar.ccv \n"
|
||||
" .xdata4 \"__ex_table\", 1b-., 2f-. \n"
|
||||
"[2:]"
|
||||
: "=r" (prev)
|
||||
: "=r" (r8), "=r" (prev)
|
||||
: "r" (uaddr), "r" (newval),
|
||||
"rO" ((long) (unsigned) oldval)
|
||||
: "memory");
|
||||
|
@ -604,12 +604,6 @@ pfm_unprotect_ctx_ctxsw(pfm_context_t *x, unsigned long f)
|
||||
spin_unlock(&(x)->ctx_lock);
|
||||
}
|
||||
|
||||
static inline unsigned int
|
||||
pfm_do_munmap(struct mm_struct *mm, unsigned long addr, size_t len, int acct)
|
||||
{
|
||||
return do_munmap(mm, addr, len);
|
||||
}
|
||||
|
||||
static inline unsigned long
|
||||
pfm_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags, unsigned long exec)
|
||||
{
|
||||
@ -1458,8 +1452,9 @@ pfm_unreserve_session(pfm_context_t *ctx, int is_syswide, unsigned int cpu)
|
||||
* a PROTECT_CTX() section.
|
||||
*/
|
||||
static int
|
||||
pfm_remove_smpl_mapping(struct task_struct *task, void *vaddr, unsigned long size)
|
||||
pfm_remove_smpl_mapping(void *vaddr, unsigned long size)
|
||||
{
|
||||
struct task_struct *task = current;
|
||||
int r;
|
||||
|
||||
/* sanity checks */
|
||||
@ -1473,13 +1468,8 @@ pfm_remove_smpl_mapping(struct task_struct *task, void *vaddr, unsigned long siz
|
||||
/*
|
||||
* does the actual unmapping
|
||||
*/
|
||||
down_write(&task->mm->mmap_sem);
|
||||
r = vm_munmap((unsigned long)vaddr, size);
|
||||
|
||||
DPRINT(("down_write done smpl_vaddr=%p size=%lu\n", vaddr, size));
|
||||
|
||||
r = pfm_do_munmap(task->mm, (unsigned long)vaddr, size, 0);
|
||||
|
||||
up_write(&task->mm->mmap_sem);
|
||||
if (r !=0) {
|
||||
printk(KERN_ERR "perfmon: [%d] unable to unmap sampling buffer @%p size=%lu\n", task_pid_nr(task), vaddr, size);
|
||||
}
|
||||
@ -1945,7 +1935,7 @@ pfm_flush(struct file *filp, fl_owner_t id)
|
||||
* because some VM function reenables interrupts.
|
||||
*
|
||||
*/
|
||||
if (smpl_buf_vaddr) pfm_remove_smpl_mapping(current, smpl_buf_vaddr, smpl_buf_size);
|
||||
if (smpl_buf_vaddr) pfm_remove_smpl_mapping(smpl_buf_vaddr, smpl_buf_size);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -49,7 +49,6 @@ CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_NET_ETHERNET=y
|
||||
CONFIG_FEC=y
|
||||
CONFIG_FEC2=y
|
||||
# CONFIG_NETDEV_1000 is not set
|
||||
# CONFIG_NETDEV_10000 is not set
|
||||
CONFIG_PPP=y
|
||||
|
@ -74,9 +74,7 @@ static void __init m527x_fec_init(void)
|
||||
writew(par | 0xf00, MCF_IPSBAR + 0x100082);
|
||||
v = readb(MCF_IPSBAR + 0x100078);
|
||||
writeb(v | 0xc0, MCF_IPSBAR + 0x100078);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FEC2
|
||||
/* Set multi-function pins to ethernet mode for fec1 */
|
||||
par = readw(MCF_IPSBAR + 0x100082);
|
||||
writew(par | 0xa0, MCF_IPSBAR + 0x100082);
|
||||
|
@ -3,9 +3,3 @@
|
||||
#
|
||||
|
||||
obj-y := config.o
|
||||
|
||||
extra-y := bootlogo.rh
|
||||
|
||||
$(obj)/bootlogo.rh: $(src)/bootlogo.h
|
||||
perl $(src)/../68328/bootlogo.pl < $(src)/bootlogo.h \
|
||||
> $(obj)/bootlogo.rh
|
||||
|
@ -3,14 +3,9 @@
|
||||
#
|
||||
|
||||
obj-y := config.o
|
||||
logo-$(UCDIMM) := bootlogo.rh
|
||||
logo-$(DRAGEN2) := screen.h
|
||||
extra-y := $(logo-y)
|
||||
|
||||
$(obj)/bootlogo.rh: $(src)/../68EZ328/bootlogo.h
|
||||
perl $(src)/bootlogo.pl < $(src)/../68328/bootlogo.h > $(obj)/bootlogo.rh
|
||||
extra-$(DRAGEN2):= screen.h
|
||||
|
||||
$(obj)/screen.h: $(src)/screen.xbm $(src)/xbm2lcd.pl
|
||||
perl $(src)/xbm2lcd.pl < $(src)/screen.xbm > $(obj)/screen.h
|
||||
|
||||
clean-files := $(obj)/screen.h $(obj)/bootlogo.rh
|
||||
clean-files := $(obj)/screen.h
|
||||
|
@ -1,6 +1,6 @@
|
||||
#define splash_width 640
|
||||
#define splash_height 480
|
||||
static unsigned char splash_bits[] = {
|
||||
unsigned char __attribute__ ((aligned(16))) bootlogo_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
@ -114,7 +114,7 @@ static struct resource mcf_fec1_resources[] = {
|
||||
|
||||
static struct platform_device mcf_fec1 = {
|
||||
.name = "fec",
|
||||
.id = 0,
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(mcf_fec1_resources),
|
||||
.resource = mcf_fec1_resources,
|
||||
};
|
||||
|
@ -90,7 +90,6 @@ config S390
|
||||
select HAVE_KERNEL_XZ
|
||||
select HAVE_ARCH_MUTEX_CPU_RELAX
|
||||
select HAVE_ARCH_JUMP_LABEL if !MARCH_G5
|
||||
select HAVE_RCU_TABLE_FREE if SMP
|
||||
select ARCH_SAVE_PAGE_KEYS if HIBERNATION
|
||||
select HAVE_MEMBLOCK
|
||||
select HAVE_MEMBLOCK_NODE_MAP
|
||||
|
@ -1,8 +1,12 @@
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_FHANDLE=y
|
||||
CONFIG_TASKSTATS=y
|
||||
CONFIG_TASK_DELAY_ACCT=y
|
||||
CONFIG_TASK_XACCT=y
|
||||
CONFIG_TASK_IO_ACCOUNTING=y
|
||||
CONFIG_AUDIT=y
|
||||
CONFIG_RCU_TRACE=y
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_CGROUPS=y
|
||||
@ -14,16 +18,22 @@ CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y
|
||||
CONFIG_CGROUP_SCHED=y
|
||||
CONFIG_RT_GROUP_SCHED=y
|
||||
CONFIG_BLK_CGROUP=y
|
||||
CONFIG_NAMESPACES=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||
CONFIG_RD_BZIP2=y
|
||||
CONFIG_RD_LZMA=y
|
||||
CONFIG_RD_XZ=y
|
||||
CONFIG_RD_LZO=y
|
||||
CONFIG_EXPERT=y
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_PROFILING=y
|
||||
CONFIG_OPROFILE=y
|
||||
CONFIG_KPROBES=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_MODVERSIONS=y
|
||||
CONFIG_PARTITION_ADVANCED=y
|
||||
CONFIG_IBM_PARTITION=y
|
||||
CONFIG_DEFAULT_DEADLINE=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
@ -34,18 +44,15 @@ CONFIG_KSM=y
|
||||
CONFIG_BINFMT_MISC=m
|
||||
CONFIG_CMM=m
|
||||
CONFIG_HZ_100=y
|
||||
CONFIG_KEXEC=y
|
||||
CONFIG_PM=y
|
||||
CONFIG_CRASH_DUMP=y
|
||||
CONFIG_HIBERNATION=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_NET_KEY=y
|
||||
CONFIG_AFIUCV=m
|
||||
CONFIG_INET=y
|
||||
CONFIG_IP_MULTICAST=y
|
||||
# CONFIG_INET_LRO is not set
|
||||
CONFIG_IPV6=y
|
||||
CONFIG_NET_SCTPPROBE=m
|
||||
CONFIG_L2TP=m
|
||||
CONFIG_L2TP_DEBUGFS=m
|
||||
CONFIG_VLAN_8021Q=y
|
||||
@ -84,15 +91,14 @@ CONFIG_SCSI_CONSTANTS=y
|
||||
CONFIG_SCSI_LOGGING=y
|
||||
CONFIG_SCSI_SCAN_ASYNC=y
|
||||
CONFIG_ZFCP=y
|
||||
CONFIG_ZFCP_DIF=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_DUMMY=m
|
||||
CONFIG_BONDING=m
|
||||
CONFIG_DUMMY=m
|
||||
CONFIG_EQUALIZER=m
|
||||
CONFIG_TUN=m
|
||||
CONFIG_NET_ETHERNET=y
|
||||
CONFIG_VIRTIO_NET=y
|
||||
CONFIG_RAW_DRIVER=m
|
||||
CONFIG_VIRTIO_BALLOON=y
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_EXT3_FS=y
|
||||
# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
|
||||
@ -103,27 +109,21 @@ CONFIG_PROC_KCORE=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_TMPFS_POSIX_ACL=y
|
||||
# CONFIG_NETWORK_FILESYSTEMS is not set
|
||||
CONFIG_PARTITION_ADVANCED=y
|
||||
CONFIG_IBM_PARTITION=y
|
||||
CONFIG_DLM=m
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
CONFIG_TIMER_STATS=y
|
||||
CONFIG_PROVE_LOCKING=y
|
||||
CONFIG_PROVE_RCU=y
|
||||
CONFIG_LOCK_STAT=y
|
||||
CONFIG_DEBUG_LOCKDEP=y
|
||||
CONFIG_DEBUG_SPINLOCK_SLEEP=y
|
||||
CONFIG_DEBUG_LIST=y
|
||||
CONFIG_DEBUG_NOTIFIERS=y
|
||||
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
|
||||
CONFIG_RCU_TRACE=y
|
||||
CONFIG_KPROBES_SANITY_TEST=y
|
||||
CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y
|
||||
CONFIG_CPU_NOTIFIER_ERROR_INJECT=m
|
||||
CONFIG_LATENCYTOP=y
|
||||
CONFIG_SYSCTL_SYSCALL_CHECK=y
|
||||
CONFIG_DEBUG_PAGEALLOC=y
|
||||
# CONFIG_FTRACE is not set
|
||||
CONFIG_BLK_DEV_IO_TRACE=y
|
||||
# CONFIG_STRICT_DEVMEM is not set
|
||||
CONFIG_CRYPTO_NULL=m
|
||||
CONFIG_CRYPTO_CRYPTD=m
|
||||
@ -173,4 +173,3 @@ CONFIG_CRYPTO_SHA512_S390=m
|
||||
CONFIG_CRYPTO_DES_S390=m
|
||||
CONFIG_CRYPTO_AES_S390=m
|
||||
CONFIG_CRC7=m
|
||||
CONFIG_VIRTIO_BALLOON=y
|
||||
|
@ -38,12 +38,11 @@ static inline void stfle(u64 *stfle_fac_list, int size)
|
||||
unsigned long nr;
|
||||
|
||||
preempt_disable();
|
||||
S390_lowcore.stfl_fac_list = 0;
|
||||
asm volatile(
|
||||
" .insn s,0xb2b10000,0(0)\n" /* stfl */
|
||||
"0:\n"
|
||||
EX_TABLE(0b, 0b)
|
||||
: "=m" (S390_lowcore.stfl_fac_list));
|
||||
: "+m" (S390_lowcore.stfl_fac_list));
|
||||
nr = 4; /* bytes stored by stfl */
|
||||
memcpy(stfle_fac_list, &S390_lowcore.stfl_fac_list, 4);
|
||||
if (S390_lowcore.stfl_fac_list & 0x01000000) {
|
||||
|
@ -22,10 +22,7 @@ void crst_table_free(struct mm_struct *, unsigned long *);
|
||||
|
||||
unsigned long *page_table_alloc(struct mm_struct *, unsigned long);
|
||||
void page_table_free(struct mm_struct *, unsigned long *);
|
||||
#ifdef CONFIG_HAVE_RCU_TABLE_FREE
|
||||
void page_table_free_rcu(struct mmu_gather *, unsigned long *);
|
||||
void __tlb_remove_table(void *_table);
|
||||
#endif
|
||||
|
||||
static inline void clear_table(unsigned long *s, unsigned long val, size_t n)
|
||||
{
|
||||
|
@ -77,7 +77,7 @@ static inline __u16 __arch_swab16p(const __u16 *x)
|
||||
|
||||
asm volatile(
|
||||
#ifndef __s390x__
|
||||
" icm %0,2,%O+1(%R1)\n"
|
||||
" icm %0,2,%O1+1(%R1)\n"
|
||||
" ic %0,%1\n"
|
||||
: "=&d" (result) : "Q" (*x) : "cc");
|
||||
#else /* __s390x__ */
|
||||
|
@ -30,14 +30,10 @@
|
||||
|
||||
struct mmu_gather {
|
||||
struct mm_struct *mm;
|
||||
#ifdef CONFIG_HAVE_RCU_TABLE_FREE
|
||||
struct mmu_table_batch *batch;
|
||||
#endif
|
||||
unsigned int fullmm;
|
||||
unsigned int need_flush;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_HAVE_RCU_TABLE_FREE
|
||||
struct mmu_table_batch {
|
||||
struct rcu_head rcu;
|
||||
unsigned int nr;
|
||||
@ -49,7 +45,6 @@ struct mmu_table_batch {
|
||||
|
||||
extern void tlb_table_flush(struct mmu_gather *tlb);
|
||||
extern void tlb_remove_table(struct mmu_gather *tlb, void *table);
|
||||
#endif
|
||||
|
||||
static inline void tlb_gather_mmu(struct mmu_gather *tlb,
|
||||
struct mm_struct *mm,
|
||||
@ -57,29 +52,20 @@ static inline void tlb_gather_mmu(struct mmu_gather *tlb,
|
||||
{
|
||||
tlb->mm = mm;
|
||||
tlb->fullmm = full_mm_flush;
|
||||
tlb->need_flush = 0;
|
||||
#ifdef CONFIG_HAVE_RCU_TABLE_FREE
|
||||
tlb->batch = NULL;
|
||||
#endif
|
||||
if (tlb->fullmm)
|
||||
__tlb_flush_mm(mm);
|
||||
}
|
||||
|
||||
static inline void tlb_flush_mmu(struct mmu_gather *tlb)
|
||||
{
|
||||
if (!tlb->need_flush)
|
||||
return;
|
||||
tlb->need_flush = 0;
|
||||
__tlb_flush_mm(tlb->mm);
|
||||
#ifdef CONFIG_HAVE_RCU_TABLE_FREE
|
||||
tlb_table_flush(tlb);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void tlb_finish_mmu(struct mmu_gather *tlb,
|
||||
unsigned long start, unsigned long end)
|
||||
{
|
||||
tlb_flush_mmu(tlb);
|
||||
tlb_table_flush(tlb);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -105,10 +91,8 @@ static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page)
|
||||
static inline void pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte,
|
||||
unsigned long address)
|
||||
{
|
||||
#ifdef CONFIG_HAVE_RCU_TABLE_FREE
|
||||
if (!tlb->fullmm)
|
||||
return page_table_free_rcu(tlb, (unsigned long *) pte);
|
||||
#endif
|
||||
page_table_free(tlb->mm, (unsigned long *) pte);
|
||||
}
|
||||
|
||||
@ -125,10 +109,8 @@ static inline void pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd,
|
||||
#ifdef __s390x__
|
||||
if (tlb->mm->context.asce_limit <= (1UL << 31))
|
||||
return;
|
||||
#ifdef CONFIG_HAVE_RCU_TABLE_FREE
|
||||
if (!tlb->fullmm)
|
||||
return tlb_remove_table(tlb, pmd);
|
||||
#endif
|
||||
crst_table_free(tlb->mm, (unsigned long *) pmd);
|
||||
#endif
|
||||
}
|
||||
@ -146,10 +128,8 @@ static inline void pud_free_tlb(struct mmu_gather *tlb, pud_t *pud,
|
||||
#ifdef __s390x__
|
||||
if (tlb->mm->context.asce_limit <= (1UL << 42))
|
||||
return;
|
||||
#ifdef CONFIG_HAVE_RCU_TABLE_FREE
|
||||
if (!tlb->fullmm)
|
||||
return tlb_remove_table(tlb, pud);
|
||||
#endif
|
||||
crst_table_free(tlb->mm, (unsigned long *) pud);
|
||||
#endif
|
||||
}
|
||||
|
@ -474,9 +474,9 @@ ENTRY(startup_kdump)
|
||||
stck __LC_LAST_UPDATE_CLOCK
|
||||
spt 5f-.LPG0(%r13)
|
||||
mvc __LC_LAST_UPDATE_TIMER(8),5f-.LPG0(%r13)
|
||||
xc __LC_STFL_FAC_LIST(8),__LC_STFL_FAC_LIST
|
||||
#ifndef CONFIG_MARCH_G5
|
||||
# check capabilities against MARCH_{G5,Z900,Z990,Z9_109,Z10}
|
||||
xc __LC_STFL_FAC_LIST(8),__LC_STFL_FAC_LIST
|
||||
.insn s,0xb2b10000,__LC_STFL_FAC_LIST # store facility list
|
||||
tm __LC_STFL_FAC_LIST,0x01 # stfle available ?
|
||||
jz 0f
|
||||
|
@ -118,9 +118,10 @@ asmlinkage void do_softirq(void)
|
||||
"a" (__do_softirq)
|
||||
: "0", "1", "2", "3", "4", "5", "14",
|
||||
"cc", "memory" );
|
||||
} else
|
||||
} else {
|
||||
/* We are already on the async stack. */
|
||||
__do_softirq();
|
||||
}
|
||||
}
|
||||
|
||||
local_irq_restore(flags);
|
||||
@ -192,11 +193,12 @@ int unregister_external_interrupt(u16 code, ext_int_handler_t handler)
|
||||
int index = ext_hash(code);
|
||||
|
||||
spin_lock_irqsave(&ext_int_hash_lock, flags);
|
||||
list_for_each_entry_rcu(p, &ext_int_hash[index], entry)
|
||||
list_for_each_entry_rcu(p, &ext_int_hash[index], entry) {
|
||||
if (p->code == code && p->handler == handler) {
|
||||
list_del_rcu(&p->entry);
|
||||
kfree_rcu(p, rcu);
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&ext_int_hash_lock, flags);
|
||||
return 0;
|
||||
}
|
||||
@ -211,9 +213,10 @@ void __irq_entry do_extint(struct pt_regs *regs, struct ext_code ext_code,
|
||||
|
||||
old_regs = set_irq_regs(regs);
|
||||
irq_enter();
|
||||
if (S390_lowcore.int_clock >= S390_lowcore.clock_comparator)
|
||||
if (S390_lowcore.int_clock >= S390_lowcore.clock_comparator) {
|
||||
/* Serve timer interrupts first. */
|
||||
clock_comparator_work();
|
||||
}
|
||||
kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++;
|
||||
if (ext_code.code != 0x1004)
|
||||
__get_cpu_var(s390_idle).nohz_delay = 1;
|
||||
|
@ -178,7 +178,7 @@ static void cpumf_pmu_enable(struct pmu *pmu)
|
||||
err = lcctl(cpuhw->state);
|
||||
if (err) {
|
||||
pr_err("Enabling the performance measuring unit "
|
||||
"failed with rc=%lx\n", err);
|
||||
"failed with rc=%x\n", err);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -203,7 +203,7 @@ static void cpumf_pmu_disable(struct pmu *pmu)
|
||||
err = lcctl(inactive);
|
||||
if (err) {
|
||||
pr_err("Disabling the performance measuring unit "
|
||||
"failed with rc=%lx\n", err);
|
||||
"failed with rc=%x\n", err);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -61,21 +61,14 @@ long probe_kernel_write(void *dst, const void *src, size_t size)
|
||||
return copied < 0 ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Copy memory in real mode (kernel to kernel)
|
||||
*/
|
||||
int memcpy_real(void *dest, void *src, size_t count)
|
||||
static int __memcpy_real(void *dest, void *src, size_t count)
|
||||
{
|
||||
register unsigned long _dest asm("2") = (unsigned long) dest;
|
||||
register unsigned long _len1 asm("3") = (unsigned long) count;
|
||||
register unsigned long _src asm("4") = (unsigned long) src;
|
||||
register unsigned long _len2 asm("5") = (unsigned long) count;
|
||||
unsigned long flags;
|
||||
int rc = -EFAULT;
|
||||
|
||||
if (!count)
|
||||
return 0;
|
||||
flags = __arch_local_irq_stnsm(0xf8UL);
|
||||
asm volatile (
|
||||
"0: mvcle %1,%2,0x0\n"
|
||||
"1: jo 0b\n"
|
||||
@ -86,7 +79,23 @@ int memcpy_real(void *dest, void *src, size_t count)
|
||||
"+d" (_len2), "=m" (*((long *) dest))
|
||||
: "m" (*((long *) src))
|
||||
: "cc", "memory");
|
||||
arch_local_irq_restore(flags);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
* Copy memory in real mode (kernel to kernel)
|
||||
*/
|
||||
int memcpy_real(void *dest, void *src, size_t count)
|
||||
{
|
||||
unsigned long flags;
|
||||
int rc;
|
||||
|
||||
if (!count)
|
||||
return 0;
|
||||
local_irq_save(flags);
|
||||
__arch_local_irq_stnsm(0xfbUL);
|
||||
rc = __memcpy_real(dest, src, count);
|
||||
local_irq_restore(flags);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -678,8 +678,6 @@ void page_table_free(struct mm_struct *mm, unsigned long *table)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HAVE_RCU_TABLE_FREE
|
||||
|
||||
static void __page_table_free_rcu(void *table, unsigned bit)
|
||||
{
|
||||
struct page *page;
|
||||
@ -733,7 +731,66 @@ void __tlb_remove_table(void *_table)
|
||||
free_pages((unsigned long) table, ALLOC_ORDER);
|
||||
}
|
||||
|
||||
#endif
|
||||
static void tlb_remove_table_smp_sync(void *arg)
|
||||
{
|
||||
/* Simply deliver the interrupt */
|
||||
}
|
||||
|
||||
static void tlb_remove_table_one(void *table)
|
||||
{
|
||||
/*
|
||||
* This isn't an RCU grace period and hence the page-tables cannot be
|
||||
* assumed to be actually RCU-freed.
|
||||
*
|
||||
* It is however sufficient for software page-table walkers that rely
|
||||
* on IRQ disabling. See the comment near struct mmu_table_batch.
|
||||
*/
|
||||
smp_call_function(tlb_remove_table_smp_sync, NULL, 1);
|
||||
__tlb_remove_table(table);
|
||||
}
|
||||
|
||||
static void tlb_remove_table_rcu(struct rcu_head *head)
|
||||
{
|
||||
struct mmu_table_batch *batch;
|
||||
int i;
|
||||
|
||||
batch = container_of(head, struct mmu_table_batch, rcu);
|
||||
|
||||
for (i = 0; i < batch->nr; i++)
|
||||
__tlb_remove_table(batch->tables[i]);
|
||||
|
||||
free_page((unsigned long)batch);
|
||||
}
|
||||
|
||||
void tlb_table_flush(struct mmu_gather *tlb)
|
||||
{
|
||||
struct mmu_table_batch **batch = &tlb->batch;
|
||||
|
||||
if (*batch) {
|
||||
__tlb_flush_mm(tlb->mm);
|
||||
call_rcu_sched(&(*batch)->rcu, tlb_remove_table_rcu);
|
||||
*batch = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void tlb_remove_table(struct mmu_gather *tlb, void *table)
|
||||
{
|
||||
struct mmu_table_batch **batch = &tlb->batch;
|
||||
|
||||
if (*batch == NULL) {
|
||||
*batch = (struct mmu_table_batch *)
|
||||
__get_free_page(GFP_NOWAIT | __GFP_NOWARN);
|
||||
if (*batch == NULL) {
|
||||
__tlb_flush_mm(tlb->mm);
|
||||
tlb_remove_table_one(table);
|
||||
return;
|
||||
}
|
||||
(*batch)->nr = 0;
|
||||
}
|
||||
(*batch)->tables[(*batch)->nr++] = table;
|
||||
if ((*batch)->nr == MAX_TABLE_BATCH)
|
||||
tlb_table_flush(tlb);
|
||||
}
|
||||
|
||||
/*
|
||||
* switch on pgstes for its userspace process (for kvm)
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <linux/pm.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/gfp.h>
|
||||
#include <linux/cpu.h>
|
||||
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/tlbflush.h>
|
||||
@ -78,6 +79,8 @@ void __cpuinit leon_callin(void)
|
||||
local_flush_tlb_all();
|
||||
leon_configure_cache_smp();
|
||||
|
||||
notify_cpu_starting(cpuid);
|
||||
|
||||
/* Get our local ticker going. */
|
||||
smp_setup_percpu_timer();
|
||||
|
||||
|
@ -566,15 +566,10 @@ out:
|
||||
|
||||
SYSCALL_DEFINE2(64_munmap, unsigned long, addr, size_t, len)
|
||||
{
|
||||
long ret;
|
||||
|
||||
if (invalid_64bit_range(addr, len))
|
||||
return -EINVAL;
|
||||
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
ret = do_munmap(current->mm, addr, len);
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
return ret;
|
||||
return vm_munmap(addr, len);
|
||||
}
|
||||
|
||||
extern unsigned long do_mremap(unsigned long addr,
|
||||
|
@ -346,12 +346,10 @@ void single_step_once(struct pt_regs *regs)
|
||||
}
|
||||
|
||||
/* allocate a cache line of writable, executable memory */
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
buffer = (void __user *) do_mmap(NULL, 0, 64,
|
||||
buffer = (void __user *) vm_mmap(NULL, 0, 64,
|
||||
PROT_EXEC | PROT_READ | PROT_WRITE,
|
||||
MAP_PRIVATE | MAP_ANONYMOUS,
|
||||
0);
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
|
||||
if (IS_ERR((void __force *)buffer)) {
|
||||
kfree(state);
|
||||
|
@ -119,9 +119,7 @@ static void set_brk(unsigned long start, unsigned long end)
|
||||
end = PAGE_ALIGN(end);
|
||||
if (end <= start)
|
||||
return;
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
do_brk(start, end - start);
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
vm_brk(start, end - start);
|
||||
}
|
||||
|
||||
#ifdef CORE_DUMP
|
||||
@ -332,9 +330,7 @@ static int load_aout_binary(struct linux_binprm *bprm, struct pt_regs *regs)
|
||||
pos = 32;
|
||||
map_size = ex.a_text+ex.a_data;
|
||||
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
error = do_brk(text_addr & PAGE_MASK, map_size);
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
error = vm_brk(text_addr & PAGE_MASK, map_size);
|
||||
|
||||
if (error != (text_addr & PAGE_MASK)) {
|
||||
send_sig(SIGKILL, current, 0);
|
||||
@ -373,9 +369,7 @@ static int load_aout_binary(struct linux_binprm *bprm, struct pt_regs *regs)
|
||||
if (!bprm->file->f_op->mmap || (fd_offset & ~PAGE_MASK) != 0) {
|
||||
loff_t pos = fd_offset;
|
||||
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
do_brk(N_TXTADDR(ex), ex.a_text+ex.a_data);
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
vm_brk(N_TXTADDR(ex), ex.a_text+ex.a_data);
|
||||
bprm->file->f_op->read(bprm->file,
|
||||
(char __user *)N_TXTADDR(ex),
|
||||
ex.a_text+ex.a_data, &pos);
|
||||
@ -385,26 +379,22 @@ static int load_aout_binary(struct linux_binprm *bprm, struct pt_regs *regs)
|
||||
goto beyond_if;
|
||||
}
|
||||
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
error = do_mmap(bprm->file, N_TXTADDR(ex), ex.a_text,
|
||||
error = vm_mmap(bprm->file, N_TXTADDR(ex), ex.a_text,
|
||||
PROT_READ | PROT_EXEC,
|
||||
MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE |
|
||||
MAP_EXECUTABLE | MAP_32BIT,
|
||||
fd_offset);
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
|
||||
if (error != N_TXTADDR(ex)) {
|
||||
send_sig(SIGKILL, current, 0);
|
||||
return error;
|
||||
}
|
||||
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
error = do_mmap(bprm->file, N_DATADDR(ex), ex.a_data,
|
||||
error = vm_mmap(bprm->file, N_DATADDR(ex), ex.a_data,
|
||||
PROT_READ | PROT_WRITE | PROT_EXEC,
|
||||
MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE |
|
||||
MAP_EXECUTABLE | MAP_32BIT,
|
||||
fd_offset + ex.a_text);
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
if (error != N_DATADDR(ex)) {
|
||||
send_sig(SIGKILL, current, 0);
|
||||
return error;
|
||||
@ -476,9 +466,7 @@ static int load_aout_library(struct file *file)
|
||||
error_time = jiffies;
|
||||
}
|
||||
#endif
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
do_brk(start_addr, ex.a_text + ex.a_data + ex.a_bss);
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
vm_brk(start_addr, ex.a_text + ex.a_data + ex.a_bss);
|
||||
|
||||
file->f_op->read(file, (char __user *)start_addr,
|
||||
ex.a_text + ex.a_data, &pos);
|
||||
@ -490,12 +478,10 @@ static int load_aout_library(struct file *file)
|
||||
goto out;
|
||||
}
|
||||
/* Now use mmap to map the library into memory. */
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
error = do_mmap(file, start_addr, ex.a_text + ex.a_data,
|
||||
error = vm_mmap(file, start_addr, ex.a_text + ex.a_data,
|
||||
PROT_READ | PROT_WRITE | PROT_EXEC,
|
||||
MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE | MAP_32BIT,
|
||||
N_TXTOFF(ex));
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
retval = error;
|
||||
if (error != start_addr)
|
||||
goto out;
|
||||
@ -503,9 +489,7 @@ static int load_aout_library(struct file *file)
|
||||
len = PAGE_ALIGN(ex.a_text + ex.a_data);
|
||||
bss = ex.a_text + ex.a_data + ex.a_bss;
|
||||
if (bss > len) {
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
error = do_brk(start_addr + len, bss - len);
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
error = vm_brk(start_addr + len, bss - len);
|
||||
retval = error;
|
||||
if (error != start_addr + len)
|
||||
goto out;
|
||||
|
@ -459,17 +459,17 @@ void kvm_pmu_cpuid_update(struct kvm_vcpu *vcpu)
|
||||
pmu->available_event_types = ~entry->ebx & ((1ull << bitmap_len) - 1);
|
||||
|
||||
if (pmu->version == 1) {
|
||||
pmu->global_ctrl = (1 << pmu->nr_arch_gp_counters) - 1;
|
||||
return;
|
||||
pmu->nr_arch_fixed_counters = 0;
|
||||
} else {
|
||||
pmu->nr_arch_fixed_counters = min((int)(entry->edx & 0x1f),
|
||||
X86_PMC_MAX_FIXED);
|
||||
pmu->counter_bitmask[KVM_PMC_FIXED] =
|
||||
((u64)1 << ((entry->edx >> 5) & 0xff)) - 1;
|
||||
}
|
||||
|
||||
pmu->nr_arch_fixed_counters = min((int)(entry->edx & 0x1f),
|
||||
X86_PMC_MAX_FIXED);
|
||||
pmu->counter_bitmask[KVM_PMC_FIXED] =
|
||||
((u64)1 << ((entry->edx >> 5) & 0xff)) - 1;
|
||||
pmu->global_ctrl_mask = ~(((1 << pmu->nr_arch_gp_counters) - 1)
|
||||
| (((1ull << pmu->nr_arch_fixed_counters) - 1)
|
||||
<< X86_PMC_IDX_FIXED));
|
||||
pmu->global_ctrl = ((1 << pmu->nr_arch_gp_counters) - 1) |
|
||||
(((1ull << pmu->nr_arch_fixed_counters) - 1) << X86_PMC_IDX_FIXED);
|
||||
pmu->global_ctrl_mask = ~pmu->global_ctrl;
|
||||
}
|
||||
|
||||
void kvm_pmu_init(struct kvm_vcpu *vcpu)
|
||||
|
@ -2210,9 +2210,12 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data)
|
||||
msr = find_msr_entry(vmx, msr_index);
|
||||
if (msr) {
|
||||
msr->data = data;
|
||||
if (msr - vmx->guest_msrs < vmx->save_nmsrs)
|
||||
if (msr - vmx->guest_msrs < vmx->save_nmsrs) {
|
||||
preempt_disable();
|
||||
kvm_set_shared_msr(msr->index, msr->data,
|
||||
msr->mask);
|
||||
preempt_enable();
|
||||
}
|
||||
break;
|
||||
}
|
||||
ret = kvm_set_msr_common(vcpu, msr_index, data);
|
||||
|
@ -6336,13 +6336,11 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,
|
||||
if (npages && !old.rmap) {
|
||||
unsigned long userspace_addr;
|
||||
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
userspace_addr = do_mmap(NULL, 0,
|
||||
userspace_addr = vm_mmap(NULL, 0,
|
||||
npages * PAGE_SIZE,
|
||||
PROT_READ | PROT_WRITE,
|
||||
map_flags,
|
||||
0);
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
|
||||
if (IS_ERR((void *)userspace_addr))
|
||||
return PTR_ERR((void *)userspace_addr);
|
||||
@ -6366,10 +6364,8 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
|
||||
if (!user_alloc && !old.user_alloc && old.rmap && !npages) {
|
||||
int ret;
|
||||
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
ret = do_munmap(current->mm, old.userspace_addr,
|
||||
ret = vm_munmap(old.userspace_addr,
|
||||
old.npages * PAGE_SIZE);
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
if (ret < 0)
|
||||
printk(KERN_WARNING
|
||||
"kvm_vm_ioctl_set_memory_region: "
|
||||
|
@ -379,8 +379,8 @@ err_out:
|
||||
return;
|
||||
}
|
||||
|
||||
/* Decode moffset16/32/64 */
|
||||
static void __get_moffset(struct insn *insn)
|
||||
/* Decode moffset16/32/64. Return 0 if failed */
|
||||
static int __get_moffset(struct insn *insn)
|
||||
{
|
||||
switch (insn->addr_bytes) {
|
||||
case 2:
|
||||
@ -397,15 +397,19 @@ static void __get_moffset(struct insn *insn)
|
||||
insn->moffset2.value = get_next(int, insn);
|
||||
insn->moffset2.nbytes = 4;
|
||||
break;
|
||||
default: /* opnd_bytes must be modified manually */
|
||||
goto err_out;
|
||||
}
|
||||
insn->moffset1.got = insn->moffset2.got = 1;
|
||||
|
||||
return 1;
|
||||
|
||||
err_out:
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Decode imm v32(Iz) */
|
||||
static void __get_immv32(struct insn *insn)
|
||||
/* Decode imm v32(Iz). Return 0 if failed */
|
||||
static int __get_immv32(struct insn *insn)
|
||||
{
|
||||
switch (insn->opnd_bytes) {
|
||||
case 2:
|
||||
@ -417,14 +421,18 @@ static void __get_immv32(struct insn *insn)
|
||||
insn->immediate.value = get_next(int, insn);
|
||||
insn->immediate.nbytes = 4;
|
||||
break;
|
||||
default: /* opnd_bytes must be modified manually */
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
err_out:
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Decode imm v64(Iv/Ov) */
|
||||
static void __get_immv(struct insn *insn)
|
||||
/* Decode imm v64(Iv/Ov), Return 0 if failed */
|
||||
static int __get_immv(struct insn *insn)
|
||||
{
|
||||
switch (insn->opnd_bytes) {
|
||||
case 2:
|
||||
@ -441,15 +449,18 @@ static void __get_immv(struct insn *insn)
|
||||
insn->immediate2.value = get_next(int, insn);
|
||||
insn->immediate2.nbytes = 4;
|
||||
break;
|
||||
default: /* opnd_bytes must be modified manually */
|
||||
goto err_out;
|
||||
}
|
||||
insn->immediate1.got = insn->immediate2.got = 1;
|
||||
|
||||
return 1;
|
||||
err_out:
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Decode ptr16:16/32(Ap) */
|
||||
static void __get_immptr(struct insn *insn)
|
||||
static int __get_immptr(struct insn *insn)
|
||||
{
|
||||
switch (insn->opnd_bytes) {
|
||||
case 2:
|
||||
@ -462,14 +473,17 @@ static void __get_immptr(struct insn *insn)
|
||||
break;
|
||||
case 8:
|
||||
/* ptr16:64 is not exist (no segment) */
|
||||
return;
|
||||
return 0;
|
||||
default: /* opnd_bytes must be modified manually */
|
||||
goto err_out;
|
||||
}
|
||||
insn->immediate2.value = get_next(unsigned short, insn);
|
||||
insn->immediate2.nbytes = 2;
|
||||
insn->immediate1.got = insn->immediate2.got = 1;
|
||||
|
||||
return 1;
|
||||
err_out:
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -489,7 +503,8 @@ void insn_get_immediate(struct insn *insn)
|
||||
insn_get_displacement(insn);
|
||||
|
||||
if (inat_has_moffset(insn->attr)) {
|
||||
__get_moffset(insn);
|
||||
if (!__get_moffset(insn))
|
||||
goto err_out;
|
||||
goto done;
|
||||
}
|
||||
|
||||
@ -517,16 +532,20 @@ void insn_get_immediate(struct insn *insn)
|
||||
insn->immediate2.nbytes = 4;
|
||||
break;
|
||||
case INAT_IMM_PTR:
|
||||
__get_immptr(insn);
|
||||
if (!__get_immptr(insn))
|
||||
goto err_out;
|
||||
break;
|
||||
case INAT_IMM_VWORD32:
|
||||
__get_immv32(insn);
|
||||
if (!__get_immv32(insn))
|
||||
goto err_out;
|
||||
break;
|
||||
case INAT_IMM_VWORD:
|
||||
__get_immv(insn);
|
||||
if (!__get_immv(insn))
|
||||
goto err_out;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
/* Here, insn must have an immediate, but failed */
|
||||
goto err_out;
|
||||
}
|
||||
if (inat_has_second_immediate(insn->attr)) {
|
||||
insn->immediate2.value = get_next(char, insn);
|
||||
|
@ -174,7 +174,7 @@ sha512_update(struct shash_desc *desc, const u8 *data, unsigned int len)
|
||||
index = sctx->count[0] & 0x7f;
|
||||
|
||||
/* Update number of bytes */
|
||||
if (!(sctx->count[0] += len))
|
||||
if ((sctx->count[0] += len) < len)
|
||||
sctx->count[1]++;
|
||||
|
||||
part_len = 128 - index;
|
||||
|
@ -74,7 +74,8 @@ acpi_status acpi_reset(void)
|
||||
|
||||
/* Check if the reset register is supported */
|
||||
|
||||
if (!reset_reg->address) {
|
||||
if (!(acpi_gbl_FADT.flags & ACPI_FADT_RESET_REGISTER) ||
|
||||
!reset_reg->address) {
|
||||
return_ACPI_STATUS(AE_NOT_EXIST);
|
||||
}
|
||||
|
||||
|
@ -607,8 +607,7 @@ acpi_os_install_interrupt_handler(u32 gsi, acpi_osd_handler handler,
|
||||
|
||||
acpi_irq_handler = handler;
|
||||
acpi_irq_context = context;
|
||||
if (request_threaded_irq(irq, NULL, acpi_irq, IRQF_SHARED, "acpi",
|
||||
acpi_irq)) {
|
||||
if (request_irq(irq, acpi_irq, IRQF_SHARED, "acpi", acpi_irq)) {
|
||||
printk(KERN_ERR PREFIX "SCI (IRQ%d) allocation failed\n", irq);
|
||||
acpi_irq_handler = NULL;
|
||||
return AE_NOT_ACQUIRED;
|
||||
|
@ -23,7 +23,8 @@ void acpi_reboot(void)
|
||||
/* Is the reset register supported? The spec says we should be
|
||||
* checking the bit width and bit offset, but Windows ignores
|
||||
* these fields */
|
||||
/* Ignore also acpi_gbl_FADT.flags.ACPI_FADT_RESET_REGISTER */
|
||||
if (!(acpi_gbl_FADT.flags & ACPI_FADT_RESET_REGISTER))
|
||||
return;
|
||||
|
||||
reset_value = acpi_gbl_FADT.reset_value;
|
||||
|
||||
|
@ -329,6 +329,8 @@ static const struct pci_device_id piix_pci_tbl[] = {
|
||||
{ 0x8086, 0x8c08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
|
||||
/* SATA Controller IDE (Lynx Point) */
|
||||
{ 0x8086, 0x8c09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
|
||||
/* SATA Controller IDE (DH89xxCC) */
|
||||
{ 0x8086, 0x2326, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
|
||||
{ } /* terminate list */
|
||||
};
|
||||
|
||||
|
@ -95,7 +95,7 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev);
|
||||
static void ata_dev_xfermask(struct ata_device *dev);
|
||||
static unsigned long ata_dev_blacklisted(const struct ata_device *dev);
|
||||
|
||||
unsigned int ata_print_id = 1;
|
||||
atomic_t ata_print_id = ATOMIC_INIT(1);
|
||||
|
||||
struct ata_force_param {
|
||||
const char *name;
|
||||
@ -6029,7 +6029,7 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
|
||||
|
||||
/* give ports names and add SCSI hosts */
|
||||
for (i = 0; i < host->n_ports; i++)
|
||||
host->ports[i]->print_id = ata_print_id++;
|
||||
host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
|
||||
|
||||
|
||||
/* Create associated sysfs transport objects */
|
||||
|
@ -3843,7 +3843,7 @@ int ata_sas_async_port_init(struct ata_port *ap)
|
||||
int rc = ap->ops->port_start(ap);
|
||||
|
||||
if (!rc) {
|
||||
ap->print_id = ata_print_id++;
|
||||
ap->print_id = atomic_inc_return(&ata_print_id);
|
||||
__ata_port_probe(ap);
|
||||
}
|
||||
|
||||
@ -3867,7 +3867,7 @@ int ata_sas_port_init(struct ata_port *ap)
|
||||
int rc = ap->ops->port_start(ap);
|
||||
|
||||
if (!rc) {
|
||||
ap->print_id = ata_print_id++;
|
||||
ap->print_id = atomic_inc_return(&ata_print_id);
|
||||
rc = ata_port_probe(ap);
|
||||
}
|
||||
|
||||
|
@ -294,6 +294,7 @@ int ata_tport_add(struct device *parent,
|
||||
device_enable_async_suspend(dev);
|
||||
pm_runtime_set_active(dev);
|
||||
pm_runtime_enable(dev);
|
||||
pm_runtime_forbid(dev);
|
||||
|
||||
transport_add_device(dev);
|
||||
transport_configure_device(dev);
|
||||
|
@ -53,7 +53,7 @@ enum {
|
||||
ATA_DNXFER_QUIET = (1 << 31),
|
||||
};
|
||||
|
||||
extern unsigned int ata_print_id;
|
||||
extern atomic_t ata_print_id;
|
||||
extern int atapi_passthru16;
|
||||
extern int libata_fua;
|
||||
extern int libata_noacpi;
|
||||
|
@ -4025,7 +4025,8 @@ static int mv_platform_probe(struct platform_device *pdev)
|
||||
struct ata_host *host;
|
||||
struct mv_host_priv *hpriv;
|
||||
struct resource *res;
|
||||
int n_ports, rc;
|
||||
int n_ports = 0;
|
||||
int rc;
|
||||
|
||||
ata_print_version_once(&pdev->dev, DRV_VERSION);
|
||||
|
||||
|
@ -375,6 +375,34 @@ static int init_vq(struct virtio_blk *vblk)
|
||||
return err;
|
||||
}
|
||||
|
||||
/*
|
||||
* Legacy naming scheme used for virtio devices. We are stuck with it for
|
||||
* virtio blk but don't ever use it for any new driver.
|
||||
*/
|
||||
static int virtblk_name_format(char *prefix, int index, char *buf, int buflen)
|
||||
{
|
||||
const int base = 'z' - 'a' + 1;
|
||||
char *begin = buf + strlen(prefix);
|
||||
char *end = buf + buflen;
|
||||
char *p;
|
||||
int unit;
|
||||
|
||||
p = end - 1;
|
||||
*p = '\0';
|
||||
unit = base;
|
||||
do {
|
||||
if (p == begin)
|
||||
return -EINVAL;
|
||||
*--p = 'a' + (index % unit);
|
||||
index = (index / unit) - 1;
|
||||
} while (index >= 0);
|
||||
|
||||
memmove(begin, p, end - p);
|
||||
memcpy(buf, prefix, strlen(prefix));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __devinit virtblk_probe(struct virtio_device *vdev)
|
||||
{
|
||||
struct virtio_blk *vblk;
|
||||
@ -443,18 +471,7 @@ static int __devinit virtblk_probe(struct virtio_device *vdev)
|
||||
|
||||
q->queuedata = vblk;
|
||||
|
||||
if (index < 26) {
|
||||
sprintf(vblk->disk->disk_name, "vd%c", 'a' + index % 26);
|
||||
} else if (index < (26 + 1) * 26) {
|
||||
sprintf(vblk->disk->disk_name, "vd%c%c",
|
||||
'a' + index / 26 - 1, 'a' + index % 26);
|
||||
} else {
|
||||
const unsigned int m1 = (index / 26 - 1) / 26 - 1;
|
||||
const unsigned int m2 = (index / 26 - 1) % 26;
|
||||
const unsigned int m3 = index % 26;
|
||||
sprintf(vblk->disk->disk_name, "vd%c%c%c",
|
||||
'a' + m1, 'a' + m2, 'a' + m3);
|
||||
}
|
||||
virtblk_name_format("vd", index, vblk->disk->disk_name, DISK_NAME_LEN);
|
||||
|
||||
vblk->disk->major = major;
|
||||
vblk->disk->first_minor = index_to_minor(index);
|
||||
|
@ -416,7 +416,7 @@ static void xen_blkbk_discard(struct xenbus_transaction xbt, struct backend_info
|
||||
"discard-secure", "%d",
|
||||
blkif->vbd.discard_secure);
|
||||
if (err) {
|
||||
dev_warn(dev-dev, "writing discard-secure (%d)", err);
|
||||
dev_warn(&dev->dev, "writing discard-secure (%d)", err);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/gfp.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <crypto/ctr.h>
|
||||
#include <crypto/des.h>
|
||||
|
@ -124,6 +124,9 @@ struct talitos_private {
|
||||
void __iomem *reg;
|
||||
int irq[2];
|
||||
|
||||
/* SEC global registers lock */
|
||||
spinlock_t reg_lock ____cacheline_aligned;
|
||||
|
||||
/* SEC version geometry (from device tree node) */
|
||||
unsigned int num_channels;
|
||||
unsigned int chfifo_len;
|
||||
@ -412,6 +415,7 @@ static void talitos_done_##name(unsigned long data) \
|
||||
{ \
|
||||
struct device *dev = (struct device *)data; \
|
||||
struct talitos_private *priv = dev_get_drvdata(dev); \
|
||||
unsigned long flags; \
|
||||
\
|
||||
if (ch_done_mask & 1) \
|
||||
flush_channel(dev, 0, 0, 0); \
|
||||
@ -427,8 +431,10 @@ static void talitos_done_##name(unsigned long data) \
|
||||
out: \
|
||||
/* At this point, all completed channels have been processed */ \
|
||||
/* Unmask done interrupts for channels completed later on. */ \
|
||||
spin_lock_irqsave(&priv->reg_lock, flags); \
|
||||
setbits32(priv->reg + TALITOS_IMR, ch_done_mask); \
|
||||
setbits32(priv->reg + TALITOS_IMR_LO, TALITOS_IMR_LO_INIT); \
|
||||
spin_unlock_irqrestore(&priv->reg_lock, flags); \
|
||||
}
|
||||
DEF_TALITOS_DONE(4ch, TALITOS_ISR_4CHDONE)
|
||||
DEF_TALITOS_DONE(ch0_2, TALITOS_ISR_CH_0_2_DONE)
|
||||
@ -619,22 +625,28 @@ static irqreturn_t talitos_interrupt_##name(int irq, void *data) \
|
||||
struct device *dev = data; \
|
||||
struct talitos_private *priv = dev_get_drvdata(dev); \
|
||||
u32 isr, isr_lo; \
|
||||
unsigned long flags; \
|
||||
\
|
||||
spin_lock_irqsave(&priv->reg_lock, flags); \
|
||||
isr = in_be32(priv->reg + TALITOS_ISR); \
|
||||
isr_lo = in_be32(priv->reg + TALITOS_ISR_LO); \
|
||||
/* Acknowledge interrupt */ \
|
||||
out_be32(priv->reg + TALITOS_ICR, isr & (ch_done_mask | ch_err_mask)); \
|
||||
out_be32(priv->reg + TALITOS_ICR_LO, isr_lo); \
|
||||
\
|
||||
if (unlikely((isr & ~TALITOS_ISR_4CHDONE) & ch_err_mask || isr_lo)) \
|
||||
talitos_error(dev, isr, isr_lo); \
|
||||
else \
|
||||
if (unlikely(isr & ch_err_mask || isr_lo)) { \
|
||||
spin_unlock_irqrestore(&priv->reg_lock, flags); \
|
||||
talitos_error(dev, isr & ch_err_mask, isr_lo); \
|
||||
} \
|
||||
else { \
|
||||
if (likely(isr & ch_done_mask)) { \
|
||||
/* mask further done interrupts. */ \
|
||||
clrbits32(priv->reg + TALITOS_IMR, ch_done_mask); \
|
||||
/* done_task will unmask done interrupts at exit */ \
|
||||
tasklet_schedule(&priv->done_task[tlet]); \
|
||||
} \
|
||||
spin_unlock_irqrestore(&priv->reg_lock, flags); \
|
||||
} \
|
||||
\
|
||||
return (isr & (ch_done_mask | ch_err_mask) || isr_lo) ? IRQ_HANDLED : \
|
||||
IRQ_NONE; \
|
||||
@ -2719,6 +2731,8 @@ static int talitos_probe(struct platform_device *ofdev)
|
||||
|
||||
priv->ofdev = ofdev;
|
||||
|
||||
spin_lock_init(&priv->reg_lock);
|
||||
|
||||
err = talitos_probe_irq(ofdev);
|
||||
if (err)
|
||||
goto err_out;
|
||||
|
@ -91,11 +91,10 @@ config DW_DMAC
|
||||
|
||||
config AT_HDMAC
|
||||
tristate "Atmel AHB DMA support"
|
||||
depends on ARCH_AT91SAM9RL || ARCH_AT91SAM9G45
|
||||
depends on ARCH_AT91
|
||||
select DMA_ENGINE
|
||||
help
|
||||
Support the Atmel AHB DMA controller. This can be integrated in
|
||||
chips such as the Atmel AT91SAM9RL.
|
||||
Support the Atmel AHB DMA controller.
|
||||
|
||||
config FSL_DMA
|
||||
tristate "Freescale Elo and Elo Plus DMA support"
|
||||
|
@ -1510,8 +1510,8 @@ int drm_freebufs(struct drm_device *dev, void *data,
|
||||
* \param arg pointer to a drm_buf_map structure.
|
||||
* \return zero on success or a negative number on failure.
|
||||
*
|
||||
* Maps the AGP, SG or PCI buffer region with do_mmap(), and copies information
|
||||
* about each buffer into user space. For PCI buffers, it calls do_mmap() with
|
||||
* Maps the AGP, SG or PCI buffer region with vm_mmap(), and copies information
|
||||
* about each buffer into user space. For PCI buffers, it calls vm_mmap() with
|
||||
* offset equal to 0, which drm_mmap() interpretes as PCI buffers and calls
|
||||
* drm_mmap_dma().
|
||||
*/
|
||||
@ -1553,18 +1553,14 @@ int drm_mapbufs(struct drm_device *dev, void *data,
|
||||
retcode = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
virtual = do_mmap(file_priv->filp, 0, map->size,
|
||||
virtual = vm_mmap(file_priv->filp, 0, map->size,
|
||||
PROT_READ | PROT_WRITE,
|
||||
MAP_SHARED,
|
||||
token);
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
} else {
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
virtual = do_mmap(file_priv->filp, 0, dma->byte_count,
|
||||
virtual = vm_mmap(file_priv->filp, 0, dma->byte_count,
|
||||
PROT_READ | PROT_WRITE,
|
||||
MAP_SHARED, 0);
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
}
|
||||
if (virtual > -1024UL) {
|
||||
/* Real error */
|
||||
|
@ -3335,10 +3335,12 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
|
||||
|
||||
ret = crtc->funcs->page_flip(crtc, fb, e);
|
||||
if (ret) {
|
||||
spin_lock_irqsave(&dev->event_lock, flags);
|
||||
file_priv->event_space += sizeof e->event;
|
||||
spin_unlock_irqrestore(&dev->event_lock, flags);
|
||||
kfree(e);
|
||||
if (page_flip->flags & DRM_MODE_PAGE_FLIP_EVENT) {
|
||||
spin_lock_irqsave(&dev->event_lock, flags);
|
||||
file_priv->event_space += sizeof e->event;
|
||||
spin_unlock_irqrestore(&dev->event_lock, flags);
|
||||
kfree(e);
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
|
@ -507,12 +507,12 @@ int drm_release(struct inode *inode, struct file *filp)
|
||||
|
||||
drm_events_release(file_priv);
|
||||
|
||||
if (dev->driver->driver_features & DRIVER_GEM)
|
||||
drm_gem_release(dev, file_priv);
|
||||
|
||||
if (dev->driver->driver_features & DRIVER_MODESET)
|
||||
drm_fb_release(file_priv);
|
||||
|
||||
if (dev->driver->driver_features & DRIVER_GEM)
|
||||
drm_gem_release(dev, file_priv);
|
||||
|
||||
mutex_lock(&dev->ctxlist_mutex);
|
||||
if (!list_empty(&dev->ctxlist)) {
|
||||
struct drm_ctx_list *pos, *n;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "drmP.h"
|
||||
#include <linux/usb.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
int drm_get_usb_dev(struct usb_interface *interface,
|
||||
const struct usb_device_id *id,
|
||||
@ -114,3 +114,7 @@ void drm_usb_exit(struct drm_driver *driver,
|
||||
usb_deregister(udriver);
|
||||
}
|
||||
EXPORT_SYMBOL(drm_usb_exit);
|
||||
|
||||
MODULE_AUTHOR("David Airlie");
|
||||
MODULE_DESCRIPTION("USB DRM support");
|
||||
MODULE_LICENSE("GPL and additional rights");
|
||||
|
@ -581,10 +581,8 @@ int exynos_drm_gem_mmap_ioctl(struct drm_device *dev, void *data,
|
||||
obj->filp->f_op = &exynos_drm_gem_fops;
|
||||
obj->filp->private_data = obj;
|
||||
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
addr = do_mmap(obj->filp, 0, args->size,
|
||||
addr = vm_mmap(obj->filp, 0, args->size,
|
||||
PROT_READ | PROT_WRITE, MAP_SHARED, 0);
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
|
||||
drm_gem_object_unreference_unlocked(obj);
|
||||
|
||||
|
@ -29,7 +29,6 @@
|
||||
#define __MDFLD_DSI_OUTPUT_H__
|
||||
|
||||
#include <linux/backlight.h>
|
||||
#include <linux/version.h>
|
||||
#include <drm/drmP.h>
|
||||
#include <drm/drm.h>
|
||||
#include <drm/drm_crtc.h>
|
||||
|
@ -129,6 +129,7 @@ static int i810_map_buffer(struct drm_buf *buf, struct drm_file *file_priv)
|
||||
if (buf_priv->currently_mapped == I810_BUF_MAPPED)
|
||||
return -EINVAL;
|
||||
|
||||
/* This is all entirely broken */
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
old_fops = file_priv->filp->f_op;
|
||||
file_priv->filp->f_op = &i810_buffer_fops;
|
||||
@ -157,11 +158,8 @@ static int i810_unmap_buffer(struct drm_buf *buf)
|
||||
if (buf_priv->currently_mapped != I810_BUF_MAPPED)
|
||||
return -EINVAL;
|
||||
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
retcode = do_munmap(current->mm,
|
||||
(unsigned long)buf_priv->virtual,
|
||||
retcode = vm_munmap((unsigned long)buf_priv->virtual,
|
||||
(size_t) buf->total);
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
|
||||
buf_priv->currently_mapped = I810_BUF_UNMAPPED;
|
||||
buf_priv->virtual = NULL;
|
||||
|
@ -1087,11 +1087,9 @@ i915_gem_mmap_ioctl(struct drm_device *dev, void *data,
|
||||
if (obj == NULL)
|
||||
return -ENOENT;
|
||||
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
addr = do_mmap(obj->filp, 0, args->size,
|
||||
addr = vm_mmap(obj->filp, 0, args->size,
|
||||
PROT_READ | PROT_WRITE, MAP_SHARED,
|
||||
args->offset);
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
drm_gem_object_unreference_unlocked(obj);
|
||||
if (IS_ERR((void *)addr))
|
||||
return addr;
|
||||
|
@ -3478,8 +3478,11 @@ static bool intel_crtc_mode_fixup(struct drm_crtc *crtc,
|
||||
return false;
|
||||
}
|
||||
|
||||
/* All interlaced capable intel hw wants timings in frames. */
|
||||
drm_mode_set_crtcinfo(adjusted_mode, 0);
|
||||
/* All interlaced capable intel hw wants timings in frames. Note though
|
||||
* that intel_lvds_mode_fixup does some funny tricks with the crtc
|
||||
* timings, so we need to be careful not to clobber these.*/
|
||||
if (!(adjusted_mode->private_flags & INTEL_MODE_CRTC_TIMINGS_SET))
|
||||
drm_mode_set_crtcinfo(adjusted_mode, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -7465,7 +7468,13 @@ static int intel_gen6_queue_flip(struct drm_device *dev,
|
||||
OUT_RING(fb->pitches[0] | obj->tiling_mode);
|
||||
OUT_RING(obj->gtt_offset);
|
||||
|
||||
pf = I915_READ(PF_CTL(intel_crtc->pipe)) & PF_ENABLE;
|
||||
/* Contrary to the suggestions in the documentation,
|
||||
* "Enable Panel Fitter" does not seem to be required when page
|
||||
* flipping with a non-native mode, and worse causes a normal
|
||||
* modeset to fail.
|
||||
* pf = I915_READ(PF_CTL(intel_crtc->pipe)) & PF_ENABLE;
|
||||
*/
|
||||
pf = 0;
|
||||
pipesrc = I915_READ(PIPESRC(intel_crtc->pipe)) & 0x0fff0fff;
|
||||
OUT_RING(pf | pipesrc);
|
||||
ADVANCE_LP_RING();
|
||||
|
@ -105,6 +105,10 @@
|
||||
#define INTEL_MODE_PIXEL_MULTIPLIER_SHIFT (0x0)
|
||||
#define INTEL_MODE_PIXEL_MULTIPLIER_MASK (0xf << INTEL_MODE_PIXEL_MULTIPLIER_SHIFT)
|
||||
#define INTEL_MODE_DP_FORCE_6BPC (0x10)
|
||||
/* This flag must be set by the encoder's mode_fixup if it changes the crtc
|
||||
* timings in the mode to prevent the crtc fixup from overwriting them.
|
||||
* Currently only lvds needs that. */
|
||||
#define INTEL_MODE_CRTC_TIMINGS_SET (0x20)
|
||||
|
||||
static inline void
|
||||
intel_mode_set_pixel_multiplier(struct drm_display_mode *mode,
|
||||
|
@ -279,6 +279,8 @@ void intel_fb_restore_mode(struct drm_device *dev)
|
||||
struct drm_mode_config *config = &dev->mode_config;
|
||||
struct drm_plane *plane;
|
||||
|
||||
mutex_lock(&dev->mode_config.mutex);
|
||||
|
||||
ret = drm_fb_helper_restore_fbdev_mode(&dev_priv->fbdev->helper);
|
||||
if (ret)
|
||||
DRM_DEBUG("failed to restore crtc mode\n");
|
||||
@ -286,4 +288,6 @@ void intel_fb_restore_mode(struct drm_device *dev)
|
||||
/* Be sure to shut off any planes that may be active */
|
||||
list_for_each_entry(plane, &config->plane_list, head)
|
||||
plane->funcs->disable_plane(plane);
|
||||
|
||||
mutex_unlock(&dev->mode_config.mutex);
|
||||
}
|
||||
|
@ -187,6 +187,8 @@ centre_horizontally(struct drm_display_mode *mode,
|
||||
|
||||
mode->crtc_hsync_start = mode->crtc_hblank_start + sync_pos;
|
||||
mode->crtc_hsync_end = mode->crtc_hsync_start + sync_width;
|
||||
|
||||
mode->private_flags |= INTEL_MODE_CRTC_TIMINGS_SET;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -208,6 +210,8 @@ centre_vertically(struct drm_display_mode *mode,
|
||||
|
||||
mode->crtc_vsync_start = mode->crtc_vblank_start + sync_pos;
|
||||
mode->crtc_vsync_end = mode->crtc_vsync_start + sync_width;
|
||||
|
||||
mode->private_flags |= INTEL_MODE_CRTC_TIMINGS_SET;
|
||||
}
|
||||
|
||||
static inline u32 panel_fitter_scaling(u32 source, u32 target)
|
||||
@ -283,6 +287,8 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder,
|
||||
for_each_pipe(pipe)
|
||||
I915_WRITE(BCLRPAT(pipe), 0);
|
||||
|
||||
drm_mode_set_crtcinfo(adjusted_mode, 0);
|
||||
|
||||
switch (intel_lvds->fitting_mode) {
|
||||
case DRM_MODE_SCALE_CENTER:
|
||||
/*
|
||||
|
@ -47,8 +47,6 @@ intel_fixed_panel_mode(struct drm_display_mode *fixed_mode,
|
||||
adjusted_mode->vtotal = fixed_mode->vtotal;
|
||||
|
||||
adjusted_mode->clock = fixed_mode->clock;
|
||||
|
||||
drm_mode_set_crtcinfo(adjusted_mode, 0);
|
||||
}
|
||||
|
||||
/* adjusted_mode has been preset to be the panel's fixed mode */
|
||||
|
@ -235,6 +235,7 @@ nouveau_pm_profile_set(struct drm_device *dev, const char *profile)
|
||||
return -EPERM;
|
||||
|
||||
strncpy(string, profile, sizeof(string));
|
||||
string[sizeof(string) - 1] = 0;
|
||||
if ((ptr = strchr(string, '\n')))
|
||||
*ptr = '\0';
|
||||
|
||||
|
@ -42,7 +42,7 @@ nv50_sor_dp_lane_map(struct drm_device *dev, struct dcb_entry *dcb, u8 lane)
|
||||
struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
static const u8 nvaf[] = { 24, 16, 8, 0 }; /* thanks, apple.. */
|
||||
static const u8 nv50[] = { 16, 8, 0, 24 };
|
||||
if (dev_priv->card_type == 0xaf)
|
||||
if (dev_priv->chipset == 0xaf)
|
||||
return nvaf[lane];
|
||||
return nv50[lane];
|
||||
}
|
||||
|
@ -1135,7 +1135,7 @@ static void r600_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc
|
||||
}
|
||||
if (rdev->flags & RADEON_IS_AGP) {
|
||||
size_bf = mc->gtt_start;
|
||||
size_af = 0xFFFFFFFF - mc->gtt_end + 1;
|
||||
size_af = 0xFFFFFFFF - mc->gtt_end;
|
||||
if (size_bf > size_af) {
|
||||
if (mc->mc_vram_size > size_bf) {
|
||||
dev_warn(rdev->dev, "limiting VRAM\n");
|
||||
@ -1149,7 +1149,7 @@ static void r600_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc
|
||||
mc->real_vram_size = size_af;
|
||||
mc->mc_vram_size = size_af;
|
||||
}
|
||||
mc->vram_start = mc->gtt_end;
|
||||
mc->vram_start = mc->gtt_end + 1;
|
||||
}
|
||||
mc->vram_end = mc->vram_start + mc->mc_vram_size - 1;
|
||||
dev_info(rdev->dev, "VRAM: %lluM 0x%08llX - 0x%08llX (%lluM used)\n",
|
||||
|
@ -970,7 +970,7 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
|
||||
|
||||
encoder = obj_to_encoder(obj);
|
||||
|
||||
if (encoder->encoder_type != DRM_MODE_ENCODER_DAC ||
|
||||
if (encoder->encoder_type != DRM_MODE_ENCODER_DAC &&
|
||||
encoder->encoder_type != DRM_MODE_ENCODER_TVDAC)
|
||||
continue;
|
||||
|
||||
@ -1000,6 +1000,7 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
|
||||
* cases the DVI port is actually a virtual KVM port connected to the service
|
||||
* processor.
|
||||
*/
|
||||
out:
|
||||
if ((!rdev->is_atom_bios) &&
|
||||
(ret == connector_status_disconnected) &&
|
||||
rdev->mode_info.bios_hardcoded_edid_size) {
|
||||
@ -1007,7 +1008,6 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
|
||||
ret = connector_status_connected;
|
||||
}
|
||||
|
||||
out:
|
||||
/* updated in get modes as well since we need to know if it's analog or digital */
|
||||
radeon_connector_update_scratch_regs(connector, ret);
|
||||
return ret;
|
||||
|
@ -147,6 +147,12 @@ static bool radeon_msi_ok(struct radeon_device *rdev)
|
||||
(rdev->pdev->subsystem_device == 0x01fd))
|
||||
return true;
|
||||
|
||||
/* RV515 seems to have MSI issues where it loses
|
||||
* MSI rearms occasionally. This leads to lockups and freezes.
|
||||
* disable it by default.
|
||||
*/
|
||||
if (rdev->family == CHIP_RV515)
|
||||
return false;
|
||||
if (rdev->flags & RADEON_IS_IGP) {
|
||||
/* APUs work fine with MSIs */
|
||||
if (rdev->family >= CHIP_PALM)
|
||||
|
@ -969,7 +969,7 @@ void r700_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc)
|
||||
}
|
||||
if (rdev->flags & RADEON_IS_AGP) {
|
||||
size_bf = mc->gtt_start;
|
||||
size_af = 0xFFFFFFFF - mc->gtt_end + 1;
|
||||
size_af = 0xFFFFFFFF - mc->gtt_end;
|
||||
if (size_bf > size_af) {
|
||||
if (mc->mc_vram_size > size_bf) {
|
||||
dev_warn(rdev->dev, "limiting VRAM\n");
|
||||
@ -983,7 +983,7 @@ void r700_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc)
|
||||
mc->real_vram_size = size_af;
|
||||
mc->mc_vram_size = size_af;
|
||||
}
|
||||
mc->vram_start = mc->gtt_end;
|
||||
mc->vram_start = mc->gtt_end + 1;
|
||||
}
|
||||
mc->vram_end = mc->vram_start + mc->mc_vram_size - 1;
|
||||
dev_info(rdev->dev, "VRAM: %lluM 0x%08llX - 0x%08llX (%lluM used)\n",
|
||||
|
@ -2999,8 +2999,8 @@ int si_rlc_init(struct radeon_device *rdev)
|
||||
}
|
||||
r = radeon_bo_pin(rdev->rlc.save_restore_obj, RADEON_GEM_DOMAIN_VRAM,
|
||||
&rdev->rlc.save_restore_gpu_addr);
|
||||
radeon_bo_unreserve(rdev->rlc.save_restore_obj);
|
||||
if (r) {
|
||||
radeon_bo_unreserve(rdev->rlc.save_restore_obj);
|
||||
dev_warn(rdev->dev, "(%d) pin RLC sr bo failed\n", r);
|
||||
si_rlc_fini(rdev);
|
||||
return r;
|
||||
@ -3023,9 +3023,8 @@ int si_rlc_init(struct radeon_device *rdev)
|
||||
}
|
||||
r = radeon_bo_pin(rdev->rlc.clear_state_obj, RADEON_GEM_DOMAIN_VRAM,
|
||||
&rdev->rlc.clear_state_gpu_addr);
|
||||
radeon_bo_unreserve(rdev->rlc.clear_state_obj);
|
||||
if (r) {
|
||||
|
||||
radeon_bo_unreserve(rdev->rlc.clear_state_obj);
|
||||
dev_warn(rdev->dev, "(%d) pin RLC c bo failed\n", r);
|
||||
si_rlc_fini(rdev);
|
||||
return r;
|
||||
|
@ -34,7 +34,7 @@ config HID
|
||||
config HID_BATTERY_STRENGTH
|
||||
bool
|
||||
depends on HID && POWER_SUPPLY && HID = POWER_SUPPLY
|
||||
default y
|
||||
default n
|
||||
|
||||
config HIDRAW
|
||||
bool "/dev/hidraw raw HID device support"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user