* Re: [PATCH 4/11] qe_lib: Add QE I/O ports API
From: Andy Fleming @ 2006-09-21 20:38 UTC (permalink / raw)
To: Joakim Tjernlund; +Cc: linuxppc-dev, Li Yang
In-Reply-To: <F6AD7E21CDF4E145A44F61F43EE6D9399B44EF@tmnt04.transmode.se>
>
>> +static int qe_irq_ports[NUM_OF_PAR_IOS][NUM_OF_PINS] = {
>> + /* 0-7 */ /* 8-15 */ /* 16 - 23 */ /*
>> 24 - 31 */
>> + {0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,1, 1,0,0,0,0,0,0,0,
>> 0,0,0,0,0,1,1,0},
>> + {0,0,0,1,0,1,0,0, 0,0,0,0,1,1,0,0, 0,0,0,0,0,0,0,0,
>> 0,0,1,1,0,0,0,0},
>> + {0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
>> 0,0,0,1,1,1,0,0},
>> + {0,0,0,0,0,0,0,0, 0,0,0,0,1,1,0,0, 1,1,0,0,0,0,0,0,
>> 0,0,1,1,0,0,0,0},
>> + {0,0,0,0,0,0,0,0, 0,0,0,0,1,1,0,0, 0,0,0,0,0,0,0,0,
>> 1,1,1,1,0,0,0,1},
>> + {0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,1,0,0,0,
>> 0,0,0,0,0,0,0,0},
>> + {0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
>> 0,0,0,0,0,0,0,1}
>> +};
>
> qe_irq_ports is diffrent on 8321 not only the number of rows.
>
> These needs to configuruable based on CPU model and/or type of board.
That sounds like a job for the DTS
^ permalink raw reply
* Re: linux-2.6 system ACE driver - need help
From: agnel juni @ 2006-09-21 21:52 UTC (permalink / raw)
To: Jeff Angielski; +Cc: linuxppc-embedded
In-Reply-To: <1158755925.8564.19.camel@sumo-jaa>
[-- Attachment #1: Type: text/plain, Size: 4191 bytes --]
Hi Jeff,
Thanks for your reply.
> Does it work for you in polling mode? If not, you probably have a
problem with the way you are accessing the system ace - cache,
endianess, byte alignment, etc. If it does work in polling, the usual
suspects are interrupt masking errors or some low level problems with
your IRQ signals. Since you know the size of a sector and the size of
the sysace buffers, how many interrupts do you get per sector read? Do
you see extras or not enough?
I heard from Ameet Patil that this driver is not tested in poilling mode and it failed when we tried also.
Thats when we moved to interrupt mode.
I did check for the endianess...byte alignment etc.It looks ok to me.
I am using a 64 MB flash. And the sector sice is 512K.When the kernel boots up I see 128 interrupts getting registered. (I think its from alloc_disk(16) function in adapter.c )
Seems like the driver has issues with completing the request.
We are having issues while mouting the device. It is erratic, that sometimes we are able to mount/list files, copy files.
But sometimes the kernel crashes and gives a Ooops message like :
/*********************************************************/
# ls /mnt/Oops: kernel access of bad area, sig: 11 [#1]
NIP: C00556B8 LR: C00557E4 CTR: 00000000
REGS: dfec1e08 TRAP: 0300 Not tainted (2.6.16.2)
MSR: 00021000 <ME> CR: 22128828 XER: 00000000
DAR: 30303030, DSISR: 00800000
TASK = dff6c030[4] 'events/0' THREAD: dfec0000
GPR00: 00100100 DFEC1EB8 DFF6C030 C0258C60 DFF7BE10 00000018 DF4E9000 C0256D60
GPR08: 30303030 00200200 DF4E9154 30303030 22128888 00100400 1FFB9700 00000000
GPR16: 00000001 FFFFFFFF 00000000 007FFF00 1FFB3604 1FF63CE0 1FFCEF78 C01F0000
GPR24: C0240000 00100100 C0240000 00000000 DFF7BE10 00000018 00000000 C0258C60
NIP [C00556B8] free_block+0xa8/0x148
LR [C00557E4] drain_array_locked+0x8c/0xd8
Call Trace:
[DFEC1EB8] [DFCA9490] 0xdfca9490 (unreliable)
[DFEC1ED8] [C00557E4] drain_array_locked+0x8c/0xd8
[DFEC1EF0] [C0056F80] cache_reap+0x74/0x18c
[DFEC1F28] [C002B578] run_workqueue+0x9c/0x110
[DFEC1F48] [C002B6E4] worker_thread+0xf8/0x13c
[DFEC1FC0] [C002F6F0] kthread+0xf4/0x130
[DFEC1FF0] [C000413C] kernel_thread+0x44/0x60
Instruction dump:
7cfbfa14 3c000010 80e70014 3d2a4000 60000100 5529c9f4 7d295a14 80c9001c
3d200020 61290200 81060004 81660000 <91680000> 910b0004 3966001c 90060000
BUG: events/0/4, lock held at task exit time!
[c01f5d60] {cache_chain_mutex}
.. held by: events/0: 4 [dff6c030, 110]
... acquired at: cache_reap+0x1c/0x18c
/*******************************************************************/
We are able to do this after modiifying the file xsysace_compactflash.c and xsysace_intr.c to reset the controller( It was commented out by applying the patch).
The data in the CF looks sane.
Please advise.
Thanks for your help.
Thanks
Junita
.
Does it work for you in polling mode? If not, you probably have a
problem with the way you are accessing the system ace - cache,
endianess, byte alignment, etc. If it does work in polling, the usual
suspects are interrupt masking errors or some low level problems with
your IRQ signals. Since you know the size of a sector and the size of
the sysace buffers, how many interrupts do you get per sector read? Do
you see extras or not enough?
> We are able to mount the CF, but it is very inconsistent.
Dump the sector data to the screen that you are reading from the CF.
Especially look at the results from the initial identify command to
verify that they make sense, and because that is the easiest to check.
> Same is the case with fdisk command. When it fails,we get errors which you could see in the screen-dump below.
> Are we missing to apply the right patch? Please let us know your
> inputs to go forward.
> Looking forwards for your reply.
>
> # mount -t msdos /dev/xsysace /root/cf
Shouldn't this be /dev/xsysace1? You want to mount a partition not the
entire block device.
--
Jeff Angielski
The PTR Group
---------------------------------
Find out what India is talking about on - Yahoo! Answers India
Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
[-- Attachment #2: Type: text/html, Size: 5024 bytes --]
^ permalink raw reply
* compile errors
From: Mike Miller (OS Dev) @ 2006-09-21 21:35 UTC (permalink / raw)
To: linuxppc-embedded
Hello,
I tried searching for my error without any luck.
I'm new to PPC and embedded linux so please bear with me. I'm trying to cross-compile
on an x86 host for a PPC 440SP target. I downloaded and installed the ELDK from
Wolfgang Denk's website. I execute:
make ARCH=ppc CROSS_COMPILE=ppc_45xx- menuconfig
and configure, save, and exit. To try and build the kernel I execute:
make ARCH=ppc CROSS_COMPILE=ppc_45xx-
it cranks along for a minute before erroring out with:
ppc_4xx-gcc -m32 -Wp,-MD,arch/powerpc/kernel/.process.o.d -nostdinc -isystem /home/embedded/denx/usr/bin/../lib/gcc/powerpc-linux/4.0.0/include -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Iarch/ppc -Iarch/ppc/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -Os -fomit-frame-pointer -g -Iarch/ppc -msoft-float -pipe -ffixed-r2 -mmultiple -mno-altivec -mstring -Wa,-m405 -Wdeclaration-after-statement -Wno-pointer-sign -DKBUILD_BASENAME=process -DKBUILD_MODNAME=process -c -o arch/powerpc/kernel/.tmp_process.o arch/powerpc/kernel/process.c
arch/powerpc/kernel/process.c: In function 'set_dabr':
arch/powerpc/kernel/process.c:228: error: 'struct machdep_calls' has no member named 'set_dabr'
arch/powerpc/kernel/process.c:229: error: 'struct machdep_calls' has no member named 'set_dabr'
make[1]: *** [arch/powerpc/kernel/process.o] Error 1
make: *** [arch/powerpc/kernel] Error 2
Any suggestions on what's wrong? I've had the same error on the 2.6.15 kernel provided
with the ELDK as well as kernel.org 2.6.10 and 2.6.16.29. My path points to the
denx directories first and ${CROSS_COMPILE}=ppc_4xx-.
Any help is greatly appreciated.
Thanks,
mikem
^ permalink raw reply
* [PATCH] Include <asm/mmu.h> in arch/powerpc/sysdev/fsl_soc.h for phys_addr_t.
From: Scott Wood @ 2006-09-21 18:11 UTC (permalink / raw)
To: linuxppc-dev
This patch causes fsl_soc.h to import the definition of phys_addr_t
itself, rather than relying on its includer to do so.
Signed-off-by: Scott Wood <scott@freescale.com>
---
arch/powerpc/sysdev/fsl_soc.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/sysdev/fsl_soc.h b/arch/powerpc/sysdev/fsl_soc.h
index c433d3f..5a3dd48 100644
--- a/arch/powerpc/sysdev/fsl_soc.h
+++ b/arch/powerpc/sysdev/fsl_soc.h
@@ -2,6 +2,8 @@ #ifndef __PPC_FSL_SOC_H
#define __PPC_FSL_SOC_H
#ifdef __KERNEL__
+#include <asm/mmu.h>
+
extern phys_addr_t get_immrbase(void);
#endif
--
1.4.2.1
^ permalink raw reply related
* [PATCH]: PCI Error Recovery: Symbios SCSI device driver
From: Linas Vepstas @ 2006-09-21 23:13 UTC (permalink / raw)
To: matthew; +Cc: linuxppc-dev, linux-pci, linux-kernel, linux-scsi
Matthew,
I hope this looks like a good patch. Please review, apply and
forward upstream.
--linas
Various PCI bus errors can be signaled by newer PCI controllers.
This patch adds the PCI error recovery callbacks to the Symbios
SCSI device driver. The patch has been tested, and appears to
work well.
Signed-off-by: Linas Vepstas <linas@ausin.ibm.com>
----
drivers/scsi/sym53c8xx_2/sym_glue.c | 97 ++++++++++++++++++++++++++++++++++++
drivers/scsi/sym53c8xx_2/sym_glue.h | 4 +
drivers/scsi/sym53c8xx_2/sym_hipd.c | 10 +++
3 files changed, 111 insertions(+)
Index: linux-2.6.18-rc7-git1/drivers/scsi/sym53c8xx_2/sym_glue.c
===================================================================
--- linux-2.6.18-rc7-git1.orig/drivers/scsi/sym53c8xx_2/sym_glue.c 2006-09-21 17:32:54.000000000 -0500
+++ linux-2.6.18-rc7-git1/drivers/scsi/sym53c8xx_2/sym_glue.c 2006-09-21 17:35:37.000000000 -0500
@@ -659,6 +659,11 @@ static irqreturn_t sym53c8xx_intr(int ir
if (DEBUG_FLAGS & DEBUG_TINY) printf_debug ("[");
+ /* Avoid spinloop trying to handle interrupts on frozen device */
+ if ((np->s.device->error_state != pci_channel_io_normal) &&
+ (np->s.device->error_state != 0))
+ return IRQ_HANDLED;
+
spin_lock_irqsave(np->s.host->host_lock, flags);
sym_interrupt(np);
spin_unlock_irqrestore(np->s.host->host_lock, flags);
@@ -726,6 +731,19 @@ static int sym_eh_handler(int op, char *
dev_warn(&cmd->device->sdev_gendev, "%s operation started.\n", opname);
+ /* We may be in an error condition because the PCI bus
+ * went down. In this case, we need to wait until the
+ * PCI bus is reset, the card is reset, and only then
+ * proceed with the scsi error recovery. There's no
+ * point in hurrying; take a leisurely wait.
+ */
+#define WAIT_FOR_PCI_RECOVERY 35
+ if ((np->s.device->error_state != pci_channel_io_normal) &&
+ (np->s.device->error_state != 0) &&
+ (0 == wait_for_completion_timeout(&np->s.io_reset_wait,
+ WAIT_FOR_PCI_RECOVERY*HZ)))
+ return SCSI_FAILED;
+
spin_lock_irq(host->host_lock);
/* This one is queued in some place -> to wait for completion */
FOR_EACH_QUEUED_ELEMENT(&np->busy_ccbq, qp) {
@@ -1510,6 +1528,7 @@ static struct Scsi_Host * __devinit sym_
np->maxoffs = dev->chip.offset_max;
np->maxburst = dev->chip.burst_max;
np->myaddr = dev->host_id;
+ init_completion(&np->s.io_reset_wait);
/*
* Edit its name.
@@ -1948,6 +1967,77 @@ static void __devexit sym2_remove(struct
attach_count--;
}
+/**
+ * sym2_io_error_detected() -- called when PCI error is detected
+ * @pdev: pointer to PCI device
+ * @state: current state of the PCI slot
+ */
+static pci_ers_result_t sym2_io_error_detected (struct pci_dev *pdev,
+ enum pci_channel_state state)
+{
+ struct sym_hcb *np = pci_get_drvdata(pdev);
+
+ /* If slot is permanently frozen, turn everything off */
+ if (state == pci_channel_io_perm_failure) {
+ sym2_remove(pdev);
+ return PCI_ERS_RESULT_DISCONNECT;
+ }
+
+ init_completion(&np->s.io_reset_wait);
+ disable_irq(pdev->irq);
+ pci_disable_device(pdev);
+
+ /* Request a slot slot reset. */
+ return PCI_ERS_RESULT_NEED_RESET;
+}
+
+/**
+ * sym2_io_slot_reset() -- called when the pci bus has been reset.
+ * @pdev: pointer to PCI device
+ *
+ * Restart the card from scratch.
+ */
+static pci_ers_result_t sym2_io_slot_reset (struct pci_dev *pdev)
+{
+ struct sym_hcb *np = pci_get_drvdata(pdev);
+
+ printk (KERN_INFO "%s: recovering from a PCI slot reset\n",
+ sym_name(np));
+
+ if (pci_enable_device(pdev))
+ printk (KERN_ERR "%s: device setup failed most egregiously\n",
+ sym_name(np));
+
+ pci_set_master(pdev);
+ enable_irq (pdev->irq);
+
+ /* Perform host reset only on one instance of the card */
+ if (0 == PCI_FUNC (pdev->devfn)) {
+ if (sym_reset_scsi_bus(np, 0)) {
+ printk(KERN_ERR "%s: Unable to reset scsi host controller\n",
+ sym_name(np));
+ return PCI_ERS_RESULT_DISCONNECT;
+ }
+ sym_start_up (np, 1);
+ }
+
+ return PCI_ERS_RESULT_RECOVERED;
+}
+
+/**
+ * sym2_io_resume() -- resume normal ops after PCI reset
+ * @pdev: pointer to PCI device
+ *
+ * Called when the error recovery driver tells us that its
+ * OK to resume normal operation. Use completion to allow
+ * halted scsi ops to resume.
+ */
+static void sym2_io_resume (struct pci_dev *pdev)
+{
+ struct sym_hcb *np = pci_get_drvdata(pdev);
+ complete_all(&np->s.io_reset_wait);
+}
+
static void sym2_get_signalling(struct Scsi_Host *shost)
{
struct sym_hcb *np = sym_get_hcb(shost);
@@ -2110,11 +2200,18 @@ static struct pci_device_id sym2_id_tabl
MODULE_DEVICE_TABLE(pci, sym2_id_table);
+static struct pci_error_handlers sym2_err_handler = {
+ .error_detected = sym2_io_error_detected,
+ .slot_reset = sym2_io_slot_reset,
+ .resume = sym2_io_resume,
+};
+
static struct pci_driver sym2_driver = {
.name = NAME53C8XX,
.id_table = sym2_id_table,
.probe = sym2_probe,
.remove = __devexit_p(sym2_remove),
+ .err_handler = &sym2_err_handler,
};
static int __init sym2_init(void)
Index: linux-2.6.18-rc7-git1/drivers/scsi/sym53c8xx_2/sym_glue.h
===================================================================
--- linux-2.6.18-rc7-git1.orig/drivers/scsi/sym53c8xx_2/sym_glue.h 2006-09-21 17:32:54.000000000 -0500
+++ linux-2.6.18-rc7-git1/drivers/scsi/sym53c8xx_2/sym_glue.h 2006-09-21 17:35:37.000000000 -0500
@@ -40,6 +40,7 @@
#ifndef SYM_GLUE_H
#define SYM_GLUE_H
+#include <linux/completion.h>
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/pci.h>
@@ -179,6 +180,9 @@ struct sym_shcb {
char chip_name[8];
struct pci_dev *device;
+ /* Waiter for clearing of frozen PCI bus */
+ struct completion io_reset_wait;
+
struct Scsi_Host *host;
void __iomem * ioaddr; /* MMIO kernel io address */
Index: linux-2.6.18-rc7-git1/drivers/scsi/sym53c8xx_2/sym_hipd.c
===================================================================
--- linux-2.6.18-rc7-git1.orig/drivers/scsi/sym53c8xx_2/sym_hipd.c 2006-09-21 17:32:54.000000000 -0500
+++ linux-2.6.18-rc7-git1/drivers/scsi/sym53c8xx_2/sym_hipd.c 2006-09-21 17:35:37.000000000 -0500
@@ -2761,6 +2761,7 @@ void sym_interrupt (struct sym_hcb *np)
u_char istat, istatc;
u_char dstat;
u_short sist;
+ u_int icnt;
/*
* interrupt on the fly ?
@@ -2802,6 +2803,7 @@ void sym_interrupt (struct sym_hcb *np)
sist = 0;
dstat = 0;
istatc = istat;
+ icnt = 0;
do {
if (istatc & SIP)
sist |= INW(np, nc_sist);
@@ -2809,6 +2811,14 @@ void sym_interrupt (struct sym_hcb *np)
dstat |= INB(np, nc_dstat);
istatc = INB(np, nc_istat);
istat |= istatc;
+
+ /* Prevent deadlock waiting on a condition that may never clear. */
+ icnt ++;
+ if (100 < icnt) {
+ if ((np->s.device->error_state != pci_channel_io_normal)
+ && (np->s.device->error_state != 0))
+ return;
+ }
} while (istatc & (SIP|DIP));
if (DEBUG_FLAGS & DEBUG_TINY)
^ permalink raw reply
* Re: [PATCH 4/11] qe_lib: Add QE I/O ports API
From: Benjamin Herrenschmidt @ 2006-09-21 23:22 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: linuxppc-dev, Li Yang
In-Reply-To: <20060921192137.5c6af005@vitb.ru.mvista.com>
> Well, eventually this stuff aims to serve not 83xx/qe, but for cpm(1,2)-equipped stuff
> too. Apparently, we'll have to do something wise to afford that...
>
> OTOH, this is good as a starting point I guess.
This is typical of stuff that should be in the device-tree
Ben.
^ permalink raw reply
* [PATCH]: PowerPC: EEH: Power4 systems sometimes need multiple resets.
From: Linas Vepstas @ 2006-09-21 23:25 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
Paul,
Please apply and forward upsteam.
This is a non-urgent fix that can be queued for later.
--linas
On detection of an EEH error, some Power4 systems seem to occasionally
want to be reset twice before they report themselves as fully recovered.
This patch re-arranges the code to attempt additional resets if the first
one doesn't take.
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
----
arch/powerpc/platforms/pseries/eeh.c | 36 +++++++++++++++++++++++------------
1 file changed, 24 insertions(+), 12 deletions(-)
Index: linux-2.6.18-rc7-git1/arch/powerpc/platforms/pseries/eeh.c
===================================================================
--- linux-2.6.18-rc7-git1.orig/arch/powerpc/platforms/pseries/eeh.c 2006-09-21 18:22:51.000000000 -0500
+++ linux-2.6.18-rc7-git1/arch/powerpc/platforms/pseries/eeh.c 2006-09-21 18:23:00.000000000 -0500
@@ -485,7 +485,7 @@ eeh_slot_availability(struct pci_dn *pdn
printk (KERN_ERR "EEH: Slot unavailable: rc=%d, rets=%d %d %d\n",
rc, rets[0], rets[1], rets[2]);
- return -1;
+ return -2;
}
/**
@@ -553,11 +553,10 @@ rtas_pci_slot_reset(struct pci_dn *pdn,
BUID_HI(pdn->phb->buid),
BUID_LO(pdn->phb->buid),
state);
- if (rc) {
- printk (KERN_WARNING "EEH: Unable to reset the failed slot, (%d) #RST=%d dn=%s\n",
+ if (rc)
+ printk (KERN_WARNING "EEH: Unable to reset the failed slot,"
+ " (%d) #RST=%d dn=%s\n",
rc, state, pdn->node->full_name);
- return;
- }
}
/**
@@ -567,11 +566,8 @@ rtas_pci_slot_reset(struct pci_dn *pdn,
* Return 0 if success, else a non-zero value.
*/
-int
-rtas_set_slot_reset(struct pci_dn *pdn)
+static void __rtas_set_slot_reset(struct pci_dn *pdn)
{
- int i, rc;
-
rtas_pci_slot_reset (pdn, 1);
/* The PCI bus requires that the reset be held high for at least
@@ -592,17 +588,33 @@ rtas_set_slot_reset(struct pci_dn *pdn)
* up traffic. */
#define PCI_BUS_SETTLE_TIME_MSEC 1800
msleep (PCI_BUS_SETTLE_TIME_MSEC);
+}
+
+int rtas_set_slot_reset(struct pci_dn *pdn)
+{
+ int i, rc;
+
+ __rtas_set_slot_reset(pdn);
/* Now double check with the firmware to make sure the device is
* ready to be used; if not, wait for recovery. */
for (i=0; i<10; i++) {
rc = eeh_slot_availability (pdn);
- if (rc < 0)
- printk (KERN_ERR "EEH: failed (%d) to reset slot %s\n", rc, pdn->node->full_name);
if (rc == 0)
return 0;
- if (rc < 0)
+
+ if (rc == -2) {
+ printk (KERN_ERR "EEH: failed (%d) to reset slot %s\n",
+ i, pdn->node->full_name);
+ __rtas_set_slot_reset(pdn);
+ continue;
+ }
+
+ if (rc < 0) {
+ printk (KERN_ERR "EEH: unrecoverable slot failure %s\n",
+ pdn->node->full_name);
return -1;
+ }
msleep (rc+100);
}
^ permalink raw reply
* Re: linux-2.6 system ACE driver - need help
From: agnel juni @ 2006-09-21 23:59 UTC (permalink / raw)
To: agnel juni, Jeff Angielski; +Cc: linuxppc-embedded
In-Reply-To: <20060921215239.13694.qmail@web8401.mail.in.yahoo.com>
[-- Attachment #1: Type: text/plain, Size: 5181 bytes --]
Jeff,
I forgot to mention onething.
The System ACE Base Address register is a 64-bit address.
So we have done ioremap64, like
ioremap64(0x4E0000000ULL, remap_size);
Could this be a cause for the segmentation fault we are seeing ????
Screen-dump from one of our trials.
# mount -t msdos /dev/xsysace1 /mnt/sysace/
swap_dup: Bad swap file entry 7c0ff1f0
VM: killing process exe
swap_free: Bad swap file entry 6c0ff019
swap_free: Bad swap file entry c80ff1ef
swap_free: Bad swap file entry a80ff1f3
swap_free: Bad swap file entry d00ff1ef
thanks
Junita
agnel juni <junijoseph@yahoo.co.in> wrote: Hi Jeff,
Thanks for your reply.
> Does it work for you in polling mode? If not, you probably have a
problem with the way you are accessing the system ace - cache,
endianess, byte alignment, etc. If it does work in polling, the usual
suspects are interrupt masking errors or some low level problems with
your IRQ signals. Since you know the size of a sector and the size of
the sysace buffers, how many interrupts do you get per sector read? Do
you see extras or not enough?
I heard from Ameet Patil that this driver is not tested in poilling mode and it failed when we tried also.
Thats when we moved to interrupt mode.
I did check for the endianess...byte alignment etc.It looks ok to me.
I am using a 64 MB flash. And the sector sice is 512K.When the kernel boots up I see 128 interrupts getting registered. (I think its from alloc_disk(16) function in adapter.c )
Seems like the driver has issues with completing the request.
We are having issues while mouting the device. It is erratic, that sometimes we are able to mount/list files, copy files.
But sometimes the kernel crashes and gives a Ooops message like :
/*********************************************************/
# ls /mnt/Oops: kernel access of bad area, sig: 11 [#1]
NIP: C00556B8 LR: C00557E4 CTR: 00000000
REGS: dfec1e08 TRAP: 0300 Not tainted (2.6.16.2)
MSR: 00021000 <ME> CR: 22128828 XER: 00000000
DAR: 30303030, DSISR: 00800000
TASK = dff6c030[4] 'events/0' THREAD: dfec0000
GPR00: 00100100 DFEC1EB8 DFF6C030 C0258C60 DFF7BE10 00000018 DF4E9000 C0256D60
GPR08: 30303030 00200200 DF4E9154 30303030 22128888 00100400 1FFB9700 00000000
GPR16: 00000001 FFFFFFFF 00000000 007FFF00 1FFB3604 1FF63CE0 1FFCEF78 C01F0000
GPR24: C0240000 00100100 C0240000 00000000 DFF7BE10 00000018 00000000 C0258C60
NIP [C00556B8] free_block+0xa8/0x148
LR [C00557E4] drain_array_locked+0x8c/0xd8
Call Trace:
[DFEC1EB8] [DFCA9490] 0xdfca9490 (unreliable)
[DFEC1ED8] [C00557E4] drain_array_locked+0x8c/0xd8
[DFEC1EF0] [C0056F80] cache_reap+0x74/0x18c
[DFEC1F28] [C002B578] run_workqueue+0x9c/0x110
[DFEC1F48] [C002B6E4] worker_thread+0xf8/0x13c
[DFEC1FC0] [C002F6F0] kthread+0xf4/0x130
[DFEC1FF0] [C000413C] kernel_thread+0x44/0x60
Instruction dump:
7cfbfa14 3c000010 80e70014 3d2a4000 60000100 5529c9f4 7d295a14 80c9001c
3d200020 61290200 81060004 81660000 <91680000> 910b0004 3966001c 90060000
BUG: events/0/4, lock held at task exit time!
[c01f5d60] {cache_chain_mutex}
.. held by: events/0: 4 [dff6c030, 110]
... acquired at: cache_reap+0x1c/0x18c
/*******************************************************************/
We are able to do this after modiifying the file xsysace_compactflash.c and xsysace_intr.c to reset the controller( It was commented out by applying the patch).
The data in the CF looks sane.
Please advise.
Thanks for your help.
Thanks
Junita
.
Does it work for you in polling mode? If not, you probably have a
problem with the way you are accessing the system ace - cache,
endianess, byte alignment, etc. If it does work in polling, the usual
suspects are interrupt masking errors or some low level problems with
your IRQ signals. Since you know the size of a sector and the size of
the sysace buffers, how many interrupts do you get per sector read? Do
you see extras or not enough?
> We are able to mount the CF, but it is very inconsistent.
Dump the sector data to the screen that you are reading from the CF.
Especially look at the results from the initial identify command to
verify that they make sense, and because that is the easiest to check.
> Same is the case with fdisk command. When it fails,we get errors which you could see in the screen-dump below.
> Are we missing to apply the right patch? Please let us know your
> inputs to go forward.
> Looking forwards for your reply.
>
> # mount -t msdos /dev/xsysace /root/cf
Shouldn't this be /dev/xsysace1? You want to mount a partition not the
entire block device.
--
Jeff Angielski
The PTR Group
---------------------------------
Find out what India is talking about on - Yahoo! Answers India
Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
---------------------------------
Find out what India is talking about on - Yahoo! Answers India
Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
[-- Attachment #2: Type: text/html, Size: 6465 bytes --]
^ permalink raw reply
* Re: [POWERPC] mark BUG() as noreturn
From: Michael Ellerman @ 2006-09-22 0:54 UTC (permalink / raw)
To: Jimi Xenidis; +Cc: Stephen Rothwell, paulus, Hollis Blanchard, ppc-dev
In-Reply-To: <135B477D-5DF8-48E9-94FD-A114A4526177@watson.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]
On Thu, 2006-09-21 at 08:18 -0400, Jimi Xenidis wrote:
> On Sep 21, 2006, at 12:55 AM, Stephen Rothwell wrote:
>
> > From an idea from Michael Ellerman.
> >
> > We finish the BUG() macro with a call to a function marked with
> > attribute
> > "noreturn" so that the compiler will know that BUG() and BUG_ON()
> > (with a constant, non-zero argument) will not return.
>
> But BUG() _can_ return, if I have a probe, xmon or kgdb configured it
> is possible to play with the state of the world and try to continue/
> recover, (xmon "x" command). IMHO, this is a powerful debugging
> scenario.
Hmm, ok I hadn't thought of that. Personally I've never tried to recover
from a BUG(), do people really do that much?
> Why are we concerned with the performance of this anyway?
Not so much the performance, more that it gives the compiler more
information about what's happening and allows it to elide code in some
circumstances - but it's not _that_ important.
Having it configurable might be an option, dunno.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply
* Linux not booting consistantly
From: Jeff Stevens @ 2006-09-22 1:04 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <004001c6dddb$19df51c0$0b01a8c0@shenbagaraj>
I have a custom AMCC 440SP board, with 1GB DDR2, and
32MB of flash. I am having an issue with the linux
kernel, where I can get it to boot every once and a
while by power-cycling or pressing the reset button,
the rest of the time it hangs after uncompressing the
kernel:
## Booting image at 00200000 ...
Image Name: Linux-2.6.15
Image Type: PowerPC Linux Kernel Image (gzip
compressed)
Data Size: 1067371 Bytes = 1 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Could this be a memory issue (i.e. bad memory
configuration)? Though, if it were a memory issue,
wouldn't the kernel fail to uncompress successfully?
Does anyone have any ideas why it would work about
once every 10 - 20 resets?
Thanks,
Jeff Stevens
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply
* Re: [Fastboot] [PATCH] kexec: remove memory reserve patching for powerpc device tree
From: Michael Neuling @ 2006-09-22 1:11 UTC (permalink / raw)
To: vgoyal; +Cc: Jon Loeliger, Fastboot mailing list, linuxppc-dev, Horms
In-Reply-To: <20060921143253.GC1542@in.ibm.com>
In message <20060921143253.GC1542@in.ibm.com> you wrote:
> On Thu, Sep 21, 2006 at 09:18:39AM -0500, Jon Loeliger wrote:
> > So, like, the other day Vivek Goyal mumbled:
> > >
> > > Now with distros adopting kexce-tools, I am in for maintaining the backwa
rd
> > > compatibility as far as possible. Putting a note in the code is good that
> > > down the line, get rid of this code.
> >
> > Perhaps scheduling it as an entry in
> >
> > Documentation/feature-removal-schedule.txt
> >
> > just so people (distros) can plan around it?
>
> Perfect. In kexec-tools it can go in doc/feature-removal-schedule.txt.
It doesn't really need to go in the kernel source as the kernel has
already changed and besides, we were adding a feature to the kernel, not
removing one.
At this stage, it's just a kexec tools feature removal.
Mikey
^ permalink raw reply
* Re: [PATCH] Start arch/powerpc/boot code reorganization
From: Mark A. Greer @ 2006-09-22 1:24 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: Paul Mackerras, Matt Porter, linuxppc-dev
In-Reply-To: <1CA5168F-9ECA-4AA2-92AE-F86579245855@kernel.crashing.org>
On Thu, Sep 21, 2006 at 05:31:18PM +0200, Segher Boessenkool wrote:
> >Regardless of the name of the
> >new property, it should be defined to allow a different number of
> >address cells to represent an address in virtual address space.
>
> How about you check whether the "64-bit" property exists in the CPU
> nodes?
That seemed like the right thing until I realized, its still specifying
the physical size, not the virtual size.
I don't think we can avoid making a new xxx-cells property for the virt
addr size. Ben suggested adding #virt-address-cells to the root node.
I like the name but prefer putting it directly under "/cpus" because
the virt addr size is really determined by the cpu. It doesn't matter
that much to me, though.
Comments?
Mark
^ permalink raw reply
* Re: [POWERPC] mark BUG() as noreturn
From: Amos Waterland @ 2006-09-22 1:34 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <1158886446.8109.2.camel@localhost.localdomain>
On Fri, Sep 22, 2006 at 10:54:05AM +1000, Michael Ellerman wrote:
> On Thu, 2006-09-21 at 08:18 -0400, Jimi Xenidis wrote:
> > But BUG() _can_ return, if I have a probe, xmon or kgdb configured it
> > is possible to play with the state of the world and try to continue/
> > recover, (xmon "x" command). IMHO, this is a powerful debugging
> > scenario.
>
> Hmm, ok I hadn't thought of that. Personally I've never tried to recover
> from a BUG(), do people really do that much?
Yes, people do that.
Especially in the case where you have a bug that only manifests every so
often: you want to capitalize on the fact that you have caught the
machine in that state.
You aren't trying to recover as though nothing has happened, but you are
trying to continue execution to learn about things now that you know the
machine was in the state that triggers the bug.
^ permalink raw reply
* Silicon Turnkey Express XTL870 support?
From: David Burgess @ 2006-09-22 1:44 UTC (permalink / raw)
To: linuxppc-embedded
Hello All -
I'm new to this list so please pardon a dumb question. Does anyone
out there have a patch to support the Silicon Turnkey Express XTL870
family of boards? Or can anyone recommend another 8xx board with
existing Linux support who's configuration files might work as a
substitute?
Thanks,
David
David A. Burgess
Kestrel Signal Processing, Inc.
^ permalink raw reply
* RE: [PATCH 2/11] qe_lib: Add common files
From: Li Yang-r58472 @ 2006-09-22 2:37 UTC (permalink / raw)
To: Joakim Tjernlund, linuxppc-dev
In-Reply-To: <F6AD7E21CDF4E145A44F61F43EE6D9399B44FE@tmnt04.transmode.se>
> -----Original Message-----
> From: Joakim Tjernlund [mailto:joakim.tjernlund@transmode.se]
> Sent: Thursday, September 21, 2006 11:22 PM
> To: Li Yang-r58472; linuxppc-dev@ozlabs.org
> Subject: RE: [PATCH 2/11] qe_lib: Add common files
>=20
> > diff --git a/include/asm-powerpc/qe.h b/include/asm-powerpc/qe.h
> > +#define QE_MURAM_DATAONLY_BASE ((uint)0x0)
> > +#define QE_MURAM_NOSPACE ((uint)0x7fffffff)
> > +#define QE_MURAM_DATAONLY_SIZE ((uint)(48 * 1024) -
> > QE_MURAM_DATAONLY_BASE)
>=20
> QE_MURAM_DATAONLY_SIZE is 16*1024 on 8321
>=20
> Also, you have line wrapping that has mangled all long lines in all
> patches.
No, not for this time. Maybe your mail client wrapped them.
- Leo
^ permalink raw reply
* Please pull upstream branch of linux-2.6-PQ.git...
From: Vitaly Bordug @ 2006-09-22 2:37 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev@ozlabs.org
[-- Attachment #1: Type: text/plain, Size: 2099 bytes --]
Paul,
Refined 8560 series can be found in
git://git.kernel.org/pub/scm/linux/kernel/git/vitb/linux-2.6-PQ.git, upstream branch.
arch/powerpc/boot/dts/mpc8560ads.dts | 310 ++++++++++
arch/powerpc/configs/mpc8560_ads_defconfig | 854 +++++++++++++++++++++++++++++
arch/powerpc/lib/Makefile | 5
arch/powerpc/platforms/85xx/Kconfig | 21
arch/powerpc/platforms/85xx/Makefile | 1
arch/powerpc/platforms/85xx/mpc85xx_ads.c | 218 +++++--
arch/powerpc/platforms/85xx/mpc85xx_ads.h | 61 ++
arch/powerpc/sysdev/Makefile | 5
arch/powerpc/sysdev/cpm2_common.c | 319 ++++++++++
arch/powerpc/sysdev/cpm2_pic.c | 290 +++++++++
arch/powerpc/sysdev/cpm2_pic.h | 10
arch/powerpc/sysdev/fsl_soc.c | 285 +++++++++
arch/powerpc/sysdev/fsl_soc.h | 2
arch/ppc/platforms/mpc8272ads_setup.c | 8
arch/ppc/platforms/mpc866ads_setup.c | 8
arch/ppc/platforms/mpc885ads_setup.c | 10
drivers/net/fs_enet/fs_enet-main.c | 5
drivers/serial/cpm_uart/cpm_uart_core.c | 24
drivers/serial/cpm_uart/cpm_uart_cpm2.c | 143 +++-
drivers/serial/cpm_uart/cpm_uart_cpm2.h | 2
include/asm-powerpc/fs_pd.h | 45 +
include/asm-powerpc/mpc85xx.h | 53 +
include/asm-ppc/cpm2.h | 63 ++
include/asm-ppc/fs_pd.h | 36 +
include/linux/fs_enet_pd.h | 47 +
include/linux/fs_uart_pd.h | 14
26 files changed, 2674 insertions(+), 165 deletions(-)
Vitaly Bordug:
POWERPC: Add cpm2 stuff support to the fsl_soc.c
cpm_uart: make it possible to utilize from powerpc
POWERPC: Move generic cpm2 stuff to powerpc
POWERPC: Add support for the mpc8560 eval board
POWERPC: Get rid of remapping the whole immr
POWERPC: overhaul with cpm2_map mechanism
POWERPC: Bring the fs_no calculation to the relevant SoC enumeration
--
Sincerely, Vitaly
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* [PATH 0/3] Add mpc8272ads to powerpc
From: Vitaly Bordug @ 2006-09-22 2:46 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev@ozlabs.org
[-- Attachment #1: Type: text/plain, Size: 278 bytes --]
The following series adds support for the Freescale mpc8272ads
board under arch/powerpc. Assuming 8560 series applied.
Relevant patches are also available in
git:/git.kernel.org/pub/scm/linux/kernel/git/vitb/linux-2.6-PQ.git in testing
branch.
--
Sincerely, Vitaly
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [Fastboot] [PATCH] kexec: remove memory reserve patching for powerpc device tree
From: Horms @ 2006-09-22 1:21 UTC (permalink / raw)
To: Michael Neuling; +Cc: Jon Loeliger, Fastboot mailing list, linuxppc-dev, vgoyal
In-Reply-To: <20060922011153.39DD867B79@ozlabs.org>
On Fri, Sep 22, 2006 at 10:41:51AM +0930, Michael Neuling wrote:
> In message <20060921143253.GC1542@in.ibm.com> you wrote:
> > On Thu, Sep 21, 2006 at 09:18:39AM -0500, Jon Loeliger wrote:
> > > So, like, the other day Vivek Goyal mumbled:
> > > >
> > > > Now with distros adopting kexce-tools, I am in for maintaining the backwa
> rd
> > > > compatibility as far as possible. Putting a note in the code is good that
> > > > down the line, get rid of this code.
> > >
> > > Perhaps scheduling it as an entry in
> > >
> > > Documentation/feature-removal-schedule.txt
> > >
> > > just so people (distros) can plan around it?
> >
> > Perfect. In kexec-tools it can go in doc/feature-removal-schedule.txt.
>
> It doesn't really need to go in the kernel source as the kernel has
> already changed and besides, we were adding a feature to the kernel, not
> removing one.
>
> At this stage, it's just a kexec tools feature removal.
If someone wants to make a patch for kexec-tools I'm happy
to put it into kexec-tools-testing. Though I am a little dubious
about the possibilities of vendors taking any notice of it.
--
Horms
H: http://www.vergenet.net/~horms/
W: http://www.valinux.co.jp/en/
^ permalink raw reply
* Re: [POWERPC] mark BUG() as noreturn
From: Segher Boessenkool @ 2006-09-21 15:15 UTC (permalink / raw)
To: David Howells; +Cc: Stephen Rothwell, paulus, Hollis Blanchard, ppc-dev
In-Reply-To: <928.1158844980@warthog.cambridge.redhat.com>
> OTOH, it is handy to mark BUG() as not being able to return as that
> tells the
> compiler that it doesn't have to check that the code path through
> the BUG()
> call is complete and this means it can be more relaxed about
> generating
> warnings about potentially unused variables and suchlike.
That's originally the main reason the noreturn attribute exists
at all. It can also help optimise code (for size too, sure
performance isn't too interesting here); for example, the compiler
can clobber all registers it wants on the branch path jumping into
the noreturn routine (without the noreturn, it would have to save
the nonvolatiles).
Segher
^ permalink raw reply
* [PATCH 2/3] POWERPC: 8272ads merge to powerpc: common stuff
From: Vitaly Bordug @ 2006-09-22 2:48 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <20060922064610.0943f1fc@localhost.localdomain>
This has modules of common directories related to the
mpc8272ADS board, mainly common cpm2 changes and fsl_soc.c
portions related to the bitbang MDIO and other mechanisms specific
for this family.
Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
---
arch/powerpc/Kconfig | 1 +
arch/powerpc/sysdev/cpm2_pic.c | 2 +
arch/powerpc/sysdev/cpm2_pic.h | 2 +
arch/powerpc/sysdev/fsl_soc.c | 68 ++++++++++++++++++++++++++++++++++++----
4 files changed, 64 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index de1ef2f..1810216 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -594,6 +594,7 @@ endmenu
source arch/powerpc/platforms/embedded6xx/Kconfig
source arch/powerpc/platforms/4xx/Kconfig
+source arch/powerpc/platforms/82xx/Kconfig
source arch/powerpc/platforms/83xx/Kconfig
source arch/powerpc/platforms/85xx/Kconfig
source arch/powerpc/platforms/86xx/Kconfig
diff --git a/arch/powerpc/sysdev/cpm2_pic.c b/arch/powerpc/sysdev/cpm2_pic.c
index 5175299..28b0189 100644
--- a/arch/powerpc/sysdev/cpm2_pic.c
+++ b/arch/powerpc/sysdev/cpm2_pic.c
@@ -147,7 +147,7 @@ static struct irq_chip cpm2_pic = {
.end = cpm2_end_irq,
};
-int cpm2_get_irq(struct pt_regs *regs)
+unsigned int cpm2_get_irq(struct pt_regs *regs)
{
int irq;
unsigned long bits;
diff --git a/arch/powerpc/sysdev/cpm2_pic.h b/arch/powerpc/sysdev/cpm2_pic.h
index d63e45d..3c513e5 100644
--- a/arch/powerpc/sysdev/cpm2_pic.h
+++ b/arch/powerpc/sysdev/cpm2_pic.h
@@ -3,7 +3,7 @@ #define _PPC_KERNEL_CPM2_H
extern intctl_cpm2_t *cpm2_intctl;
-extern int cpm2_get_irq(struct pt_regs *regs);
+extern unsigned int cpm2_get_irq(struct pt_regs *regs);
extern void cpm2_pic_init(struct device_node*);
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 022ed27..39b76f9 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -37,6 +37,7 @@ #include <mm/mmu_decl.h>
#include <asm/cpm2.h>
extern void init_fcc_ioports(struct fs_platform_info*);
+extern void init_scc_ioports(struct fs_uart_platform_info*);
static phys_addr_t immrbase = -1;
phys_addr_t get_immrbase(void)
@@ -566,7 +567,7 @@ static int __init fs_enet_of_init(void)
struct resource r[4];
struct device_node *phy, *mdio;
struct fs_platform_info fs_enet_data;
- const unsigned int *id, *phy_addr;
+ const unsigned int *id, *phy_addr, phy_irq;
const void *mac_addr;
const phandle *ph;
const char *model;
@@ -588,6 +589,7 @@ static int __init fs_enet_of_init(void)
if (ret)
goto err;
r[2].name = fcc_regs_c;
+ fs_enet_data.fcc_regs_c = r[2].start;
r[3].start = r[3].end = irq_of_parse_and_map(np, 0);
r[3].flags = IORESOURCE_IRQ;
@@ -620,6 +622,8 @@ static int __init fs_enet_of_init(void)
phy_addr = get_property(phy, "reg", NULL);
fs_enet_data.phy_addr = *phy_addr;
+ phy_irq = get_property(phy, "interrupts", NULL);
+
id = get_property(np, "device-id", NULL);
fs_enet_data.fs_no = *id;
strcpy(fs_enet_data.fs_type, model);
@@ -637,6 +641,7 @@ static int __init fs_enet_of_init(void)
if (strstr(model, "FCC")) {
int fcc_index = *id - 1;
+ unsigned char* mdio_bb_prop;
fs_enet_data.dpram_offset = (u32)cpm_dpram_addr(0);
fs_enet_data.rx_ring = 32;
@@ -652,14 +657,63 @@ static int __init fs_enet_of_init(void)
(u32)res.start, fs_enet_data.phy_addr);
fs_enet_data.bus_id = (char*)&bus_id[(*id)];
fs_enet_data.init_ioports = init_fcc_ioports;
- }
- of_node_put(phy);
- of_node_put(mdio);
+ mdio_bb_prop = get_property(phy, "bitbang", NULL);
+ if (mdio_bb_prop) {
+ struct platform_device *fs_enet_mdio_bb_dev;
+ struct fs_mii_bb_platform_info fs_enet_mdio_bb_data;
+
+ fs_enet_mdio_bb_dev =
+ platform_device_register_simple("fsl-bb-mdio",
+ i, NULL, 0);
+ memset(&fs_enet_mdio_bb_data, 0,
+ sizeof(struct fs_mii_bb_platform_info));
+ fs_enet_mdio_bb_data.mdio_dat.bit =
+ mdio_bb_prop[0];
+ fs_enet_mdio_bb_data.mdio_dir.bit =
+ mdio_bb_prop[1];
+ fs_enet_mdio_bb_data.mdc_dat.bit =
+ mdio_bb_prop[2];
+ fs_enet_mdio_bb_data.mdio_port =
+ mdio_bb_prop[3];
+ fs_enet_mdio_bb_data.mdc_port =
+ mdio_bb_prop[4];
+ fs_enet_mdio_bb_data.delay =
+ mdio_bb_prop[5];
+
+ fs_enet_mdio_bb_data.irq[0] = phy_irq[0];
+ fs_enet_mdio_bb_data.irq[1] = -1;
+ fs_enet_mdio_bb_data.irq[2] = -1;
+ fs_enet_mdio_bb_data.irq[3] = phy_irq[0];
+ fs_enet_mdio_bb_data.irq[31] = -1;
+
+ fs_enet_mdio_bb_data.mdio_dat.offset =
+ (u32)&cpm2_immr->im_ioport.iop_pdatc;
+ fs_enet_mdio_bb_data.mdio_dir.offset =
+ (u32)&cpm2_immr->im_ioport.iop_pdirc;
+ fs_enet_mdio_bb_data.mdc_dat.offset =
+ (u32)&cpm2_immr->im_ioport.iop_pdatc;
+
+ ret = platform_device_add_data(
+ fs_enet_mdio_bb_dev,
+ &fs_enet_mdio_bb_data,
+ sizeof(struct fs_mii_bb_platform_info));
+ if (ret)
+ goto unreg;
+ } else {
+ printk(KERN_ERR
+ "mii-properties isn't found in device tree\n");
+ ret = -ENODEV;
+ goto unreg;
+ }
+ }
- ret = platform_device_add_data(fs_enet_dev, &fs_enet_data,
- sizeof(struct
- fs_platform_info));
+ of_node_put(phy);
+ of_node_put(mdio);
+
+ ret = platform_device_add_data(fs_enet_dev, &fs_enet_data,
+ sizeof(struct
+ fs_platform_info));
if (ret)
goto unreg;
}
^ permalink raw reply related
* [PATCH 1/3] POWERPC: Added devicetree for mpc8272ads board
From: Vitaly Bordug @ 2006-09-22 2:48 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <20060922064610.0943f1fc@localhost.localdomain>
This adds current dts file used with MPC8272ADS,
introducing new mdio bitbang defines, as well as
fully-CPM2-SoC board design.
Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
---
arch/powerpc/boot/dts/mpc8272ads.dts | 236 ++++++++++++++++++++++++++++++++++
1 files changed, 236 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts
new file mode 100644
index 0000000..6d72b7d
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc8272ads.dts
@@ -0,0 +1,236 @@
+/*
+ * MPC8272 ADS Device Tree Source
+ *
+ * Copyright 2005 Freescale Semiconductor Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+
+/*
+/memreserve/ 00000000 4000000;
+*/
+
+/ {
+ model = "MPC8272ADS";
+ compatible = "MPC8260ADS";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ linux,phandle = <100>;
+
+ cpus {
+ #cpus = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ linux,phandle = <200>;
+
+ PowerPC,8272@0 {
+ device_type = "cpu";
+ reg = <0>;
+ d-cache-line-size = <20>; // 32 bytes
+ i-cache-line-size = <20>; // 32 bytes
+ d-cache-size = <4000>; // L1, 16K
+ i-cache-size = <4000>; // L1, 16K
+ timebase-frequency = <17d7840>;
+ bus-frequency = <5f5e100>;
+ clock-frequency = <17D78400>;
+ 32-bit;
+ linux,phandle = <201>;
+ linux,boot-cpu;
+ };
+ };
+
+ interrupt-controller@f8200000 {
+ linux,phandle = <f8200000>;
+ #address-cells = <0>;
+ #interrupt-cells = <2>;
+ interrupt-controller;
+ reg = <f8200000 f8200004>;
+ built-in;
+ device_type = "pci-pic";
+ };
+ memory {
+ device_type = "memory";
+ linux,phandle = <300>;
+ reg = <00000000 4000000 f4500000 00000020>;
+ };
+
+ chosen {
+ name = "chosen";
+ bootargs = "root=/dev/nfs rw ip=on";
+ linux,stdout-path = "/dev/ttyCPM0";
+ linux,platform = <0>;
+ interrupt-controller = <10c00>;
+ linux,phandle = <400>;
+ };
+
+ soc8272@f0000000 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ #interrupt-cells = <2>;
+ device_type = "soc";
+ ranges = < 0 0 2 00000000 f0000000 00053000>;
+ reg = <f0000000 0>;
+
+ mdio@0 {
+ device_type = "mdio";
+ compatible = "fs_enet";
+ reg = <0 0>;
+ linux,phandle = <24520>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ethernet-phy@0 {
+ linux,phandle = <2452000>;
+ interrupt-parent = <10c00>;
+ interrupts = <19 1>;
+ reg = <0>;
+ bitbang = [ 12 12 13 02 02 01 ];
+ device_type = "ethernet-phy";
+ };
+ ethernet-phy@1 {
+ linux,phandle = <2452001>;
+ interrupt-parent = <10c00>;
+ interrupts = <19 1>;
+ bitbang = [ 12 12 13 02 02 01 ];
+ reg = <3>;
+ device_type = "ethernet-phy";
+ };
+ };
+
+ ethernet@24000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ device_type = "network";
+ device-id = <2>;
+ compatible = "fs_enet";
+ model = "FCC";
+ reg = <11300 20 8400 100 11380 30>;
+ mac-address = [ 00 11 2F 99 43 54 ];
+ interrupts = <20 2>;
+ interrupt-parent = <10c00>;
+ phy-handle = <2452000>;
+ rx-clock = <13>;
+ tx-clock = <12>;
+ };
+
+ ethernet@25000 {
+ device_type = "network";
+ device-id = <3>;
+ compatible = "fs_enet";
+ model = "FCC";
+ reg = <11320 20 8500 100 113b0 30>;
+ mac-address = [ 00 11 2F 99 44 54 ];
+ interrupts = <21 2>;
+ interrupt-parent = <10c00>;
+ phy-handle = <2452001>;
+ rx-clock = <17>;
+ tx-clock = <18>;
+ };
+
+ cpm@f0000000 {
+ linux,phandle = <f0000000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ #interrupt-cells = <2>;
+ device_type = "cpm";
+ model = "CPM2";
+ ranges = <00000000 00000000 3ffff>;
+ reg = <10d80 3280>;
+ command-proc = <119c0>;
+ brg-frequency = <17D7840>;
+ cpm_clk = <BEBC200>;
+
+ scc@11a00 {
+ device_type = "serial";
+ compatible = "cpm_uart";
+ model = "SCC";
+ device-id = <2>;
+ reg = <11a00 20 8000 100>;
+ current-speed = <1c200>;
+ interrupts = <28 2>;
+ interrupt-parent = <10c00>;
+ clock-setup = <0 00ffffff>;
+ rx-clock = <1>;
+ tx-clock = <1>;
+ };
+
+ scc@11a60 {
+ device_type = "serial";
+ compatible = "cpm_uart";
+ model = "SCC";
+ device-id = <5>;
+ reg = <11a60 20 8300 100>;
+ current-speed = <1c200>;
+ interrupts = <2b 2>;
+ interrupt-parent = <10c00>;
+ clock-setup = <1b ffffff00>;
+ rx-clock = <4>;
+ tx-clock = <4>;
+ };
+
+ };
+ interrupt-controller@10c00 {
+ linux,phandle = <10c00>;
+ #address-cells = <0>;
+ #interrupt-cells = <2>;
+ interrupt-controller;
+ reg = <10c00 80>;
+ built-in;
+ device_type = "cpm-pic";
+ };
+ pci@0500 {
+ linux,phandle = <0500>;
+ #interrupt-cells = <1>;
+ #size-cells = <2>;
+ #address-cells = <3>;
+ compatible = "8272";
+ device_type = "pci";
+ reg = <10430 4dc>;
+ clock-frequency = <3f940aa>;
+ interrupt-map-mask = <f800 0 0 7>;
+ interrupt-map = <
+
+ /* IDSEL 0x16 */
+ b000 0 0 1 f8200000 40 0
+ b000 0 0 2 f8200000 41 0
+ b000 0 0 3 f8200000 42 0
+ b000 0 0 4 f8200000 43 0
+
+ /* IDSEL 0x17 */
+ b800 0 0 1 f8200000 43 0
+ b800 0 0 2 f8200000 40 0
+ b800 0 0 3 f8200000 41 0
+ b800 0 0 4 f8200000 42 0
+
+ /* IDSEL 0x18 */
+ c000 0 0 1 f8200000 42 0
+ c000 0 0 2 f8200000 43 0
+ c000 0 0 3 f8200000 40 0
+ c000 0 0 4 f8200000 41 0>;
+ interrupt-parent = <10c00>;
+ interrupts = <14 3>;
+ bus-range = <0 0>;
+ ranges = <02000000 0 80000000 80000000 0 40000000
+ 01000000 0 00000000 f6000000 0 02000000>;
+ };
+
+/* May need to remove if on a part without crypto engine */
+ crypto@30000 {
+ device_type = "crypto";
+ model = "SEC2";
+ compatible = "talitos";
+ reg = <30000 10000>;
+ interrupts = <b 0>;
+ interrupt-parent = <10c00>;
+ num-channels = <4>;
+ channel-fifo-len = <18>;
+ exec-units-mask = <0000007e>;
+/* desc mask is for rev1.x, we need runtime fixup for >=2.x */
+ descriptor-types-mask = <01010ebf>;
+ };
+
+ };
+};
^ permalink raw reply related
* [PATCH 3/3] POWERPC: mpc8272ads merge: board-specific/platform stuff
From: Vitaly Bordug @ 2006-09-22 2:48 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <20060922064610.0943f1fc@localhost.localdomain>
This intruduces 82xx family in arch/powerpc/platforms,
and has all the board-specific code to represent regression-less
transaction from ppc. The functionality is apparently the same, including
PCI controller.
Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
---
arch/powerpc/Kconfig | 1
arch/powerpc/boot/dts/mpc8272ads.dts | 236 ----------------------------------
arch/powerpc/sysdev/cpm2_pic.c | 2
arch/powerpc/sysdev/cpm2_pic.h | 2
arch/powerpc/sysdev/fsl_soc.c | 68 +---------
5 files changed, 9 insertions(+), 300 deletions(-)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 1810216..de1ef2f 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -594,7 +594,6 @@ endmenu
source arch/powerpc/platforms/embedded6xx/Kconfig
source arch/powerpc/platforms/4xx/Kconfig
-source arch/powerpc/platforms/82xx/Kconfig
source arch/powerpc/platforms/83xx/Kconfig
source arch/powerpc/platforms/85xx/Kconfig
source arch/powerpc/platforms/86xx/Kconfig
diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts
deleted file mode 100644
index 6d72b7d..0000000
--- a/arch/powerpc/boot/dts/mpc8272ads.dts
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * MPC8272 ADS Device Tree Source
- *
- * Copyright 2005 Freescale Semiconductor Inc.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- */
-
-
-/*
-/memreserve/ 00000000 4000000;
-*/
-
-/ {
- model = "MPC8272ADS";
- compatible = "MPC8260ADS";
- #address-cells = <1>;
- #size-cells = <1>;
- linux,phandle = <100>;
-
- cpus {
- #cpus = <1>;
- #address-cells = <1>;
- #size-cells = <0>;
- linux,phandle = <200>;
-
- PowerPC,8272@0 {
- device_type = "cpu";
- reg = <0>;
- d-cache-line-size = <20>; // 32 bytes
- i-cache-line-size = <20>; // 32 bytes
- d-cache-size = <4000>; // L1, 16K
- i-cache-size = <4000>; // L1, 16K
- timebase-frequency = <17d7840>;
- bus-frequency = <5f5e100>;
- clock-frequency = <17D78400>;
- 32-bit;
- linux,phandle = <201>;
- linux,boot-cpu;
- };
- };
-
- interrupt-controller@f8200000 {
- linux,phandle = <f8200000>;
- #address-cells = <0>;
- #interrupt-cells = <2>;
- interrupt-controller;
- reg = <f8200000 f8200004>;
- built-in;
- device_type = "pci-pic";
- };
- memory {
- device_type = "memory";
- linux,phandle = <300>;
- reg = <00000000 4000000 f4500000 00000020>;
- };
-
- chosen {
- name = "chosen";
- bootargs = "root=/dev/nfs rw ip=on";
- linux,stdout-path = "/dev/ttyCPM0";
- linux,platform = <0>;
- interrupt-controller = <10c00>;
- linux,phandle = <400>;
- };
-
- soc8272@f0000000 {
- #address-cells = <1>;
- #size-cells = <1>;
- #interrupt-cells = <2>;
- device_type = "soc";
- ranges = < 0 0 2 00000000 f0000000 00053000>;
- reg = <f0000000 0>;
-
- mdio@0 {
- device_type = "mdio";
- compatible = "fs_enet";
- reg = <0 0>;
- linux,phandle = <24520>;
- #address-cells = <1>;
- #size-cells = <0>;
- ethernet-phy@0 {
- linux,phandle = <2452000>;
- interrupt-parent = <10c00>;
- interrupts = <19 1>;
- reg = <0>;
- bitbang = [ 12 12 13 02 02 01 ];
- device_type = "ethernet-phy";
- };
- ethernet-phy@1 {
- linux,phandle = <2452001>;
- interrupt-parent = <10c00>;
- interrupts = <19 1>;
- bitbang = [ 12 12 13 02 02 01 ];
- reg = <3>;
- device_type = "ethernet-phy";
- };
- };
-
- ethernet@24000 {
- #address-cells = <1>;
- #size-cells = <0>;
- device_type = "network";
- device-id = <2>;
- compatible = "fs_enet";
- model = "FCC";
- reg = <11300 20 8400 100 11380 30>;
- mac-address = [ 00 11 2F 99 43 54 ];
- interrupts = <20 2>;
- interrupt-parent = <10c00>;
- phy-handle = <2452000>;
- rx-clock = <13>;
- tx-clock = <12>;
- };
-
- ethernet@25000 {
- device_type = "network";
- device-id = <3>;
- compatible = "fs_enet";
- model = "FCC";
- reg = <11320 20 8500 100 113b0 30>;
- mac-address = [ 00 11 2F 99 44 54 ];
- interrupts = <21 2>;
- interrupt-parent = <10c00>;
- phy-handle = <2452001>;
- rx-clock = <17>;
- tx-clock = <18>;
- };
-
- cpm@f0000000 {
- linux,phandle = <f0000000>;
- #address-cells = <1>;
- #size-cells = <1>;
- #interrupt-cells = <2>;
- device_type = "cpm";
- model = "CPM2";
- ranges = <00000000 00000000 3ffff>;
- reg = <10d80 3280>;
- command-proc = <119c0>;
- brg-frequency = <17D7840>;
- cpm_clk = <BEBC200>;
-
- scc@11a00 {
- device_type = "serial";
- compatible = "cpm_uart";
- model = "SCC";
- device-id = <2>;
- reg = <11a00 20 8000 100>;
- current-speed = <1c200>;
- interrupts = <28 2>;
- interrupt-parent = <10c00>;
- clock-setup = <0 00ffffff>;
- rx-clock = <1>;
- tx-clock = <1>;
- };
-
- scc@11a60 {
- device_type = "serial";
- compatible = "cpm_uart";
- model = "SCC";
- device-id = <5>;
- reg = <11a60 20 8300 100>;
- current-speed = <1c200>;
- interrupts = <2b 2>;
- interrupt-parent = <10c00>;
- clock-setup = <1b ffffff00>;
- rx-clock = <4>;
- tx-clock = <4>;
- };
-
- };
- interrupt-controller@10c00 {
- linux,phandle = <10c00>;
- #address-cells = <0>;
- #interrupt-cells = <2>;
- interrupt-controller;
- reg = <10c00 80>;
- built-in;
- device_type = "cpm-pic";
- };
- pci@0500 {
- linux,phandle = <0500>;
- #interrupt-cells = <1>;
- #size-cells = <2>;
- #address-cells = <3>;
- compatible = "8272";
- device_type = "pci";
- reg = <10430 4dc>;
- clock-frequency = <3f940aa>;
- interrupt-map-mask = <f800 0 0 7>;
- interrupt-map = <
-
- /* IDSEL 0x16 */
- b000 0 0 1 f8200000 40 0
- b000 0 0 2 f8200000 41 0
- b000 0 0 3 f8200000 42 0
- b000 0 0 4 f8200000 43 0
-
- /* IDSEL 0x17 */
- b800 0 0 1 f8200000 43 0
- b800 0 0 2 f8200000 40 0
- b800 0 0 3 f8200000 41 0
- b800 0 0 4 f8200000 42 0
-
- /* IDSEL 0x18 */
- c000 0 0 1 f8200000 42 0
- c000 0 0 2 f8200000 43 0
- c000 0 0 3 f8200000 40 0
- c000 0 0 4 f8200000 41 0>;
- interrupt-parent = <10c00>;
- interrupts = <14 3>;
- bus-range = <0 0>;
- ranges = <02000000 0 80000000 80000000 0 40000000
- 01000000 0 00000000 f6000000 0 02000000>;
- };
-
-/* May need to remove if on a part without crypto engine */
- crypto@30000 {
- device_type = "crypto";
- model = "SEC2";
- compatible = "talitos";
- reg = <30000 10000>;
- interrupts = <b 0>;
- interrupt-parent = <10c00>;
- num-channels = <4>;
- channel-fifo-len = <18>;
- exec-units-mask = <0000007e>;
-/* desc mask is for rev1.x, we need runtime fixup for >=2.x */
- descriptor-types-mask = <01010ebf>;
- };
-
- };
-};
diff --git a/arch/powerpc/sysdev/cpm2_pic.c b/arch/powerpc/sysdev/cpm2_pic.c
index 28b0189..5175299 100644
--- a/arch/powerpc/sysdev/cpm2_pic.c
+++ b/arch/powerpc/sysdev/cpm2_pic.c
@@ -147,7 +147,7 @@ static struct irq_chip cpm2_pic = {
.end = cpm2_end_irq,
};
-unsigned int cpm2_get_irq(struct pt_regs *regs)
+int cpm2_get_irq(struct pt_regs *regs)
{
int irq;
unsigned long bits;
diff --git a/arch/powerpc/sysdev/cpm2_pic.h b/arch/powerpc/sysdev/cpm2_pic.h
index 3c513e5..d63e45d 100644
--- a/arch/powerpc/sysdev/cpm2_pic.h
+++ b/arch/powerpc/sysdev/cpm2_pic.h
@@ -3,7 +3,7 @@ #define _PPC_KERNEL_CPM2_H
extern intctl_cpm2_t *cpm2_intctl;
-extern unsigned int cpm2_get_irq(struct pt_regs *regs);
+extern int cpm2_get_irq(struct pt_regs *regs);
extern void cpm2_pic_init(struct device_node*);
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 39b76f9..022ed27 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -37,7 +37,6 @@ #include <mm/mmu_decl.h>
#include <asm/cpm2.h>
extern void init_fcc_ioports(struct fs_platform_info*);
-extern void init_scc_ioports(struct fs_uart_platform_info*);
static phys_addr_t immrbase = -1;
phys_addr_t get_immrbase(void)
@@ -567,7 +566,7 @@ static int __init fs_enet_of_init(void)
struct resource r[4];
struct device_node *phy, *mdio;
struct fs_platform_info fs_enet_data;
- const unsigned int *id, *phy_addr, phy_irq;
+ const unsigned int *id, *phy_addr;
const void *mac_addr;
const phandle *ph;
const char *model;
@@ -589,7 +588,6 @@ static int __init fs_enet_of_init(void)
if (ret)
goto err;
r[2].name = fcc_regs_c;
- fs_enet_data.fcc_regs_c = r[2].start;
r[3].start = r[3].end = irq_of_parse_and_map(np, 0);
r[3].flags = IORESOURCE_IRQ;
@@ -622,8 +620,6 @@ static int __init fs_enet_of_init(void)
phy_addr = get_property(phy, "reg", NULL);
fs_enet_data.phy_addr = *phy_addr;
- phy_irq = get_property(phy, "interrupts", NULL);
-
id = get_property(np, "device-id", NULL);
fs_enet_data.fs_no = *id;
strcpy(fs_enet_data.fs_type, model);
@@ -641,7 +637,6 @@ static int __init fs_enet_of_init(void)
if (strstr(model, "FCC")) {
int fcc_index = *id - 1;
- unsigned char* mdio_bb_prop;
fs_enet_data.dpram_offset = (u32)cpm_dpram_addr(0);
fs_enet_data.rx_ring = 32;
@@ -657,63 +652,14 @@ static int __init fs_enet_of_init(void)
(u32)res.start, fs_enet_data.phy_addr);
fs_enet_data.bus_id = (char*)&bus_id[(*id)];
fs_enet_data.init_ioports = init_fcc_ioports;
+ }
- mdio_bb_prop = get_property(phy, "bitbang", NULL);
- if (mdio_bb_prop) {
- struct platform_device *fs_enet_mdio_bb_dev;
- struct fs_mii_bb_platform_info fs_enet_mdio_bb_data;
-
- fs_enet_mdio_bb_dev =
- platform_device_register_simple("fsl-bb-mdio",
- i, NULL, 0);
- memset(&fs_enet_mdio_bb_data, 0,
- sizeof(struct fs_mii_bb_platform_info));
- fs_enet_mdio_bb_data.mdio_dat.bit =
- mdio_bb_prop[0];
- fs_enet_mdio_bb_data.mdio_dir.bit =
- mdio_bb_prop[1];
- fs_enet_mdio_bb_data.mdc_dat.bit =
- mdio_bb_prop[2];
- fs_enet_mdio_bb_data.mdio_port =
- mdio_bb_prop[3];
- fs_enet_mdio_bb_data.mdc_port =
- mdio_bb_prop[4];
- fs_enet_mdio_bb_data.delay =
- mdio_bb_prop[5];
-
- fs_enet_mdio_bb_data.irq[0] = phy_irq[0];
- fs_enet_mdio_bb_data.irq[1] = -1;
- fs_enet_mdio_bb_data.irq[2] = -1;
- fs_enet_mdio_bb_data.irq[3] = phy_irq[0];
- fs_enet_mdio_bb_data.irq[31] = -1;
-
- fs_enet_mdio_bb_data.mdio_dat.offset =
- (u32)&cpm2_immr->im_ioport.iop_pdatc;
- fs_enet_mdio_bb_data.mdio_dir.offset =
- (u32)&cpm2_immr->im_ioport.iop_pdirc;
- fs_enet_mdio_bb_data.mdc_dat.offset =
- (u32)&cpm2_immr->im_ioport.iop_pdatc;
-
- ret = platform_device_add_data(
- fs_enet_mdio_bb_dev,
- &fs_enet_mdio_bb_data,
- sizeof(struct fs_mii_bb_platform_info));
- if (ret)
- goto unreg;
- } else {
- printk(KERN_ERR
- "mii-properties isn't found in device tree\n");
- ret = -ENODEV;
- goto unreg;
- }
- }
-
- of_node_put(phy);
- of_node_put(mdio);
+ of_node_put(phy);
+ of_node_put(mdio);
- ret = platform_device_add_data(fs_enet_dev, &fs_enet_data,
- sizeof(struct
- fs_platform_info));
+ ret = platform_device_add_data(fs_enet_dev, &fs_enet_data,
+ sizeof(struct
+ fs_platform_info));
if (ret)
goto unreg;
}
^ permalink raw reply related
* iSeries i/o patch
From: Stephen Rothwell @ 2006-09-22 4:15 UTC (permalink / raw)
To: paulus; +Cc: ppc-dev
Hi Paulus,
Couls you please apply the version of the patch here:
https://patchwork.ozlabs.org/linuxppc/patch?id=7033
This one does not depend on the noreturn BUG() patches and clearly
only affects iSeries. I have built and run it there. I have also built
it for several other configurations (pseries, g5, pmac32 and ppc32) just
to make sure. :-)
If we do decide to make BUG() noreturn, we can fix up the places where it
makes a difference later.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
^ permalink raw reply
* Re: [PATCH] kdump: don't call __ioremap() for pfn = 0
From: Sachin P. Sant @ 2006-09-22 4:22 UTC (permalink / raw)
To: michael; +Cc: linuxppc-dev, Fastboot mailing list
In-Reply-To: <1158836557.7062.52.camel@localhost.localdomain>
Michael Ellerman wrote:
>> Attached is a patch to fix this problem. During such rare cases don't call
>> __ioremap() to do the address translation, instead use __va() .
>>
>
> It's not really rare, it's just when we're reading /dev/oldmem directly.
>
That's true. Since we don't try to copy raw dump from /dev/oldmem very
often, we haven't come across this problem. Hence rare .. but as
michael said always recreatable while using dd command with /dev/oldmem.
> We can actually use the __va() trick for the whole linear mapping rather
> than just pfn 0, which saves the ioremap. We also shouldn't really be
> trying to iounmap(__va(0)).
>
Yes. Makes sense. Agreed.
> So perhaps something more like this? Although it's a bit ugly because of
> the need to conditionally call iounmap().
>
< snip >
Thanks
-Sachin
^ permalink raw reply
* Re: [PATCH 1/3] POWERPC: Added devicetree for mpc8272ads board
From: Kumar Gala @ 2006-09-22 4:55 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <20060922024827.27185.39986.stgit@localhost.localdomain>
On Sep 21, 2006, at 9:48 PM, Vitaly Bordug wrote:
>
> This adds current dts file used with MPC8272ADS,
> introducing new mdio bitbang defines, as well as
> fully-CPM2-SoC board design.
>
> Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
> ---
>
> arch/powerpc/boot/dts/mpc8272ads.dts | 236 +++++++++++++++++++++++
> +++++++++++
> 1 files changed, 236 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/
> boot/dts/mpc8272ads.dts
> new file mode 100644
> index 0000000..6d72b7d
> --- /dev/null
> +++ b/arch/powerpc/boot/dts/mpc8272ads.dts
> @@ -0,0 +1,236 @@
> +/*
> + * MPC8272 ADS Device Tree Source
> + *
> + * Copyright 2005 Freescale Semiconductor Inc.
> + *
> + * This program is free software; you can redistribute it and/or
> modify it
> + * under the terms of the GNU General Public License as
> published by the
> + * Free Software Foundation; either version 2 of the License, or
> (at your
> + * option) any later version.
> + */
> +
> +
> +/*
> +/memreserve/ 00000000 4000000;
> +*/
Is this needed?
> +
> +/ {
> + model = "MPC8272ADS";
> + compatible = "MPC8260ADS";
> + #address-cells = <1>;
> + #size-cells = <1>;
> + linux,phandle = <100>;
> +
> + cpus {
> + #cpus = <1>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + linux,phandle = <200>;
> +
> + PowerPC,8272@0 {
> + device_type = "cpu";
> + reg = <0>;
> + d-cache-line-size = <20>; // 32 bytes
> + i-cache-line-size = <20>; // 32 bytes
> + d-cache-size = <4000>; // L1, 16K
> + i-cache-size = <4000>; // L1, 16K
> + timebase-frequency = <17d7840>;
> + bus-frequency = <5f5e100>;
> + clock-frequency = <17D78400>;
Are the freq's really fixed? if not having these values as 0, maybe
be better.
> + 32-bit;
> + linux,phandle = <201>;
> + linux,boot-cpu;
> + };
> + };
> +
> + interrupt-controller@f8200000 {
> + linux,phandle = <f8200000>;
> + #address-cells = <0>;
> + #interrupt-cells = <2>;
> + interrupt-controller;
> + reg = <f8200000 f8200004>;
> + built-in;
> + device_type = "pci-pic";
> + };
> + memory {
> + device_type = "memory";
> + linux,phandle = <300>;
> + reg = <00000000 4000000 f4500000 00000020>;
> + };
> +
> + chosen {
> + name = "chosen";
> + bootargs = "root=/dev/nfs rw ip=on";
Seems bad form to put bootargs in the .dts directly like this.
> + linux,stdout-path = "/dev/ttyCPM0";
I thought this was the 'of' path, not a dev path.
> + linux,platform = <0>;
> + interrupt-controller = <10c00>;
> + linux,phandle = <400>;
> + };
> +
> + soc8272@f0000000 {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + #interrupt-cells = <2>;
> + device_type = "soc";
> + ranges = < 0 0 2 00000000 f0000000 00053000>;
> + reg = <f0000000 0>;
> +
> + mdio@0 {
> + device_type = "mdio";
> + compatible = "fs_enet";
> + reg = <0 0>;
> + linux,phandle = <24520>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + ethernet-phy@0 {
> + linux,phandle = <2452000>;
> + interrupt-parent = <10c00>;
> + interrupts = <19 1>;
> + reg = <0>;
> + bitbang = [ 12 12 13 02 02 01 ];
> + device_type = "ethernet-phy";
> + };
> + ethernet-phy@1 {
> + linux,phandle = <2452001>;
> + interrupt-parent = <10c00>;
> + interrupts = <19 1>;
> + bitbang = [ 12 12 13 02 02 01 ];
> + reg = <3>;
> + device_type = "ethernet-phy";
> + };
> + };
> +
> + ethernet@24000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + device_type = "network";
> + device-id = <2>;
> + compatible = "fs_enet";
> + model = "FCC";
> + reg = <11300 20 8400 100 11380 30>;
> + mac-address = [ 00 11 2F 99 43 54 ];
> + interrupts = <20 2>;
> + interrupt-parent = <10c00>;
> + phy-handle = <2452000>;
> + rx-clock = <13>;
> + tx-clock = <12>;
> + };
> +
> + ethernet@25000 {
> + device_type = "network";
> + device-id = <3>;
> + compatible = "fs_enet";
> + model = "FCC";
> + reg = <11320 20 8500 100 113b0 30>;
> + mac-address = [ 00 11 2F 99 44 54 ];
> + interrupts = <21 2>;
> + interrupt-parent = <10c00>;
> + phy-handle = <2452001>;
> + rx-clock = <17>;
> + tx-clock = <18>;
> + };
> +
> + cpm@f0000000 {
> + linux,phandle = <f0000000>;
> + #address-cells = <1>;
> + #size-cells = <1>;
> + #interrupt-cells = <2>;
> + device_type = "cpm";
> + model = "CPM2";
> + ranges = <00000000 00000000 3ffff>;
> + reg = <10d80 3280>;
> + command-proc = <119c0>;
> + brg-frequency = <17D7840>;
> + cpm_clk = <BEBC200>;
> +
> + scc@11a00 {
> + device_type = "serial";
> + compatible = "cpm_uart";
> + model = "SCC";
> + device-id = <2>;
> + reg = <11a00 20 8000 100>;
> + current-speed = <1c200>;
> + interrupts = <28 2>;
> + interrupt-parent = <10c00>;
> + clock-setup = <0 00ffffff>;
> + rx-clock = <1>;
> + tx-clock = <1>;
> + };
> +
> + scc@11a60 {
> + device_type = "serial";
> + compatible = "cpm_uart";
> + model = "SCC";
> + device-id = <5>;
> + reg = <11a60 20 8300 100>;
> + current-speed = <1c200>;
> + interrupts = <2b 2>;
> + interrupt-parent = <10c00>;
> + clock-setup = <1b ffffff00>;
> + rx-clock = <4>;
> + tx-clock = <4>;
> + };
> +
> + };
> + interrupt-controller@10c00 {
> + linux,phandle = <10c00>;
> + #address-cells = <0>;
> + #interrupt-cells = <2>;
> + interrupt-controller;
> + reg = <10c00 80>;
> + built-in;
> + device_type = "cpm-pic";
> + };
Do we need to distinguish cpm2-pic from cpm-pic (8xx)?
> + pci@0500 {
> + linux,phandle = <0500>;
> + #interrupt-cells = <1>;
> + #size-cells = <2>;
> + #address-cells = <3>;
> + compatible = "8272";
> + device_type = "pci";
> + reg = <10430 4dc>;
> + clock-frequency = <3f940aa>;
> + interrupt-map-mask = <f800 0 0 7>;
> + interrupt-map = <
> +
> + /* IDSEL 0x16 */
> + b000 0 0 1 f8200000 40 0
> + b000 0 0 2 f8200000 41 0
> + b000 0 0 3 f8200000 42 0
> + b000 0 0 4 f8200000 43 0
> +
> + /* IDSEL 0x17 */
> + b800 0 0 1 f8200000 43 0
> + b800 0 0 2 f8200000 40 0
> + b800 0 0 3 f8200000 41 0
> + b800 0 0 4 f8200000 42 0
> +
> + /* IDSEL 0x18 */
> + c000 0 0 1 f8200000 42 0
> + c000 0 0 2 f8200000 43 0
> + c000 0 0 3 f8200000 40 0
> + c000 0 0 4 f8200000 41 0>;
> + interrupt-parent = <10c00>;
> + interrupts = <14 3>;
> + bus-range = <0 0>;
> + ranges = <02000000 0 80000000 80000000 0
> 40000000
> + 01000000 0 00000000 f6000000 0
> 02000000>;
> + };
> +
> +/* May need to remove if on a part without crypto engine */
> + crypto@30000 {
> + device_type = "crypto";
> + model = "SEC2";
> + compatible = "talitos";
> + reg = <30000 10000>;
> + interrupts = <b 0>;
> + interrupt-parent = <10c00>;
> + num-channels = <4>;
> + channel-fifo-len = <18>;
> + exec-units-mask = <0000007e>;
> +/* desc mask is for rev1.x, we need runtime fixup for >=2.x */
> + descriptor-types-mask = <01010ebf>;
> + };
> +
> + };
> +};
^ permalink raw reply
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