Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200992
b: refs/heads/master
c: 6f7dd68
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jul 15, 2010
1 parent 2b7ab51 commit 84f976b
Show file tree
Hide file tree
Showing 15 changed files with 79 additions and 49 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 95f72d1ed41a66f1c1c29c24d479de81a0bea36f
refs/heads/master: 6f7dd68b755b215deda5188a2c13c00f4776ea66
24 changes: 24 additions & 0 deletions trunk/arch/powerpc/include/asm/cpm.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,30 @@
#include <linux/errno.h>
#include <linux/of.h>

/*
* SPI Parameter RAM common to QE and CPM.
*/
struct spi_pram {
__be16 rbase; /* Rx Buffer descriptor base address */
__be16 tbase; /* Tx Buffer descriptor base address */
u8 rfcr; /* Rx function code */
u8 tfcr; /* Tx function code */
__be16 mrblr; /* Max receive buffer length */
__be32 rstate; /* Internal */
__be32 rdp; /* Internal */
__be16 rbptr; /* Internal */
__be16 rbc; /* Internal */
__be32 rxtmp; /* Internal */
__be32 tstate; /* Internal */
__be32 tdp; /* Internal */
__be16 tbptr; /* Internal */
__be16 tbc; /* Internal */
__be32 txtmp; /* Internal */
__be32 res; /* Tx temp. */
__be16 rpbase; /* Relocation pointer (CPM1 only) */
__be16 res1; /* Reserved */
};

/*
* USB Controller pram common to QE and CPM.
*/
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/powerpc/include/asm/cpm1.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#ifndef __CPM1__
#define __CPM1__

#include <linux/init.h>
#include <asm/8xx_immap.h>
#include <asm/ptrace.h>
#include <asm/cpm.h>
Expand Down Expand Up @@ -54,7 +55,7 @@ extern cpm8xx_t __iomem *cpmp; /* Pointer to comm processor */

extern void cpm_setbrg(uint brg, uint rate);

extern void cpm_load_patch(cpm8xx_t *cp);
extern void __init cpm_load_patch(cpm8xx_t *cp);

extern void cpm_reset(void);

Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/powerpc/kernel/fsl_booke_entry_mapping.S
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,7 @@ next_tlb_setup:
bdnz+ next_tlb_setup

/* 7. Jump to our 1:1 mapping */
li r6, 0

mr r6, r25
#else
#error You need to specify the mapping or not use this at all.
#endif
Expand All @@ -217,7 +216,6 @@ next_tlb_setup:
1: mflr r9
rlwimi r6,r9,0,20,31
addi r6,r6,(2f - 1b)
add r6, r6, r25
mtspr SPRN_SRR0,r6
mtspr SPRN_SRR1,r7
rfi /* start execution out of TLB1[0] entry */
Expand Down
30 changes: 18 additions & 12 deletions trunk/arch/powerpc/sysdev/micropatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* also relocates SMC2, but this would require additional changes
* to uart.c, so I am holding off on that for a moment.
*/
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/kernel.h>
Expand All @@ -16,6 +17,7 @@
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/8xx_immap.h>
#include <asm/cpm.h>
#include <asm/cpm1.h>

/*
Expand All @@ -24,7 +26,7 @@

#ifdef CONFIG_I2C_SPI_UCODE_PATCH

uint patch_2000[] = {
static uint patch_2000[] __initdata = {
0x7FFFEFD9,
0x3FFD0000,
0x7FFB49F7,
Expand Down Expand Up @@ -143,7 +145,7 @@ uint patch_2000[] = {
0x5F8247F8
};

uint patch_2f00[] = {
static uint patch_2f00[] __initdata = {
0x3E303430,
0x34343737,
0xABF7BF9B,
Expand Down Expand Up @@ -182,7 +184,7 @@ uint patch_2f00[] = {

#ifdef CONFIG_I2C_SPI_SMC1_UCODE_PATCH

uint patch_2000[] = {
static uint patch_2000[] __initdata = {
0x3fff0000,
0x3ffd0000,
0x3ffb0000,
Expand Down Expand Up @@ -505,7 +507,7 @@ uint patch_2000[] = {
0x6079e2bb
};

uint patch_2f00[] = {
static uint patch_2f00[] __initdata = {
0x30303030,
0x3e3e3434,
0xabbf9b99,
Expand Down Expand Up @@ -572,7 +574,7 @@ uint patch_2f00[] = {
0xf22f3f23
};

uint patch_2e00[] = {
static uint patch_2e00[] __initdata = {
0x27eeeeee,
0xeeeeeeee,
0xeeeeeeee,
Expand All @@ -598,7 +600,7 @@ uint patch_2e00[] = {

#ifdef CONFIG_USB_SOF_UCODE_PATCH

uint patch_2000[] = {
static uint patch_2000[] __initdata = {
0x7fff0000,
0x7ffd0000,
0x7ffb0000,
Expand All @@ -613,21 +615,25 @@ uint patch_2000[] = {
0x60750000
};

uint patch_2f00[] = {
static uint patch_2f00[] __initdata = {
0x3030304c,
0xcab9e441,
0xa1aaf220
};
#endif

void
cpm_load_patch(cpm8xx_t *cp)
void __init cpm_load_patch(cpm8xx_t *cp)
{
volatile uint *dp; /* Dual-ported RAM. */
volatile cpm8xx_t *commproc;
#if defined(CONFIG_I2C_SPI_UCODE_PATCH) || \
defined(CONFIG_I2C_SPI_SMC1_UCODE_PATCH)
volatile iic_t *iip;
volatile spi_t *spp;
volatile struct spi_pram *spp;
#ifdef CONFIG_I2C_SPI_SMC1_UCODE_PATCH
volatile smc_uart_t *smp;
#endif
#endif
int i;

commproc = cp;
Expand Down Expand Up @@ -668,8 +674,8 @@ cpm_load_patch(cpm8xx_t *cp)
/* Put SPI above the IIC, also 32-byte aligned.
*/
i = (RPBASE + sizeof(iic_t) + 31) & ~31;
spp = (spi_t *)&commproc->cp_dparam[PROFF_SPI];
spp->spi_rpbase = i;
spp = (struct spi_pram *)&commproc->cp_dparam[PROFF_SPI];
spp->rpbase = i;

# if defined(CONFIG_I2C_SPI_UCODE_PATCH)
commproc->cp_cpmcr1 = 0x802a;
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/x86/include/asm/x86_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ struct x86_cpuinit_ops {
* @set_wallclock: set time back to HW clock
* @is_untracked_pat_range exclude from PAT logic
* @nmi_init enable NMI on cpus
* @i8042_detect pre-detect if i8042 controller exists
*/
struct x86_platform_ops {
unsigned long (*calibrate_tsc)(void);
Expand All @@ -150,6 +151,7 @@ struct x86_platform_ops {
void (*iommu_shutdown)(void);
bool (*is_untracked_pat_range)(u64 start, u64 end);
void (*nmi_init)(void);
int (*i8042_detect)(void);
};

extern struct x86_init_ops x86_init;
Expand Down
7 changes: 7 additions & 0 deletions trunk/arch/x86/kernel/mrst.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@ static void __init mrst_setup_boot_clock(void)
setup_boot_APIC_clock();
};

/* MID systems don't have i8042 controller */
static int mrst_i8042_detect(void)
{
return 0;
}

/*
* Moorestown specific x86_init function overrides and early setup
* calls.
Expand All @@ -233,6 +239,7 @@ void __init x86_mrst_early_setup(void)
x86_cpuinit.setup_percpu_clockev = mrst_setup_secondary_clock;

x86_platform.calibrate_tsc = mrst_calibrate_tsc;
x86_platform.i8042_detect = mrst_i8042_detect;
x86_init.pci.init = pci_mrst_init;
x86_init.pci.fixup_irqs = x86_init_noop;

Expand Down
7 changes: 6 additions & 1 deletion trunk/arch/x86/kernel/x86_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/module.h>

#include <asm/bios_ebda.h>
#include <asm/paravirt.h>
Expand Down Expand Up @@ -85,12 +86,16 @@ struct x86_cpuinit_ops x86_cpuinit __cpuinitdata = {
};

static void default_nmi_init(void) { };
static int default_i8042_detect(void) { return 1; };

struct x86_platform_ops x86_platform = {
.calibrate_tsc = native_calibrate_tsc,
.get_wallclock = mach_get_cmos_time,
.set_wallclock = mach_set_rtc_mmss,
.iommu_shutdown = iommu_shutdown_noop,
.is_untracked_pat_range = is_ISA_range,
.nmi_init = default_nmi_init
.nmi_init = default_nmi_init,
.i8042_detect = default_i8042_detect
};

EXPORT_SYMBOL_GPL(x86_platform);
2 changes: 2 additions & 0 deletions trunk/arch/x86/kvm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1879,6 +1879,8 @@ static void mmu_set_spte(struct kvm_vcpu *vcpu, u64 *sptep,
pgprintk("hfn old %lx new %lx\n",
spte_to_pfn(*sptep), pfn);
rmap_remove(vcpu->kvm, sptep);
__set_spte(sptep, shadow_trap_nonpresent_pte);
kvm_flush_remote_tlbs(vcpu->kvm);
} else
was_rmapped = 1;
}
Expand Down
7 changes: 2 additions & 5 deletions trunk/arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1744,18 +1744,15 @@ static void enter_lmode(struct kvm_vcpu *vcpu)
(guest_tr_ar & ~AR_TYPE_MASK)
| AR_TYPE_BUSY_64_TSS);
}
vcpu->arch.efer |= EFER_LMA;
vmx_set_efer(vcpu, vcpu->arch.efer);
vmx_set_efer(vcpu, vcpu->arch.efer | EFER_LMA);
}

static void exit_lmode(struct kvm_vcpu *vcpu)
{
vcpu->arch.efer &= ~EFER_LMA;

vmcs_write32(VM_ENTRY_CONTROLS,
vmcs_read32(VM_ENTRY_CONTROLS)
& ~VM_ENTRY_IA32E_MODE);
vmx_set_efer(vcpu, vcpu->arch.efer);
vmx_set_efer(vcpu, vcpu->arch.efer & ~EFER_LMA);
}

#endif
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/input/keyboard/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ config KEYBOARD_ATARI
module will be called atakbd.

config KEYBOARD_ATKBD
tristate "AT keyboard" if EMBEDDED || !X86 || X86_MRST
tristate "AT keyboard" if EMBEDDED || !X86
default y
select SERIO
select SERIO_LIBPS2
select SERIO_I8042 if X86 && !X86_MRST
select SERIO_I8042 if X86
select SERIO_GSCPS2 if GSC
help
Say Y here if you want to use a standard AT or PS/2 keyboard. Usually
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/input/mouse/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ config MOUSE_PS2
default y
select SERIO
select SERIO_LIBPS2
select SERIO_I8042 if X86 && !X86_MRST
select SERIO_I8042 if X86
select SERIO_GSCPS2 if GSC
help
Say Y here if you have a PS/2 mouse connected to your system. This
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/input/serio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ config SERIO_I8042
tristate "i8042 PC Keyboard controller" if EMBEDDED || !X86
default y
depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && \
(!SUPERH || SH_CAYMAN) && !M68K && !BLACKFIN && !X86_MRST
(!SUPERH || SH_CAYMAN) && !M68K && !BLACKFIN
help
i8042 is the chip over which the standard AT keyboard and PS/2
mouse are connected to the computer. If you use these devices,
Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/input/serio/i8042-x86ia64io.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
* the Free Software Foundation.
*/

#ifdef CONFIG_X86
#include <asm/x86_init.h>
#endif

/*
* Names.
*/
Expand Down Expand Up @@ -840,6 +844,12 @@ static int __init i8042_platform_init(void)
{
int retval;

#ifdef CONFIG_X86
/* Just return if pre-detection shows no i8042 controller exist */
if (!x86_platform.i8042_detect())
return -ENODEV;
#endif

/*
* On ix86 platforms touching the i8042 data register region can do really
* bad things. Because of this the region is always reserved on ix86 boxes.
Expand Down
22 changes: 0 additions & 22 deletions trunk/drivers/spi/spi_mpc8xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,28 +66,6 @@ struct mpc8xxx_spi_reg {
__be32 receive;
};

/* SPI Parameter RAM */
struct spi_pram {
__be16 rbase; /* Rx Buffer descriptor base address */
__be16 tbase; /* Tx Buffer descriptor base address */
u8 rfcr; /* Rx function code */
u8 tfcr; /* Tx function code */
__be16 mrblr; /* Max receive buffer length */
__be32 rstate; /* Internal */
__be32 rdp; /* Internal */
__be16 rbptr; /* Internal */
__be16 rbc; /* Internal */
__be32 rxtmp; /* Internal */
__be32 tstate; /* Internal */
__be32 tdp; /* Internal */
__be16 tbptr; /* Internal */
__be16 tbc; /* Internal */
__be32 txtmp; /* Internal */
__be32 res; /* Tx temp. */
__be16 rpbase; /* Relocation pointer (CPM1 only) */
__be16 res1; /* Reserved */
};

/* SPI Controller mode register definitions */
#define SPMODE_LOOP (1 << 30)
#define SPMODE_CI_INACTIVEHIGH (1 << 29)
Expand Down

0 comments on commit 84f976b

Please sign in to comment.