Skip to content

Commit

Permalink
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (21 commits)
  [POWERPC] spusched: Fix initial timeslice calculation
  [POWERPC] spufs: Fix incorrect initialization of cbe_spu_info.spus
  [POWERPC] Fix Maple platform ISA bus
  [POWERPC] Make pci_iounmap actually unmap things
  [POWERPC] Add function to check if address is an IO port
  [POWERPC] Fix Pegasos keyboard detection
  [POWERPC] iSeries: Fix section mismatch warning in lpevents
  [POWERPC] iSeries: Fix section mismatch warnings
  [POWERPC] iSeries: We need vio_enable_interrupts
  [POWERPC] Fix RTC and device tree on linkstation machines
  [POWERPC] Add of_register_i2c_devices()
  [POWERPC] Fix loop with unsigned long counter variable
  [POWERPC] Fix register labels on show_regs() message for 4xx/Book-E
  [POWERPC] Only allow building of BootX text support on PPC_MULTIPLATFORM
  [POWERPC] Fix the ability to reset on MPC8544 DS and MPC8568 MDS boards
  [POWERPC] Fix mpc7448hpc2 tsi108 device_type bug
  [POWREPC] Fixup a number of modpost warnings on ppc32
  [POWERPC] Fix ethernet PHY support on MPC8544 DS
  [POWERPC] Don't try to allocate resources for a Freescale POWERPC PHB
  Revert "[POWERPC] Don't complain if size-cells == 0 in prom_parse()"
  ...
  • Loading branch information
Linus Torvalds committed Jul 26, 2007
2 parents 257f492 + 46b2835 commit 9f5577d
Show file tree
Hide file tree
Showing 27 changed files with 221 additions and 37 deletions.
2 changes: 1 addition & 1 deletion arch/powerpc/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ config BDI_SWITCH

config BOOTX_TEXT
bool "Support for early boot text console (BootX or OpenFirmware only)"
depends PPC_OF
depends PPC_OF && PPC_MULTIPLATFORM
help
Say Y here to see progress messages from the boot firmware in text
mode. Requires either BootX or Open Firmware.
Expand Down
18 changes: 12 additions & 6 deletions arch/powerpc/boot/dts/kuroboxHD.dts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 kuroboxHD.dts"
PowerPC,603e { /* Really 8241 */
device_type = "cpu";
reg = <0>;
clock-frequency = <bebc200>; /* Fixed by bootwrapper */
timebase-frequency = <1743000>; /* Fixed by bootwrapper */
bus-frequency = <0>; /* From bootloader */
clock-frequency = <bebc200>; /* Fixed by bootloader */
timebase-frequency = <1743000>; /* Fixed by bootloader */
bus-frequency = <0>; /* Fixed by bootloader */
/* Following required by dtc but not used */
i-cache-line-size = <0>;
d-cache-line-size = <0>;
i-cache-size = <4000>;
d-cache-size = <4000>;
};
Expand All @@ -64,11 +62,19 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 kuroboxHD.dts"
fef00000 fef00000 00100000>; /* pci iack */

i2c@80003000 {
#address-cells = <1>;
#size-cells = <0>;
device_type = "i2c";
compatible = "fsl-i2c";
reg = <80003000 1000>;
interrupts = <5 2>;
interrupt-parent = <&mpic>;

rtc@32 {
device_type = "rtc";
compatible = "ricoh,rs5c372b";
reg = <32>;
};
};

serial@80004500 {
Expand All @@ -91,7 +97,7 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 kuroboxHD.dts"
interrupt-parent = <&mpic>;
};

mpic: pic@80040000 {
mpic: interrupt-controller@80040000 {
#interrupt-cells = <2>;
#address-cells = <0>;
device_type = "open-pic";
Expand Down
19 changes: 12 additions & 7 deletions arch/powerpc/boot/dts/kuroboxHG.dts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHG.dtb -V 16 kuroboxHG.dts"
PowerPC,603e { /* Really 8241 */
device_type = "cpu";
reg = <0>;
clock-frequency = <fdad680>; /* Fixed by bootwrapper */
timebase-frequency = <1F04000>; /* Fixed by bootwrapper */
bus-frequency = <0>; /* From bootloader */
clock-frequency = <fdad680>; /* Fixed by bootloader */
timebase-frequency = <1F04000>; /* Fixed by bootloader */
bus-frequency = <0>; /* Fixed by bootloader */
/* Following required by dtc but not used */
i-cache-line-size = <0>;
d-cache-line-size = <0>;
i-cache-size = <4000>;
d-cache-size = <4000>;
};
Expand All @@ -64,11 +62,19 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHG.dtb -V 16 kuroboxHG.dts"
fef00000 fef00000 00100000>; /* pci iack */

i2c@80003000 {
#address-cells = <1>;
#size-cells = <0>;
device_type = "i2c";
compatible = "fsl-i2c";
reg = <80003000 1000>;
interrupts = <5 2>;
interrupt-parent = <&mpic>;

rtc@32 {
device_type = "rtc";
compatible = "ricoh,rs5c372b";
reg = <32>;
};
};

serial@80004500 {
Expand All @@ -91,8 +97,7 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHG.dtb -V 16 kuroboxHG.dts"
interrupt-parent = <&mpic>;
};

mpic: pic@80040000 {
interrupt-parent = <&mpic>;
mpic: interrupt-controller@80040000 {
#interrupt-cells = <2>;
#address-cells = <0>;
device_type = "open-pic";
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/boot/dts/mpc7448hpc2.dts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#address-cells = <1>;
#size-cells = <1>;
#interrupt-cells = <2>;
device_type = "tsi108-bridge";
device_type = "tsi-bridge";
ranges = <00000000 c0000000 00010000>;
reg = <c0000000 00010000>;
bus-frequency = <0>;
Expand Down
8 changes: 8 additions & 0 deletions arch/powerpc/boot/dts/mpc8544ds.dts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
interrupts = <1d 2 1e 2 22 2>;
interrupt-parent = <&mpic>;
phy-handle = <&phy0>;
phy-connection-type = "rgmii-id";
};

ethernet@26000 {
Expand All @@ -117,6 +118,7 @@
interrupts = <1f 2 20 2 21 2>;
interrupt-parent = <&mpic>;
phy-handle = <&phy1>;
phy-connection-type = "rgmii-id";
};

serial@4500 {
Expand Down Expand Up @@ -348,6 +350,12 @@

};

global-utilities@e0000 { //global utilities block
compatible = "fsl,mpc8548-guts";
reg = <e0000 1000>;
fsl,has-rstcr;
};

mpic: pic@40000 {
clock-frequency = <0>;
interrupt-controller;
Expand Down
6 changes: 6 additions & 0 deletions arch/powerpc/boot/dts/mpc8568mds.dts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,12 @@
interrupt-parent = <&mpic>;
};

global-utilities@e0000 { //global utilities block
compatible = "fsl,mpc8548-guts";
reg = <e0000 1000>;
fsl,has-rstcr;
};

pci@8000 {
interrupt-map-mask = <f800 0 0 7>;
interrupt-map = <
Expand Down
7 changes: 4 additions & 3 deletions arch/powerpc/kernel/head_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -809,8 +809,9 @@ system_reset_iSeries:
mtmsrd r24 /* RI on */
lhz r24,PACAPACAINDEX(r13) /* Get processor # */
cmpwi 0,r24,0 /* Are we processor 0? */
beq .__start_initialization_iSeries /* Start up the first processor */
mfspr r4,SPRN_CTRLF
bne 1f
b .__start_initialization_iSeries /* Start up the first processor */
1: mfspr r4,SPRN_CTRLF
li r5,CTRL_RUNLATCH /* Turn off the run light */
andc r4,r4,r5
mtspr SPRN_CTRLT,r4
Expand Down Expand Up @@ -1611,7 +1612,7 @@ _GLOBAL(generic_secondary_smp_init)
#endif

#ifdef CONFIG_PPC_ISERIES
_STATIC(__start_initialization_iSeries)
_INIT_STATIC(__start_initialization_iSeries)
/* Clear out the BSS */
LOAD_REG_IMMEDIATE(r11,__bss_stop)
LOAD_REG_IMMEDIATE(r8,__bss_start)
Expand Down
8 changes: 7 additions & 1 deletion arch/powerpc/kernel/iomap.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <linux/pci.h>
#include <linux/mm.h>
#include <asm/io.h>
#include <asm/pci-bridge.h>

/*
* Here comes the ppc64 implementation of the IOMAP
Expand Down Expand Up @@ -136,7 +137,12 @@ void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max)

void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
{
/* Nothing to do */
if (isa_vaddr_is_ioport(addr))
return;
if (pcibios_vaddr_is_ioport(addr))
return;
iounmap(addr);
}

EXPORT_SYMBOL(pci_iomap);
EXPORT_SYMBOL(pci_iounmap);
8 changes: 4 additions & 4 deletions arch/powerpc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,10 @@ irq_hw_number_t virq_to_hw(unsigned int virq)
}
EXPORT_SYMBOL_GPL(virq_to_hw);

struct irq_host *irq_alloc_host(unsigned int revmap_type,
unsigned int revmap_arg,
struct irq_host_ops *ops,
irq_hw_number_t inval_irq)
__init_refok struct irq_host *irq_alloc_host(unsigned int revmap_type,
unsigned int revmap_arg,
struct irq_host_ops *ops,
irq_hw_number_t inval_irq)
{
struct irq_host *host;
unsigned int size = sizeof(struct irq_host);
Expand Down
25 changes: 24 additions & 1 deletion arch/powerpc/kernel/pci-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static void __devinit pci_setup_pci_controller(struct pci_controller *hose)
spin_unlock(&hose_spinlock);
}

struct pci_controller * pcibios_alloc_controller(struct device_node *dev)
__init_refok struct pci_controller * pcibios_alloc_controller(struct device_node *dev)
{
struct pci_controller *phb;

Expand Down Expand Up @@ -101,6 +101,29 @@ void pcibios_free_controller(struct pci_controller *phb)
kfree(phb);
}

int pcibios_vaddr_is_ioport(void __iomem *address)
{
int ret = 0;
struct pci_controller *hose;
unsigned long size;

spin_lock(&hose_spinlock);
list_for_each_entry(hose, &hose_list, list_node) {
#ifdef CONFIG_PPC64
size = hose->pci_io_size;
#else
size = hose->io_resource.end - hose->io_resource.start + 1;
#endif
if (address >= hose->io_base_virt &&
address < (hose->io_base_virt + size)) {
ret = 1;
break;
}
}
spin_unlock(&hose_spinlock);
return ret;
}

/*
* Return the domain number for this bus.
*/
Expand Down
20 changes: 19 additions & 1 deletion arch/powerpc/kernel/pci_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,24 @@ LIST_HEAD(hose_list);

static int pci_bus_count;

static void
fixup_hide_host_resource_fsl(struct pci_dev* dev)
{
int i, class = dev->class >> 8;

if ((class == PCI_CLASS_PROCESSOR_POWERPC) &&
(dev->hdr_type == PCI_HEADER_TYPE_NORMAL) &&
(dev->bus->parent == NULL)) {
for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
dev->resource[i].start = 0;
dev->resource[i].end = 0;
dev->resource[i].flags = 0;
}
}
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MOTOROLA, PCI_ANY_ID, fixup_hide_host_resource_fsl);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_FREESCALE, PCI_ANY_ID, fixup_hide_host_resource_fsl);

static void
fixup_broken_pcnet32(struct pci_dev* dev)
{
Expand Down Expand Up @@ -1229,7 +1247,7 @@ pcibios_init(void)

subsys_initcall(pcibios_init);

void __init pcibios_fixup_bus(struct pci_bus *bus)
void pcibios_fixup_bus(struct pci_bus *bus)
{
struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
unsigned long io_offset;
Expand Down
4 changes: 4 additions & 0 deletions arch/powerpc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,11 @@ void show_regs(struct pt_regs * regs)
printk(" CR: %08lx XER: %08lx\n", regs->ccr, regs->xer);
trap = TRAP(regs);
if (trap == 0x300 || trap == 0x600)
#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr);
#else
printk("DAR: "REG", DSISR: "REG"\n", regs->dar, regs->dsisr);
#endif
printk("TASK = %p[%d] '%s' THREAD: %p",
current, current->pid, current->comm, task_thread_info(current));

Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/prom_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/* Max address size we deal with */
#define OF_MAX_ADDR_CELLS 4
#define OF_CHECK_COUNTS(na, ns) ((na) > 0 && (na) <= OF_MAX_ADDR_CELLS && \
(ns) >= 0)
(ns) > 0)

static struct of_bus *of_match_bus(struct device_node *np);
static int __of_address_to_resource(struct device_node *dev,
Expand Down
4 changes: 4 additions & 0 deletions arch/powerpc/kernel/setup-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,10 @@ int check_legacy_ioport(unsigned long base_port)
break;
}
np = of_find_node_by_type(NULL, "8042");
/* Pegasos has no device_type on its 8042 node, look for the
* name instead */
if (!np)
np = of_find_node_by_name(NULL, "8042");
break;
case FDC_BASE: /* FDC1 */
np = of_find_node_by_type(NULL, "fdc");
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/udbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ static int early_console_initialized;
* Called by setup_system after ppc_md->probe and ppc_md->early_init.
* Call it again after setting udbg_putc in ppc_md->setup_arch.
*/
void register_early_udbg_console(void)
void __init register_early_udbg_console(void)
{
if (early_console_initialized)
return;
Expand Down
4 changes: 2 additions & 2 deletions arch/powerpc/mm/lmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ void __init lmb_analyze(void)
static long __init lmb_add_region(struct lmb_region *rgn, unsigned long base,
unsigned long size)
{
unsigned long i, coalesced = 0;
long adjacent;
unsigned long coalesced = 0;
long adjacent, i;

/* First try and coalesce this LMB with another. */
for (i=0; i < rgn->cnt; i++) {
Expand Down
3 changes: 2 additions & 1 deletion arch/powerpc/platforms/cell/spufs/context.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ struct spu_context *alloc_spu_context(struct spu_gang *gang)
INIT_LIST_HEAD(&ctx->aff_list);
if (gang)
spu_gang_add_ctx(gang, ctx);
ctx->cpus_allowed = current->cpus_allowed;

__spu_update_sched_info(ctx);
spu_set_timeslice(ctx);
ctx->stats.util_state = SPU_UTIL_IDLE_LOADED;

Expand Down
4 changes: 4 additions & 0 deletions arch/powerpc/platforms/cell/spufs/run.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event)
spu_acquire(ctx);
if (ctx->state == SPU_STATE_SAVED) {
__spu_update_sched_info(ctx);
spu_set_timeslice(ctx);

ret = spu_activate(ctx, 0);
if (ret) {
Expand All @@ -322,6 +323,9 @@ long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event)
/*
* We have to update the scheduling priority under active_mutex
* to protect against find_victim().
*
* No need to update the timeslice ASAP, it will get updated
* once the current one has expired.
*/
spu_update_sched_info(ctx);
}
Expand Down
4 changes: 0 additions & 4 deletions arch/powerpc/platforms/cell/spufs/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -927,10 +927,6 @@ int __init spu_sched_init(void)
INIT_LIST_HEAD(&spu_prio->runq[i]);
__clear_bit(i, spu_prio->bitmap);
}
for (i = 0; i < MAX_NUMNODES; i++) {
mutex_init(&cbe_spu_info[i].list_mutex);
INIT_LIST_HEAD(&cbe_spu_info[i].spus);
}
spin_lock_init(&spu_prio->runq_lock);

setup_timer(&spusched_timer, spusched_wake, 0);
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/iseries/lpevents.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ static int set_spread_lpevents(char *str)
}
__setup("spread_lpevents=", set_spread_lpevents);

void setup_hvlpevent_queue(void)
void __init setup_hvlpevent_queue(void)
{
void *eventStack;

Expand Down
3 changes: 3 additions & 0 deletions arch/powerpc/platforms/maple/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,9 @@ static int __init maple_add_bridge(struct device_node *dev)
/* Fixup "bus-range" OF property */
fixup_bus_range(dev);

/* Check for legacy IOs */
isa_bridge_find_early(hose);

return 0;
}

Expand Down
Loading

0 comments on commit 9f5577d

Please sign in to comment.