* Re: new IRQ work status
From: Arnd Bergmann @ 2006-06-29 13:25 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <1151570165.28229.15.camel@localhost.localdomain>
On Thursday 29 June 2006 10:36, Benjamin Herrenschmidt wrote:
> http://gate.crashing.org/~benh/irq-WIP/
>
> Comments welcome.
>
Looks great!
> -}
> -
> /* Get an IRQ number from the pending state register of the IIC */
> -int iic_get_irq(struct pt_regs *regs)
> +unsigned int iic_get_irq(struct pt_regs *regs)
Is unsigned the right thing here? NO_IRQ is defined as (-1).
> +
> +/*
> + * Hardcoded setup part to be compatible with older firmware. We don't
> + * associate a device-node to the hosts in this case, which mean that
> + * no mapping from the device-tree is supposed. That's ok as there is
> + * none anyway
> + */
> static int __init setup_iic_hardcoded(void)
> {
I'd prefer to throw out the hardcoded part from the official tree
completely. It's only needed on the very first FW versions that
were shipped and those need some other patches that we never merged
upstream anyway. So better move it to an extra patch that we keep
external for some time and eventually drop.
> static irqreturn_t iic_ipi_action(int irq, void *dev_id, struct pt_regs
> *regs) {
> - smp_message_recv(iic_irq_to_ipi(irq), regs);
> + int ipi = (int)(long)dev_id;
> + smp_message_recv(ipi, regs);
> return IRQ_HANDLED;
> }
Nice one. this looks a lot cleaner than looking at the irq number here.
> static void iic_request_ipi(int ipi, const char *name)
> {
> - int irq;
> -
> - irq = iic_ipi_to_irq(ipi);
> + int node, virq;
>
> - /* IPIs are marked SA_INTERRUPT as they must run with irqs
> - * disabled */
> - set_irq_chip_and_handler(irq, &iic_chip, handle_percpu_irq);
> - request_irq(irq, iic_ipi_action, SA_INTERRUPT, name, NULL);
> + for (node = 0; node < IIC_NODE_COUNT; node++) {
> + char *rname;
> + if (iic_hosts[node] == NULL)
> + continue;
> + virq = irq_create_mapping(iic_hosts[node],
> + iic_ipi_to_irq(ipi), 0);
> +
> + if (virq == NO_IRQ) {
> + printk(KERN_ERR
> + "iic: failed to map IPI %s on node %d\n",
> + name, node);
> + continue;
> + }
> + rname = kzalloc(strlen(name) + 16, GFP_KERNEL);
> + if (rname)
> + sprintf(rname, "%s node %d", name, node);
> + else
> + rname = (char *)name;
Considering that name is know to be rather short and we have a fixed
number of these, can't we just put the strings into struct iic
instead of doing the kzalloc?
> enum {
> - IIC_EXT_OFFSET = 0x00, /* Start of south bridge IRQs */
> - IIC_EXT_CASCADE = 0x20, /* There is no interrupt 32 on spider */
> - IIC_NUM_EXT = 0x40, /* Number of south bridge IRQs */
> - IIC_SPE_OFFSET = 0x40, /* Start of SPE interrupts */
> - IIC_CLASS_STRIDE = 0x10, /* SPE IRQs per class */
> - IIC_IPI_OFFSET = 0x70, /* Start of IPI IRQs */
> - IIC_NUM_IPIS = 0x10, /* IRQs reserved for IPI */
> - IIC_NODE_STRIDE = 0x80, /* Total IRQs per node */
> + IIC_IRQ_INVALID = 0xff,
Where is IIC_IRQ_INVALID used?
> + }
> + } else if (device_is_compatible(dn, "sti,platform-spider-pic")
> + && (chip < 2)) {
> + static long hard_coded_pics[] =
> + { 0x24000008000, 0x34000008000 };
> + r.start = hard_coded_pics[chip];
> } else
See above about the hardcoded stuff.
> @@ -664,11 +688,18 @@ static int __init create_spu(struct devi
> if (ret)
> goto out_free;
>
> + /* XXX FIXME: Those node vs. nid things are crap, we need
> + * only one information, but fixing that goes along with fixing
> + * all of the node vs chip vs thread code all over the cell
> + * platform. To do soon hopefully...
> + */
> spu->node = find_spu_node_id(spe);
> spu->nid = of_node_to_nid(spe);
> if (spu->nid == -1)
> spu->nid = 0;
The idea at some point was to keep the notion of nid (as in address
on the inter-chip protocol) separate from the NUMA node ID, which
may in theory be less fine-grained. Defining them to be the same
at least requires the device tree to be very careful with the numbers
in ibm,associativity properties to match the bus numbers.
> Index: linux-work-mm/include/asm-powerpc/spu.h
> ===================================================================
> --- linux-work-mm.orig/include/asm-powerpc/spu.h 2006-06-23
> 13:38:19.000000000 +1000 +++
> linux-work-mm/include/asm-powerpc/spu.h 2006-06-29 16:32:35.000000000 +1000
> @@ -117,7 +117,7 @@ struct spu {
> struct list_head sched_list;
> int number;
> int nid;
> - u32 isrc;
> + unsigned int irqs[3];
> u32 node;
> u64 flags;
> u64 dar;
We've started exporting the isrc property in sysfs recently, so I think
we need to keep that in here.
Arnd <><
^ permalink raw reply
* [PATCH] Add QE device tree definition
From: Li Yang-r58472 @ 2006-06-29 12:53 UTC (permalink / raw)
To: linuxppc-dev
This is the device tree definition for QE SOC for Freescale CPUs.
I have discussed with Vitaly. We agreed on having CPM and QE definition ultimately merged. He will add in CPM specified definition later.
Signed-off-by: Jiang Bo <Tanya.jiang@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
---
Documentation/powerpc/booting-without-of.txt | 222 ++++++++++++++++++++++++++
1 files changed, 222 insertions(+), 0 deletions(-)
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
index 217e517..096063f 100644
--- a/Documentation/powerpc/booting-without-of.txt
+++ b/Documentation/powerpc/booting-without-of.txt
@@ -1442,6 +1442,227 @@ platforms are moved over to use the flat
};
+ h) Freescale QUICC Engine module (QE)
+ This represents qe module that is installed on PowerQUICC II Pro.
+ Hopefully it will merge backward compatibility with CPM/CPM2.
+ Basically, it is a bus of devices, that could act more or less
+ as a complete entity (UCC, USB etc ). All of them should be siblings on
+ the "root" qe node, using the common properties from there.
+ The description below applies to the the qe of MPC8360 and
+ more nodes and properties would be extended in the future.
+
+ 1) Root QE device
+
+ Required properties:
+ - device_type : should be "qe";
+ - model : precise model of the QE, Can be "QE", "CPM", or "CPM2"
+ - reg : Offset and length of the register set for the device.
+ - bus-frequency : the clock frequency for QUICC Engine.
+
+ Recommended properties
+ - brg-frequency : the internal clock source frequency for baud-rate
+ generators in Hz.
+
+ Example:
+ qe@e0100000 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ #interrupt-cells = <2>;
+ device_type = "qe";
+ model = "QE";
+ ranges = <0 e0100000 00100000>;
+ reg = <e0100000 480>;
+ brg-frequency = <0>;
+ bus-frequency = <179A7B00>;
+ }
+
+
+ 2) SPI (Serial Peripheral Interface)
+
+ Required properties:
+ - device_type : should be "spi".
+ - compatible : should be "fsl_spi".
+ - mode : the spi operation mode, it can be "cpu" or "qe".
+ - reg : offset to the register set and its length.
+ - interrupts : <a b> where a is the interrupt number and b is a
+ field that represents an encoding of the sense and level
+ information for the interrupt. This should be encoded based on
+ the information in section 2) depending on the type of interrupt
+ controller you have.
+ - interrupt-parent : the phandle for the interrupt controller that
+ services interrupts for this device.
+
+ Example:
+ spi@4c0 {
+ device_type = "spi";
+ compatible = "fsl_spi";
+ reg = <4c0 40>;
+ interrupts = <82 0>;
+ interrupt-parent = <700>;
+ mode = "cpu";
+ };
+
+
+ 3) USB (Universal Serial Bus Controller)
+
+ Required properties:
+ - device_type : should be "usb".
+ - compatible : could be "qe_udc" or "fhci-hcd".
+ - model : the could be "host" or "slave".
+ - reg : there will be two tuples of "address size". The first tuple is
+ offset and length of the device registers respectively; the second is
+ offset and length of the device parameter RAM respectively.
+ - interrupts : <a b> where a is the interrupt number and b is a
+ field that represents an encoding of the sense and level
+ information for the interrupt. This should be encoded based on
+ the information in section 2) depending on the type of interrupt
+ controller you have.
+ - interrupt-parent : the phandle for the interrupt controller that
+ services interrupts for this device.
+
+ Example(slave):
+ usb@6c0 {
+ device_type = "usb";
+ compatible = "qe_udc";
+ reg = <6c0 40 8B00 100>;
+ interrupts = <8b 0>;
+ interrupt-parent = <700>;
+ mode = "slave";
+ };
+
+
+ 4) UCC (Unified Communications Controllers)
+
+ Required properties:
+ - device_type : should be "network", "hldc", "uart", "transparent"
+ "bisync" or "atm".
+ - compatible : could be "ucc_geth" or "fsl_atm" and so on.
+ - model : should be "UCC".
+ - device-id : the ucc number(1-8), corresponding to UCCx in UM.
+ - reg : there will be two tuples of "address size". The first tuple is
+ offset and length of the device registers respectively; the second is
+ offset and length of the device parameter RAM respectively.
+ - interrupts : <a b> where a is the interrupt number and b is a
+ field that represents an encoding of the sense and level
+ information for the interrupt. This should be encoded based on
+ the information in section 2) depending on the type of interrupt
+ controller you have.
+ - interrupt-parent : the phandle for the interrupt controller that
+ services interrupts for this device.
+ - pio-handle : The phandle for the Parallel I/O port configuration.
+
+ Required properties for network device_type:
+ - mac-address : list of bytes representing the ethernet address.
+ - rx-clock : a string represents the UCC receive clock source.
+ "brgx" : clock source is BRG1~BRG16 respectively;
+ "clkx" : clock source is QE_CLK1~QE_CLK24 respectively.
+ others : clock source is disabled;
+ - tx-clock: a string represents the UCC transmit clock source;
+ "brgx" : clock source is BRG1~BRG16 respectively;
+ "clkx" : clock source is QE_CLK1~QE_CLK24 respectively.
+ others : clock source is disabled;
+ - phy-handle : The phandle for the PHY connected to this controller.
+
+ Example:
+ ucc@2000 {
+ device_type = "network";
+ compatible = "ucc_geth";
+ model = "UCC";
+ device-id = <1>;
+ reg = <2000 200 8400 100>;
+ interrupts = <a0 0>;
+ interrupt-parent = <700>;
+ mac-address = [ 00 04 9f 00 23 23 ];
+ rx-clock = "none";
+ tx-clock = "clk9";
+ phy-handle = <212000>;
+ pio-handle = <140001>;
+ };
+
+
+ 5) Parallel I/O Ports
+
+ This node configures Parallel I/O ports for CPUs with QE support.
+ The node should reside in the "soc" node of the tree. For each
+ device that using parallel I/O ports, a child node should be created.
+ See the definition of the Pin configuration nodes below for more
+ information.
+
+ Required properties:
+ - device_type : should be "par_io".
+ - reg : offset to the register set and its length.
+
+ Example:
+ par_io@1400 {
+ reg = <1400 100>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ device_type = "par_io";
+ ucc_pin@01 {
+ ......
+ };
+
+
+ 6) Pin configuration nodes
+
+ Required properties:
+ - linux,phandle : phandle of this node; likely referenced by a QE
+ device.
+ - pio-map : array of pin configurations. Each pin is defined by 6
+ integers. The six numbers are respectively: port, pin, dir,
+ open_drain, assignment, has_irq.
+ - port : port number of the pin; 0-6 represent port A-G in UM.
+ - pin : pin number in the port.
+ - dir : direction of the pin, should encode as follows:
+
+ 0 = The pin is disabled
+ 1 = The pin is an output
+ 2 = The pin is an input
+ 3 = The pin is I/O
+
+ - open_drain : indicates the pin is normal or wired-OR:
+
+ 0 = The pin is actively driven as an output
+ 1 = The pin is an open-drain driver. As an output, the pin is
+ driven active-low, otherwise it is three-stated.
+
+ - assignment : function number of the pin according to the Pin Assignment
+ tables in User Manual. Each pin can have up to 4 possible functions in
+ QE and two options for CPM.
+ - has_irq : indicates if the pin is used as source of exteral
+ interrupts.
+
+ Example:
+ ucc_pin@01 {
+ linux,phandle = <140001>;
+ pio-map = <
+ /* port pin dir open_drain assignment has_irq */
+ 0 3 1 0 1 0 /* TxD0 */
+ 0 4 1 0 1 0 /* TxD1 */
+ 0 5 1 0 1 0 /* TxD2 */
+ 0 6 1 0 1 0 /* TxD3 */
+ 1 6 1 0 3 0 /* TxD4 */
+ 1 7 1 0 1 0 /* TxD5 */
+ 1 9 1 0 2 0 /* TxD6 */
+ 1 a 1 0 2 0 /* TxD7 */
+ 0 9 2 0 1 0 /* RxD0 */
+ 0 a 2 0 1 0 /* RxD1 */
+ 0 b 2 0 1 0 /* RxD2 */
+ 0 c 2 0 1 0 /* RxD3 */
+ 0 d 2 0 1 0 /* RxD4 */
+ 1 1 2 0 2 0 /* RxD5 */
+ 1 0 2 0 2 0 /* RxD6 */
+ 1 4 2 0 2 0 /* RxD7 */
+ 0 7 1 0 1 0 /* TX_EN */
+ 0 8 1 0 1 0 /* TX_ER */
+ 0 f 2 0 1 0 /* RX_DV */
+ 0 10 2 0 1 0 /* RX_ER */
+ 0 0 2 0 1 0 /* RX_CLK */
+ 2 9 1 0 3 0 /* GTX_CLK - CLK10 */
+ 2 8 2 0 1 0>; /* GTX125 - CLK9 */
+ };
+
+
More devices will be defined as this spec matures.
^ permalink raw reply related
* Re: entry point of kernel in RAM at 0x0c--linux tree file name
From: Arun Kumar @ 2006-06-29 11:52 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: linuxppc-embedded
In-Reply-To: <200606231218.14788.laurent.pinchart@tbox.biz>
[-- Attachment #1: Type: text/plain, Size: 4062 bytes --]
Hi Laurent ,
I have made marginally more progress in my porting effort .Now I can see the
early debug text by enabling the CONFIG_SERIAL_TEXT_DEBUG and pointing the
gen550.c code to my sandpoint 8260 LSP code and UART adresses .
I have a Sandpoint 8260 LSP .However now my code crashes in mapin_ram
roputine .
Here is a dump of serial console :
loaded at: 00800000 0099A1D8
zimage at: 008057B7 0086B0E9
initrd at: 0086C000 0099645B
avail ram: 00400000 00800000
Linux/PPC load: console=ttyS0,9600 console=tty0 root=/dev/ram
Uncompressing Linux...done.
Now booting the kernel
id mach(): init
MMU:mapin
MMU:have_bats
MMU:PPC_STD_MMU
The mapin_ram code in pgtable.c is as follows :
void __init mapin_ram(void)
{
unsigned long v, s, f;
phys_addr_t p;
#ifdef HAVE_BATS
if (!__map_without_bats)
{ bat_mapin_ram(__bat2, __bat3);
ppc_md.progress("MMU:have_bats", 0x401);
}
#endif /* HAVE_BATS */
v = KERNELBASE;
p = PPC_MEMSTART;
for (s = 0; s < total_lowmem; s += PAGE_SIZE) {
/* On the MPC8xx, we want the page shared so we
* don't get ASID compares on kernel space.
*/
f = _PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_SHARED | _PAGE_HWEXEC;
#ifdef CONFIG_440
/* Prevent bogus speculative cycles */
f |= _PAGE_GUARDED;
#endif
#if defined(CONFIG_KGDB) || defined(CONFIG_XMON) ||
defined(CONFIG_BDI_SWITCH)
/* Allows stub to set breakpoints everywhere */
f |= _PAGE_WRENABLE;
ppc_md.progress("MMU:in kgdb", 0x401);
#else /* !CONFIG_KGDB && !CONFIG_XMON && !CONFIG_BDI_SWITCH */
if ((char *) v < _stext || (char *) v >= etext)
{ f |= _PAGE_WRENABLE;
ppc_md.progress("MMU:else of kgdb", 0x401);
}
#ifdef CONFIG_PPC_STD_MMU
else
/* On the powerpc (not all), no user access
forces R/W kernel access */
f |= _PAGE_USER;
ppc_md.progress("MMU:PPC_STD_MMU", 0x401);
#endif /* CONFIG_PPC_STD_MMU */
#endif /* CONFIG_KGDB || CONFIG_XMON */
map_page(v, p, f);
v += PAGE_SIZE;
p += PAGE_SIZE;
}
if (ppc_md.progress)
ppc_md.progress("MMU:mapin_ram done", 0x401);
}
This is crashing somewhere in map_page routine .
I have 64Mb in DRAM and 8 Mb of Flash .I have really no idea why my MMU_init
code is crashing .. Any help would be greatly appreciated .
Thanks,
Arun
On 6/23/06, Laurent Pinchart <laurent.pinchart@tbox.biz> wrote:
>
> Hi Arun,
>
> please keep the list posted when you reply.
>
> > Thanks for the response .I would also like to ask another query hoever
> > naive it might sound .I am using a Linux 2.4.1
>
> That's very old. Can't you upgrade to 2.6 ?
>
> > wherein my entry point
> > code at 0x0c expects at R3 ,R4,R5,R6 some parameters which I strongly
> > suspect to be residual record bi_rec *,start of initrd and end of initrd
> > sections as my kernel is crashing immediately after MMU_init and I
> > suspect that machine _init that is done prior to MMU_init expects __res
> > in R3 as a input parameter .Please confirm .
>
> Depending on your platform and boot loader, r3 to r7 are initialized with
> different values. If you're using ppcboot, the kernel expects r3 to be
> initialized with the residual record, right.
>
> > I am using ppcboot2..0.0 as my bootloader .
>
> That' very old too. You should upgrade to U-Boot.
>
> > Also I would like to know how can i enable serial console in these early
> > kernel initialsaiotns process. I am using a CONFIG_SANDPOINT(8260) on a
> > MPC 8245 platform and trying to port the code on MPC8245 platform .the
> > board has a very similar config as a SANDPOINT board .
>
> If I'm not mistaken, you can't enable a serial console that early. Do you
> have
> a hardware debugger (BDI2000) ? If not, you could try LED debugging.
>
> Best regards,
>
> Laurent Pinchart
>
--
Arun Kumar Singh
Tech Lead.
Agere India
Bangalore
[-- Attachment #2: Type: text/html, Size: 5684 bytes --]
^ permalink raw reply
* please pull powerpc.git 'master' branch
From: Paul Mackerras @ 2006-06-29 11:35 UTC (permalink / raw)
To: torvalds; +Cc: linuxppc-dev
Linus,
Please do a pull from the "master" branch of
git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc.git
to get some more powerpc updates, as listed below.
Thanks,
Paul.
arch/powerpc/Kconfig | 23 -
arch/powerpc/Kconfig.debug | 9
arch/powerpc/configs/cell_defconfig | 7
arch/powerpc/configs/mpc7448_hpc2_defconfig | 923 +++++++++++++++++++++
arch/powerpc/kernel/Makefile | 3
arch/powerpc/kernel/cpu_setup_power4.S | 14
arch/powerpc/kernel/cputable.c | 12
arch/powerpc/kernel/crash.c | 147 +++
arch/powerpc/kernel/head_64.S | 62 -
arch/powerpc/kernel/iommu.c | 30 +
arch/powerpc/kernel/legacy_serial.c | 11
arch/powerpc/kernel/lparcfg.c | 147 ++-
arch/powerpc/kernel/machine_kexec_64.c | 4
arch/powerpc/kernel/misc.S | 203 +++++
arch/powerpc/kernel/misc_32.S | 156 ----
arch/powerpc/kernel/misc_64.S | 223 -----
arch/powerpc/kernel/paca.c | 1
arch/powerpc/kernel/prom.c | 49 +
arch/powerpc/kernel/rtas.c | 119 ++-
arch/powerpc/kernel/setup_64.c | 22 -
arch/powerpc/kernel/traps.c | 27 -
arch/powerpc/kernel/udbg.c | 7
arch/powerpc/mm/hash_native_64.c | 3
arch/powerpc/mm/hash_utils_64.c | 106 +-
arch/powerpc/mm/mmu_context_64.c | 2
arch/powerpc/platforms/86xx/Kconfig | 6
arch/powerpc/platforms/86xx/Makefile | 3
arch/powerpc/platforms/86xx/mpc8641_hpcn.h | 1
arch/powerpc/platforms/86xx/mpc86xx.h | 8
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 129 +++
arch/powerpc/platforms/86xx/mpc86xx_smp.c | 10
arch/powerpc/platforms/86xx/pci.c | 137 ---
arch/powerpc/platforms/Makefile | 1
arch/powerpc/platforms/cell/Kconfig | 2
arch/powerpc/platforms/cell/setup.c | 16
arch/powerpc/platforms/cell/spu_base.c | 8
arch/powerpc/platforms/cell/spufs/file.c | 10
arch/powerpc/platforms/cell/spufs/switch.c | 6
arch/powerpc/platforms/embedded6xx/Kconfig | 15
arch/powerpc/platforms/embedded6xx/Makefile | 4
arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c | 335 ++++++++
arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h | 26 +
arch/powerpc/platforms/iseries/dt.c | 2
arch/powerpc/platforms/iseries/htab.c | 4
arch/powerpc/platforms/iseries/lpevents.c | 55 +
arch/powerpc/platforms/iseries/proc.c | 1
arch/powerpc/platforms/iseries/setup.c | 19
arch/powerpc/platforms/maple/setup.c | 7
arch/powerpc/platforms/powermac/setup.c | 9
arch/powerpc/platforms/pseries/iommu.c | 33 +
arch/powerpc/platforms/pseries/lpar.c | 4
arch/powerpc/platforms/pseries/setup.c | 10
arch/powerpc/sysdev/Makefile | 2
arch/powerpc/sysdev/dart.h | 6
arch/powerpc/sysdev/dart_iommu.c | 49 +
arch/powerpc/sysdev/todc.c | 392 +++++++++
arch/powerpc/sysdev/tsi108_dev.c | 145 +++
arch/powerpc/sysdev/tsi108_pci.c | 412 +++++++++
drivers/ide/Kconfig | 9
drivers/ide/ppc/pmac.c | 125 ---
drivers/macintosh/Kconfig | 12
drivers/macintosh/Makefile | 1
drivers/macintosh/via-pmu-led.c | 144 +++
include/asm-powerpc/cputable.h | 48 -
include/asm-powerpc/iseries/it_lp_queue.h | 40 -
include/asm-powerpc/kdump.h | 2
include/asm-powerpc/kexec.h | 9
include/asm-powerpc/machdep.h | 2
include/asm-powerpc/mmu.h | 1
include/asm-powerpc/mmu_context.h | 7
include/asm-powerpc/mpc86xx.h | 5
include/asm-powerpc/rtas.h | 3
include/asm-powerpc/time.h | 6
include/asm-powerpc/todc.h | 487 +++++++++++
include/asm-powerpc/tsi108.h | 109 ++
include/asm-powerpc/udbg.h | 3
kernel/kexec.c | 6
77 files changed, 4086 insertions(+), 1110 deletions(-)
create mode 100644 arch/powerpc/configs/mpc7448_hpc2_defconfig
create mode 100644 arch/powerpc/kernel/misc.S
create mode 100644 arch/powerpc/platforms/embedded6xx/Makefile
create mode 100644 arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
create mode 100644 arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.h
create mode 100644 arch/powerpc/sysdev/todc.c
create mode 100644 arch/powerpc/sysdev/tsi108_dev.c
create mode 100644 arch/powerpc/sysdev/tsi108_pci.c
create mode 100644 drivers/macintosh/via-pmu-led.c
create mode 100644 include/asm-powerpc/todc.h
create mode 100644 include/asm-powerpc/tsi108.h
Andrew Morton:
[POWERPC] powerpc: kconfig warning fix
Arnd Bergmann:
[POWERPC] spufs: fix class0 interrupt assignment
Benjamin Herrenschmidt:
[POWERPC] spufs: map mmio space as guarded into user space
[POWERPC] spufs: fix MFC command queue purge
David Wilder:
[POWERPC] Add the use of the firmware soft-reset-nmi to kdump.
Geoff Levand:
[POWERPC] spufs: fix memory hotplug dependency
Haren Myneni:
[POWERPC] kdump: Reserve the existing TCE mappings left by the first kernel
Jimi Xenidis:
[POWERPC] Don't access HID registers if running on a Hypervisor.
[POWERPC] Skip the "copy down" of the kernel if it is already at zero.
Johannes Berg:
[POWERPC] Convert powermac ide blink to new led infrastructure
Jon Loeliger:
[POWERPC] Remove redundant PPC_86XX check.
[POWERPC] Move I8259 selection under MPC8641HPCN board
[POWERPC] Remove redundant STD_MMU selection.
[POWERPC] Remove obsolete #include <linux/config.h>.
Kumar Gala:
powerpc: minor cleanups for mpc86xx
Mark A. Greer:
[POWERPC] todc: add support for Time-Of-Day-Clock
Michael Ellerman:
[POWERPC] Remove remaining iSeries debugger cruft
[POWERPC] Export flat device tree via debugfs for debugging
[POWERPC] powerpc: Initialise ppc_md htab pointers earlier
[POWERPC] Use ppc_md.hpte_insert() in htab_bolt_mapping()
[POWERPC] Make kexec_setup() a regular initcall
[POWERPC] Setup the boot cpu's paca pointer in C rather than asm
[POWERPC] Make rtas_call() safe if RTAS hasn't been initialised
[POWERPC] Move RTAS exports next to their declarations
[POWERPC] Setup RTAS values earlier, to enable rtas_call() earlier
[POWERPC] Add udbg support for RTAS console
[POWERPC] Enable the RTAS udbg console on IBM Cell Blade
[POWERPC] Enable XMON in cell_defconfig
[POWERPC] Make sure smp_processor_id works very early in boot
Olof Johansson:
[POWERPC] U4 DART improvements
Paul Mackerras:
[POWERPC] Simplify the code defining the 64-bit CPU features
[POWERPC] Make sure we select CONFIG_NEW_LEDS if ADB_PMU_LED is set
[POWERPC] Correct the MAX_CONTEXT definition
[POWERPC] Use little-endian bit from firmware ibm,pa-features property
Sonny Rao:
[POWERPC] Fix idr locking in init_new_context
Stephen Rothwell:
[POWERPC] Clean up it_lp_queue.h
[POWERPC] update asm-powerpc/time.h
[POWERPC] Remove unused function call_with_mmu_off
[POWERPC] Consolidate some of kernel/misc*.S
[POWERPC] Make lparcfg.c work when both iseries and pseries are selected
Zang Roy-r61911:
[POWERPC] Add general support for mpc7448hpc2 (Taiga) platform
[POWERPC] Add tsi108 pci and platform device data register function
[POWERPC] mpc7448hpc2 (taiga) board config file
^ permalink raw reply
* Re: [PATCH] [powerpc] change get_property to return void *
From: Benjamin Herrenschmidt @ 2006-06-29 11:29 UTC (permalink / raw)
To: Jeremy Kerr; +Cc: linuxppc-dev
In-Reply-To: <1151577436.28229.47.camel@localhost.localdomain>
> Acked-by: Benjamin Herremschmidt <benh@kernel.crashing.org>
And as Segher-lynx-eye noticed, there is a typo :) Here's a proper one
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
:)
Ben.
^ permalink raw reply
* Re: Xilinx SystemACE driver for 2.6
From: Ameet Patil @ 2006-06-29 10:58 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <44A3A77D.6000804@gmail.com>
Hi Sudheer,
Sorry, I ate my words there. I meant - I shall soon be posting a
patch that contains my port of the SystemAce driver for 2.6 kernel.
-Ameet
> sudheer wrote:
>> Hi Ameet,
>>
>> Your mail is not clear.
>>
>>
>> Ameet Patil wrote:
>>
>>> Hi,
>>> I have ported System Ace driver from 2.4 to 2.6.
>> Hope you have ported System Ace Driver from 2.4 to 2.6.
>>
>>> Please post the patch soon.
>>>
>>>
>> Or else you are asking the group for patch to port it.
>> Please make it clear.
>> I am looking for the same .
>>
>> Thanks
>> Sudheer
>>
>>> -Ameet
>>> _______________________________________________
>>> Linuxppc-embedded mailing list
>>> Linuxppc-embedded@ozlabs.org
>>> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>>>
>>>
>>>
>>
>
^ permalink raw reply
* Re: Xilinx SystemACE driver for 2.6
From: Ameet Patil @ 2006-06-29 10:56 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <44A2C7CE.9070302@gmail.com>
Here is the patch containing the SysAce driver for 2.6 Linux kernel.
http://www.cs.york.ac.uk/rtslab/demos/amos/xupv2pro/patches/linuxppc-2.6.17_sysace.patch
Please test it and let me know in case of any issues!
cheers,
-Ameet
Ameet Patil wrote:
> Hi,
> I have ported System Ace driver from 2.4 to 2.6. Please post the
> patch soon.
>
> -Ameet
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
^ permalink raw reply
* Re: [PATCH] [powerpc] change get_property to return void *
From: Benjamin Herrenschmidt @ 2006-06-29 10:37 UTC (permalink / raw)
To: Jeremy Kerr; +Cc: linuxppc-dev
In-Reply-To: <1151576898.883498.737885160345.qpush@pokey>
On Thu, 2006-06-29 at 20:28 +1000, Jeremy Kerr wrote:
> Change the get_property() function to return a void *. This allows us
> to later remove the cast done in the majority of callers.
>
> Built for pseries, iseries, pmac32, cell, cbesim, g5, systemsim, maple,
> and mpc* defconfigs
>
> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
It was time to do that !
Acked-by: Benjamin Herremschmidt <benh@kernel.crashing.org>
^ permalink raw reply
* [PATCH] [powerpc] change get_property to return void *
From: Jeremy Kerr @ 2006-06-29 10:28 UTC (permalink / raw)
To: linuxppc-dev
Change the get_property() function to return a void *. This allows us
to later remove the cast done in the majority of callers.
Built for pseries, iseries, pmac32, cell, cbesim, g5, systemsim, maple,
and mpc* defconfigs
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
---
arch/powerpc/kernel/prom.c | 3 +--
include/asm-powerpc/prom.h | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
Index: linux-2.6/arch/powerpc/kernel/prom.c
===================================================================
--- linux-2.6.orig/arch/powerpc/kernel/prom.c
+++ linux-2.6/arch/powerpc/kernel/prom.c
@@ -1975,8 +1975,7 @@ struct property *of_find_property(struct
* Find a property with a given name for a given node
* and return the value.
*/
-unsigned char *get_property(struct device_node *np, const char *name,
- int *lenp)
+void *get_property(struct device_node *np, const char *name, int *lenp)
{
struct property *pp = of_find_property(np,name,lenp);
return pp ? pp->value : NULL;
Index: linux-2.6/include/asm-powerpc/prom.h
===================================================================
--- linux-2.6.orig/include/asm-powerpc/prom.h
+++ linux-2.6/include/asm-powerpc/prom.h
@@ -167,8 +167,8 @@ extern void unflatten_device_tree(void);
extern void early_init_devtree(void *);
extern int device_is_compatible(struct device_node *device, const char *);
extern int machine_is_compatible(const char *compat);
-extern unsigned char *get_property(struct device_node *node, const char *name,
- int *lenp);
+extern void *get_property(struct device_node *node, const char *name,
+ int *lenp);
extern void print_properties(struct device_node *node);
extern int prom_n_addr_cells(struct device_node* np);
extern int prom_n_size_cells(struct device_node* np);
^ permalink raw reply
* 8541 FCC transmit timed out
From: Stephen Cheng @ 2006-06-29 9:55 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 2553 bytes --]
Hi the community,
I encountered the "transmit timed out" problem when I try to bring up the
FCC on an mpc8541 based board.
I found there are a lot of such issues posted in the list, unfortunately,
I didn't find a workaround could solve my problem.
The FCC port works fine under U-boot, I can ping the host and download
files from TFTP server, so the tx/rx clk route should be no problem. The
command line U-boot transfer to Linux Kernel should be fine too, because
kernel startup message says: IP-Config Complete ...
When I tried to ping the host after Linux is up, I got the following
dumped messages:
PING 192.168.1.2 (192.168.1.2) from 192.168.1.192 : 56(84) bytes of data.
>From 192.168.1.192: Destination Host Unreachable
>From 192.168.1.192: Destination Host Unreachable
>From 192.168.1.192: Destination Host Unreachable
>From 192.168.1.192: Destination Host Unreachable
>From 192.168.1.192: Destination Host Unreachable
>From 192.168.1.192: Destination Host Unreachable
NETDEV WATCHDOG: eth0: transmit timed out
eth0: transmit timed out.
Ring data dump: cur_tx c0218100 tx_free 0 cur_rx c0218000.
Tx @base c0218100 :
1c01 0062 0039e962
1c01 0062 0039e662
1c01 0062 0039e862
1c01 0062 0039ea62
5c01 002a 07f45de2
5c01 002a 07f45e62
5c01 002a 07f45ee2
5c01 002a 07f45f62
5c01 002a 07a2b0a2
5c01 002a 07a2b122
5c01 002a 07a2b1a2
5c01 002a 07a2b222
5c01 002a 07a2b2a2
5c01 002a 07a2b322
5c01 002a 07a2b3a2
7c01 002a 07a2b422
Rx @base c0218000 :
1c80 0040 07706000
1c80 0040 07706800
1c80 0040 07705000
1c00 0040 07705800
1c00 0040 07704000
1c00 0040 07704800
1c00 0040 07703000
1c00 0040 07703800
1c00 0040 07702000
1c00 0040 07702800
1c00 0040 07701000
1c00 0040 07701800
1c00 0040 07700000
1c00 0040 07700800
1c00 0040 003ff000
9000 0000 003ff800
9000 0000 003fe000
9000 0000 003fe800
9000 0000 003fd000
9000 0000 003fd800
9000 0000 003fc000
9000 0000 003fc800
9000 0000 003fb000
9000 0000 003fb800
9000 0000 003fa000
9000 0000 003fa800
9000 0000 003f9000
9000 0000 003f9800
9000 0000 003f8000
9000 0000 003f8800
9000 0000 003f7000
b000 0000 003f7800
NETDEV WATCHDOG: eth0: transmit timed out
eth0: transmit timed out.
......
The last bit of TxBD_CSR is 1, which means "Carrier Sense Lost", I have no
idea about why this could happen.
I captured the package at the host side, the host had received the ARP
request package and had also sent the ARP reply package, however, no ICMP
package followed.
The Linux version is 2.4.20.
Any comment will be appreciated!
(PS: sorry for my poor English.)
Thanks & Best Regards,
Stephen C.
[-- Attachment #2: Type: text/html, Size: 5730 bytes --]
^ permalink raw reply
* RE: [PATCH 1/7] powerpc: Add mpc8360epb platform support
From: Li Yang-r58472 @ 2006-06-29 9:28 UTC (permalink / raw)
To: 'Vitaly Bordug'
Cc: Phillips Kim-R1AAHA, Yin Olivia-r63875,
'linux-kernel@vger.kernel.org', linuxppc-dev,
'Paul Mackerras', Chu hanjin-r52514
> -----Original Message-----
> From: Vitaly Bordug [mailto:vbordug@ru.mvista.com]
> Sent: Thursday, June 29, 2006 12:59 AM
> To: Li Yang-r58472
> Cc: 'Paul Mackerras'; linuxppc-dev@ozlabs.org; Phillips Kim-R1AAHA; Chu
> hanjin-r52514; Yin Olivia-r63875; 'linux-kernel@vger.kernel.org'
> Subject: Re: [PATCH 1/7] powerpc: Add mpc8360epb platform support
>
> On Wed, 28 Jun 2006 22:23:03 +0800
> Li Yang-r58472 <LeoLi@freescale.com> wrote:
>
> > The patch adds mpc8360e MDS Processor Board support.
> Far too short comment I guess.. There should be some information at least, what
> u-boot modifications are required, what family being introduced, etc.
The new revision goes like this:
The patch adds mpc8360e MDS Processor Board support. MPC8360E is a new processor in the PowerQUICC II pro family, and it's the first one to use the new generation of communication coprocessor called QUICC ENGINE (QE in abbreviation).
The patch needs a flat device tree to work. It means either u-boot provides a flat device tree blob or somehow a kernel shim passes the tree. The final mechanism of providing FDT is far beyond this patch.
>
> >
> > Signed-off-by: Li Yang <leoli@freescale.com>
> > Signed-off-by: Yin Olivia <hong-hua.yin@freescale.com>
> > Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
> >
> > ---
> > arch/powerpc/platforms/83xx/Kconfig | 13 ++
> > arch/powerpc/platforms/83xx/Makefile | 1
> > arch/powerpc/platforms/83xx/mpc8360e_pb.c | 213
> +++++++++++++++++++++++++++++
> > arch/powerpc/platforms/83xx/mpc8360e_pb.h | 31 ++++
> > 4 files changed, 258 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/powerpc/platforms/83xx/Kconfig
> b/arch/powerpc/platforms/83xx/Kconfig
> > index 7675e67..04c4508 100644
> > --- a/arch/powerpc/platforms/83xx/Kconfig
> > +++ b/arch/powerpc/platforms/83xx/Kconfig
> > @@ -16,6 +16,13 @@ config MPC834x_SYS
> > 3 PCI slots. The PIBs PCI initialization is the bootloader's
> > responsiblilty.
> >
> > +config MPC8360E_PB
> > + bool "Freescale MPC8360E PB"
> > + select DEFAULT_UIMAGE
> > + select QUICC_ENGINE
> > + help
> > + This option enables support for the MPC836x EMDS Processor Board.
> > +
> > endchoice
>
> I don't think this is really required option. I guess 836x + QUICC_ENGINE should
> be enough (with a proviso that 8360 won't boot without qe.
We select a board and the board implies cpu family and soc feature. That will be better for users rather than expecting them to know the very detail.
>
> >
> > config MPC834x
> > @@ -24,4 +31,10 @@ config MPC834x
> > select PPC_INDIRECT_PCI
> > default y if MPC834x_SYS
> >
> > +config MPC836x
> > + bool
> > + select PPC_UDBG_16550
>
> debug option made default?
good catch.
> > + select PPC_INDIRECT_PCI
> > + default y if MPC8360E_PB
> > +
> > endmenu
> > diff --git a/arch/powerpc/platforms/83xx/Makefile
> b/arch/powerpc/platforms/83xx/Makefile
> > index 5c72367..0c9ea5c 100644
> > --- a/arch/powerpc/platforms/83xx/Makefile
> > +++ b/arch/powerpc/platforms/83xx/Makefile
> > @@ -4,3 +4,4 @@ #
> > obj-y := misc.o
> > obj-$(CONFIG_PCI) += pci.o
> > obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o
> > +obj-$(CONFIG_MPC8360E_PB) += mpc8360e_pb.o
> > diff --git a/arch/powerpc/platforms/83xx/mpc8360e_pb.c
> b/arch/powerpc/platforms/83xx/mpc8360e_pb.c
> > new file mode 100644
> > index 0000000..b4ddb0a
> > --- /dev/null
> > +++ b/arch/powerpc/platforms/83xx/mpc8360e_pb.c
> > @@ -0,0 +1,213 @@
> > +/*
> > + * Copyright (C) Freescale Semicondutor, Inc. 2006. All rights reserved.
> > + *
> > + * Author: Li Yang <LeoLi@freescale.com>
> > + * Yin Olivia <Hong-hua.Yin@freescale.com>
> > + *
> > + * Description:
> > + * MPC8360E MDS PB board specific routines.
> > + *
> > + * Changelog:
> > + * Jun 21, 2006 Initial version
> > + *
> No changelog entries for new files please... git tracks it good enough.
This is Freescale protocol. If it is not welcomed, we will change it.
>
> > + * 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.
> > + */
> > +
> > +#include <linux/config.h>
> > +#include <linux/stddef.h>
> > +#include <linux/kernel.h>
> > +#include <linux/init.h>
> > +#include <linux/errno.h>
> > +#include <linux/reboot.h>
> > +#include <linux/pci.h>
> > +#include <linux/kdev_t.h>
> > +#include <linux/major.h>
> > +#include <linux/console.h>
> > +#include <linux/delay.h>
> > +#include <linux/seq_file.h>
> > +#include <linux/root_dev.h>
> > +#include <linux/initrd.h>
> > +
> > +#include <asm/system.h>
> > +#include <asm/atomic.h>
> > +#include <asm/time.h>
> > +#include <asm/io.h>
> > +#include <asm/machdep.h>
> > +#include <asm/ipic.h>
> > +#include <asm/bootinfo.h>
> > +#include <asm/irq.h>
> > +#include <asm/prom.h>
> > +#include <asm/udbg.h>
> > +#include <sysdev/fsl_soc.h>
> > +#ifdef CONFIG_QUICC_ENGINE
> > +#include <asm/immap_qe.h>
> > +#include <asm/qe_ic.h>
> > +#endif /* CONFIG_QUICC_ENGINE */
> > +#include "mpc83xx.h"
> > +#include "mpc8360e_pb.h"
> > +
> > +#undef DEBUG
> > +
>
> hmmm? Does it relate nicely with below ?
> > +#ifdef DEBUG
> > +#define DBG(fmt...) udbg_printf(fmt)
> > +#else
> > +#define DBG(fmt...)
> > +#endif
> > +
> > +
> > +#ifndef CONFIG_PCI
> > +unsigned long isa_io_base = 0;
> > +unsigned long isa_mem_base = 0;
> > +#endif
> > +
> > +#ifdef CONFIG_QUICC_ENGINE
> > +extern void qe_reset(void);
> > +extern int par_io_of_config(struct device_node *np);
> > +#endif /* CONFIG_QUICC_ENGINE */
>
> I bet this should go to the .h file...
> > +
> > +/*
> ************************************************************************
> > + *
> > + * Setup the architecture
> > + *
> > + */
> > +static void __init mpc8360_sys_setup_arch(void)
> > +{
> > + struct device_node *np;
> > +
> > +#ifdef CONFIG_QUICC_ENGINE
> > + u8 *bcsr_regs;
> > +#endif
> > +
> > + if (ppc_md.progress)
> > + ppc_md.progress("mpc8360_sys_setup_arch()", 0);
> > +
> > + np = of_find_node_by_type(NULL, "cpu");
> > + if (np != 0) {
> > + unsigned int *fp =
> > + (int *)get_property(np, "clock-frequency", NULL);
> > + if (fp != 0)
> > + loops_per_jiffy = *fp / HZ;
> > + else
> > + loops_per_jiffy = 50000000 / HZ;
> > + of_node_put(np);
> > + }
> > +#ifdef CONFIG_PCI
> > + for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
> > + add_bridge(np);
> > +
> > + ppc_md.pci_swizzle = common_swizzle;
> > + ppc_md.pci_exclude_device = mpc83xx_exclude_device;
> > +#endif
> > +
> > +#ifdef CONFIG_QUICC_ENGINE
> > + qe_reset();
> > +
> > + for (np = NULL; (np = of_find_node_by_name(np, "ucc")) != NULL;)
> > + par_io_of_config(np);
> > +
> > + /* Reset the Ethernet PHY */
> > + bcsr_regs = (u8 *) ioremap(BCSR_PHYS_ADDR, BCSR_SIZE);
> > + bcsr_regs[9] &= ~0x20;
> > + udelay(1000);
> > + bcsr_regs[9] |= 0x20;
> > + iounmap(bcsr_regs);
> > +
> And if we have a design, which do not contain real ethernet UCC usage? Or UCC
> geth is disabled somehow explicitly? Stuff like that normally goes to the
> callback that is going to be triggered upon Etherbet init.
I will move it.
>
>
> > +#endif /* CONFIG_QUICC_ENGINE */
> > +
> > +#ifdef CONFIG_BLK_DEV_INITRD
> > + if (initrd_start)
> > + ROOT_DEV = Root_RAM0;
> > + else
> > +#endif
> > +#ifdef CONFIG_ROOT_NFS
> > + ROOT_DEV = Root_NFS;
> > +#else
> > + ROOT_DEV = Root_HDA1;
> > +#endif
> > +}
> > +
> > +void __init mpc8360_sys_init_IRQ(void)
> > +{
> > + u8 senses[8] = {
> > + 0, /* EXT 0 */
> > + IRQ_SENSE_LEVEL, /* EXT 1 */
> > + IRQ_SENSE_LEVEL, /* EXT 2 */
> > + 0, /* EXT 3 */
> > +#ifdef CONFIG_PCI
> > + IRQ_SENSE_LEVEL, /* EXT 4 */
> > + IRQ_SENSE_LEVEL, /* EXT 5 */
> > + IRQ_SENSE_LEVEL, /* EXT 6 */
> > + IRQ_SENSE_LEVEL, /* EXT 7 */
> > +#else
> > + 0, /* EXT 4 */
> > + 0, /* EXT 5 */
> > + 0, /* EXT 6 */
> > + 0, /* EXT 7 */
> > +#endif
> > + };
> > +
> > + ipic_init(get_immrbase() + 0x00700, 0, 0, senses, 8);
> > +
> > + /* Initialize the default interrupt mapping priorities,
> > + * in case the boot rom changed something on us.
> > + */
> > + ipic_set_default_priority();
> > +
> > +#ifdef CONFIG_QUICC_ENGINE
> > + qe_ic_init(get_qe_base() + 0x00000080,
> > + (QE_IC_LOW_SIGNAL | QE_IC_HIGH_SIGNAL), QE_IRQ_OFFSET);
> > +#endif /* CONFIG_QUICC_ENGINE */
> > +}
> > +
> > +#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374)
> > +extern ulong ds1374_get_rtc_time(void);
> > +extern int ds1374_set_rtc_time(ulong);
> > +
> > +static int __init mpc8360_rtc_hookup(void)
> > +{
> > + struct timespec tv;
> > +
> > + ppc_md.get_rtc_time = ds1374_get_rtc_time;
> > + ppc_md.set_rtc_time = ds1374_set_rtc_time;
> > +
> > + tv.tv_nsec = 0;
> > + tv.tv_sec = (ppc_md.get_rtc_time) ();
> > + do_settimeofday(&tv);
> > +
> > + return 0;
> > +}
> > +
> > +late_initcall(mpc8360_rtc_hookup);
> > +#endif
> > +
> > +/*
> > + * Called very early, MMU is off, device-tree isn't unflattened
> > + */
> > +static int __init mpc8360_sys_probe(void)
> > +{
> > + char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
> > + "model", NULL);
> > + if (model == NULL)
> > + return 0;
> > + if (strcmp(model, "MPC8360EPB"))
> > + return 0;
> > +
> > + DBG("MPC8360EMDS-PB found\n");
> > +
> > + return 1;
> > +}
> > +
> > +define_machine(mpc8360_sys) {
> > + .name = "MPC8360E PB",
> > + .probe = mpc8360_sys_probe,
> > + .setup_arch = mpc8360_sys_setup_arch,
> > + .init_IRQ = mpc8360_sys_init_IRQ,
> > + .get_irq = ipic_get_irq,
> > + .restart = mpc83xx_restart,
> > + .time_init = mpc83xx_time_init,
> > + .calibrate_decr = generic_calibrate_decr,
> > + .progress = udbg_progress,
> > +};
> > diff --git a/arch/powerpc/platforms/83xx/mpc8360e_pb.h
> b/arch/powerpc/platforms/83xx/mpc8360e_pb.h
> > new file mode 100644
> > index 0000000..4243f4a
> > --- /dev/null
> > +++ b/arch/powerpc/platforms/83xx/mpc8360e_pb.h
> > @@ -0,0 +1,31 @@
> > +/*
> > + * Copyright (C) Freescale Semicondutor, Inc. 2006. All rights reserved.
> > + *
> > + * Author: Li Yang <LeoLi@freescale.com>
> > + * Yin Olivia <Hong-hua.Yin@freescale.com>
> > + *
> > + * Description:
> > + * MPC8360E MDS PB board specific header.
> > + *
> > + * Changelog:
> > + * Jun 21, 2006 Initial version
> > + *
> > + * 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.
> > + *
> > + */
> > +
> > +#ifndef __MACH_MPC83XX_SYS_H__
> > +#define __MACH_MPC83XX_SYS_H__
> > +
> > +#define BCSR_PHYS_ADDR ((uint)0xf8000000)
> > +#define BCSR_SIZE ((uint)(32 * 1024))
> > +
> > +#define PIRQA MPC83xx_IRQ_EXT4
> > +#define PIRQB MPC83xx_IRQ_EXT5
> > +#define PIRQC MPC83xx_IRQ_EXT6
> > +#define PIRQD MPC83xx_IRQ_EXT7
> > +
>
> Hrm, isn't PCI irq stuff encoded to the dts? Upper pci-related defines seem
> redundant...
I'll remove.
>
> > +#endif /* __MACH_MPC83XX_SYS_H__ */
> >
> > _______________________________________________
> > Linuxppc-dev mailing list
> > Linuxppc-dev@ozlabs.org
> > https://ozlabs.org/mailman/listinfo/linuxppc-dev
> >
> >
>
>
> --
> Sincerely,
> Vitaly
^ permalink raw reply
* Re: [Alsa-devel] RFC: dma_mmap_coherent() for powerpc/ppc architecture and ALSA?
From: Takashi Iwai @ 2006-06-29 9:27 UTC (permalink / raw)
To: Gerhard Pircher; +Cc: linuxppc-dev, rlrevell, alsa-devel, linux-kernel
In-Reply-To: <20060628202753.198630@gmx.net>
At Wed, 28 Jun 2006 22:27:53 +0200,
Gerhard Pircher wrote:
>
> Hi,
>
> It took a little bit longer to integrate the patch, as I didn't figure out first how to implement the __dma_mmap_coherent() function for PPC systems with CONFIG_NOT_COHERENT_CACHE defined. :)
>
> Unfortunately my system still crashes within snd_pcm_mmap_data_nopage()
> (sound/core/pcm_native.c), as you can see below. I guess it tries to remap
> a DMA buffer allocated by the not cache coherent DMA memory allocation
> function in arch/ppc/kernel/dma-mapping.c.
Strange, nopage will be never called if you apply my patch and modify
to use dma_mmap_coherent().
Takashi
^ permalink raw reply
* Re: Please pull from 'for_paulus' branch of powerpc
From: Benjamin Herrenschmidt @ 2006-06-29 9:10 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel, Zhang Wei-r63237
In-Reply-To: <BDF5A6D5-E7F4-4CDF-9B34-13A66A0B7C99@kernel.crashing.org>
> > Even though other 86xx platforms have no these PCI chips, these
> > codes will not take effect.
>
> Its code bloat for systems that dont need it.
Well... it depends :) If it's totally unlikely to ever have this chip in
those platforms, then yes. But if it's common enough, it's fair to have
the quirk in a generic place (provided that Whang is right and the fixup
is indeed the same for all 86xx platforms)
Ben.
^ permalink raw reply
* new IRQ work status
From: Benjamin Herrenschmidt @ 2006-06-29 8:36 UTC (permalink / raw)
To: linuxppc-dev
Here's a progress report on my new irq management work.
I've ported pseries, iseries (well tested) and cell (barely tested) at
this point, and tested various funky combinations of device-trees to
validate as much as the core as possible. I still need to port over chrp
and maple which are easy, and powermac which will be a bit more
difficult as it relies a lot more on intrs/n_intrs in the device-nodes
which I've now removed.
Hopefully, it should be finished this week. The current serie of patch
applies on top of 2.6.17-mm1. I will do a version on top of the powerpc
tree as soon as the genirq port is upstream (which hopefully should
happen soon, possibly tomorrow).
I don't yet want to post the patches on the list (too much), they can be
found at:
http://gate.crashing.org/~benh/irq-WIP/
Comments welcome.
Cheers,
Ben.
^ permalink raw reply
* RE: patches applied to powerpc.git
From: Zang Roy-r61911 @ 2006-06-29 6:38 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, linux-kernel-owner
>
> Zang Roy-r61911 writes:
>
> > I have submitted the "v2" version for mpc7448hpc2 board
> support in arch/powerpc/platforms/embedded6xx.
> > I have not got any suggestion, since I submitted the code.
> > In this submission I have addressed all the issues
> brought up in the "v1" submission.
> > So could you help me merge the patches into your git
> tree ? If there is any comment about the code, please let me know.
>
> I have taken 1, 2, and 4. Ben H asked me to delay with patch
> 3/4 because it will conflict with changes he is making. Also
> I would like to see it done in a fashion which doesn't add
> two extra loads to things like _mpic_ipi_read etc.
>
> Paul.
>
Paul
Great news!
For tsi108 mpic part, it is a bit complex:). We can wait for
Ben's code to decide the direction of our mpic.
Ben,
Where is your patch? So many guys wait for it!
Roy
^ permalink raw reply
* RE: Please pull from 'for_paulus' branch of powerpc
From: Zhang Wei-r63237 @ 2006-06-29 6:13 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel
> On Jun 28, 2006, at 10:33 PM, Zhang Wei-r63237 wrote:
> >> On Jun 28, 2006, at 1:26 AM, Zhang Wei-r63237 wrote:
> >>
> >>> Hi, Kumar,
> >>>
> >>> Why moving these codes from pci.c to mpc86xx_hpcn.c? It's
> >> not must be.
> >>> These functions relate to PCI device of MPC8641D HPCn platform.
> >>> And we can also see the 'DECLARE_PCI_FIXUP_HEADER()'
> declaration in
> >>> pci.c of Powermac platform.
> >>
> >> The point for moving is 86xx/pci.c should apply to all
> 86xx systems,
> >> not just the HPCn system.
> >>
> >> - kumar
> >
> > The codes of moving is for PCI devices, it's for HPCn
> system now, but
> > it's also fit for the same PCI chips in the other 86xx
> system and the
> > same chip should keep the same setting in 86xx platforms, I
> think so.
> >
> > Even though other 86xx platforms have no these PCI chips,
> these codes
> > will not take effect.
>
> Its code bloat for systems that dont need it.
Yes, but it will make the codes more general.
Otherwise it will prevents using the same kernel image on another platform.
How to do if the other 86xx platform has the same ships? Add the same code to mpc86xx_xxx.c? It will also bloat the source tree.
>
> > And we can also see the similar solution in pSeries and PowerMac
> > platforms pci.c file. The function 'fixup_winbond_82c105' in
> > pseries/pci.c is for the Winbond 82c105 IDE controller on p610.
> > (pSeries have only p610? :-D ) The function 'fixup_k2_sata' in
> > powermac/pci.c is for K2-SATA. (K2-SATA chip is in all PowerMac
> > machine? ;-) )
>
> Realize, powermac and pseries describe actual full systems,
> not processor families like 86xx.
>
Yes, but the powermac and pseries full systems also have different model and different chips set.
And using processor families like 85xx, 86xx as powerpc platform sub-directory name is maybe not a good idea.
Thanks,
Zhang Wei
> > The moving will make the mpc86xx_hpcn.c more fat.
>
> That's all relative.
>
> - kumar
>
> >
> > Thanks,
> > Zhang Wei
> >
> >>
> >>>> -----Original Message-----
> >>>> From: linuxppc-dev-bounces+wei.zhang=freescale.com@ozlabs.org
> >>>> [mailto:linuxppc-dev-bounces+wei.zhang=freescale.com@ozlabs.or
> >>>> g] On Behalf Of Kumar Gala
> >>>> Sent: Wednesday, June 28, 2006 2:01 PM
> >>>> To: Paul Mackerras
> >>>> Cc: linuxppc-dev@ozlabs.org; linux-kernel@vger.kernel.org
> >>>> Subject: Please pull from 'for_paulus' branch of powerpc
> >>>>
> >>>> Please pull from 'for_paulus' branch of
> >>>> master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git
> >>>>
> >>>> to receive the following updates:
> >>>>
> >>>> arch/powerpc/kernel/cputable.c | 12 --
> >>>> arch/powerpc/platforms/86xx/mpc86xx.h | 8 +
> >>>> arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 128
> >>>> +++++++++++++++++++++++++--
> >>>> arch/powerpc/platforms/86xx/mpc86xx_smp.c | 9 -
> >>>> arch/powerpc/platforms/86xx/pci.c | 136
> >>>> +----------------------------
> >>>> include/asm-powerpc/mpc86xx.h | 4
> >>>> 6 files changed, 138 insertions(+), 159 deletions(-)
> >>>>
> >>>> Kumar Gala:
> >>>> powerpc: minor cleanups for mpc86xx
> >>>>
> >>>> diff --git a/arch/powerpc/kernel/cputable.c
> >>>> b/arch/powerpc/kernel/cputable.c index 1c11488..abf7d42 100644
> >>>> --- a/arch/powerpc/kernel/cputable.c
> >>>> +++ b/arch/powerpc/kernel/cputable.c
> >>>> @@ -722,18 +722,6 @@ #if CLASSIC_PPC
> >>>> .oprofile_type = PPC_OPROFILE_G4,
> >>>> .platform = "ppc7450",
> >>>> },
> >>>> - { /* 8641 */
> >>>> - .pvr_mask = 0xffffffff,
> >>>> - .pvr_value = 0x80040010,
> >>>> - .cpu_name = "8641",
> >>>> - .cpu_features = CPU_FTRS_7447A,
> >>>> - .cpu_user_features = COMMON_USER |
> >>>> PPC_FEATURE_HAS_ALTIVEC_COMP,
> >>>> - .icache_bsize = 32,
> >>>> - .dcache_bsize = 32,
> >>>> - .num_pmcs = 6,
> >>>> - .cpu_setup = __setup_cpu_745x
> >>>> - },
> >>>> -
> >>>> { /* 82xx (8240, 8245, 8260 are all 603e cores) */
> >>>> .pvr_mask = 0x7fff0000,
> >>>> .pvr_value = 0x00810000,
> >>>> diff --git a/arch/powerpc/platforms/86xx/mpc86xx.h
> >>>> b/arch/powerpc/platforms/86xx/mpc86xx.h
> >>>> index e3c9e4f..2834462 100644
> >>>> --- a/arch/powerpc/platforms/86xx/mpc86xx.h
> >>>> +++ b/arch/powerpc/platforms/86xx/mpc86xx.h
> >>>> @@ -15,11 +15,13 @@ #define __MPC86XX_H__
> >>>> * mpc86xx_* files. Mostly for use by mpc86xx_setup().
> >>>> */
> >>>>
> >>>> -extern int __init add_bridge(struct device_node *dev);
> >>>> +extern int add_bridge(struct device_node *dev);
> >>>>
> >>>> -extern void __init setup_indirect_pcie(struct
> >> pci_controller *hose,
> >>>> +extern int mpc86xx_exclude_device(u_char bus, u_char devfn);
> >>>> +
> >>>> +extern void setup_indirect_pcie(struct pci_controller *hose,
> >>>> u32 cfg_addr, u32
> >>>> cfg_data); -extern void __init
> >>>> setup_indirect_pcie_nomap(struct pci_controller *hose,
> >>>> +extern void setup_indirect_pcie_nomap(struct
> pci_controller *hose,
> >>>> void
> __iomem *cfg_addr,
> >>>> void
> __iomem *cfg_data);
> >>>>
> >>>> diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
> >>>> b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
> >>>> index 483c21d..ac7f418 100644
> >>>> --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
> >>>> +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
> >>>> @@ -36,6 +36,7 @@ #include <asm/mpic.h> #include
> >> <sysdev/fsl_soc.h>
> >>>>
> >>>> #include "mpc86xx.h"
> >>>> +#include "mpc8641_hpcn.h"
> >>>>
> >>>> #ifndef CONFIG_PCI
> >>>> unsigned long isa_io_base = 0;
> >>>> @@ -186,17 +187,130 @@ mpc86xx_map_irq(struct pci_dev *dev, uns
> >>>> return PCI_IRQ_TABLE_LOOKUP + I8259_OFFSET; }
> >>>>
> >>>> +static void __devinit quirk_ali1575(struct pci_dev *dev) {
> >>>> + unsigned short temp;
> >>>> +
> >>>> + /*
> >>>> + * ALI1575 interrupts route table setup:
> >>>> + *
> >>>> + * IRQ pin IRQ#
> >>>> + * PIRQA ---- 3
> >>>> + * PIRQB ---- 4
> >>>> + * PIRQC ---- 5
> >>>> + * PIRQD ---- 6
> >>>> + * PIRQE ---- 9
> >>>> + * PIRQF ---- 10
> >>>> + * PIRQG ---- 11
> >>>> + * PIRQH ---- 12
> >>>> + *
> >>>> + * interrupts for PCI slot0 -- PIRQA / PIRQB /
> PIRQC / PIRQD
> >>>> + * PCI slot1 -- PIRQB / PIRQC /
> PIRQD / PIRQA
> >>>> + */
> >>>> + pci_write_config_dword(dev, 0x48, 0xb9317542);
> >>>> +
> >>>> + /* USB 1.1 OHCI controller 1, interrupt: PIRQE */
> >>>> + pci_write_config_byte(dev, 0x86, 0x0c);
> >>>> +
> >>>> + /* USB 1.1 OHCI controller 2, interrupt: PIRQF */
> >>>> + pci_write_config_byte(dev, 0x87, 0x0d);
> >>>> +
> >>>> + /* USB 1.1 OHCI controller 3, interrupt: PIRQH */
> >>>> + pci_write_config_byte(dev, 0x88, 0x0f);
> >>>> +
> >>>> + /* USB 2.0 controller, interrupt: PIRQ7 */
> >>>> + pci_write_config_byte(dev, 0x74, 0x06);
> >>>> +
> >>>> + /* Audio controller, interrupt: PIRQE */
> >>>> + pci_write_config_byte(dev, 0x8a, 0x0c);
> >>>> +
> >>>> + /* Modem controller, interrupt: PIRQF */
> >>>> + pci_write_config_byte(dev, 0x8b, 0x0d);
> >>>> +
> >>>> + /* HD audio controller, interrupt: PIRQG */
> >>>> + pci_write_config_byte(dev, 0x8c, 0x0e);
> >>>> +
> >>>> + /* Serial ATA interrupt: PIRQD */
> >>>> + pci_write_config_byte(dev, 0x8d, 0x0b);
> >>>> +
> >>>> + /* SMB interrupt: PIRQH */
> >>>> + pci_write_config_byte(dev, 0x8e, 0x0f);
> >>>> +
> >>>> + /* PMU ACPI SCI interrupt: PIRQH */
> >>>> + pci_write_config_byte(dev, 0x8f, 0x0f);
> >>>> +
> >>>> + /* Primary PATA IDE IRQ: 14
> >>>> + * Secondary PATA IDE IRQ: 15
> >>>> + */
> >>>> + pci_write_config_byte(dev, 0x44, 0x3d);
> >>>> + pci_write_config_byte(dev, 0x75, 0x0f);
> >>>> +
> >>>> + /* Set IRQ14 and IRQ15 to legacy IRQs */
> >>>> + pci_read_config_word(dev, 0x46, &temp);
> >>>> + temp |= 0xc000;
> >>>> + pci_write_config_word(dev, 0x46, temp);
> >>>> +
> >>>> + /* Set i8259 interrupt trigger
> >>>> + * IRQ 3: Level
> >>>> + * IRQ 4: Level
> >>>> + * IRQ 5: Level
> >>>> + * IRQ 6: Level
> >>>> + * IRQ 7: Level
> >>>> + * IRQ 9: Level
> >>>> + * IRQ 10: Level
> >>>> + * IRQ 11: Level
> >>>> + * IRQ 12: Level
> >>>> + * IRQ 14: Edge
> >>>> + * IRQ 15: Edge
> >>>> + */
> >>>> + outb(0xfa, 0x4d0);
> >>>> + outb(0x1e, 0x4d1);
> >>>> +}
> >>>>
> >>>> -int
> >>>> -mpc86xx_exclude_device(u_char bus, u_char devfn)
> >>>> +static void __devinit quirk_uli5288(struct pci_dev *dev)
> >>>> {
> >>>> -#if !defined(CONFIG_PCI)
> >>>> - if (bus == 0 && PCI_SLOT(devfn) == 0)
> >>>> - return PCIBIOS_DEVICE_NOT_FOUND;
> >>>> -#endif
> >>>> + unsigned char c;
> >>>> +
> >>>> + pci_read_config_byte(dev,0x83,&c);
> >>>> + c |= 0x80;
> >>>> + pci_write_config_byte(dev, 0x83, c);
> >>>> +
> >>>> + pci_write_config_byte(dev, 0x09, 0x01);
> >>>> + pci_write_config_byte(dev, 0x0a, 0x06);
> >>>> +
> >>>> + pci_read_config_byte(dev,0x83,&c);
> >>>> + c &= 0x7f;
> >>>> + pci_write_config_byte(dev, 0x83, c);
> >>>>
> >>>> - return PCIBIOS_SUCCESSFUL;
> >>>> + pci_read_config_byte(dev,0x84,&c);
> >>>> + c |= 0x01;
> >>>> + pci_write_config_byte(dev, 0x84, c);
> >>>> }
> >>>> +
> >>>> +static void __devinit quirk_uli5229(struct pci_dev *dev) {
> >>>> + unsigned short temp;
> >>>> + pci_write_config_word(dev, 0x04, 0x0405);
> >>>> + pci_read_config_word(dev, 0x4a, &temp);
> >>>> + temp |= 0x1000;
> >>>> + pci_write_config_word(dev, 0x4a, temp); }
> >>>> +
> >>>> +static void __devinit early_uli5249(struct pci_dev *dev) {
> >>>> + unsigned char temp;
> >>>> + pci_write_config_word(dev, 0x04, 0x0007);
> >>>> + pci_read_config_byte(dev, 0x7c, &temp);
> >>>> + pci_write_config_byte(dev, 0x7c, 0x80);
> >>>> + pci_write_config_byte(dev, 0x09, 0x01);
> >>>> + pci_write_config_byte(dev, 0x7c, temp);
> >>>> + dev->class |= 0x1;
> >>>> +}
> >>>> +
> >>>> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575,
> >> quirk_ali1575);
> >>>> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288,
> >> quirk_uli5288);
> >>>> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229,
> >> quirk_uli5229);
> >>>> +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AL, 0x5249,
> early_uli5249);
> >>>> #endif /* CONFIG_PCI */
> >>>>
> >>>>
> >>>> diff --git a/arch/powerpc/platforms/86xx/mpc86xx_smp.c
> >>>> b/arch/powerpc/platforms/86xx/mpc86xx_smp.c
> >>>> index 944ec4b..9cca3d1 100644
> >>>> --- a/arch/powerpc/platforms/86xx/mpc86xx_smp.c
> >>>> +++ b/arch/powerpc/platforms/86xx/mpc86xx_smp.c
> >>>> @@ -34,8 +34,8 @@ extern unsigned long
> __secondary_hold_ac static
> >>>> void __init smp_86xx_release_core(int nr) {
> >>>> - void *mcm_vaddr;
> >>>> - unsigned long vaddr, pcr;
> >>>> + __be32 __iomem *mcm_vaddr;
> >>>> + unsigned long pcr;
> >>>>
> >>>> if (nr < 0 || nr >= NR_CPUS)
> >>>> return;
> >>>> @@ -45,10 +45,9 @@ smp_86xx_release_core(int nr)
> >>>> */
> >>>> mcm_vaddr = ioremap(get_immrbase() + MPC86xx_MCM_OFFSET,
> >>>> MPC86xx_MCM_SIZE);
> >>>> - vaddr = (unsigned long)mcm_vaddr +
> MCM_PORT_CONFIG_OFFSET;
> >>>> - pcr = in_be32((volatile unsigned *)vaddr);
> >>>> + pcr = in_be32(mcm_vaddr +
> (MCM_PORT_CONFIG_OFFSET >> 2));
> >>>> pcr |= 1 << (nr + 24);
> >>>> - out_be32((volatile unsigned *)vaddr, pcr);
> >>>> + out_be32(mcm_vaddr + (MCM_PORT_CONFIG_OFFSET >>
> 2), pcr);
> >>>> }
> >>>>
> >>>>
> >>>> diff --git a/arch/powerpc/platforms/86xx/pci.c
> >>>> b/arch/powerpc/platforms/86xx/pci.c
> >>>> index 5180df7..0d8b340 100644
> >>>> --- a/arch/powerpc/platforms/86xx/pci.c
> >>>> +++ b/arch/powerpc/platforms/86xx/pci.c
> >>>> @@ -122,15 +122,12 @@ static void __init setup_pcie_atmu(struc
> >>>> static void __init mpc86xx_setup_pcie(struct
> pci_controller *hose,
> >>>> u32 pcie_offset, u32 pcie_size) {
> >>>> - volatile struct ccsr_pex *pcie;
> >>>> u16 cmd;
> >>>> unsigned int temps;
> >>>>
> >>>> DBG("PCIE host controller register offset 0x%08x, size
> >> 0x%08x.\n",
> >>>> pcie_offset, pcie_size);
> >>>>
> >>>> - pcie = ioremap(pcie_offset, pcie_size);
> >>>> -
> >>>> early_read_config_word(hose, 0, 0, PCI_COMMAND, &cmd);
> >>>> cmd |= PCI_COMMAND_SERR | PCI_COMMAND_MASTER |
> >> PCI_COMMAND_MEMORY
> >>>> | PCI_COMMAND_IO;
> >>>> @@ -144,6 +141,14 @@ mpc86xx_setup_pcie(struct pci_controller
> >>>> early_write_config_dword(hose, 0, 0,
> PCI_PRIMARY_BUS, temps); }
> >>>>
> >>>> +int mpc86xx_exclude_device(u_char bus, u_char devfn) {
> >>>> + if (bus == 0 && PCI_SLOT(devfn) == 0)
> >>>> + return PCIBIOS_DEVICE_NOT_FOUND;
> >>>> +
> >>>> + return PCIBIOS_SUCCESSFUL;
> >>>> +}
> >>>> +
> >>>> int __init add_bridge(struct device_node *dev) {
> >>>> int len;
> >>>> @@ -198,128 +203,3 @@ int __init add_bridge(struct device_node
> >>>>
> >>>> return 0;
> >>>> }
> >>>> -
> >>>> -static void __devinit quirk_ali1575(struct pci_dev *dev) -{
> >>>> - unsigned short temp;
> >>>> -
> >>>> - /*
> >>>> - * ALI1575 interrupts route table setup:
> >>>> - *
> >>>> - * IRQ pin IRQ#
> >>>> - * PIRQA ---- 3
> >>>> - * PIRQB ---- 4
> >>>> - * PIRQC ---- 5
> >>>> - * PIRQD ---- 6
> >>>> - * PIRQE ---- 9
> >>>> - * PIRQF ---- 10
> >>>> - * PIRQG ---- 11
> >>>> - * PIRQH ---- 12
> >>>> - *
> >>>> - * interrupts for PCI slot0 -- PIRQA / PIRQB /
> PIRQC / PIRQD
> >>>> - * PCI slot1 -- PIRQB / PIRQC /
> PIRQD / PIRQA
> >>>> - */
> >>>> - pci_write_config_dword(dev, 0x48, 0xb9317542);
> >>>> -
> >>>> - /* USB 1.1 OHCI controller 1, interrupt: PIRQE */
> >>>> - pci_write_config_byte(dev, 0x86, 0x0c);
> >>>> -
> >>>> - /* USB 1.1 OHCI controller 2, interrupt: PIRQF */
> >>>> - pci_write_config_byte(dev, 0x87, 0x0d);
> >>>> -
> >>>> - /* USB 1.1 OHCI controller 3, interrupt: PIRQH */
> >>>> - pci_write_config_byte(dev, 0x88, 0x0f);
> >>>> -
> >>>> - /* USB 2.0 controller, interrupt: PIRQ7 */
> >>>> - pci_write_config_byte(dev, 0x74, 0x06);
> >>>> -
> >>>> - /* Audio controller, interrupt: PIRQE */
> >>>> - pci_write_config_byte(dev, 0x8a, 0x0c);
> >>>> -
> >>>> - /* Modem controller, interrupt: PIRQF */
> >>>> - pci_write_config_byte(dev, 0x8b, 0x0d);
> >>>> -
> >>>> - /* HD audio controller, interrupt: PIRQG */
> >>>> - pci_write_config_byte(dev, 0x8c, 0x0e);
> >>>> -
> >>>> - /* Serial ATA interrupt: PIRQD */
> >>>> - pci_write_config_byte(dev, 0x8d, 0x0b);
> >>>> -
> >>>> - /* SMB interrupt: PIRQH */
> >>>> - pci_write_config_byte(dev, 0x8e, 0x0f);
> >>>> -
> >>>> - /* PMU ACPI SCI interrupt: PIRQH */
> >>>> - pci_write_config_byte(dev, 0x8f, 0x0f);
> >>>> -
> >>>> - /* Primary PATA IDE IRQ: 14
> >>>> - * Secondary PATA IDE IRQ: 15
> >>>> - */
> >>>> - pci_write_config_byte(dev, 0x44, 0x3d);
> >>>> - pci_write_config_byte(dev, 0x75, 0x0f);
> >>>> -
> >>>> - /* Set IRQ14 and IRQ15 to legacy IRQs */
> >>>> - pci_read_config_word(dev, 0x46, &temp);
> >>>> - temp |= 0xc000;
> >>>> - pci_write_config_word(dev, 0x46, temp);
> >>>> -
> >>>> - /* Set i8259 interrupt trigger
> >>>> - * IRQ 3: Level
> >>>> - * IRQ 4: Level
> >>>> - * IRQ 5: Level
> >>>> - * IRQ 6: Level
> >>>> - * IRQ 7: Level
> >>>> - * IRQ 9: Level
> >>>> - * IRQ 10: Level
> >>>> - * IRQ 11: Level
> >>>> - * IRQ 12: Level
> >>>> - * IRQ 14: Edge
> >>>> - * IRQ 15: Edge
> >>>> - */
> >>>> - outb(0xfa, 0x4d0);
> >>>> - outb(0x1e, 0x4d1);
> >>>> -}
> >>>> -
> >>>> -static void __devinit quirk_uli5288(struct pci_dev *dev) -{
> >>>> - unsigned char c;
> >>>> -
> >>>> - pci_read_config_byte(dev,0x83,&c);
> >>>> - c |= 0x80;
> >>>> - pci_write_config_byte(dev, 0x83, c);
> >>>> -
> >>>> - pci_write_config_byte(dev, 0x09, 0x01);
> >>>> - pci_write_config_byte(dev, 0x0a, 0x06);
> >>>> -
> >>>> - pci_read_config_byte(dev,0x83,&c);
> >>>> - c &= 0x7f;
> >>>> - pci_write_config_byte(dev, 0x83, c);
> >>>> -
> >>>> - pci_read_config_byte(dev,0x84,&c);
> >>>> - c |= 0x01;
> >>>> - pci_write_config_byte(dev, 0x84, c);
> >>>> -}
> >>>> -
> >>>> -static void __devinit quirk_uli5229(struct pci_dev *dev) -{
> >>>> - unsigned short temp;
> >>>> - pci_write_config_word(dev, 0x04, 0x0405);
> >>>> - pci_read_config_word(dev, 0x4a, &temp);
> >>>> - temp |= 0x1000;
> >>>> - pci_write_config_word(dev, 0x4a, temp);
> >>>> -}
> >>>> -
> >>>> -static void __devinit early_uli5249(struct pci_dev *dev) -{
> >>>> - unsigned char temp;
> >>>> - pci_write_config_word(dev, 0x04, 0x0007);
> >>>> - pci_read_config_byte(dev, 0x7c, &temp);
> >>>> - pci_write_config_byte(dev, 0x7c, 0x80);
> >>>> - pci_write_config_byte(dev, 0x09, 0x01);
> >>>> - pci_write_config_byte(dev, 0x7c, temp);
> >>>> - dev->class |= 0x1;
> >>>> -}
> >>>> -
> >>>> -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575,
> >> quirk_ali1575);
> >>>> -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL,
> >>>> 0x5288, quirk_uli5288);
> >>>> -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229,
> >> quirk_uli5229);
> >>>> -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AL,
> >>>> 0x5249, early_uli5249); diff --git
> >>>> a/include/asm-powerpc/mpc86xx.h
> >>>> b/include/asm-powerpc/mpc86xx.h index d0a6718..00d72a7 100644
> >>>> --- a/include/asm-powerpc/mpc86xx.h
> >>>> +++ b/include/asm-powerpc/mpc86xx.h
> >>>> @@ -20,10 +20,6 @@ #include <asm/mmu.h>
> >>>>
> >>>> #ifdef CONFIG_PPC_86xx
> >>>>
> >>>> -#ifdef CONFIG_MPC8641_HPCN
> >>>> -#include <platforms/86xx/mpc8641_hpcn.h> -#endif
> >>>> -
> >>>> #define _IO_BASE isa_io_base
> >>>> #define _ISA_MEM_BASE isa_mem_base
> >>>> #ifdef CONFIG_PCI
> >>>>
> >>>> _______________________________________________
> >>>> Linuxppc-dev mailing list
> >>>> Linuxppc-dev@ozlabs.org
> >>>> https://ozlabs.org/mailman/listinfo/linuxppc-dev
> >>>>
> >>
>
^ permalink raw reply
* RE: patches applied to powerpc.git
From: Paul Mackerras @ 2006-06-29 6:05 UTC (permalink / raw)
To: Zang Roy-r61911; +Cc: linuxppc-dev, linux-kernel-owner
In-Reply-To: <9FCDBA58F226D911B202000BDBAD467306DD16AC@zch01exm40.ap.freescale.net>
Zang Roy-r61911 writes:
> I have submitted the "v2" version for mpc7448hpc2 board support in arch/powerpc/platforms/embedded6xx.
> I have not got any suggestion, since I submitted the code.
> In this submission I have addressed all the issues brought up in the "v1" submission.
> So could you help me merge the patches into your git tree ? If there is any comment about the code, please let me know.
I have taken 1, 2, and 4. Ben H asked me to delay with patch 3/4
because it will conflict with changes he is making. Also I would like
to see it done in a fashion which doesn't add two extra loads to
things like _mpic_ipi_read etc.
Paul.
^ permalink raw reply
* unresolved symbol on target ... while insmod
From: srideep.devireddy @ 2006-06-29 5:00 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1974 bytes --]
Hello All ,
I compiled a driver module using cross compiler for MPC8247 , now when
I try to insert the module in to the target I give me an error like
root@10.0.0.2:/home# insmod linux-kernel-bde.o
Using linux-kernel-bde.o
insmod: unresolved symbol devfs_register
insmod: unresolved symbol vsprintf
insmod: unresolved symbol kmalloc
insmod: unresolved symbol create_proc_entry
insmod: unresolved symbol __get_free_pages
insmod: unresolved symbol __save_flags_ptr
insmod: unresolved symbol ioremap
insmod: unresolved symbol free_irq
insmod: unresolved symbol high_memory
insmod: unresolved symbol devfs_unregister
insmod: unresolved symbol iounmap
insmod: unresolved symbol free_pages
insmod: unresolved symbol kfree
insmod: unresolved symbol strlen
insmod: unresolved symbol remove_proc_entry
insmod: unresolved symbol request_irq
insmod: unresolved symbol mem_map
insmod: unresolved symbol simple_strtoul
insmod: unresolved symbol sprintf
insmod: unresolved symbol __restore_flags
insmod: unresolved symbol printk
insmod: unresolved symbol __cli
Can any one show me some pointers what is this error all about . And how
to over come this . Thanks in advance
Best Regards
Srideep
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
[-- Attachment #2: Type: text/html, Size: 7813 bytes --]
^ permalink raw reply
* FW: unresolved symbol on target ... while insmod
From: srideep.devireddy @ 2006-06-29 5:25 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 2258 bytes --]
Thanks ... I am able to resolve the problem ...
________________________________
From: Srideep DeviReddy (WT01 - Broadband Networks)
Sent: Thursday, June 29, 2006 10:30 AM
To: 'linuxppc-embedded@ozlabs.org'
Subject: unresolved symbol on target ... while insmod
Hello All ,
I compiled a driver module using cross compiler for MPC8247 , now when
I try to insert the module in to the target I give me an error like
root@10.0.0.2:/home# insmod linux-kernel-bde.o
Using linux-kernel-bde.o
insmod: unresolved symbol devfs_register
insmod: unresolved symbol vsprintf
insmod: unresolved symbol kmalloc
insmod: unresolved symbol create_proc_entry
insmod: unresolved symbol __get_free_pages
insmod: unresolved symbol __save_flags_ptr
insmod: unresolved symbol ioremap
insmod: unresolved symbol free_irq
insmod: unresolved symbol high_memory
insmod: unresolved symbol devfs_unregister
insmod: unresolved symbol iounmap
insmod: unresolved symbol free_pages
insmod: unresolved symbol kfree
insmod: unresolved symbol strlen
insmod: unresolved symbol remove_proc_entry
insmod: unresolved symbol request_irq
insmod: unresolved symbol mem_map
insmod: unresolved symbol simple_strtoul
insmod: unresolved symbol sprintf
insmod: unresolved symbol __restore_flags
insmod: unresolved symbol printk
insmod: unresolved symbol __cli
Can any one show me some pointers what is this error all about . And how
to over come this . Thanks in advance
Best Regards
Srideep
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
[-- Attachment #2: Type: text/html, Size: 9518 bytes --]
^ permalink raw reply
* Re: [PATCH 1/3] Add support for the Freescale MPC8349E-mITX eval board
From: Kumar Gala @ 2006-06-29 5:10 UTC (permalink / raw)
To: Kim Phillips; +Cc: linuxppc-dev
In-Reply-To: <20060628211317.7b21d085.kim.phillips@freescale.com>
On Jun 28, 2006, at 9:13 PM, Kim Phillips wrote:
> Add support for the Freescale MPC8349E-mITX eval board
>
> This is largely based on 8349 SYS code except that it uses the new
> rtc_class code in drivers/rtc instead of explicitly specifying the
> rtc chip. SATA is untested, as this is work in progress.
>
> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
>
> arch/powerpc/platforms/83xx/Kconfig | 11 ++
> arch/powerpc/platforms/83xx/Makefile | 1
> arch/powerpc/platforms/83xx/misc.c | 52 +++++++++
> arch/powerpc/platforms/83xx/mpc834x_itx.c | 166 ++++++++++++++++++
> +++++++++++
> arch/powerpc/platforms/83xx/mpc834x_itx.h | 23 ++++
> arch/powerpc/platforms/83xx/mpc83xx.h | 5 +
> include/asm-ppc/mpc83xx.h | 4 +
> 7 files changed, 261 insertions(+), 1 deletions(-)
> create mode 100644 arch/powerpc/platforms/83xx/mpc834x_itx.c
> create mode 100644 arch/powerpc/platforms/83xx/mpc834x_itx.h
>
> 3182b4a50027d17badab0c7b8dc2fd4d8fc307b0
> diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/
> platforms/83xx/Kconfig
> index 7675e67..5fe7b7f 100644
> --- a/arch/powerpc/platforms/83xx/Kconfig
> +++ b/arch/powerpc/platforms/83xx/Kconfig
> @@ -16,12 +16,21 @@ config MPC834x_SYS
> 3 PCI slots. The PIBs PCI initialization is the bootloader's
> responsiblilty.
>
> +config MPC834x_ITX
> + bool "Freescale MPC834x ITX"
> + select DEFAULT_UIMAGE
> + help
> + This option enables support for the MPC 834x ITX evaluation board.
> +
> + Be aware that PCI initialization is the bootloader's
> + responsiblilty.
> +
> endchoice
>
> config MPC834x
> bool
> select PPC_UDBG_16550
> select PPC_INDIRECT_PCI
> - default y if MPC834x_SYS
> + default y if MPC834x_SYS || MPC834x_ITX
>
> endmenu
> diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/
> platforms/83xx/Makefile
> index 5c72367..9387a11 100644
> --- a/arch/powerpc/platforms/83xx/Makefile
> +++ b/arch/powerpc/platforms/83xx/Makefile
> @@ -4,3 +4,4 @@
> obj-y := misc.o
> obj-$(CONFIG_PCI) += pci.o
> obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o
> +obj-$(CONFIG_MPC834x_ITX) += mpc834x_itx.o
> diff --git a/arch/powerpc/platforms/83xx/misc.c b/arch/powerpc/
> platforms/83xx/misc.c
> index 1455bce..568a8f7 100644
> --- a/arch/powerpc/platforms/83xx/misc.c
> +++ b/arch/powerpc/platforms/83xx/misc.c
> @@ -53,3 +53,55 @@ long __init mpc83xx_time_init(void)
>
> return 0;
> }
> +
> +#ifdef CONFIG_RTC_CLASS
> +int mpc83xx_set_rtc_time(struct rtc_time *tm)
> +{
> + int err;
> + struct class_device *class_dev =
> + rtc_class_open(CONFIG_RTC_HCTOSYS_DEVICE);
> +
> + if (class_dev == NULL) {
> + printk("%s: unable to open rtc device (%s)\n",
> + __FUNCTION__, CONFIG_RTC_HCTOSYS_DEVICE);
> + return -ENODEV;
> + }
> +
> + err = rtc_set_time(class_dev, tm);
> + if (err != 0)
> + dev_err(class_dev->dev,
> + "%s: unable to set the hardware clock\n",__FUNCTION__);
> +
> + rtc_class_close(class_dev);
> +
> + return 0;
> +}
> +
> +void mpc83xx_get_rtc_time(struct rtc_time *tm)
> +{
> + int err;
> + struct class_device *class_dev =
> + rtc_class_open(CONFIG_RTC_HCTOSYS_DEVICE);
> +
> + if (class_dev == NULL) {
> + printk("%s: unable to open rtc device (%s)\n",
> + __FUNCTION__, CONFIG_RTC_HCTOSYS_DEVICE);
> + return;
> + }
> +
> + err = rtc_read_time(class_dev, tm);
> + if (err == 0) {
> + err = rtc_valid_tm(tm);
> + if (err != 0)
> + dev_err(class_dev->dev,
> + "%s: invalid date/time\n",__FUNCTION__);
> + }
> + else
> + dev_err(class_dev->dev,
> + "%s: unable to read the hardware clock\n",__FUNCTION__);
> +
> + rtc_class_close(class_dev);
> +
> + return;
> +}
> +#endif /* CONFIG_RTC_CLASS */
What is this trying to accomplish? What RTC chip is on 834x ITC and
how's it connected?
> diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/
> powerpc/platforms/83xx/mpc834x_itx.c
> new file mode 100644
> index 0000000..0a3f58a
> --- /dev/null
> +++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c
> @@ -0,0 +1,166 @@
> +/*
> + * arch/powerpc/platforms/83xx/mpc834x_itx.c
> + *
> + * MPC834x ITX board specific routines
> + *
> + * Maintainer: Kumar Gala <galak@kernel.crashing.org>
> + *
> + * 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.
> + */
> +
> +#include <linux/config.h>
> +#include <linux/stddef.h>
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +#include <linux/errno.h>
> +#include <linux/reboot.h>
> +#include <linux/pci.h>
> +#include <linux/kdev_t.h>
> +#include <linux/major.h>
> +#include <linux/console.h>
> +#include <linux/delay.h>
> +#include <linux/seq_file.h>
> +#include <linux/root_dev.h>
> +
> +#include <asm/system.h>
> +#include <asm/atomic.h>
> +#include <asm/time.h>
> +#include <asm/io.h>
> +#include <asm/machdep.h>
> +#include <asm/ipic.h>
> +#include <asm/bootinfo.h>
> +#include <asm/irq.h>
> +#include <asm/prom.h>
> +#include <asm/udbg.h>
> +#include <sysdev/fsl_soc.h>
> +
> +#include "mpc83xx.h"
> +
> +#ifndef CONFIG_PCI
> +unsigned long isa_io_base = 0;
> +unsigned long isa_mem_base = 0;
> +#endif
> +
> +#ifdef CONFIG_PCI
> +static int
> +mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned
> char pin)
> +{
> + static char pci_irq_table[][4] =
> + /*
> + * PCI IDSEL/INTPIN->INTLINE
> + * A B C D
> + */
> + {
> + {PIRQB, PIRQC, PIRQD, PIRQA}, /* idsel 0x0e */
> + {PIRQA, PIRQB, PIRQC, PIRQD}, /* idsel 0x0f */
> + {PIRQC, PIRQD, PIRQA, PIRQB}, /* idsel 0x10 */
> + };
> +
> + const long min_idsel = 0x0e, max_idsel = 0x10, irqs_per_slot = 4;
> + return PCI_IRQ_TABLE_LOOKUP;
> +}
> +#endif /* CONFIG_PCI */
> +
> +/*
> **********************************************************************
> **
> + *
> + * Setup the architecture
> + *
> + */
> +static void __init mpc834x_itx_setup_arch(void)
> +{
> + struct device_node *np;
> +
> + if (ppc_md.progress)
> + ppc_md.progress("mpc834x_itx_setup_arch()", 0);
> +
> + np = of_find_node_by_type(NULL, "cpu");
> + if (np != 0) {
> + unsigned int *fp =
> + (int *)get_property(np, "clock-frequency", NULL);
> + if (fp != 0)
> + loops_per_jiffy = *fp / HZ;
> + else
> + loops_per_jiffy = 50000000 / HZ;
> + of_node_put(np);
> + }
> +#ifdef CONFIG_PCI
> + for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
> + add_bridge(np);
> +
> + ppc_md.pci_swizzle = common_swizzle;
> + ppc_md.pci_map_irq = mpc83xx_map_irq;
> + ppc_md.pci_exclude_device = mpc83xx_exclude_device;
> +#endif
> +
> +#ifdef CONFIG_ROOT_NFS
> + ROOT_DEV = Root_NFS;
> +#else
> + ROOT_DEV = Root_HDA1;
> +#endif
> +}
> +
> +void __init mpc834x_itx_init_IRQ(void)
> +{
> + u8 senses[8] = {
> + 0, /* EXT 0 */
> + IRQ_SENSE_LEVEL, /* EXT 1 */
> + IRQ_SENSE_LEVEL, /* EXT 2 */
> + 0, /* EXT 3 */
> +#ifdef CONFIG_PCI
> + IRQ_SENSE_LEVEL, /* EXT 4 */
> + IRQ_SENSE_LEVEL, /* EXT 5 */
> + IRQ_SENSE_LEVEL, /* EXT 6 */
> + IRQ_SENSE_LEVEL, /* EXT 7 */
> +#else
> + 0, /* EXT 4 */
> + 0, /* EXT 5 */
> + 0, /* EXT 6 */
> + 0, /* EXT 7 */
> +#endif
> + };
> +
> + ipic_init(get_immrbase() + 0x00700, 0, 0, senses, 8);
> +
> + /* Initialize the default interrupt mapping priorities,
> + * in case the boot rom changed something on us.
> + */
> + ipic_set_default_priority();
> +}
> +
> +#ifdef CONFIG_RTC_CLASS
> +static int __init mpc834x_rtc_hookup(void)
> +{
> + ppc_md.get_rtc_time = mpc83xx_get_rtc_time;
> + ppc_md.set_rtc_time = mpc83xx_set_rtc_time;
> +
> + return 0;
> +}
> +
> +late_initcall(mpc834x_rtc_hookup);
> +#endif
> +
> +/*
> + * Called very early, MMU is off, device-tree isn't unflattened
> + */
> +static int __init mpc834x_itx_probe(void)
> +{
> + /* We always match for now, eventually we should look at the flat
> + dev tree to ensure this is the board we are suppose to run on
> + */
> + return 1;
> +}
> +
> +define_machine(mpc834x_itx) {
> + .name = "MPC834x ITX",
> + .probe = mpc834x_itx_probe,
> + .setup_arch = mpc834x_itx_setup_arch,
> + .init_IRQ = mpc834x_itx_init_IRQ,
> + .get_irq = ipic_get_irq,
> + .restart = mpc83xx_restart,
> + .time_init = mpc83xx_time_init,
> + .calibrate_decr = generic_calibrate_decr,
> + .progress = udbg_progress,
> +};
> diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.h b/arch/
> powerpc/platforms/83xx/mpc834x_itx.h
> new file mode 100644
> index 0000000..174ca4e
> --- /dev/null
> +++ b/arch/powerpc/platforms/83xx/mpc834x_itx.h
> @@ -0,0 +1,23 @@
> +/*
> + * arch/powerpc/platforms/83xx/mpc834x_itx.h
> + *
> + * MPC834X ITX common board definitions
> + *
> + * Maintainer: Kumar Gala <galak@kernel.crashing.org>
> + *
> + * 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.
> + *
> + */
> +
> +#ifndef __MACH_MPC83XX_ITX_H__
> +#define __MACH_MPC83XX_ITX_H__
> +
> +#define PIRQA MPC83xx_IRQ_EXT4
> +#define PIRQB MPC83xx_IRQ_EXT5
> +#define PIRQC MPC83xx_IRQ_EXT6
> +#define PIRQD MPC83xx_IRQ_EXT7
> +
> +#endif /* __MACH_MPC83XX_ITX_H__ */
> diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/
> platforms/83xx/mpc83xx.h
> index 01cae10..532a084 100644
> --- a/arch/powerpc/platforms/83xx/mpc83xx.h
> +++ b/arch/powerpc/platforms/83xx/mpc83xx.h
> @@ -3,6 +3,7 @@
>
> #include <linux/init.h>
> #include <linux/device.h>
> +#include <linux/rtc.h>
>
> /*
> * Declaration for the various functions exported by the
> @@ -13,5 +14,9 @@ extern int add_bridge(struct device_node
> extern int mpc83xx_exclude_device(u_char bus, u_char devfn);
> extern void mpc83xx_restart(char *cmd);
> extern long mpc83xx_time_init(void);
> +#ifdef CONFIG_RTC_CLASS
> +extern int mpc83xx_set_rtc_time(struct rtc_time *tm);
> +extern void mpc83xx_get_rtc_time(struct rtc_time *tm);
> +#endif
>
> #endif /* __MPC83XX_H__ */
> diff --git a/include/asm-ppc/mpc83xx.h b/include/asm-ppc/mpc83xx.h
> index 02ed2c3..80076be 100644
> --- a/include/asm-ppc/mpc83xx.h
> +++ b/include/asm-ppc/mpc83xx.h
> @@ -25,6 +25,10 @@
> #include <platforms/83xx/mpc834x_sys.h>
> #endif
>
> +#ifdef CONFIG_MPC834x_ITX
> +#include <platforms/83xx/mpc834x_itx.h>
> +#endif
> +
This shouldn't be needed, its a hold over from arch/ppc
> #define _IO_BASE isa_io_base
> #define _ISA_MEM_BASE isa_mem_base
> #ifdef CONFIG_PCI
> --
> 1.2.4
^ permalink raw reply
* Re: Please pull from 'for_paulus' branch of powerpc
From: Kumar Gala @ 2006-06-29 5:08 UTC (permalink / raw)
To: Zhang Wei-r63237; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel
In-Reply-To: <9FCDBA58F226D911B202000BDBAD467306E19B76@zch01exm40.ap.freescale.net>
On Jun 28, 2006, at 10:33 PM, Zhang Wei-r63237 wrote:
>>
>> On Jun 28, 2006, at 1:26 AM, Zhang Wei-r63237 wrote:
>>
>>> Hi, Kumar,
>>>
>>> Why moving these codes from pci.c to mpc86xx_hpcn.c? It's
>> not must be.
>>> These functions relate to PCI device of MPC8641D HPCn platform.
>>> And we can also see the 'DECLARE_PCI_FIXUP_HEADER()' declaration in
>>> pci.c of Powermac platform.
>>
>> The point for moving is 86xx/pci.c should apply to all 86xx
>> systems, not just the HPCn system.
>>
>> - kumar
>
> The codes of moving is for PCI devices, it's for HPCn system now,
> but it's also fit for the same PCI chips in the other 86xx system
> and the same chip should keep the same setting in 86xx platforms, I
> think so.
>
> Even though other 86xx platforms have no these PCI chips, these
> codes will not take effect.
Its code bloat for systems that dont need it.
> And we can also see the similar solution in pSeries and PowerMac
> platforms pci.c file. The function 'fixup_winbond_82c105' in
> pseries/pci.c is for the Winbond 82c105 IDE controller on p610.
> (pSeries have only p610? :-D ) The function 'fixup_k2_sata' in
> powermac/pci.c is for K2-SATA. (K2-SATA chip is in all PowerMac
> machine? ;-) )
Realize, powermac and pseries describe actual full systems, not
processor families like 86xx.
> The moving will make the mpc86xx_hpcn.c more fat.
That's all relative.
- kumar
>
> Thanks,
> Zhang Wei
>
>>
>>>> -----Original Message-----
>>>> From: linuxppc-dev-bounces+wei.zhang=freescale.com@ozlabs.org
>>>> [mailto:linuxppc-dev-bounces+wei.zhang=freescale.com@ozlabs.or
>>>> g] On Behalf Of Kumar Gala
>>>> Sent: Wednesday, June 28, 2006 2:01 PM
>>>> To: Paul Mackerras
>>>> Cc: linuxppc-dev@ozlabs.org; linux-kernel@vger.kernel.org
>>>> Subject: Please pull from 'for_paulus' branch of powerpc
>>>>
>>>> Please pull from 'for_paulus' branch of
>>>> master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git
>>>>
>>>> to receive the following updates:
>>>>
>>>> arch/powerpc/kernel/cputable.c | 12 --
>>>> arch/powerpc/platforms/86xx/mpc86xx.h | 8 +
>>>> arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 128
>>>> +++++++++++++++++++++++++--
>>>> arch/powerpc/platforms/86xx/mpc86xx_smp.c | 9 -
>>>> arch/powerpc/platforms/86xx/pci.c | 136
>>>> +----------------------------
>>>> include/asm-powerpc/mpc86xx.h | 4
>>>> 6 files changed, 138 insertions(+), 159 deletions(-)
>>>>
>>>> Kumar Gala:
>>>> powerpc: minor cleanups for mpc86xx
>>>>
>>>> diff --git a/arch/powerpc/kernel/cputable.c
>>>> b/arch/powerpc/kernel/cputable.c index 1c11488..abf7d42 100644
>>>> --- a/arch/powerpc/kernel/cputable.c
>>>> +++ b/arch/powerpc/kernel/cputable.c
>>>> @@ -722,18 +722,6 @@ #if CLASSIC_PPC
>>>> .oprofile_type = PPC_OPROFILE_G4,
>>>> .platform = "ppc7450",
>>>> },
>>>> - { /* 8641 */
>>>> - .pvr_mask = 0xffffffff,
>>>> - .pvr_value = 0x80040010,
>>>> - .cpu_name = "8641",
>>>> - .cpu_features = CPU_FTRS_7447A,
>>>> - .cpu_user_features = COMMON_USER |
>>>> PPC_FEATURE_HAS_ALTIVEC_COMP,
>>>> - .icache_bsize = 32,
>>>> - .dcache_bsize = 32,
>>>> - .num_pmcs = 6,
>>>> - .cpu_setup = __setup_cpu_745x
>>>> - },
>>>> -
>>>> { /* 82xx (8240, 8245, 8260 are all 603e cores) */
>>>> .pvr_mask = 0x7fff0000,
>>>> .pvr_value = 0x00810000,
>>>> diff --git a/arch/powerpc/platforms/86xx/mpc86xx.h
>>>> b/arch/powerpc/platforms/86xx/mpc86xx.h
>>>> index e3c9e4f..2834462 100644
>>>> --- a/arch/powerpc/platforms/86xx/mpc86xx.h
>>>> +++ b/arch/powerpc/platforms/86xx/mpc86xx.h
>>>> @@ -15,11 +15,13 @@ #define __MPC86XX_H__
>>>> * mpc86xx_* files. Mostly for use by mpc86xx_setup().
>>>> */
>>>>
>>>> -extern int __init add_bridge(struct device_node *dev);
>>>> +extern int add_bridge(struct device_node *dev);
>>>>
>>>> -extern void __init setup_indirect_pcie(struct
>> pci_controller *hose,
>>>> +extern int mpc86xx_exclude_device(u_char bus, u_char devfn);
>>>> +
>>>> +extern void setup_indirect_pcie(struct pci_controller *hose,
>>>> u32 cfg_addr, u32
>>>> cfg_data); -extern void __init
>>>> setup_indirect_pcie_nomap(struct pci_controller *hose,
>>>> +extern void setup_indirect_pcie_nomap(struct pci_controller *hose,
>>>> void __iomem *cfg_addr,
>>>> void __iomem *cfg_data);
>>>>
>>>> diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
>>>> b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
>>>> index 483c21d..ac7f418 100644
>>>> --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
>>>> +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
>>>> @@ -36,6 +36,7 @@ #include <asm/mpic.h> #include
>> <sysdev/fsl_soc.h>
>>>>
>>>> #include "mpc86xx.h"
>>>> +#include "mpc8641_hpcn.h"
>>>>
>>>> #ifndef CONFIG_PCI
>>>> unsigned long isa_io_base = 0;
>>>> @@ -186,17 +187,130 @@ mpc86xx_map_irq(struct pci_dev *dev, uns
>>>> return PCI_IRQ_TABLE_LOOKUP + I8259_OFFSET; }
>>>>
>>>> +static void __devinit quirk_ali1575(struct pci_dev *dev) {
>>>> + unsigned short temp;
>>>> +
>>>> + /*
>>>> + * ALI1575 interrupts route table setup:
>>>> + *
>>>> + * IRQ pin IRQ#
>>>> + * PIRQA ---- 3
>>>> + * PIRQB ---- 4
>>>> + * PIRQC ---- 5
>>>> + * PIRQD ---- 6
>>>> + * PIRQE ---- 9
>>>> + * PIRQF ---- 10
>>>> + * PIRQG ---- 11
>>>> + * PIRQH ---- 12
>>>> + *
>>>> + * interrupts for PCI slot0 -- PIRQA / PIRQB / PIRQC / PIRQD
>>>> + * PCI slot1 -- PIRQB / PIRQC / PIRQD / PIRQA
>>>> + */
>>>> + pci_write_config_dword(dev, 0x48, 0xb9317542);
>>>> +
>>>> + /* USB 1.1 OHCI controller 1, interrupt: PIRQE */
>>>> + pci_write_config_byte(dev, 0x86, 0x0c);
>>>> +
>>>> + /* USB 1.1 OHCI controller 2, interrupt: PIRQF */
>>>> + pci_write_config_byte(dev, 0x87, 0x0d);
>>>> +
>>>> + /* USB 1.1 OHCI controller 3, interrupt: PIRQH */
>>>> + pci_write_config_byte(dev, 0x88, 0x0f);
>>>> +
>>>> + /* USB 2.0 controller, interrupt: PIRQ7 */
>>>> + pci_write_config_byte(dev, 0x74, 0x06);
>>>> +
>>>> + /* Audio controller, interrupt: PIRQE */
>>>> + pci_write_config_byte(dev, 0x8a, 0x0c);
>>>> +
>>>> + /* Modem controller, interrupt: PIRQF */
>>>> + pci_write_config_byte(dev, 0x8b, 0x0d);
>>>> +
>>>> + /* HD audio controller, interrupt: PIRQG */
>>>> + pci_write_config_byte(dev, 0x8c, 0x0e);
>>>> +
>>>> + /* Serial ATA interrupt: PIRQD */
>>>> + pci_write_config_byte(dev, 0x8d, 0x0b);
>>>> +
>>>> + /* SMB interrupt: PIRQH */
>>>> + pci_write_config_byte(dev, 0x8e, 0x0f);
>>>> +
>>>> + /* PMU ACPI SCI interrupt: PIRQH */
>>>> + pci_write_config_byte(dev, 0x8f, 0x0f);
>>>> +
>>>> + /* Primary PATA IDE IRQ: 14
>>>> + * Secondary PATA IDE IRQ: 15
>>>> + */
>>>> + pci_write_config_byte(dev, 0x44, 0x3d);
>>>> + pci_write_config_byte(dev, 0x75, 0x0f);
>>>> +
>>>> + /* Set IRQ14 and IRQ15 to legacy IRQs */
>>>> + pci_read_config_word(dev, 0x46, &temp);
>>>> + temp |= 0xc000;
>>>> + pci_write_config_word(dev, 0x46, temp);
>>>> +
>>>> + /* Set i8259 interrupt trigger
>>>> + * IRQ 3: Level
>>>> + * IRQ 4: Level
>>>> + * IRQ 5: Level
>>>> + * IRQ 6: Level
>>>> + * IRQ 7: Level
>>>> + * IRQ 9: Level
>>>> + * IRQ 10: Level
>>>> + * IRQ 11: Level
>>>> + * IRQ 12: Level
>>>> + * IRQ 14: Edge
>>>> + * IRQ 15: Edge
>>>> + */
>>>> + outb(0xfa, 0x4d0);
>>>> + outb(0x1e, 0x4d1);
>>>> +}
>>>>
>>>> -int
>>>> -mpc86xx_exclude_device(u_char bus, u_char devfn)
>>>> +static void __devinit quirk_uli5288(struct pci_dev *dev)
>>>> {
>>>> -#if !defined(CONFIG_PCI)
>>>> - if (bus == 0 && PCI_SLOT(devfn) == 0)
>>>> - return PCIBIOS_DEVICE_NOT_FOUND;
>>>> -#endif
>>>> + unsigned char c;
>>>> +
>>>> + pci_read_config_byte(dev,0x83,&c);
>>>> + c |= 0x80;
>>>> + pci_write_config_byte(dev, 0x83, c);
>>>> +
>>>> + pci_write_config_byte(dev, 0x09, 0x01);
>>>> + pci_write_config_byte(dev, 0x0a, 0x06);
>>>> +
>>>> + pci_read_config_byte(dev,0x83,&c);
>>>> + c &= 0x7f;
>>>> + pci_write_config_byte(dev, 0x83, c);
>>>>
>>>> - return PCIBIOS_SUCCESSFUL;
>>>> + pci_read_config_byte(dev,0x84,&c);
>>>> + c |= 0x01;
>>>> + pci_write_config_byte(dev, 0x84, c);
>>>> }
>>>> +
>>>> +static void __devinit quirk_uli5229(struct pci_dev *dev) {
>>>> + unsigned short temp;
>>>> + pci_write_config_word(dev, 0x04, 0x0405);
>>>> + pci_read_config_word(dev, 0x4a, &temp);
>>>> + temp |= 0x1000;
>>>> + pci_write_config_word(dev, 0x4a, temp); }
>>>> +
>>>> +static void __devinit early_uli5249(struct pci_dev *dev) {
>>>> + unsigned char temp;
>>>> + pci_write_config_word(dev, 0x04, 0x0007);
>>>> + pci_read_config_byte(dev, 0x7c, &temp);
>>>> + pci_write_config_byte(dev, 0x7c, 0x80);
>>>> + pci_write_config_byte(dev, 0x09, 0x01);
>>>> + pci_write_config_byte(dev, 0x7c, temp);
>>>> + dev->class |= 0x1;
>>>> +}
>>>> +
>>>> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575,
>> quirk_ali1575);
>>>> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288,
>> quirk_uli5288);
>>>> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229,
>> quirk_uli5229);
>>>> +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AL, 0x5249, early_uli5249);
>>>> #endif /* CONFIG_PCI */
>>>>
>>>>
>>>> diff --git a/arch/powerpc/platforms/86xx/mpc86xx_smp.c
>>>> b/arch/powerpc/platforms/86xx/mpc86xx_smp.c
>>>> index 944ec4b..9cca3d1 100644
>>>> --- a/arch/powerpc/platforms/86xx/mpc86xx_smp.c
>>>> +++ b/arch/powerpc/platforms/86xx/mpc86xx_smp.c
>>>> @@ -34,8 +34,8 @@ extern unsigned long __secondary_hold_ac static
>>>> void __init smp_86xx_release_core(int nr) {
>>>> - void *mcm_vaddr;
>>>> - unsigned long vaddr, pcr;
>>>> + __be32 __iomem *mcm_vaddr;
>>>> + unsigned long pcr;
>>>>
>>>> if (nr < 0 || nr >= NR_CPUS)
>>>> return;
>>>> @@ -45,10 +45,9 @@ smp_86xx_release_core(int nr)
>>>> */
>>>> mcm_vaddr = ioremap(get_immrbase() + MPC86xx_MCM_OFFSET,
>>>> MPC86xx_MCM_SIZE);
>>>> - vaddr = (unsigned long)mcm_vaddr + MCM_PORT_CONFIG_OFFSET;
>>>> - pcr = in_be32((volatile unsigned *)vaddr);
>>>> + pcr = in_be32(mcm_vaddr + (MCM_PORT_CONFIG_OFFSET >> 2));
>>>> pcr |= 1 << (nr + 24);
>>>> - out_be32((volatile unsigned *)vaddr, pcr);
>>>> + out_be32(mcm_vaddr + (MCM_PORT_CONFIG_OFFSET >> 2), pcr);
>>>> }
>>>>
>>>>
>>>> diff --git a/arch/powerpc/platforms/86xx/pci.c
>>>> b/arch/powerpc/platforms/86xx/pci.c
>>>> index 5180df7..0d8b340 100644
>>>> --- a/arch/powerpc/platforms/86xx/pci.c
>>>> +++ b/arch/powerpc/platforms/86xx/pci.c
>>>> @@ -122,15 +122,12 @@ static void __init setup_pcie_atmu(struc
>>>> static void __init mpc86xx_setup_pcie(struct pci_controller *hose,
>>>> u32 pcie_offset, u32 pcie_size) {
>>>> - volatile struct ccsr_pex *pcie;
>>>> u16 cmd;
>>>> unsigned int temps;
>>>>
>>>> DBG("PCIE host controller register offset 0x%08x, size
>> 0x%08x.\n",
>>>> pcie_offset, pcie_size);
>>>>
>>>> - pcie = ioremap(pcie_offset, pcie_size);
>>>> -
>>>> early_read_config_word(hose, 0, 0, PCI_COMMAND, &cmd);
>>>> cmd |= PCI_COMMAND_SERR | PCI_COMMAND_MASTER |
>> PCI_COMMAND_MEMORY
>>>> | PCI_COMMAND_IO;
>>>> @@ -144,6 +141,14 @@ mpc86xx_setup_pcie(struct pci_controller
>>>> early_write_config_dword(hose, 0, 0, PCI_PRIMARY_BUS, temps); }
>>>>
>>>> +int mpc86xx_exclude_device(u_char bus, u_char devfn) {
>>>> + if (bus == 0 && PCI_SLOT(devfn) == 0)
>>>> + return PCIBIOS_DEVICE_NOT_FOUND;
>>>> +
>>>> + return PCIBIOS_SUCCESSFUL;
>>>> +}
>>>> +
>>>> int __init add_bridge(struct device_node *dev) {
>>>> int len;
>>>> @@ -198,128 +203,3 @@ int __init add_bridge(struct device_node
>>>>
>>>> return 0;
>>>> }
>>>> -
>>>> -static void __devinit quirk_ali1575(struct pci_dev *dev) -{
>>>> - unsigned short temp;
>>>> -
>>>> - /*
>>>> - * ALI1575 interrupts route table setup:
>>>> - *
>>>> - * IRQ pin IRQ#
>>>> - * PIRQA ---- 3
>>>> - * PIRQB ---- 4
>>>> - * PIRQC ---- 5
>>>> - * PIRQD ---- 6
>>>> - * PIRQE ---- 9
>>>> - * PIRQF ---- 10
>>>> - * PIRQG ---- 11
>>>> - * PIRQH ---- 12
>>>> - *
>>>> - * interrupts for PCI slot0 -- PIRQA / PIRQB / PIRQC / PIRQD
>>>> - * PCI slot1 -- PIRQB / PIRQC / PIRQD / PIRQA
>>>> - */
>>>> - pci_write_config_dword(dev, 0x48, 0xb9317542);
>>>> -
>>>> - /* USB 1.1 OHCI controller 1, interrupt: PIRQE */
>>>> - pci_write_config_byte(dev, 0x86, 0x0c);
>>>> -
>>>> - /* USB 1.1 OHCI controller 2, interrupt: PIRQF */
>>>> - pci_write_config_byte(dev, 0x87, 0x0d);
>>>> -
>>>> - /* USB 1.1 OHCI controller 3, interrupt: PIRQH */
>>>> - pci_write_config_byte(dev, 0x88, 0x0f);
>>>> -
>>>> - /* USB 2.0 controller, interrupt: PIRQ7 */
>>>> - pci_write_config_byte(dev, 0x74, 0x06);
>>>> -
>>>> - /* Audio controller, interrupt: PIRQE */
>>>> - pci_write_config_byte(dev, 0x8a, 0x0c);
>>>> -
>>>> - /* Modem controller, interrupt: PIRQF */
>>>> - pci_write_config_byte(dev, 0x8b, 0x0d);
>>>> -
>>>> - /* HD audio controller, interrupt: PIRQG */
>>>> - pci_write_config_byte(dev, 0x8c, 0x0e);
>>>> -
>>>> - /* Serial ATA interrupt: PIRQD */
>>>> - pci_write_config_byte(dev, 0x8d, 0x0b);
>>>> -
>>>> - /* SMB interrupt: PIRQH */
>>>> - pci_write_config_byte(dev, 0x8e, 0x0f);
>>>> -
>>>> - /* PMU ACPI SCI interrupt: PIRQH */
>>>> - pci_write_config_byte(dev, 0x8f, 0x0f);
>>>> -
>>>> - /* Primary PATA IDE IRQ: 14
>>>> - * Secondary PATA IDE IRQ: 15
>>>> - */
>>>> - pci_write_config_byte(dev, 0x44, 0x3d);
>>>> - pci_write_config_byte(dev, 0x75, 0x0f);
>>>> -
>>>> - /* Set IRQ14 and IRQ15 to legacy IRQs */
>>>> - pci_read_config_word(dev, 0x46, &temp);
>>>> - temp |= 0xc000;
>>>> - pci_write_config_word(dev, 0x46, temp);
>>>> -
>>>> - /* Set i8259 interrupt trigger
>>>> - * IRQ 3: Level
>>>> - * IRQ 4: Level
>>>> - * IRQ 5: Level
>>>> - * IRQ 6: Level
>>>> - * IRQ 7: Level
>>>> - * IRQ 9: Level
>>>> - * IRQ 10: Level
>>>> - * IRQ 11: Level
>>>> - * IRQ 12: Level
>>>> - * IRQ 14: Edge
>>>> - * IRQ 15: Edge
>>>> - */
>>>> - outb(0xfa, 0x4d0);
>>>> - outb(0x1e, 0x4d1);
>>>> -}
>>>> -
>>>> -static void __devinit quirk_uli5288(struct pci_dev *dev) -{
>>>> - unsigned char c;
>>>> -
>>>> - pci_read_config_byte(dev,0x83,&c);
>>>> - c |= 0x80;
>>>> - pci_write_config_byte(dev, 0x83, c);
>>>> -
>>>> - pci_write_config_byte(dev, 0x09, 0x01);
>>>> - pci_write_config_byte(dev, 0x0a, 0x06);
>>>> -
>>>> - pci_read_config_byte(dev,0x83,&c);
>>>> - c &= 0x7f;
>>>> - pci_write_config_byte(dev, 0x83, c);
>>>> -
>>>> - pci_read_config_byte(dev,0x84,&c);
>>>> - c |= 0x01;
>>>> - pci_write_config_byte(dev, 0x84, c);
>>>> -}
>>>> -
>>>> -static void __devinit quirk_uli5229(struct pci_dev *dev) -{
>>>> - unsigned short temp;
>>>> - pci_write_config_word(dev, 0x04, 0x0405);
>>>> - pci_read_config_word(dev, 0x4a, &temp);
>>>> - temp |= 0x1000;
>>>> - pci_write_config_word(dev, 0x4a, temp);
>>>> -}
>>>> -
>>>> -static void __devinit early_uli5249(struct pci_dev *dev) -{
>>>> - unsigned char temp;
>>>> - pci_write_config_word(dev, 0x04, 0x0007);
>>>> - pci_read_config_byte(dev, 0x7c, &temp);
>>>> - pci_write_config_byte(dev, 0x7c, 0x80);
>>>> - pci_write_config_byte(dev, 0x09, 0x01);
>>>> - pci_write_config_byte(dev, 0x7c, temp);
>>>> - dev->class |= 0x1;
>>>> -}
>>>> -
>>>> -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575,
>> quirk_ali1575);
>>>> -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL,
>>>> 0x5288, quirk_uli5288);
>>>> -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229,
>> quirk_uli5229);
>>>> -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AL,
>>>> 0x5249, early_uli5249); diff --git
>>>> a/include/asm-powerpc/mpc86xx.h
>>>> b/include/asm-powerpc/mpc86xx.h index d0a6718..00d72a7 100644
>>>> --- a/include/asm-powerpc/mpc86xx.h
>>>> +++ b/include/asm-powerpc/mpc86xx.h
>>>> @@ -20,10 +20,6 @@ #include <asm/mmu.h>
>>>>
>>>> #ifdef CONFIG_PPC_86xx
>>>>
>>>> -#ifdef CONFIG_MPC8641_HPCN
>>>> -#include <platforms/86xx/mpc8641_hpcn.h> -#endif
>>>> -
>>>> #define _IO_BASE isa_io_base
>>>> #define _ISA_MEM_BASE isa_mem_base
>>>> #ifdef CONFIG_PCI
>>>>
>>>> _______________________________________________
>>>> Linuxppc-dev mailing list
>>>> Linuxppc-dev@ozlabs.org
>>>> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>>>>
>>
^ permalink raw reply
* [PATCH] Make lparcfg.c work when both iseries and pseries are selected
From: Stephen Rothwell @ 2006-06-29 5:07 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20060628072928.GX16029@localdomain>
This also consolidates the initial bits of lparcfg_data() and adds the
partition number to the iSeries flattened device tree.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/kernel/lparcfg.c | 147 ++++++++++++++++++-----------------
arch/powerpc/platforms/iseries/dt.c | 2
2 files changed, 78 insertions(+), 71 deletions(-)
Built and run on iSeries, built on pSeries.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c
index c02deaa..73edc3c 100644
--- a/arch/powerpc/kernel/lparcfg.c
+++ b/arch/powerpc/kernel/lparcfg.c
@@ -45,11 +45,9 @@ #define MODULE_NAME "lparcfg"
static struct proc_dir_entry *proc_ppc64_lparcfg;
#define LPARCFG_BUFF_SIZE 4096
-#ifdef CONFIG_PPC_ISERIES
-
/*
- * For iSeries legacy systems, the PPA purr function is available from the
- * emulated_time_base field in the paca.
+ * Track sum of all purrs across all processors. This is used to further
+ * calculate usage values by different applications
*/
static unsigned long get_purr(void)
{
@@ -57,48 +55,31 @@ static unsigned long get_purr(void)
int cpu;
for_each_possible_cpu(cpu) {
- sum_purr += lppaca[cpu].emulated_time_base;
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ sum_purr += lppaca[cpu].emulated_time_base;
+ else {
+ struct cpu_usage *cu;
-#ifdef PURR_DEBUG
- printk(KERN_INFO "get_purr for cpu (%d) has value (%ld) \n",
- cpu, lppaca[cpu].emulated_time_base);
-#endif
+ cu = &per_cpu(cpu_usage_array, cpu);
+ sum_purr += cu->current_tb;
+ }
}
return sum_purr;
}
-#define lparcfg_write NULL
+#ifdef CONFIG_PPC_ISERIES
/*
* Methods used to fetch LPAR data when running on an iSeries platform.
*/
-static int lparcfg_data(struct seq_file *m, void *v)
+static int iseries_lparcfg_data(struct seq_file *m, void *v)
{
- unsigned long pool_id, lp_index;
+ unsigned long pool_id;
int shared, entitled_capacity, max_entitled_capacity;
int processors, max_processors;
unsigned long purr = get_purr();
- seq_printf(m, "%s %s \n", MODULE_NAME, MODULE_VERS);
-
shared = (int)(get_lppaca()->shared_proc);
- seq_printf(m, "serial_number=%c%c%c%c%c%c%c\n",
- e2a(xItExtVpdPanel.mfgID[2]),
- e2a(xItExtVpdPanel.mfgID[3]),
- e2a(xItExtVpdPanel.systemSerial[1]),
- e2a(xItExtVpdPanel.systemSerial[2]),
- e2a(xItExtVpdPanel.systemSerial[3]),
- e2a(xItExtVpdPanel.systemSerial[4]),
- e2a(xItExtVpdPanel.systemSerial[5]));
-
- seq_printf(m, "system_type=%c%c%c%c\n",
- e2a(xItExtVpdPanel.machineType[0]),
- e2a(xItExtVpdPanel.machineType[1]),
- e2a(xItExtVpdPanel.machineType[2]),
- e2a(xItExtVpdPanel.machineType[3]));
-
- lp_index = HvLpConfig_getLpIndex();
- seq_printf(m, "partition_id=%d\n", (int)lp_index);
seq_printf(m, "system_active_processors=%d\n",
(int)HvLpConfig_getSystemPhysicalProcessors());
@@ -137,6 +118,14 @@ static int lparcfg_data(struct seq_file
return 0;
}
+
+#else /* CONFIG_PPC_ISERIES */
+
+static int iseries_lparcfg_data(struct seq_file *m, void *v)
+{
+ return 0;
+}
+
#endif /* CONFIG_PPC_ISERIES */
#ifdef CONFIG_PPC_PSERIES
@@ -213,22 +202,6 @@ static void h_pic(unsigned long *pool_id
log_plpar_hcall_return(rc, "H_PIC");
}
-/* Track sum of all purrs across all processors. This is used to further */
-/* calculate usage values by different applications */
-
-static unsigned long get_purr(void)
-{
- unsigned long sum_purr = 0;
- int cpu;
- struct cpu_usage *cu;
-
- for_each_possible_cpu(cpu) {
- cu = &per_cpu(cpu_usage_array, cpu);
- sum_purr += cu->current_tb;
- }
- return sum_purr;
-}
-
#define SPLPAR_CHARACTERISTICS_TOKEN 20
#define SPLPAR_MAXLENGTH 1026*(sizeof(char))
@@ -333,35 +306,13 @@ #endif
return count;
}
-static int lparcfg_data(struct seq_file *m, void *v)
+static int pseries_lparcfg_data(struct seq_file *m, void *v)
{
int partition_potential_processors;
int partition_active_processors;
- struct device_node *rootdn;
- const char *model = "";
- const char *system_id = "";
- unsigned int *lp_index_ptr, lp_index = 0;
struct device_node *rtas_node;
int *lrdrp = NULL;
- rootdn = find_path_device("/");
- if (rootdn) {
- model = get_property(rootdn, "model", NULL);
- system_id = get_property(rootdn, "system-id", NULL);
- lp_index_ptr = (unsigned int *)
- get_property(rootdn, "ibm,partition-no", NULL);
- if (lp_index_ptr)
- lp_index = *lp_index_ptr;
- }
-
- seq_printf(m, "%s %s \n", MODULE_NAME, MODULE_VERS);
-
- seq_printf(m, "serial_number=%s\n", system_id);
-
- seq_printf(m, "system_type=%s\n", model);
-
- seq_printf(m, "partition_id=%d\n", (int)lp_index);
-
rtas_node = find_path_device("/rtas");
if (rtas_node)
lrdrp = (int *)get_property(rtas_node, "ibm,lrdr-capacity",
@@ -549,8 +500,61 @@ out:
return retval;
}
+#else /* CONFIG_PPC_PSERIES */
+
+static int pseries_lparcfg_data(struct seq_file *m, void *v)
+{
+ return 0;
+}
+
+static ssize_t lparcfg_write(struct file *file, const char __user * buf,
+ size_t count, loff_t * off)
+{
+ return count;
+}
+
#endif /* CONFIG_PPC_PSERIES */
+static int lparcfg_data(struct seq_file *m, void *v)
+{
+ struct device_node *rootdn;
+ const char *model = "";
+ const char *system_id = "";
+ const char *tmp;
+ unsigned int *lp_index_ptr, lp_index = 0;
+
+ seq_printf(m, "%s %s \n", MODULE_NAME, MODULE_VERS);
+
+ rootdn = find_path_device("/");
+ if (rootdn) {
+ tmp = get_property(rootdn, "model", NULL);
+ if (tmp) {
+ model = tmp;
+ /* Skip "IBM," - see platforms/iseries/dt.c */
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ model += 4;
+ }
+ tmp = get_property(rootdn, "system-id", NULL);
+ if (tmp) {
+ system_id = tmp;
+ /* Skip "IBM," - see platforms/iseries/dt.c */
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ system_id += 4;
+ }
+ lp_index_ptr = (unsigned int *)
+ get_property(rootdn, "ibm,partition-no", NULL);
+ if (lp_index_ptr)
+ lp_index = *lp_index_ptr;
+ }
+ seq_printf(m, "serial_number=%s\n", system_id);
+ seq_printf(m, "system_type=%s\n", model);
+ seq_printf(m, "partition_id=%d\n", (int)lp_index);
+
+ if (firmware_has_feature(FW_FEATURE_ISERIES))
+ return iseries_lparcfg_data(m, v);
+ return pseries_lparcfg_data(m, v);
+}
+
static int lparcfg_open(struct inode *inode, struct file *file)
{
return single_open(file, lparcfg_data, NULL);
@@ -569,7 +573,8 @@ int __init lparcfg_init(void)
mode_t mode = S_IRUSR | S_IRGRP | S_IROTH;
/* Allow writing if we have FW_FEATURE_SPLPAR */
- if (firmware_has_feature(FW_FEATURE_SPLPAR)) {
+ if (firmware_has_feature(FW_FEATURE_SPLPAR) &&
+ !firmware_has_feature(FW_FEATURE_ISERIES)) {
lparcfg_fops.write = lparcfg_write;
mode |= S_IWUSR;
}
diff --git a/arch/powerpc/platforms/iseries/dt.c b/arch/powerpc/platforms/iseries/dt.c
index d3444aa..d194140 100644
--- a/arch/powerpc/platforms/iseries/dt.c
+++ b/arch/powerpc/platforms/iseries/dt.c
@@ -252,6 +252,7 @@ static void __init dt_model(struct iseri
{
char buf[16] = "IBM,";
+ /* N.B. lparcfg.c knows about the "IBM," prefixes ... */
/* "IBM," + mfgId[2:3] + systemSerial[1:5] */
strne2a(buf + 4, xItExtVpdPanel.mfgID + 2, 2);
strne2a(buf + 6, xItExtVpdPanel.systemSerial + 1, 5);
@@ -264,6 +265,7 @@ static void __init dt_model(struct iseri
dt_prop_str(dt, "model", buf);
dt_prop_str(dt, "compatible", "IBM,iSeries");
+ dt_prop_u32(dt, "ibm,partition-no", HvLpConfig_getLpIndex());
}
static void __init dt_do_vdevice(struct iseries_flat_dt *dt,
--
1.4.0
^ permalink raw reply related
* RE: Please pull from 'for_paulus' branch of powerpc
From: Zhang Wei-r63237 @ 2006-06-29 3:33 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel
>
> On Jun 28, 2006, at 1:26 AM, Zhang Wei-r63237 wrote:
>
> > Hi, Kumar,
> >
> > Why moving these codes from pci.c to mpc86xx_hpcn.c? It's
> not must be.
> > These functions relate to PCI device of MPC8641D HPCn platform.
> > And we can also see the 'DECLARE_PCI_FIXUP_HEADER()' declaration in
> > pci.c of Powermac platform.
>
> The point for moving is 86xx/pci.c should apply to all 86xx
> systems, not just the HPCn system.
>
> - kumar
The codes of moving is for PCI devices, it's for HPCn system now, but it's also fit for the same PCI chips in the other 86xx system and the same chip should keep the same setting in 86xx platforms, I think so.
Even though other 86xx platforms have no these PCI chips, these codes will not take effect.
And we can also see the similar solution in pSeries and PowerMac platforms pci.c file. The function 'fixup_winbond_82c105' in pseries/pci.c is for the Winbond 82c105 IDE controller on p610. (pSeries have only p610? :-D ) The function 'fixup_k2_sata' in powermac/pci.c is for K2-SATA. (K2-SATA chip is in all PowerMac machine? ;-) )
The moving will make the mpc86xx_hpcn.c more fat.
Thanks,
Zhang Wei
>
> >> -----Original Message-----
> >> From: linuxppc-dev-bounces+wei.zhang=freescale.com@ozlabs.org
> >> [mailto:linuxppc-dev-bounces+wei.zhang=freescale.com@ozlabs.or
> >> g] On Behalf Of Kumar Gala
> >> Sent: Wednesday, June 28, 2006 2:01 PM
> >> To: Paul Mackerras
> >> Cc: linuxppc-dev@ozlabs.org; linux-kernel@vger.kernel.org
> >> Subject: Please pull from 'for_paulus' branch of powerpc
> >>
> >> Please pull from 'for_paulus' branch of
> >> master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git
> >>
> >> to receive the following updates:
> >>
> >> arch/powerpc/kernel/cputable.c | 12 --
> >> arch/powerpc/platforms/86xx/mpc86xx.h | 8 +
> >> arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 128
> >> +++++++++++++++++++++++++--
> >> arch/powerpc/platforms/86xx/mpc86xx_smp.c | 9 -
> >> arch/powerpc/platforms/86xx/pci.c | 136
> >> +----------------------------
> >> include/asm-powerpc/mpc86xx.h | 4
> >> 6 files changed, 138 insertions(+), 159 deletions(-)
> >>
> >> Kumar Gala:
> >> powerpc: minor cleanups for mpc86xx
> >>
> >> diff --git a/arch/powerpc/kernel/cputable.c
> >> b/arch/powerpc/kernel/cputable.c index 1c11488..abf7d42 100644
> >> --- a/arch/powerpc/kernel/cputable.c
> >> +++ b/arch/powerpc/kernel/cputable.c
> >> @@ -722,18 +722,6 @@ #if CLASSIC_PPC
> >> .oprofile_type = PPC_OPROFILE_G4,
> >> .platform = "ppc7450",
> >> },
> >> - { /* 8641 */
> >> - .pvr_mask = 0xffffffff,
> >> - .pvr_value = 0x80040010,
> >> - .cpu_name = "8641",
> >> - .cpu_features = CPU_FTRS_7447A,
> >> - .cpu_user_features = COMMON_USER |
> >> PPC_FEATURE_HAS_ALTIVEC_COMP,
> >> - .icache_bsize = 32,
> >> - .dcache_bsize = 32,
> >> - .num_pmcs = 6,
> >> - .cpu_setup = __setup_cpu_745x
> >> - },
> >> -
> >> { /* 82xx (8240, 8245, 8260 are all 603e cores) */
> >> .pvr_mask = 0x7fff0000,
> >> .pvr_value = 0x00810000,
> >> diff --git a/arch/powerpc/platforms/86xx/mpc86xx.h
> >> b/arch/powerpc/platforms/86xx/mpc86xx.h
> >> index e3c9e4f..2834462 100644
> >> --- a/arch/powerpc/platforms/86xx/mpc86xx.h
> >> +++ b/arch/powerpc/platforms/86xx/mpc86xx.h
> >> @@ -15,11 +15,13 @@ #define __MPC86XX_H__
> >> * mpc86xx_* files. Mostly for use by mpc86xx_setup().
> >> */
> >>
> >> -extern int __init add_bridge(struct device_node *dev);
> >> +extern int add_bridge(struct device_node *dev);
> >>
> >> -extern void __init setup_indirect_pcie(struct
> pci_controller *hose,
> >> +extern int mpc86xx_exclude_device(u_char bus, u_char devfn);
> >> +
> >> +extern void setup_indirect_pcie(struct pci_controller *hose,
> >> u32 cfg_addr, u32
> >> cfg_data); -extern void __init
> >> setup_indirect_pcie_nomap(struct pci_controller *hose,
> >> +extern void setup_indirect_pcie_nomap(struct pci_controller *hose,
> >> void __iomem *cfg_addr,
> >> void __iomem *cfg_data);
> >>
> >> diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
> >> b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
> >> index 483c21d..ac7f418 100644
> >> --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
> >> +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
> >> @@ -36,6 +36,7 @@ #include <asm/mpic.h> #include
> <sysdev/fsl_soc.h>
> >>
> >> #include "mpc86xx.h"
> >> +#include "mpc8641_hpcn.h"
> >>
> >> #ifndef CONFIG_PCI
> >> unsigned long isa_io_base = 0;
> >> @@ -186,17 +187,130 @@ mpc86xx_map_irq(struct pci_dev *dev, uns
> >> return PCI_IRQ_TABLE_LOOKUP + I8259_OFFSET; }
> >>
> >> +static void __devinit quirk_ali1575(struct pci_dev *dev) {
> >> + unsigned short temp;
> >> +
> >> + /*
> >> + * ALI1575 interrupts route table setup:
> >> + *
> >> + * IRQ pin IRQ#
> >> + * PIRQA ---- 3
> >> + * PIRQB ---- 4
> >> + * PIRQC ---- 5
> >> + * PIRQD ---- 6
> >> + * PIRQE ---- 9
> >> + * PIRQF ---- 10
> >> + * PIRQG ---- 11
> >> + * PIRQH ---- 12
> >> + *
> >> + * interrupts for PCI slot0 -- PIRQA / PIRQB / PIRQC / PIRQD
> >> + * PCI slot1 -- PIRQB / PIRQC / PIRQD / PIRQA
> >> + */
> >> + pci_write_config_dword(dev, 0x48, 0xb9317542);
> >> +
> >> + /* USB 1.1 OHCI controller 1, interrupt: PIRQE */
> >> + pci_write_config_byte(dev, 0x86, 0x0c);
> >> +
> >> + /* USB 1.1 OHCI controller 2, interrupt: PIRQF */
> >> + pci_write_config_byte(dev, 0x87, 0x0d);
> >> +
> >> + /* USB 1.1 OHCI controller 3, interrupt: PIRQH */
> >> + pci_write_config_byte(dev, 0x88, 0x0f);
> >> +
> >> + /* USB 2.0 controller, interrupt: PIRQ7 */
> >> + pci_write_config_byte(dev, 0x74, 0x06);
> >> +
> >> + /* Audio controller, interrupt: PIRQE */
> >> + pci_write_config_byte(dev, 0x8a, 0x0c);
> >> +
> >> + /* Modem controller, interrupt: PIRQF */
> >> + pci_write_config_byte(dev, 0x8b, 0x0d);
> >> +
> >> + /* HD audio controller, interrupt: PIRQG */
> >> + pci_write_config_byte(dev, 0x8c, 0x0e);
> >> +
> >> + /* Serial ATA interrupt: PIRQD */
> >> + pci_write_config_byte(dev, 0x8d, 0x0b);
> >> +
> >> + /* SMB interrupt: PIRQH */
> >> + pci_write_config_byte(dev, 0x8e, 0x0f);
> >> +
> >> + /* PMU ACPI SCI interrupt: PIRQH */
> >> + pci_write_config_byte(dev, 0x8f, 0x0f);
> >> +
> >> + /* Primary PATA IDE IRQ: 14
> >> + * Secondary PATA IDE IRQ: 15
> >> + */
> >> + pci_write_config_byte(dev, 0x44, 0x3d);
> >> + pci_write_config_byte(dev, 0x75, 0x0f);
> >> +
> >> + /* Set IRQ14 and IRQ15 to legacy IRQs */
> >> + pci_read_config_word(dev, 0x46, &temp);
> >> + temp |= 0xc000;
> >> + pci_write_config_word(dev, 0x46, temp);
> >> +
> >> + /* Set i8259 interrupt trigger
> >> + * IRQ 3: Level
> >> + * IRQ 4: Level
> >> + * IRQ 5: Level
> >> + * IRQ 6: Level
> >> + * IRQ 7: Level
> >> + * IRQ 9: Level
> >> + * IRQ 10: Level
> >> + * IRQ 11: Level
> >> + * IRQ 12: Level
> >> + * IRQ 14: Edge
> >> + * IRQ 15: Edge
> >> + */
> >> + outb(0xfa, 0x4d0);
> >> + outb(0x1e, 0x4d1);
> >> +}
> >>
> >> -int
> >> -mpc86xx_exclude_device(u_char bus, u_char devfn)
> >> +static void __devinit quirk_uli5288(struct pci_dev *dev)
> >> {
> >> -#if !defined(CONFIG_PCI)
> >> - if (bus == 0 && PCI_SLOT(devfn) == 0)
> >> - return PCIBIOS_DEVICE_NOT_FOUND;
> >> -#endif
> >> + unsigned char c;
> >> +
> >> + pci_read_config_byte(dev,0x83,&c);
> >> + c |= 0x80;
> >> + pci_write_config_byte(dev, 0x83, c);
> >> +
> >> + pci_write_config_byte(dev, 0x09, 0x01);
> >> + pci_write_config_byte(dev, 0x0a, 0x06);
> >> +
> >> + pci_read_config_byte(dev,0x83,&c);
> >> + c &= 0x7f;
> >> + pci_write_config_byte(dev, 0x83, c);
> >>
> >> - return PCIBIOS_SUCCESSFUL;
> >> + pci_read_config_byte(dev,0x84,&c);
> >> + c |= 0x01;
> >> + pci_write_config_byte(dev, 0x84, c);
> >> }
> >> +
> >> +static void __devinit quirk_uli5229(struct pci_dev *dev) {
> >> + unsigned short temp;
> >> + pci_write_config_word(dev, 0x04, 0x0405);
> >> + pci_read_config_word(dev, 0x4a, &temp);
> >> + temp |= 0x1000;
> >> + pci_write_config_word(dev, 0x4a, temp); }
> >> +
> >> +static void __devinit early_uli5249(struct pci_dev *dev) {
> >> + unsigned char temp;
> >> + pci_write_config_word(dev, 0x04, 0x0007);
> >> + pci_read_config_byte(dev, 0x7c, &temp);
> >> + pci_write_config_byte(dev, 0x7c, 0x80);
> >> + pci_write_config_byte(dev, 0x09, 0x01);
> >> + pci_write_config_byte(dev, 0x7c, temp);
> >> + dev->class |= 0x1;
> >> +}
> >> +
> >> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575,
> quirk_ali1575);
> >> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288,
> quirk_uli5288);
> >> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229,
> quirk_uli5229);
> >> +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AL, 0x5249, early_uli5249);
> >> #endif /* CONFIG_PCI */
> >>
> >>
> >> diff --git a/arch/powerpc/platforms/86xx/mpc86xx_smp.c
> >> b/arch/powerpc/platforms/86xx/mpc86xx_smp.c
> >> index 944ec4b..9cca3d1 100644
> >> --- a/arch/powerpc/platforms/86xx/mpc86xx_smp.c
> >> +++ b/arch/powerpc/platforms/86xx/mpc86xx_smp.c
> >> @@ -34,8 +34,8 @@ extern unsigned long __secondary_hold_ac static
> >> void __init smp_86xx_release_core(int nr) {
> >> - void *mcm_vaddr;
> >> - unsigned long vaddr, pcr;
> >> + __be32 __iomem *mcm_vaddr;
> >> + unsigned long pcr;
> >>
> >> if (nr < 0 || nr >= NR_CPUS)
> >> return;
> >> @@ -45,10 +45,9 @@ smp_86xx_release_core(int nr)
> >> */
> >> mcm_vaddr = ioremap(get_immrbase() + MPC86xx_MCM_OFFSET,
> >> MPC86xx_MCM_SIZE);
> >> - vaddr = (unsigned long)mcm_vaddr + MCM_PORT_CONFIG_OFFSET;
> >> - pcr = in_be32((volatile unsigned *)vaddr);
> >> + pcr = in_be32(mcm_vaddr + (MCM_PORT_CONFIG_OFFSET >> 2));
> >> pcr |= 1 << (nr + 24);
> >> - out_be32((volatile unsigned *)vaddr, pcr);
> >> + out_be32(mcm_vaddr + (MCM_PORT_CONFIG_OFFSET >> 2), pcr);
> >> }
> >>
> >>
> >> diff --git a/arch/powerpc/platforms/86xx/pci.c
> >> b/arch/powerpc/platforms/86xx/pci.c
> >> index 5180df7..0d8b340 100644
> >> --- a/arch/powerpc/platforms/86xx/pci.c
> >> +++ b/arch/powerpc/platforms/86xx/pci.c
> >> @@ -122,15 +122,12 @@ static void __init setup_pcie_atmu(struc
> >> static void __init mpc86xx_setup_pcie(struct pci_controller *hose,
> >> u32 pcie_offset, u32 pcie_size) {
> >> - volatile struct ccsr_pex *pcie;
> >> u16 cmd;
> >> unsigned int temps;
> >>
> >> DBG("PCIE host controller register offset 0x%08x, size
> 0x%08x.\n",
> >> pcie_offset, pcie_size);
> >>
> >> - pcie = ioremap(pcie_offset, pcie_size);
> >> -
> >> early_read_config_word(hose, 0, 0, PCI_COMMAND, &cmd);
> >> cmd |= PCI_COMMAND_SERR | PCI_COMMAND_MASTER |
> PCI_COMMAND_MEMORY
> >> | PCI_COMMAND_IO;
> >> @@ -144,6 +141,14 @@ mpc86xx_setup_pcie(struct pci_controller
> >> early_write_config_dword(hose, 0, 0, PCI_PRIMARY_BUS, temps); }
> >>
> >> +int mpc86xx_exclude_device(u_char bus, u_char devfn) {
> >> + if (bus == 0 && PCI_SLOT(devfn) == 0)
> >> + return PCIBIOS_DEVICE_NOT_FOUND;
> >> +
> >> + return PCIBIOS_SUCCESSFUL;
> >> +}
> >> +
> >> int __init add_bridge(struct device_node *dev) {
> >> int len;
> >> @@ -198,128 +203,3 @@ int __init add_bridge(struct device_node
> >>
> >> return 0;
> >> }
> >> -
> >> -static void __devinit quirk_ali1575(struct pci_dev *dev) -{
> >> - unsigned short temp;
> >> -
> >> - /*
> >> - * ALI1575 interrupts route table setup:
> >> - *
> >> - * IRQ pin IRQ#
> >> - * PIRQA ---- 3
> >> - * PIRQB ---- 4
> >> - * PIRQC ---- 5
> >> - * PIRQD ---- 6
> >> - * PIRQE ---- 9
> >> - * PIRQF ---- 10
> >> - * PIRQG ---- 11
> >> - * PIRQH ---- 12
> >> - *
> >> - * interrupts for PCI slot0 -- PIRQA / PIRQB / PIRQC / PIRQD
> >> - * PCI slot1 -- PIRQB / PIRQC / PIRQD / PIRQA
> >> - */
> >> - pci_write_config_dword(dev, 0x48, 0xb9317542);
> >> -
> >> - /* USB 1.1 OHCI controller 1, interrupt: PIRQE */
> >> - pci_write_config_byte(dev, 0x86, 0x0c);
> >> -
> >> - /* USB 1.1 OHCI controller 2, interrupt: PIRQF */
> >> - pci_write_config_byte(dev, 0x87, 0x0d);
> >> -
> >> - /* USB 1.1 OHCI controller 3, interrupt: PIRQH */
> >> - pci_write_config_byte(dev, 0x88, 0x0f);
> >> -
> >> - /* USB 2.0 controller, interrupt: PIRQ7 */
> >> - pci_write_config_byte(dev, 0x74, 0x06);
> >> -
> >> - /* Audio controller, interrupt: PIRQE */
> >> - pci_write_config_byte(dev, 0x8a, 0x0c);
> >> -
> >> - /* Modem controller, interrupt: PIRQF */
> >> - pci_write_config_byte(dev, 0x8b, 0x0d);
> >> -
> >> - /* HD audio controller, interrupt: PIRQG */
> >> - pci_write_config_byte(dev, 0x8c, 0x0e);
> >> -
> >> - /* Serial ATA interrupt: PIRQD */
> >> - pci_write_config_byte(dev, 0x8d, 0x0b);
> >> -
> >> - /* SMB interrupt: PIRQH */
> >> - pci_write_config_byte(dev, 0x8e, 0x0f);
> >> -
> >> - /* PMU ACPI SCI interrupt: PIRQH */
> >> - pci_write_config_byte(dev, 0x8f, 0x0f);
> >> -
> >> - /* Primary PATA IDE IRQ: 14
> >> - * Secondary PATA IDE IRQ: 15
> >> - */
> >> - pci_write_config_byte(dev, 0x44, 0x3d);
> >> - pci_write_config_byte(dev, 0x75, 0x0f);
> >> -
> >> - /* Set IRQ14 and IRQ15 to legacy IRQs */
> >> - pci_read_config_word(dev, 0x46, &temp);
> >> - temp |= 0xc000;
> >> - pci_write_config_word(dev, 0x46, temp);
> >> -
> >> - /* Set i8259 interrupt trigger
> >> - * IRQ 3: Level
> >> - * IRQ 4: Level
> >> - * IRQ 5: Level
> >> - * IRQ 6: Level
> >> - * IRQ 7: Level
> >> - * IRQ 9: Level
> >> - * IRQ 10: Level
> >> - * IRQ 11: Level
> >> - * IRQ 12: Level
> >> - * IRQ 14: Edge
> >> - * IRQ 15: Edge
> >> - */
> >> - outb(0xfa, 0x4d0);
> >> - outb(0x1e, 0x4d1);
> >> -}
> >> -
> >> -static void __devinit quirk_uli5288(struct pci_dev *dev) -{
> >> - unsigned char c;
> >> -
> >> - pci_read_config_byte(dev,0x83,&c);
> >> - c |= 0x80;
> >> - pci_write_config_byte(dev, 0x83, c);
> >> -
> >> - pci_write_config_byte(dev, 0x09, 0x01);
> >> - pci_write_config_byte(dev, 0x0a, 0x06);
> >> -
> >> - pci_read_config_byte(dev,0x83,&c);
> >> - c &= 0x7f;
> >> - pci_write_config_byte(dev, 0x83, c);
> >> -
> >> - pci_read_config_byte(dev,0x84,&c);
> >> - c |= 0x01;
> >> - pci_write_config_byte(dev, 0x84, c);
> >> -}
> >> -
> >> -static void __devinit quirk_uli5229(struct pci_dev *dev) -{
> >> - unsigned short temp;
> >> - pci_write_config_word(dev, 0x04, 0x0405);
> >> - pci_read_config_word(dev, 0x4a, &temp);
> >> - temp |= 0x1000;
> >> - pci_write_config_word(dev, 0x4a, temp);
> >> -}
> >> -
> >> -static void __devinit early_uli5249(struct pci_dev *dev) -{
> >> - unsigned char temp;
> >> - pci_write_config_word(dev, 0x04, 0x0007);
> >> - pci_read_config_byte(dev, 0x7c, &temp);
> >> - pci_write_config_byte(dev, 0x7c, 0x80);
> >> - pci_write_config_byte(dev, 0x09, 0x01);
> >> - pci_write_config_byte(dev, 0x7c, temp);
> >> - dev->class |= 0x1;
> >> -}
> >> -
> >> -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575,
> quirk_ali1575);
> >> -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL,
> >> 0x5288, quirk_uli5288);
> >> -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229,
> quirk_uli5229);
> >> -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AL,
> >> 0x5249, early_uli5249); diff --git
> >> a/include/asm-powerpc/mpc86xx.h
> >> b/include/asm-powerpc/mpc86xx.h index d0a6718..00d72a7 100644
> >> --- a/include/asm-powerpc/mpc86xx.h
> >> +++ b/include/asm-powerpc/mpc86xx.h
> >> @@ -20,10 +20,6 @@ #include <asm/mmu.h>
> >>
> >> #ifdef CONFIG_PPC_86xx
> >>
> >> -#ifdef CONFIG_MPC8641_HPCN
> >> -#include <platforms/86xx/mpc8641_hpcn.h> -#endif
> >> -
> >> #define _IO_BASE isa_io_base
> >> #define _ISA_MEM_BASE isa_mem_base
> >> #ifdef CONFIG_PCI
> >>
> >> _______________________________________________
> >> Linuxppc-dev mailing list
> >> Linuxppc-dev@ozlabs.org
> >> https://ozlabs.org/mailman/listinfo/linuxppc-dev
> >>
>
^ permalink raw reply
* Re: Xilinx SystemACE driver for 2.6
From: sudheer @ 2006-06-29 2:45 UTC (permalink / raw)
To: Ameet Patil; +Cc: linuxppc-embedded
In-Reply-To: <44A2C7CE.9070302@gmail.com>
Hi Ameet,
Your mail is not clear.
Ameet Patil wrote:
>Hi,
> I have ported System Ace driver from 2.4 to 2.6.
>
Hope you have ported System Ace Driver from 2.4 to 2.6.
>Please post the patch soon.
>
>
Or else you are asking the group for patch to port it.
Please make it clear.
I am looking for the same .
Thanks
Sudheer
>-Ameet
>_______________________________________________
>Linuxppc-embedded mailing list
>Linuxppc-embedded@ozlabs.org
>https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
>
>
^ permalink raw reply
* [PATCH 2/3] Add support for the Cicada 8201 PHY
From: Kim Phillips @ 2006-06-29 2:13 UTC (permalink / raw)
To: netdev, linuxppc-dev; +Cc: jeff
Add support for the Cicada 8201 PHY, a.k.a Vitesse VSC8201. This PHY is present on the MPC8349mITX.
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
---
drivers/net/phy/cicada.c | 42 ++++++++++++++++++++++++++++++++++++------
1 files changed, 36 insertions(+), 6 deletions(-)
9834dea86d3620e223584ebc2b04fda4e44092a9
diff --git a/drivers/net/phy/cicada.c b/drivers/net/phy/cicada.c
index 7d8d534..b755c86 100644
--- a/drivers/net/phy/cicada.c
+++ b/drivers/net/phy/cicada.c
@@ -104,7 +104,22 @@ static int cis820x_config_intr(struct ph
return err;
}
-/* Cicada 820x */
+/* Cicada 8201, a.k.a Vitesse VSC8201 */
+static struct phy_driver cis8201_driver = {
+ .phy_id = 0x000fc410,
+ .name = "Cicada Cis8201",
+ .phy_id_mask = 0x000ffff0,
+ .features = PHY_GBIT_FEATURES,
+ .flags = PHY_HAS_INTERRUPT,
+ .config_init = &cis820x_config_init,
+ .config_aneg = &genphy_config_aneg,
+ .read_status = &genphy_read_status,
+ .ack_interrupt = &cis820x_ack_interrupt,
+ .config_intr = &cis820x_config_intr,
+ .driver = { .owner = THIS_MODULE,},
+};
+
+/* Cicada 8204 */
static struct phy_driver cis8204_driver = {
.phy_id = 0x000fc440,
.name = "Cicada Cis8204",
@@ -119,15 +134,30 @@ static struct phy_driver cis8204_driver
.driver = { .owner = THIS_MODULE,},
};
-static int __init cis8204_init(void)
+static int __init cicada_init(void)
{
- return phy_driver_register(&cis8204_driver);
+ int ret;
+
+ ret = phy_driver_register(&cis8204_driver);
+ if (ret)
+ goto err1;
+
+ ret = phy_driver_register(&cis8201_driver);
+ if (ret)
+ goto err2;
+ return 0;
+
+err2:
+ phy_driver_unregister(&cis8204_driver);
+err1:
+ return ret;
}
-static void __exit cis8204_exit(void)
+static void __exit cicada_exit(void)
{
phy_driver_unregister(&cis8204_driver);
+ phy_driver_unregister(&cis8201_driver);
}
-module_init(cis8204_init);
-module_exit(cis8204_exit);
+module_init(cicada_init);
+module_exit(cicada_exit);
--
1.2.4
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox