Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 81256
b: refs/heads/master
c: f0d4577
h: refs/heads/master
v: v3
  • Loading branch information
Olof Johansson committed Jan 2, 2008
1 parent 9e16bce commit 600b10f
Show file tree
Hide file tree
Showing 65 changed files with 298 additions and 622 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: 0173d422aa32fa1e5141f1759202b955215c1da2
refs/heads/master: f0d4577c4d19f439b8f05e2c540519343e6f71e1
1 change: 0 additions & 1 deletion trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,6 @@ and is between 256 and 4096 characters. It is defined in the file
See Documentation/isdn/README.HiSax.

hugepages= [HW,X86-32,IA-64] Maximal number of HugeTLB pages.
hugepagesz= [HW,IA-64,PPC] The size of the HugeTLB pages.

i8042.direct [HW] Put keyboard port into non-translated mode
i8042.dumbkbd [HW] Pretend that controller can only read data from
Expand Down
67 changes: 29 additions & 38 deletions trunk/Documentation/powerpc/booting-without-of.txt
Original file line number Diff line number Diff line change
Expand Up @@ -671,10 +671,10 @@ device or bus to be described by the device tree.

In general, the format of an address for a device is defined by the
parent bus type, based on the #address-cells and #size-cells
properties. Note that the parent's parent definitions of #address-cells
and #size-cells are not inhereted so every node with children must specify
them. The kernel requires the root node to have those properties defining
addresses format for devices directly mapped on the processor bus.
property. In the absence of such a property, the parent's parent
values are used, etc... The kernel requires the root node to have
those properties defining addresses format for devices directly mapped
on the processor bus.

Those 2 properties define 'cells' for representing an address and a
size. A "cell" is a 32-bit number. For example, if both contain 2
Expand Down Expand Up @@ -2091,7 +2091,8 @@ platforms are moved over to use the flattened-device-tree model.

Example:
localbus@f0010100 {
compatible = "fsl,mpc8272-localbus",
compatible = "fsl,mpc8272ads-localbus",
"fsl,mpc8272-localbus",
"fsl,pq2-localbus";
#address-cells = <2>;
#size-cells = <1>;
Expand Down Expand Up @@ -2291,7 +2292,7 @@ platforms are moved over to use the flattened-device-tree model.
properties of the device node. In general, device nodes for IP-cores
will take the following form:

(name): (generic-name)@(base-address) {
(name)@(base-address) {
compatible = "xlnx,(ip-core-name)-(HW_VER)"
[, (list of compatible devices), ...];
reg = <(baseaddr) (size)>;
Expand All @@ -2301,9 +2302,6 @@ platforms are moved over to use the flattened-device-tree model.
xlnx,(parameter2) = <(int-value)>;
};

(generic-name): an open firmware-style name that describes the
generic class of device. Preferably, this is one word, such
as 'serial' or 'ethernet'.
(ip-core-name): the name of the ip block (given after the BEGIN
directive in system.mhs). Should be in lowercase
and all underscores '_' converted to dashes '-'.
Expand All @@ -2312,9 +2310,9 @@ platforms are moved over to use the flattened-device-tree model.
dropped from the parameter name, the name is converted
to lowercase and all underscore '_' characters are
converted to dashes '-'.
(baseaddr): the baseaddr parameter value (often named C_BASEADDR).
(baseaddr): the C_BASEADDR parameter.
(HW_VER): from the HW_VER parameter.
(size): the address range size (often C_HIGHADDR - C_BASEADDR + 1).
(size): equals C_HIGHADDR - C_BASEADDR + 1

Typically, the compatible list will include the exact IP core version
followed by an older IP core version which implements the same
Expand Down Expand Up @@ -2344,11 +2342,11 @@ platforms are moved over to use the flattened-device-tree model.

becomes the following device tree node:

opb_uartlite_0: serial@ec100000 {
opb-uartlite-0@ec100000 {
device_type = "serial";
compatible = "xlnx,opb-uartlite-1.00.b";
reg = <ec100000 10000>;
interrupt-parent = <&opb_intc_0>;
interrupt-parent = <&opb-intc>;
interrupts = <1 0>; // got this from the opb_intc parameters
current-speed = <d#115200>; // standard serial device prop
clock-frequency = <d#50000000>; // standard serial device prop
Expand All @@ -2357,19 +2355,16 @@ platforms are moved over to use the flattened-device-tree model.
xlnx,use-parity = <0>;
};

Some IP cores actually implement 2 or more logical devices. In
this case, the device should still describe the whole IP core with
a single node and add a child node for each logical device. The
ranges property can be used to translate from parent IP-core to the
registers of each device. In addition, the parent node should be
compatible with the bus type 'xlnx,compound', and should contain
#address-cells and #size-cells, as with any other bus. (Note: this
makes the assumption that both logical devices have the same bus
binding. If this is not true, then separate nodes should be used
for each logical device). The 'cell-index' property can be used to
enumerate logical devices within an IP core. For example, the
following is the system.mhs entry for the dual ps2 controller found
on the ml403 reference design.
Some IP cores actually implement 2 or more logical devices. In this case,
the device should still describe the whole IP core with a single node
and add a child node for each logical device. The ranges property can
be used to translate from parent IP-core to the registers of each device.
(Note: this makes the assumption that both logical devices have the same
bus binding. If this is not true, then separate nodes should be used for
each logical device). The 'cell-index' property can be used to enumerate
logical devices within an IP core. For example, the following is the
system.mhs entry for the dual ps2 controller found on the ml403 reference
design.

BEGIN opb_ps2_dual_ref
PARAMETER INSTANCE = opb_ps2_dual_ref_0
Expand All @@ -2391,24 +2386,21 @@ platforms are moved over to use the flattened-device-tree model.

It would result in the following device tree nodes:

opb_ps2_dual_ref_0: opb-ps2-dual-ref@a9000000 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "xlnx,compound";
opb_ps2_dual_ref_0@a9000000 {
ranges = <0 a9000000 2000>;
// If this device had extra parameters, then they would
// go here.
ps2@0 {
compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
reg = <0 40>;
interrupt-parent = <&opb_intc_0>;
interrupt-parent = <&opb-intc>;
interrupts = <3 0>;
cell-index = <0>;
};
ps2@1000 {
compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
reg = <1000 40>;
interrupt-parent = <&opb_intc_0>;
interrupt-parent = <&opb-intc>;
interrupts = <3 0>;
cell-index = <0>;
};
Expand Down Expand Up @@ -2471,30 +2463,29 @@ platforms are moved over to use the flattened-device-tree model.

Gives this device tree (some properties removed for clarity):

plb@0 {
plb-v34-0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "xlnx,plb-v34-1.02.a";
device_type = "ibm,plb";
ranges; // 1:1 translation

plb_bram_if_cntrl_0: bram@ffff0000 {
plb-bram-if-cntrl-0@ffff0000 {
reg = <ffff0000 10000>;
}

opb@20000000 {
opb-v20-0 {
#address-cells = <1>;
#size-cells = <1>;
ranges = <20000000 20000000 20000000
60000000 60000000 20000000
80000000 80000000 40000000
c0000000 c0000000 20000000>;

opb_uart16550_0: serial@a0000000 {
opb-uart16550-0@a0000000 {
reg = <a00000000 2000>;
};

opb_intc_0: interrupt-controller@d1000fc0 {
opb-intc-0@d1000fc0 {
reg = <d1000fc0 20>;
};
};
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/powerpc/boot/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
addnote
dtc
empty.c
hack-coff
infblock.c
Expand Down
81 changes: 7 additions & 74 deletions trunk/arch/powerpc/boot/4xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,45 +499,20 @@ void ibm405gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk)
u32 pllmr = mfdcr(DCRN_CPC0_PLLMR);
u32 cpc0_cr0 = mfdcr(DCRN_405_CPC0_CR0);
u32 cpc0_cr1 = mfdcr(DCRN_405_CPC0_CR1);
u32 psr = mfdcr(DCRN_405_CPC0_PSR);
u32 cpu, plb, opb, ebc, tb, uart0, uart1, m;
u32 fwdv, fwdvb, fbdv, cbdv, opdv, epdv, ppdv, udiv;
u32 fwdv, fbdv, cbdv, opdv, epdv, udiv;

fwdv = (8 - ((pllmr & 0xe0000000) >> 29));
fbdv = (pllmr & 0x1e000000) >> 25;
if (fbdv == 0)
fbdv = 16;
cbdv = ((pllmr & 0x00060000) >> 17) + 1; /* CPU:PLB */
opdv = ((pllmr & 0x00018000) >> 15) + 1; /* PLB:OPB */
ppdv = ((pllmr & 0x00001800) >> 13) + 1; /* PLB:PCI */
epdv = ((pllmr & 0x00001800) >> 11) + 2; /* PLB:EBC */
cbdv = ((pllmr & 0x00060000) >> 17) + 1;
opdv = ((pllmr & 0x00018000) >> 15) + 1;
epdv = ((pllmr & 0x00001800) >> 13) + 2;
udiv = ((cpc0_cr0 & 0x3e) >> 1) + 1;

/* check for 405GPr */
if ((mfpvr() & 0xfffffff0) == (0x50910951 & 0xfffffff0)) {
fwdvb = 8 - (pllmr & 0x00000007);
if (!(psr & 0x00001000)) /* PCI async mode enable == 0 */
if (psr & 0x00000020) /* New mode enable */
m = fwdvb * 2 * ppdv;
else
m = fwdvb * cbdv * ppdv;
else if (psr & 0x00000020) /* New mode enable */
if (psr & 0x00000800) /* PerClk synch mode */
m = fwdvb * 2 * epdv;
else
m = fbdv * fwdv;
else if (epdv == fbdv)
m = fbdv * cbdv * epdv;
else
m = fbdv * fwdvb * cbdv;
m = fwdv * fbdv * cbdv;

cpu = sys_clk * m / fwdv;
plb = sys_clk * m / (fwdvb * cbdv);
} else {
m = fwdv * fbdv * cbdv;
cpu = sys_clk * m / fwdv;
plb = cpu / cbdv;
}
cpu = sys_clk * m / fwdv;
plb = cpu / cbdv;
opb = plb / opdv;
ebc = plb / epdv;

Expand Down Expand Up @@ -566,45 +541,3 @@ void ibm405gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk)
dt_fixup_clock("/plb/opb/serial@ef600400", uart1);
}


void ibm405ep_fixup_clocks(unsigned int sys_clk)
{
u32 pllmr0 = mfdcr(DCRN_CPC0_PLLMR0);
u32 pllmr1 = mfdcr(DCRN_CPC0_PLLMR1);
u32 cpc0_ucr = mfdcr(DCRN_CPC0_UCR);
u32 cpu, plb, opb, ebc, uart0, uart1;
u32 fwdva, fwdvb, fbdv, cbdv, opdv, epdv;
u32 pllmr0_ccdv, tb, m;

fwdva = 8 - ((pllmr1 & 0x00070000) >> 16);
fwdvb = 8 - ((pllmr1 & 0x00007000) >> 12);
fbdv = (pllmr1 & 0x00f00000) >> 20;
if (fbdv == 0)
fbdv = 16;

cbdv = ((pllmr0 & 0x00030000) >> 16) + 1; /* CPU:PLB */
epdv = ((pllmr0 & 0x00000300) >> 8) + 2; /* PLB:EBC */
opdv = ((pllmr0 & 0x00003000) >> 12) + 1; /* PLB:OPB */

m = fbdv * fwdvb;

pllmr0_ccdv = ((pllmr0 & 0x00300000) >> 20) + 1;
if (pllmr1 & 0x80000000)
cpu = sys_clk * m / (fwdva * pllmr0_ccdv);
else
cpu = sys_clk / pllmr0_ccdv;

plb = cpu / cbdv;
opb = plb / opdv;
ebc = plb / epdv;
tb = cpu;
uart0 = cpu / (cpc0_ucr & 0x0000007f);
uart1 = cpu / ((cpc0_ucr & 0x00007f00) >> 8);

dt_fixup_cpu_clocks(cpu, tb, 0);
dt_fixup_clock("/plb", plb);
dt_fixup_clock("/plb/opb", opb);
dt_fixup_clock("/plb/ebc", ebc);
dt_fixup_clock("/plb/opb/serial@ef600300", uart0);
dt_fixup_clock("/plb/opb/serial@ef600400", uart1);
}
1 change: 0 additions & 1 deletion trunk/arch/powerpc/boot/4xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ void ibm4xx_quiesce_eth(u32 *emac0, u32 *emac1);
void ibm4xx_fixup_ebc_ranges(const char *ebc);

void ibm405gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk);
void ibm405ep_fixup_clocks(unsigned int sys_clk);
void ibm440gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk);
void ibm440ep_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk,
unsigned int tmr_clk);
Expand Down
5 changes: 0 additions & 5 deletions trunk/arch/powerpc/boot/dcr.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,7 @@ static const unsigned long sdram_bxcr[] = { SDRAM0_B0CR, SDRAM0_B1CR,
#define DCRN_CPC0_PLLMR 0xb0
#define DCRN_405_CPC0_CR0 0xb1
#define DCRN_405_CPC0_CR1 0xb2
#define DCRN_405_CPC0_PSR 0xb4

/* 405EP Clocking/Power Management/Chip Control regs */
#define DCRN_CPC0_PLLMR0 0xf0
#define DCRN_CPC0_PLLMR1 0xf4
#define DCRN_CPC0_UCR 0xf5

/* 440GX Clock control etc */

Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/powerpc/boot/dtc-src/.gitignore

This file was deleted.

3 changes: 1 addition & 2 deletions trunk/arch/powerpc/boot/serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ int serial_console_init(void)
rc = cpm_console_init(devp, &serial_cd);
else if (dt_is_compatible(devp, "mpc5200-psc-uart"))
rc = mpc5200_psc_console_init(devp, &serial_cd);
else if (dt_is_compatible(devp, "xlnx,opb-uartlite-1.00.b") ||
dt_is_compatible(devp, "xlnx,xps-uartlite-1.00.a"))
else if (dt_is_compatible(devp, "xilinx,uartlite"))
rc = uartlite_console_init(devp, &serial_cd);

/* Add other serial console driver calls here */
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/powerpc/configs/bamboo_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,9 @@ CONFIG_MISC_DEVICES=y
# CONFIG_FIREWIRE is not set
# CONFIG_IEEE1394 is not set
# CONFIG_I2O is not set
# CONFIG_MACINTOSH_DRIVERS is not set
CONFIG_MACINTOSH_DRIVERS=y
# CONFIG_MAC_EMUMOUSEBTN is not set
# CONFIG_WINDFARM is not set
CONFIG_NETDEVICES=y
# CONFIG_NETDEVICES_MULTIQUEUE is not set
# CONFIG_DUMMY is not set
Expand Down
23 changes: 2 additions & 21 deletions trunk/arch/powerpc/configs/kilauea_defconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.24-rc6
# Thu Jan 3 14:21:31 2008
# Mon Dec 24 11:18:12 2007
#
# CONFIG_PPC64 is not set

Expand Down Expand Up @@ -453,28 +453,9 @@ CONFIG_NETDEVICES=y
# CONFIG_VETH is not set
# CONFIG_IP1000 is not set
# CONFIG_ARCNET is not set
# CONFIG_PHYLIB is not set
CONFIG_NET_ETHERNET=y
# CONFIG_MII is not set
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_CASSINI is not set
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_NET_TULIP is not set
# CONFIG_HP100 is not set
CONFIG_IBM_NEW_EMAC=y
CONFIG_IBM_NEW_EMAC_RXB=256
CONFIG_IBM_NEW_EMAC_TXB=256
CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
# CONFIG_IBM_NEW_EMAC_DEBUG is not set
# CONFIG_IBM_NEW_EMAC_ZMII is not set
# CONFIG_NET_ETHERNET is not set
CONFIG_IBM_NEW_EMAC_RGMII=y
# CONFIG_IBM_NEW_EMAC_TAH is not set
CONFIG_IBM_NEW_EMAC_EMAC4=y
# CONFIG_NET_PCI is not set
# CONFIG_B44 is not set
# CONFIG_NETDEV_1000 is not set
# CONFIG_NETDEV_10000 is not set
# CONFIG_TR is not set
Expand Down
Loading

0 comments on commit 600b10f

Please sign in to comment.