Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57821
b: refs/heads/master
c: 902233e
h: refs/heads/master
i:
  57819: 8f7dfd4
v: v3
  • Loading branch information
Linus Torvalds committed Jun 15, 2007
1 parent 92fd3b9 commit 5206772
Show file tree
Hide file tree
Showing 103 changed files with 1,097 additions and 571 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: c5760abde715dcd9ead66769e45d1896332e9d9c
refs/heads/master: 902233ee494f9d9da6dbb818316fcbf892bebbed
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-s3c2440/mach-anubis.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ static struct map_desc anubis_iodesc[] __initdata = {
.length = SZ_4K,
.type = MT_DEVICE,
}, {
.virtual = (u32)ANUBIS_VA_CTRL2,
.pfn = __phys_to_pfn(ANUBIS_PA_CTRL2),
.virtual = (u32)ANUBIS_VA_IDREG,
.pfn = __phys_to_pfn(ANUBIS_PA_IDREG),
.length = SZ_4K,
.type = MT_DEVICE,
},
Expand Down
58 changes: 54 additions & 4 deletions trunk/arch/arm/mach-s3c2440/mach-osiris.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/timer.h>
#include <linux/init.h>
#include <linux/device.h>
#include <linux/sysdev.h>
#include <linux/serial_core.h>

#include <asm/mach/arch.h>
Expand Down Expand Up @@ -65,6 +66,11 @@ static struct map_desc osiris_iodesc[] __initdata = {
/* CPLD control registers */

{
.virtual = (u32)OSIRIS_VA_CTRL0,
.pfn = __phys_to_pfn(OSIRIS_PA_CTRL0),
.length = SZ_16K,
.type = MT_DEVICE,
}, {
.virtual = (u32)OSIRIS_VA_CTRL1,
.pfn = __phys_to_pfn(OSIRIS_PA_CTRL1),
.length = SZ_16K,
Expand All @@ -74,6 +80,11 @@ static struct map_desc osiris_iodesc[] __initdata = {
.pfn = __phys_to_pfn(OSIRIS_PA_CTRL2),
.length = SZ_16K,
.type = MT_DEVICE,
}, {
.virtual = (u32)OSIRIS_VA_IDREG,
.pfn = __phys_to_pfn(OSIRIS_PA_IDREG),
.length = SZ_16K,
.type = MT_DEVICE,
},
};

Expand Down Expand Up @@ -195,13 +206,13 @@ static void osiris_nand_select(struct s3c2410_nand_set *set, int slot)
pr_debug("osiris_nand: selecting slot %d (set %p,%p)\n",
slot, set, set->nr_map);

tmp = __raw_readb(OSIRIS_VA_CTRL1);
tmp &= ~OSIRIS_CTRL1_NANDSEL;
tmp = __raw_readb(OSIRIS_VA_CTRL0);
tmp &= ~OSIRIS_CTRL0_NANDSEL;
tmp |= slot;

pr_debug("osiris_nand: ctrl1 now %02x\n", tmp);
pr_debug("osiris_nand: ctrl0 now %02x\n", tmp);

__raw_writeb(tmp, OSIRIS_VA_CTRL1);
__raw_writeb(tmp, OSIRIS_VA_CTRL0);
}

static struct s3c2410_platform_nand osiris_nand_info = {
Expand Down Expand Up @@ -235,10 +246,45 @@ static struct platform_device osiris_pcmcia = {
.resource = osiris_pcmcia_resource,
};

/* Osiris power management device */

#ifdef CONFIG_PM
static unsigned char pm_osiris_ctrl0;

static int osiris_pm_suspend(struct sys_device *sd, pm_message_t state)
{
pm_osiris_ctrl0 = __raw_readb(OSIRIS_VA_CTRL0);
return 0;
}

static int osiris_pm_resume(struct sys_device *sd)
{
if (pm_osiris_ctrl0 & OSIRIS_CTRL0_FIX8)
__raw_writeb(OSIRIS_CTRL1_FIX8, OSIRIS_VA_CTRL1);

return 0;
}

#else
#define osiris_pm_suspend NULL
#define osiris_pm_resume NULL
#endif

static struct sysdev_class osiris_pm_sysclass = {
set_kset_name("mach-osiris"),
.suspend = osiris_pm_suspend,
.resume = osiris_pm_resume,
};

static struct sys_device osiris_pm_sysdev = {
.cls = &osiris_pm_sysclass,
};

/* Standard Osiris devices */

static struct platform_device *osiris_devices[] __initdata = {
&s3c_device_i2c,
&s3c_device_wdt,
&s3c_device_nand,
&osiris_pcmcia,
};
Expand Down Expand Up @@ -288,6 +334,9 @@ static void __init osiris_map_io(void)

static void __init osiris_init(void)
{
sysdev_class_register(&osiris_pm_sysclass);
sysdev_register(&osiris_pm_sysdev);

platform_add_devices(osiris_devices, ARRAY_SIZE(osiris_devices));
};

Expand All @@ -299,5 +348,6 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS")
.map_io = osiris_map_io,
.init_machine = osiris_init,
.init_irq = s3c24xx_init_irq,
.init_machine = osiris_init,
.timer = &s3c24xx_timer,
MACHINE_END
4 changes: 4 additions & 0 deletions trunk/arch/arm/vfp/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ do_vfp:
add r10, r10, #TI_VFPSTATE @ r10 = workspace
ldr pc, [r4] @ call VFP entry point

ENTRY(vfp_null_entry)
mov pc, lr
ENDPROC(vfp_null_entry)

.LCvfp:
.word vfp_vector

Expand Down
5 changes: 4 additions & 1 deletion trunk/arch/arm/vfp/vfpmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
*/
void vfp_testing_entry(void);
void vfp_support_entry(void);
void vfp_null_entry(void);

void (*vfp_vector)(void) = vfp_testing_entry;
void (*vfp_vector)(void) = vfp_null_entry;
union vfp_state *last_VFP_context[NR_CPUS];

/*
Expand Down Expand Up @@ -321,8 +322,10 @@ static int __init vfp_init(void)
* The handler is already setup to just log calls, so
* we just need to read the VFPSID register.
*/
vfp_vector = vfp_testing_entry;
vfpsid = fmrx(FPSID);
barrier();
vfp_vector = vfp_null_entry;

printk(KERN_INFO "VFP support v0.3: ");
if (VFP_arch) {
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/avr32/boards/atstk1000/atstk1002.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ static struct spi_board_info spi0_board_info[] __initdata = {
.modalias = "ltv350qv",
.max_speed_hz = 16000000,
.chip_select = 1,
.mode = SPI_MODE_3,
},
};

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/avr32/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ asmlinkage void do_page_fault(unsigned long ecr, struct pt_regs *regs)
up_read(&mm->mmap_sem);

if (user_mode(regs)) {
if (exception_trace)
if (exception_trace && printk_ratelimit())
printk("%s%s[%d]: segfault at %08lx pc %08lx "
"sp %08lx ecr %lu\n",
is_init(tsk) ? KERN_EMERG : KERN_INFO,
Expand Down
12 changes: 6 additions & 6 deletions trunk/arch/mips/kernel/smp-mt.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@ static irqreturn_t ipi_call_interrupt(int irq, void *dev_id)

static struct irqaction irq_resched = {
.handler = ipi_resched_interrupt,
.flags = IRQF_DISABLED,
.flags = IRQF_DISABLED|IRQF_PERCPU,
.name = "IPI_resched"
};

static struct irqaction irq_call = {
.handler = ipi_call_interrupt,
.flags = IRQF_DISABLED,
.flags = IRQF_DISABLED|IRQF_PERCPU,
.name = "IPI_call"
};

Expand Down Expand Up @@ -275,10 +275,7 @@ void __init plat_prepare_cpus(unsigned int max_cpus)
setup_irq(cpu_ipi_resched_irq, &irq_resched);
setup_irq(cpu_ipi_call_irq, &irq_call);

/* need to mark IPI's as IRQ_PER_CPU */
irq_desc[cpu_ipi_resched_irq].status |= IRQ_PER_CPU;
set_irq_handler(cpu_ipi_resched_irq, handle_percpu_irq);
irq_desc[cpu_ipi_call_irq].status |= IRQ_PER_CPU;
set_irq_handler(cpu_ipi_call_irq, handle_percpu_irq);
}

Expand Down Expand Up @@ -326,8 +323,11 @@ void prom_boot_secondary(int cpu, struct task_struct *idle)

void prom_init_secondary(void)
{
/* Enable per-cpu interrupts */

/* This is Malta specific: IPI,performance and timer inetrrupts */
write_c0_status((read_c0_status() & ~ST0_IM ) |
(STATUSF_IP0 | STATUSF_IP1 | STATUSF_IP7));
(STATUSF_IP0 | STATUSF_IP1 | STATUSF_IP6 | STATUSF_IP7));
}

void prom_smp_finish(void)
Expand Down
44 changes: 31 additions & 13 deletions trunk/arch/mips/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,26 +199,44 @@ int (*perf_irq)(void) = null_perf_irq;
EXPORT_SYMBOL(null_perf_irq);
EXPORT_SYMBOL(perf_irq);

/*
* Performance counter IRQ or -1 if shared with timer
*/
int mipsxx_perfcount_irq;
EXPORT_SYMBOL(mipsxx_perfcount_irq);

/*
* Possibly handle a performance counter interrupt.
* Return true if the timer interrupt should not be checked
*/
static inline int handle_perf_irq (int r2)
{
/*
* The performance counter overflow interrupt may be shared with the
* timer interrupt (mipsxx_perfcount_irq < 0). If it is and a
* performance counter has overflowed (perf_irq() == IRQ_HANDLED)
* and we can't reliably determine if a counter interrupt has also
* happened (!r2) then don't check for a timer interrupt.
*/
return (mipsxx_perfcount_irq < 0) &&
perf_irq() == IRQ_HANDLED &&
!r2;
}

asmlinkage void ll_timer_interrupt(int irq)
{
int r2 = cpu_has_mips_r2;

irq_enter();
kstat_this_cpu.irqs[irq]++;

/*
* Suckage alert:
* Before R2 of the architecture there was no way to see if a
* performance counter interrupt was pending, so we have to run the
* performance counter interrupt handler anyway.
*/
if (!r2 || (read_c0_cause() & (1 << 26)))
if (perf_irq())
goto out;
if (handle_perf_irq(r2))
goto out;

/* we keep interrupt disabled all the time */
if (!r2 || (read_c0_cause() & (1 << 30)))
timer_interrupt(irq, NULL);
if (r2 && ((read_c0_cause() & (1 << 30)) == 0))
goto out;

timer_interrupt(irq, NULL);

out:
irq_exit();
Expand Down Expand Up @@ -258,7 +276,7 @@ unsigned int mips_hpt_frequency;

static struct irqaction timer_irqaction = {
.handler = timer_interrupt,
.flags = IRQF_DISABLED,
.flags = IRQF_DISABLED | IRQF_PERCPU,
.name = "timer",
};

Expand Down
62 changes: 44 additions & 18 deletions trunk/arch/mips/mips-boards/generic/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ int *_prom_argv, *_prom_envp;

int init_debug = 0;

unsigned int mips_revision_corid;
int mips_revision_corid;
int mips_revision_sconid;

/* Bonito64 system controller register base. */
unsigned long _pcictrl_bonito;
Expand Down Expand Up @@ -275,13 +276,38 @@ void __init prom_init(void)
else
mips_revision_corid = MIPS_REVISION_CORID_CORE_EMUL_MSC;
}
switch(mips_revision_corid) {

mips_revision_sconid = MIPS_REVISION_SCONID;
if (mips_revision_sconid == MIPS_REVISION_SCON_OTHER) {
switch (mips_revision_corid) {
case MIPS_REVISION_CORID_QED_RM5261:
case MIPS_REVISION_CORID_CORE_LV:
case MIPS_REVISION_CORID_CORE_FPGA:
case MIPS_REVISION_CORID_CORE_FPGAR2:
mips_revision_sconid = MIPS_REVISION_SCON_GT64120;
break;
case MIPS_REVISION_CORID_CORE_EMUL_BON:
case MIPS_REVISION_CORID_BONITO64:
case MIPS_REVISION_CORID_CORE_20K:
mips_revision_sconid = MIPS_REVISION_SCON_BONITO;
break;
case MIPS_REVISION_CORID_CORE_MSC:
case MIPS_REVISION_CORID_CORE_FPGA2:
case MIPS_REVISION_CORID_CORE_FPGA3:
case MIPS_REVISION_CORID_CORE_24K:
case MIPS_REVISION_CORID_CORE_EMUL_MSC:
mips_revision_sconid = MIPS_REVISION_SCON_SOCIT;
break;
default:
mips_display_message("CC Error");
while (1); /* We die here... */
}
}

switch (mips_revision_sconid) {
u32 start, map, mask, data;

case MIPS_REVISION_CORID_QED_RM5261:
case MIPS_REVISION_CORID_CORE_LV:
case MIPS_REVISION_CORID_CORE_FPGA:
case MIPS_REVISION_CORID_CORE_FPGAR2:
case MIPS_REVISION_SCON_GT64120:
/*
* Setup the North bridge to do Master byte-lane swapping
* when running in bigendian.
Expand All @@ -305,9 +331,7 @@ void __init prom_init(void)
set_io_port_base(MALTA_GT_PORT_BASE);
break;

case MIPS_REVISION_CORID_CORE_EMUL_BON:
case MIPS_REVISION_CORID_BONITO64:
case MIPS_REVISION_CORID_CORE_20K:
case MIPS_REVISION_SCON_BONITO:
_pcictrl_bonito_pcicfg = (unsigned long)ioremap(BONITO_PCICFG_BASE, BONITO_PCICFG_SIZE);

/*
Expand All @@ -334,13 +358,10 @@ void __init prom_init(void)
set_io_port_base(MALTA_BONITO_PORT_BASE);
break;

case MIPS_REVISION_CORID_CORE_MSC:
case MIPS_REVISION_CORID_CORE_FPGA2:
case MIPS_REVISION_CORID_CORE_FPGA3:
case MIPS_REVISION_CORID_CORE_24K:
case MIPS_REVISION_CORID_CORE_EMUL_MSC:
case MIPS_REVISION_SCON_SOCIT:
case MIPS_REVISION_SCON_ROCIT:
_pcictrl_msc = (unsigned long)ioremap(MIPS_MSC01_PCI_REG_BASE, 0x2000);

mips_pci_controller:
mb();
MSC_READ(MSC01_PCI_CFG, data);
MSC_WRITE(MSC01_PCI_CFG, data & ~MSC01_PCI_CFG_EN_BIT);
Expand Down Expand Up @@ -374,10 +395,15 @@ void __init prom_init(void)
set_io_port_base(MALTA_MSC_PORT_BASE);
break;

case MIPS_REVISION_SCON_SOCITSC:
case MIPS_REVISION_SCON_SOCITSCP:
_pcictrl_msc = (unsigned long)ioremap(MIPS_SOCITSC_PCI_REG_BASE, 0x2000);
goto mips_pci_controller;

default:
/* Unknown Core card */
mips_display_message("CC Error");
while(1); /* We die here... */
/* Unknown system controller */
mips_display_message("SC Error");
while (1); /* We die here... */
}
#endif
board_nmi_handler_setup = mips_nmi_setup;
Expand Down
Loading

0 comments on commit 5206772

Please sign in to comment.