mirror of https://gitee.com/openkylin/linux.git
Merge branch 'core/rcu' into perf/core
Steve Rostedt asked for the merge of a single commit, into both the RCU and the perf/tracing tree: | Josh made a change to the tracing code that affects both the | work Paul McKenney and I are currently doing. At the last | Kernel Summit back in August, Linus said when such a case | exists, it is best to make a separate branch based off of his | tree and place the change there. This way, the repositories | that need to share the change can both pull them in and the | SHA1 will match for both. Whichever branch is pulled in first | by Linus will also pull in the necessary change for the other | branch as well. Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
commit
4553f0b90e
|
@ -210,3 +210,15 @@ Users:
|
||||||
firmware assigned instance number of the PCI
|
firmware assigned instance number of the PCI
|
||||||
device that can help in understanding the firmware
|
device that can help in understanding the firmware
|
||||||
intended order of the PCI device.
|
intended order of the PCI device.
|
||||||
|
|
||||||
|
What: /sys/bus/pci/devices/.../d3cold_allowed
|
||||||
|
Date: July 2012
|
||||||
|
Contact: Huang Ying <ying.huang@intel.com>
|
||||||
|
Description:
|
||||||
|
d3cold_allowed is bit to control whether the corresponding PCI
|
||||||
|
device can be put into D3Cold state. If it is cleared, the
|
||||||
|
device will never be put into D3Cold state. If it is set, the
|
||||||
|
device may be put into D3Cold state if other requirements are
|
||||||
|
satisfied too. Reading this attribute will show the current
|
||||||
|
value of d3cold_allowed bit. Writing this attribute will set
|
||||||
|
the value of d3cold_allowed bit.
|
||||||
|
|
|
@ -579,7 +579,7 @@ Why: KVM tracepoints provide mostly equivalent information in a much more
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
What: at91-mci driver ("CONFIG_MMC_AT91")
|
What: at91-mci driver ("CONFIG_MMC_AT91")
|
||||||
When: 3.7
|
When: 3.8
|
||||||
Why: There are two mci drivers: at91-mci and atmel-mci. The PDC support
|
Why: There are two mci drivers: at91-mci and atmel-mci. The PDC support
|
||||||
was added to atmel-mci as a first step to support more chips.
|
was added to atmel-mci as a first step to support more chips.
|
||||||
Then at91-mci was kept only for old IP versions (on at91rm9200 and
|
Then at91-mci was kept only for old IP versions (on at91rm9200 and
|
||||||
|
|
|
@ -31,7 +31,7 @@ static void keep_alive(void)
|
||||||
* or "-e" to enable the card.
|
* or "-e" to enable the card.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void term(int sig)
|
static void term(int sig)
|
||||||
{
|
{
|
||||||
close(fd);
|
close(fd);
|
||||||
fprintf(stderr, "Stopping watchdog ticks...\n");
|
fprintf(stderr, "Stopping watchdog ticks...\n");
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
||||||
VERSION = 3
|
VERSION = 3
|
||||||
PATCHLEVEL = 6
|
PATCHLEVEL = 6
|
||||||
SUBLEVEL = 0
|
SUBLEVEL = 0
|
||||||
EXTRAVERSION = -rc3
|
EXTRAVERSION = -rc5
|
||||||
NAME = Saber-toothed Squirrel
|
NAME = Saber-toothed Squirrel
|
||||||
|
|
||||||
# *DOCUMENTATION*
|
# *DOCUMENTATION*
|
||||||
|
|
|
@ -6,7 +6,7 @@ config ARM
|
||||||
select HAVE_DMA_API_DEBUG
|
select HAVE_DMA_API_DEBUG
|
||||||
select HAVE_IDE if PCI || ISA || PCMCIA
|
select HAVE_IDE if PCI || ISA || PCMCIA
|
||||||
select HAVE_DMA_ATTRS
|
select HAVE_DMA_ATTRS
|
||||||
select HAVE_DMA_CONTIGUOUS if (CPU_V6 || CPU_V6K || CPU_V7)
|
select HAVE_DMA_CONTIGUOUS if MMU
|
||||||
select HAVE_MEMBLOCK
|
select HAVE_MEMBLOCK
|
||||||
select RTC_LIB
|
select RTC_LIB
|
||||||
select SYS_SUPPORTS_APM_EMULATION
|
select SYS_SUPPORTS_APM_EMULATION
|
||||||
|
|
|
@ -15,7 +15,7 @@ / {
|
||||||
compatible = "atmel,at91sam9g25ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9";
|
compatible = "atmel,at91sam9g25ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9";
|
||||||
|
|
||||||
chosen {
|
chosen {
|
||||||
bootargs = "128M console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs";
|
bootargs = "console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
ahb {
|
ahb {
|
||||||
|
|
|
@ -33,7 +33,7 @@ CONFIG_AEABI=y
|
||||||
CONFIG_FORCE_MAX_ZONEORDER=13
|
CONFIG_FORCE_MAX_ZONEORDER=13
|
||||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||||
CONFIG_CMDLINE="console=tty0 console=ttySC1,115200 earlyprintk=sh-sci.1,115200 ignore_loglevel root=/dev/nfs ip=dhcp nfsroot=,rsize=4096,wsize=4096"
|
CONFIG_CMDLINE="console=tty0 console=ttySC1,115200 earlyprintk=sh-sci.1,115200 ignore_loglevel root=/dev/nfs ip=dhcp nfsroot=,rsize=4096,wsize=4096 rw"
|
||||||
CONFIG_CMDLINE_FORCE=y
|
CONFIG_CMDLINE_FORCE=y
|
||||||
CONFIG_KEXEC=y
|
CONFIG_KEXEC=y
|
||||||
CONFIG_VFP=y
|
CONFIG_VFP=y
|
||||||
|
|
|
@ -202,6 +202,13 @@ static inline void dma_free_writecombine(struct device *dev, size_t size,
|
||||||
return dma_free_attrs(dev, size, cpu_addr, dma_handle, &attrs);
|
return dma_free_attrs(dev, size, cpu_addr, dma_handle, &attrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This can be called during early boot to increase the size of the atomic
|
||||||
|
* coherent DMA pool above the default value of 256KiB. It must be called
|
||||||
|
* before postcore_initcall.
|
||||||
|
*/
|
||||||
|
extern void __init init_dma_coherent_pool_size(unsigned long size);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This can be called during boot to increase the size of the consistent
|
* This can be called during boot to increase the size of the consistent
|
||||||
* DMA region above it's default value of 2MB. It must be called before the
|
* DMA region above it's default value of 2MB. It must be called before the
|
||||||
|
|
|
@ -197,7 +197,7 @@ void __init at91rm9200_timer_init(void)
|
||||||
at91_st_read(AT91_ST_SR);
|
at91_st_read(AT91_ST_SR);
|
||||||
|
|
||||||
/* Make IRQs happen for the system timer */
|
/* Make IRQs happen for the system timer */
|
||||||
setup_irq(AT91_ID_SYS, &at91rm9200_timer_irq);
|
setup_irq(NR_IRQS_LEGACY + AT91_ID_SYS, &at91rm9200_timer_irq);
|
||||||
|
|
||||||
/* The 32KiHz "Slow Clock" (tick every 30517.58 nanoseconds) is used
|
/* The 32KiHz "Slow Clock" (tick every 30517.58 nanoseconds) is used
|
||||||
* directly for the clocksource and all clockevents, after adjusting
|
* directly for the clocksource and all clockevents, after adjusting
|
||||||
|
|
|
@ -726,6 +726,8 @@ static struct resource rtt_resources[] = {
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
}, {
|
}, {
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
|
}, {
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -744,10 +746,12 @@ static void __init at91_add_device_rtt_rtc(void)
|
||||||
* The second resource is needed:
|
* The second resource is needed:
|
||||||
* GPBR will serve as the storage for RTC time offset
|
* GPBR will serve as the storage for RTC time offset
|
||||||
*/
|
*/
|
||||||
at91sam9260_rtt_device.num_resources = 2;
|
at91sam9260_rtt_device.num_resources = 3;
|
||||||
rtt_resources[1].start = AT91SAM9260_BASE_GPBR +
|
rtt_resources[1].start = AT91SAM9260_BASE_GPBR +
|
||||||
4 * CONFIG_RTC_DRV_AT91SAM9_GPBR;
|
4 * CONFIG_RTC_DRV_AT91SAM9_GPBR;
|
||||||
rtt_resources[1].end = rtt_resources[1].start + 3;
|
rtt_resources[1].end = rtt_resources[1].start + 3;
|
||||||
|
rtt_resources[2].start = NR_IRQS_LEGACY + AT91_ID_SYS;
|
||||||
|
rtt_resources[2].end = NR_IRQS_LEGACY + AT91_ID_SYS;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static void __init at91_add_device_rtt_rtc(void)
|
static void __init at91_add_device_rtt_rtc(void)
|
||||||
|
|
|
@ -609,6 +609,8 @@ static struct resource rtt_resources[] = {
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
}, {
|
}, {
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
|
}, {
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -626,10 +628,12 @@ static void __init at91_add_device_rtt_rtc(void)
|
||||||
* The second resource is needed:
|
* The second resource is needed:
|
||||||
* GPBR will serve as the storage for RTC time offset
|
* GPBR will serve as the storage for RTC time offset
|
||||||
*/
|
*/
|
||||||
at91sam9261_rtt_device.num_resources = 2;
|
at91sam9261_rtt_device.num_resources = 3;
|
||||||
rtt_resources[1].start = AT91SAM9261_BASE_GPBR +
|
rtt_resources[1].start = AT91SAM9261_BASE_GPBR +
|
||||||
4 * CONFIG_RTC_DRV_AT91SAM9_GPBR;
|
4 * CONFIG_RTC_DRV_AT91SAM9_GPBR;
|
||||||
rtt_resources[1].end = rtt_resources[1].start + 3;
|
rtt_resources[1].end = rtt_resources[1].start + 3;
|
||||||
|
rtt_resources[2].start = NR_IRQS_LEGACY + AT91_ID_SYS;
|
||||||
|
rtt_resources[2].end = NR_IRQS_LEGACY + AT91_ID_SYS;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static void __init at91_add_device_rtt_rtc(void)
|
static void __init at91_add_device_rtt_rtc(void)
|
||||||
|
|
|
@ -990,6 +990,8 @@ static struct resource rtt0_resources[] = {
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
}, {
|
}, {
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
|
}, {
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1006,6 +1008,8 @@ static struct resource rtt1_resources[] = {
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
}, {
|
}, {
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
|
}, {
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1027,14 +1031,14 @@ static void __init at91_add_device_rtt_rtc(void)
|
||||||
* The second resource is needed only for the chosen RTT:
|
* The second resource is needed only for the chosen RTT:
|
||||||
* GPBR will serve as the storage for RTC time offset
|
* GPBR will serve as the storage for RTC time offset
|
||||||
*/
|
*/
|
||||||
at91sam9263_rtt0_device.num_resources = 2;
|
at91sam9263_rtt0_device.num_resources = 3;
|
||||||
at91sam9263_rtt1_device.num_resources = 1;
|
at91sam9263_rtt1_device.num_resources = 1;
|
||||||
pdev = &at91sam9263_rtt0_device;
|
pdev = &at91sam9263_rtt0_device;
|
||||||
r = rtt0_resources;
|
r = rtt0_resources;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
at91sam9263_rtt0_device.num_resources = 1;
|
at91sam9263_rtt0_device.num_resources = 1;
|
||||||
at91sam9263_rtt1_device.num_resources = 2;
|
at91sam9263_rtt1_device.num_resources = 3;
|
||||||
pdev = &at91sam9263_rtt1_device;
|
pdev = &at91sam9263_rtt1_device;
|
||||||
r = rtt1_resources;
|
r = rtt1_resources;
|
||||||
break;
|
break;
|
||||||
|
@ -1047,6 +1051,8 @@ static void __init at91_add_device_rtt_rtc(void)
|
||||||
pdev->name = "rtc-at91sam9";
|
pdev->name = "rtc-at91sam9";
|
||||||
r[1].start = AT91SAM9263_BASE_GPBR + 4 * CONFIG_RTC_DRV_AT91SAM9_GPBR;
|
r[1].start = AT91SAM9263_BASE_GPBR + 4 * CONFIG_RTC_DRV_AT91SAM9_GPBR;
|
||||||
r[1].end = r[1].start + 3;
|
r[1].end = r[1].start + 3;
|
||||||
|
r[2].start = NR_IRQS_LEGACY + AT91_ID_SYS;
|
||||||
|
r[2].end = NR_IRQS_LEGACY + AT91_ID_SYS;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static void __init at91_add_device_rtt_rtc(void)
|
static void __init at91_add_device_rtt_rtc(void)
|
||||||
|
|
|
@ -1293,6 +1293,8 @@ static struct resource rtt_resources[] = {
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
}, {
|
}, {
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
|
}, {
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1310,10 +1312,12 @@ static void __init at91_add_device_rtt_rtc(void)
|
||||||
* The second resource is needed:
|
* The second resource is needed:
|
||||||
* GPBR will serve as the storage for RTC time offset
|
* GPBR will serve as the storage for RTC time offset
|
||||||
*/
|
*/
|
||||||
at91sam9g45_rtt_device.num_resources = 2;
|
at91sam9g45_rtt_device.num_resources = 3;
|
||||||
rtt_resources[1].start = AT91SAM9G45_BASE_GPBR +
|
rtt_resources[1].start = AT91SAM9G45_BASE_GPBR +
|
||||||
4 * CONFIG_RTC_DRV_AT91SAM9_GPBR;
|
4 * CONFIG_RTC_DRV_AT91SAM9_GPBR;
|
||||||
rtt_resources[1].end = rtt_resources[1].start + 3;
|
rtt_resources[1].end = rtt_resources[1].start + 3;
|
||||||
|
rtt_resources[2].start = NR_IRQS_LEGACY + AT91_ID_SYS;
|
||||||
|
rtt_resources[2].end = NR_IRQS_LEGACY + AT91_ID_SYS;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static void __init at91_add_device_rtt_rtc(void)
|
static void __init at91_add_device_rtt_rtc(void)
|
||||||
|
|
|
@ -688,6 +688,8 @@ static struct resource rtt_resources[] = {
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
}, {
|
}, {
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
|
}, {
|
||||||
|
.flags = IORESOURCE_IRQ,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -705,10 +707,12 @@ static void __init at91_add_device_rtt_rtc(void)
|
||||||
* The second resource is needed:
|
* The second resource is needed:
|
||||||
* GPBR will serve as the storage for RTC time offset
|
* GPBR will serve as the storage for RTC time offset
|
||||||
*/
|
*/
|
||||||
at91sam9rl_rtt_device.num_resources = 2;
|
at91sam9rl_rtt_device.num_resources = 3;
|
||||||
rtt_resources[1].start = AT91SAM9RL_BASE_GPBR +
|
rtt_resources[1].start = AT91SAM9RL_BASE_GPBR +
|
||||||
4 * CONFIG_RTC_DRV_AT91SAM9_GPBR;
|
4 * CONFIG_RTC_DRV_AT91SAM9_GPBR;
|
||||||
rtt_resources[1].end = rtt_resources[1].start + 3;
|
rtt_resources[1].end = rtt_resources[1].start + 3;
|
||||||
|
rtt_resources[2].start = NR_IRQS_LEGACY + AT91_ID_SYS;
|
||||||
|
rtt_resources[2].end = NR_IRQS_LEGACY + AT91_ID_SYS;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static void __init at91_add_device_rtt_rtc(void)
|
static void __init at91_add_device_rtt_rtc(void)
|
||||||
|
|
|
@ -63,6 +63,12 @@ EXPORT_SYMBOL_GPL(at91_pmc_base);
|
||||||
|
|
||||||
#define cpu_has_300M_plla() (cpu_is_at91sam9g10())
|
#define cpu_has_300M_plla() (cpu_is_at91sam9g10())
|
||||||
|
|
||||||
|
#define cpu_has_240M_plla() (cpu_is_at91sam9261() \
|
||||||
|
|| cpu_is_at91sam9263() \
|
||||||
|
|| cpu_is_at91sam9rl())
|
||||||
|
|
||||||
|
#define cpu_has_210M_plla() (cpu_is_at91sam9260())
|
||||||
|
|
||||||
#define cpu_has_pllb() (!(cpu_is_at91sam9rl() \
|
#define cpu_has_pllb() (!(cpu_is_at91sam9rl() \
|
||||||
|| cpu_is_at91sam9g45() \
|
|| cpu_is_at91sam9g45() \
|
||||||
|| cpu_is_at91sam9x5() \
|
|| cpu_is_at91sam9x5() \
|
||||||
|
@ -706,6 +712,12 @@ static int __init at91_pmc_init(unsigned long main_clock)
|
||||||
} else if (cpu_has_800M_plla()) {
|
} else if (cpu_has_800M_plla()) {
|
||||||
if (plla.rate_hz > 800000000)
|
if (plla.rate_hz > 800000000)
|
||||||
pll_overclock = true;
|
pll_overclock = true;
|
||||||
|
} else if (cpu_has_240M_plla()) {
|
||||||
|
if (plla.rate_hz > 240000000)
|
||||||
|
pll_overclock = true;
|
||||||
|
} else if (cpu_has_210M_plla()) {
|
||||||
|
if (plla.rate_hz > 210000000)
|
||||||
|
pll_overclock = true;
|
||||||
} else {
|
} else {
|
||||||
if (plla.rate_hz > 209000000)
|
if (plla.rate_hz > 209000000)
|
||||||
pll_overclock = true;
|
pll_overclock = true;
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <asm/irq.h>
|
#include <asm/irq.h>
|
||||||
#include <asm/mach/irq.h>
|
#include <asm/mach/irq.h>
|
||||||
|
#include <asm/system_misc.h>
|
||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
|
|
||||||
#define IRQ_SOURCE(base_addr) (base_addr + 0x00)
|
#define IRQ_SOURCE(base_addr) (base_addr + 0x00)
|
||||||
|
|
|
@ -517,6 +517,13 @@ void __init kirkwood_wdt_init(void)
|
||||||
void __init kirkwood_init_early(void)
|
void __init kirkwood_init_early(void)
|
||||||
{
|
{
|
||||||
orion_time_set_base(TIMER_VIRT_BASE);
|
orion_time_set_base(TIMER_VIRT_BASE);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Some Kirkwood devices allocate their coherent buffers from atomic
|
||||||
|
* context. Increase size of atomic coherent pool to make sure such
|
||||||
|
* the allocations won't fail.
|
||||||
|
*/
|
||||||
|
init_dma_coherent_pool_size(SZ_1M);
|
||||||
}
|
}
|
||||||
|
|
||||||
int kirkwood_tclk;
|
int kirkwood_tclk;
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
|
#include <linux/sizes.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/ata_platform.h>
|
#include <linux/ata_platform.h>
|
||||||
|
|
|
@ -520,13 +520,14 @@ static struct platform_device hdmi_lcdc_device = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* GPIO KEY */
|
/* GPIO KEY */
|
||||||
#define GPIO_KEY(c, g, d) { .code = c, .gpio = g, .desc = d, .active_low = 1 }
|
#define GPIO_KEY(c, g, d, ...) \
|
||||||
|
{ .code = c, .gpio = g, .desc = d, .active_low = 1, __VA_ARGS__ }
|
||||||
|
|
||||||
static struct gpio_keys_button gpio_buttons[] = {
|
static struct gpio_keys_button gpio_buttons[] = {
|
||||||
GPIO_KEY(KEY_POWER, GPIO_PORT99, "SW1"),
|
GPIO_KEY(KEY_POWER, GPIO_PORT99, "SW3", .wakeup = 1),
|
||||||
GPIO_KEY(KEY_BACK, GPIO_PORT100, "SW2"),
|
GPIO_KEY(KEY_BACK, GPIO_PORT100, "SW4"),
|
||||||
GPIO_KEY(KEY_MENU, GPIO_PORT97, "SW3"),
|
GPIO_KEY(KEY_MENU, GPIO_PORT97, "SW5"),
|
||||||
GPIO_KEY(KEY_HOME, GPIO_PORT98, "SW4"),
|
GPIO_KEY(KEY_HOME, GPIO_PORT98, "SW6"),
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct gpio_keys_platform_data gpio_key_info = {
|
static struct gpio_keys_platform_data gpio_key_info = {
|
||||||
|
@ -901,8 +902,8 @@ static struct platform_device *eva_devices[] __initdata = {
|
||||||
&camera_device,
|
&camera_device,
|
||||||
&ceu0_device,
|
&ceu0_device,
|
||||||
&fsi_device,
|
&fsi_device,
|
||||||
&fsi_hdmi_device,
|
|
||||||
&fsi_wm8978_device,
|
&fsi_wm8978_device,
|
||||||
|
&fsi_hdmi_device,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void __init eva_clock_init(void)
|
static void __init eva_clock_init(void)
|
||||||
|
|
|
@ -695,6 +695,7 @@ static struct platform_device usbhs0_device = {
|
||||||
* - J30 "open"
|
* - J30 "open"
|
||||||
* - modify usbhs1_get_id() USBHS_HOST -> USBHS_GADGET
|
* - modify usbhs1_get_id() USBHS_HOST -> USBHS_GADGET
|
||||||
* - add .get_vbus = usbhs_get_vbus in usbhs1_private
|
* - add .get_vbus = usbhs_get_vbus in usbhs1_private
|
||||||
|
* - check usbhs0_device(pio)/usbhs1_device(irq) order in mackerel_devices.
|
||||||
*/
|
*/
|
||||||
#define IRQ8 evt2irq(0x0300)
|
#define IRQ8 evt2irq(0x0300)
|
||||||
#define USB_PHY_MODE (1 << 4)
|
#define USB_PHY_MODE (1 << 4)
|
||||||
|
@ -1325,8 +1326,8 @@ static struct platform_device *mackerel_devices[] __initdata = {
|
||||||
&nor_flash_device,
|
&nor_flash_device,
|
||||||
&smc911x_device,
|
&smc911x_device,
|
||||||
&lcdc_device,
|
&lcdc_device,
|
||||||
&usbhs1_device,
|
|
||||||
&usbhs0_device,
|
&usbhs0_device,
|
||||||
|
&usbhs1_device,
|
||||||
&leds_device,
|
&leds_device,
|
||||||
&fsi_device,
|
&fsi_device,
|
||||||
&fsi_ak4643_device,
|
&fsi_ak4643_device,
|
||||||
|
|
|
@ -67,7 +67,7 @@ static struct smsc911x_platform_config smsc911x_platdata = {
|
||||||
|
|
||||||
static struct platform_device eth_device = {
|
static struct platform_device eth_device = {
|
||||||
.name = "smsc911x",
|
.name = "smsc911x",
|
||||||
.id = 0,
|
.id = -1,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = &smsc911x_platdata,
|
.platform_data = &smsc911x_platdata,
|
||||||
},
|
},
|
||||||
|
|
|
@ -259,9 +259,9 @@ static int sh73a0_set_wake(struct irq_data *data, unsigned int on)
|
||||||
return 0; /* always allow wakeup */
|
return 0; /* always allow wakeup */
|
||||||
}
|
}
|
||||||
|
|
||||||
#define RELOC_BASE 0x1000
|
#define RELOC_BASE 0x1200
|
||||||
|
|
||||||
/* INTCA IRQ pins at INTCS + 0x1000 to make space for GIC+INTC handling */
|
/* INTCA IRQ pins at INTCS + RELOC_BASE to make space for GIC+INTC handling */
|
||||||
#define INTCS_VECT_RELOC(n, vect) INTCS_VECT((n), (vect) + RELOC_BASE)
|
#define INTCS_VECT_RELOC(n, vect) INTCS_VECT((n), (vect) + RELOC_BASE)
|
||||||
|
|
||||||
INTC_IRQ_PINS_32(intca_irq_pins, 0xe6900000,
|
INTC_IRQ_PINS_32(intca_irq_pins, 0xe6900000,
|
||||||
|
|
|
@ -267,17 +267,19 @@ static void __dma_free_remap(void *cpu_addr, size_t size)
|
||||||
vunmap(cpu_addr);
|
vunmap(cpu_addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define DEFAULT_DMA_COHERENT_POOL_SIZE SZ_256K
|
||||||
|
|
||||||
struct dma_pool {
|
struct dma_pool {
|
||||||
size_t size;
|
size_t size;
|
||||||
spinlock_t lock;
|
spinlock_t lock;
|
||||||
unsigned long *bitmap;
|
unsigned long *bitmap;
|
||||||
unsigned long nr_pages;
|
unsigned long nr_pages;
|
||||||
void *vaddr;
|
void *vaddr;
|
||||||
struct page *page;
|
struct page **pages;
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct dma_pool atomic_pool = {
|
static struct dma_pool atomic_pool = {
|
||||||
.size = SZ_256K,
|
.size = DEFAULT_DMA_COHERENT_POOL_SIZE,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init early_coherent_pool(char *p)
|
static int __init early_coherent_pool(char *p)
|
||||||
|
@ -287,6 +289,21 @@ static int __init early_coherent_pool(char *p)
|
||||||
}
|
}
|
||||||
early_param("coherent_pool", early_coherent_pool);
|
early_param("coherent_pool", early_coherent_pool);
|
||||||
|
|
||||||
|
void __init init_dma_coherent_pool_size(unsigned long size)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Catch any attempt to set the pool size too late.
|
||||||
|
*/
|
||||||
|
BUG_ON(atomic_pool.vaddr);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set architecture specific coherent pool size only if
|
||||||
|
* it has not been changed by kernel command line parameter.
|
||||||
|
*/
|
||||||
|
if (atomic_pool.size == DEFAULT_DMA_COHERENT_POOL_SIZE)
|
||||||
|
atomic_pool.size = size;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialise the coherent pool for atomic allocations.
|
* Initialise the coherent pool for atomic allocations.
|
||||||
*/
|
*/
|
||||||
|
@ -297,6 +314,7 @@ static int __init atomic_pool_init(void)
|
||||||
unsigned long nr_pages = pool->size >> PAGE_SHIFT;
|
unsigned long nr_pages = pool->size >> PAGE_SHIFT;
|
||||||
unsigned long *bitmap;
|
unsigned long *bitmap;
|
||||||
struct page *page;
|
struct page *page;
|
||||||
|
struct page **pages;
|
||||||
void *ptr;
|
void *ptr;
|
||||||
int bitmap_size = BITS_TO_LONGS(nr_pages) * sizeof(long);
|
int bitmap_size = BITS_TO_LONGS(nr_pages) * sizeof(long);
|
||||||
|
|
||||||
|
@ -304,21 +322,31 @@ static int __init atomic_pool_init(void)
|
||||||
if (!bitmap)
|
if (!bitmap)
|
||||||
goto no_bitmap;
|
goto no_bitmap;
|
||||||
|
|
||||||
|
pages = kzalloc(nr_pages * sizeof(struct page *), GFP_KERNEL);
|
||||||
|
if (!pages)
|
||||||
|
goto no_pages;
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_CMA))
|
if (IS_ENABLED(CONFIG_CMA))
|
||||||
ptr = __alloc_from_contiguous(NULL, pool->size, prot, &page);
|
ptr = __alloc_from_contiguous(NULL, pool->size, prot, &page);
|
||||||
else
|
else
|
||||||
ptr = __alloc_remap_buffer(NULL, pool->size, GFP_KERNEL, prot,
|
ptr = __alloc_remap_buffer(NULL, pool->size, GFP_KERNEL, prot,
|
||||||
&page, NULL);
|
&page, NULL);
|
||||||
if (ptr) {
|
if (ptr) {
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < nr_pages; i++)
|
||||||
|
pages[i] = page + i;
|
||||||
|
|
||||||
spin_lock_init(&pool->lock);
|
spin_lock_init(&pool->lock);
|
||||||
pool->vaddr = ptr;
|
pool->vaddr = ptr;
|
||||||
pool->page = page;
|
pool->pages = pages;
|
||||||
pool->bitmap = bitmap;
|
pool->bitmap = bitmap;
|
||||||
pool->nr_pages = nr_pages;
|
pool->nr_pages = nr_pages;
|
||||||
pr_info("DMA: preallocated %u KiB pool for atomic coherent allocations\n",
|
pr_info("DMA: preallocated %u KiB pool for atomic coherent allocations\n",
|
||||||
(unsigned)pool->size / 1024);
|
(unsigned)pool->size / 1024);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
no_pages:
|
||||||
kfree(bitmap);
|
kfree(bitmap);
|
||||||
no_bitmap:
|
no_bitmap:
|
||||||
pr_err("DMA: failed to allocate %u KiB pool for atomic coherent allocation\n",
|
pr_err("DMA: failed to allocate %u KiB pool for atomic coherent allocation\n",
|
||||||
|
@ -443,27 +471,45 @@ static void *__alloc_from_pool(size_t size, struct page **ret_page)
|
||||||
if (pageno < pool->nr_pages) {
|
if (pageno < pool->nr_pages) {
|
||||||
bitmap_set(pool->bitmap, pageno, count);
|
bitmap_set(pool->bitmap, pageno, count);
|
||||||
ptr = pool->vaddr + PAGE_SIZE * pageno;
|
ptr = pool->vaddr + PAGE_SIZE * pageno;
|
||||||
*ret_page = pool->page + pageno;
|
*ret_page = pool->pages[pageno];
|
||||||
|
} else {
|
||||||
|
pr_err_once("ERROR: %u KiB atomic DMA coherent pool is too small!\n"
|
||||||
|
"Please increase it with coherent_pool= kernel parameter!\n",
|
||||||
|
(unsigned)pool->size / 1024);
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&pool->lock, flags);
|
spin_unlock_irqrestore(&pool->lock, flags);
|
||||||
|
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool __in_atomic_pool(void *start, size_t size)
|
||||||
|
{
|
||||||
|
struct dma_pool *pool = &atomic_pool;
|
||||||
|
void *end = start + size;
|
||||||
|
void *pool_start = pool->vaddr;
|
||||||
|
void *pool_end = pool->vaddr + pool->size;
|
||||||
|
|
||||||
|
if (start < pool_start || start > pool_end)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (end <= pool_end)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
WARN(1, "Wrong coherent size(%p-%p) from atomic pool(%p-%p)\n",
|
||||||
|
start, end - 1, pool_start, pool_end - 1);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
static int __free_from_pool(void *start, size_t size)
|
static int __free_from_pool(void *start, size_t size)
|
||||||
{
|
{
|
||||||
struct dma_pool *pool = &atomic_pool;
|
struct dma_pool *pool = &atomic_pool;
|
||||||
unsigned long pageno, count;
|
unsigned long pageno, count;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
if (start < pool->vaddr || start > pool->vaddr + pool->size)
|
if (!__in_atomic_pool(start, size))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (start + size > pool->vaddr + pool->size) {
|
|
||||||
WARN(1, "freeing wrong coherent size from pool\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
pageno = (start - pool->vaddr) >> PAGE_SHIFT;
|
pageno = (start - pool->vaddr) >> PAGE_SHIFT;
|
||||||
count = size >> PAGE_SHIFT;
|
count = size >> PAGE_SHIFT;
|
||||||
|
|
||||||
|
@ -1090,10 +1136,22 @@ static int __iommu_remove_mapping(struct device *dev, dma_addr_t iova, size_t si
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct page **__atomic_get_pages(void *addr)
|
||||||
|
{
|
||||||
|
struct dma_pool *pool = &atomic_pool;
|
||||||
|
struct page **pages = pool->pages;
|
||||||
|
int offs = (addr - pool->vaddr) >> PAGE_SHIFT;
|
||||||
|
|
||||||
|
return pages + offs;
|
||||||
|
}
|
||||||
|
|
||||||
static struct page **__iommu_get_pages(void *cpu_addr, struct dma_attrs *attrs)
|
static struct page **__iommu_get_pages(void *cpu_addr, struct dma_attrs *attrs)
|
||||||
{
|
{
|
||||||
struct vm_struct *area;
|
struct vm_struct *area;
|
||||||
|
|
||||||
|
if (__in_atomic_pool(cpu_addr, PAGE_SIZE))
|
||||||
|
return __atomic_get_pages(cpu_addr);
|
||||||
|
|
||||||
if (dma_get_attr(DMA_ATTR_NO_KERNEL_MAPPING, attrs))
|
if (dma_get_attr(DMA_ATTR_NO_KERNEL_MAPPING, attrs))
|
||||||
return cpu_addr;
|
return cpu_addr;
|
||||||
|
|
||||||
|
@ -1103,6 +1161,34 @@ static struct page **__iommu_get_pages(void *cpu_addr, struct dma_attrs *attrs)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void *__iommu_alloc_atomic(struct device *dev, size_t size,
|
||||||
|
dma_addr_t *handle)
|
||||||
|
{
|
||||||
|
struct page *page;
|
||||||
|
void *addr;
|
||||||
|
|
||||||
|
addr = __alloc_from_pool(size, &page);
|
||||||
|
if (!addr)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
*handle = __iommu_create_mapping(dev, &page, size);
|
||||||
|
if (*handle == DMA_ERROR_CODE)
|
||||||
|
goto err_mapping;
|
||||||
|
|
||||||
|
return addr;
|
||||||
|
|
||||||
|
err_mapping:
|
||||||
|
__free_from_pool(addr, size);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __iommu_free_atomic(struct device *dev, struct page **pages,
|
||||||
|
dma_addr_t handle, size_t size)
|
||||||
|
{
|
||||||
|
__iommu_remove_mapping(dev, handle, size);
|
||||||
|
__free_from_pool(page_address(pages[0]), size);
|
||||||
|
}
|
||||||
|
|
||||||
static void *arm_iommu_alloc_attrs(struct device *dev, size_t size,
|
static void *arm_iommu_alloc_attrs(struct device *dev, size_t size,
|
||||||
dma_addr_t *handle, gfp_t gfp, struct dma_attrs *attrs)
|
dma_addr_t *handle, gfp_t gfp, struct dma_attrs *attrs)
|
||||||
{
|
{
|
||||||
|
@ -1113,6 +1199,9 @@ static void *arm_iommu_alloc_attrs(struct device *dev, size_t size,
|
||||||
*handle = DMA_ERROR_CODE;
|
*handle = DMA_ERROR_CODE;
|
||||||
size = PAGE_ALIGN(size);
|
size = PAGE_ALIGN(size);
|
||||||
|
|
||||||
|
if (gfp & GFP_ATOMIC)
|
||||||
|
return __iommu_alloc_atomic(dev, size, handle);
|
||||||
|
|
||||||
pages = __iommu_alloc_buffer(dev, size, gfp);
|
pages = __iommu_alloc_buffer(dev, size, gfp);
|
||||||
if (!pages)
|
if (!pages)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -1179,6 +1268,11 @@ void arm_iommu_free_attrs(struct device *dev, size_t size, void *cpu_addr,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (__in_atomic_pool(cpu_addr, size)) {
|
||||||
|
__iommu_free_atomic(dev, pages, handle, size);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!dma_get_attr(DMA_ATTR_NO_KERNEL_MAPPING, attrs)) {
|
if (!dma_get_attr(DMA_ATTR_NO_KERNEL_MAPPING, attrs)) {
|
||||||
unmap_kernel_range((unsigned long)cpu_addr, size);
|
unmap_kernel_range((unsigned long)cpu_addr, size);
|
||||||
vunmap(cpu_addr);
|
vunmap(cpu_addr);
|
||||||
|
|
|
@ -141,7 +141,7 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
|
||||||
|
|
||||||
#define atomic_sub_and_test(i,v) (atomic_sub_return((i),(v)) == 0)
|
#define atomic_sub_and_test(i,v) (atomic_sub_return((i),(v)) == 0)
|
||||||
|
|
||||||
#define ATOMIC_INIT(i) ((atomic_t) { (i) })
|
#define ATOMIC_INIT(i) { (i) }
|
||||||
|
|
||||||
#define smp_mb__before_atomic_dec() smp_mb()
|
#define smp_mb__before_atomic_dec() smp_mb()
|
||||||
#define smp_mb__after_atomic_dec() smp_mb()
|
#define smp_mb__after_atomic_dec() smp_mb()
|
||||||
|
@ -150,7 +150,7 @@ static __inline__ int __atomic_add_unless(atomic_t *v, int a, int u)
|
||||||
|
|
||||||
#ifdef CONFIG_64BIT
|
#ifdef CONFIG_64BIT
|
||||||
|
|
||||||
#define ATOMIC64_INIT(i) ((atomic64_t) { (i) })
|
#define ATOMIC64_INIT(i) { (i) }
|
||||||
|
|
||||||
static __inline__ s64
|
static __inline__ s64
|
||||||
__atomic64_add_return(s64 i, atomic64_t *v)
|
__atomic64_add_return(s64 i, atomic64_t *v)
|
||||||
|
|
|
@ -309,7 +309,7 @@ copy_thread(unsigned long clone_flags, unsigned long usp,
|
||||||
cregs->ksp = (unsigned long)stack
|
cregs->ksp = (unsigned long)stack
|
||||||
+ (pregs->gr[21] & (THREAD_SIZE - 1));
|
+ (pregs->gr[21] & (THREAD_SIZE - 1));
|
||||||
cregs->gr[30] = usp;
|
cregs->gr[30] = usp;
|
||||||
if (p->personality == PER_HPUX) {
|
if (personality(p->personality) == PER_HPUX) {
|
||||||
#ifdef CONFIG_HPUX
|
#ifdef CONFIG_HPUX
|
||||||
cregs->kpc = (unsigned long) &hpux_child_return;
|
cregs->kpc = (unsigned long) &hpux_child_return;
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -225,12 +225,12 @@ long parisc_personality(unsigned long personality)
|
||||||
long err;
|
long err;
|
||||||
|
|
||||||
if (personality(current->personality) == PER_LINUX32
|
if (personality(current->personality) == PER_LINUX32
|
||||||
&& personality == PER_LINUX)
|
&& personality(personality) == PER_LINUX)
|
||||||
personality = PER_LINUX32;
|
personality = (personality & ~PER_MASK) | PER_LINUX32;
|
||||||
|
|
||||||
err = sys_personality(personality);
|
err = sys_personality(personality);
|
||||||
if (err == PER_LINUX32)
|
if (personality(err) == PER_LINUX32)
|
||||||
err = PER_LINUX;
|
err = (err & ~PER_MASK) | PER_LINUX;
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
|
@ -386,6 +386,7 @@ extern unsigned long cpuidle_disable;
|
||||||
enum idle_boot_override {IDLE_NO_OVERRIDE = 0, IDLE_POWERSAVE_OFF};
|
enum idle_boot_override {IDLE_NO_OVERRIDE = 0, IDLE_POWERSAVE_OFF};
|
||||||
|
|
||||||
extern int powersave_nap; /* set if nap mode can be used in idle loop */
|
extern int powersave_nap; /* set if nap mode can be used in idle loop */
|
||||||
|
extern void power7_nap(void);
|
||||||
|
|
||||||
#ifdef CONFIG_PSERIES_IDLE
|
#ifdef CONFIG_PSERIES_IDLE
|
||||||
extern void update_smt_snooze_delay(int snooze);
|
extern void update_smt_snooze_delay(int snooze);
|
||||||
|
|
|
@ -76,6 +76,7 @@ int main(void)
|
||||||
DEFINE(SIGSEGV, SIGSEGV);
|
DEFINE(SIGSEGV, SIGSEGV);
|
||||||
DEFINE(NMI_MASK, NMI_MASK);
|
DEFINE(NMI_MASK, NMI_MASK);
|
||||||
DEFINE(THREAD_DSCR, offsetof(struct thread_struct, dscr));
|
DEFINE(THREAD_DSCR, offsetof(struct thread_struct, dscr));
|
||||||
|
DEFINE(THREAD_DSCR_INHERIT, offsetof(struct thread_struct, dscr_inherit));
|
||||||
#else
|
#else
|
||||||
DEFINE(THREAD_INFO, offsetof(struct task_struct, stack));
|
DEFINE(THREAD_INFO, offsetof(struct task_struct, stack));
|
||||||
#endif /* CONFIG_PPC64 */
|
#endif /* CONFIG_PPC64 */
|
||||||
|
|
|
@ -28,6 +28,8 @@ void doorbell_setup_this_cpu(void)
|
||||||
|
|
||||||
void doorbell_cause_ipi(int cpu, unsigned long data)
|
void doorbell_cause_ipi(int cpu, unsigned long data)
|
||||||
{
|
{
|
||||||
|
/* Order previous accesses vs. msgsnd, which is treated as a store */
|
||||||
|
mb();
|
||||||
ppc_msgsnd(PPC_DBELL, 0, data);
|
ppc_msgsnd(PPC_DBELL, 0, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -370,6 +370,12 @@ _GLOBAL(ret_from_fork)
|
||||||
li r3,0
|
li r3,0
|
||||||
b syscall_exit
|
b syscall_exit
|
||||||
|
|
||||||
|
.section ".toc","aw"
|
||||||
|
DSCR_DEFAULT:
|
||||||
|
.tc dscr_default[TC],dscr_default
|
||||||
|
|
||||||
|
.section ".text"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This routine switches between two different tasks. The process
|
* This routine switches between two different tasks. The process
|
||||||
* state of one is saved on its kernel stack. Then the state
|
* state of one is saved on its kernel stack. Then the state
|
||||||
|
@ -509,9 +515,6 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEGMENT)
|
||||||
mr r1,r8 /* start using new stack pointer */
|
mr r1,r8 /* start using new stack pointer */
|
||||||
std r7,PACAKSAVE(r13)
|
std r7,PACAKSAVE(r13)
|
||||||
|
|
||||||
ld r6,_CCR(r1)
|
|
||||||
mtcrf 0xFF,r6
|
|
||||||
|
|
||||||
#ifdef CONFIG_ALTIVEC
|
#ifdef CONFIG_ALTIVEC
|
||||||
BEGIN_FTR_SECTION
|
BEGIN_FTR_SECTION
|
||||||
ld r0,THREAD_VRSAVE(r4)
|
ld r0,THREAD_VRSAVE(r4)
|
||||||
|
@ -520,14 +523,22 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
|
||||||
#endif /* CONFIG_ALTIVEC */
|
#endif /* CONFIG_ALTIVEC */
|
||||||
#ifdef CONFIG_PPC64
|
#ifdef CONFIG_PPC64
|
||||||
BEGIN_FTR_SECTION
|
BEGIN_FTR_SECTION
|
||||||
|
lwz r6,THREAD_DSCR_INHERIT(r4)
|
||||||
|
ld r7,DSCR_DEFAULT@toc(2)
|
||||||
ld r0,THREAD_DSCR(r4)
|
ld r0,THREAD_DSCR(r4)
|
||||||
cmpd r0,r25
|
cmpwi r6,0
|
||||||
beq 1f
|
bne 1f
|
||||||
|
ld r0,0(r7)
|
||||||
|
1: cmpd r0,r25
|
||||||
|
beq 2f
|
||||||
mtspr SPRN_DSCR,r0
|
mtspr SPRN_DSCR,r0
|
||||||
1:
|
2:
|
||||||
END_FTR_SECTION_IFSET(CPU_FTR_DSCR)
|
END_FTR_SECTION_IFSET(CPU_FTR_DSCR)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
ld r6,_CCR(r1)
|
||||||
|
mtcrf 0xFF,r6
|
||||||
|
|
||||||
/* r3-r13 are destroyed -- Cort */
|
/* r3-r13 are destroyed -- Cort */
|
||||||
REST_8GPRS(14, r1)
|
REST_8GPRS(14, r1)
|
||||||
REST_10GPRS(22, r1)
|
REST_10GPRS(22, r1)
|
||||||
|
|
|
@ -186,7 +186,7 @@ hardware_interrupt_hv:
|
||||||
KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0x800)
|
KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0x800)
|
||||||
|
|
||||||
MASKABLE_EXCEPTION_PSERIES(0x900, 0x900, decrementer)
|
MASKABLE_EXCEPTION_PSERIES(0x900, 0x900, decrementer)
|
||||||
MASKABLE_EXCEPTION_HV(0x980, 0x982, decrementer)
|
STD_EXCEPTION_HV(0x980, 0x982, hdecrementer)
|
||||||
|
|
||||||
STD_EXCEPTION_PSERIES(0xa00, 0xa00, trap_0a)
|
STD_EXCEPTION_PSERIES(0xa00, 0xa00, trap_0a)
|
||||||
KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0xa00)
|
KVM_HANDLER_PR(PACA_EXGEN, EXC_STD, 0xa00)
|
||||||
|
@ -486,6 +486,7 @@ machine_check_common:
|
||||||
|
|
||||||
STD_EXCEPTION_COMMON_ASYNC(0x500, hardware_interrupt, do_IRQ)
|
STD_EXCEPTION_COMMON_ASYNC(0x500, hardware_interrupt, do_IRQ)
|
||||||
STD_EXCEPTION_COMMON_ASYNC(0x900, decrementer, .timer_interrupt)
|
STD_EXCEPTION_COMMON_ASYNC(0x900, decrementer, .timer_interrupt)
|
||||||
|
STD_EXCEPTION_COMMON(0x980, hdecrementer, .hdec_interrupt)
|
||||||
STD_EXCEPTION_COMMON(0xa00, trap_0a, .unknown_exception)
|
STD_EXCEPTION_COMMON(0xa00, trap_0a, .unknown_exception)
|
||||||
STD_EXCEPTION_COMMON(0xb00, trap_0b, .unknown_exception)
|
STD_EXCEPTION_COMMON(0xb00, trap_0b, .unknown_exception)
|
||||||
STD_EXCEPTION_COMMON(0xd00, single_step, .single_step_exception)
|
STD_EXCEPTION_COMMON(0xd00, single_step, .single_step_exception)
|
||||||
|
|
|
@ -28,7 +28,9 @@ _GLOBAL(power7_idle)
|
||||||
lwz r4,ADDROFF(powersave_nap)(r3)
|
lwz r4,ADDROFF(powersave_nap)(r3)
|
||||||
cmpwi 0,r4,0
|
cmpwi 0,r4,0
|
||||||
beqlr
|
beqlr
|
||||||
|
/* fall through */
|
||||||
|
|
||||||
|
_GLOBAL(power7_nap)
|
||||||
/* NAP is a state loss, we create a regs frame on the
|
/* NAP is a state loss, we create a regs frame on the
|
||||||
* stack, fill it up with the state we care about and
|
* stack, fill it up with the state we care about and
|
||||||
* stick a pointer to it in PACAR1. We really only
|
* stick a pointer to it in PACAR1. We really only
|
||||||
|
|
|
@ -802,16 +802,8 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
|
||||||
#endif /* CONFIG_PPC_STD_MMU_64 */
|
#endif /* CONFIG_PPC_STD_MMU_64 */
|
||||||
#ifdef CONFIG_PPC64
|
#ifdef CONFIG_PPC64
|
||||||
if (cpu_has_feature(CPU_FTR_DSCR)) {
|
if (cpu_has_feature(CPU_FTR_DSCR)) {
|
||||||
if (current->thread.dscr_inherit) {
|
p->thread.dscr_inherit = current->thread.dscr_inherit;
|
||||||
p->thread.dscr_inherit = 1;
|
p->thread.dscr = current->thread.dscr;
|
||||||
p->thread.dscr = current->thread.dscr;
|
|
||||||
} else if (0 != dscr_default) {
|
|
||||||
p->thread.dscr_inherit = 1;
|
|
||||||
p->thread.dscr = dscr_default;
|
|
||||||
} else {
|
|
||||||
p->thread.dscr_inherit = 0;
|
|
||||||
p->thread.dscr = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -198,8 +198,15 @@ void smp_muxed_ipi_message_pass(int cpu, int msg)
|
||||||
struct cpu_messages *info = &per_cpu(ipi_message, cpu);
|
struct cpu_messages *info = &per_cpu(ipi_message, cpu);
|
||||||
char *message = (char *)&info->messages;
|
char *message = (char *)&info->messages;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Order previous accesses before accesses in the IPI handler.
|
||||||
|
*/
|
||||||
|
smp_mb();
|
||||||
message[msg] = 1;
|
message[msg] = 1;
|
||||||
mb();
|
/*
|
||||||
|
* cause_ipi functions are required to include a full barrier
|
||||||
|
* before doing whatever causes the IPI.
|
||||||
|
*/
|
||||||
smp_ops->cause_ipi(cpu, info->data);
|
smp_ops->cause_ipi(cpu, info->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,7 +218,7 @@ irqreturn_t smp_ipi_demux(void)
|
||||||
mb(); /* order any irq clear */
|
mb(); /* order any irq clear */
|
||||||
|
|
||||||
do {
|
do {
|
||||||
all = xchg_local(&info->messages, 0);
|
all = xchg(&info->messages, 0);
|
||||||
|
|
||||||
#ifdef __BIG_ENDIAN
|
#ifdef __BIG_ENDIAN
|
||||||
if (all & (1 << (24 - 8 * PPC_MSG_CALL_FUNCTION)))
|
if (all & (1 << (24 - 8 * PPC_MSG_CALL_FUNCTION)))
|
||||||
|
|
|
@ -194,6 +194,14 @@ static ssize_t show_dscr_default(struct device *dev,
|
||||||
return sprintf(buf, "%lx\n", dscr_default);
|
return sprintf(buf, "%lx\n", dscr_default);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void update_dscr(void *dummy)
|
||||||
|
{
|
||||||
|
if (!current->thread.dscr_inherit) {
|
||||||
|
current->thread.dscr = dscr_default;
|
||||||
|
mtspr(SPRN_DSCR, dscr_default);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static ssize_t __used store_dscr_default(struct device *dev,
|
static ssize_t __used store_dscr_default(struct device *dev,
|
||||||
struct device_attribute *attr, const char *buf,
|
struct device_attribute *attr, const char *buf,
|
||||||
size_t count)
|
size_t count)
|
||||||
|
@ -206,6 +214,8 @@ static ssize_t __used store_dscr_default(struct device *dev,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
dscr_default = val;
|
dscr_default = val;
|
||||||
|
|
||||||
|
on_each_cpu(update_dscr, NULL, 1);
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -535,6 +535,15 @@ void timer_interrupt(struct pt_regs * regs)
|
||||||
trace_timer_interrupt_exit(regs);
|
trace_timer_interrupt_exit(regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Hypervisor decrementer interrupts shouldn't occur but are sometimes
|
||||||
|
* left pending on exit from a KVM guest. We don't need to do anything
|
||||||
|
* to clear them, as they are edge-triggered.
|
||||||
|
*/
|
||||||
|
void hdec_interrupt(struct pt_regs *regs)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SUSPEND
|
#ifdef CONFIG_SUSPEND
|
||||||
static void generic_suspend_disable_irqs(void)
|
static void generic_suspend_disable_irqs(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -972,8 +972,9 @@ static int emulate_instruction(struct pt_regs *regs)
|
||||||
cpu_has_feature(CPU_FTR_DSCR)) {
|
cpu_has_feature(CPU_FTR_DSCR)) {
|
||||||
PPC_WARN_EMULATED(mtdscr, regs);
|
PPC_WARN_EMULATED(mtdscr, regs);
|
||||||
rd = (instword >> 21) & 0x1f;
|
rd = (instword >> 21) & 0x1f;
|
||||||
mtspr(SPRN_DSCR, regs->gpr[rd]);
|
current->thread.dscr = regs->gpr[rd];
|
||||||
current->thread.dscr_inherit = 1;
|
current->thread.dscr_inherit = 1;
|
||||||
|
mtspr(SPRN_DSCR, current->thread.dscr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -20,7 +20,7 @@ int patch_instruction(unsigned int *addr, unsigned int instr)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = __put_user(instr, addr);
|
__put_user_size(instr, addr, 4, err);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
asm ("dcbst 0, %0; sync; icbi 0,%0; sync; isync" : : "r" (addr));
|
asm ("dcbst 0, %0; sync; icbi 0,%0; sync; isync" : : "r" (addr));
|
||||||
|
|
|
@ -1436,11 +1436,11 @@ static long vphn_get_associativity(unsigned long cpu,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Update the node maps and sysfs entries for each cpu whose home node
|
* Update the node maps and sysfs entries for each cpu whose home node
|
||||||
* has changed.
|
* has changed. Returns 1 when the topology has changed, and 0 otherwise.
|
||||||
*/
|
*/
|
||||||
int arch_update_cpu_topology(void)
|
int arch_update_cpu_topology(void)
|
||||||
{
|
{
|
||||||
int cpu, nid, old_nid;
|
int cpu, nid, old_nid, changed = 0;
|
||||||
unsigned int associativity[VPHN_ASSOC_BUFSIZE] = {0};
|
unsigned int associativity[VPHN_ASSOC_BUFSIZE] = {0};
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
|
|
||||||
|
@ -1466,9 +1466,10 @@ int arch_update_cpu_topology(void)
|
||||||
dev = get_cpu_device(cpu);
|
dev = get_cpu_device(cpu);
|
||||||
if (dev)
|
if (dev)
|
||||||
kobject_uevent(&dev->kobj, KOBJ_CHANGE);
|
kobject_uevent(&dev->kobj, KOBJ_CHANGE);
|
||||||
|
changed = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void topology_work_fn(struct work_struct *work)
|
static void topology_work_fn(struct work_struct *work)
|
||||||
|
|
|
@ -106,14 +106,6 @@ static void pnv_smp_cpu_kill_self(void)
|
||||||
{
|
{
|
||||||
unsigned int cpu;
|
unsigned int cpu;
|
||||||
|
|
||||||
/* If powersave_nap is enabled, use NAP mode, else just
|
|
||||||
* spin aimlessly
|
|
||||||
*/
|
|
||||||
if (!powersave_nap) {
|
|
||||||
generic_mach_cpu_die();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Standard hot unplug procedure */
|
/* Standard hot unplug procedure */
|
||||||
local_irq_disable();
|
local_irq_disable();
|
||||||
idle_task_exit();
|
idle_task_exit();
|
||||||
|
@ -128,7 +120,7 @@ static void pnv_smp_cpu_kill_self(void)
|
||||||
*/
|
*/
|
||||||
mtspr(SPRN_LPCR, mfspr(SPRN_LPCR) & ~(u64)LPCR_PECE1);
|
mtspr(SPRN_LPCR, mfspr(SPRN_LPCR) & ~(u64)LPCR_PECE1);
|
||||||
while (!generic_check_cpu_restart(cpu)) {
|
while (!generic_check_cpu_restart(cpu)) {
|
||||||
power7_idle();
|
power7_nap();
|
||||||
if (!generic_check_cpu_restart(cpu)) {
|
if (!generic_check_cpu_restart(cpu)) {
|
||||||
DBG("CPU%d Unexpected exit while offline !\n", cpu);
|
DBG("CPU%d Unexpected exit while offline !\n", cpu);
|
||||||
/* We may be getting an IPI, so we re-enable
|
/* We may be getting an IPI, so we re-enable
|
||||||
|
|
|
@ -65,7 +65,11 @@ static inline void icp_hv_set_xirr(unsigned int value)
|
||||||
static inline void icp_hv_set_qirr(int n_cpu , u8 value)
|
static inline void icp_hv_set_qirr(int n_cpu , u8 value)
|
||||||
{
|
{
|
||||||
int hw_cpu = get_hard_smp_processor_id(n_cpu);
|
int hw_cpu = get_hard_smp_processor_id(n_cpu);
|
||||||
long rc = plpar_hcall_norets(H_IPI, hw_cpu, value);
|
long rc;
|
||||||
|
|
||||||
|
/* Make sure all previous accesses are ordered before IPI sending */
|
||||||
|
mb();
|
||||||
|
rc = plpar_hcall_norets(H_IPI, hw_cpu, value);
|
||||||
if (rc != H_SUCCESS) {
|
if (rc != H_SUCCESS) {
|
||||||
pr_err("%s: bad return code qirr cpu=%d hw_cpu=%d mfrr=0x%x "
|
pr_err("%s: bad return code qirr cpu=%d hw_cpu=%d mfrr=0x%x "
|
||||||
"returned %ld\n", __func__, n_cpu, hw_cpu, value, rc);
|
"returned %ld\n", __func__, n_cpu, hw_cpu, value, rc);
|
||||||
|
|
|
@ -180,7 +180,8 @@ extern char elf_platform[];
|
||||||
#define ELF_PLATFORM (elf_platform)
|
#define ELF_PLATFORM (elf_platform)
|
||||||
|
|
||||||
#ifndef CONFIG_64BIT
|
#ifndef CONFIG_64BIT
|
||||||
#define SET_PERSONALITY(ex) set_personality(PER_LINUX)
|
#define SET_PERSONALITY(ex) \
|
||||||
|
set_personality(PER_LINUX | (current->personality & (~PER_MASK)))
|
||||||
#else /* CONFIG_64BIT */
|
#else /* CONFIG_64BIT */
|
||||||
#define SET_PERSONALITY(ex) \
|
#define SET_PERSONALITY(ex) \
|
||||||
do { \
|
do { \
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef unsigned long __kernel_size_t;
|
typedef unsigned long __kernel_size_t;
|
||||||
|
typedef long __kernel_ssize_t;
|
||||||
#define __kernel_size_t __kernel_size_t
|
#define __kernel_size_t __kernel_size_t
|
||||||
|
|
||||||
typedef unsigned short __kernel_old_dev_t;
|
typedef unsigned short __kernel_old_dev_t;
|
||||||
|
@ -25,7 +26,6 @@ typedef unsigned short __kernel_mode_t;
|
||||||
typedef unsigned short __kernel_ipc_pid_t;
|
typedef unsigned short __kernel_ipc_pid_t;
|
||||||
typedef unsigned short __kernel_uid_t;
|
typedef unsigned short __kernel_uid_t;
|
||||||
typedef unsigned short __kernel_gid_t;
|
typedef unsigned short __kernel_gid_t;
|
||||||
typedef int __kernel_ssize_t;
|
|
||||||
typedef int __kernel_ptrdiff_t;
|
typedef int __kernel_ptrdiff_t;
|
||||||
|
|
||||||
#else /* __s390x__ */
|
#else /* __s390x__ */
|
||||||
|
@ -35,7 +35,6 @@ typedef unsigned int __kernel_mode_t;
|
||||||
typedef int __kernel_ipc_pid_t;
|
typedef int __kernel_ipc_pid_t;
|
||||||
typedef unsigned int __kernel_uid_t;
|
typedef unsigned int __kernel_uid_t;
|
||||||
typedef unsigned int __kernel_gid_t;
|
typedef unsigned int __kernel_gid_t;
|
||||||
typedef long __kernel_ssize_t;
|
|
||||||
typedef long __kernel_ptrdiff_t;
|
typedef long __kernel_ptrdiff_t;
|
||||||
typedef unsigned long __kernel_sigset_t; /* at least 32 bits */
|
typedef unsigned long __kernel_sigset_t; /* at least 32 bits */
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@ static inline void smp_call_online_cpu(void (*func)(void *), void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int smp_find_processor_id(int address) { return 0; }
|
static inline int smp_find_processor_id(int address) { return 0; }
|
||||||
|
static inline int smp_store_status(int cpu) { return 0; }
|
||||||
static inline int smp_vcpu_scheduled(int cpu) { return 1; }
|
static inline int smp_vcpu_scheduled(int cpu) { return 1; }
|
||||||
static inline void smp_yield_cpu(int cpu) { }
|
static inline void smp_yield_cpu(int cpu) { }
|
||||||
static inline void smp_yield(void) { }
|
static inline void smp_yield(void) { }
|
||||||
|
|
|
@ -114,7 +114,7 @@ static void deliver_alarm(void)
|
||||||
skew += this_tick - last_tick;
|
skew += this_tick - last_tick;
|
||||||
|
|
||||||
while (skew >= one_tick) {
|
while (skew >= one_tick) {
|
||||||
alarm_handler(SIGVTALRM, NULL);
|
alarm_handler(SIGVTALRM, NULL, NULL);
|
||||||
skew -= one_tick;
|
skew -= one_tick;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2000,6 +2000,9 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata)
|
||||||
case MSR_KVM_STEAL_TIME:
|
case MSR_KVM_STEAL_TIME:
|
||||||
data = vcpu->arch.st.msr_val;
|
data = vcpu->arch.st.msr_val;
|
||||||
break;
|
break;
|
||||||
|
case MSR_KVM_PV_EOI_EN:
|
||||||
|
data = vcpu->arch.pv_eoi.msr_val;
|
||||||
|
break;
|
||||||
case MSR_IA32_P5_MC_ADDR:
|
case MSR_IA32_P5_MC_ADDR:
|
||||||
case MSR_IA32_P5_MC_TYPE:
|
case MSR_IA32_P5_MC_TYPE:
|
||||||
case MSR_IA32_MCG_CAP:
|
case MSR_IA32_MCG_CAP:
|
||||||
|
|
|
@ -1283,7 +1283,7 @@ static void xen_flush_tlb_others(const struct cpumask *cpus,
|
||||||
cpumask_clear_cpu(smp_processor_id(), to_cpumask(args->mask));
|
cpumask_clear_cpu(smp_processor_id(), to_cpumask(args->mask));
|
||||||
|
|
||||||
args->op.cmd = MMUEXT_TLB_FLUSH_MULTI;
|
args->op.cmd = MMUEXT_TLB_FLUSH_MULTI;
|
||||||
if (start != TLB_FLUSH_ALL && (end - start) <= PAGE_SIZE) {
|
if (end != TLB_FLUSH_ALL && (end - start) <= PAGE_SIZE) {
|
||||||
args->op.cmd = MMUEXT_INVLPG_MULTI;
|
args->op.cmd = MMUEXT_INVLPG_MULTI;
|
||||||
args->op.arg1.linear_addr = start;
|
args->op.arg1.linear_addr = start;
|
||||||
}
|
}
|
||||||
|
|
|
@ -599,7 +599,7 @@ bool __init early_can_reuse_p2m_middle(unsigned long set_pfn, unsigned long set_
|
||||||
if (p2m_index(set_pfn))
|
if (p2m_index(set_pfn))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for (pfn = 0; pfn <= MAX_DOMAIN_PAGES; pfn += P2M_PER_PAGE) {
|
for (pfn = 0; pfn < MAX_DOMAIN_PAGES; pfn += P2M_PER_PAGE) {
|
||||||
topidx = p2m_top_index(pfn);
|
topidx = p2m_top_index(pfn);
|
||||||
|
|
||||||
if (!p2m_top[topidx])
|
if (!p2m_top[topidx])
|
||||||
|
|
|
@ -250,7 +250,7 @@ int __init dma_declare_contiguous(struct device *dev, unsigned long size,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
/* Sanitise input arguments */
|
/* Sanitise input arguments */
|
||||||
alignment = PAGE_SIZE << max(MAX_ORDER, pageblock_order);
|
alignment = PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order);
|
||||||
base = ALIGN(base, alignment);
|
base = ALIGN(base, alignment);
|
||||||
size = ALIGN(size, alignment);
|
size = ALIGN(size, alignment);
|
||||||
limit &= ~(alignment - 1);
|
limit &= ~(alignment - 1);
|
||||||
|
|
|
@ -294,7 +294,7 @@ config GPIO_MAX732X_IRQ
|
||||||
|
|
||||||
config GPIO_MC9S08DZ60
|
config GPIO_MC9S08DZ60
|
||||||
bool "MX35 3DS BOARD MC9S08DZ60 GPIO functions"
|
bool "MX35 3DS BOARD MC9S08DZ60 GPIO functions"
|
||||||
depends on I2C && MACH_MX35_3DS
|
depends on I2C=y && MACH_MX35_3DS
|
||||||
help
|
help
|
||||||
Select this to enable the MC9S08DZ60 GPIO driver
|
Select this to enable the MC9S08DZ60 GPIO driver
|
||||||
|
|
||||||
|
|
|
@ -247,9 +247,9 @@ static int __devinit em_gio_irq_domain_init(struct em_gio_priv *p)
|
||||||
|
|
||||||
p->irq_base = irq_alloc_descs(pdata->irq_base, 0,
|
p->irq_base = irq_alloc_descs(pdata->irq_base, 0,
|
||||||
pdata->number_of_pins, numa_node_id());
|
pdata->number_of_pins, numa_node_id());
|
||||||
if (IS_ERR_VALUE(p->irq_base)) {
|
if (p->irq_base < 0) {
|
||||||
dev_err(&pdev->dev, "cannot get irq_desc\n");
|
dev_err(&pdev->dev, "cannot get irq_desc\n");
|
||||||
return -ENXIO;
|
return p->irq_base;
|
||||||
}
|
}
|
||||||
pr_debug("gio: hw base = %d, nr = %d, sw base = %d\n",
|
pr_debug("gio: hw base = %d, nr = %d, sw base = %d\n",
|
||||||
pdata->gpio_base, pdata->number_of_pins, p->irq_base);
|
pdata->gpio_base, pdata->number_of_pins, p->irq_base);
|
||||||
|
|
|
@ -170,6 +170,7 @@ static int __devinit rdc321x_gpio_probe(struct platform_device *pdev)
|
||||||
rdc321x_gpio_dev->reg2_data_base = r->start + 0x4;
|
rdc321x_gpio_dev->reg2_data_base = r->start + 0x4;
|
||||||
|
|
||||||
rdc321x_gpio_dev->chip.label = "rdc321x-gpio";
|
rdc321x_gpio_dev->chip.label = "rdc321x-gpio";
|
||||||
|
rdc321x_gpio_dev->chip.owner = THIS_MODULE;
|
||||||
rdc321x_gpio_dev->chip.direction_input = rdc_gpio_direction_input;
|
rdc321x_gpio_dev->chip.direction_input = rdc_gpio_direction_input;
|
||||||
rdc321x_gpio_dev->chip.direction_output = rdc_gpio_config;
|
rdc321x_gpio_dev->chip.direction_output = rdc_gpio_config;
|
||||||
rdc321x_gpio_dev->chip.get = rdc_gpio_get_value;
|
rdc321x_gpio_dev->chip.get = rdc_gpio_get_value;
|
||||||
|
|
|
@ -82,7 +82,7 @@ int of_get_named_gpio_flags(struct device_node *np, const char *propname,
|
||||||
gpiochip_find(&gg_data, of_gpiochip_find_and_xlate);
|
gpiochip_find(&gg_data, of_gpiochip_find_and_xlate);
|
||||||
|
|
||||||
of_node_put(gg_data.gpiospec.np);
|
of_node_put(gg_data.gpiospec.np);
|
||||||
pr_debug("%s exited with status %d\n", __func__, ret);
|
pr_debug("%s exited with status %d\n", __func__, gg_data.out_gpio);
|
||||||
return gg_data.out_gpio;
|
return gg_data.out_gpio;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(of_get_named_gpio_flags);
|
EXPORT_SYMBOL(of_get_named_gpio_flags);
|
||||||
|
|
|
@ -1981,7 +1981,7 @@ int drm_mode_cursor_ioctl(struct drm_device *dev,
|
||||||
if (!drm_core_check_feature(dev, DRIVER_MODESET))
|
if (!drm_core_check_feature(dev, DRIVER_MODESET))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (!req->flags)
|
if (!req->flags || (~DRM_MODE_CURSOR_FLAGS & req->flags))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
mutex_lock(&dev->mode_config.mutex);
|
mutex_lock(&dev->mode_config.mutex);
|
||||||
|
|
|
@ -87,6 +87,9 @@ static struct edid_quirk {
|
||||||
int product_id;
|
int product_id;
|
||||||
u32 quirks;
|
u32 quirks;
|
||||||
} edid_quirk_list[] = {
|
} edid_quirk_list[] = {
|
||||||
|
/* ASUS VW222S */
|
||||||
|
{ "ACI", 0x22a2, EDID_QUIRK_FORCE_REDUCED_BLANKING },
|
||||||
|
|
||||||
/* Acer AL1706 */
|
/* Acer AL1706 */
|
||||||
{ "ACR", 44358, EDID_QUIRK_PREFER_LARGE_60 },
|
{ "ACR", 44358, EDID_QUIRK_PREFER_LARGE_60 },
|
||||||
/* Acer F51 */
|
/* Acer F51 */
|
||||||
|
|
|
@ -1362,6 +1362,9 @@ void psb_intel_crtc_init(struct drm_device *dev, int pipe,
|
||||||
(struct drm_connector **) (psb_intel_crtc + 1);
|
(struct drm_connector **) (psb_intel_crtc + 1);
|
||||||
psb_intel_crtc->mode_set.num_connectors = 0;
|
psb_intel_crtc->mode_set.num_connectors = 0;
|
||||||
psb_intel_cursor_init(dev, psb_intel_crtc);
|
psb_intel_cursor_init(dev, psb_intel_crtc);
|
||||||
|
|
||||||
|
/* Set to true so that the pipe is forced off on initial config. */
|
||||||
|
psb_intel_crtc->active = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int psb_intel_get_pipe_from_crtc_id(struct drm_device *dev, void *data,
|
int psb_intel_get_pipe_from_crtc_id(struct drm_device *dev, void *data,
|
||||||
|
|
|
@ -72,7 +72,7 @@ int i915_gem_init_aliasing_ppgtt(struct drm_device *dev)
|
||||||
/* ppgtt PDEs reside in the global gtt pagetable, which has 512*1024
|
/* ppgtt PDEs reside in the global gtt pagetable, which has 512*1024
|
||||||
* entries. For aliasing ppgtt support we just steal them at the end for
|
* entries. For aliasing ppgtt support we just steal them at the end for
|
||||||
* now. */
|
* now. */
|
||||||
first_pd_entry_in_global_pt = 512*1024 - I915_PPGTT_PD_ENTRIES;
|
first_pd_entry_in_global_pt = dev_priv->mm.gtt->gtt_total_entries - I915_PPGTT_PD_ENTRIES;
|
||||||
|
|
||||||
ppgtt = kzalloc(sizeof(*ppgtt), GFP_KERNEL);
|
ppgtt = kzalloc(sizeof(*ppgtt), GFP_KERNEL);
|
||||||
if (!ppgtt)
|
if (!ppgtt)
|
||||||
|
|
|
@ -1384,7 +1384,7 @@ static void assert_pch_hdmi_disabled(struct drm_i915_private *dev_priv,
|
||||||
enum pipe pipe, int reg)
|
enum pipe pipe, int reg)
|
||||||
{
|
{
|
||||||
u32 val = I915_READ(reg);
|
u32 val = I915_READ(reg);
|
||||||
WARN(hdmi_pipe_enabled(dev_priv, val, pipe),
|
WARN(hdmi_pipe_enabled(dev_priv, pipe, val),
|
||||||
"PCH HDMI (0x%08x) enabled on transcoder %c, should be disabled\n",
|
"PCH HDMI (0x%08x) enabled on transcoder %c, should be disabled\n",
|
||||||
reg, pipe_name(pipe));
|
reg, pipe_name(pipe));
|
||||||
|
|
||||||
|
@ -1404,13 +1404,13 @@ static void assert_pch_ports_disabled(struct drm_i915_private *dev_priv,
|
||||||
|
|
||||||
reg = PCH_ADPA;
|
reg = PCH_ADPA;
|
||||||
val = I915_READ(reg);
|
val = I915_READ(reg);
|
||||||
WARN(adpa_pipe_enabled(dev_priv, val, pipe),
|
WARN(adpa_pipe_enabled(dev_priv, pipe, val),
|
||||||
"PCH VGA enabled on transcoder %c, should be disabled\n",
|
"PCH VGA enabled on transcoder %c, should be disabled\n",
|
||||||
pipe_name(pipe));
|
pipe_name(pipe));
|
||||||
|
|
||||||
reg = PCH_LVDS;
|
reg = PCH_LVDS;
|
||||||
val = I915_READ(reg);
|
val = I915_READ(reg);
|
||||||
WARN(lvds_pipe_enabled(dev_priv, val, pipe),
|
WARN(lvds_pipe_enabled(dev_priv, pipe, val),
|
||||||
"PCH LVDS enabled on transcoder %c, should be disabled\n",
|
"PCH LVDS enabled on transcoder %c, should be disabled\n",
|
||||||
pipe_name(pipe));
|
pipe_name(pipe));
|
||||||
|
|
||||||
|
@ -1872,7 +1872,7 @@ static void disable_pch_hdmi(struct drm_i915_private *dev_priv,
|
||||||
enum pipe pipe, int reg)
|
enum pipe pipe, int reg)
|
||||||
{
|
{
|
||||||
u32 val = I915_READ(reg);
|
u32 val = I915_READ(reg);
|
||||||
if (hdmi_pipe_enabled(dev_priv, val, pipe)) {
|
if (hdmi_pipe_enabled(dev_priv, pipe, val)) {
|
||||||
DRM_DEBUG_KMS("Disabling pch HDMI %x on pipe %d\n",
|
DRM_DEBUG_KMS("Disabling pch HDMI %x on pipe %d\n",
|
||||||
reg, pipe);
|
reg, pipe);
|
||||||
I915_WRITE(reg, val & ~PORT_ENABLE);
|
I915_WRITE(reg, val & ~PORT_ENABLE);
|
||||||
|
@ -1894,12 +1894,12 @@ static void intel_disable_pch_ports(struct drm_i915_private *dev_priv,
|
||||||
|
|
||||||
reg = PCH_ADPA;
|
reg = PCH_ADPA;
|
||||||
val = I915_READ(reg);
|
val = I915_READ(reg);
|
||||||
if (adpa_pipe_enabled(dev_priv, val, pipe))
|
if (adpa_pipe_enabled(dev_priv, pipe, val))
|
||||||
I915_WRITE(reg, val & ~ADPA_DAC_ENABLE);
|
I915_WRITE(reg, val & ~ADPA_DAC_ENABLE);
|
||||||
|
|
||||||
reg = PCH_LVDS;
|
reg = PCH_LVDS;
|
||||||
val = I915_READ(reg);
|
val = I915_READ(reg);
|
||||||
if (lvds_pipe_enabled(dev_priv, val, pipe)) {
|
if (lvds_pipe_enabled(dev_priv, pipe, val)) {
|
||||||
DRM_DEBUG_KMS("disable lvds on pipe %d val 0x%08x\n", pipe, val);
|
DRM_DEBUG_KMS("disable lvds on pipe %d val 0x%08x\n", pipe, val);
|
||||||
I915_WRITE(reg, val & ~LVDS_PORT_EN);
|
I915_WRITE(reg, val & ~LVDS_PORT_EN);
|
||||||
POSTING_READ(reg);
|
POSTING_READ(reg);
|
||||||
|
|
|
@ -780,6 +780,14 @@ static const struct dmi_system_id intel_no_lvds[] = {
|
||||||
DMI_MATCH(DMI_BOARD_NAME, "ZBOXSD-ID12/ID13"),
|
DMI_MATCH(DMI_BOARD_NAME, "ZBOXSD-ID12/ID13"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.callback = intel_no_lvds_dmi_callback,
|
||||||
|
.ident = "Gigabyte GA-D525TUD",
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_BOARD_VENDOR, "Gigabyte Technology Co., Ltd."),
|
||||||
|
DMI_MATCH(DMI_BOARD_NAME, "D525TUD"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
{ } /* terminating entry */
|
{ } /* terminating entry */
|
||||||
};
|
};
|
||||||
|
|
|
@ -60,11 +60,11 @@ ivb_update_plane(struct drm_plane *plane, struct drm_framebuffer *fb,
|
||||||
|
|
||||||
switch (fb->pixel_format) {
|
switch (fb->pixel_format) {
|
||||||
case DRM_FORMAT_XBGR8888:
|
case DRM_FORMAT_XBGR8888:
|
||||||
sprctl |= SPRITE_FORMAT_RGBX888;
|
sprctl |= SPRITE_FORMAT_RGBX888 | SPRITE_RGB_ORDER_RGBX;
|
||||||
pixel_size = 4;
|
pixel_size = 4;
|
||||||
break;
|
break;
|
||||||
case DRM_FORMAT_XRGB8888:
|
case DRM_FORMAT_XRGB8888:
|
||||||
sprctl |= SPRITE_FORMAT_RGBX888 | SPRITE_RGB_ORDER_RGBX;
|
sprctl |= SPRITE_FORMAT_RGBX888;
|
||||||
pixel_size = 4;
|
pixel_size = 4;
|
||||||
break;
|
break;
|
||||||
case DRM_FORMAT_YUYV:
|
case DRM_FORMAT_YUYV:
|
||||||
|
|
|
@ -736,9 +736,11 @@ nouveau_card_init(struct drm_device *dev)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NV_C0:
|
case NV_C0:
|
||||||
nvc0_copy_create(dev, 1);
|
if (!(nv_rd32(dev, 0x022500) & 0x00000200))
|
||||||
|
nvc0_copy_create(dev, 1);
|
||||||
case NV_D0:
|
case NV_D0:
|
||||||
nvc0_copy_create(dev, 0);
|
if (!(nv_rd32(dev, 0x022500) & 0x00000100))
|
||||||
|
nvc0_copy_create(dev, 0);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -258,7 +258,6 @@ void atombios_crtc_dpms(struct drm_crtc *crtc, int mode)
|
||||||
radeon_crtc->enabled = true;
|
radeon_crtc->enabled = true;
|
||||||
/* adjust pm to dpms changes BEFORE enabling crtcs */
|
/* adjust pm to dpms changes BEFORE enabling crtcs */
|
||||||
radeon_pm_compute_clocks(rdev);
|
radeon_pm_compute_clocks(rdev);
|
||||||
/* disable crtc pair power gating before programming */
|
|
||||||
if (ASIC_IS_DCE6(rdev) && !radeon_crtc->in_mode_set)
|
if (ASIC_IS_DCE6(rdev) && !radeon_crtc->in_mode_set)
|
||||||
atombios_powergate_crtc(crtc, ATOM_DISABLE);
|
atombios_powergate_crtc(crtc, ATOM_DISABLE);
|
||||||
atombios_enable_crtc(crtc, ATOM_ENABLE);
|
atombios_enable_crtc(crtc, ATOM_ENABLE);
|
||||||
|
@ -278,25 +277,8 @@ void atombios_crtc_dpms(struct drm_crtc *crtc, int mode)
|
||||||
atombios_enable_crtc_memreq(crtc, ATOM_DISABLE);
|
atombios_enable_crtc_memreq(crtc, ATOM_DISABLE);
|
||||||
atombios_enable_crtc(crtc, ATOM_DISABLE);
|
atombios_enable_crtc(crtc, ATOM_DISABLE);
|
||||||
radeon_crtc->enabled = false;
|
radeon_crtc->enabled = false;
|
||||||
/* power gating is per-pair */
|
if (ASIC_IS_DCE6(rdev) && !radeon_crtc->in_mode_set)
|
||||||
if (ASIC_IS_DCE6(rdev) && !radeon_crtc->in_mode_set) {
|
atombios_powergate_crtc(crtc, ATOM_ENABLE);
|
||||||
struct drm_crtc *other_crtc;
|
|
||||||
struct radeon_crtc *other_radeon_crtc;
|
|
||||||
list_for_each_entry(other_crtc, &rdev->ddev->mode_config.crtc_list, head) {
|
|
||||||
other_radeon_crtc = to_radeon_crtc(other_crtc);
|
|
||||||
if (((radeon_crtc->crtc_id == 0) && (other_radeon_crtc->crtc_id == 1)) ||
|
|
||||||
((radeon_crtc->crtc_id == 1) && (other_radeon_crtc->crtc_id == 0)) ||
|
|
||||||
((radeon_crtc->crtc_id == 2) && (other_radeon_crtc->crtc_id == 3)) ||
|
|
||||||
((radeon_crtc->crtc_id == 3) && (other_radeon_crtc->crtc_id == 2)) ||
|
|
||||||
((radeon_crtc->crtc_id == 4) && (other_radeon_crtc->crtc_id == 5)) ||
|
|
||||||
((radeon_crtc->crtc_id == 5) && (other_radeon_crtc->crtc_id == 4))) {
|
|
||||||
/* if both crtcs in the pair are off, enable power gating */
|
|
||||||
if (other_radeon_crtc->enabled == false)
|
|
||||||
atombios_powergate_crtc(crtc, ATOM_ENABLE);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* adjust pm to dpms changes AFTER disabling crtcs */
|
/* adjust pm to dpms changes AFTER disabling crtcs */
|
||||||
radeon_pm_compute_clocks(rdev);
|
radeon_pm_compute_clocks(rdev);
|
||||||
break;
|
break;
|
||||||
|
@ -1682,9 +1664,22 @@ static void atombios_crtc_disable(struct drm_crtc *crtc)
|
||||||
struct drm_device *dev = crtc->dev;
|
struct drm_device *dev = crtc->dev;
|
||||||
struct radeon_device *rdev = dev->dev_private;
|
struct radeon_device *rdev = dev->dev_private;
|
||||||
struct radeon_atom_ss ss;
|
struct radeon_atom_ss ss;
|
||||||
|
int i;
|
||||||
|
|
||||||
atombios_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
|
atombios_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
|
||||||
|
|
||||||
|
for (i = 0; i < rdev->num_crtc; i++) {
|
||||||
|
if (rdev->mode_info.crtcs[i] &&
|
||||||
|
rdev->mode_info.crtcs[i]->enabled &&
|
||||||
|
i != radeon_crtc->crtc_id &&
|
||||||
|
radeon_crtc->pll_id == rdev->mode_info.crtcs[i]->pll_id) {
|
||||||
|
/* one other crtc is using this pll don't turn
|
||||||
|
* off the pll
|
||||||
|
*/
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch (radeon_crtc->pll_id) {
|
switch (radeon_crtc->pll_id) {
|
||||||
case ATOM_PPLL1:
|
case ATOM_PPLL1:
|
||||||
case ATOM_PPLL2:
|
case ATOM_PPLL2:
|
||||||
|
@ -1701,6 +1696,7 @@ static void atombios_crtc_disable(struct drm_crtc *crtc)
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
done:
|
||||||
radeon_crtc->pll_id = -1;
|
radeon_crtc->pll_id = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -577,30 +577,25 @@ int radeon_dp_get_panel_mode(struct drm_encoder *encoder,
|
||||||
struct radeon_device *rdev = dev->dev_private;
|
struct radeon_device *rdev = dev->dev_private;
|
||||||
struct radeon_connector *radeon_connector = to_radeon_connector(connector);
|
struct radeon_connector *radeon_connector = to_radeon_connector(connector);
|
||||||
int panel_mode = DP_PANEL_MODE_EXTERNAL_DP_MODE;
|
int panel_mode = DP_PANEL_MODE_EXTERNAL_DP_MODE;
|
||||||
|
u16 dp_bridge = radeon_connector_encoder_get_dp_bridge_encoder_id(connector);
|
||||||
|
u8 tmp;
|
||||||
|
|
||||||
if (!ASIC_IS_DCE4(rdev))
|
if (!ASIC_IS_DCE4(rdev))
|
||||||
return panel_mode;
|
return panel_mode;
|
||||||
|
|
||||||
if (radeon_connector_encoder_get_dp_bridge_encoder_id(connector) ==
|
if (dp_bridge != ENCODER_OBJECT_ID_NONE) {
|
||||||
ENCODER_OBJECT_ID_NUTMEG)
|
/* DP bridge chips */
|
||||||
panel_mode = DP_PANEL_MODE_INTERNAL_DP1_MODE;
|
tmp = radeon_read_dpcd_reg(radeon_connector, DP_EDP_CONFIGURATION_CAP);
|
||||||
else if (radeon_connector_encoder_get_dp_bridge_encoder_id(connector) ==
|
if (tmp & 1)
|
||||||
ENCODER_OBJECT_ID_TRAVIS) {
|
panel_mode = DP_PANEL_MODE_INTERNAL_DP2_MODE;
|
||||||
u8 id[6];
|
else if ((dp_bridge == ENCODER_OBJECT_ID_NUTMEG) ||
|
||||||
int i;
|
(dp_bridge == ENCODER_OBJECT_ID_TRAVIS))
|
||||||
for (i = 0; i < 6; i++)
|
|
||||||
id[i] = radeon_read_dpcd_reg(radeon_connector, 0x503 + i);
|
|
||||||
if (id[0] == 0x73 &&
|
|
||||||
id[1] == 0x69 &&
|
|
||||||
id[2] == 0x76 &&
|
|
||||||
id[3] == 0x61 &&
|
|
||||||
id[4] == 0x72 &&
|
|
||||||
id[5] == 0x54)
|
|
||||||
panel_mode = DP_PANEL_MODE_INTERNAL_DP1_MODE;
|
panel_mode = DP_PANEL_MODE_INTERNAL_DP1_MODE;
|
||||||
else
|
else
|
||||||
panel_mode = DP_PANEL_MODE_INTERNAL_DP2_MODE;
|
panel_mode = DP_PANEL_MODE_EXTERNAL_DP_MODE;
|
||||||
} else if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) {
|
} else if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) {
|
||||||
u8 tmp = radeon_read_dpcd_reg(radeon_connector, DP_EDP_CONFIGURATION_CAP);
|
/* eDP */
|
||||||
|
tmp = radeon_read_dpcd_reg(radeon_connector, DP_EDP_CONFIGURATION_CAP);
|
||||||
if (tmp & 1)
|
if (tmp & 1)
|
||||||
panel_mode = DP_PANEL_MODE_INTERNAL_DP2_MODE;
|
panel_mode = DP_PANEL_MODE_INTERNAL_DP2_MODE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1379,6 +1379,8 @@ radeon_atom_encoder_dpms_dig(struct drm_encoder *encoder, int mode)
|
||||||
struct drm_device *dev = encoder->dev;
|
struct drm_device *dev = encoder->dev;
|
||||||
struct radeon_device *rdev = dev->dev_private;
|
struct radeon_device *rdev = dev->dev_private;
|
||||||
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
|
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
|
||||||
|
struct drm_encoder *ext_encoder = radeon_get_external_encoder(encoder);
|
||||||
|
struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
|
||||||
struct drm_connector *connector = radeon_get_connector_for_encoder(encoder);
|
struct drm_connector *connector = radeon_get_connector_for_encoder(encoder);
|
||||||
struct radeon_connector *radeon_connector = NULL;
|
struct radeon_connector *radeon_connector = NULL;
|
||||||
struct radeon_connector_atom_dig *radeon_dig_connector = NULL;
|
struct radeon_connector_atom_dig *radeon_dig_connector = NULL;
|
||||||
|
@ -1390,19 +1392,37 @@ radeon_atom_encoder_dpms_dig(struct drm_encoder *encoder, int mode)
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case DRM_MODE_DPMS_ON:
|
case DRM_MODE_DPMS_ON:
|
||||||
/* some early dce3.2 boards have a bug in their transmitter control table */
|
if (ASIC_IS_DCE41(rdev) || ASIC_IS_DCE5(rdev)) {
|
||||||
if ((rdev->family == CHIP_RV710) || (rdev->family == CHIP_RV730) ||
|
if (!connector)
|
||||||
ASIC_IS_DCE41(rdev) || ASIC_IS_DCE5(rdev)) {
|
dig->panel_mode = DP_PANEL_MODE_EXTERNAL_DP_MODE;
|
||||||
if (ASIC_IS_DCE6(rdev)) {
|
else
|
||||||
/* It seems we need to call ATOM_ENCODER_CMD_SETUP again
|
dig->panel_mode = radeon_dp_get_panel_mode(encoder, connector);
|
||||||
* before reenabling encoder on DPMS ON, otherwise we never
|
|
||||||
* get picture
|
/* setup and enable the encoder */
|
||||||
*/
|
atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_SETUP, 0);
|
||||||
atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_SETUP, 0);
|
atombios_dig_encoder_setup(encoder,
|
||||||
|
ATOM_ENCODER_CMD_SETUP_PANEL_MODE,
|
||||||
|
dig->panel_mode);
|
||||||
|
if (ext_encoder) {
|
||||||
|
if (ASIC_IS_DCE41(rdev) || ASIC_IS_DCE61(rdev))
|
||||||
|
atombios_external_encoder_setup(encoder, ext_encoder,
|
||||||
|
EXTERNAL_ENCODER_ACTION_V3_ENCODER_SETUP);
|
||||||
}
|
}
|
||||||
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE, 0, 0);
|
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE, 0, 0);
|
||||||
} else {
|
} else if (ASIC_IS_DCE4(rdev)) {
|
||||||
|
/* setup and enable the encoder */
|
||||||
|
atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_SETUP, 0);
|
||||||
|
/* enable the transmitter */
|
||||||
|
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE, 0, 0);
|
||||||
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT, 0, 0);
|
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT, 0, 0);
|
||||||
|
} else {
|
||||||
|
/* setup and enable the encoder and transmitter */
|
||||||
|
atombios_dig_encoder_setup(encoder, ATOM_ENABLE, 0);
|
||||||
|
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_SETUP, 0, 0);
|
||||||
|
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE, 0, 0);
|
||||||
|
/* some early dce3.2 boards have a bug in their transmitter control table */
|
||||||
|
if ((rdev->family != CHIP_RV710) || (rdev->family != CHIP_RV730))
|
||||||
|
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT, 0, 0);
|
||||||
}
|
}
|
||||||
if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && connector) {
|
if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && connector) {
|
||||||
if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) {
|
if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) {
|
||||||
|
@ -1420,10 +1440,19 @@ radeon_atom_encoder_dpms_dig(struct drm_encoder *encoder, int mode)
|
||||||
case DRM_MODE_DPMS_STANDBY:
|
case DRM_MODE_DPMS_STANDBY:
|
||||||
case DRM_MODE_DPMS_SUSPEND:
|
case DRM_MODE_DPMS_SUSPEND:
|
||||||
case DRM_MODE_DPMS_OFF:
|
case DRM_MODE_DPMS_OFF:
|
||||||
if (ASIC_IS_DCE41(rdev) || ASIC_IS_DCE5(rdev))
|
if (ASIC_IS_DCE41(rdev) || ASIC_IS_DCE5(rdev)) {
|
||||||
|
/* disable the transmitter */
|
||||||
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE, 0, 0);
|
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE, 0, 0);
|
||||||
else
|
} else if (ASIC_IS_DCE4(rdev)) {
|
||||||
|
/* disable the transmitter */
|
||||||
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE_OUTPUT, 0, 0);
|
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE_OUTPUT, 0, 0);
|
||||||
|
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE, 0, 0);
|
||||||
|
} else {
|
||||||
|
/* disable the encoder and transmitter */
|
||||||
|
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE_OUTPUT, 0, 0);
|
||||||
|
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE, 0, 0);
|
||||||
|
atombios_dig_encoder_setup(encoder, ATOM_DISABLE, 0);
|
||||||
|
}
|
||||||
if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && connector) {
|
if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && connector) {
|
||||||
if (ASIC_IS_DCE4(rdev))
|
if (ASIC_IS_DCE4(rdev))
|
||||||
atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_DP_VIDEO_OFF, 0);
|
atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_DP_VIDEO_OFF, 0);
|
||||||
|
@ -1740,13 +1769,34 @@ static int radeon_atom_pick_dig_encoder(struct drm_encoder *encoder)
|
||||||
struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc);
|
struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc);
|
||||||
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
|
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
|
||||||
struct drm_encoder *test_encoder;
|
struct drm_encoder *test_encoder;
|
||||||
struct radeon_encoder_atom_dig *dig;
|
struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
|
||||||
uint32_t dig_enc_in_use = 0;
|
uint32_t dig_enc_in_use = 0;
|
||||||
|
|
||||||
/* DCE4/5 */
|
if (ASIC_IS_DCE6(rdev)) {
|
||||||
if (ASIC_IS_DCE4(rdev)) {
|
/* DCE6 */
|
||||||
dig = radeon_encoder->enc_priv;
|
switch (radeon_encoder->encoder_id) {
|
||||||
if (ASIC_IS_DCE41(rdev)) {
|
case ENCODER_OBJECT_ID_INTERNAL_UNIPHY:
|
||||||
|
if (dig->linkb)
|
||||||
|
return 1;
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
break;
|
||||||
|
case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
|
||||||
|
if (dig->linkb)
|
||||||
|
return 3;
|
||||||
|
else
|
||||||
|
return 2;
|
||||||
|
break;
|
||||||
|
case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
|
||||||
|
if (dig->linkb)
|
||||||
|
return 5;
|
||||||
|
else
|
||||||
|
return 4;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if (ASIC_IS_DCE4(rdev)) {
|
||||||
|
/* DCE4/5 */
|
||||||
|
if (ASIC_IS_DCE41(rdev) && !ASIC_IS_DCE61(rdev)) {
|
||||||
/* ontario follows DCE4 */
|
/* ontario follows DCE4 */
|
||||||
if (rdev->family == CHIP_PALM) {
|
if (rdev->family == CHIP_PALM) {
|
||||||
if (dig->linkb)
|
if (dig->linkb)
|
||||||
|
@ -1848,10 +1898,12 @@ radeon_atom_encoder_mode_set(struct drm_encoder *encoder,
|
||||||
struct drm_device *dev = encoder->dev;
|
struct drm_device *dev = encoder->dev;
|
||||||
struct radeon_device *rdev = dev->dev_private;
|
struct radeon_device *rdev = dev->dev_private;
|
||||||
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
|
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
|
||||||
struct drm_encoder *ext_encoder = radeon_get_external_encoder(encoder);
|
|
||||||
|
|
||||||
radeon_encoder->pixel_clock = adjusted_mode->clock;
|
radeon_encoder->pixel_clock = adjusted_mode->clock;
|
||||||
|
|
||||||
|
/* need to call this here rather than in prepare() since we need some crtc info */
|
||||||
|
radeon_atom_encoder_dpms(encoder, DRM_MODE_DPMS_OFF);
|
||||||
|
|
||||||
if (ASIC_IS_AVIVO(rdev) && !ASIC_IS_DCE4(rdev)) {
|
if (ASIC_IS_AVIVO(rdev) && !ASIC_IS_DCE4(rdev)) {
|
||||||
if (radeon_encoder->active_device & (ATOM_DEVICE_CV_SUPPORT | ATOM_DEVICE_TV_SUPPORT))
|
if (radeon_encoder->active_device & (ATOM_DEVICE_CV_SUPPORT | ATOM_DEVICE_TV_SUPPORT))
|
||||||
atombios_yuv_setup(encoder, true);
|
atombios_yuv_setup(encoder, true);
|
||||||
|
@ -1870,38 +1922,7 @@ radeon_atom_encoder_mode_set(struct drm_encoder *encoder,
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
|
case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
|
case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA:
|
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA:
|
||||||
if (ASIC_IS_DCE41(rdev) || ASIC_IS_DCE5(rdev)) {
|
/* handled in dpms */
|
||||||
struct drm_connector *connector = radeon_get_connector_for_encoder(encoder);
|
|
||||||
struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
|
|
||||||
|
|
||||||
if (!connector)
|
|
||||||
dig->panel_mode = DP_PANEL_MODE_EXTERNAL_DP_MODE;
|
|
||||||
else
|
|
||||||
dig->panel_mode = radeon_dp_get_panel_mode(encoder, connector);
|
|
||||||
|
|
||||||
/* setup and enable the encoder */
|
|
||||||
atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_SETUP, 0);
|
|
||||||
atombios_dig_encoder_setup(encoder,
|
|
||||||
ATOM_ENCODER_CMD_SETUP_PANEL_MODE,
|
|
||||||
dig->panel_mode);
|
|
||||||
} else if (ASIC_IS_DCE4(rdev)) {
|
|
||||||
/* disable the transmitter */
|
|
||||||
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE, 0, 0);
|
|
||||||
/* setup and enable the encoder */
|
|
||||||
atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_SETUP, 0);
|
|
||||||
|
|
||||||
/* enable the transmitter */
|
|
||||||
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE, 0, 0);
|
|
||||||
} else {
|
|
||||||
/* disable the encoder and transmitter */
|
|
||||||
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE, 0, 0);
|
|
||||||
atombios_dig_encoder_setup(encoder, ATOM_DISABLE, 0);
|
|
||||||
|
|
||||||
/* setup and enable the encoder and transmitter */
|
|
||||||
atombios_dig_encoder_setup(encoder, ATOM_ENABLE, 0);
|
|
||||||
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_SETUP, 0, 0);
|
|
||||||
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE, 0, 0);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_DDI:
|
case ENCODER_OBJECT_ID_INTERNAL_DDI:
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_DVO1:
|
case ENCODER_OBJECT_ID_INTERNAL_DVO1:
|
||||||
|
@ -1922,14 +1943,6 @@ radeon_atom_encoder_mode_set(struct drm_encoder *encoder,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ext_encoder) {
|
|
||||||
if (ASIC_IS_DCE41(rdev) || ASIC_IS_DCE61(rdev))
|
|
||||||
atombios_external_encoder_setup(encoder, ext_encoder,
|
|
||||||
EXTERNAL_ENCODER_ACTION_V3_ENCODER_SETUP);
|
|
||||||
else
|
|
||||||
atombios_external_encoder_setup(encoder, ext_encoder, ATOM_ENABLE);
|
|
||||||
}
|
|
||||||
|
|
||||||
atombios_apply_encoder_quirks(encoder, adjusted_mode);
|
atombios_apply_encoder_quirks(encoder, adjusted_mode);
|
||||||
|
|
||||||
if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) {
|
if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) {
|
||||||
|
@ -2116,7 +2129,6 @@ static void radeon_atom_encoder_prepare(struct drm_encoder *encoder)
|
||||||
}
|
}
|
||||||
|
|
||||||
radeon_atom_output_lock(encoder, true);
|
radeon_atom_output_lock(encoder, true);
|
||||||
radeon_atom_encoder_dpms(encoder, DRM_MODE_DPMS_OFF);
|
|
||||||
|
|
||||||
if (connector) {
|
if (connector) {
|
||||||
struct radeon_connector *radeon_connector = to_radeon_connector(connector);
|
struct radeon_connector *radeon_connector = to_radeon_connector(connector);
|
||||||
|
@ -2137,6 +2149,7 @@ static void radeon_atom_encoder_prepare(struct drm_encoder *encoder)
|
||||||
|
|
||||||
static void radeon_atom_encoder_commit(struct drm_encoder *encoder)
|
static void radeon_atom_encoder_commit(struct drm_encoder *encoder)
|
||||||
{
|
{
|
||||||
|
/* need to call this here as we need the crtc set up */
|
||||||
radeon_atom_encoder_dpms(encoder, DRM_MODE_DPMS_ON);
|
radeon_atom_encoder_dpms(encoder, DRM_MODE_DPMS_ON);
|
||||||
radeon_atom_output_lock(encoder, false);
|
radeon_atom_output_lock(encoder, false);
|
||||||
}
|
}
|
||||||
|
@ -2177,14 +2190,7 @@ static void radeon_atom_encoder_disable(struct drm_encoder *encoder)
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
|
case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
|
case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA:
|
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA:
|
||||||
if (ASIC_IS_DCE4(rdev))
|
/* handled in dpms */
|
||||||
/* disable the transmitter */
|
|
||||||
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE, 0, 0);
|
|
||||||
else {
|
|
||||||
/* disable the encoder and transmitter */
|
|
||||||
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE, 0, 0);
|
|
||||||
atombios_dig_encoder_setup(encoder, ATOM_DISABLE, 0);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_DDI:
|
case ENCODER_OBJECT_ID_INTERNAL_DDI:
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_DVO1:
|
case ENCODER_OBJECT_ID_INTERNAL_DVO1:
|
||||||
|
|
|
@ -63,6 +63,7 @@ struct r600_cs_track {
|
||||||
u32 cb_color_size_idx[8]; /* unused */
|
u32 cb_color_size_idx[8]; /* unused */
|
||||||
u32 cb_target_mask;
|
u32 cb_target_mask;
|
||||||
u32 cb_shader_mask; /* unused */
|
u32 cb_shader_mask; /* unused */
|
||||||
|
bool is_resolve;
|
||||||
u32 cb_color_size[8];
|
u32 cb_color_size[8];
|
||||||
u32 vgt_strmout_en;
|
u32 vgt_strmout_en;
|
||||||
u32 vgt_strmout_buffer_en;
|
u32 vgt_strmout_buffer_en;
|
||||||
|
@ -315,7 +316,15 @@ static void r600_cs_track_init(struct r600_cs_track *track)
|
||||||
track->cb_color_bo[i] = NULL;
|
track->cb_color_bo[i] = NULL;
|
||||||
track->cb_color_bo_offset[i] = 0xFFFFFFFF;
|
track->cb_color_bo_offset[i] = 0xFFFFFFFF;
|
||||||
track->cb_color_bo_mc[i] = 0xFFFFFFFF;
|
track->cb_color_bo_mc[i] = 0xFFFFFFFF;
|
||||||
|
track->cb_color_frag_bo[i] = NULL;
|
||||||
|
track->cb_color_frag_offset[i] = 0xFFFFFFFF;
|
||||||
|
track->cb_color_tile_bo[i] = NULL;
|
||||||
|
track->cb_color_tile_offset[i] = 0xFFFFFFFF;
|
||||||
|
track->cb_color_mask[i] = 0xFFFFFFFF;
|
||||||
}
|
}
|
||||||
|
track->is_resolve = false;
|
||||||
|
track->nsamples = 16;
|
||||||
|
track->log_nsamples = 4;
|
||||||
track->cb_target_mask = 0xFFFFFFFF;
|
track->cb_target_mask = 0xFFFFFFFF;
|
||||||
track->cb_shader_mask = 0xFFFFFFFF;
|
track->cb_shader_mask = 0xFFFFFFFF;
|
||||||
track->cb_dirty = true;
|
track->cb_dirty = true;
|
||||||
|
@ -352,6 +361,8 @@ static int r600_cs_track_validate_cb(struct radeon_cs_parser *p, int i)
|
||||||
volatile u32 *ib = p->ib.ptr;
|
volatile u32 *ib = p->ib.ptr;
|
||||||
unsigned array_mode;
|
unsigned array_mode;
|
||||||
u32 format;
|
u32 format;
|
||||||
|
/* When resolve is used, the second colorbuffer has always 1 sample. */
|
||||||
|
unsigned nsamples = track->is_resolve && i == 1 ? 1 : track->nsamples;
|
||||||
|
|
||||||
size = radeon_bo_size(track->cb_color_bo[i]) - track->cb_color_bo_offset[i];
|
size = radeon_bo_size(track->cb_color_bo[i]) - track->cb_color_bo_offset[i];
|
||||||
format = G_0280A0_FORMAT(track->cb_color_info[i]);
|
format = G_0280A0_FORMAT(track->cb_color_info[i]);
|
||||||
|
@ -375,7 +386,7 @@ static int r600_cs_track_validate_cb(struct radeon_cs_parser *p, int i)
|
||||||
array_check.group_size = track->group_size;
|
array_check.group_size = track->group_size;
|
||||||
array_check.nbanks = track->nbanks;
|
array_check.nbanks = track->nbanks;
|
||||||
array_check.npipes = track->npipes;
|
array_check.npipes = track->npipes;
|
||||||
array_check.nsamples = track->nsamples;
|
array_check.nsamples = nsamples;
|
||||||
array_check.blocksize = r600_fmt_get_blocksize(format);
|
array_check.blocksize = r600_fmt_get_blocksize(format);
|
||||||
if (r600_get_array_mode_alignment(&array_check,
|
if (r600_get_array_mode_alignment(&array_check,
|
||||||
&pitch_align, &height_align, &depth_align, &base_align)) {
|
&pitch_align, &height_align, &depth_align, &base_align)) {
|
||||||
|
@ -421,7 +432,7 @@ static int r600_cs_track_validate_cb(struct radeon_cs_parser *p, int i)
|
||||||
|
|
||||||
/* check offset */
|
/* check offset */
|
||||||
tmp = r600_fmt_get_nblocksy(format, height) * r600_fmt_get_nblocksx(format, pitch) *
|
tmp = r600_fmt_get_nblocksy(format, height) * r600_fmt_get_nblocksx(format, pitch) *
|
||||||
r600_fmt_get_blocksize(format) * track->nsamples;
|
r600_fmt_get_blocksize(format) * nsamples;
|
||||||
switch (array_mode) {
|
switch (array_mode) {
|
||||||
default:
|
default:
|
||||||
case V_0280A0_ARRAY_LINEAR_GENERAL:
|
case V_0280A0_ARRAY_LINEAR_GENERAL:
|
||||||
|
@ -792,6 +803,12 @@ static int r600_cs_track_check(struct radeon_cs_parser *p)
|
||||||
*/
|
*/
|
||||||
if (track->cb_dirty) {
|
if (track->cb_dirty) {
|
||||||
tmp = track->cb_target_mask;
|
tmp = track->cb_target_mask;
|
||||||
|
|
||||||
|
/* We must check both colorbuffers for RESOLVE. */
|
||||||
|
if (track->is_resolve) {
|
||||||
|
tmp |= 0xff;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < 8; i++) {
|
for (i = 0; i < 8; i++) {
|
||||||
if ((tmp >> (i * 4)) & 0xF) {
|
if ((tmp >> (i * 4)) & 0xF) {
|
||||||
/* at least one component is enabled */
|
/* at least one component is enabled */
|
||||||
|
@ -1281,6 +1298,11 @@ static int r600_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx)
|
||||||
track->nsamples = 1 << tmp;
|
track->nsamples = 1 << tmp;
|
||||||
track->cb_dirty = true;
|
track->cb_dirty = true;
|
||||||
break;
|
break;
|
||||||
|
case R_028808_CB_COLOR_CONTROL:
|
||||||
|
tmp = G_028808_SPECIAL_OP(radeon_get_ib_value(p, idx));
|
||||||
|
track->is_resolve = tmp == V_028808_SPECIAL_RESOLVE_BOX;
|
||||||
|
track->cb_dirty = true;
|
||||||
|
break;
|
||||||
case R_0280A0_CB_COLOR0_INFO:
|
case R_0280A0_CB_COLOR0_INFO:
|
||||||
case R_0280A4_CB_COLOR1_INFO:
|
case R_0280A4_CB_COLOR1_INFO:
|
||||||
case R_0280A8_CB_COLOR2_INFO:
|
case R_0280A8_CB_COLOR2_INFO:
|
||||||
|
@ -1416,7 +1438,7 @@ static int r600_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx)
|
||||||
case R_028118_CB_COLOR6_MASK:
|
case R_028118_CB_COLOR6_MASK:
|
||||||
case R_02811C_CB_COLOR7_MASK:
|
case R_02811C_CB_COLOR7_MASK:
|
||||||
tmp = (reg - R_028100_CB_COLOR0_MASK) / 4;
|
tmp = (reg - R_028100_CB_COLOR0_MASK) / 4;
|
||||||
track->cb_color_mask[tmp] = ib[idx];
|
track->cb_color_mask[tmp] = radeon_get_ib_value(p, idx);
|
||||||
if (G_0280A0_TILE_MODE(track->cb_color_info[tmp])) {
|
if (G_0280A0_TILE_MODE(track->cb_color_info[tmp])) {
|
||||||
track->cb_dirty = true;
|
track->cb_dirty = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,6 +66,14 @@
|
||||||
#define CC_RB_BACKEND_DISABLE 0x98F4
|
#define CC_RB_BACKEND_DISABLE 0x98F4
|
||||||
#define BACKEND_DISABLE(x) ((x) << 16)
|
#define BACKEND_DISABLE(x) ((x) << 16)
|
||||||
|
|
||||||
|
#define R_028808_CB_COLOR_CONTROL 0x28808
|
||||||
|
#define S_028808_SPECIAL_OP(x) (((x) & 0x7) << 4)
|
||||||
|
#define G_028808_SPECIAL_OP(x) (((x) >> 4) & 0x7)
|
||||||
|
#define C_028808_SPECIAL_OP 0xFFFFFF8F
|
||||||
|
#define V_028808_SPECIAL_NORMAL 0x00
|
||||||
|
#define V_028808_SPECIAL_DISABLE 0x01
|
||||||
|
#define V_028808_SPECIAL_RESOLVE_BOX 0x07
|
||||||
|
|
||||||
#define CB_COLOR0_BASE 0x28040
|
#define CB_COLOR0_BASE 0x28040
|
||||||
#define CB_COLOR1_BASE 0x28044
|
#define CB_COLOR1_BASE 0x28044
|
||||||
#define CB_COLOR2_BASE 0x28048
|
#define CB_COLOR2_BASE 0x28048
|
||||||
|
|
|
@ -1051,7 +1051,7 @@ int radeon_device_init(struct radeon_device *rdev,
|
||||||
if (rdev->flags & RADEON_IS_AGP)
|
if (rdev->flags & RADEON_IS_AGP)
|
||||||
rdev->need_dma32 = true;
|
rdev->need_dma32 = true;
|
||||||
if ((rdev->flags & RADEON_IS_PCI) &&
|
if ((rdev->flags & RADEON_IS_PCI) &&
|
||||||
(rdev->family < CHIP_RS400))
|
(rdev->family <= CHIP_RS740))
|
||||||
rdev->need_dma32 = true;
|
rdev->need_dma32 = true;
|
||||||
|
|
||||||
dma_bits = rdev->need_dma32 ? 32 : 40;
|
dma_bits = rdev->need_dma32 ? 32 : 40;
|
||||||
|
@ -1346,12 +1346,15 @@ int radeon_gpu_reset(struct radeon_device *rdev)
|
||||||
for (i = 0; i < RADEON_NUM_RINGS; ++i) {
|
for (i = 0; i < RADEON_NUM_RINGS; ++i) {
|
||||||
radeon_ring_restore(rdev, &rdev->ring[i],
|
radeon_ring_restore(rdev, &rdev->ring[i],
|
||||||
ring_sizes[i], ring_data[i]);
|
ring_sizes[i], ring_data[i]);
|
||||||
|
ring_sizes[i] = 0;
|
||||||
|
ring_data[i] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
r = radeon_ib_ring_tests(rdev);
|
r = radeon_ib_ring_tests(rdev);
|
||||||
if (r) {
|
if (r) {
|
||||||
dev_err(rdev->dev, "ib ring test failed (%d).\n", r);
|
dev_err(rdev->dev, "ib ring test failed (%d).\n", r);
|
||||||
if (saved) {
|
if (saved) {
|
||||||
|
saved = false;
|
||||||
radeon_suspend(rdev);
|
radeon_suspend(rdev);
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,9 +63,10 @@
|
||||||
* 2.19.0 - r600-eg: MSAA textures
|
* 2.19.0 - r600-eg: MSAA textures
|
||||||
* 2.20.0 - r600-si: RADEON_INFO_TIMESTAMP query
|
* 2.20.0 - r600-si: RADEON_INFO_TIMESTAMP query
|
||||||
* 2.21.0 - r600-r700: FMASK and CMASK
|
* 2.21.0 - r600-r700: FMASK and CMASK
|
||||||
|
* 2.22.0 - r600 only: RESOLVE_BOX allowed
|
||||||
*/
|
*/
|
||||||
#define KMS_DRIVER_MAJOR 2
|
#define KMS_DRIVER_MAJOR 2
|
||||||
#define KMS_DRIVER_MINOR 21
|
#define KMS_DRIVER_MINOR 22
|
||||||
#define KMS_DRIVER_PATCHLEVEL 0
|
#define KMS_DRIVER_PATCHLEVEL 0
|
||||||
int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags);
|
int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags);
|
||||||
int radeon_driver_unload_kms(struct drm_device *dev);
|
int radeon_driver_unload_kms(struct drm_device *dev);
|
||||||
|
|
|
@ -744,7 +744,6 @@ r600 0x9400
|
||||||
0x00028C38 CB_CLRCMP_DST
|
0x00028C38 CB_CLRCMP_DST
|
||||||
0x00028C3C CB_CLRCMP_MSK
|
0x00028C3C CB_CLRCMP_MSK
|
||||||
0x00028C34 CB_CLRCMP_SRC
|
0x00028C34 CB_CLRCMP_SRC
|
||||||
0x00028808 CB_COLOR_CONTROL
|
|
||||||
0x0002842C CB_FOG_BLUE
|
0x0002842C CB_FOG_BLUE
|
||||||
0x00028428 CB_FOG_GREEN
|
0x00028428 CB_FOG_GREEN
|
||||||
0x00028424 CB_FOG_RED
|
0x00028424 CB_FOG_RED
|
||||||
|
|
|
@ -996,7 +996,8 @@ static void hid_process_event(struct hid_device *hid, struct hid_field *field,
|
||||||
struct hid_driver *hdrv = hid->driver;
|
struct hid_driver *hdrv = hid->driver;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
hid_dump_input(hid, usage, value);
|
if (!list_empty(&hid->debug_list))
|
||||||
|
hid_dump_input(hid, usage, value);
|
||||||
|
|
||||||
if (hdrv && hdrv->event && hid_match_usage(hid, usage)) {
|
if (hdrv && hdrv->event && hid_match_usage(hid, usage)) {
|
||||||
ret = hdrv->event(hid, field, usage, value);
|
ret = hdrv->event(hid, field, usage, value);
|
||||||
|
@ -1558,7 +1559,9 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M610X) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M610X) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LABTEC, USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_LABTEC, USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LCPOWER, USB_DEVICE_ID_LCPOWER_LC1000 ) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_LCPOWER, USB_DEVICE_ID_LCPOWER_LC1000 ) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_TPKBD) },
|
#if IS_ENABLED(CONFIG_HID_LENOVO_TPKBD)
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_TPKBD) },
|
||||||
|
#endif
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_MX3000_RECEIVER) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_MX3000_RECEIVER) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_RECEIVER) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_RECEIVER) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_RECEIVER_2) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_RECEIVER_2) },
|
||||||
|
|
|
@ -439,7 +439,7 @@ static int logi_dj_recv_query_paired_devices(struct dj_receiver_dev *djrcv_dev)
|
||||||
struct dj_report *dj_report;
|
struct dj_report *dj_report;
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
dj_report = kzalloc(sizeof(dj_report), GFP_KERNEL);
|
dj_report = kzalloc(sizeof(struct dj_report), GFP_KERNEL);
|
||||||
if (!dj_report)
|
if (!dj_report)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
dj_report->report_id = REPORT_ID_DJ_SHORT;
|
dj_report->report_id = REPORT_ID_DJ_SHORT;
|
||||||
|
@ -456,7 +456,7 @@ static int logi_dj_recv_switch_to_dj_mode(struct dj_receiver_dev *djrcv_dev,
|
||||||
struct dj_report *dj_report;
|
struct dj_report *dj_report;
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
dj_report = kzalloc(sizeof(dj_report), GFP_KERNEL);
|
dj_report = kzalloc(sizeof(struct dj_report), GFP_KERNEL);
|
||||||
if (!dj_report)
|
if (!dj_report)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
dj_report->report_id = REPORT_ID_DJ_SHORT;
|
dj_report->report_id = REPORT_ID_DJ_SHORT;
|
||||||
|
|
|
@ -70,6 +70,7 @@ static const struct hid_blacklist {
|
||||||
{ USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_AXIS_295, HID_QUIRK_NOGET },
|
{ USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_AXIS_295, HID_QUIRK_NOGET },
|
||||||
{ USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET },
|
{ USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET },
|
||||||
{ USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET },
|
{ USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET },
|
||||||
|
{ USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS, HID_QUIRK_NOGET },
|
||||||
{ USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN, HID_QUIRK_NO_INIT_REPORTS },
|
{ USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN, HID_QUIRK_NO_INIT_REPORTS },
|
||||||
{ USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN1, HID_QUIRK_NO_INIT_REPORTS },
|
{ USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN1, HID_QUIRK_NO_INIT_REPORTS },
|
||||||
{ USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN2, HID_QUIRK_NO_INIT_REPORTS },
|
{ USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN2, HID_QUIRK_NO_INIT_REPORTS },
|
||||||
|
|
|
@ -34,6 +34,12 @@ static const struct dmi_system_id __initconst atk_force_new_if[] = {
|
||||||
.matches = {
|
.matches = {
|
||||||
DMI_MATCH(DMI_BOARD_NAME, "SABERTOOTH X58")
|
DMI_MATCH(DMI_BOARD_NAME, "SABERTOOTH X58")
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
/* Old interface reads the same sensor for fan0 and fan1 */
|
||||||
|
.ident = "Asus M5A78L",
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_BOARD_NAME, "M5A78L")
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
|
@ -358,6 +358,7 @@ static void imx_keypad_inhibit(struct imx_keypad *keypad)
|
||||||
/* Inhibit KDI and KRI interrupts. */
|
/* Inhibit KDI and KRI interrupts. */
|
||||||
reg_val = readw(keypad->mmio_base + KPSR);
|
reg_val = readw(keypad->mmio_base + KPSR);
|
||||||
reg_val &= ~(KBD_STAT_KRIE | KBD_STAT_KDIE);
|
reg_val &= ~(KBD_STAT_KRIE | KBD_STAT_KDIE);
|
||||||
|
reg_val |= KBD_STAT_KPKR | KBD_STAT_KPKD;
|
||||||
writew(reg_val, keypad->mmio_base + KPSR);
|
writew(reg_val, keypad->mmio_base + KPSR);
|
||||||
|
|
||||||
/* Colums as open drain and disable all rows */
|
/* Colums as open drain and disable all rows */
|
||||||
|
@ -515,7 +516,9 @@ static int __devinit imx_keypad_probe(struct platform_device *pdev)
|
||||||
input_set_drvdata(input_dev, keypad);
|
input_set_drvdata(input_dev, keypad);
|
||||||
|
|
||||||
/* Ensure that the keypad will stay dormant until opened */
|
/* Ensure that the keypad will stay dormant until opened */
|
||||||
|
clk_enable(keypad->clk);
|
||||||
imx_keypad_inhibit(keypad);
|
imx_keypad_inhibit(keypad);
|
||||||
|
clk_disable(keypad->clk);
|
||||||
|
|
||||||
error = request_irq(irq, imx_keypad_irq_handler, 0,
|
error = request_irq(irq, imx_keypad_irq_handler, 0,
|
||||||
pdev->name, keypad);
|
pdev->name, keypad);
|
||||||
|
|
|
@ -176,6 +176,20 @@ static const struct dmi_system_id __initconst i8042_dmi_noloop_table[] = {
|
||||||
DMI_MATCH(DMI_PRODUCT_NAME, "Spring Peak"),
|
DMI_MATCH(DMI_PRODUCT_NAME, "Spring Peak"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
/* Gigabyte T1005 - defines wrong chassis type ("Other") */
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "T1005"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
/* Gigabyte T1005M/P - defines wrong chassis type ("Other") */
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "T1005M/P"),
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.matches = {
|
.matches = {
|
||||||
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
|
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
|
||||||
|
|
|
@ -1848,7 +1848,10 @@ static const struct wacom_features wacom_features_0x2A =
|
||||||
{ "Wacom Intuos5 M", WACOM_PKGLEN_INTUOS, 44704, 27940, 2047,
|
{ "Wacom Intuos5 M", WACOM_PKGLEN_INTUOS, 44704, 27940, 2047,
|
||||||
63, INTUOS5, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
|
63, INTUOS5, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
|
||||||
static const struct wacom_features wacom_features_0xF4 =
|
static const struct wacom_features wacom_features_0xF4 =
|
||||||
{ "Wacom Cintiq 24HD", WACOM_PKGLEN_INTUOS, 104480, 65600, 2047,
|
{ "Wacom Cintiq 24HD", WACOM_PKGLEN_INTUOS, 104480, 65600, 2047,
|
||||||
|
63, WACOM_24HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
|
||||||
|
static const struct wacom_features wacom_features_0xF8 =
|
||||||
|
{ "Wacom Cintiq 24HD touch", WACOM_PKGLEN_INTUOS, 104480, 65600, 2047,
|
||||||
63, WACOM_24HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
|
63, WACOM_24HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
|
||||||
static const struct wacom_features wacom_features_0x3F =
|
static const struct wacom_features wacom_features_0x3F =
|
||||||
{ "Wacom Cintiq 21UX", WACOM_PKGLEN_INTUOS, 87200, 65600, 1023,
|
{ "Wacom Cintiq 21UX", WACOM_PKGLEN_INTUOS, 87200, 65600, 1023,
|
||||||
|
@ -2091,6 +2094,7 @@ const struct usb_device_id wacom_ids[] = {
|
||||||
{ USB_DEVICE_WACOM(0xEF) },
|
{ USB_DEVICE_WACOM(0xEF) },
|
||||||
{ USB_DEVICE_WACOM(0x47) },
|
{ USB_DEVICE_WACOM(0x47) },
|
||||||
{ USB_DEVICE_WACOM(0xF4) },
|
{ USB_DEVICE_WACOM(0xF4) },
|
||||||
|
{ USB_DEVICE_WACOM(0xF8) },
|
||||||
{ USB_DEVICE_WACOM(0xFA) },
|
{ USB_DEVICE_WACOM(0xFA) },
|
||||||
{ USB_DEVICE_LENOVO(0x6004) },
|
{ USB_DEVICE_LENOVO(0x6004) },
|
||||||
{ }
|
{ }
|
||||||
|
|
|
@ -602,6 +602,7 @@ edt_ft5x06_ts_teardown_debugfs(struct edt_ft5x06_ts_data *tsdata)
|
||||||
{
|
{
|
||||||
if (tsdata->debug_dir)
|
if (tsdata->debug_dir)
|
||||||
debugfs_remove_recursive(tsdata->debug_dir);
|
debugfs_remove_recursive(tsdata->debug_dir);
|
||||||
|
kfree(tsdata->raw_buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
@ -843,7 +844,6 @@ static int __devexit edt_ft5x06_ts_remove(struct i2c_client *client)
|
||||||
if (gpio_is_valid(pdata->reset_pin))
|
if (gpio_is_valid(pdata->reset_pin))
|
||||||
gpio_free(pdata->reset_pin);
|
gpio_free(pdata->reset_pin);
|
||||||
|
|
||||||
kfree(tsdata->raw_buffer);
|
|
||||||
kfree(tsdata);
|
kfree(tsdata);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -1411,7 +1411,8 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
|
||||||
/* complete ongoing async transfer before issuing discard */
|
/* complete ongoing async transfer before issuing discard */
|
||||||
if (card->host->areq)
|
if (card->host->areq)
|
||||||
mmc_blk_issue_rw_rq(mq, NULL);
|
mmc_blk_issue_rw_rq(mq, NULL);
|
||||||
if (req->cmd_flags & REQ_SECURE)
|
if (req->cmd_flags & REQ_SECURE &&
|
||||||
|
!(card->quirks & MMC_QUIRK_SEC_ERASE_TRIM_BROKEN))
|
||||||
ret = mmc_blk_issue_secdiscard_rq(mq, req);
|
ret = mmc_blk_issue_secdiscard_rq(mq, req);
|
||||||
else
|
else
|
||||||
ret = mmc_blk_issue_discard_rq(mq, req);
|
ret = mmc_blk_issue_discard_rq(mq, req);
|
||||||
|
@ -1716,6 +1717,7 @@ static int mmc_add_disk(struct mmc_blk_data *md)
|
||||||
#define CID_MANFID_SANDISK 0x2
|
#define CID_MANFID_SANDISK 0x2
|
||||||
#define CID_MANFID_TOSHIBA 0x11
|
#define CID_MANFID_TOSHIBA 0x11
|
||||||
#define CID_MANFID_MICRON 0x13
|
#define CID_MANFID_MICRON 0x13
|
||||||
|
#define CID_MANFID_SAMSUNG 0x15
|
||||||
|
|
||||||
static const struct mmc_fixup blk_fixups[] =
|
static const struct mmc_fixup blk_fixups[] =
|
||||||
{
|
{
|
||||||
|
@ -1752,6 +1754,28 @@ static const struct mmc_fixup blk_fixups[] =
|
||||||
MMC_FIXUP(CID_NAME_ANY, CID_MANFID_MICRON, 0x200, add_quirk_mmc,
|
MMC_FIXUP(CID_NAME_ANY, CID_MANFID_MICRON, 0x200, add_quirk_mmc,
|
||||||
MMC_QUIRK_LONG_READ_TIME),
|
MMC_QUIRK_LONG_READ_TIME),
|
||||||
|
|
||||||
|
/*
|
||||||
|
* On these Samsung MoviNAND parts, performing secure erase or
|
||||||
|
* secure trim can result in unrecoverable corruption due to a
|
||||||
|
* firmware bug.
|
||||||
|
*/
|
||||||
|
MMC_FIXUP("M8G2FA", CID_MANFID_SAMSUNG, CID_OEMID_ANY, add_quirk_mmc,
|
||||||
|
MMC_QUIRK_SEC_ERASE_TRIM_BROKEN),
|
||||||
|
MMC_FIXUP("MAG4FA", CID_MANFID_SAMSUNG, CID_OEMID_ANY, add_quirk_mmc,
|
||||||
|
MMC_QUIRK_SEC_ERASE_TRIM_BROKEN),
|
||||||
|
MMC_FIXUP("MBG8FA", CID_MANFID_SAMSUNG, CID_OEMID_ANY, add_quirk_mmc,
|
||||||
|
MMC_QUIRK_SEC_ERASE_TRIM_BROKEN),
|
||||||
|
MMC_FIXUP("MCGAFA", CID_MANFID_SAMSUNG, CID_OEMID_ANY, add_quirk_mmc,
|
||||||
|
MMC_QUIRK_SEC_ERASE_TRIM_BROKEN),
|
||||||
|
MMC_FIXUP("VAL00M", CID_MANFID_SAMSUNG, CID_OEMID_ANY, add_quirk_mmc,
|
||||||
|
MMC_QUIRK_SEC_ERASE_TRIM_BROKEN),
|
||||||
|
MMC_FIXUP("VYL00M", CID_MANFID_SAMSUNG, CID_OEMID_ANY, add_quirk_mmc,
|
||||||
|
MMC_QUIRK_SEC_ERASE_TRIM_BROKEN),
|
||||||
|
MMC_FIXUP("KYL00M", CID_MANFID_SAMSUNG, CID_OEMID_ANY, add_quirk_mmc,
|
||||||
|
MMC_QUIRK_SEC_ERASE_TRIM_BROKEN),
|
||||||
|
MMC_FIXUP("VZL00M", CID_MANFID_SAMSUNG, CID_OEMID_ANY, add_quirk_mmc,
|
||||||
|
MMC_QUIRK_SEC_ERASE_TRIM_BROKEN),
|
||||||
|
|
||||||
END_FIXUP
|
END_FIXUP
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -81,6 +81,7 @@ struct atmel_mci_caps {
|
||||||
bool has_bad_data_ordering;
|
bool has_bad_data_ordering;
|
||||||
bool need_reset_after_xfer;
|
bool need_reset_after_xfer;
|
||||||
bool need_blksz_mul_4;
|
bool need_blksz_mul_4;
|
||||||
|
bool need_notbusy_for_read_ops;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct atmel_mci_dma {
|
struct atmel_mci_dma {
|
||||||
|
@ -1625,7 +1626,8 @@ static void atmci_tasklet_func(unsigned long priv)
|
||||||
__func__);
|
__func__);
|
||||||
atmci_set_completed(host, EVENT_XFER_COMPLETE);
|
atmci_set_completed(host, EVENT_XFER_COMPLETE);
|
||||||
|
|
||||||
if (host->data->flags & MMC_DATA_WRITE) {
|
if (host->caps.need_notbusy_for_read_ops ||
|
||||||
|
(host->data->flags & MMC_DATA_WRITE)) {
|
||||||
atmci_writel(host, ATMCI_IER, ATMCI_NOTBUSY);
|
atmci_writel(host, ATMCI_IER, ATMCI_NOTBUSY);
|
||||||
state = STATE_WAITING_NOTBUSY;
|
state = STATE_WAITING_NOTBUSY;
|
||||||
} else if (host->mrq->stop) {
|
} else if (host->mrq->stop) {
|
||||||
|
@ -2218,6 +2220,7 @@ static void __init atmci_get_cap(struct atmel_mci *host)
|
||||||
host->caps.has_bad_data_ordering = 1;
|
host->caps.has_bad_data_ordering = 1;
|
||||||
host->caps.need_reset_after_xfer = 1;
|
host->caps.need_reset_after_xfer = 1;
|
||||||
host->caps.need_blksz_mul_4 = 1;
|
host->caps.need_blksz_mul_4 = 1;
|
||||||
|
host->caps.need_notbusy_for_read_ops = 0;
|
||||||
|
|
||||||
/* keep only major version number */
|
/* keep only major version number */
|
||||||
switch (version & 0xf00) {
|
switch (version & 0xf00) {
|
||||||
|
@ -2238,6 +2241,7 @@ static void __init atmci_get_cap(struct atmel_mci *host)
|
||||||
case 0x200:
|
case 0x200:
|
||||||
host->caps.has_rwproof = 1;
|
host->caps.has_rwproof = 1;
|
||||||
host->caps.need_blksz_mul_4 = 0;
|
host->caps.need_blksz_mul_4 = 0;
|
||||||
|
host->caps.need_notbusy_for_read_ops = 1;
|
||||||
case 0x100:
|
case 0x100:
|
||||||
host->caps.has_bad_data_ordering = 0;
|
host->caps.has_bad_data_ordering = 0;
|
||||||
host->caps.need_reset_after_xfer = 0;
|
host->caps.need_reset_after_xfer = 0;
|
||||||
|
|
|
@ -49,13 +49,6 @@
|
||||||
#define bfin_write_SDH_CFG bfin_write_RSI_CFG
|
#define bfin_write_SDH_CFG bfin_write_RSI_CFG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct dma_desc_array {
|
|
||||||
unsigned long start_addr;
|
|
||||||
unsigned short cfg;
|
|
||||||
unsigned short x_count;
|
|
||||||
short x_modify;
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
struct sdh_host {
|
struct sdh_host {
|
||||||
struct mmc_host *mmc;
|
struct mmc_host *mmc;
|
||||||
spinlock_t lock;
|
spinlock_t lock;
|
||||||
|
|
|
@ -627,6 +627,7 @@ static void dw_mci_setup_bus(struct dw_mci_slot *slot)
|
||||||
{
|
{
|
||||||
struct dw_mci *host = slot->host;
|
struct dw_mci *host = slot->host;
|
||||||
u32 div;
|
u32 div;
|
||||||
|
u32 clk_en_a;
|
||||||
|
|
||||||
if (slot->clock != host->current_speed) {
|
if (slot->clock != host->current_speed) {
|
||||||
div = host->bus_hz / slot->clock;
|
div = host->bus_hz / slot->clock;
|
||||||
|
@ -659,9 +660,11 @@ static void dw_mci_setup_bus(struct dw_mci_slot *slot)
|
||||||
mci_send_cmd(slot,
|
mci_send_cmd(slot,
|
||||||
SDMMC_CMD_UPD_CLK | SDMMC_CMD_PRV_DAT_WAIT, 0);
|
SDMMC_CMD_UPD_CLK | SDMMC_CMD_PRV_DAT_WAIT, 0);
|
||||||
|
|
||||||
/* enable clock */
|
/* enable clock; only low power if no SDIO */
|
||||||
mci_writel(host, CLKENA, ((SDMMC_CLKEN_ENABLE |
|
clk_en_a = SDMMC_CLKEN_ENABLE << slot->id;
|
||||||
SDMMC_CLKEN_LOW_PWR) << slot->id));
|
if (!(mci_readl(host, INTMASK) & SDMMC_INT_SDIO(slot->id)))
|
||||||
|
clk_en_a |= SDMMC_CLKEN_LOW_PWR << slot->id;
|
||||||
|
mci_writel(host, CLKENA, clk_en_a);
|
||||||
|
|
||||||
/* inform CIU */
|
/* inform CIU */
|
||||||
mci_send_cmd(slot,
|
mci_send_cmd(slot,
|
||||||
|
@ -862,6 +865,30 @@ static int dw_mci_get_cd(struct mmc_host *mmc)
|
||||||
return present;
|
return present;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Disable lower power mode.
|
||||||
|
*
|
||||||
|
* Low power mode will stop the card clock when idle. According to the
|
||||||
|
* description of the CLKENA register we should disable low power mode
|
||||||
|
* for SDIO cards if we need SDIO interrupts to work.
|
||||||
|
*
|
||||||
|
* This function is fast if low power mode is already disabled.
|
||||||
|
*/
|
||||||
|
static void dw_mci_disable_low_power(struct dw_mci_slot *slot)
|
||||||
|
{
|
||||||
|
struct dw_mci *host = slot->host;
|
||||||
|
u32 clk_en_a;
|
||||||
|
const u32 clken_low_pwr = SDMMC_CLKEN_LOW_PWR << slot->id;
|
||||||
|
|
||||||
|
clk_en_a = mci_readl(host, CLKENA);
|
||||||
|
|
||||||
|
if (clk_en_a & clken_low_pwr) {
|
||||||
|
mci_writel(host, CLKENA, clk_en_a & ~clken_low_pwr);
|
||||||
|
mci_send_cmd(slot, SDMMC_CMD_UPD_CLK |
|
||||||
|
SDMMC_CMD_PRV_DAT_WAIT, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void dw_mci_enable_sdio_irq(struct mmc_host *mmc, int enb)
|
static void dw_mci_enable_sdio_irq(struct mmc_host *mmc, int enb)
|
||||||
{
|
{
|
||||||
struct dw_mci_slot *slot = mmc_priv(mmc);
|
struct dw_mci_slot *slot = mmc_priv(mmc);
|
||||||
|
@ -871,6 +898,14 @@ static void dw_mci_enable_sdio_irq(struct mmc_host *mmc, int enb)
|
||||||
/* Enable/disable Slot Specific SDIO interrupt */
|
/* Enable/disable Slot Specific SDIO interrupt */
|
||||||
int_mask = mci_readl(host, INTMASK);
|
int_mask = mci_readl(host, INTMASK);
|
||||||
if (enb) {
|
if (enb) {
|
||||||
|
/*
|
||||||
|
* Turn off low power mode if it was enabled. This is a bit of
|
||||||
|
* a heavy operation and we disable / enable IRQs a lot, so
|
||||||
|
* we'll leave low power mode disabled and it will get
|
||||||
|
* re-enabled again in dw_mci_setup_bus().
|
||||||
|
*/
|
||||||
|
dw_mci_disable_low_power(slot);
|
||||||
|
|
||||||
mci_writel(host, INTMASK,
|
mci_writel(host, INTMASK,
|
||||||
(int_mask | SDMMC_INT_SDIO(slot->id)));
|
(int_mask | SDMMC_INT_SDIO(slot->id)));
|
||||||
} else {
|
} else {
|
||||||
|
@ -1429,22 +1464,10 @@ static void dw_mci_read_data_pio(struct dw_mci *host)
|
||||||
nbytes += len;
|
nbytes += len;
|
||||||
remain -= len;
|
remain -= len;
|
||||||
} while (remain);
|
} while (remain);
|
||||||
sg_miter->consumed = offset;
|
|
||||||
|
|
||||||
|
sg_miter->consumed = offset;
|
||||||
status = mci_readl(host, MINTSTS);
|
status = mci_readl(host, MINTSTS);
|
||||||
mci_writel(host, RINTSTS, SDMMC_INT_RXDR);
|
mci_writel(host, RINTSTS, SDMMC_INT_RXDR);
|
||||||
if (status & DW_MCI_DATA_ERROR_FLAGS) {
|
|
||||||
host->data_status = status;
|
|
||||||
data->bytes_xfered += nbytes;
|
|
||||||
sg_miter_stop(sg_miter);
|
|
||||||
host->sg = NULL;
|
|
||||||
smp_wmb();
|
|
||||||
|
|
||||||
set_bit(EVENT_DATA_ERROR, &host->pending_events);
|
|
||||||
|
|
||||||
tasklet_schedule(&host->tasklet);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} while (status & SDMMC_INT_RXDR); /*if the RXDR is ready read again*/
|
} while (status & SDMMC_INT_RXDR); /*if the RXDR is ready read again*/
|
||||||
data->bytes_xfered += nbytes;
|
data->bytes_xfered += nbytes;
|
||||||
|
|
||||||
|
@ -1497,23 +1520,10 @@ static void dw_mci_write_data_pio(struct dw_mci *host)
|
||||||
nbytes += len;
|
nbytes += len;
|
||||||
remain -= len;
|
remain -= len;
|
||||||
} while (remain);
|
} while (remain);
|
||||||
sg_miter->consumed = offset;
|
|
||||||
|
|
||||||
|
sg_miter->consumed = offset;
|
||||||
status = mci_readl(host, MINTSTS);
|
status = mci_readl(host, MINTSTS);
|
||||||
mci_writel(host, RINTSTS, SDMMC_INT_TXDR);
|
mci_writel(host, RINTSTS, SDMMC_INT_TXDR);
|
||||||
if (status & DW_MCI_DATA_ERROR_FLAGS) {
|
|
||||||
host->data_status = status;
|
|
||||||
data->bytes_xfered += nbytes;
|
|
||||||
sg_miter_stop(sg_miter);
|
|
||||||
host->sg = NULL;
|
|
||||||
|
|
||||||
smp_wmb();
|
|
||||||
|
|
||||||
set_bit(EVENT_DATA_ERROR, &host->pending_events);
|
|
||||||
|
|
||||||
tasklet_schedule(&host->tasklet);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} while (status & SDMMC_INT_TXDR); /* if TXDR write again */
|
} while (status & SDMMC_INT_TXDR); /* if TXDR write again */
|
||||||
data->bytes_xfered += nbytes;
|
data->bytes_xfered += nbytes;
|
||||||
|
|
||||||
|
@ -1547,12 +1557,11 @@ static void dw_mci_cmd_interrupt(struct dw_mci *host, u32 status)
|
||||||
static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
|
static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct dw_mci *host = dev_id;
|
struct dw_mci *host = dev_id;
|
||||||
u32 status, pending;
|
u32 pending;
|
||||||
unsigned int pass_count = 0;
|
unsigned int pass_count = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
status = mci_readl(host, RINTSTS);
|
|
||||||
pending = mci_readl(host, MINTSTS); /* read-only mask reg */
|
pending = mci_readl(host, MINTSTS); /* read-only mask reg */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1570,7 +1579,7 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
|
||||||
|
|
||||||
if (pending & DW_MCI_CMD_ERROR_FLAGS) {
|
if (pending & DW_MCI_CMD_ERROR_FLAGS) {
|
||||||
mci_writel(host, RINTSTS, DW_MCI_CMD_ERROR_FLAGS);
|
mci_writel(host, RINTSTS, DW_MCI_CMD_ERROR_FLAGS);
|
||||||
host->cmd_status = status;
|
host->cmd_status = pending;
|
||||||
smp_wmb();
|
smp_wmb();
|
||||||
set_bit(EVENT_CMD_COMPLETE, &host->pending_events);
|
set_bit(EVENT_CMD_COMPLETE, &host->pending_events);
|
||||||
}
|
}
|
||||||
|
@ -1578,18 +1587,16 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
|
||||||
if (pending & DW_MCI_DATA_ERROR_FLAGS) {
|
if (pending & DW_MCI_DATA_ERROR_FLAGS) {
|
||||||
/* if there is an error report DATA_ERROR */
|
/* if there is an error report DATA_ERROR */
|
||||||
mci_writel(host, RINTSTS, DW_MCI_DATA_ERROR_FLAGS);
|
mci_writel(host, RINTSTS, DW_MCI_DATA_ERROR_FLAGS);
|
||||||
host->data_status = status;
|
host->data_status = pending;
|
||||||
smp_wmb();
|
smp_wmb();
|
||||||
set_bit(EVENT_DATA_ERROR, &host->pending_events);
|
set_bit(EVENT_DATA_ERROR, &host->pending_events);
|
||||||
if (!(pending & (SDMMC_INT_DTO | SDMMC_INT_DCRC |
|
tasklet_schedule(&host->tasklet);
|
||||||
SDMMC_INT_SBE | SDMMC_INT_EBE)))
|
|
||||||
tasklet_schedule(&host->tasklet);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pending & SDMMC_INT_DATA_OVER) {
|
if (pending & SDMMC_INT_DATA_OVER) {
|
||||||
mci_writel(host, RINTSTS, SDMMC_INT_DATA_OVER);
|
mci_writel(host, RINTSTS, SDMMC_INT_DATA_OVER);
|
||||||
if (!host->data_status)
|
if (!host->data_status)
|
||||||
host->data_status = status;
|
host->data_status = pending;
|
||||||
smp_wmb();
|
smp_wmb();
|
||||||
if (host->dir_status == DW_MCI_RECV_STATUS) {
|
if (host->dir_status == DW_MCI_RECV_STATUS) {
|
||||||
if (host->sg != NULL)
|
if (host->sg != NULL)
|
||||||
|
@ -1613,7 +1620,7 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
|
||||||
|
|
||||||
if (pending & SDMMC_INT_CMD_DONE) {
|
if (pending & SDMMC_INT_CMD_DONE) {
|
||||||
mci_writel(host, RINTSTS, SDMMC_INT_CMD_DONE);
|
mci_writel(host, RINTSTS, SDMMC_INT_CMD_DONE);
|
||||||
dw_mci_cmd_interrupt(host, status);
|
dw_mci_cmd_interrupt(host, pending);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pending & SDMMC_INT_CD) {
|
if (pending & SDMMC_INT_CD) {
|
||||||
|
|
|
@ -285,11 +285,11 @@ static irqreturn_t mxs_mmc_irq_handler(int irq, void *dev_id)
|
||||||
writel(stat & MXS_MMC_IRQ_BITS,
|
writel(stat & MXS_MMC_IRQ_BITS,
|
||||||
host->base + HW_SSP_CTRL1(host) + STMP_OFFSET_REG_CLR);
|
host->base + HW_SSP_CTRL1(host) + STMP_OFFSET_REG_CLR);
|
||||||
|
|
||||||
|
spin_unlock(&host->lock);
|
||||||
|
|
||||||
if ((stat & BM_SSP_CTRL1_SDIO_IRQ) && (stat & BM_SSP_CTRL1_SDIO_IRQ_EN))
|
if ((stat & BM_SSP_CTRL1_SDIO_IRQ) && (stat & BM_SSP_CTRL1_SDIO_IRQ_EN))
|
||||||
mmc_signal_sdio_irq(host->mmc);
|
mmc_signal_sdio_irq(host->mmc);
|
||||||
|
|
||||||
spin_unlock(&host->lock);
|
|
||||||
|
|
||||||
if (stat & BM_SSP_CTRL1_RESP_TIMEOUT_IRQ)
|
if (stat & BM_SSP_CTRL1_RESP_TIMEOUT_IRQ)
|
||||||
cmd->error = -ETIMEDOUT;
|
cmd->error = -ETIMEDOUT;
|
||||||
else if (stat & BM_SSP_CTRL1_RESP_ERR_IRQ)
|
else if (stat & BM_SSP_CTRL1_RESP_ERR_IRQ)
|
||||||
|
@ -644,11 +644,6 @@ static void mxs_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
|
||||||
host->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET);
|
host->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_SET);
|
||||||
writel(BM_SSP_CTRL1_SDIO_IRQ_EN,
|
writel(BM_SSP_CTRL1_SDIO_IRQ_EN,
|
||||||
host->base + HW_SSP_CTRL1(host) + STMP_OFFSET_REG_SET);
|
host->base + HW_SSP_CTRL1(host) + STMP_OFFSET_REG_SET);
|
||||||
|
|
||||||
if (readl(host->base + HW_SSP_STATUS(host)) &
|
|
||||||
BM_SSP_STATUS_SDIO_IRQ)
|
|
||||||
mmc_signal_sdio_irq(host->mmc);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
writel(BM_SSP_CTRL0_SDIO_IRQ_CHECK,
|
writel(BM_SSP_CTRL0_SDIO_IRQ_CHECK,
|
||||||
host->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_CLR);
|
host->base + HW_SSP_CTRL0 + STMP_OFFSET_REG_CLR);
|
||||||
|
@ -657,6 +652,11 @@ static void mxs_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_unlock_irqrestore(&host->lock, flags);
|
spin_unlock_irqrestore(&host->lock, flags);
|
||||||
|
|
||||||
|
if (enable && readl(host->base + HW_SSP_STATUS(host)) &
|
||||||
|
BM_SSP_STATUS_SDIO_IRQ)
|
||||||
|
mmc_signal_sdio_irq(host->mmc);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct mmc_host_ops mxs_mmc_ops = {
|
static const struct mmc_host_ops mxs_mmc_ops = {
|
||||||
|
|
|
@ -668,7 +668,7 @@ mmc_omap_clk_timer(unsigned long data)
|
||||||
static void
|
static void
|
||||||
mmc_omap_xfer_data(struct mmc_omap_host *host, int write)
|
mmc_omap_xfer_data(struct mmc_omap_host *host, int write)
|
||||||
{
|
{
|
||||||
int n;
|
int n, nwords;
|
||||||
|
|
||||||
if (host->buffer_bytes_left == 0) {
|
if (host->buffer_bytes_left == 0) {
|
||||||
host->sg_idx++;
|
host->sg_idx++;
|
||||||
|
@ -678,15 +678,23 @@ mmc_omap_xfer_data(struct mmc_omap_host *host, int write)
|
||||||
n = 64;
|
n = 64;
|
||||||
if (n > host->buffer_bytes_left)
|
if (n > host->buffer_bytes_left)
|
||||||
n = host->buffer_bytes_left;
|
n = host->buffer_bytes_left;
|
||||||
|
|
||||||
|
nwords = n / 2;
|
||||||
|
nwords += n & 1; /* handle odd number of bytes to transfer */
|
||||||
|
|
||||||
host->buffer_bytes_left -= n;
|
host->buffer_bytes_left -= n;
|
||||||
host->total_bytes_left -= n;
|
host->total_bytes_left -= n;
|
||||||
host->data->bytes_xfered += n;
|
host->data->bytes_xfered += n;
|
||||||
|
|
||||||
if (write) {
|
if (write) {
|
||||||
__raw_writesw(host->virt_base + OMAP_MMC_REG(host, DATA), host->buffer, n);
|
__raw_writesw(host->virt_base + OMAP_MMC_REG(host, DATA),
|
||||||
|
host->buffer, nwords);
|
||||||
} else {
|
} else {
|
||||||
__raw_readsw(host->virt_base + OMAP_MMC_REG(host, DATA), host->buffer, n);
|
__raw_readsw(host->virt_base + OMAP_MMC_REG(host, DATA),
|
||||||
|
host->buffer, nwords);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
host->buffer += nwords;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void mmc_omap_report_irq(u16 status)
|
static inline void mmc_omap_report_irq(u16 status)
|
||||||
|
|
|
@ -48,14 +48,14 @@ static inline void esdhc_set_clock(struct sdhci_host *host, unsigned int clock)
|
||||||
int div = 1;
|
int div = 1;
|
||||||
u32 temp;
|
u32 temp;
|
||||||
|
|
||||||
|
if (clock == 0)
|
||||||
|
goto out;
|
||||||
|
|
||||||
temp = sdhci_readl(host, ESDHC_SYSTEM_CONTROL);
|
temp = sdhci_readl(host, ESDHC_SYSTEM_CONTROL);
|
||||||
temp &= ~(ESDHC_CLOCK_IPGEN | ESDHC_CLOCK_HCKEN | ESDHC_CLOCK_PEREN
|
temp &= ~(ESDHC_CLOCK_IPGEN | ESDHC_CLOCK_HCKEN | ESDHC_CLOCK_PEREN
|
||||||
| ESDHC_CLOCK_MASK);
|
| ESDHC_CLOCK_MASK);
|
||||||
sdhci_writel(host, temp, ESDHC_SYSTEM_CONTROL);
|
sdhci_writel(host, temp, ESDHC_SYSTEM_CONTROL);
|
||||||
|
|
||||||
if (clock == 0)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
while (host->max_clk / pre_div / 16 > clock && pre_div < 256)
|
while (host->max_clk / pre_div / 16 > clock && pre_div < 256)
|
||||||
pre_div *= 2;
|
pre_div *= 2;
|
||||||
|
|
||||||
|
|
|
@ -340,7 +340,7 @@ static int create_vtbl(struct ubi_device *ubi, struct ubi_attach_info *ai,
|
||||||
* of this LEB as it will be deleted and freed in 'ubi_add_to_av()'.
|
* of this LEB as it will be deleted and freed in 'ubi_add_to_av()'.
|
||||||
*/
|
*/
|
||||||
err = ubi_add_to_av(ubi, ai, new_aeb->pnum, new_aeb->ec, vid_hdr, 0);
|
err = ubi_add_to_av(ubi, ai, new_aeb->pnum, new_aeb->ec, vid_hdr, 0);
|
||||||
kfree(new_aeb);
|
kmem_cache_free(ai->aeb_slab_cache, new_aeb);
|
||||||
ubi_free_vid_hdr(ubi, vid_hdr);
|
ubi_free_vid_hdr(ubi, vid_hdr);
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
@ -353,7 +353,7 @@ static int create_vtbl(struct ubi_device *ubi, struct ubi_attach_info *ai,
|
||||||
list_add(&new_aeb->u.list, &ai->erase);
|
list_add(&new_aeb->u.list, &ai->erase);
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
kfree(new_aeb);
|
kmem_cache_free(ai->aeb_slab_cache, new_aeb);
|
||||||
out_free:
|
out_free:
|
||||||
ubi_free_vid_hdr(ubi, vid_hdr);
|
ubi_free_vid_hdr(ubi, vid_hdr);
|
||||||
return err;
|
return err;
|
||||||
|
|
|
@ -109,7 +109,9 @@ static int sp_probe(struct platform_device *pdev)
|
||||||
priv = netdev_priv(dev);
|
priv = netdev_priv(dev);
|
||||||
|
|
||||||
dev->irq = res_irq->start;
|
dev->irq = res_irq->start;
|
||||||
priv->irq_flags = res_irq->flags & (IRQF_TRIGGER_MASK | IRQF_SHARED);
|
priv->irq_flags = res_irq->flags & IRQF_TRIGGER_MASK;
|
||||||
|
if (res_irq->flags & IORESOURCE_IRQ_SHAREABLE)
|
||||||
|
priv->irq_flags |= IRQF_SHARED;
|
||||||
priv->reg_base = addr;
|
priv->reg_base = addr;
|
||||||
/* The CAN clock frequency is half the oscillator clock frequency */
|
/* The CAN clock frequency is half the oscillator clock frequency */
|
||||||
priv->can.clock.freq = pdata->osc_freq / 2;
|
priv->can.clock.freq = pdata->osc_freq / 2;
|
||||||
|
|
|
@ -150,7 +150,7 @@ int softing_load_fw(const char *file, struct softing *card,
|
||||||
const uint8_t *mem, *end, *dat;
|
const uint8_t *mem, *end, *dat;
|
||||||
uint16_t type, len;
|
uint16_t type, len;
|
||||||
uint32_t addr;
|
uint32_t addr;
|
||||||
uint8_t *buf = NULL;
|
uint8_t *buf = NULL, *new_buf;
|
||||||
int buflen = 0;
|
int buflen = 0;
|
||||||
int8_t type_end = 0;
|
int8_t type_end = 0;
|
||||||
|
|
||||||
|
@ -199,11 +199,12 @@ int softing_load_fw(const char *file, struct softing *card,
|
||||||
if (len > buflen) {
|
if (len > buflen) {
|
||||||
/* align buflen */
|
/* align buflen */
|
||||||
buflen = (len + (1024-1)) & ~(1024-1);
|
buflen = (len + (1024-1)) & ~(1024-1);
|
||||||
buf = krealloc(buf, buflen, GFP_KERNEL);
|
new_buf = krealloc(buf, buflen, GFP_KERNEL);
|
||||||
if (!buf) {
|
if (!new_buf) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
|
buf = new_buf;
|
||||||
}
|
}
|
||||||
/* verify record data */
|
/* verify record data */
|
||||||
memcpy_fromio(buf, &dpram[addr + offset], len);
|
memcpy_fromio(buf, &dpram[addr + offset], len);
|
||||||
|
|
|
@ -1708,9 +1708,6 @@ struct bnx2x_func_init_params {
|
||||||
continue; \
|
continue; \
|
||||||
else
|
else
|
||||||
|
|
||||||
#define for_each_napi_rx_queue(bp, var) \
|
|
||||||
for ((var) = 0; (var) < bp->num_napi_queues; (var)++)
|
|
||||||
|
|
||||||
/* Skip OOO FP */
|
/* Skip OOO FP */
|
||||||
#define for_each_tx_queue(bp, var) \
|
#define for_each_tx_queue(bp, var) \
|
||||||
for ((var) = 0; (var) < BNX2X_NUM_QUEUES(bp); (var)++) \
|
for ((var) = 0; (var) < BNX2X_NUM_QUEUES(bp); (var)++) \
|
||||||
|
|
|
@ -2046,6 +2046,8 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
|
||||||
*/
|
*/
|
||||||
bnx2x_setup_tc(bp->dev, bp->max_cos);
|
bnx2x_setup_tc(bp->dev, bp->max_cos);
|
||||||
|
|
||||||
|
/* Add all NAPI objects */
|
||||||
|
bnx2x_add_all_napi(bp);
|
||||||
bnx2x_napi_enable(bp);
|
bnx2x_napi_enable(bp);
|
||||||
|
|
||||||
/* set pf load just before approaching the MCP */
|
/* set pf load just before approaching the MCP */
|
||||||
|
@ -2408,6 +2410,8 @@ int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode)
|
||||||
|
|
||||||
/* Disable HW interrupts, NAPI */
|
/* Disable HW interrupts, NAPI */
|
||||||
bnx2x_netif_stop(bp, 1);
|
bnx2x_netif_stop(bp, 1);
|
||||||
|
/* Delete all NAPI objects */
|
||||||
|
bnx2x_del_all_napi(bp);
|
||||||
|
|
||||||
/* Release IRQs */
|
/* Release IRQs */
|
||||||
bnx2x_free_irq(bp);
|
bnx2x_free_irq(bp);
|
||||||
|
|
|
@ -792,7 +792,7 @@ static inline void bnx2x_add_all_napi(struct bnx2x *bp)
|
||||||
bp->num_napi_queues = bp->num_queues;
|
bp->num_napi_queues = bp->num_queues;
|
||||||
|
|
||||||
/* Add NAPI objects */
|
/* Add NAPI objects */
|
||||||
for_each_napi_rx_queue(bp, i)
|
for_each_rx_queue(bp, i)
|
||||||
netif_napi_add(bp->dev, &bnx2x_fp(bp, i, napi),
|
netif_napi_add(bp->dev, &bnx2x_fp(bp, i, napi),
|
||||||
bnx2x_poll, BNX2X_NAPI_WEIGHT);
|
bnx2x_poll, BNX2X_NAPI_WEIGHT);
|
||||||
}
|
}
|
||||||
|
@ -801,7 +801,7 @@ static inline void bnx2x_del_all_napi(struct bnx2x *bp)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for_each_napi_rx_queue(bp, i)
|
for_each_rx_queue(bp, i)
|
||||||
netif_napi_del(&bnx2x_fp(bp, i, napi));
|
netif_napi_del(&bnx2x_fp(bp, i, napi));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2888,11 +2888,9 @@ static void bnx2x_get_channels(struct net_device *dev,
|
||||||
*/
|
*/
|
||||||
static void bnx2x_change_num_queues(struct bnx2x *bp, int num_rss)
|
static void bnx2x_change_num_queues(struct bnx2x *bp, int num_rss)
|
||||||
{
|
{
|
||||||
bnx2x_del_all_napi(bp);
|
|
||||||
bnx2x_disable_msi(bp);
|
bnx2x_disable_msi(bp);
|
||||||
BNX2X_NUM_QUEUES(bp) = num_rss + NON_ETH_CONTEXT_USE;
|
BNX2X_NUM_QUEUES(bp) = num_rss + NON_ETH_CONTEXT_USE;
|
||||||
bnx2x_set_int_mode(bp);
|
bnx2x_set_int_mode(bp);
|
||||||
bnx2x_add_all_napi(bp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -8427,6 +8427,8 @@ void bnx2x_chip_cleanup(struct bnx2x *bp, int unload_mode)
|
||||||
|
|
||||||
/* Disable HW interrupts, NAPI */
|
/* Disable HW interrupts, NAPI */
|
||||||
bnx2x_netif_stop(bp, 1);
|
bnx2x_netif_stop(bp, 1);
|
||||||
|
/* Delete all NAPI objects */
|
||||||
|
bnx2x_del_all_napi(bp);
|
||||||
|
|
||||||
/* Release IRQs */
|
/* Release IRQs */
|
||||||
bnx2x_free_irq(bp);
|
bnx2x_free_irq(bp);
|
||||||
|
@ -11229,10 +11231,12 @@ static int bnx2x_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
||||||
static void poll_bnx2x(struct net_device *dev)
|
static void poll_bnx2x(struct net_device *dev)
|
||||||
{
|
{
|
||||||
struct bnx2x *bp = netdev_priv(dev);
|
struct bnx2x *bp = netdev_priv(dev);
|
||||||
|
int i;
|
||||||
|
|
||||||
disable_irq(bp->pdev->irq);
|
for_each_eth_queue(bp, i) {
|
||||||
bnx2x_interrupt(bp->pdev->irq, dev);
|
struct bnx2x_fastpath *fp = &bp->fp[i];
|
||||||
enable_irq(bp->pdev->irq);
|
napi_schedule(&bnx2x_fp(bp, fp->index, napi));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -11899,9 +11903,6 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
|
||||||
*/
|
*/
|
||||||
bnx2x_set_int_mode(bp);
|
bnx2x_set_int_mode(bp);
|
||||||
|
|
||||||
/* Add all NAPI objects */
|
|
||||||
bnx2x_add_all_napi(bp);
|
|
||||||
|
|
||||||
rc = register_netdev(dev);
|
rc = register_netdev(dev);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
dev_err(&pdev->dev, "Cannot register net device\n");
|
dev_err(&pdev->dev, "Cannot register net device\n");
|
||||||
|
@ -11976,9 +11977,6 @@ static void __devexit bnx2x_remove_one(struct pci_dev *pdev)
|
||||||
|
|
||||||
unregister_netdev(dev);
|
unregister_netdev(dev);
|
||||||
|
|
||||||
/* Delete all NAPI objects */
|
|
||||||
bnx2x_del_all_napi(bp);
|
|
||||||
|
|
||||||
/* Power on: we can't let PCI layer write to us while we are in D3 */
|
/* Power on: we can't let PCI layer write to us while we are in D3 */
|
||||||
bnx2x_set_power_state(bp, PCI_D0);
|
bnx2x_set_power_state(bp, PCI_D0);
|
||||||
|
|
||||||
|
@ -12025,6 +12023,8 @@ static int bnx2x_eeh_nic_unload(struct bnx2x *bp)
|
||||||
bnx2x_tx_disable(bp);
|
bnx2x_tx_disable(bp);
|
||||||
|
|
||||||
bnx2x_netif_stop(bp, 0);
|
bnx2x_netif_stop(bp, 0);
|
||||||
|
/* Delete all NAPI objects */
|
||||||
|
bnx2x_del_all_napi(bp);
|
||||||
|
|
||||||
del_timer_sync(&bp->timer);
|
del_timer_sync(&bp->timer);
|
||||||
|
|
||||||
|
|
|
@ -1243,6 +1243,7 @@ static void set_multicast_list(struct net_device *dev)
|
||||||
{
|
{
|
||||||
struct net_local *lp = netdev_priv(dev);
|
struct net_local *lp = netdev_priv(dev);
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
u16 cfg;
|
||||||
|
|
||||||
spin_lock_irqsave(&lp->lock, flags);
|
spin_lock_irqsave(&lp->lock, flags);
|
||||||
if (dev->flags & IFF_PROMISC)
|
if (dev->flags & IFF_PROMISC)
|
||||||
|
@ -1260,11 +1261,10 @@ static void set_multicast_list(struct net_device *dev)
|
||||||
/* in promiscuous mode, we accept errored packets,
|
/* in promiscuous mode, we accept errored packets,
|
||||||
* so we have to enable interrupts on them also
|
* so we have to enable interrupts on them also
|
||||||
*/
|
*/
|
||||||
writereg(dev, PP_RxCFG,
|
cfg = lp->curr_rx_cfg;
|
||||||
(lp->curr_rx_cfg |
|
if (lp->rx_mode == RX_ALL_ACCEPT)
|
||||||
(lp->rx_mode == RX_ALL_ACCEPT)
|
cfg |= RX_CRC_ERROR_ENBL | RX_RUNT_ENBL | RX_EXTRA_DATA_ENBL;
|
||||||
? (RX_CRC_ERROR_ENBL | RX_RUNT_ENBL | RX_EXTRA_DATA_ENBL)
|
writereg(dev, PP_RxCFG, cfg);
|
||||||
: 0));
|
|
||||||
spin_unlock_irqrestore(&lp->lock, flags);
|
spin_unlock_irqrestore(&lp->lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -259,7 +259,7 @@ int be_process_mcc(struct be_adapter *adapter)
|
||||||
int num = 0, status = 0;
|
int num = 0, status = 0;
|
||||||
struct be_mcc_obj *mcc_obj = &adapter->mcc_obj;
|
struct be_mcc_obj *mcc_obj = &adapter->mcc_obj;
|
||||||
|
|
||||||
spin_lock_bh(&adapter->mcc_cq_lock);
|
spin_lock(&adapter->mcc_cq_lock);
|
||||||
while ((compl = be_mcc_compl_get(adapter))) {
|
while ((compl = be_mcc_compl_get(adapter))) {
|
||||||
if (compl->flags & CQE_FLAGS_ASYNC_MASK) {
|
if (compl->flags & CQE_FLAGS_ASYNC_MASK) {
|
||||||
/* Interpret flags as an async trailer */
|
/* Interpret flags as an async trailer */
|
||||||
|
@ -280,7 +280,7 @@ int be_process_mcc(struct be_adapter *adapter)
|
||||||
if (num)
|
if (num)
|
||||||
be_cq_notify(adapter, mcc_obj->cq.id, mcc_obj->rearm_cq, num);
|
be_cq_notify(adapter, mcc_obj->cq.id, mcc_obj->rearm_cq, num);
|
||||||
|
|
||||||
spin_unlock_bh(&adapter->mcc_cq_lock);
|
spin_unlock(&adapter->mcc_cq_lock);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -295,7 +295,9 @@ static int be_mcc_wait_compl(struct be_adapter *adapter)
|
||||||
if (be_error(adapter))
|
if (be_error(adapter))
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
|
local_bh_disable();
|
||||||
status = be_process_mcc(adapter);
|
status = be_process_mcc(adapter);
|
||||||
|
local_bh_enable();
|
||||||
|
|
||||||
if (atomic_read(&mcc_obj->q.used) == 0)
|
if (atomic_read(&mcc_obj->q.used) == 0)
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -3763,7 +3763,9 @@ static void be_worker(struct work_struct *work)
|
||||||
/* when interrupts are not yet enabled, just reap any pending
|
/* when interrupts are not yet enabled, just reap any pending
|
||||||
* mcc completions */
|
* mcc completions */
|
||||||
if (!netif_running(adapter->netdev)) {
|
if (!netif_running(adapter->netdev)) {
|
||||||
|
local_bh_disable();
|
||||||
be_process_mcc(adapter);
|
be_process_mcc(adapter);
|
||||||
|
local_bh_enable();
|
||||||
goto reschedule;
|
goto reschedule;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1041,7 +1041,7 @@ static int gfar_probe(struct platform_device *ofdev)
|
||||||
|
|
||||||
if (priv->device_flags & FSL_GIANFAR_DEV_HAS_VLAN) {
|
if (priv->device_flags & FSL_GIANFAR_DEV_HAS_VLAN) {
|
||||||
dev->hw_features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
|
dev->hw_features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
|
||||||
dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
|
dev->features |= NETIF_F_HW_VLAN_RX;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->device_flags & FSL_GIANFAR_DEV_HAS_EXTENDED_HASH) {
|
if (priv->device_flags & FSL_GIANFAR_DEV_HAS_EXTENDED_HASH) {
|
||||||
|
|
|
@ -310,6 +310,7 @@ struct e1000_adapter {
|
||||||
*/
|
*/
|
||||||
struct e1000_ring *tx_ring /* One per active queue */
|
struct e1000_ring *tx_ring /* One per active queue */
|
||||||
____cacheline_aligned_in_smp;
|
____cacheline_aligned_in_smp;
|
||||||
|
u32 tx_fifo_limit;
|
||||||
|
|
||||||
struct napi_struct napi;
|
struct napi_struct napi;
|
||||||
|
|
||||||
|
|
|
@ -3516,6 +3516,15 @@ void e1000e_reset(struct e1000_adapter *adapter)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Alignment of Tx data is on an arbitrary byte boundary with the
|
||||||
|
* maximum size per Tx descriptor limited only to the transmit
|
||||||
|
* allocation of the packet buffer minus 96 bytes with an upper
|
||||||
|
* limit of 24KB due to receive synchronization limitations.
|
||||||
|
*/
|
||||||
|
adapter->tx_fifo_limit = min_t(u32, ((er32(PBA) >> 16) << 10) - 96,
|
||||||
|
24 << 10);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Disable Adaptive Interrupt Moderation if 2 full packets cannot
|
* Disable Adaptive Interrupt Moderation if 2 full packets cannot
|
||||||
* fit in receive buffer.
|
* fit in receive buffer.
|
||||||
|
@ -4785,12 +4794,9 @@ static bool e1000_tx_csum(struct e1000_ring *tx_ring, struct sk_buff *skb)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define E1000_MAX_PER_TXD 8192
|
|
||||||
#define E1000_MAX_TXD_PWR 12
|
|
||||||
|
|
||||||
static int e1000_tx_map(struct e1000_ring *tx_ring, struct sk_buff *skb,
|
static int e1000_tx_map(struct e1000_ring *tx_ring, struct sk_buff *skb,
|
||||||
unsigned int first, unsigned int max_per_txd,
|
unsigned int first, unsigned int max_per_txd,
|
||||||
unsigned int nr_frags, unsigned int mss)
|
unsigned int nr_frags)
|
||||||
{
|
{
|
||||||
struct e1000_adapter *adapter = tx_ring->adapter;
|
struct e1000_adapter *adapter = tx_ring->adapter;
|
||||||
struct pci_dev *pdev = adapter->pdev;
|
struct pci_dev *pdev = adapter->pdev;
|
||||||
|
@ -5023,20 +5029,19 @@ static int __e1000_maybe_stop_tx(struct e1000_ring *tx_ring, int size)
|
||||||
|
|
||||||
static int e1000_maybe_stop_tx(struct e1000_ring *tx_ring, int size)
|
static int e1000_maybe_stop_tx(struct e1000_ring *tx_ring, int size)
|
||||||
{
|
{
|
||||||
|
BUG_ON(size > tx_ring->count);
|
||||||
|
|
||||||
if (e1000_desc_unused(tx_ring) >= size)
|
if (e1000_desc_unused(tx_ring) >= size)
|
||||||
return 0;
|
return 0;
|
||||||
return __e1000_maybe_stop_tx(tx_ring, size);
|
return __e1000_maybe_stop_tx(tx_ring, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define TXD_USE_COUNT(S, X) (((S) >> (X)) + 1)
|
|
||||||
static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
|
static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
|
||||||
struct net_device *netdev)
|
struct net_device *netdev)
|
||||||
{
|
{
|
||||||
struct e1000_adapter *adapter = netdev_priv(netdev);
|
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||||
struct e1000_ring *tx_ring = adapter->tx_ring;
|
struct e1000_ring *tx_ring = adapter->tx_ring;
|
||||||
unsigned int first;
|
unsigned int first;
|
||||||
unsigned int max_per_txd = E1000_MAX_PER_TXD;
|
|
||||||
unsigned int max_txd_pwr = E1000_MAX_TXD_PWR;
|
|
||||||
unsigned int tx_flags = 0;
|
unsigned int tx_flags = 0;
|
||||||
unsigned int len = skb_headlen(skb);
|
unsigned int len = skb_headlen(skb);
|
||||||
unsigned int nr_frags;
|
unsigned int nr_frags;
|
||||||
|
@ -5056,18 +5061,8 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
|
||||||
}
|
}
|
||||||
|
|
||||||
mss = skb_shinfo(skb)->gso_size;
|
mss = skb_shinfo(skb)->gso_size;
|
||||||
/*
|
|
||||||
* The controller does a simple calculation to
|
|
||||||
* make sure there is enough room in the FIFO before
|
|
||||||
* initiating the DMA for each buffer. The calc is:
|
|
||||||
* 4 = ceil(buffer len/mss). To make sure we don't
|
|
||||||
* overrun the FIFO, adjust the max buffer len if mss
|
|
||||||
* drops.
|
|
||||||
*/
|
|
||||||
if (mss) {
|
if (mss) {
|
||||||
u8 hdr_len;
|
u8 hdr_len;
|
||||||
max_per_txd = min(mss << 2, max_per_txd);
|
|
||||||
max_txd_pwr = fls(max_per_txd) - 1;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TSO Workaround for 82571/2/3 Controllers -- if skb->data
|
* TSO Workaround for 82571/2/3 Controllers -- if skb->data
|
||||||
|
@ -5097,12 +5092,12 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
|
||||||
count++;
|
count++;
|
||||||
count++;
|
count++;
|
||||||
|
|
||||||
count += TXD_USE_COUNT(len, max_txd_pwr);
|
count += DIV_ROUND_UP(len, adapter->tx_fifo_limit);
|
||||||
|
|
||||||
nr_frags = skb_shinfo(skb)->nr_frags;
|
nr_frags = skb_shinfo(skb)->nr_frags;
|
||||||
for (f = 0; f < nr_frags; f++)
|
for (f = 0; f < nr_frags; f++)
|
||||||
count += TXD_USE_COUNT(skb_frag_size(&skb_shinfo(skb)->frags[f]),
|
count += DIV_ROUND_UP(skb_frag_size(&skb_shinfo(skb)->frags[f]),
|
||||||
max_txd_pwr);
|
adapter->tx_fifo_limit);
|
||||||
|
|
||||||
if (adapter->hw.mac.tx_pkt_filtering)
|
if (adapter->hw.mac.tx_pkt_filtering)
|
||||||
e1000_transfer_dhcp_info(adapter, skb);
|
e1000_transfer_dhcp_info(adapter, skb);
|
||||||
|
@ -5144,15 +5139,18 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
|
||||||
tx_flags |= E1000_TX_FLAGS_NO_FCS;
|
tx_flags |= E1000_TX_FLAGS_NO_FCS;
|
||||||
|
|
||||||
/* if count is 0 then mapping error has occurred */
|
/* if count is 0 then mapping error has occurred */
|
||||||
count = e1000_tx_map(tx_ring, skb, first, max_per_txd, nr_frags, mss);
|
count = e1000_tx_map(tx_ring, skb, first, adapter->tx_fifo_limit,
|
||||||
|
nr_frags);
|
||||||
if (count) {
|
if (count) {
|
||||||
skb_tx_timestamp(skb);
|
skb_tx_timestamp(skb);
|
||||||
|
|
||||||
netdev_sent_queue(netdev, skb->len);
|
netdev_sent_queue(netdev, skb->len);
|
||||||
e1000_tx_queue(tx_ring, tx_flags, count);
|
e1000_tx_queue(tx_ring, tx_flags, count);
|
||||||
/* Make sure there is space in the ring for the next send. */
|
/* Make sure there is space in the ring for the next send. */
|
||||||
e1000_maybe_stop_tx(tx_ring, MAX_SKB_FRAGS + 2);
|
e1000_maybe_stop_tx(tx_ring,
|
||||||
|
(MAX_SKB_FRAGS *
|
||||||
|
DIV_ROUND_UP(PAGE_SIZE,
|
||||||
|
adapter->tx_fifo_limit) + 2));
|
||||||
} else {
|
} else {
|
||||||
dev_kfree_skb_any(skb);
|
dev_kfree_skb_any(skb);
|
||||||
tx_ring->buffer_info[first].time_stamp = 0;
|
tx_ring->buffer_info[first].time_stamp = 0;
|
||||||
|
@ -6327,8 +6325,8 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
|
||||||
adapter->hw.phy.autoneg_advertised = 0x2f;
|
adapter->hw.phy.autoneg_advertised = 0x2f;
|
||||||
|
|
||||||
/* ring size defaults */
|
/* ring size defaults */
|
||||||
adapter->rx_ring->count = 256;
|
adapter->rx_ring->count = E1000_DEFAULT_RXD;
|
||||||
adapter->tx_ring->count = 256;
|
adapter->tx_ring->count = E1000_DEFAULT_TXD;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initial Wake on LAN setting - If APM wake is enabled in
|
* Initial Wake on LAN setting - If APM wake is enabled in
|
||||||
|
|
|
@ -863,8 +863,8 @@ static int efx_ethtool_get_class_rule(struct efx_nic *efx,
|
||||||
&ip_entry->ip4dst, &ip_entry->pdst);
|
&ip_entry->ip4dst, &ip_entry->pdst);
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
rc = efx_filter_get_ipv4_full(
|
rc = efx_filter_get_ipv4_full(
|
||||||
&spec, &proto, &ip_entry->ip4src, &ip_entry->psrc,
|
&spec, &proto, &ip_entry->ip4dst, &ip_entry->pdst,
|
||||||
&ip_entry->ip4dst, &ip_entry->pdst);
|
&ip_entry->ip4src, &ip_entry->psrc);
|
||||||
EFX_WARN_ON_PARANOID(rc);
|
EFX_WARN_ON_PARANOID(rc);
|
||||||
ip_mask->ip4src = ~0;
|
ip_mask->ip4src = ~0;
|
||||||
ip_mask->psrc = ~0;
|
ip_mask->psrc = ~0;
|
||||||
|
|
|
@ -22,6 +22,9 @@
|
||||||
Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
|
Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
|
#ifndef __COMMON_H__
|
||||||
|
#define __COMMON_H__
|
||||||
|
|
||||||
#include <linux/etherdevice.h>
|
#include <linux/etherdevice.h>
|
||||||
#include <linux/netdevice.h>
|
#include <linux/netdevice.h>
|
||||||
#include <linux/phy.h>
|
#include <linux/phy.h>
|
||||||
|
@ -366,3 +369,5 @@ extern void stmmac_set_mac(void __iomem *ioaddr, bool enable);
|
||||||
|
|
||||||
extern void dwmac_dma_flush_tx_fifo(void __iomem *ioaddr);
|
extern void dwmac_dma_flush_tx_fifo(void __iomem *ioaddr);
|
||||||
extern const struct stmmac_ring_mode_ops ring_mode_ops;
|
extern const struct stmmac_ring_mode_ops ring_mode_ops;
|
||||||
|
|
||||||
|
#endif /* __COMMON_H__ */
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue