-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'for-2.6.25' of git://git.secretlab.ca/git/linux-2.6-mpc…
…52xx into for-2.6.25
- Loading branch information
Showing
12 changed files
with
694 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
/* | ||
* MPC5121E MDS Device Tree Source | ||
* | ||
* Copyright 2007 Freescale Semiconductor Inc. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the | ||
* Free Software Foundation; either version 2 of the License, or (at your | ||
* option) any later version. | ||
*/ | ||
|
||
/dts-v1/; | ||
|
||
/ { | ||
model = "mpc5121ads"; | ||
compatible = "fsl,mpc5121ads"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
cpus { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
PowerPC,5121@0 { | ||
device_type = "cpu"; | ||
reg = <0>; | ||
d-cache-line-size = <0x20>; // 32 bytes | ||
i-cache-line-size = <0x20>; // 32 bytes | ||
d-cache-size = <0x8000>; // L1, 32K | ||
i-cache-size = <0x8000>; // L1, 32K | ||
timebase-frequency = <49500000>;// 49.5 MHz (csb/4) | ||
bus-frequency = <198000000>; // 198 MHz csb bus | ||
clock-frequency = <396000000>; // 396 MHz ppc core | ||
}; | ||
}; | ||
|
||
memory { | ||
device_type = "memory"; | ||
reg = <0x00000000 0x10000000>; // 256MB at 0 | ||
}; | ||
|
||
localbus@80000020 { | ||
compatible = "fsl,mpc5121ads-localbus"; | ||
#address-cells = <2>; | ||
#size-cells = <1>; | ||
reg = <0x80000020 0x40>; | ||
|
||
ranges = <0x0 0x0 0xfc000000 0x04000000 | ||
0x2 0x0 0x82000000 0x00008000>; | ||
|
||
flash@0,0 { | ||
compatible = "cfi-flash"; | ||
reg = <0 0x0 0x4000000>; | ||
bank-width = <4>; | ||
device-width = <1>; | ||
}; | ||
|
||
board-control@2,0 { | ||
compatible = "fsl,mpc5121ads-cpld"; | ||
reg = <0x2 0x0 0x8000>; | ||
}; | ||
}; | ||
|
||
soc@80000000 { | ||
compatible = "fsl,mpc5121-immr"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
#interrupt-cells = <2>; | ||
ranges = <0x0 0x80000000 0x400000>; | ||
reg = <0x80000000 0x400000>; | ||
bus-frequency = <66000000>; // 66 MHz ips bus | ||
|
||
|
||
// IPIC | ||
// interrupts cell = <intr #, sense> | ||
// sense values match linux IORESOURCE_IRQ_* defines: | ||
// sense == 8: Level, low assertion | ||
// sense == 2: Edge, high-to-low change | ||
// | ||
ipic: interrupt-controller@c00 { | ||
compatible = "fsl,mpc5121-ipic", "fsl,ipic"; | ||
interrupt-controller; | ||
#address-cells = <0>; | ||
#interrupt-cells = <2>; | ||
reg = <0xc00 0x100>; | ||
}; | ||
|
||
// 512x PSCs are not 52xx PSCs compatible | ||
// PSC3 serial port A aka ttyPSC0 | ||
serial@11300 { | ||
device_type = "serial"; | ||
compatible = "fsl,mpc5121-psc-uart"; | ||
// Logical port assignment needed until driver | ||
// learns to use aliases | ||
port-number = <0>; | ||
cell-index = <3>; | ||
reg = <0x11300 0x100>; | ||
interrupts = <0x28 0x8>; // actually the fifo irq | ||
interrupt-parent = < &ipic >; | ||
}; | ||
|
||
// PSC4 serial port B aka ttyPSC1 | ||
serial@11400 { | ||
device_type = "serial"; | ||
compatible = "fsl,mpc5121-psc-uart"; | ||
// Logical port assignment needed until driver | ||
// learns to use aliases | ||
port-number = <1>; | ||
cell-index = <4>; | ||
reg = <0x11400 0x100>; | ||
interrupts = <0x28 0x8>; // actually the fifo irq | ||
interrupt-parent = < &ipic >; | ||
}; | ||
|
||
pscsfifo@11f00 { | ||
compatible = "fsl,mpc5121-psc-fifo"; | ||
reg = <0x11f00 0x100>; | ||
interrupts = <0x28 0x8>; | ||
interrupt-parent = < &ipic >; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
config PPC_MPC512x | ||
bool | ||
select FSL_SOC | ||
select IPIC | ||
default n | ||
|
||
config PPC_MPC5121 | ||
bool | ||
select PPC_MPC512x | ||
default n | ||
|
||
config MPC5121_ADS | ||
bool "Freescale MPC5121E ADS" | ||
depends on PPC_MULTIPLATFORM && PPC32 | ||
select DEFAULT_UIMAGE | ||
select WANT_DEVICE_TREE | ||
select PPC_MPC5121 | ||
help | ||
This option enables support for the MPC5121E ADS board. | ||
default n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# | ||
# Makefile for the Freescale PowerPC 512x linux kernel. | ||
# | ||
obj-$(CONFIG_MPC5121_ADS) += mpc5121_ads.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
/* | ||
* Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved. | ||
* | ||
* Author: John Rigby, <jrigby@freescale.com>, Thur Mar 29 2007 | ||
* | ||
* Description: | ||
* MPC5121 ADS board setup | ||
* | ||
* This is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
*/ | ||
|
||
#include <linux/kernel.h> | ||
#include <linux/io.h> | ||
#include <linux/irq.h> | ||
#include <linux/of_platform.h> | ||
|
||
#include <asm/machdep.h> | ||
#include <asm/ipic.h> | ||
#include <asm/prom.h> | ||
#include <asm/time.h> | ||
|
||
/** | ||
* mpc512x_find_ips_freq - Find the IPS bus frequency for a device | ||
* @node: device node | ||
* | ||
* Returns IPS bus frequency, or 0 if the bus frequency cannot be found. | ||
*/ | ||
unsigned long | ||
mpc512x_find_ips_freq(struct device_node *node) | ||
{ | ||
struct device_node *np; | ||
const unsigned int *p_ips_freq = NULL; | ||
|
||
of_node_get(node); | ||
while (node) { | ||
p_ips_freq = of_get_property(node, "bus-frequency", NULL); | ||
if (p_ips_freq) | ||
break; | ||
|
||
np = of_get_parent(node); | ||
of_node_put(node); | ||
node = np; | ||
} | ||
if (node) | ||
of_node_put(node); | ||
|
||
return p_ips_freq ? *p_ips_freq : 0; | ||
} | ||
EXPORT_SYMBOL(mpc512x_find_ips_freq); | ||
|
||
static struct of_device_id __initdata of_bus_ids[] = { | ||
{ .name = "soc", }, | ||
{ .name = "localbus", }, | ||
{}, | ||
}; | ||
|
||
static void __init mpc5121_ads_declare_of_platform_devices(void) | ||
{ | ||
/* Find every child of the SOC node and add it to of_platform */ | ||
if (of_platform_bus_probe(NULL, of_bus_ids, NULL)) | ||
printk(KERN_ERR __FILE__ ": " | ||
"Error while probing of_platform bus\n"); | ||
} | ||
|
||
static void __init mpc5121_ads_init_IRQ(void) | ||
{ | ||
struct device_node *np; | ||
|
||
np = of_find_compatible_node(NULL, NULL, "fsl,ipic"); | ||
if (!np) | ||
return; | ||
|
||
ipic_init(np, 0); | ||
of_node_put(np); | ||
|
||
/* | ||
* Initialize the default interrupt mapping priorities, | ||
* in case the boot rom changed something on us. | ||
*/ | ||
ipic_set_default_priority(); | ||
} | ||
|
||
/* | ||
* Called very early, MMU is off, device-tree isn't unflattened | ||
*/ | ||
static int __init mpc5121_ads_probe(void) | ||
{ | ||
unsigned long root = of_get_flat_dt_root(); | ||
|
||
return of_flat_dt_is_compatible(root, "fsl,mpc5121ads"); | ||
} | ||
|
||
define_machine(mpc5121_ads) { | ||
.name = "MPC5121 ADS", | ||
.probe = mpc5121_ads_probe, | ||
.init = mpc5121_ads_declare_of_platform_devices, | ||
.init_IRQ = mpc5121_ads_init_IRQ, | ||
.get_irq = ipic_get_irq, | ||
.calibrate_decr = generic_calibrate_decr, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.