Merge branch 'board' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/boards
* 'board' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP: add minimal support for Nokia RM-696 ARM: OMAP: enable Bluetooth on the PandaBoard ARM: OMAP: pandora: add support for backlight and poweroff ARM: OMAP4: board-4430sdp: don't initialize value that is never used ARM: OMAP3: cm-t3517: add EMAC support ARM: OMAP: move generic EMAC init to separate file ARM: OMAP3: RX-51: add explicit mux configuration of tsc2005 control gpios ARM: OMAP: Add omap_reserve functionality (includes sync-up to 3.3-rc6)
This commit is contained in:
commit
c454f81350
|
@ -3780,7 +3780,7 @@ F: Documentation/kdump/
|
|||
|
||||
KERNEL AUTOMOUNTER v4 (AUTOFS4)
|
||||
M: Ian Kent <raven@themaw.net>
|
||||
L: autofs@linux.kernel.org
|
||||
L: autofs@vger.kernel.org
|
||||
S: Maintained
|
||||
F: fs/autofs4/
|
||||
|
||||
|
@ -4685,7 +4685,7 @@ NTFS FILESYSTEM
|
|||
M: Anton Altaparmakov <anton@tuxera.com>
|
||||
L: linux-ntfs-dev@lists.sourceforge.net
|
||||
W: http://www.tuxera.com/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/aia21/ntfs-2.6.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/aia21/ntfs.git
|
||||
S: Supported
|
||||
F: Documentation/filesystems/ntfs.txt
|
||||
F: fs/ntfs/
|
||||
|
@ -7271,7 +7271,7 @@ WATCHDOG DEVICE DRIVERS
|
|||
M: Wim Van Sebroeck <wim@iguana.be>
|
||||
L: linux-watchdog@vger.kernel.org
|
||||
W: http://www.linux-watchdog.org/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
|
||||
T: git git://www.linux-watchdog.org/linux-watchdog.git
|
||||
S: Maintained
|
||||
F: Documentation/watchdog/
|
||||
F: drivers/watchdog/
|
||||
|
|
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
|||
VERSION = 3
|
||||
PATCHLEVEL = 3
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc5
|
||||
EXTRAVERSION = -rc6
|
||||
NAME = Saber-toothed Squirrel
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
*/
|
||||
#define IRQ_LPC32XX_JTAG_COMM_TX LPC32XX_SIC1_IRQ(1)
|
||||
#define IRQ_LPC32XX_JTAG_COMM_RX LPC32XX_SIC1_IRQ(2)
|
||||
#define IRQ_LPC32XX_GPI_11 LPC32XX_SIC1_IRQ(4)
|
||||
#define IRQ_LPC32XX_GPI_28 LPC32XX_SIC1_IRQ(4)
|
||||
#define IRQ_LPC32XX_TS_P LPC32XX_SIC1_IRQ(6)
|
||||
#define IRQ_LPC32XX_TS_IRQ LPC32XX_SIC1_IRQ(7)
|
||||
#define IRQ_LPC32XX_TS_AUX LPC32XX_SIC1_IRQ(8)
|
||||
|
|
|
@ -118,6 +118,10 @@ static const struct lpc32xx_event_info lpc32xx_events[NR_IRQS] = {
|
|||
.event_group = &lpc32xx_event_pin_regs,
|
||||
.mask = LPC32XX_CLKPWR_EXTSRC_GPI_06_BIT,
|
||||
},
|
||||
[IRQ_LPC32XX_GPI_28] = {
|
||||
.event_group = &lpc32xx_event_pin_regs,
|
||||
.mask = LPC32XX_CLKPWR_EXTSRC_GPI_28_BIT,
|
||||
},
|
||||
[IRQ_LPC32XX_GPIO_00] = {
|
||||
.event_group = &lpc32xx_event_int_regs,
|
||||
.mask = LPC32XX_CLKPWR_INTSRC_GPIO_00_BIT,
|
||||
|
@ -305,9 +309,18 @@ static int lpc32xx_irq_wake(struct irq_data *d, unsigned int state)
|
|||
|
||||
if (state)
|
||||
eventreg |= lpc32xx_events[d->irq].mask;
|
||||
else
|
||||
else {
|
||||
eventreg &= ~lpc32xx_events[d->irq].mask;
|
||||
|
||||
/*
|
||||
* When disabling the wakeup, clear the latched
|
||||
* event
|
||||
*/
|
||||
__raw_writel(lpc32xx_events[d->irq].mask,
|
||||
lpc32xx_events[d->irq].
|
||||
event_group->rawstat_reg);
|
||||
}
|
||||
|
||||
__raw_writel(eventreg,
|
||||
lpc32xx_events[d->irq].event_group->enab_reg);
|
||||
|
||||
|
@ -380,13 +393,15 @@ void __init lpc32xx_init_irq(void)
|
|||
|
||||
/* Setup SIC1 */
|
||||
__raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_SIC1_BASE));
|
||||
__raw_writel(MIC_APR_DEFAULT, LPC32XX_INTC_POLAR(LPC32XX_SIC1_BASE));
|
||||
__raw_writel(MIC_ATR_DEFAULT, LPC32XX_INTC_ACT_TYPE(LPC32XX_SIC1_BASE));
|
||||
__raw_writel(SIC1_APR_DEFAULT, LPC32XX_INTC_POLAR(LPC32XX_SIC1_BASE));
|
||||
__raw_writel(SIC1_ATR_DEFAULT,
|
||||
LPC32XX_INTC_ACT_TYPE(LPC32XX_SIC1_BASE));
|
||||
|
||||
/* Setup SIC2 */
|
||||
__raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_SIC2_BASE));
|
||||
__raw_writel(MIC_APR_DEFAULT, LPC32XX_INTC_POLAR(LPC32XX_SIC2_BASE));
|
||||
__raw_writel(MIC_ATR_DEFAULT, LPC32XX_INTC_ACT_TYPE(LPC32XX_SIC2_BASE));
|
||||
__raw_writel(SIC2_APR_DEFAULT, LPC32XX_INTC_POLAR(LPC32XX_SIC2_BASE));
|
||||
__raw_writel(SIC2_ATR_DEFAULT,
|
||||
LPC32XX_INTC_ACT_TYPE(LPC32XX_SIC2_BASE));
|
||||
|
||||
/* Configure supported IRQ's */
|
||||
for (i = 0; i < NR_IRQS; i++) {
|
||||
|
|
|
@ -88,6 +88,7 @@ struct uartinit {
|
|||
char *uart_ck_name;
|
||||
u32 ck_mode_mask;
|
||||
void __iomem *pdiv_clk_reg;
|
||||
resource_size_t mapbase;
|
||||
};
|
||||
|
||||
static struct uartinit uartinit_data[] __initdata = {
|
||||
|
@ -97,6 +98,7 @@ static struct uartinit uartinit_data[] __initdata = {
|
|||
.ck_mode_mask =
|
||||
LPC32XX_UART_CLKMODE_LOAD(LPC32XX_UART_CLKMODE_ON, 5),
|
||||
.pdiv_clk_reg = LPC32XX_CLKPWR_UART5_CLK_CTRL,
|
||||
.mapbase = LPC32XX_UART5_BASE,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_LPC32XX_UART3_SELECT
|
||||
|
@ -105,6 +107,7 @@ static struct uartinit uartinit_data[] __initdata = {
|
|||
.ck_mode_mask =
|
||||
LPC32XX_UART_CLKMODE_LOAD(LPC32XX_UART_CLKMODE_ON, 3),
|
||||
.pdiv_clk_reg = LPC32XX_CLKPWR_UART3_CLK_CTRL,
|
||||
.mapbase = LPC32XX_UART3_BASE,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_LPC32XX_UART4_SELECT
|
||||
|
@ -113,6 +116,7 @@ static struct uartinit uartinit_data[] __initdata = {
|
|||
.ck_mode_mask =
|
||||
LPC32XX_UART_CLKMODE_LOAD(LPC32XX_UART_CLKMODE_ON, 4),
|
||||
.pdiv_clk_reg = LPC32XX_CLKPWR_UART4_CLK_CTRL,
|
||||
.mapbase = LPC32XX_UART4_BASE,
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_LPC32XX_UART6_SELECT
|
||||
|
@ -121,6 +125,7 @@ static struct uartinit uartinit_data[] __initdata = {
|
|||
.ck_mode_mask =
|
||||
LPC32XX_UART_CLKMODE_LOAD(LPC32XX_UART_CLKMODE_ON, 6),
|
||||
.pdiv_clk_reg = LPC32XX_CLKPWR_UART6_CLK_CTRL,
|
||||
.mapbase = LPC32XX_UART6_BASE,
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
@ -165,11 +170,24 @@ void __init lpc32xx_serial_init(void)
|
|||
|
||||
/* pre-UART clock divider set to 1 */
|
||||
__raw_writel(0x0101, uartinit_data[i].pdiv_clk_reg);
|
||||
|
||||
/*
|
||||
* Force a flush of the RX FIFOs to work around a
|
||||
* HW bug
|
||||
*/
|
||||
puart = uartinit_data[i].mapbase;
|
||||
__raw_writel(0xC1, LPC32XX_UART_IIR_FCR(puart));
|
||||
__raw_writel(0x00, LPC32XX_UART_DLL_FIFO(puart));
|
||||
j = LPC32XX_SUART_FIFO_SIZE;
|
||||
while (j--)
|
||||
tmp = __raw_readl(
|
||||
LPC32XX_UART_DLL_FIFO(puart));
|
||||
__raw_writel(0, LPC32XX_UART_IIR_FCR(puart));
|
||||
}
|
||||
|
||||
/* This needs to be done after all UART clocks are setup */
|
||||
__raw_writel(clkmodes, LPC32XX_UARTCTL_CLKMODE);
|
||||
for (i = 0; i < ARRAY_SIZE(uartinit_data) - 1; i++) {
|
||||
for (i = 0; i < ARRAY_SIZE(uartinit_data); i++) {
|
||||
/* Force a flush of the RX FIFOs to work around a HW bug */
|
||||
puart = serial_std_platform_data[i].mapbase;
|
||||
__raw_writel(0xC1, LPC32XX_UART_IIR_FCR(puart));
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/mtd/nand.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include <mach/dma.h>
|
||||
#include <mach/devices.h>
|
||||
#include <mach/mfp.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <mach/pxa168.h>
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/smc91x.h>
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
|
|
|
@ -416,13 +416,13 @@ static void __init innovator_init(void)
|
|||
#ifdef CONFIG_ARCH_OMAP15XX
|
||||
if (cpu_is_omap1510()) {
|
||||
omap1_usb_init(&innovator1510_usb_config);
|
||||
innovator_config[1].data = &innovator1510_lcd_config;
|
||||
innovator_config[0].data = &innovator1510_lcd_config;
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_OMAP16XX
|
||||
if (cpu_is_omap1610()) {
|
||||
omap1_usb_init(&h2_usb_config);
|
||||
innovator_config[1].data = &innovator1610_lcd_config;
|
||||
innovator_config[0].data = &innovator1610_lcd_config;
|
||||
}
|
||||
#endif
|
||||
omap_board_config = innovator_config;
|
||||
|
|
|
@ -245,10 +245,11 @@ config MACH_NOKIA_N8X0
|
|||
select MACH_NOKIA_N810_WIMAX
|
||||
|
||||
config MACH_NOKIA_RM680
|
||||
bool "Nokia RM-680 board"
|
||||
bool "Nokia RM-680/696 board"
|
||||
depends on ARCH_OMAP3
|
||||
default y
|
||||
select OMAP_PACKAGE_CBB
|
||||
select MACH_NOKIA_RM696
|
||||
|
||||
config MACH_NOKIA_RX51
|
||||
bool "Nokia RX-51 board"
|
||||
|
@ -364,8 +365,8 @@ config OMAP3_SDRC_AC_TIMING
|
|||
going on could result in system crashes;
|
||||
|
||||
config OMAP4_ERRATA_I688
|
||||
bool "OMAP4 errata: Async Bridge Corruption (BROKEN)"
|
||||
depends on ARCH_OMAP4 && BROKEN
|
||||
bool "OMAP4 errata: Async Bridge Corruption"
|
||||
depends on ARCH_OMAP4
|
||||
select ARCH_HAS_BARRIERS
|
||||
help
|
||||
If a data is stalled inside asynchronous bridge because of back
|
||||
|
|
|
@ -270,4 +270,7 @@ smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o
|
|||
obj-y += $(smsc911x-m) $(smsc911x-y)
|
||||
obj-$(CONFIG_ARCH_OMAP4) += hwspinlock.o
|
||||
|
||||
emac-$(CONFIG_TI_DAVINCI_EMAC) := am35xx-emac.o
|
||||
obj-y += $(emac-m) $(emac-y)
|
||||
|
||||
obj-y += common-board-devices.o twl-common.o
|
||||
|
|
|
@ -0,0 +1,117 @@
|
|||
/*
|
||||
* Copyright (C) 2011 Ilya Yanok, Emcraft Systems
|
||||
*
|
||||
* Based on mach-omap2/board-am3517evm.c
|
||||
* Copyright (C) 2009 Texas Instruments Incorporated
|
||||
* Author: Ranjith Lohithakshan <ranjithl@ti.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,
|
||||
* whether express or implied; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/davinci_emac.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <plat/irqs.h>
|
||||
#include <mach/am35xx.h>
|
||||
|
||||
#include "control.h"
|
||||
|
||||
static struct mdio_platform_data am35xx_emac_mdio_pdata;
|
||||
|
||||
static struct resource am35xx_emac_mdio_resources[] = {
|
||||
DEFINE_RES_MEM(AM35XX_IPSS_EMAC_BASE + AM35XX_EMAC_MDIO_OFFSET, SZ_4K),
|
||||
};
|
||||
|
||||
static struct platform_device am35xx_emac_mdio_device = {
|
||||
.name = "davinci_mdio",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(am35xx_emac_mdio_resources),
|
||||
.resource = am35xx_emac_mdio_resources,
|
||||
.dev.platform_data = &am35xx_emac_mdio_pdata,
|
||||
};
|
||||
|
||||
static void am35xx_enable_emac_int(void)
|
||||
{
|
||||
u32 regval;
|
||||
|
||||
regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
|
||||
regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR |
|
||||
AM35XX_CPGMAC_C0_TX_PULSE_CLR |
|
||||
AM35XX_CPGMAC_C0_MISC_PULSE_CLR |
|
||||
AM35XX_CPGMAC_C0_RX_THRESH_CLR);
|
||||
omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR);
|
||||
regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
|
||||
}
|
||||
|
||||
static void am35xx_disable_emac_int(void)
|
||||
{
|
||||
u32 regval;
|
||||
|
||||
regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
|
||||
regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR |
|
||||
AM35XX_CPGMAC_C0_TX_PULSE_CLR);
|
||||
omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR);
|
||||
regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
|
||||
}
|
||||
|
||||
static struct emac_platform_data am35xx_emac_pdata = {
|
||||
.ctrl_reg_offset = AM35XX_EMAC_CNTRL_OFFSET,
|
||||
.ctrl_mod_reg_offset = AM35XX_EMAC_CNTRL_MOD_OFFSET,
|
||||
.ctrl_ram_offset = AM35XX_EMAC_CNTRL_RAM_OFFSET,
|
||||
.ctrl_ram_size = AM35XX_EMAC_CNTRL_RAM_SIZE,
|
||||
.hw_ram_addr = AM35XX_EMAC_HW_RAM_ADDR,
|
||||
.version = EMAC_VERSION_2,
|
||||
.interrupt_enable = am35xx_enable_emac_int,
|
||||
.interrupt_disable = am35xx_disable_emac_int,
|
||||
};
|
||||
|
||||
static struct resource am35xx_emac_resources[] = {
|
||||
DEFINE_RES_MEM(AM35XX_IPSS_EMAC_BASE, 0x30000),
|
||||
DEFINE_RES_IRQ(INT_35XX_EMAC_C0_RXTHRESH_IRQ),
|
||||
DEFINE_RES_IRQ(INT_35XX_EMAC_C0_RX_PULSE_IRQ),
|
||||
DEFINE_RES_IRQ(INT_35XX_EMAC_C0_TX_PULSE_IRQ),
|
||||
DEFINE_RES_IRQ(INT_35XX_EMAC_C0_MISC_PULSE_IRQ),
|
||||
};
|
||||
|
||||
static struct platform_device am35xx_emac_device = {
|
||||
.name = "davinci_emac",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(am35xx_emac_resources),
|
||||
.resource = am35xx_emac_resources,
|
||||
.dev = {
|
||||
.platform_data = &am35xx_emac_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
void __init am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en)
|
||||
{
|
||||
unsigned int regval;
|
||||
int err;
|
||||
|
||||
am35xx_emac_pdata.rmii_en = rmii_en;
|
||||
am35xx_emac_mdio_pdata.bus_freq = mdio_bus_freq;
|
||||
err = platform_device_register(&am35xx_emac_device);
|
||||
if (err) {
|
||||
pr_err("AM35x: failed registering EMAC device: %d\n", err);
|
||||
return;
|
||||
}
|
||||
|
||||
err = platform_device_register(&am35xx_emac_mdio_device);
|
||||
if (err) {
|
||||
pr_err("AM35x: failed registering EMAC MDIO device: %d\n", err);
|
||||
platform_device_unregister(&am35xx_emac_device);
|
||||
return;
|
||||
}
|
||||
|
||||
regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
|
||||
regval = regval & (~(AM35XX_CPGMACSS_SW_RST));
|
||||
omap_ctrl_writel(regval, AM35XX_CONTROL_IP_SW_RESET);
|
||||
regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
* Copyright (C) 2011 Ilya Yanok, Emcraft Systems
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#define AM35XX_DEFAULT_MDIO_FREQUENCY 1000000
|
||||
|
||||
#if defined(CONFIG_TI_DAVINCI_EMAC) || defined(CONFIG_TI_DAVINCI_EMAC_MODULE)
|
||||
void am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en);
|
||||
#else
|
||||
static inline void am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en) {}
|
||||
#endif
|
|
@ -322,7 +322,10 @@ static struct spi_board_info sdp4430_spi_board_info[] __initdata = {
|
|||
.bus_num = 1,
|
||||
.chip_select = 0,
|
||||
.max_speed_hz = 24000000,
|
||||
.irq = ETH_KS8851_IRQ,
|
||||
/*
|
||||
* .irq is set to gpio_to_irq(ETH_KS8851_IRQ)
|
||||
* in omap_4430sdp_init
|
||||
*/
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -39,124 +39,11 @@
|
|||
#include <video/omap-panel-generic-dpi.h>
|
||||
#include <video/omap-panel-dvi.h>
|
||||
|
||||
#include "am35xx-emac.h"
|
||||
#include "mux.h"
|
||||
#include "control.h"
|
||||
#include "hsmmc.h"
|
||||
|
||||
#define AM35XX_EVM_MDIO_FREQUENCY (1000000)
|
||||
|
||||
static struct mdio_platform_data am3517_evm_mdio_pdata = {
|
||||
.bus_freq = AM35XX_EVM_MDIO_FREQUENCY,
|
||||
};
|
||||
|
||||
static struct resource am3517_mdio_resources[] = {
|
||||
{
|
||||
.start = AM35XX_IPSS_EMAC_BASE + AM35XX_EMAC_MDIO_OFFSET,
|
||||
.end = AM35XX_IPSS_EMAC_BASE + AM35XX_EMAC_MDIO_OFFSET +
|
||||
SZ_4K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device am3517_mdio_device = {
|
||||
.name = "davinci_mdio",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(am3517_mdio_resources),
|
||||
.resource = am3517_mdio_resources,
|
||||
.dev.platform_data = &am3517_evm_mdio_pdata,
|
||||
};
|
||||
|
||||
static struct emac_platform_data am3517_evm_emac_pdata = {
|
||||
.rmii_en = 1,
|
||||
};
|
||||
|
||||
static struct resource am3517_emac_resources[] = {
|
||||
{
|
||||
.start = AM35XX_IPSS_EMAC_BASE,
|
||||
.end = AM35XX_IPSS_EMAC_BASE + 0x2FFFF,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = INT_35XX_EMAC_C0_RXTHRESH_IRQ,
|
||||
.end = INT_35XX_EMAC_C0_RXTHRESH_IRQ,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = INT_35XX_EMAC_C0_RX_PULSE_IRQ,
|
||||
.end = INT_35XX_EMAC_C0_RX_PULSE_IRQ,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = INT_35XX_EMAC_C0_TX_PULSE_IRQ,
|
||||
.end = INT_35XX_EMAC_C0_TX_PULSE_IRQ,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
{
|
||||
.start = INT_35XX_EMAC_C0_MISC_PULSE_IRQ,
|
||||
.end = INT_35XX_EMAC_C0_MISC_PULSE_IRQ,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device am3517_emac_device = {
|
||||
.name = "davinci_emac",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(am3517_emac_resources),
|
||||
.resource = am3517_emac_resources,
|
||||
};
|
||||
|
||||
static void am3517_enable_ethernet_int(void)
|
||||
{
|
||||
u32 regval;
|
||||
|
||||
regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
|
||||
regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR |
|
||||
AM35XX_CPGMAC_C0_TX_PULSE_CLR |
|
||||
AM35XX_CPGMAC_C0_MISC_PULSE_CLR |
|
||||
AM35XX_CPGMAC_C0_RX_THRESH_CLR);
|
||||
omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR);
|
||||
regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
|
||||
}
|
||||
|
||||
static void am3517_disable_ethernet_int(void)
|
||||
{
|
||||
u32 regval;
|
||||
|
||||
regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
|
||||
regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR |
|
||||
AM35XX_CPGMAC_C0_TX_PULSE_CLR);
|
||||
omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR);
|
||||
regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
|
||||
}
|
||||
|
||||
static void am3517_evm_ethernet_init(struct emac_platform_data *pdata)
|
||||
{
|
||||
unsigned int regval;
|
||||
|
||||
pdata->ctrl_reg_offset = AM35XX_EMAC_CNTRL_OFFSET;
|
||||
pdata->ctrl_mod_reg_offset = AM35XX_EMAC_CNTRL_MOD_OFFSET;
|
||||
pdata->ctrl_ram_offset = AM35XX_EMAC_CNTRL_RAM_OFFSET;
|
||||
pdata->ctrl_ram_size = AM35XX_EMAC_CNTRL_RAM_SIZE;
|
||||
pdata->version = EMAC_VERSION_2;
|
||||
pdata->hw_ram_addr = AM35XX_EMAC_HW_RAM_ADDR;
|
||||
pdata->interrupt_enable = am3517_enable_ethernet_int;
|
||||
pdata->interrupt_disable = am3517_disable_ethernet_int;
|
||||
am3517_emac_device.dev.platform_data = pdata;
|
||||
platform_device_register(&am3517_emac_device);
|
||||
platform_device_register(&am3517_mdio_device);
|
||||
clk_add_alias(NULL, dev_name(&am3517_mdio_device.dev),
|
||||
NULL, &am3517_emac_device.dev);
|
||||
|
||||
regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
|
||||
regval = regval & (~(AM35XX_CPGMACSS_SW_RST));
|
||||
omap_ctrl_writel(regval, AM35XX_CONTROL_IP_SW_RESET);
|
||||
regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#define LCD_PANEL_PWR 176
|
||||
#define LCD_PANEL_BKLIGHT_PWR 182
|
||||
#define LCD_PANEL_PWM 181
|
||||
|
@ -498,7 +385,7 @@ static void __init am3517_evm_init(void)
|
|||
i2c_register_board_info(1, am3517evm_i2c1_boardinfo,
|
||||
ARRAY_SIZE(am3517evm_i2c1_boardinfo));
|
||||
/*Ethernet*/
|
||||
am3517_evm_ethernet_init(&am3517_evm_emac_pdata);
|
||||
am35xx_emac_init(AM35XX_DEFAULT_MDIO_FREQUENCY, 1);
|
||||
|
||||
/* MUSB */
|
||||
am3517_evm_musb_init();
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#include "mux.h"
|
||||
#include "control.h"
|
||||
#include "common-board-devices.h"
|
||||
#include "am35xx-emac.h"
|
||||
|
||||
#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
|
||||
static struct gpio_led cm_t3517_leds[] = {
|
||||
|
@ -291,6 +292,7 @@ static void __init cm_t3517_init(void)
|
|||
cm_t3517_init_rtc();
|
||||
cm_t3517_init_usbh();
|
||||
cm_t3517_init_hecc();
|
||||
am35xx_emac_init(AM35XX_DEFAULT_MDIO_FREQUENCY, 1);
|
||||
}
|
||||
|
||||
MACHINE_START(CM_T3517, "Compulab CM-T3517")
|
||||
|
|
|
@ -371,7 +371,11 @@ static void n8x0_mmc_callback(void *data, u8 card_mask)
|
|||
else
|
||||
*openp = 0;
|
||||
|
||||
#ifdef CONFIG_MMC_OMAP
|
||||
omap_mmc_notify_cover_event(mmc_device, index, *openp);
|
||||
#else
|
||||
pr_warn("MMC: notify cover event not available\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
static int n8x0_mmc_late_init(struct device *dev)
|
||||
|
|
|
@ -381,7 +381,7 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
|
|||
gpio_request_one(gpio + 7, GPIOF_OUT_INIT_LOW, "EN_DVI");
|
||||
|
||||
/* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
|
||||
gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
|
||||
gpio_leds[0].gpio = gpio + TWL4030_GPIO_MAX + 1;
|
||||
|
||||
platform_device_register(&leds_gpio);
|
||||
|
||||
|
|
|
@ -205,6 +205,7 @@ static void __init omap3logic_init(void)
|
|||
|
||||
MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board")
|
||||
.atag_offset = 0x100,
|
||||
.reserve = omap_reserve,
|
||||
.map_io = omap3_map_io,
|
||||
.init_early = omap35xx_init_early,
|
||||
.init_irq = omap3_init_irq,
|
||||
|
@ -216,6 +217,7 @@ MACHINE_END
|
|||
|
||||
MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board")
|
||||
.atag_offset = 0x100,
|
||||
.reserve = omap_reserve,
|
||||
.map_io = omap3_map_io,
|
||||
.init_early = omap35xx_init_early,
|
||||
.init_irq = omap3_init_irq,
|
||||
|
|
|
@ -121,6 +121,11 @@ static struct platform_device pandora_leds_gpio = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct platform_device pandora_backlight = {
|
||||
.name = "pandora-backlight",
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
#define GPIO_BUTTON(gpio_num, ev_type, ev_code, act_low, descr) \
|
||||
{ \
|
||||
.gpio = gpio_num, \
|
||||
|
@ -476,6 +481,10 @@ static struct platform_device pandora_vwlan_device = {
|
|||
|
||||
static struct twl4030_bci_platform_data pandora_bci_data;
|
||||
|
||||
static struct twl4030_power_data pandora_power_data = {
|
||||
.use_poweroff = true,
|
||||
};
|
||||
|
||||
static struct twl4030_platform_data omap3pandora_twldata = {
|
||||
.gpio = &omap3pandora_gpio_data,
|
||||
.vmmc1 = &pandora_vmmc1,
|
||||
|
@ -486,6 +495,7 @@ static struct twl4030_platform_data omap3pandora_twldata = {
|
|||
.vsim = &pandora_vsim,
|
||||
.keypad = &pandora_kp_data,
|
||||
.bci = &pandora_bci_data,
|
||||
.power = &pandora_power_data,
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata omap3pandora_i2c3_boardinfo[] = {
|
||||
|
@ -557,6 +567,7 @@ static struct platform_device *omap3pandora_devices[] __initdata = {
|
|||
&pandora_leds_gpio,
|
||||
&pandora_keys_gpio,
|
||||
&pandora_vwlan_device,
|
||||
&pandora_backlight,
|
||||
};
|
||||
|
||||
static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
|
||||
|
|
|
@ -91,9 +91,15 @@ static struct platform_device leds_gpio = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct platform_device btwilink_device = {
|
||||
.name = "btwilink",
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
static struct platform_device *panda_devices[] __initdata = {
|
||||
&leds_gpio,
|
||||
&wl1271_device,
|
||||
&btwilink_device,
|
||||
};
|
||||
|
||||
static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Board support file for Nokia RM-680.
|
||||
* Board support file for Nokia RM-680/696.
|
||||
*
|
||||
* Copyright (C) 2010 Nokia
|
||||
*
|
||||
|
@ -154,3 +154,15 @@ MACHINE_START(NOKIA_RM680, "Nokia RM-680 board")
|
|||
.timer = &omap3_timer,
|
||||
.restart = omap_prcm_restart,
|
||||
MACHINE_END
|
||||
|
||||
MACHINE_START(NOKIA_RM696, "Nokia RM-696 board")
|
||||
.atag_offset = 0x100,
|
||||
.reserve = omap_reserve,
|
||||
.map_io = omap3_map_io,
|
||||
.init_early = omap3630_init_early,
|
||||
.init_irq = omap3_init_irq,
|
||||
.handle_irq = omap3_intc_handle_irq,
|
||||
.init_machine = rm680_init,
|
||||
.timer = &omap3_timer,
|
||||
.restart = omap_prcm_restart,
|
||||
MACHINE_END
|
||||
|
|
|
@ -1105,6 +1105,11 @@ static struct tsc2005_platform_data tsc2005_pdata = {
|
|||
.esd_timeout_ms = 8000,
|
||||
};
|
||||
|
||||
static struct gpio rx51_tsc2005_gpios[] __initdata = {
|
||||
{ RX51_TSC2005_IRQ_GPIO, GPIOF_IN, "tsc2005 IRQ" },
|
||||
{ RX51_TSC2005_RESET_GPIO, GPIOF_OUT_INIT_HIGH, "tsc2005 reset" },
|
||||
};
|
||||
|
||||
static void rx51_tsc2005_set_reset(bool enable)
|
||||
{
|
||||
gpio_set_value(RX51_TSC2005_RESET_GPIO, enable);
|
||||
|
@ -1114,20 +1119,18 @@ static void __init rx51_init_tsc2005(void)
|
|||
{
|
||||
int r;
|
||||
|
||||
r = gpio_request_one(RX51_TSC2005_IRQ_GPIO, GPIOF_IN, "tsc2005 IRQ");
|
||||
omap_mux_init_gpio(RX51_TSC2005_RESET_GPIO, OMAP_PIN_OUTPUT);
|
||||
omap_mux_init_gpio(RX51_TSC2005_IRQ_GPIO, OMAP_PIN_INPUT_PULLUP);
|
||||
|
||||
r = gpio_request_array(rx51_tsc2005_gpios,
|
||||
ARRAY_SIZE(rx51_tsc2005_gpios));
|
||||
if (r < 0) {
|
||||
printk(KERN_ERR "unable to get %s GPIO\n", "tsc2005 IRQ");
|
||||
rx51_peripherals_spi_board_info[RX51_SPI_TSC2005].irq = 0;
|
||||
printk(KERN_ERR "tsc2005 board initialization failed\n");
|
||||
tsc2005_pdata.esd_timeout_ms = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
r = gpio_request_one(RX51_TSC2005_RESET_GPIO, GPIOF_OUT_INIT_HIGH,
|
||||
"tsc2005 reset");
|
||||
if (r >= 0) {
|
||||
tsc2005_pdata.set_reset = rx51_tsc2005_set_reset;
|
||||
} else {
|
||||
printk(KERN_ERR "unable to get %s GPIO\n", "tsc2005 reset");
|
||||
tsc2005_pdata.esd_timeout_ms = 0;
|
||||
}
|
||||
tsc2005_pdata.set_reset = rx51_tsc2005_set_reset;
|
||||
}
|
||||
|
||||
void __init rx51_peripherals_init(void)
|
||||
|
|
|
@ -132,6 +132,7 @@ void omap3_map_io(void);
|
|||
void am33xx_map_io(void);
|
||||
void omap4_map_io(void);
|
||||
void ti81xx_map_io(void);
|
||||
void omap_barriers_init(void);
|
||||
|
||||
/**
|
||||
* omap_test_timeout - busy-loop, testing a condition
|
||||
|
|
|
@ -65,7 +65,6 @@ static int omap4_enter_idle(struct cpuidle_device *dev,
|
|||
struct timespec ts_preidle, ts_postidle, ts_idle;
|
||||
u32 cpu1_state;
|
||||
int idle_time;
|
||||
int new_state_idx;
|
||||
int cpu_id = smp_processor_id();
|
||||
|
||||
/* Used to keep track of the total time in idle */
|
||||
|
@ -84,8 +83,8 @@ static int omap4_enter_idle(struct cpuidle_device *dev,
|
|||
*/
|
||||
cpu1_state = pwrdm_read_pwrst(cpu1_pd);
|
||||
if (cpu1_state != PWRDM_POWER_OFF) {
|
||||
new_state_idx = drv->safe_state_index;
|
||||
cx = cpuidle_get_statedata(&dev->states_usage[new_state_idx]);
|
||||
index = drv->safe_state_index;
|
||||
cx = cpuidle_get_statedata(&dev->states_usage[index]);
|
||||
}
|
||||
|
||||
if (index > 0)
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
#include <linux/interrupt.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/smsc911x.h>
|
||||
#include <linux/regulator/fixed.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
|
||||
#include <plat/board.h>
|
||||
#include <plat/gpmc.h>
|
||||
|
@ -42,6 +44,50 @@ static struct smsc911x_platform_config gpmc_smsc911x_config = {
|
|||
.flags = SMSC911X_USE_16BIT,
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply gpmc_smsc911x_supply[] = {
|
||||
REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
|
||||
REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
|
||||
};
|
||||
|
||||
/* Generic regulator definition to satisfy smsc911x */
|
||||
static struct regulator_init_data gpmc_smsc911x_reg_init_data = {
|
||||
.constraints = {
|
||||
.min_uV = 3300000,
|
||||
.max_uV = 3300000,
|
||||
.valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
| REGULATOR_MODE_STANDBY,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
| REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = ARRAY_SIZE(gpmc_smsc911x_supply),
|
||||
.consumer_supplies = gpmc_smsc911x_supply,
|
||||
};
|
||||
|
||||
static struct fixed_voltage_config gpmc_smsc911x_fixed_reg_data = {
|
||||
.supply_name = "gpmc_smsc911x",
|
||||
.microvolts = 3300000,
|
||||
.gpio = -EINVAL,
|
||||
.startup_delay = 0,
|
||||
.enable_high = 0,
|
||||
.enabled_at_boot = 1,
|
||||
.init_data = &gpmc_smsc911x_reg_init_data,
|
||||
};
|
||||
|
||||
/*
|
||||
* Platform device id of 42 is a temporary fix to avoid conflicts
|
||||
* with other reg-fixed-voltage devices. The real fix should
|
||||
* involve the driver core providing a way of dynamically
|
||||
* assigning a unique id on registration for platform devices
|
||||
* in the same name space.
|
||||
*/
|
||||
static struct platform_device gpmc_smsc911x_regulator = {
|
||||
.name = "reg-fixed-voltage",
|
||||
.id = 42,
|
||||
.dev = {
|
||||
.platform_data = &gpmc_smsc911x_fixed_reg_data,
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
* Initialize smsc911x device connected to the GPMC. Note that we
|
||||
* assume that pin multiplexing is done in the board-*.c file,
|
||||
|
@ -55,6 +101,12 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data)
|
|||
|
||||
gpmc_cfg = board_data;
|
||||
|
||||
ret = platform_device_register(&gpmc_smsc911x_regulator);
|
||||
if (ret < 0) {
|
||||
pr_err("Unable to register smsc911x regulators: %d\n", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) {
|
||||
pr_err("Failed to request GPMC mem region\n");
|
||||
return;
|
||||
|
|
|
@ -428,6 +428,7 @@ static int omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int omap_hsmmc_done;
|
||||
#define MAX_OMAP_MMC_HWMOD_NAME_LEN 16
|
||||
|
||||
void omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr)
|
||||
|
@ -491,6 +492,11 @@ void omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
|
|||
{
|
||||
u32 reg;
|
||||
|
||||
if (omap_hsmmc_done)
|
||||
return;
|
||||
|
||||
omap_hsmmc_done = 1;
|
||||
|
||||
if (!cpu_is_omap44xx()) {
|
||||
if (cpu_is_omap2430()) {
|
||||
control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE;
|
||||
|
|
|
@ -307,6 +307,7 @@ void __init omapam33xx_map_common_io(void)
|
|||
void __init omap44xx_map_common_io(void)
|
||||
{
|
||||
iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc));
|
||||
omap_barriers_init();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -281,8 +281,16 @@ static struct omap_mbox mbox_iva_info = {
|
|||
.ops = &omap2_mbox_ops,
|
||||
.priv = &omap2_mbox_iva_priv,
|
||||
};
|
||||
#endif
|
||||
|
||||
struct omap_mbox *omap2_mboxes[] = { &mbox_dsp_info, &mbox_iva_info, NULL };
|
||||
#ifdef CONFIG_ARCH_OMAP2
|
||||
struct omap_mbox *omap2_mboxes[] = {
|
||||
&mbox_dsp_info,
|
||||
#ifdef CONFIG_SOC_OMAP2420
|
||||
&mbox_iva_info,
|
||||
#endif
|
||||
NULL
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ARCH_OMAP4)
|
||||
|
@ -412,7 +420,8 @@ static void __exit omap2_mbox_exit(void)
|
|||
platform_driver_unregister(&omap2_mbox_driver);
|
||||
}
|
||||
|
||||
module_init(omap2_mbox_init);
|
||||
/* must be ready before omap3isp is probed */
|
||||
subsys_initcall(omap2_mbox_init);
|
||||
module_exit(omap2_mbox_exit);
|
||||
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
|
|
@ -218,7 +218,7 @@ static int _omap_mux_get_by_name(struct omap_mux_partition *partition,
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
static int __init
|
||||
static int
|
||||
omap_mux_get_by_name(const char *muxname,
|
||||
struct omap_mux_partition **found_partition,
|
||||
struct omap_mux **found_mux)
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include <plat/irqs.h>
|
||||
#include <plat/sram.h>
|
||||
#include <plat/omap-secure.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/omap-wakeupgen.h>
|
||||
|
@ -43,6 +44,9 @@ static void __iomem *sar_ram_base;
|
|||
|
||||
void __iomem *dram_sync, *sram_sync;
|
||||
|
||||
static phys_addr_t paddr;
|
||||
static u32 size;
|
||||
|
||||
void omap_bus_sync(void)
|
||||
{
|
||||
if (dram_sync && sram_sync) {
|
||||
|
@ -52,18 +56,20 @@ void omap_bus_sync(void)
|
|||
}
|
||||
}
|
||||
|
||||
static int __init omap_barriers_init(void)
|
||||
/* Steal one page physical memory for barrier implementation */
|
||||
int __init omap_barrier_reserve_memblock(void)
|
||||
{
|
||||
struct map_desc dram_io_desc[1];
|
||||
phys_addr_t paddr;
|
||||
u32 size;
|
||||
|
||||
if (!cpu_is_omap44xx())
|
||||
return -ENODEV;
|
||||
|
||||
size = ALIGN(PAGE_SIZE, SZ_1M);
|
||||
paddr = arm_memblock_steal(size, SZ_1M);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __init omap_barriers_init(void)
|
||||
{
|
||||
struct map_desc dram_io_desc[1];
|
||||
|
||||
dram_io_desc[0].virtual = OMAP4_DRAM_BARRIER_VA;
|
||||
dram_io_desc[0].pfn = __phys_to_pfn(paddr);
|
||||
dram_io_desc[0].length = size;
|
||||
|
@ -75,9 +81,10 @@ static int __init omap_barriers_init(void)
|
|||
pr_info("OMAP4: Map 0x%08llx to 0x%08lx for dram barrier\n",
|
||||
(long long) paddr, dram_io_desc[0].virtual);
|
||||
|
||||
return 0;
|
||||
}
|
||||
core_initcall(omap_barriers_init);
|
||||
#else
|
||||
void __init omap_barriers_init(void)
|
||||
{}
|
||||
#endif
|
||||
|
||||
void __init gic_init_irq(void)
|
||||
|
|
|
@ -174,14 +174,17 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,
|
|||
freq = clk->rate;
|
||||
clk_put(clk);
|
||||
|
||||
rcu_read_lock();
|
||||
opp = opp_find_freq_ceil(dev, &freq);
|
||||
if (IS_ERR(opp)) {
|
||||
rcu_read_unlock();
|
||||
pr_err("%s: unable to find boot up OPP for vdd_%s\n",
|
||||
__func__, vdd_name);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
bootup_volt = opp_get_voltage(opp);
|
||||
rcu_read_unlock();
|
||||
if (!bootup_volt) {
|
||||
pr_err("%s: unable to find voltage corresponding "
|
||||
"to the bootup OPP for vdd_%s\n", __func__, vdd_name);
|
||||
|
|
|
@ -486,7 +486,7 @@ static void setup_4430ohci_io_mux(const enum usbhs_omap_port_mode *port_mode)
|
|||
void __init usbhs_init(const struct usbhs_omap_board_data *pdata)
|
||||
{
|
||||
struct omap_hwmod *oh[2];
|
||||
struct omap_device *od;
|
||||
struct platform_device *pdev;
|
||||
int bus_id = -1;
|
||||
int i;
|
||||
|
||||
|
@ -522,11 +522,11 @@ void __init usbhs_init(const struct usbhs_omap_board_data *pdata)
|
|||
return;
|
||||
}
|
||||
|
||||
od = omap_device_build_ss(OMAP_USBHS_DEVICE, bus_id, oh, 2,
|
||||
pdev = omap_device_build_ss(OMAP_USBHS_DEVICE, bus_id, oh, 2,
|
||||
(void *)&usbhs_data, sizeof(usbhs_data),
|
||||
omap_uhhtll_latency,
|
||||
ARRAY_SIZE(omap_uhhtll_latency), false);
|
||||
if (IS_ERR(od)) {
|
||||
if (IS_ERR(pdev)) {
|
||||
pr_err("Could not build hwmod devices %s,%s\n",
|
||||
USBHS_UHH_HWMODNAME, USBHS_TLL_HWMODNAME);
|
||||
return;
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#include <mach/hx4700.h>
|
||||
#include <mach/irda.h>
|
||||
|
||||
#include <sound/ak4641.h>
|
||||
#include <video/platform_lcd.h>
|
||||
#include <video/w100fb.h>
|
||||
|
||||
|
@ -779,6 +780,28 @@ static struct i2c_board_info __initdata pi2c_board_info[] = {
|
|||
},
|
||||
};
|
||||
|
||||
/*
|
||||
* Asahi Kasei AK4641 on I2C
|
||||
*/
|
||||
|
||||
static struct ak4641_platform_data ak4641_info = {
|
||||
.gpio_power = GPIO27_HX4700_CODEC_ON,
|
||||
.gpio_npdn = GPIO109_HX4700_CODEC_nPDN,
|
||||
};
|
||||
|
||||
static struct i2c_board_info i2c_board_info[] __initdata = {
|
||||
{
|
||||
I2C_BOARD_INFO("ak4641", 0x12),
|
||||
.platform_data = &ak4641_info,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device audio = {
|
||||
.name = "hx4700-audio",
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* PCMCIA
|
||||
*/
|
||||
|
@ -805,6 +828,7 @@ static struct platform_device *devices[] __initdata = {
|
|||
&gpio_vbus,
|
||||
&power_supply,
|
||||
&strataflash,
|
||||
&audio,
|
||||
&pcmcia,
|
||||
};
|
||||
|
||||
|
@ -842,6 +866,7 @@ static void __init hx4700_init(void)
|
|||
pxa_set_ficp_info(&ficp_info);
|
||||
pxa27x_set_i2c_power_info(NULL);
|
||||
pxa_set_i2c_info(NULL);
|
||||
i2c_register_board_info(0, ARRAY_AND_SIZE(i2c_board_info));
|
||||
i2c_register_board_info(1, ARRAY_AND_SIZE(pi2c_board_info));
|
||||
pxa2xx_set_spi_info(2, &pxa_ssp2_master_info);
|
||||
spi_register_board_info(ARRAY_AND_SIZE(tsc2046_board_info));
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include <linux/suspend.h>
|
||||
#include <linux/syscore_ops.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/suspend.h>
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/i2c/pxa-i2c.h>
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <asm/mach/map.h>
|
||||
#include <mach/hardware.h>
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include <linux/i2c.h>
|
||||
#include <linux/i2c/pxa-i2c.h>
|
||||
#include <linux/mfd/88pm860x.h>
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
|
|
|
@ -168,6 +168,7 @@ struct battery_thresh sharpsl_battery_levels_noac[] = {
|
|||
#define MAXCTRL_SEL_SH 4
|
||||
#define MAXCTRL_STR (1u << 7)
|
||||
|
||||
extern int max1111_read_channel(int);
|
||||
/*
|
||||
* Read MAX1111 ADC
|
||||
*/
|
||||
|
@ -177,8 +178,6 @@ int sharpsl_pm_pxa_read_max1111(int channel)
|
|||
if (machine_is_tosa())
|
||||
return 0;
|
||||
|
||||
extern int max1111_read_channel(int);
|
||||
|
||||
/* max1111 accepts channels from 0-3, however,
|
||||
* it is encoded from 0-7 here in the code.
|
||||
*/
|
||||
|
|
|
@ -172,10 +172,9 @@ static int spitz_should_wakeup(unsigned int resume_on_alarm)
|
|||
static unsigned long spitz_charger_wakeup(void)
|
||||
{
|
||||
unsigned long ret;
|
||||
ret = (!gpio_get_value(SPITZ_GPIO_KEY_INT)
|
||||
ret = ((!gpio_get_value(SPITZ_GPIO_KEY_INT)
|
||||
<< GPIO_bit(SPITZ_GPIO_KEY_INT))
|
||||
| (!gpio_get_value(SPITZ_GPIO_SYNC)
|
||||
<< GPIO_bit(SPITZ_GPIO_SYNC));
|
||||
| gpio_get_value(SPITZ_GPIO_SYNC));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -69,6 +69,7 @@ void __init omap_reserve(void)
|
|||
omap_vram_reserve_sdram_memblock();
|
||||
omap_dsp_reserve_sdram_memblock();
|
||||
omap_secure_ram_reserve_memblock();
|
||||
omap_barrier_reserve_memblock();
|
||||
}
|
||||
|
||||
void __init omap_init_consistent_dma_size(void)
|
||||
|
|
|
@ -10,4 +10,10 @@ static inline void omap_secure_ram_reserve_memblock(void)
|
|||
{ }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_OMAP4_ERRATA_I688
|
||||
extern int omap_barrier_reserve_memblock(void);
|
||||
#else
|
||||
static inline void omap_barrier_reserve_memblock(void)
|
||||
{ }
|
||||
#endif
|
||||
#endif /* __OMAP_SECURE_H__ */
|
||||
|
|
|
@ -160,6 +160,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
|
|||
DEBUG_LL_OMAP3(3, igep0020);
|
||||
DEBUG_LL_OMAP3(3, igep0030);
|
||||
DEBUG_LL_OMAP3(3, nokia_rm680);
|
||||
DEBUG_LL_OMAP3(3, nokia_rm696);
|
||||
DEBUG_LL_OMAP3(3, nokia_rx51);
|
||||
DEBUG_LL_OMAP3(3, omap3517evm);
|
||||
DEBUG_LL_OMAP3(3, omap3_beagle);
|
||||
|
|
|
@ -77,7 +77,6 @@ struct pt_regs {
|
|||
long syscallno; /* Syscall number (used by strace) */
|
||||
long dummy; /* Cheap alignment fix */
|
||||
};
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
/* TODO: Rename this to REDZONE because that's what it is */
|
||||
#define STACK_FRAME_OVERHEAD 128 /* size of minimum stack frame */
|
||||
|
@ -87,6 +86,13 @@ struct pt_regs {
|
|||
#define user_stack_pointer(regs) ((unsigned long)(regs)->sp)
|
||||
#define profile_pc(regs) instruction_pointer(regs)
|
||||
|
||||
static inline long regs_return_value(struct pt_regs *regs)
|
||||
{
|
||||
return regs->gpr[11];
|
||||
}
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
/*
|
||||
* Offsets used by 'ptrace' system call interface.
|
||||
*/
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#include <linux/init_task.h>
|
||||
#include <linux/mqueue.h>
|
||||
#include <linux/export.h>
|
||||
|
||||
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
|
||||
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <linux/irq.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/kernel_stat.h>
|
||||
#include <linux/export.h>
|
||||
|
||||
#include <linux/irqflags.h>
|
||||
|
||||
|
|
|
@ -188,11 +188,9 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
|
|||
*/
|
||||
ret = -1L;
|
||||
|
||||
/* Are these regs right??? */
|
||||
if (unlikely(current->audit_context))
|
||||
audit_syscall_entry(audit_arch(), regs->syscallno,
|
||||
regs->gpr[3], regs->gpr[4],
|
||||
regs->gpr[5], regs->gpr[6]);
|
||||
audit_syscall_entry(audit_arch(), regs->syscallno,
|
||||
regs->gpr[3], regs->gpr[4],
|
||||
regs->gpr[5], regs->gpr[6]);
|
||||
|
||||
return ret ? : regs->syscallno;
|
||||
}
|
||||
|
@ -201,9 +199,7 @@ asmlinkage void do_syscall_trace_leave(struct pt_regs *regs)
|
|||
{
|
||||
int step;
|
||||
|
||||
if (unlikely(current->audit_context))
|
||||
audit_syscall_exit(AUDITSC_RESULT(regs->gpr[11]),
|
||||
regs->gpr[11]);
|
||||
audit_syscall_exit(regs);
|
||||
|
||||
step = test_thread_flag(TIF_SINGLESTEP);
|
||||
if (step || test_thread_flag(TIF_SYSCALL_TRACE))
|
||||
|
|
|
@ -31,7 +31,11 @@ ifdef CONFIG_64BIT
|
|||
UTS_MACHINE := parisc64
|
||||
CHECKFLAGS += -D__LP64__=1 -m64
|
||||
WIDTH := 64
|
||||
|
||||
# FIXME: if no default set, should really try to locate dynamically
|
||||
ifeq ($(CROSS_COMPILE),)
|
||||
CROSS_COMPILE := hppa64-linux-gnu-
|
||||
endif
|
||||
else # 32-bit
|
||||
WIDTH :=
|
||||
endif
|
||||
|
|
|
@ -227,6 +227,9 @@ config COMPAT
|
|||
config SYSVIPC_COMPAT
|
||||
def_bool y if COMPAT && SYSVIPC
|
||||
|
||||
config KEYS_COMPAT
|
||||
def_bool y if COMPAT && KEYS
|
||||
|
||||
config AUDIT_ARCH
|
||||
def_bool y
|
||||
|
||||
|
|
|
@ -172,13 +172,6 @@ static inline int is_compat_task(void)
|
|||
return is_32bit_task();
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static inline int is_compat_task(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static inline void __user *arch_compat_alloc_user_space(long len)
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/gfp.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/crash_dump.h>
|
||||
#include <linux/bootmem.h>
|
||||
#include <linux/elf.h>
|
||||
#include <asm/ipl.h>
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include <asm/irq.h>
|
||||
#include <asm/timer.h>
|
||||
#include <asm/nmi.h>
|
||||
#include <asm/compat.h>
|
||||
#include <asm/smp.h>
|
||||
#include "entry.h"
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
#include <linux/regset.h>
|
||||
#include <linux/tracehook.h>
|
||||
#include <linux/seccomp.h>
|
||||
#include <linux/compat.h>
|
||||
#include <trace/syscall.h>
|
||||
#include <asm/compat.h>
|
||||
#include <asm/segment.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/pgtable.h>
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#include <linux/kexec.h>
|
||||
#include <linux/crash_dump.h>
|
||||
#include <linux/memory.h>
|
||||
#include <linux/compat.h>
|
||||
|
||||
#include <asm/ipl.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
@ -59,7 +60,6 @@
|
|||
#include <asm/ptrace.h>
|
||||
#include <asm/sections.h>
|
||||
#include <asm/ebcdic.h>
|
||||
#include <asm/compat.h>
|
||||
#include <asm/kvm_virtio.h>
|
||||
#include <asm/diag.h>
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include <asm/ucontext.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/lowcore.h>
|
||||
#include <asm/compat.h>
|
||||
#include "entry.h"
|
||||
|
||||
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include <asm/pgtable.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/compat.h>
|
||||
#include "../kernel/entry.h"
|
||||
|
||||
#ifndef CONFIG_64BIT
|
||||
|
|
|
@ -223,16 +223,38 @@ void free_initrd_mem(unsigned long start, unsigned long end)
|
|||
#ifdef CONFIG_MEMORY_HOTPLUG
|
||||
int arch_add_memory(int nid, u64 start, u64 size)
|
||||
{
|
||||
struct pglist_data *pgdat;
|
||||
unsigned long zone_start_pfn, zone_end_pfn, nr_pages;
|
||||
unsigned long start_pfn = PFN_DOWN(start);
|
||||
unsigned long size_pages = PFN_DOWN(size);
|
||||
struct zone *zone;
|
||||
int rc;
|
||||
|
||||
pgdat = NODE_DATA(nid);
|
||||
zone = pgdat->node_zones + ZONE_MOVABLE;
|
||||
rc = vmem_add_mapping(start, size);
|
||||
if (rc)
|
||||
return rc;
|
||||
rc = __add_pages(nid, zone, PFN_DOWN(start), PFN_DOWN(size));
|
||||
for_each_zone(zone) {
|
||||
if (zone_idx(zone) != ZONE_MOVABLE) {
|
||||
/* Add range within existing zone limits */
|
||||
zone_start_pfn = zone->zone_start_pfn;
|
||||
zone_end_pfn = zone->zone_start_pfn +
|
||||
zone->spanned_pages;
|
||||
} else {
|
||||
/* Add remaining range to ZONE_MOVABLE */
|
||||
zone_start_pfn = start_pfn;
|
||||
zone_end_pfn = start_pfn + size_pages;
|
||||
}
|
||||
if (start_pfn < zone_start_pfn || start_pfn >= zone_end_pfn)
|
||||
continue;
|
||||
nr_pages = (start_pfn + size_pages > zone_end_pfn) ?
|
||||
zone_end_pfn - start_pfn : size_pages;
|
||||
rc = __add_pages(nid, zone, start_pfn, nr_pages);
|
||||
if (rc)
|
||||
break;
|
||||
start_pfn += nr_pages;
|
||||
size_pages -= nr_pages;
|
||||
if (!size_pages)
|
||||
break;
|
||||
}
|
||||
if (rc)
|
||||
vmem_remove_mapping(start, size);
|
||||
return rc;
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
#include <linux/mman.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/random.h>
|
||||
#include <linux/compat.h>
|
||||
#include <asm/pgalloc.h>
|
||||
#include <asm/compat.h>
|
||||
|
||||
static unsigned long stack_maxrandom_size(void)
|
||||
{
|
||||
|
|
|
@ -242,4 +242,12 @@ static inline void perf_get_x86_pmu_capability(struct x86_pmu_capability *cap)
|
|||
static inline void perf_events_lapic_init(void) { }
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_CPU_SUP_AMD)
|
||||
extern void amd_pmu_enable_virt(void);
|
||||
extern void amd_pmu_disable_virt(void);
|
||||
#else
|
||||
static inline void amd_pmu_enable_virt(void) { }
|
||||
static inline void amd_pmu_disable_virt(void) { }
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_X86_PERF_EVENT_H */
|
||||
|
|
|
@ -326,8 +326,7 @@ static void __cpuinit amd_calc_l3_indices(struct amd_northbridge *nb)
|
|||
l3->indices = (max(max3(sc0, sc1, sc2), sc3) << 10) - 1;
|
||||
}
|
||||
|
||||
static void __cpuinit amd_init_l3_cache(struct _cpuid4_info_regs *this_leaf,
|
||||
int index)
|
||||
static void __cpuinit amd_init_l3_cache(struct _cpuid4_info_regs *this_leaf, int index)
|
||||
{
|
||||
int node;
|
||||
|
||||
|
@ -725,14 +724,16 @@ static DEFINE_PER_CPU(struct _cpuid4_info *, ici_cpuid4_info);
|
|||
#define CPUID4_INFO_IDX(x, y) (&((per_cpu(ici_cpuid4_info, x))[y]))
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index)
|
||||
|
||||
static int __cpuinit cache_shared_amd_cpu_map_setup(unsigned int cpu, int index)
|
||||
{
|
||||
struct _cpuid4_info *this_leaf, *sibling_leaf;
|
||||
unsigned long num_threads_sharing;
|
||||
int index_msb, i, sibling;
|
||||
struct _cpuid4_info *this_leaf;
|
||||
int ret, i, sibling;
|
||||
struct cpuinfo_x86 *c = &cpu_data(cpu);
|
||||
|
||||
if ((index == 3) && (c->x86_vendor == X86_VENDOR_AMD)) {
|
||||
ret = 0;
|
||||
if (index == 3) {
|
||||
ret = 1;
|
||||
for_each_cpu(i, cpu_llc_shared_mask(cpu)) {
|
||||
if (!per_cpu(ici_cpuid4_info, i))
|
||||
continue;
|
||||
|
@ -743,8 +744,35 @@ static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index)
|
|||
set_bit(sibling, this_leaf->shared_cpu_map);
|
||||
}
|
||||
}
|
||||
return;
|
||||
} else if ((c->x86 == 0x15) && ((index == 1) || (index == 2))) {
|
||||
ret = 1;
|
||||
for_each_cpu(i, cpu_sibling_mask(cpu)) {
|
||||
if (!per_cpu(ici_cpuid4_info, i))
|
||||
continue;
|
||||
this_leaf = CPUID4_INFO_IDX(i, index);
|
||||
for_each_cpu(sibling, cpu_sibling_mask(cpu)) {
|
||||
if (!cpu_online(sibling))
|
||||
continue;
|
||||
set_bit(sibling, this_leaf->shared_cpu_map);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index)
|
||||
{
|
||||
struct _cpuid4_info *this_leaf, *sibling_leaf;
|
||||
unsigned long num_threads_sharing;
|
||||
int index_msb, i;
|
||||
struct cpuinfo_x86 *c = &cpu_data(cpu);
|
||||
|
||||
if (c->x86_vendor == X86_VENDOR_AMD) {
|
||||
if (cache_shared_amd_cpu_map_setup(cpu, index))
|
||||
return;
|
||||
}
|
||||
|
||||
this_leaf = CPUID4_INFO_IDX(cpu, index);
|
||||
num_threads_sharing = 1 + this_leaf->base.eax.split.num_threads_sharing;
|
||||
|
||||
|
|
|
@ -528,6 +528,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)
|
|||
|
||||
sprintf(name, "threshold_bank%i", bank);
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
if (cpu_data(cpu).cpu_core_id && shared_bank[bank]) { /* symlink */
|
||||
i = cpumask_first(cpu_llc_shared_mask(cpu));
|
||||
|
||||
|
@ -553,6 +554,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)
|
|||
|
||||
goto out;
|
||||
}
|
||||
#endif
|
||||
|
||||
b = kzalloc(sizeof(struct threshold_bank), GFP_KERNEL);
|
||||
if (!b) {
|
||||
|
|
|
@ -147,7 +147,9 @@ struct cpu_hw_events {
|
|||
/*
|
||||
* AMD specific bits
|
||||
*/
|
||||
struct amd_nb *amd_nb;
|
||||
struct amd_nb *amd_nb;
|
||||
/* Inverted mask of bits to clear in the perf_ctr ctrl registers */
|
||||
u64 perf_ctr_virt_mask;
|
||||
|
||||
void *kfree_on_online;
|
||||
};
|
||||
|
@ -417,9 +419,11 @@ void x86_pmu_disable_all(void);
|
|||
static inline void __x86_pmu_enable_event(struct hw_perf_event *hwc,
|
||||
u64 enable_mask)
|
||||
{
|
||||
u64 disable_mask = __this_cpu_read(cpu_hw_events.perf_ctr_virt_mask);
|
||||
|
||||
if (hwc->extra_reg.reg)
|
||||
wrmsrl(hwc->extra_reg.reg, hwc->extra_reg.config);
|
||||
wrmsrl(hwc->config_base, hwc->config | enable_mask);
|
||||
wrmsrl(hwc->config_base, (hwc->config | enable_mask) & ~disable_mask);
|
||||
}
|
||||
|
||||
void x86_pmu_enable_all(int added);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <linux/perf_event.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/slab.h>
|
||||
|
@ -357,7 +358,9 @@ static void amd_pmu_cpu_starting(int cpu)
|
|||
struct amd_nb *nb;
|
||||
int i, nb_id;
|
||||
|
||||
if (boot_cpu_data.x86_max_cores < 2)
|
||||
cpuc->perf_ctr_virt_mask = AMD_PERFMON_EVENTSEL_HOSTONLY;
|
||||
|
||||
if (boot_cpu_data.x86_max_cores < 2 || boot_cpu_data.x86 == 0x15)
|
||||
return;
|
||||
|
||||
nb_id = amd_get_nb_id(cpu);
|
||||
|
@ -587,9 +590,9 @@ static __initconst const struct x86_pmu amd_pmu_f15h = {
|
|||
.put_event_constraints = amd_put_event_constraints,
|
||||
|
||||
.cpu_prepare = amd_pmu_cpu_prepare,
|
||||
.cpu_starting = amd_pmu_cpu_starting,
|
||||
.cpu_dead = amd_pmu_cpu_dead,
|
||||
#endif
|
||||
.cpu_starting = amd_pmu_cpu_starting,
|
||||
};
|
||||
|
||||
__init int amd_pmu_init(void)
|
||||
|
@ -621,3 +624,33 @@ __init int amd_pmu_init(void)
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void amd_pmu_enable_virt(void)
|
||||
{
|
||||
struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
|
||||
|
||||
cpuc->perf_ctr_virt_mask = 0;
|
||||
|
||||
/* Reload all events */
|
||||
x86_pmu_disable_all();
|
||||
x86_pmu_enable_all(0);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(amd_pmu_enable_virt);
|
||||
|
||||
void amd_pmu_disable_virt(void)
|
||||
{
|
||||
struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
|
||||
|
||||
/*
|
||||
* We only mask out the Host-only bit so that host-only counting works
|
||||
* when SVM is disabled. If someone sets up a guest-only counter when
|
||||
* SVM is disabled the Guest-only bits still gets set and the counter
|
||||
* will not count anything.
|
||||
*/
|
||||
cpuc->perf_ctr_virt_mask = AMD_PERFMON_EVENTSEL_HOSTONLY;
|
||||
|
||||
/* Reload all events */
|
||||
x86_pmu_disable_all();
|
||||
x86_pmu_enable_all(0);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(amd_pmu_disable_virt);
|
||||
|
|
|
@ -1531,11 +1531,18 @@ ENTRY(nmi)
|
|||
/* Use %rdx as out temp variable throughout */
|
||||
pushq_cfi %rdx
|
||||
|
||||
/*
|
||||
* If %cs was not the kernel segment, then the NMI triggered in user
|
||||
* space, which means it is definitely not nested.
|
||||
*/
|
||||
cmpl $__KERNEL_CS, 16(%rsp)
|
||||
jne first_nmi
|
||||
|
||||
/*
|
||||
* Check the special variable on the stack to see if NMIs are
|
||||
* executing.
|
||||
*/
|
||||
cmp $1, -8(%rsp)
|
||||
cmpl $1, -8(%rsp)
|
||||
je nested_nmi
|
||||
|
||||
/*
|
||||
|
|
|
@ -360,7 +360,6 @@ out:
|
|||
static enum ucode_state
|
||||
request_microcode_user(int cpu, const void __user *buf, size_t size)
|
||||
{
|
||||
pr_info("AMD microcode update via /dev/cpu/microcode not supported\n");
|
||||
return UCODE_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <linux/ftrace_event.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include <asm/perf_event.h>
|
||||
#include <asm/tlbflush.h>
|
||||
#include <asm/desc.h>
|
||||
#include <asm/kvm_para.h>
|
||||
|
@ -575,6 +576,8 @@ static void svm_hardware_disable(void *garbage)
|
|||
wrmsrl(MSR_AMD64_TSC_RATIO, TSC_RATIO_DEFAULT);
|
||||
|
||||
cpu_svm_disable();
|
||||
|
||||
amd_pmu_disable_virt();
|
||||
}
|
||||
|
||||
static int svm_hardware_enable(void *garbage)
|
||||
|
@ -622,6 +625,8 @@ static int svm_hardware_enable(void *garbage)
|
|||
|
||||
svm_init_erratum_383();
|
||||
|
||||
amd_pmu_enable_virt();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1141,7 +1141,9 @@ asmlinkage void __init xen_start_kernel(void)
|
|||
|
||||
/* Prevent unwanted bits from being set in PTEs. */
|
||||
__supported_pte_mask &= ~_PAGE_GLOBAL;
|
||||
#if 0
|
||||
if (!xen_initial_domain())
|
||||
#endif
|
||||
__supported_pte_mask &= ~(_PAGE_PWT | _PAGE_PCD);
|
||||
|
||||
__supported_pte_mask |= _PAGE_IOMAP;
|
||||
|
@ -1204,10 +1206,6 @@ asmlinkage void __init xen_start_kernel(void)
|
|||
|
||||
pgd = (pgd_t *)xen_start_info->pt_base;
|
||||
|
||||
if (!xen_initial_domain())
|
||||
__supported_pte_mask &= ~(_PAGE_PWT | _PAGE_PCD);
|
||||
|
||||
__supported_pte_mask |= _PAGE_IOMAP;
|
||||
/* Don't do the full vcpu_info placement stuff until we have a
|
||||
possible map and a non-dummy shared_info. */
|
||||
per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0];
|
||||
|
|
|
@ -415,13 +415,13 @@ static pteval_t iomap_pte(pteval_t val)
|
|||
static pteval_t xen_pte_val(pte_t pte)
|
||||
{
|
||||
pteval_t pteval = pte.pte;
|
||||
|
||||
#if 0
|
||||
/* If this is a WC pte, convert back from Xen WC to Linux WC */
|
||||
if ((pteval & (_PAGE_PAT | _PAGE_PCD | _PAGE_PWT)) == _PAGE_PAT) {
|
||||
WARN_ON(!pat_enabled);
|
||||
pteval = (pteval & ~_PAGE_PAT) | _PAGE_PWT;
|
||||
}
|
||||
|
||||
#endif
|
||||
if (xen_initial_domain() && (pteval & _PAGE_IOMAP))
|
||||
return pteval;
|
||||
|
||||
|
@ -463,7 +463,7 @@ void xen_set_pat(u64 pat)
|
|||
static pte_t xen_make_pte(pteval_t pte)
|
||||
{
|
||||
phys_addr_t addr = (pte & PTE_PFN_MASK);
|
||||
|
||||
#if 0
|
||||
/* If Linux is trying to set a WC pte, then map to the Xen WC.
|
||||
* If _PAGE_PAT is set, then it probably means it is really
|
||||
* _PAGE_PSE, so avoid fiddling with the PAT mapping and hope
|
||||
|
@ -476,7 +476,7 @@ static pte_t xen_make_pte(pteval_t pte)
|
|||
if ((pte & (_PAGE_PCD | _PAGE_PWT)) == _PAGE_PWT)
|
||||
pte = (pte & ~(_PAGE_PCD | _PAGE_PWT)) | _PAGE_PAT;
|
||||
}
|
||||
|
||||
#endif
|
||||
/*
|
||||
* Unprivileged domains are allowed to do IOMAPpings for
|
||||
* PCI passthrough, but not map ISA space. The ISA
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* ldm - Support for Windows Logical Disk Manager (Dynamic Disks)
|
||||
*
|
||||
* Copyright (C) 2001,2002 Richard Russon <ldm@flatcap.org>
|
||||
* Copyright (c) 2001-2007 Anton Altaparmakov
|
||||
* Copyright (c) 2001-2012 Anton Altaparmakov
|
||||
* Copyright (C) 2001,2002 Jakob Kemi <jakob.kemi@telia.com>
|
||||
*
|
||||
* Documentation is available at http://www.linux-ntfs.org/doku.php?id=downloads
|
||||
|
@ -1341,20 +1341,17 @@ found:
|
|||
ldm_error("REC value (%d) exceeds NUM value (%d)", rec, f->num);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (f->map & (1 << rec)) {
|
||||
ldm_error ("Duplicate VBLK, part %d.", rec);
|
||||
f->map &= 0x7F; /* Mark the group as broken */
|
||||
return false;
|
||||
}
|
||||
|
||||
f->map |= (1 << rec);
|
||||
|
||||
if (!rec)
|
||||
memcpy(f->data, data, VBLK_SIZE_HEAD);
|
||||
data += VBLK_SIZE_HEAD;
|
||||
size -= VBLK_SIZE_HEAD;
|
||||
|
||||
memcpy (f->data+rec*(size-VBLK_SIZE_HEAD)+VBLK_SIZE_HEAD, data, size);
|
||||
|
||||
memcpy(f->data + VBLK_SIZE_HEAD + rec * size, data, size);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1206,9 +1206,9 @@ static int fpga_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
|||
|
||||
out_unmap_both:
|
||||
pci_set_drvdata(dev, NULL);
|
||||
pci_iounmap(dev, card->config_regs);
|
||||
out_unmap_config:
|
||||
pci_iounmap(dev, card->buffers);
|
||||
out_unmap_config:
|
||||
pci_iounmap(dev, card->config_regs);
|
||||
out_release_regions:
|
||||
pci_release_regions(dev);
|
||||
out:
|
||||
|
|
|
@ -102,6 +102,7 @@ static struct usb_device_id btusb_table[] = {
|
|||
|
||||
/* Broadcom BCM20702A0 */
|
||||
{ USB_DEVICE(0x0a5c, 0x21e3) },
|
||||
{ USB_DEVICE(0x0a5c, 0x21f3) },
|
||||
{ USB_DEVICE(0x413c, 0x8197) },
|
||||
|
||||
{ } /* Terminating entry */
|
||||
|
@ -726,9 +727,6 @@ static int btusb_send_frame(struct sk_buff *skb)
|
|||
usb_fill_bulk_urb(urb, data->udev, pipe,
|
||||
skb->data, skb->len, btusb_tx_complete, skb);
|
||||
|
||||
if (skb->priority >= HCI_PRIO_MAX - 1)
|
||||
urb->transfer_flags = URB_ISO_ASAP;
|
||||
|
||||
hdev->stat.acl_tx++;
|
||||
break;
|
||||
|
||||
|
|
|
@ -714,6 +714,7 @@ static int mv_hash_final(struct ahash_request *req)
|
|||
{
|
||||
struct mv_req_hash_ctx *ctx = ahash_request_ctx(req);
|
||||
|
||||
ahash_request_set_crypt(req, NULL, req->result, 0);
|
||||
mv_update_hash_req_ctx(ctx, 1, 0);
|
||||
return mv_handle_req(&req->base);
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "drmP.h"
|
||||
#include "drm_crtc_helper.h"
|
||||
|
||||
#include <drm/exynos_drm.h>
|
||||
#include "exynos_drm_drv.h"
|
||||
#include "exynos_drm_encoder.h"
|
||||
|
||||
|
@ -44,8 +45,9 @@ struct exynos_drm_connector {
|
|||
/* convert exynos_video_timings to drm_display_mode */
|
||||
static inline void
|
||||
convert_to_display_mode(struct drm_display_mode *mode,
|
||||
struct fb_videomode *timing)
|
||||
struct exynos_drm_panel_info *panel)
|
||||
{
|
||||
struct fb_videomode *timing = &panel->timing;
|
||||
DRM_DEBUG_KMS("%s\n", __FILE__);
|
||||
|
||||
mode->clock = timing->pixclock / 1000;
|
||||
|
@ -60,6 +62,8 @@ convert_to_display_mode(struct drm_display_mode *mode,
|
|||
mode->vsync_start = mode->vdisplay + timing->upper_margin;
|
||||
mode->vsync_end = mode->vsync_start + timing->vsync_len;
|
||||
mode->vtotal = mode->vsync_end + timing->lower_margin;
|
||||
mode->width_mm = panel->width_mm;
|
||||
mode->height_mm = panel->height_mm;
|
||||
|
||||
if (timing->vmode & FB_VMODE_INTERLACED)
|
||||
mode->flags |= DRM_MODE_FLAG_INTERLACE;
|
||||
|
@ -148,16 +152,18 @@ static int exynos_drm_connector_get_modes(struct drm_connector *connector)
|
|||
connector->display_info.raw_edid = edid;
|
||||
} else {
|
||||
struct drm_display_mode *mode = drm_mode_create(connector->dev);
|
||||
struct fb_videomode *timing;
|
||||
struct exynos_drm_panel_info *panel;
|
||||
|
||||
if (display_ops->get_timing)
|
||||
timing = display_ops->get_timing(manager->dev);
|
||||
if (display_ops->get_panel)
|
||||
panel = display_ops->get_panel(manager->dev);
|
||||
else {
|
||||
drm_mode_destroy(connector->dev, mode);
|
||||
return 0;
|
||||
}
|
||||
|
||||
convert_to_display_mode(mode, timing);
|
||||
convert_to_display_mode(mode, panel);
|
||||
connector->display_info.width_mm = mode->width_mm;
|
||||
connector->display_info.height_mm = mode->height_mm;
|
||||
|
||||
mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
|
||||
drm_mode_set_name(mode);
|
||||
|
|
|
@ -136,7 +136,7 @@ struct exynos_drm_overlay {
|
|||
* @type: one of EXYNOS_DISPLAY_TYPE_LCD and HDMI.
|
||||
* @is_connected: check for that display is connected or not.
|
||||
* @get_edid: get edid modes from display driver.
|
||||
* @get_timing: get timing object from display driver.
|
||||
* @get_panel: get panel object from display driver.
|
||||
* @check_timing: check if timing is valid or not.
|
||||
* @power_on: display device on or off.
|
||||
*/
|
||||
|
@ -145,7 +145,7 @@ struct exynos_drm_display_ops {
|
|||
bool (*is_connected)(struct device *dev);
|
||||
int (*get_edid)(struct device *dev, struct drm_connector *connector,
|
||||
u8 *edid, int len);
|
||||
void *(*get_timing)(struct device *dev);
|
||||
void *(*get_panel)(struct device *dev);
|
||||
int (*check_timing)(struct device *dev, void *timing);
|
||||
int (*power_on)(struct device *dev, int mode);
|
||||
};
|
||||
|
|
|
@ -89,7 +89,7 @@ struct fimd_context {
|
|||
bool suspended;
|
||||
struct mutex lock;
|
||||
|
||||
struct fb_videomode *timing;
|
||||
struct exynos_drm_panel_info *panel;
|
||||
};
|
||||
|
||||
static bool fimd_display_is_connected(struct device *dev)
|
||||
|
@ -101,13 +101,13 @@ static bool fimd_display_is_connected(struct device *dev)
|
|||
return true;
|
||||
}
|
||||
|
||||
static void *fimd_get_timing(struct device *dev)
|
||||
static void *fimd_get_panel(struct device *dev)
|
||||
{
|
||||
struct fimd_context *ctx = get_fimd_context(dev);
|
||||
|
||||
DRM_DEBUG_KMS("%s\n", __FILE__);
|
||||
|
||||
return ctx->timing;
|
||||
return ctx->panel;
|
||||
}
|
||||
|
||||
static int fimd_check_timing(struct device *dev, void *timing)
|
||||
|
@ -131,7 +131,7 @@ static int fimd_display_power_on(struct device *dev, int mode)
|
|||
static struct exynos_drm_display_ops fimd_display_ops = {
|
||||
.type = EXYNOS_DISPLAY_TYPE_LCD,
|
||||
.is_connected = fimd_display_is_connected,
|
||||
.get_timing = fimd_get_timing,
|
||||
.get_panel = fimd_get_panel,
|
||||
.check_timing = fimd_check_timing,
|
||||
.power_on = fimd_display_power_on,
|
||||
};
|
||||
|
@ -193,7 +193,8 @@ static void fimd_apply(struct device *subdrv_dev)
|
|||
static void fimd_commit(struct device *dev)
|
||||
{
|
||||
struct fimd_context *ctx = get_fimd_context(dev);
|
||||
struct fb_videomode *timing = ctx->timing;
|
||||
struct exynos_drm_panel_info *panel = ctx->panel;
|
||||
struct fb_videomode *timing = &panel->timing;
|
||||
u32 val;
|
||||
|
||||
if (ctx->suspended)
|
||||
|
@ -786,7 +787,7 @@ static int __devinit fimd_probe(struct platform_device *pdev)
|
|||
struct fimd_context *ctx;
|
||||
struct exynos_drm_subdrv *subdrv;
|
||||
struct exynos_drm_fimd_pdata *pdata;
|
||||
struct fb_videomode *timing;
|
||||
struct exynos_drm_panel_info *panel;
|
||||
struct resource *res;
|
||||
int win;
|
||||
int ret = -EINVAL;
|
||||
|
@ -799,9 +800,9 @@ static int __devinit fimd_probe(struct platform_device *pdev)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
timing = &pdata->timing;
|
||||
if (!timing) {
|
||||
dev_err(dev, "timing is null.\n");
|
||||
panel = &pdata->panel;
|
||||
if (!panel) {
|
||||
dev_err(dev, "panel is null.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -863,16 +864,16 @@ static int __devinit fimd_probe(struct platform_device *pdev)
|
|||
goto err_req_irq;
|
||||
}
|
||||
|
||||
ctx->clkdiv = fimd_calc_clkdiv(ctx, timing);
|
||||
ctx->clkdiv = fimd_calc_clkdiv(ctx, &panel->timing);
|
||||
ctx->vidcon0 = pdata->vidcon0;
|
||||
ctx->vidcon1 = pdata->vidcon1;
|
||||
ctx->default_win = pdata->default_win;
|
||||
ctx->timing = timing;
|
||||
ctx->panel = panel;
|
||||
|
||||
timing->pixclock = clk_get_rate(ctx->lcd_clk) / ctx->clkdiv;
|
||||
panel->timing.pixclock = clk_get_rate(ctx->lcd_clk) / ctx->clkdiv;
|
||||
|
||||
DRM_DEBUG_KMS("pixel clock = %d, clkdiv = %d\n",
|
||||
timing->pixclock, ctx->clkdiv);
|
||||
panel->timing.pixclock, ctx->clkdiv);
|
||||
|
||||
subdrv = &ctx->subdrv;
|
||||
|
||||
|
|
|
@ -4680,8 +4680,17 @@ sandybridge_compute_sprite_srwm(struct drm_device *dev, int plane,
|
|||
|
||||
crtc = intel_get_crtc_for_plane(dev, plane);
|
||||
clock = crtc->mode.clock;
|
||||
if (!clock) {
|
||||
*sprite_wm = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
line_time_us = (sprite_width * 1000) / clock;
|
||||
if (!line_time_us) {
|
||||
*sprite_wm = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
line_count = (latency_ns / line_time_us + 1000) / 1000;
|
||||
line_size = sprite_width * pixel_size;
|
||||
|
||||
|
@ -6175,7 +6184,7 @@ void intel_crtc_load_lut(struct drm_crtc *crtc)
|
|||
int i;
|
||||
|
||||
/* The clocks have to be on to load the palette. */
|
||||
if (!crtc->enabled)
|
||||
if (!crtc->enabled || !intel_crtc->active)
|
||||
return;
|
||||
|
||||
/* use legacy palette for Ironlake */
|
||||
|
@ -6561,7 +6570,7 @@ intel_framebuffer_create_for_mode(struct drm_device *dev,
|
|||
mode_cmd.height = mode->vdisplay;
|
||||
mode_cmd.pitches[0] = intel_framebuffer_pitch_for_width(mode_cmd.width,
|
||||
bpp);
|
||||
mode_cmd.pixel_format = 0;
|
||||
mode_cmd.pixel_format = drm_mode_legacy_fb_format(bpp, depth);
|
||||
|
||||
return intel_framebuffer_create(dev, &mode_cmd, obj);
|
||||
}
|
||||
|
@ -8185,7 +8194,7 @@ void gen6_enable_rps(struct drm_i915_private *dev_priv)
|
|||
|
||||
if (intel_enable_rc6(dev_priv->dev))
|
||||
rc6_mask = GEN6_RC_CTL_RC6_ENABLE |
|
||||
(IS_GEN7(dev_priv->dev)) ? GEN6_RC_CTL_RC6p_ENABLE : 0;
|
||||
((IS_GEN7(dev_priv->dev)) ? GEN6_RC_CTL_RC6p_ENABLE : 0);
|
||||
|
||||
I915_WRITE(GEN6_RC_CONTROL,
|
||||
rc6_mask |
|
||||
|
|
|
@ -301,7 +301,7 @@ static int init_ring_common(struct intel_ring_buffer *ring)
|
|||
|
||||
I915_WRITE_CTL(ring,
|
||||
((ring->size - PAGE_SIZE) & RING_NR_PAGES)
|
||||
| RING_REPORT_64K | RING_VALID);
|
||||
| RING_VALID);
|
||||
|
||||
/* If the head is still not zero, the ring is dead */
|
||||
if ((I915_READ_CTL(ring) & RING_VALID) == 0 ||
|
||||
|
@ -1132,18 +1132,6 @@ int intel_wait_ring_buffer(struct intel_ring_buffer *ring, int n)
|
|||
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(ring);
|
||||
if (drm_core_check_feature(dev, DRIVER_GEM))
|
||||
|
|
|
@ -1304,6 +1304,7 @@ static int r600_check_texture_resource(struct radeon_cs_parser *p, u32 idx,
|
|||
h0 = G_038004_TEX_HEIGHT(word1) + 1;
|
||||
d0 = G_038004_TEX_DEPTH(word1);
|
||||
nfaces = 1;
|
||||
array = 0;
|
||||
switch (G_038000_DIM(word0)) {
|
||||
case V_038000_SQ_TEX_DIM_1D:
|
||||
case V_038000_SQ_TEX_DIM_2D:
|
||||
|
|
|
@ -1117,13 +1117,23 @@ static int radeon_dp_get_modes(struct drm_connector *connector)
|
|||
(connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) {
|
||||
struct drm_display_mode *mode;
|
||||
|
||||
if (!radeon_dig_connector->edp_on)
|
||||
atombios_set_edp_panel_power(connector,
|
||||
ATOM_TRANSMITTER_ACTION_POWER_ON);
|
||||
ret = radeon_ddc_get_modes(radeon_connector);
|
||||
if (!radeon_dig_connector->edp_on)
|
||||
atombios_set_edp_panel_power(connector,
|
||||
ATOM_TRANSMITTER_ACTION_POWER_OFF);
|
||||
if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) {
|
||||
if (!radeon_dig_connector->edp_on)
|
||||
atombios_set_edp_panel_power(connector,
|
||||
ATOM_TRANSMITTER_ACTION_POWER_ON);
|
||||
ret = radeon_ddc_get_modes(radeon_connector);
|
||||
if (!radeon_dig_connector->edp_on)
|
||||
atombios_set_edp_panel_power(connector,
|
||||
ATOM_TRANSMITTER_ACTION_POWER_OFF);
|
||||
} else {
|
||||
/* need to setup ddc on the bridge */
|
||||
if (radeon_connector_encoder_get_dp_bridge_encoder_id(connector) !=
|
||||
ENCODER_OBJECT_ID_NONE) {
|
||||
if (encoder)
|
||||
radeon_atom_ext_encoder_setup_ddc(encoder);
|
||||
}
|
||||
ret = radeon_ddc_get_modes(radeon_connector);
|
||||
}
|
||||
|
||||
if (ret > 0) {
|
||||
if (encoder) {
|
||||
|
@ -1134,7 +1144,6 @@ static int radeon_dp_get_modes(struct drm_connector *connector)
|
|||
return ret;
|
||||
}
|
||||
|
||||
encoder = radeon_best_single_encoder(connector);
|
||||
if (!encoder)
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -597,13 +597,13 @@ int radeon_vm_bo_rmv(struct radeon_device *rdev,
|
|||
if (bo_va == NULL)
|
||||
return 0;
|
||||
|
||||
list_del(&bo_va->bo_list);
|
||||
mutex_lock(&vm->mutex);
|
||||
radeon_mutex_lock(&rdev->cs_mutex);
|
||||
radeon_vm_bo_update_pte(rdev, vm, bo, NULL);
|
||||
radeon_mutex_unlock(&rdev->cs_mutex);
|
||||
list_del(&bo_va->vm_list);
|
||||
mutex_unlock(&vm->mutex);
|
||||
list_del(&bo_va->bo_list);
|
||||
|
||||
kfree(bo_va);
|
||||
return 0;
|
||||
|
|
|
@ -178,6 +178,16 @@ static inline void f75375_write16(struct i2c_client *client, u8 reg,
|
|||
i2c_smbus_write_byte_data(client, reg + 1, (value & 0xFF));
|
||||
}
|
||||
|
||||
static void f75375_write_pwm(struct i2c_client *client, int nr)
|
||||
{
|
||||
struct f75375_data *data = i2c_get_clientdata(client);
|
||||
if (data->kind == f75387)
|
||||
f75375_write16(client, F75375_REG_FAN_EXP(nr), data->pwm[nr]);
|
||||
else
|
||||
f75375_write8(client, F75375_REG_FAN_PWM_DUTY(nr),
|
||||
data->pwm[nr]);
|
||||
}
|
||||
|
||||
static struct f75375_data *f75375_update_device(struct device *dev)
|
||||
{
|
||||
struct i2c_client *client = to_i2c_client(dev);
|
||||
|
@ -254,6 +264,36 @@ static inline u16 rpm_to_reg(int rpm)
|
|||
return 1500000 / rpm;
|
||||
}
|
||||
|
||||
static bool duty_mode_enabled(u8 pwm_enable)
|
||||
{
|
||||
switch (pwm_enable) {
|
||||
case 0: /* Manual, duty mode (full speed) */
|
||||
case 1: /* Manual, duty mode */
|
||||
case 4: /* Auto, duty mode */
|
||||
return true;
|
||||
case 2: /* Auto, speed mode */
|
||||
case 3: /* Manual, speed mode */
|
||||
return false;
|
||||
default:
|
||||
BUG();
|
||||
}
|
||||
}
|
||||
|
||||
static bool auto_mode_enabled(u8 pwm_enable)
|
||||
{
|
||||
switch (pwm_enable) {
|
||||
case 0: /* Manual, duty mode (full speed) */
|
||||
case 1: /* Manual, duty mode */
|
||||
case 3: /* Manual, speed mode */
|
||||
return false;
|
||||
case 2: /* Auto, speed mode */
|
||||
case 4: /* Auto, duty mode */
|
||||
return true;
|
||||
default:
|
||||
BUG();
|
||||
}
|
||||
}
|
||||
|
||||
static ssize_t set_fan_min(struct device *dev, struct device_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
|
@ -287,6 +327,11 @@ static ssize_t set_fan_target(struct device *dev, struct device_attribute *attr,
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if (auto_mode_enabled(data->pwm_enable[nr]))
|
||||
return -EINVAL;
|
||||
if (data->kind == f75387 && duty_mode_enabled(data->pwm_enable[nr]))
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
data->fan_target[nr] = rpm_to_reg(val);
|
||||
f75375_write16(client, F75375_REG_FAN_EXP(nr), data->fan_target[nr]);
|
||||
|
@ -307,9 +352,13 @@ static ssize_t set_pwm(struct device *dev, struct device_attribute *attr,
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if (auto_mode_enabled(data->pwm_enable[nr]) ||
|
||||
!duty_mode_enabled(data->pwm_enable[nr]))
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
data->pwm[nr] = SENSORS_LIMIT(val, 0, 255);
|
||||
f75375_write8(client, F75375_REG_FAN_PWM_DUTY(nr), data->pwm[nr]);
|
||||
f75375_write_pwm(client, nr);
|
||||
mutex_unlock(&data->update_lock);
|
||||
return count;
|
||||
}
|
||||
|
@ -327,11 +376,15 @@ static int set_pwm_enable_direct(struct i2c_client *client, int nr, int val)
|
|||
struct f75375_data *data = i2c_get_clientdata(client);
|
||||
u8 fanmode;
|
||||
|
||||
if (val < 0 || val > 3)
|
||||
if (val < 0 || val > 4)
|
||||
return -EINVAL;
|
||||
|
||||
fanmode = f75375_read8(client, F75375_REG_FAN_TIMER);
|
||||
if (data->kind == f75387) {
|
||||
/* For now, deny dangerous toggling of duty mode */
|
||||
if (duty_mode_enabled(data->pwm_enable[nr]) !=
|
||||
duty_mode_enabled(val))
|
||||
return -EOPNOTSUPP;
|
||||
/* clear each fanX_mode bit before setting them properly */
|
||||
fanmode &= ~(1 << F75387_FAN_DUTY_MODE(nr));
|
||||
fanmode &= ~(1 << F75387_FAN_MANU_MODE(nr));
|
||||
|
@ -345,12 +398,14 @@ static int set_pwm_enable_direct(struct i2c_client *client, int nr, int val)
|
|||
fanmode |= (1 << F75387_FAN_MANU_MODE(nr));
|
||||
fanmode |= (1 << F75387_FAN_DUTY_MODE(nr));
|
||||
break;
|
||||
case 2: /* AUTOMATIC*/
|
||||
fanmode |= (1 << F75387_FAN_DUTY_MODE(nr));
|
||||
case 2: /* Automatic, speed mode */
|
||||
break;
|
||||
case 3: /* fan speed */
|
||||
fanmode |= (1 << F75387_FAN_MANU_MODE(nr));
|
||||
break;
|
||||
case 4: /* Automatic, pwm */
|
||||
fanmode |= (1 << F75387_FAN_DUTY_MODE(nr));
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
/* clear each fanX_mode bit before setting them properly */
|
||||
|
@ -368,14 +423,15 @@ static int set_pwm_enable_direct(struct i2c_client *client, int nr, int val)
|
|||
break;
|
||||
case 3: /* fan speed */
|
||||
break;
|
||||
case 4: /* Automatic pwm */
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
f75375_write8(client, F75375_REG_FAN_TIMER, fanmode);
|
||||
data->pwm_enable[nr] = val;
|
||||
if (val == 0)
|
||||
f75375_write8(client, F75375_REG_FAN_PWM_DUTY(nr),
|
||||
data->pwm[nr]);
|
||||
f75375_write_pwm(client, nr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -726,14 +782,17 @@ static void f75375_init(struct i2c_client *client, struct f75375_data *data,
|
|||
|
||||
manu = ((mode >> F75387_FAN_MANU_MODE(nr)) & 1);
|
||||
duty = ((mode >> F75387_FAN_DUTY_MODE(nr)) & 1);
|
||||
if (manu && duty)
|
||||
/* speed */
|
||||
if (!manu && duty)
|
||||
/* auto, pwm */
|
||||
data->pwm_enable[nr] = 4;
|
||||
else if (manu && !duty)
|
||||
/* manual, speed */
|
||||
data->pwm_enable[nr] = 3;
|
||||
else if (!manu && duty)
|
||||
/* automatic */
|
||||
else if (!manu && !duty)
|
||||
/* automatic, speed */
|
||||
data->pwm_enable[nr] = 2;
|
||||
else
|
||||
/* manual */
|
||||
/* manual, pwm */
|
||||
data->pwm_enable[nr] = 1;
|
||||
} else {
|
||||
if (!(conf & (1 << F75375_FAN_CTRL_LINEAR(nr))))
|
||||
|
@ -758,9 +817,11 @@ static void f75375_init(struct i2c_client *client, struct f75375_data *data,
|
|||
set_pwm_enable_direct(client, 0, f75375s_pdata->pwm_enable[0]);
|
||||
set_pwm_enable_direct(client, 1, f75375s_pdata->pwm_enable[1]);
|
||||
for (nr = 0; nr < 2; nr++) {
|
||||
if (auto_mode_enabled(f75375s_pdata->pwm_enable[nr]) ||
|
||||
!duty_mode_enabled(f75375s_pdata->pwm_enable[nr]))
|
||||
continue;
|
||||
data->pwm[nr] = SENSORS_LIMIT(f75375s_pdata->pwm[nr], 0, 255);
|
||||
f75375_write8(client, F75375_REG_FAN_PWM_DUTY(nr),
|
||||
data->pwm[nr]);
|
||||
f75375_write_pwm(client, nr);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -787,7 +848,7 @@ static int f75375_probe(struct i2c_client *client,
|
|||
if (err)
|
||||
goto exit_free;
|
||||
|
||||
if (data->kind == f75375) {
|
||||
if (data->kind != f75373) {
|
||||
err = sysfs_chmod_file(&client->dev.kobj,
|
||||
&sensor_dev_attr_pwm1_mode.dev_attr.attr,
|
||||
S_IRUGO | S_IWUSR);
|
||||
|
|
|
@ -72,6 +72,7 @@
|
|||
|
||||
#define MXS_I2C_QUEUESTAT (0x70)
|
||||
#define MXS_I2C_QUEUESTAT_RD_QUEUE_EMPTY 0x00002000
|
||||
#define MXS_I2C_QUEUESTAT_WRITE_QUEUE_CNT_MASK 0x0000001F
|
||||
|
||||
#define MXS_I2C_QUEUECMD (0x80)
|
||||
|
||||
|
@ -219,14 +220,14 @@ static int mxs_i2c_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg,
|
|||
int ret;
|
||||
int flags;
|
||||
|
||||
init_completion(&i2c->cmd_complete);
|
||||
|
||||
dev_dbg(i2c->dev, "addr: 0x%04x, len: %d, flags: 0x%x, stop: %d\n",
|
||||
msg->addr, msg->len, msg->flags, stop);
|
||||
|
||||
if (msg->len == 0)
|
||||
return -EINVAL;
|
||||
|
||||
init_completion(&i2c->cmd_complete);
|
||||
|
||||
flags = stop ? MXS_I2C_CTRL0_POST_SEND_STOP : 0;
|
||||
|
||||
if (msg->flags & I2C_M_RD)
|
||||
|
@ -286,6 +287,7 @@ static irqreturn_t mxs_i2c_isr(int this_irq, void *dev_id)
|
|||
{
|
||||
struct mxs_i2c_dev *i2c = dev_id;
|
||||
u32 stat = readl(i2c->regs + MXS_I2C_CTRL1) & MXS_I2C_IRQ_MASK;
|
||||
bool is_last_cmd;
|
||||
|
||||
if (!stat)
|
||||
return IRQ_NONE;
|
||||
|
@ -300,9 +302,14 @@ static irqreturn_t mxs_i2c_isr(int this_irq, void *dev_id)
|
|||
else
|
||||
i2c->cmd_err = 0;
|
||||
|
||||
complete(&i2c->cmd_complete);
|
||||
is_last_cmd = (readl(i2c->regs + MXS_I2C_QUEUESTAT) &
|
||||
MXS_I2C_QUEUESTAT_WRITE_QUEUE_CNT_MASK) == 0;
|
||||
|
||||
if (is_last_cmd || i2c->cmd_err)
|
||||
complete(&i2c->cmd_complete);
|
||||
|
||||
writel(stat, i2c->regs + MXS_I2C_CTRL1_CLR);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,8 @@ static ssize_t debug_read_ver(struct file *file, char __user *userbuf,
|
|||
static ssize_t debug_read_regs(struct file *file, char __user *userbuf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct omap_iommu *obj = file->private_data;
|
||||
struct device *dev = file->private_data;
|
||||
struct omap_iommu *obj = dev_to_omap_iommu(dev);
|
||||
char *p, *buf;
|
||||
ssize_t bytes;
|
||||
|
||||
|
@ -67,7 +68,8 @@ static ssize_t debug_read_regs(struct file *file, char __user *userbuf,
|
|||
static ssize_t debug_read_tlb(struct file *file, char __user *userbuf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct omap_iommu *obj = file->private_data;
|
||||
struct device *dev = file->private_data;
|
||||
struct omap_iommu *obj = dev_to_omap_iommu(dev);
|
||||
char *p, *buf;
|
||||
ssize_t bytes, rest;
|
||||
|
||||
|
@ -97,7 +99,8 @@ static ssize_t debug_write_pagetable(struct file *file,
|
|||
struct iotlb_entry e;
|
||||
struct cr_regs cr;
|
||||
int err;
|
||||
struct omap_iommu *obj = file->private_data;
|
||||
struct device *dev = file->private_data;
|
||||
struct omap_iommu *obj = dev_to_omap_iommu(dev);
|
||||
char buf[MAXCOLUMN], *p = buf;
|
||||
|
||||
count = min(count, sizeof(buf));
|
||||
|
@ -184,7 +187,8 @@ out:
|
|||
static ssize_t debug_read_pagetable(struct file *file, char __user *userbuf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct omap_iommu *obj = file->private_data;
|
||||
struct device *dev = file->private_data;
|
||||
struct omap_iommu *obj = dev_to_omap_iommu(dev);
|
||||
char *p, *buf;
|
||||
size_t bytes;
|
||||
|
||||
|
@ -212,7 +216,8 @@ static ssize_t debug_read_pagetable(struct file *file, char __user *userbuf,
|
|||
static ssize_t debug_read_mmap(struct file *file, char __user *userbuf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct omap_iommu *obj = file->private_data;
|
||||
struct device *dev = file->private_data;
|
||||
struct omap_iommu *obj = dev_to_omap_iommu(dev);
|
||||
char *p, *buf;
|
||||
struct iovm_struct *tmp;
|
||||
int uninitialized_var(i);
|
||||
|
@ -254,7 +259,7 @@ static ssize_t debug_read_mmap(struct file *file, char __user *userbuf,
|
|||
static ssize_t debug_read_mem(struct file *file, char __user *userbuf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct omap_iommu *obj = file->private_data;
|
||||
struct device *dev = file->private_data;
|
||||
char *p, *buf;
|
||||
struct iovm_struct *area;
|
||||
ssize_t bytes;
|
||||
|
@ -268,8 +273,8 @@ static ssize_t debug_read_mem(struct file *file, char __user *userbuf,
|
|||
|
||||
mutex_lock(&iommu_debug_lock);
|
||||
|
||||
area = omap_find_iovm_area(obj, (u32)ppos);
|
||||
if (IS_ERR(area)) {
|
||||
area = omap_find_iovm_area(dev, (u32)ppos);
|
||||
if (!area) {
|
||||
bytes = -EINVAL;
|
||||
goto err_out;
|
||||
}
|
||||
|
@ -287,7 +292,7 @@ err_out:
|
|||
static ssize_t debug_write_mem(struct file *file, const char __user *userbuf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct omap_iommu *obj = file->private_data;
|
||||
struct device *dev = file->private_data;
|
||||
struct iovm_struct *area;
|
||||
char *p, *buf;
|
||||
|
||||
|
@ -305,8 +310,8 @@ static ssize_t debug_write_mem(struct file *file, const char __user *userbuf,
|
|||
goto err_out;
|
||||
}
|
||||
|
||||
area = omap_find_iovm_area(obj, (u32)ppos);
|
||||
if (IS_ERR(area)) {
|
||||
area = omap_find_iovm_area(dev, (u32)ppos);
|
||||
if (!area) {
|
||||
count = -EINVAL;
|
||||
goto err_out;
|
||||
}
|
||||
|
@ -350,7 +355,7 @@ DEBUG_FOPS(mem);
|
|||
{ \
|
||||
struct dentry *dent; \
|
||||
dent = debugfs_create_file(#attr, mode, parent, \
|
||||
obj, &debug_##attr##_fops); \
|
||||
dev, &debug_##attr##_fops); \
|
||||
if (!dent) \
|
||||
return -ENOMEM; \
|
||||
}
|
||||
|
@ -362,20 +367,29 @@ static int iommu_debug_register(struct device *dev, void *data)
|
|||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
struct omap_iommu *obj = platform_get_drvdata(pdev);
|
||||
struct omap_iommu_arch_data *arch_data;
|
||||
struct dentry *d, *parent;
|
||||
|
||||
if (!obj || !obj->dev)
|
||||
return -EINVAL;
|
||||
|
||||
arch_data = kzalloc(sizeof(*arch_data), GFP_KERNEL);
|
||||
if (!arch_data)
|
||||
return -ENOMEM;
|
||||
|
||||
arch_data->iommu_dev = obj;
|
||||
|
||||
dev->archdata.iommu = arch_data;
|
||||
|
||||
d = debugfs_create_dir(obj->name, iommu_debug_root);
|
||||
if (!d)
|
||||
return -ENOMEM;
|
||||
goto nomem;
|
||||
parent = d;
|
||||
|
||||
d = debugfs_create_u8("nr_tlb_entries", 400, parent,
|
||||
(u8 *)&obj->nr_tlb_entries);
|
||||
if (!d)
|
||||
return -ENOMEM;
|
||||
goto nomem;
|
||||
|
||||
DEBUG_ADD_FILE_RO(ver);
|
||||
DEBUG_ADD_FILE_RO(regs);
|
||||
|
@ -384,6 +398,22 @@ static int iommu_debug_register(struct device *dev, void *data)
|
|||
DEBUG_ADD_FILE_RO(mmap);
|
||||
DEBUG_ADD_FILE(mem);
|
||||
|
||||
return 0;
|
||||
|
||||
nomem:
|
||||
kfree(arch_data);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
static int iommu_debug_unregister(struct device *dev, void *data)
|
||||
{
|
||||
if (!dev->archdata.iommu)
|
||||
return 0;
|
||||
|
||||
kfree(dev->archdata.iommu);
|
||||
|
||||
dev->archdata.iommu = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -411,6 +441,7 @@ module_init(iommu_debug_init)
|
|||
static void __exit iommu_debugfs_exit(void)
|
||||
{
|
||||
debugfs_remove_recursive(iommu_debug_root);
|
||||
omap_foreach_iommu_device(NULL, iommu_debug_unregister);
|
||||
}
|
||||
module_exit(iommu_debugfs_exit)
|
||||
|
||||
|
|
|
@ -1223,7 +1223,8 @@ static int __init omap_iommu_init(void)
|
|||
|
||||
return platform_driver_register(&omap_iommu_driver);
|
||||
}
|
||||
module_init(omap_iommu_init);
|
||||
/* must be ready before omap3isp is probed */
|
||||
subsys_initcall(omap_iommu_init);
|
||||
|
||||
static void __exit omap_iommu_exit(void)
|
||||
{
|
||||
|
|
|
@ -95,11 +95,16 @@ static void sja1000_write_cmdreg(struct sja1000_priv *priv, u8 val)
|
|||
spin_unlock_irqrestore(&priv->cmdreg_lock, flags);
|
||||
}
|
||||
|
||||
static int sja1000_is_absent(struct sja1000_priv *priv)
|
||||
{
|
||||
return (priv->read_reg(priv, REG_MOD) == 0xFF);
|
||||
}
|
||||
|
||||
static int sja1000_probe_chip(struct net_device *dev)
|
||||
{
|
||||
struct sja1000_priv *priv = netdev_priv(dev);
|
||||
|
||||
if (priv->reg_base && (priv->read_reg(priv, 0) == 0xFF)) {
|
||||
if (priv->reg_base && sja1000_is_absent(priv)) {
|
||||
printk(KERN_INFO "%s: probing @0x%lX failed\n",
|
||||
DRV_NAME, dev->base_addr);
|
||||
return 0;
|
||||
|
@ -493,6 +498,9 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id)
|
|||
while ((isrc = priv->read_reg(priv, REG_IR)) && (n < SJA1000_MAX_IRQ)) {
|
||||
n++;
|
||||
status = priv->read_reg(priv, REG_SR);
|
||||
/* check for absent controller due to hw unplug */
|
||||
if (status == 0xFF && sja1000_is_absent(priv))
|
||||
return IRQ_NONE;
|
||||
|
||||
if (isrc & IRQ_WUI)
|
||||
dev_warn(dev->dev.parent, "wakeup interrupt\n");
|
||||
|
@ -509,6 +517,9 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id)
|
|||
while (status & SR_RBS) {
|
||||
sja1000_rx(dev);
|
||||
status = priv->read_reg(priv, REG_SR);
|
||||
/* check for absent controller */
|
||||
if (status == 0xFF && sja1000_is_absent(priv))
|
||||
return IRQ_NONE;
|
||||
}
|
||||
}
|
||||
if (isrc & (IRQ_DOI | IRQ_EI | IRQ_BEI | IRQ_EPI | IRQ_ALI)) {
|
||||
|
|
|
@ -2244,10 +2244,6 @@ static netdev_tx_t atl1c_xmit_frame(struct sk_buff *skb,
|
|||
dev_info(&adapter->pdev->dev, "tx locked\n");
|
||||
return NETDEV_TX_LOCKED;
|
||||
}
|
||||
if (skb->mark == 0x01)
|
||||
type = atl1c_trans_high;
|
||||
else
|
||||
type = atl1c_trans_normal;
|
||||
|
||||
if (atl1c_tpd_avail(adapter, type) < tpd_req) {
|
||||
/* no enough descriptor, just stop queue */
|
||||
|
|
|
@ -2339,7 +2339,7 @@ static inline int __init b44_pci_init(void)
|
|||
return err;
|
||||
}
|
||||
|
||||
static inline void __exit b44_pci_exit(void)
|
||||
static inline void b44_pci_exit(void)
|
||||
{
|
||||
#ifdef CONFIG_B44_PCI
|
||||
ssb_pcihost_unregister(&b44_pci_driver);
|
||||
|
|
|
@ -3584,7 +3584,11 @@ static int cnic_get_v6_route(struct sockaddr_in6 *dst_addr,
|
|||
fl6.flowi6_oif = dst_addr->sin6_scope_id;
|
||||
|
||||
*dst = ip6_route_output(&init_net, NULL, &fl6);
|
||||
if (*dst)
|
||||
if ((*dst)->error) {
|
||||
dst_release(*dst);
|
||||
*dst = NULL;
|
||||
return -ENETUNREACH;
|
||||
} else
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ static inline void cq_enet_rq_desc_dec(struct cq_enet_rq_desc *desc,
|
|||
CQ_ENET_RQ_DESC_FCOE_FC_CRC_OK) ? 1 : 0;
|
||||
*fcoe_enc_error = (desc->flags &
|
||||
CQ_ENET_RQ_DESC_FCOE_ENC_ERROR) ? 1 : 0;
|
||||
*fcoe_eof = (u8)((desc->checksum_fcoe >>
|
||||
*fcoe_eof = (u8)((le16_to_cpu(desc->checksum_fcoe) >>
|
||||
CQ_ENET_RQ_DESC_FCOE_EOF_SHIFT) &
|
||||
CQ_ENET_RQ_DESC_FCOE_EOF_MASK);
|
||||
*checksum = 0;
|
||||
|
|
|
@ -72,7 +72,7 @@ static int enic_set_port_profile(struct enic *enic, int vf)
|
|||
struct enic_port_profile *pp;
|
||||
struct vic_provinfo *vp;
|
||||
const u8 oui[3] = VIC_PROVINFO_CISCO_OUI;
|
||||
const u16 os_type = htons(VIC_GENERIC_PROV_OS_TYPE_LINUX);
|
||||
const __be16 os_type = htons(VIC_GENERIC_PROV_OS_TYPE_LINUX);
|
||||
char uuid_str[38];
|
||||
char client_mac_str[18];
|
||||
u8 *client_mac;
|
||||
|
|
|
@ -2328,19 +2328,11 @@ jme_change_mtu(struct net_device *netdev, int new_mtu)
|
|||
((new_mtu) < IPV6_MIN_MTU))
|
||||
return -EINVAL;
|
||||
|
||||
if (new_mtu > 4000) {
|
||||
jme->reg_rxcs &= ~RXCS_FIFOTHNP;
|
||||
jme->reg_rxcs |= RXCS_FIFOTHNP_64QW;
|
||||
jme_restart_rx_engine(jme);
|
||||
} else {
|
||||
jme->reg_rxcs &= ~RXCS_FIFOTHNP;
|
||||
jme->reg_rxcs |= RXCS_FIFOTHNP_128QW;
|
||||
jme_restart_rx_engine(jme);
|
||||
}
|
||||
|
||||
netdev->mtu = new_mtu;
|
||||
netdev_update_features(netdev);
|
||||
|
||||
jme_restart_rx_engine(jme);
|
||||
jme_reset_link(jme);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -730,7 +730,7 @@ enum jme_rxcs_values {
|
|||
RXCS_RETRYCNT_60 = 0x00000F00,
|
||||
|
||||
RXCS_DEFAULT = RXCS_FIFOTHTP_128T |
|
||||
RXCS_FIFOTHNP_128QW |
|
||||
RXCS_FIFOTHNP_16QW |
|
||||
RXCS_DMAREQSZ_128B |
|
||||
RXCS_RETRYGAP_256ns |
|
||||
RXCS_RETRYCNT_32,
|
||||
|
|
|
@ -1036,7 +1036,7 @@ int mlx4_assign_eq(struct mlx4_dev *dev, char* name, int * vector)
|
|||
struct mlx4_priv *priv = mlx4_priv(dev);
|
||||
int vec = 0, err = 0, i;
|
||||
|
||||
spin_lock(&priv->msix_ctl.pool_lock);
|
||||
mutex_lock(&priv->msix_ctl.pool_lock);
|
||||
for (i = 0; !vec && i < dev->caps.comp_pool; i++) {
|
||||
if (~priv->msix_ctl.pool_bm & 1ULL << i) {
|
||||
priv->msix_ctl.pool_bm |= 1ULL << i;
|
||||
|
@ -1058,7 +1058,7 @@ int mlx4_assign_eq(struct mlx4_dev *dev, char* name, int * vector)
|
|||
eq_set_ci(&priv->eq_table.eq[vec], 1);
|
||||
}
|
||||
}
|
||||
spin_unlock(&priv->msix_ctl.pool_lock);
|
||||
mutex_unlock(&priv->msix_ctl.pool_lock);
|
||||
|
||||
if (vec) {
|
||||
*vector = vec;
|
||||
|
@ -1079,13 +1079,13 @@ void mlx4_release_eq(struct mlx4_dev *dev, int vec)
|
|||
if (likely(i >= 0)) {
|
||||
/*sanity check , making sure were not trying to free irq's
|
||||
Belonging to a legacy EQ*/
|
||||
spin_lock(&priv->msix_ctl.pool_lock);
|
||||
mutex_lock(&priv->msix_ctl.pool_lock);
|
||||
if (priv->msix_ctl.pool_bm & 1ULL << i) {
|
||||
free_irq(priv->eq_table.eq[vec].irq,
|
||||
&priv->eq_table.eq[vec]);
|
||||
priv->msix_ctl.pool_bm &= ~(1ULL << i);
|
||||
}
|
||||
spin_unlock(&priv->msix_ctl.pool_lock);
|
||||
mutex_unlock(&priv->msix_ctl.pool_lock);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -531,15 +531,14 @@ int mlx4_change_port_types(struct mlx4_dev *dev,
|
|||
for (port = 0; port < dev->caps.num_ports; port++) {
|
||||
/* Change the port type only if the new type is different
|
||||
* from the current, and not set to Auto */
|
||||
if (port_types[port] != dev->caps.port_type[port + 1]) {
|
||||
if (port_types[port] != dev->caps.port_type[port + 1])
|
||||
change = 1;
|
||||
dev->caps.port_type[port + 1] = port_types[port];
|
||||
}
|
||||
}
|
||||
if (change) {
|
||||
mlx4_unregister_device(dev);
|
||||
for (port = 1; port <= dev->caps.num_ports; port++) {
|
||||
mlx4_CLOSE_PORT(dev, port);
|
||||
dev->caps.port_type[port] = port_types[port - 1];
|
||||
err = mlx4_SET_PORT(dev, port);
|
||||
if (err) {
|
||||
mlx4_err(dev, "Failed to set port %d, "
|
||||
|
@ -986,6 +985,9 @@ static int map_bf_area(struct mlx4_dev *dev)
|
|||
resource_size_t bf_len;
|
||||
int err = 0;
|
||||
|
||||
if (!dev->caps.bf_reg_size)
|
||||
return -ENXIO;
|
||||
|
||||
bf_start = pci_resource_start(dev->pdev, 2) +
|
||||
(dev->caps.num_uars << PAGE_SHIFT);
|
||||
bf_len = pci_resource_len(dev->pdev, 2) -
|
||||
|
@ -1825,7 +1827,7 @@ slave_start:
|
|||
goto err_master_mfunc;
|
||||
|
||||
priv->msix_ctl.pool_bm = 0;
|
||||
spin_lock_init(&priv->msix_ctl.pool_lock);
|
||||
mutex_init(&priv->msix_ctl.pool_lock);
|
||||
|
||||
mlx4_enable_msi_x(dev);
|
||||
if ((mlx4_is_mfunc(dev)) &&
|
||||
|
|
|
@ -697,7 +697,7 @@ struct mlx4_sense {
|
|||
|
||||
struct mlx4_msix_ctl {
|
||||
u64 pool_bm;
|
||||
spinlock_t pool_lock;
|
||||
struct mutex pool_lock;
|
||||
};
|
||||
|
||||
struct mlx4_steer {
|
||||
|
|
|
@ -1545,7 +1545,7 @@ static int __devinit ks8851_probe(struct platform_device *pdev)
|
|||
|
||||
netdev->irq = platform_get_irq(pdev, 0);
|
||||
|
||||
if (netdev->irq < 0) {
|
||||
if ((int)netdev->irq < 0) {
|
||||
err = netdev->irq;
|
||||
goto err_get_irq;
|
||||
}
|
||||
|
|
|
@ -156,11 +156,10 @@ static int efx_init_rx_buffers_skb(struct efx_rx_queue *rx_queue)
|
|||
if (unlikely(!skb))
|
||||
return -ENOMEM;
|
||||
|
||||
/* Adjust the SKB for padding and checksum */
|
||||
/* Adjust the SKB for padding */
|
||||
skb_reserve(skb, NET_IP_ALIGN);
|
||||
rx_buf->len = skb_len - NET_IP_ALIGN;
|
||||
rx_buf->is_page = false;
|
||||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
|
||||
rx_buf->dma_addr = pci_map_single(efx->pci_dev,
|
||||
skb->data, rx_buf->len,
|
||||
|
@ -496,6 +495,7 @@ static void efx_rx_packet_gro(struct efx_channel *channel,
|
|||
|
||||
EFX_BUG_ON_PARANOID(!checksummed);
|
||||
rx_buf->u.skb = NULL;
|
||||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
|
||||
gro_result = napi_gro_receive(napi, skb);
|
||||
}
|
||||
|
|
|
@ -1009,7 +1009,7 @@ static void emac_rx_handler(void *token, int len, int status)
|
|||
int ret;
|
||||
|
||||
/* free and bail if we are shutting down */
|
||||
if (unlikely(!netif_running(ndev) || !netif_carrier_ok(ndev))) {
|
||||
if (unlikely(!netif_running(ndev))) {
|
||||
dev_kfree_skb_any(skb);
|
||||
return;
|
||||
}
|
||||
|
@ -1038,7 +1038,9 @@ static void emac_rx_handler(void *token, int len, int status)
|
|||
recycle:
|
||||
ret = cpdma_chan_submit(priv->rxchan, skb, skb->data,
|
||||
skb_tailroom(skb), GFP_KERNEL);
|
||||
if (WARN_ON(ret < 0))
|
||||
|
||||
WARN_ON(ret == -ENOMEM);
|
||||
if (unlikely(ret < 0))
|
||||
dev_kfree_skb_any(skb);
|
||||
}
|
||||
|
||||
|
|
|
@ -30,16 +30,16 @@
|
|||
#include <asm/irq.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
MODULE_DESCRIPTION("ICPlus IP175C/IP101A/IC1001 PHY drivers");
|
||||
MODULE_DESCRIPTION("ICPlus IP175C/IP101A/IP101G/IC1001 PHY drivers");
|
||||
MODULE_AUTHOR("Michael Barkowski");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
/* IP101A/IP1001 */
|
||||
#define IP10XX_SPEC_CTRL_STATUS 16 /* Spec. Control Register */
|
||||
#define IP1001_SPEC_CTRL_STATUS_2 20 /* IP1001 Spec. Control Reg 2 */
|
||||
#define IP1001_PHASE_SEL_MASK 3 /* IP1001 RX/TXPHASE_SEL */
|
||||
#define IP1001_APS_ON 11 /* IP1001 APS Mode bit */
|
||||
#define IP101A_APS_ON 2 /* IP101A APS Mode bit */
|
||||
/* IP101A/G - IP1001 */
|
||||
#define IP10XX_SPEC_CTRL_STATUS 16 /* Spec. Control Register */
|
||||
#define IP1001_SPEC_CTRL_STATUS_2 20 /* IP1001 Spec. Control Reg 2 */
|
||||
#define IP1001_PHASE_SEL_MASK 3 /* IP1001 RX/TXPHASE_SEL */
|
||||
#define IP1001_APS_ON 11 /* IP1001 APS Mode bit */
|
||||
#define IP101A_G_APS_ON 2 /* IP101A/G APS Mode bit */
|
||||
|
||||
static int ip175c_config_init(struct phy_device *phydev)
|
||||
{
|
||||
|
@ -98,20 +98,24 @@ static int ip175c_config_init(struct phy_device *phydev)
|
|||
|
||||
static int ip1xx_reset(struct phy_device *phydev)
|
||||
{
|
||||
int err, bmcr;
|
||||
int bmcr;
|
||||
|
||||
/* Software Reset PHY */
|
||||
bmcr = phy_read(phydev, MII_BMCR);
|
||||
if (bmcr < 0)
|
||||
return bmcr;
|
||||
bmcr |= BMCR_RESET;
|
||||
err = phy_write(phydev, MII_BMCR, bmcr);
|
||||
if (err < 0)
|
||||
return err;
|
||||
bmcr = phy_write(phydev, MII_BMCR, bmcr);
|
||||
if (bmcr < 0)
|
||||
return bmcr;
|
||||
|
||||
do {
|
||||
bmcr = phy_read(phydev, MII_BMCR);
|
||||
if (bmcr < 0)
|
||||
return bmcr;
|
||||
} while (bmcr & BMCR_RESET);
|
||||
|
||||
return err;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ip1001_config_init(struct phy_device *phydev)
|
||||
|
@ -124,7 +128,10 @@ static int ip1001_config_init(struct phy_device *phydev)
|
|||
|
||||
/* Enable Auto Power Saving mode */
|
||||
c = phy_read(phydev, IP1001_SPEC_CTRL_STATUS_2);
|
||||
if (c < 0)
|
||||
return c;
|
||||
c |= IP1001_APS_ON;
|
||||
c = phy_write(phydev, IP1001_SPEC_CTRL_STATUS_2, c);
|
||||
if (c < 0)
|
||||
return c;
|
||||
|
||||
|
@ -132,14 +139,19 @@ static int ip1001_config_init(struct phy_device *phydev)
|
|||
/* Additional delay (2ns) used to adjust RX clock phase
|
||||
* at RGMII interface */
|
||||
c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS);
|
||||
if (c < 0)
|
||||
return c;
|
||||
|
||||
c |= IP1001_PHASE_SEL_MASK;
|
||||
c = phy_write(phydev, IP10XX_SPEC_CTRL_STATUS, c);
|
||||
if (c < 0)
|
||||
return c;
|
||||
}
|
||||
|
||||
return c;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ip101a_config_init(struct phy_device *phydev)
|
||||
static int ip101a_g_config_init(struct phy_device *phydev)
|
||||
{
|
||||
int c;
|
||||
|
||||
|
@ -149,7 +161,7 @@ static int ip101a_config_init(struct phy_device *phydev)
|
|||
|
||||
/* Enable Auto Power Saving mode */
|
||||
c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS);
|
||||
c |= IP101A_APS_ON;
|
||||
c |= IP101A_G_APS_ON;
|
||||
return c;
|
||||
}
|
||||
|
||||
|
@ -191,6 +203,7 @@ static struct phy_driver ip1001_driver = {
|
|||
.phy_id_mask = 0x0ffffff0,
|
||||
.features = PHY_GBIT_FEATURES | SUPPORTED_Pause |
|
||||
SUPPORTED_Asym_Pause,
|
||||
.flags = PHY_HAS_INTERRUPT,
|
||||
.config_init = &ip1001_config_init,
|
||||
.config_aneg = &genphy_config_aneg,
|
||||
.read_status = &genphy_read_status,
|
||||
|
@ -199,13 +212,14 @@ static struct phy_driver ip1001_driver = {
|
|||
.driver = { .owner = THIS_MODULE,},
|
||||
};
|
||||
|
||||
static struct phy_driver ip101a_driver = {
|
||||
static struct phy_driver ip101a_g_driver = {
|
||||
.phy_id = 0x02430c54,
|
||||
.name = "ICPlus IP101A",
|
||||
.name = "ICPlus IP101A/G",
|
||||
.phy_id_mask = 0x0ffffff0,
|
||||
.features = PHY_BASIC_FEATURES | SUPPORTED_Pause |
|
||||
SUPPORTED_Asym_Pause,
|
||||
.config_init = &ip101a_config_init,
|
||||
.flags = PHY_HAS_INTERRUPT,
|
||||
.config_init = &ip101a_g_config_init,
|
||||
.config_aneg = &genphy_config_aneg,
|
||||
.read_status = &genphy_read_status,
|
||||
.suspend = genphy_suspend,
|
||||
|
@ -221,7 +235,7 @@ static int __init icplus_init(void)
|
|||
if (ret < 0)
|
||||
return -ENODEV;
|
||||
|
||||
ret = phy_driver_register(&ip101a_driver);
|
||||
ret = phy_driver_register(&ip101a_g_driver);
|
||||
if (ret < 0)
|
||||
return -ENODEV;
|
||||
|
||||
|
@ -231,7 +245,7 @@ static int __init icplus_init(void)
|
|||
static void __exit icplus_exit(void)
|
||||
{
|
||||
phy_driver_unregister(&ip1001_driver);
|
||||
phy_driver_unregister(&ip101a_driver);
|
||||
phy_driver_unregister(&ip101a_g_driver);
|
||||
phy_driver_unregister(&ip175c_driver);
|
||||
}
|
||||
|
||||
|
@ -241,6 +255,7 @@ module_exit(icplus_exit);
|
|||
static struct mdio_device_id __maybe_unused icplus_tbl[] = {
|
||||
{ 0x02430d80, 0x0ffffff0 },
|
||||
{ 0x02430d90, 0x0ffffff0 },
|
||||
{ 0x02430c54, 0x0ffffff0 },
|
||||
{ }
|
||||
};
|
||||
|
||||
|
|
|
@ -2024,14 +2024,22 @@ ppp_mp_reconstruct(struct ppp *ppp)
|
|||
continue;
|
||||
}
|
||||
if (PPP_MP_CB(p)->sequence != seq) {
|
||||
u32 oldseq;
|
||||
/* Fragment `seq' is missing. If it is after
|
||||
minseq, it might arrive later, so stop here. */
|
||||
if (seq_after(seq, minseq))
|
||||
break;
|
||||
/* Fragment `seq' is lost, keep going. */
|
||||
lost = 1;
|
||||
oldseq = seq;
|
||||
seq = seq_before(minseq, PPP_MP_CB(p)->sequence)?
|
||||
minseq + 1: PPP_MP_CB(p)->sequence;
|
||||
|
||||
if (ppp->debug & 1)
|
||||
netdev_printk(KERN_DEBUG, ppp->dev,
|
||||
"lost frag %u..%u\n",
|
||||
oldseq, seq-1);
|
||||
|
||||
goto again;
|
||||
}
|
||||
|
||||
|
@ -2076,6 +2084,10 @@ ppp_mp_reconstruct(struct ppp *ppp)
|
|||
struct sk_buff *tmp2;
|
||||
|
||||
skb_queue_reverse_walk_from_safe(list, p, tmp2) {
|
||||
if (ppp->debug & 1)
|
||||
netdev_printk(KERN_DEBUG, ppp->dev,
|
||||
"discarding frag %u\n",
|
||||
PPP_MP_CB(p)->sequence);
|
||||
__skb_unlink(p, list);
|
||||
kfree_skb(p);
|
||||
}
|
||||
|
@ -2091,6 +2103,17 @@ ppp_mp_reconstruct(struct ppp *ppp)
|
|||
/* If we have discarded any fragments,
|
||||
signal a receive error. */
|
||||
if (PPP_MP_CB(head)->sequence != ppp->nextseq) {
|
||||
skb_queue_walk_safe(list, p, tmp) {
|
||||
if (p == head)
|
||||
break;
|
||||
if (ppp->debug & 1)
|
||||
netdev_printk(KERN_DEBUG, ppp->dev,
|
||||
"discarding frag %u\n",
|
||||
PPP_MP_CB(p)->sequence);
|
||||
__skb_unlink(p, list);
|
||||
kfree_skb(p);
|
||||
}
|
||||
|
||||
if (ppp->debug & 1)
|
||||
netdev_printk(KERN_DEBUG, ppp->dev,
|
||||
" missed pkts %u..%u\n",
|
||||
|
|
|
@ -573,6 +573,13 @@ static const struct usb_device_id products [] = {
|
|||
.driver_info = 0,
|
||||
},
|
||||
|
||||
/* Logitech Harmony 900 - uses the pseudo-MDLM (BLAN) driver */
|
||||
{
|
||||
USB_DEVICE_AND_INTERFACE_INFO(0x046d, 0xc11f, USB_CLASS_COMM,
|
||||
USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE),
|
||||
.driver_info = 0,
|
||||
},
|
||||
|
||||
/*
|
||||
* WHITELIST!!!
|
||||
*
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue