Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75414
b: refs/heads/master
c: 6f4347c
h: refs/heads/master
v: v3
  • Loading branch information
Olaf Hering authored and Grant Likely committed Jan 10, 2008
1 parent df76db9 commit 73ffd83
Show file tree
Hide file tree
Showing 59 changed files with 340 additions and 445 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: 417009f64f17d76322d148a2cda40dfec37bcf0b
refs/heads/master: 6f4347c969674ed45de7d08d4b26d6326a95b959
8 changes: 0 additions & 8 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -883,14 +883,6 @@ and is between 256 and 4096 characters. It is defined in the file
lapic_timer_c2_ok [X86-32,x86-64,APIC] trust the local apic timer in
C2 power state.

libata.dma= [LIBATA] DMA control
libata.dma=0 Disable all PATA and SATA DMA
libata.dma=1 PATA and SATA Disk DMA only
libata.dma=2 ATAPI (CDROM) DMA only
libata.dma=4 Compact Flash DMA only
Combinations also work, so libata.dma=3 enables DMA
for disks and CDROMs, but not CFs.

libata.noacpi [LIBATA] Disables use of ACPI in libata suspend/resume
when set.
Format: <int>
Expand Down
7 changes: 4 additions & 3 deletions trunk/arch/mips/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ static void __init bootmem_init(void)

static void __init bootmem_init(void)
{
unsigned long reserved_end;
unsigned long init_begin, reserved_end;
unsigned long mapstart = ~0UL;
unsigned long bootmap_size;
int i;
Expand Down Expand Up @@ -344,15 +344,16 @@ static void __init bootmem_init(void)
min_low_pfn, max_low_pfn);


init_begin = PFN_UP(__pa_symbol(&__init_begin));
for (i = 0; i < boot_mem_map.nr_map; i++) {
unsigned long start, end;

start = PFN_UP(boot_mem_map.map[i].addr);
end = PFN_DOWN(boot_mem_map.map[i].addr
+ boot_mem_map.map[i].size);

if (start <= min_low_pfn)
start = min_low_pfn;
if (start <= init_begin)
start = init_begin;
if (start >= end)
continue;

Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/mips/lasat/image/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ endif

MKLASATIMG = mklasatimg
MKLASATIMG_ARCH = mq2,mqpro,sp100,sp200
KERNEL_IMAGE = vmlinux
KERNEL_IMAGE = $(TOPDIR)/vmlinux
KERNEL_START = $(shell $(NM) $(KERNEL_IMAGE) | grep " _text" | cut -f1 -d\ )
KERNEL_ENTRY = $(shell $(NM) $(KERNEL_IMAGE) | grep kernel_entry | cut -f1 -d\ )

LDSCRIPT= -L$(srctree)/$(src) -Tromscript.normal
LDSCRIPT= -L$(obj) -Tromscript.normal

HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \
-D_kernel_entry=0x$(KERNEL_ENTRY) \
-D VERSION="\"$(Version)\"" \
-D TIMESTAMP=$(shell date +%s)

$(obj)/head.o: $(obj)/head.S $(KERNEL_IMAGE)
$(CC) -fno-pic $(HEAD_DEFINES) $(LINUXINCLUDE) -c -o $@ $<
$(CC) -fno-pic $(HEAD_DEFINES) -I$(TOPDIR)/include -c -o $@ $<

OBJECTS = head.o kImage.o

Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/mips/mips-boards/generic/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ void __init prom_meminit(void)

void __init prom_free_prom_memory(void)
{
#if 0 /* for now ... */
unsigned long addr;
int i;

Expand All @@ -180,4 +181,5 @@ void __init prom_free_prom_memory(void)
free_init_pages("prom memory",
addr, addr + boot_mem_map.map[i].size);
}
#endif
}
10 changes: 4 additions & 6 deletions trunk/arch/mips/mips-boards/generic/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,16 @@ static void atlas_machine_power_off(void);

static void mips_machine_restart(char *command)
{
unsigned int __iomem *softres_reg =
ioremap(SOFTRES_REG, sizeof(unsigned int));
unsigned int __iomem *softres_reg = ioremap(SOFTRES_REG, sizeof(unsigned int));

__raw_writel(GORESET, softres_reg);
writew(GORESET, softres_reg);
}

static void mips_machine_halt(void)
{
unsigned int __iomem *softres_reg =
ioremap(SOFTRES_REG, sizeof(unsigned int));
unsigned int __iomem *softres_reg = ioremap(SOFTRES_REG, sizeof(unsigned int));

__raw_writel(GORESET, softres_reg);
writew(GORESET, softres_reg);
}

#if defined(CONFIG_MIPS_ATLAS)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/mm/dma-default.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static gfp_t massage_gfp_flags(const struct device *dev, gfp_t gfp)
/* ignore region specifiers */
gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM);

#ifdef CONFIG_ZONE_DMA
#ifdef CONFIG_ZONE_DMA32
if (dev == NULL)
gfp |= __GFP_DMA;
else if (dev->coherent_dma_mask < DMA_BIT_MASK(24))
Expand Down
109 changes: 37 additions & 72 deletions trunk/arch/mips/philips/pnx8550/common/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/kernel_stat.h>
#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include <linux/module.h>

#include <asm/bootinfo.h>
#include <asm/cpu.h>
Expand All @@ -40,60 +41,11 @@ static cycle_t hpt_read(void)
return read_c0_count2();
}

static struct clocksource pnx_clocksource = {
.name = "pnx8xxx",
.rating = 200,
.read = hpt_read,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};

static void timer_ack(void)
{
write_c0_compare(cpj);
}

static irqreturn_t pnx8xxx_timer_interrupt(int irq, void *dev_id)
{
struct clock_event_device *c = dev_id;

/* clear MATCH, signal the event */
c->event_handler(c);

return IRQ_HANDLED;
}

static struct irqaction pnx8xxx_timer_irq = {
.handler = pnx8xxx_timer_interrupt,
.flags = IRQF_DISABLED | IRQF_PERCPU,
.name = "pnx8xxx_timer",
};

static irqreturn_t monotonic_interrupt(int irq, void *dev_id)
{
/* Timer 2 clear interrupt */
write_c0_compare2(-1);
return IRQ_HANDLED;
}

static struct irqaction monotonic_irqaction = {
.handler = monotonic_interrupt,
.flags = IRQF_DISABLED,
.name = "Monotonic timer",
};

static int pnx8xxx_set_next_event(unsigned long delta,
struct clock_event_device *evt)
{
write_c0_compare(delta);
return 0;
}

static struct clock_event_device pnx8xxx_clockevent = {
.name = "pnx8xxx_clockevent",
.features = CLOCK_EVT_FEAT_ONESHOT,
.set_next_event = pnx8xxx_set_next_event,
};

/*
* plat_time_init() - it does the following things:
*
Expand All @@ -106,34 +58,11 @@ static struct clock_event_device pnx8xxx_clockevent = {

__init void plat_time_init(void)
{
unsigned int configPR;
unsigned int n;
unsigned int m;
unsigned int p;
unsigned int pow2p;

clockevents_register_device(&pnx8xxx_clockevent);
clocksource_register(&pnx_clocksource);

setup_irq(PNX8550_INT_TIMER1, &pnx8xxx_timer_irq);
setup_irq(PNX8550_INT_TIMER2, &monotonic_irqaction);

/* Timer 1 start */
configPR = read_c0_config7();
configPR &= ~0x00000008;
write_c0_config7(configPR);

/* Timer 2 start */
configPR = read_c0_config7();
configPR &= ~0x00000010;
write_c0_config7(configPR);

/* Timer 3 stop */
configPR = read_c0_config7();
configPR |= 0x00000020;
write_c0_config7(configPR);


/* PLL0 sets MIPS clock (PLL1 <=> TM1, PLL6 <=> TM2, PLL5 <=> mem) */
/* (but only if CLK_MIPS_CTL select value [bits 3:1] is 1: FIXME) */

Expand All @@ -158,6 +87,42 @@ __init void plat_time_init(void)
write_c0_count2(0);
write_c0_compare2(0xffffffff);

clocksource_mips.read = hpt_read;
mips_timer_ack = timer_ack;
}

static irqreturn_t monotonic_interrupt(int irq, void *dev_id)
{
/* Timer 2 clear interrupt */
write_c0_compare2(-1);
return IRQ_HANDLED;
}

static struct irqaction monotonic_irqaction = {
.handler = monotonic_interrupt,
.flags = IRQF_DISABLED,
.name = "Monotonic timer",
};

void __init plat_timer_setup(struct irqaction *irq)
{
int configPR;

setup_irq(PNX8550_INT_TIMER1, irq);
setup_irq(PNX8550_INT_TIMER2, &monotonic_irqaction);

/* Timer 1 start */
configPR = read_c0_config7();
configPR &= ~0x00000008;
write_c0_config7(configPR);

/* Timer 2 start */
configPR = read_c0_config7();
configPR &= ~0x00000010;
write_c0_config7(configPR);

/* Timer 3 stop */
configPR = read_c0_config7();
configPR |= 0x00000020;
write_c0_config7(configPR);
}
39 changes: 39 additions & 0 deletions trunk/arch/powerpc/kernel/prom_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -2216,6 +2216,45 @@ static void __init fixup_device_tree_efika(void)
prom_printf("fixup_device_tree_efika: ",
"skipped entry %x - setprop error\n", i);
}

/* Make sure ethernet mdio bus node exists */
node = call_prom("finddevice", 1, 1, ADDR("/builtin/mdio"));
if (!PHANDLE_VALID(node)) {
prom_printf("Adding Ethernet MDIO node\n");
call_prom("interpret", 1, 1,
" s\" /builtin\" find-device"
" new-device"
" 1 encode-int s\" #address-cells\" property"
" 0 encode-int s\" #size-cells\" property"
" s\" mdio\" 2dup device-name device-type"
" s\" mpc5200b-fec-phy\" encode-string"
" s\" compatible\" property"
" 0xf0003000 0x400 reg"
" 0x2 encode-int"
" 0x5 encode-int encode+"
" 0x3 encode-int encode+"
" s\" interrupts\" property"
" finish-device");
};

/* Make sure ethernet phy device node exist */
node = call_prom("finddevice", 1, 1, ADDR("/builtin/mdio/ethernet-phy"));
if (!PHANDLE_VALID(node)) {
prom_printf("Adding Ethernet PHY node\n");
call_prom("interpret", 1, 1,
" s\" /builtin/mdio\" find-device"
" new-device"
" s\" ethernet-phy\" device-name"
" 0x10 encode-int s\" reg\" property"
" my-self"
" ihandle>phandle"
" finish-device"
" s\" /builtin/ethernet\" find-device"
" encode-int"
" s\" phy-handle\" property"
" device-end");
}

}
#else
#define fixup_device_tree_efika()
Expand Down
10 changes: 7 additions & 3 deletions trunk/arch/x86/kernel/apm_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -2256,12 +2256,14 @@ static int __init apm_init(void)
apm_info.disabled = 1;
return -ENODEV;
}
if (pm_flags & PM_ACPI) {
if (PM_IS_ACTIVE()) {
printk(KERN_NOTICE "apm: overridden by ACPI.\n");
apm_info.disabled = 1;
return -ENODEV;
}
pm_flags |= PM_APM;
#ifdef CONFIG_PM_LEGACY
pm_active = 1;
#endif

/*
* Set up a segment that references the real mode segment 0x40
Expand Down Expand Up @@ -2364,7 +2366,9 @@ static void __exit apm_exit(void)
kthread_stop(kapmd_task);
kapmd_task = NULL;
}
pm_flags &= ~PM_APM;
#ifdef CONFIG_PM_LEGACY
pm_active = 0;
#endif
}

module_init(apm_init);
Expand Down
Loading

0 comments on commit 73ffd83

Please sign in to comment.