LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: simpleboot
From: David H. Lynch Jr. @ 2008-04-23 19:43 UTC (permalink / raw)
  To: Grant Likely, linuxppc-embedded
In-Reply-To: <fa686aa40804231149j344a4cc5iaf15ac12828146f7@mail.gmail.com>

Grant Likely wrote:
> make simpleImage.<boardname>
> - or -
> make simpleImage.initrd.<boardname>
>
> The makefile will use arch/powerpc/boot/dts/<boardname>.dts for the device tree.
    Thanks, I suspected most of that. But I have not see simpleboot in
Linus's tree yet,
    so I have to back port the patch from the paulus tree and that makes
it harder to just try it.

    I am correct in assuming that if I have my .config otherwise
properly setup for initramfs that
    it is going to merge the kernel, dts, and initramfs into a single
image ?

    and is initramfs the plain or initrd target the correct one for
initramfs ?


-- 
Dave Lynch                                          Pico Computing, Inc.
Software Development                                      Embedded Linux
717.627.3770      dhlii@picocomputing.net   http://www.picocomputing.com
fax: 1.253.369.9244                                 Cell: 1.717.587.7774
Tiny Mighty Machines

^ permalink raw reply

* Re: simpleboot
From: Grant Likely @ 2008-04-23 19:48 UTC (permalink / raw)
  To: David H. Lynch Jr.; +Cc: linuxppc-embedded
In-Reply-To: <480F917F.8040809@picocomputing.net>

On Wed, Apr 23, 2008 at 1:43 PM, David H. Lynch Jr.
<dhlii@picocomputing.net> wrote:
> Grant Likely wrote:
>  > make simpleImage.<boardname>
>  > - or -
>  > make simpleImage.initrd.<boardname>
>  >
>  > The makefile will use arch/powerpc/boot/dts/<boardname>.dts for the device tree.
>     Thanks, I suspected most of that. But I have not see simpleboot in
>  Linus's tree yet,
>     so I have to back port the patch from the paulus tree and that makes
>  it harder to just try it.
>
>     I am correct in assuming that if I have my .config otherwise
>  properly setup for initramfs that
>     it is going to merge the kernel, dts, and initramfs into a single
>  image ?

Yes, the dtb and ramdisk images are just put into the wrapper image.
There are no .config values that manipulate the wrapping operation.
>
>     and is initramfs the plain or initrd target the correct one for
> initramfs ?

Its whatever kind of image you pass it.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

^ permalink raw reply

* [PATCH 2/2] mpic_u3msi: mpic_u3msi: failed allocation unnoticed
From: Roel Kluin @ 2008-04-23 19:00 UTC (permalink / raw)
  To: paulus, linuxppc-dev; +Cc: lkml
In-Reply-To: <480F6905.3070808@tiscali.nl>

A similar problem in arch/powerpc/sysdev/mpic_u3msi.c,
sorry for the dup, fixed header.
---
bitmap_find_free_region(), called by mpic_msi_alloc_hwirqs() may
return -ENOMEM, but hwirq of type irq_hw_number_t which is unsigned.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
The functions can be found respectively in:
//---[ vi lib/bitmap.c +807 ]---
//---[ vi arch/powerpc/sysdev/mpic_msi.c +39 ]---

diff --git a/arch/powerpc/sysdev/mpic_u3msi.c b/arch/powerpc/sysdev/mpic_u3msi.c
index 1d5a408..30a4e27 100644
--- a/arch/powerpc/sysdev/mpic_u3msi.c
+++ b/arch/powerpc/sysdev/mpic_u3msi.c
@@ -122,7 +122,7 @@ static int u3msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
 
 	list_for_each_entry(entry, &pdev->msi_list, list) {
 		hwirq = mpic_msi_alloc_hwirqs(msi_mpic, 1);
-		if (hwirq < 0) {
+		if (hwirq == -ENOMEM) {
 			pr_debug("u3msi: failed allocating hwirq\n");
 			return hwirq;
 		}

^ permalink raw reply related

* Re: XLlTemac  soft lockup BUG
From: John Bonesio @ 2008-04-23 18:45 UTC (permalink / raw)
  To: khollan; +Cc: linuxppc-embedded
In-Reply-To: <16834738.post@talk.nabble.com>

[-- Attachment #1: Type: text/plain, Size: 899 bytes --]

Hi Kevin,

When the system locks up, does it get stuck in the FifoRecvHandler()
routine?

How many bytes are returned from XLlFifo_RxGetLen(&lp->Fifo) in that
routine?

You can try calling XLlFifo_Reset(&lp->Fifo); to see if that clears the
fifo. Though, I suspect that this wont fix the root cause of the problem
you're seeing.

- John


On Wed, 2008-04-23 at 11:09 -0700, khollan wrote:

> Hi,
> 
> I have done some more digging and it seems like whenever the system works
> the command XLlFifo_IsRxEmpty(&lp->Fifo)) returns a 1 meaning that the
> RxFifo is empty.  I stuck this test in the xenet_open function right before
> the fifo interupt gets enabled.
> 
> When ever this test comes back as 0 the ifconfig will get into the soft
> lockup I described above.
> 
> Is there a function that empties out the fifo, I tried XLlFifo_RxReset but
> that doesn't seem to work.
> 
> Thanks
> 
> Kevin



[-- Attachment #2: Type: text/html, Size: 1616 bytes --]

^ permalink raw reply

* Re: simpleboot
From: Grant Likely @ 2008-04-23 18:49 UTC (permalink / raw)
  To: David H. Lynch Jr.; +Cc: linuxppc-embedded
In-Reply-To: <480F8148.8090906@picocomputing.net>

On Wed, Apr 23, 2008 at 12:34 PM, David H. Lynch Jr.
<dhlii@picocomputing.net> wrote:
>     I am trying to decipher hot to use the simpleboot devicetree wrapper
>  and I am not grasping the process.
>
>     I need an initramfs kernel, inside an elf wrapper.
>     right now I get that pretty much for free.
>
>     How do  ask for a simpleboot wrapper kernel ?
>        It is a target for a makefile in arch/powerpc/boot how to I cause
>  that target to get invoked
>
>     How does it choose the device tree to wrap ?
>
>     How does it interact with things like initramfs ?

make simpleImage.<boardname>
- or -
make simpleImage.initrd.<boardname>

The makefile will use arch/powerpc/boot/dts/<boardname>.dts for the device tree.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

^ permalink raw reply

* simpleboot
From: David H. Lynch Jr. @ 2008-04-23 18:34 UTC (permalink / raw)
  To: linuxppc-embedded

    I am trying to decipher hot to use the simpleboot devicetree wrapper
and I am not grasping the process.

    I need an initramfs kernel, inside an elf wrapper.
    right now I get that pretty much for free.

    How do  ask for a simpleboot wrapper kernel ?
       It is a target for a makefile in arch/powerpc/boot how to I cause
that target to get invoked
      
    How does it choose the device tree to wrap ?

    How does it interact with things like initramfs ?




-- 
Dave Lynch                                          Pico Computing, Inc.
Software Development                                      Embedded Linux
717.627.3770      dhlii@picocomputing.net   http://www.picocomputing.com
fax: 1.253.369.9244                                 Cell: 1.717.587.7774
Tiny Mighty Machines

^ permalink raw reply

* Re: Fwd: SecretLab 2.6.24 with USB
From: Peter Korsgaard @ 2008-04-23 18:27 UTC (permalink / raw)
  To: Sam Karp; +Cc: linuxppc-embedded
In-Reply-To: <800687fe0804231047k46d1310as9f37de3a5bbbf259@mail.gmail.com>

>>>>> "Sam" == Sam Karp <sam.d.karp@gmail.com> writes:

Hi,

 Sam> [   77.688344] sd 0:0:0:0: [sda] 15584 512-byte hardware sectors (8 MB)
 Sam> [   77.770266] sd 0:0:0:0: [sda] Write Protect is off
 Sam> [   77.827242] sd 0:0:0:0: [sda] Assuming drive cache: write through
 Sam> [   77.919287] sd 0:0:0:0: [sda] 15584 512-byte hardware sectors (8 MB)
 Sam> [   78.001280] sd 0:0:0:0: [sda] Write Protect is off
 Sam> [   78.058131] sd 0:0:0:0: [sda] Assuming drive cache: write through
 Sam> [   78.131034]  sda:<7>usb-storage: queuecommand called
 Sam> [   78.201342]  sda1
 Sam> [   78.230344] sd 0:0:0:0: [sda] Attached SCSI removable disk
 Sam> [   78.298014] sd 0:0:0:0: Attached scsi generic sg0 type 0

Looks good.

 Sam> ls /dev/sd*
 Sam> ls: /dev/sd*: No such file or directory

Do you use mdev/udev? If not, you'll have to create the device nodes
yourself.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* Re: [PATCH] powerpc: Don't play type punning games with lock_token
From: Segher Boessenkool @ 2008-04-23 18:27 UTC (permalink / raw)
  To: linuxppc-dev list
In-Reply-To: <2fcdb6beb2e205a397a1928c2c2c4b1e3360b09e.1208962154.git.segher@kernel.crashing.org>

> The two u16 fields lock_token and paca_index in struct paca_struct are
> accessed as one u32 field via type punning.  Change this into one u32
> field paca_id, and add a paca_get_index() function to access only the
> low 16 bits of this.
>
> Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
> ---
>  arch/powerpc/kernel/asm-offsets.c          |    2 +-
>  arch/powerpc/kernel/paca.c                 |    3 +--
>  arch/powerpc/platforms/iseries/exception.S |    2 +-
>  include/asm-powerpc/iseries/hv_call.h      |    2 +-
>  include/asm-powerpc/paca.h                 |   18 ++++++++++++------
>  include/asm-powerpc/smp.h                  |    2 +-
>  include/asm-powerpc/spinlock.h             |    2 +-
>  7 files changed, 18 insertions(+), 13 deletions(-)

It doesn't apply cleanly anymore, will redo once the dust settles
a bit.


Segher

^ permalink raw reply

* Re: [i2c] platform_data when using of?
From: Jochen Friedrich @ 2008-04-23 18:20 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linuxppc-dev list, i2c
In-Reply-To: <20080423164523.GA4190@pengutronix.de>

Hi Wolfram,

> Hello,
> 
> I finally could get the work started with I2C on a MPC8260-based
> platform. I applied Jochen's series on top of 2.6.25 and it seems I
> could get the i2c-cpm and the rtc-rs5c372 driver working (except that it
> doesn't autoload as a module, but I think this is my fault somewhere).
> I have not checked all yet, but at least some reasonable things do happen.
> 
> I now wanted to test the latest at24-driver on top of that and stumbled
> over the fact, that I can't directly add platform_data to the dts-file.
> (As at24 shall be a generic driver, data about the eeprom type needs to
> be provided.) If I understood of correctly, I need to create another
> child node and put all necessary data in there (what also means one
> cannot use the predefined macros for known chips in at24.h). After that
> I use of_get_property and collect the data.
> 
> So, at the end, every driver using platform_data has to cope with two
> mechanisms to get the desired data? This sounds questionable to me, but
> maybe I just got something wrong as this is my first contact with of.
> 
> Kind regards,
> 
>    Wolfram

You should probably send this question to the Powerpc list (added to cc)

Thanks,
Jochen

^ permalink raw reply

* Re: XLlTemac  soft lockup BUG
From: khollan @ 2008-04-23 18:09 UTC (permalink / raw)
  To: linuxppc-embedded
In-Reply-To: <20080416225949.92427BD8076@mail18-sin.bigfish.com>


Hi,

I have done some more digging and it seems like whenever the system works
the command XLlFifo_IsRxEmpty(&lp->Fifo)) returns a 1 meaning that the
RxFifo is empty.  I stuck this test in the xenet_open function right before
the fifo interupt gets enabled.

When ever this test comes back as 0 the ifconfig will get into the soft
lockup I described above.

Is there a function that empties out the fifo, I tried XLlFifo_RxReset but
that doesn't seem to work.

Thanks

Kevin
-- 
View this message in context: http://www.nabble.com/XLlTemac--soft-lockup-BUG-tp16711066p16834738.html
Sent from the linuxppc-embedded mailing list archive at Nabble.com.

^ permalink raw reply

* Fwd: SecretLab 2.6.24 with USB
From: Sam Karp @ 2008-04-23 17:47 UTC (permalink / raw)
  To: linuxppc-embedded
In-Reply-To: <800687fe0804231007l5fdf664fn1d94a1e40dd7fe74@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 18788 bytes --]

---------- Forwarded message ----------
From: Sam Karp <sam.d.karp@gmail.com>
Date: Wed, 23 Apr 2008 11:07:50 -0600
Subject: Re: SecretLab 2.6.24 with USB
To: Henrik Larson <henka@henka.dyndns.org>

I've been working on a similar tasks and I've gotten to the point where I
the driver is registered but the dev/sd* never appears...

Here is my boot record

    0.000000] Xilinx ML403 Reference System (Virtex-4 FX)
[    0.000000] Zone PFN ranges:
[    0.000000]   DMA             0 ->    16384
[    0.000000]   Normal      16384 ->    16384
[    0.000000] Movable zone start PFN for each node
[    0.000000] early_node_map[1] active PFN ranges
[    0.000000]     0:        0 ->    16384
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total
pages: 16256
[    0.000000] Kernel command line: console=ttyS0,9600 ip=on root=/dev/ram
rw
[    0.000000] Xilinx INTC #0 at 0xD1000FC0 mapped to 0xFDFFEFC0
[    0.000000] PID hash table entries: 256 (order: 8, 1024 bytes)
[    0.000291] Console: colour dummy device 80x25
[    0.000834] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.002261] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.024384] Memory: 57824k available (2140k kernel code, 676k data, 116k
init, 0k highmem)
[    0.109229] Mount-cache hash table entries: 512
[    0.115828] net_namespace: 64 bytes
[    0.127629] NET: Registered protocol family 16
[    0.161368] SCSI subsystem initialized
[    0.164286] usbcore: registered new interface driver usbfs
[    0.166272] usbcore: registered new interface driver hub
[    0.167635] usbcore: registered new device driver usb
[    0.191313] NET: Registered protocol family 2
[    0.225573] IP route cache hash table entries: 1024 (order: 0, 4096
bytes)
[    0.232430] TCP established hash table entries: 2048 (order: 2, 16384
bytes)
[    0.232957] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.233313] TCP: Hash tables configured (established 2048 bind 2048)
[    0.233392] TCP reno registered
[    0.246425] checking if image is initramfs...it isn't (no cpio magic);
looks like an initrd
[    6.697539] Freeing initrd memory: 4139k freed
[    6.710934] NTFS driver 2.1.29 [Flags: R/W DEBUG].
[    6.712392] io scheduler noop registered
[    6.712477] io scheduler anticipatory registered (default)
[    6.712556] io scheduler deadline registered
[    6.712866] io scheduler cfq registered
[    6.785910] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ
sharing disabled
[    6.794247] serial8250.0: ttyS0 at MMIO 0xa0001003 (irq = 1) is a 16450
[    6.794383] console [ttyS0] enabled
[    9.360220] RAMDISK driver initialized: 16 RAM disks of 65536K size 1024
blocksize
[    9.451567] usbcore: registered new interface driver ub
[    9.513799] tun: Universal TUN/TAP device driver, 1.6
[    9.574089] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    9.652324] st: Version 20070203, fixed bufsize 32768, s/g segs 256
[    9.727853] Driver 'st' needs updating - please use bus_type methods
[    9.804619] osst :I: Tape driver with OnStream support version 0.99.4
[    9.804687] osst :I: $Id: osst.c,v 1.73 2005/01/01 21:13:34 wriede Exp $
[    9.962812] Driver 'osst' needs updating - please use bus_type methods
[   10.042450] Driver 'sd' needs updating - please use bus_type methods
[   10.119058] Driver 'sr' needs updating - please use bus_type methods
[   10.196759] SCSI Media Changer driver v0.25
[   10.248311] Driver 'ch' needs updating - please use bus_type methods
[   10.326499] c67x00 c67x00.0: Cypress C67X00 Host Controller
[   10.394304] c67x00 c67x00.0: new USB bus registered, assigned bus number
1
[   10.481219] usb usb1: configuration #1 chosen from 1 choice
[   10.549168] hub 1-0:1.0: USB hub found
[   10.593456] hub 1-0:1.0: 2 ports detected
[   10.747294] usb usb1: Product: Cypress C67X00 Host Controller
[   10.815603] usb usb1: Manufacturer: Linux 2.6.24.4 c67x00-hcd
[   10.884341] usb usb1: SerialNumber: c67x00_sie
[   10.937452] udc requested but CONFIG_USB_GADGET_C67X00 not enabled!
[   11.013687] usbcore: registered new interface driver usblp
[   11.078909] Initializing USB Mass Storage driver...
[   11.138123] usbcore: registered new interface driver usb-storage
[   11.209648] USB Mass Storage support registered.
[   11.265696] usbcore: registered new interface driver libusual
[   11.335071] usbcore: registered new interface driver cypress_cy7c63
[   11.410772] i8042.c: No controller found.
[   11.459066] mice: PS/2 mouse device common for all mice
[   11.523064] usbcore: registered new interface driver usbhid
[   11.589463] drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
[   11.664712] TCP cubic registered
[   11.702904] NET: Registered protocol family 1
[   11.755062] NET: Registered protocol family 17
[   12.313654] IP-Config: No network devices available.
[   12.374243] RAMDISK: Compressed image found at block 0
[   19.569218] EXT2-fs warning: mounting unchecked fs, running e2fsck is
recommended
[   19.658681] VFS: Mounted root (ext2 filesystem).
[   19.714175] Freeing unused kernel memory: 116k init
INIT: version 2.78 booting
Activating swap...
mount: you must specify the filesystem type
Mounting local filesystems...
nothing was mounted
Starting portmap daemon\: portmap.
INIT: Entering runlevel: 3

and when I plug in my USB drive I get this...


# [   72.112234] usb 1-1: new full speed USB device using c67x00 and address
2
[   72.402860] usb 1-1: configuration #1 chosen from 1 choice
[   72.474140] scsi0 : SCSI emulation for USB Mass Storage devices
[   72.551588] usb 1-1: Product: DiskOnKey
[   72.596938] usb 1-1: Manufacturer: M-Systems
[   72.647914] usb 1-1: SerialNumber: 021120102300F3EA
[   77.554538] scsi 0:0:0:0: Direct-Access     M-Sys    DiskOnKey
2.51 PQ: 0 ANSI: 0 CCS
[   77.688344] sd 0:0:0:0: [sda] 15584 512-byte hardware sectors (8 MB)
[   77.770266] sd 0:0:0:0: [sda] Write Protect is off
[   77.827242] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   77.919287] sd 0:0:0:0: [sda] 15584 512-byte hardware sectors (8 MB)
[   78.001280] sd 0:0:0:0: [sda] Write Protect is off
[   78.058131] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   78.131034]  sda:<7>usb-storage: queuecommand called
[   78.201342]  sda1
[   78.230344] sd 0:0:0:0: [sda] Attached SCSI removable disk
[   78.298014] sd 0:0:0:0: Attached scsi generic sg0 type 0

ls /dev/sd*
ls: /dev/sd*: No such file or directory

***the dmesg output is this...
 dmesg
_bulk_transfer_buf: xfer 31 bytes
[   77.902642] usb-storage: Status code 0; transferred 31/31
[   77.902722] usb-storage: -- transfer complete
[   77.902788] usb-storage: Bulk command transfer result=0
[   77.902858] usb-storage: Attempting to get CSW...
[   77.902933] usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
[   77.904635] usb-storage: Status code 0; transferred 13/13
[   77.904716] usb-storage: -- transfer complete
[   77.904781] usb-storage: Bulk status result = 0
[   77.904861] usb-storage: Bulk Status S 0x53425355 T 0x7 R 0 Stat 0x0
[   77.904951] usb-storage: scsi cmd done, result=0x0
[   77.905044] usb-storage: *** thread sleeping.
[   77.905327] usb-storage: queuecommand called
[   77.905471] usb-storage: *** thread awakened.
[   77.905563] usb-storage: Command ALLOW_MEDIUM_REMOVAL (6 bytes)
[   77.905635] usb-storage:  1e 00 00 00 01 00
[   77.905777] usb-storage: Bulk Command S 0x43425355 T 0x8 L 0 F 0 Trg 0
LUN 0 CL 6
[   77.905875] usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
[   77.906641] usb-storage: Status code 0; transferred 31/31
[   77.906721] usb-storage: -- transfer complete
[   77.906787] usb-storage: Bulk command transfer result=0
[   77.906857] usb-storage: Attempting to get CSW...
[   77.906931] usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
[   77.908636] usb-storage: Status code 0; transferred 13/13
[   77.908716] usb-storage: -- transfer complete
[   77.908781] usb-storage: Bulk status result = 0
[   77.908861] usb-storage: Bulk Status S 0x53425355 T 0x8 R 0 Stat 0x0
[   77.908950] usb-storage: scsi cmd done, result=0x0
[   77.909042] usb-storage: *** thread sleeping.
[   77.909362] usb-storage: queuecommand called
[   77.909511] usb-storage: *** thread awakened.
[   77.909602] usb-storage: Command TEST_UNIT_READY (6 bytes)
[   77.909669] usb-storage:  00 00 00 00 00 00
[   77.909811] usb-storage: Bulk Command S 0x43425355 T 0x9 L 0 F 0 Trg 0
LUN 0 CL 6
[   77.909909] usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
[   77.910642] usb-storage: Status code 0; transferred 31/31
[   77.910722] usb-storage: -- transfer complete
[   77.910788] usb-storage: Bulk command transfer result=0
[   77.910857] usb-storage: Attempting to get CSW...
[   77.910932] usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
[   77.912635] usb-storage: Status code 0; transferred 13/13
[   77.912716] usb-storage: -- transfer complete
[   77.912781] usb-storage: Bulk status result = 0
[   77.912861] usb-storage: Bulk Status S 0x53425355 T 0x9 R 0 Stat 0x0
[   77.912950] usb-storage: scsi cmd done, result=0x0
[   77.913042] usb-storage: *** thread sleeping.
[   77.913355] usb-storage: queuecommand called
[   77.913502] usb-storage: *** thread awakened.
[   77.913593] usb-storage: Command READ_CAPACITY (10 bytes)
[   77.913661] usb-storage:  25 00 00 00 00 00 00 00 00 00
[   77.913843] usb-storage: Bulk Command S 0x43425355 T 0xa L 8 F 128 Trg 0
LUN 0 CL 10
[   77.913943] usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
[   77.914642] usb-storage: Status code 0; transferred 31/31
[   77.914722] usb-storage: -- transfer complete
[   77.914788] usb-storage: Bulk command transfer result=0
[   77.914875] usb-storage: usb_stor_bulk_transfer_sglist: xfer 8 bytes, 1
entries
[   77.916638] usb-storage: Status code 0; transferred 8/8
[   77.916719] usb-storage: -- transfer complete
[   77.916786] usb-storage: Bulk data transfer result 0x0
[   77.916854] usb-storage: Attempting to get CSW...
[   77.916929] usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
[   77.918633] usb-storage: Status code 0; transferred 13/13
[   77.918712] usb-storage: -- transfer complete
[   77.918777] usb-storage: Bulk status result = 0
[   77.918857] usb-storage: Bulk Status S 0x53425355 T 0xa R 0 Stat 0x0
[   77.918946] usb-storage: scsi cmd done, result=0x0
[   77.919037] usb-storage: *** thread sleeping.
[   77.919287] sd 0:0:0:0: [sda] 15584 512-byte hardware sectors (8 MB)
[   77.995005] usb-storage: queuecommand called
[   77.995155] usb-storage: *** thread awakened.
[   77.995246] usb-storage: Command MODE_SENSE (6 bytes)
[   77.995310] usb-storage:  1a 00 3f 00 c0 00
[   77.995456] usb-storage: Bulk Command S 0x43425355 T 0xb L 192 F 128 Trg
0 LUN 0 CL 6
[   77.995557] usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
[   77.996652] usb-storage: Status code 0; transferred 31/31
[   77.996734] usb-storage: -- transfer complete
[   77.996799] usb-storage: Bulk command transfer result=0
[   77.996887] usb-storage: usb_stor_bulk_transfer_sglist: xfer 192 bytes, 1
entries
[   77.998650] usb-storage: Status code -121; transferred 8/192
[   77.998733] usb-storage: -- short read transfer
[   77.998803] usb-storage: Bulk data transfer result 0x1
[   77.998871] usb-storage: Attempting to get CSW...
[   77.998946] usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
[   78.000644] usb-storage: Status code 0; transferred 13/13
[   78.000723] usb-storage: -- transfer complete
[   78.000787] usb-storage: Bulk status result = 0
[   78.000867] usb-storage: Bulk Status S 0x53425355 T 0xb R 184 Stat 0x0
[   78.000958] usb-storage: scsi cmd done, result=0x0
[   78.001049] usb-storage: *** thread sleeping.
[   78.001280] sd 0:0:0:0: [sda] Write Protect is off
[   78.058047] sd 0:0:0:0: [sda] Mode Sense: 45 00 00 08
[   78.058131] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   78.131034]  sda:<7>usb-storage: queuecommand called
[   78.190334] usb-storage: *** thread awakened.
[   78.190437] usb-storage: Command READ_10 (10 bytes)
[   78.190500] usb-storage:  28 00 00 00 00 00 00 00 08 00
[   78.190687] usb-storage: Bulk Command S 0x43425355 T 0xc L 4096 F 128 Trg
0 LUN 0 CL 10
[   78.190789] usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
[   78.191664] usb-storage: Status code 0; transferred 31/31
[   78.191744] usb-storage: -- transfer complete
[   78.191810] usb-storage: Bulk command transfer result=0
[   78.191898] usb-storage: usb_stor_bulk_transfer_sglist: xfer 4096 bytes,
1 entries
[   78.199333] usb-storage: Status code 0; transferred 4096/4096
[   78.199419] usb-storage: -- transfer complete
[   78.199486] usb-storage: Bulk data transfer result 0x0
[   78.199555] usb-storage: Attempting to get CSW...
[   78.199630] usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
[   78.200658] usb-storage: Status code 0; transferred 13/13
[   78.200739] usb-storage: -- transfer complete
[   78.200804] usb-storage: Bulk status result = 0
[   78.200884] usb-storage: Bulk Status S 0x53425355 T 0xc R 0 Stat 0x0
[   78.200974] usb-storage: scsi cmd done, result=0x0
[   78.201068] usb-storage: *** thread sleeping.
[   78.201342]  sda1
[   78.224012] usb-storage: queuecommand called
[   78.224231] usb-storage: *** thread awakened.
[   78.224328] usb-storage: Command ALLOW_MEDIUM_REMOVAL (6 bytes)
[   78.224400] usb-storage:  1e 00 00 00 00 00
[   78.224544] usb-storage: Bulk Command S 0x43425355 T 0xd L 0 F 0 Trg 0
LUN 0 CL 6
[   78.224642] usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
[   78.225666] usb-storage: Status code 0; transferred 31/31
[   78.225746] usb-storage: -- transfer complete
[   78.225812] usb-storage: Bulk command transfer result=0
[   78.225882] usb-storage: Attempting to get CSW...
[   78.225956] usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
[   78.227656] usb-storage: Status code 0; transferred 13/13
[   78.227735] usb-storage: -- transfer complete
[   78.227800] usb-storage: Bulk status result = 0
[   78.227880] usb-storage: Bulk Status S 0x53425355 T 0xd R 0 Stat 0x0
[   78.227969] usb-storage: scsi cmd done, result=0x0
[   78.228172] usb-storage: *** thread sleeping.
[   78.230344] sd 0:0:0:0: [sda] Attached SCSI removable disk
[   78.298014] sd 0:0:0:0: Attached scsi generic sg0 type 0

I feel like I might be missing something in my config file but I'm not
positive?  Any ideas?

-Thanks
-Sam



On Wed, Apr 23, 2008 at 9:41 AM, Henrik Larson <henka@henka.dyndns.org>
wrote:

>
> Allt som har med skatter är per definition inte logiskt!
>
>
>
>
> On Wed, 23 Apr 2008, Peter Korsgaard wrote:
>
>    "Aaron" == Aaron Sells <aaron.sells@zin-tech.com> writes:
> > > > > > >
> > > > > >
> > Hi,
> >
> > Aaron> root@xilinx-ml403:/# dmesg | grep -i usb
> > Aaron> [    0.175963] usbcore: registered new interface driver usbfs
> > Aaron> [    0.178207] usbcore: registered new interface driver hub
> > Aaron> [    0.179810] usbcore: registered new device driver usb
> > Aaron> [    3.426016] usbcore: registered new interface driver ub
> > Aaron> [    4.156086] usbmon: debugfs is not available
> > Aaron> [    4.209160] Initializing USB Mass Storage driver...
> > Aaron> [    4.268302] usbcore: registered new interface driver
> > usb-storage
> > Aaron> [    4.336109] USB Mass Storage support registered.
> > Aaron> [    4.958294] usbcore: registered new interface driver usbhid
> > Aaron> [    5.020120] drivers/hid/usbhid/hid-core.c: v2.6:USB HID core
> > driver
> >
> > Yes, the USB core and drivers gets loaded, but because you haven't
> > provided a struct platform_device the c67x00 driver doesn't get
> > probed.
> >
> > Aaron> It still doesn't look like the ML403 Cypress host device is being
> > Aaron> recognized.  No messages appear upon insertion and removal of USB
> > Aaron> devices.
> >
> > Aaron> Regards,
> > Aaron> Aaron Sells
> > Aaron> diff linux-2.6-xlnx_arch-ppc-syslib-virtex_devices.c
> > secretlab_arch-ppc-syslib-virtex_devices.c
> > Aaron> 77,92d76
> > Aaron> <  * ML300/ML403 Video Device: shortcut macro for single instance
> >
> > Please use diff -u.
> >
> > I don't see anything with platform devices for the c67x00 driver. You
> > need something like:
> >
> > #include <linux/usb/c67x00.h>
> >
> > static struct resource c67x00_resources[] = {
> >        [0] = {
> >                .start  = 0x84000000,
> >                .end    = 0x8400000f,
> >                .flags  = IORESOURCE_MEM,
> >        },
> >        [1] = {
> >                .start  = 3,
> >                .end    = 3,
> >                .flags  = IORESOURCE_IRQ,
> >        },
> > };
> >
> > static struct c67x00_platform_data thinlite_c67x00_data = {
> >        .sie_config             = C67X00_SIE1_HOST |
> > C67X00_SIE2_PERIPHERAL_B,
> >        .hpi_regstep            = 0x02, /* A0 not connected on 16bit bus
> > */
> > };
> >
> > static struct platform_device thinlite_c67x00 = {
> >        .name                   = "c67x00",
> >        .id                     = 0,
> >        .num_resources          = ARRAY_SIZE(c67x00_resources),
> >        .resource               = c67x00_resources,
> >        .dev.platform_data      = &thinlite_c67x00_data,
> > };
> >
> > Which you then register with the platform bus with
> > platform_add_devices or similar. Either you do this by hand or you
> > create XPAR_* macros which take the needed info out of xparameter.h
> > (sorry, I don't have an xparameters.h with those defines at hand).
> >
> > Aaron> diff -Naur c67x00.old/c67x00-drv.c c67x00/c67x00-drv.c
> > Aaron> --- c67x00.old/c67x00-drv.c      2008-04-23 10:36:16.000000000
> > -0400
> > Aaron> +++ c67x00/c67x00-drv.c  2008-04-23 10:39:20.000000000 -0400
> > Aaron> @@ -57,8 +57,7 @@
> > Aaron>                  c67x00_hcd_probe(sie);
> > Aaron>                  break;
> >
> > Aaron> -        case C67X00_SIE_PERIPHERAL_A:
> > Aaron> -        case C67X00_SIE_PERIPHERAL_B:
> > Aaron> +        case C67X00_SIE_PERIPHERAL:
> >
> > This seems to be from an earlier version of my driver.
> >
> > --
> > Bye, Peter Korsgaard
> > _______________________________________________
> > Linuxppc-embedded mailing list
> > Linuxppc-embedded@ozlabs.org
> > https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> >
> > _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>

[-- Attachment #2: .config --]
[-- Type: text/plain, Size: 18679 bytes --]

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.24.4
# Wed Apr 23 07:54:55 2008
#
CONFIG_WORD_SIZE=32
CONFIG_MMU=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_ARCH_HAS_ILOG2_U32=y
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_PPC=y
CONFIG_PPC32=y
CONFIG_GENERIC_NVRAM=y
CONFIG_GENERIC_FIND_NEXT_BIT=y
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_GENERIC_BUG=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
# CONFIG_SWAP is not set
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
# CONFIG_POSIX_MQUEUE is not set
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
# CONFIG_TASKSTATS is not set
# CONFIG_USER_NS is not set
# CONFIG_PID_NS is not set
# CONFIG_AUDIT is not set
# CONFIG_IKCONFIG is not set
CONFIG_LOG_BUF_SHIFT=14
# CONFIG_CGROUPS is not set
CONFIG_FAIR_GROUP_SCHED=y
CONFIG_FAIR_USER_SCHED=y
# CONFIG_FAIR_CGROUP_SCHED is not set
CONFIG_SYSFS_DEPRECATED=y
# CONFIG_RELAY is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
# CONFIG_EMBEDDED is not set
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_SLAB=y
# CONFIG_SLUB is not set
# CONFIG_SLOB is not set
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
# CONFIG_MODULES is not set
CONFIG_BLOCK=y
CONFIG_LBD=y
# CONFIG_BLK_DEV_IO_TRACE is not set
# CONFIG_LSF is not set
# CONFIG_BLK_DEV_BSG is not set

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
CONFIG_DEFAULT_AS=y
# CONFIG_DEFAULT_DEADLINE is not set
# CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="anticipatory"

#
# Processor
#
# CONFIG_6xx is not set
CONFIG_40x=y
# CONFIG_44x is not set
# CONFIG_8xx is not set
# CONFIG_E200 is not set
# CONFIG_E500 is not set
CONFIG_PPC_DCR_NATIVE=y
CONFIG_PPC_DCR=y
CONFIG_MATH_EMULATION=y
# CONFIG_KEXEC is not set
# CONFIG_CPU_FREQ is not set
CONFIG_4xx=y
# CONFIG_WANT_EARLY_SERIAL is not set

#
# IBM 4xx options
#
# CONFIG_BUBINGA is not set
# CONFIG_CPCI405 is not set
# CONFIG_EP405 is not set
# CONFIG_REDWOOD_5 is not set
# CONFIG_REDWOOD_6 is not set
# CONFIG_SYCAMORE is not set
# CONFIG_WALNUT is not set
# CONFIG_XILINX_ML300 is not set
CONFIG_XILINX_ML403=y
CONFIG_IBM405_ERR77=y
CONFIG_IBM405_ERR51=y
CONFIG_XILINX_VIRTEX_4_FX=y
CONFIG_XILINX_VIRTEX=y
CONFIG_EMBEDDEDBOOT=y
# CONFIG_PPC4xx_DMA is not set
CONFIG_PPC_GEN550=y
CONFIG_UART0_TTYS0=y
# CONFIG_UART0_TTYS1 is not set
CONFIG_NOT_COHERENT_CACHE=y

#
# Platform options
#
# CONFIG_PC_KEYBOARD is not set
# CONFIG_HIGHMEM is not set
CONFIG_ARCH_POPULATES_NODE_MAP=y
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not set
CONFIG_HZ=250
CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
# CONFIG_DISCONTIGMEM_MANUAL is not set
# CONFIG_SPARSEMEM_MANUAL is not set
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
# CONFIG_SPARSEMEM_STATIC is not set
# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
CONFIG_SPLIT_PTLOCK_CPUS=4
# CONFIG_RESOURCES_64BIT is not set
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_VIRT_TO_BUS=y
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_MISC is not set
CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="console=ttyS0,9600 ip=on root=/dev/ram rw"
CONFIG_SECCOMP=y
CONFIG_ISA_DMA_API=y

#
# Bus options
#
CONFIG_ZONE_DMA=y
# CONFIG_PPC_I8259 is not set
# CONFIG_PCI is not set
# CONFIG_PCI_DOMAINS is not set
# CONFIG_PCI_SYSCALL is not set
# CONFIG_ARCH_SUPPORTS_MSI is not set
# CONFIG_PCCARD is not set

#
# Advanced setup
#
# CONFIG_ADVANCED_OPTIONS is not set

#
# Default settings for advanced configuration options are used
#
CONFIG_HIGHMEM_START=0xfe000000
CONFIG_LOWMEM_SIZE=0x30000000
CONFIG_KERNEL_START=0xc0000000
CONFIG_TASK_SIZE=0x80000000
CONFIG_CONSISTENT_START=0xff100000
CONFIG_CONSISTENT_SIZE=0x00200000
CONFIG_BOOT_LOAD=0x00400000

#
# Networking
#
CONFIG_NET=y

#
# Networking options
#
CONFIG_PACKET=y
CONFIG_PACKET_MMAP=y
CONFIG_UNIX=y
CONFIG_XFRM=y
# CONFIG_XFRM_USER is not set
# CONFIG_XFRM_SUB_POLICY is not set
# CONFIG_XFRM_MIGRATE is not set
# CONFIG_NET_KEY is not set
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_FIB_HASH=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
# CONFIG_IP_PNP_BOOTP is not set
# CONFIG_IP_PNP_RARP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_ARPD is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_XFRM_TUNNEL is not set
# CONFIG_INET_TUNNEL is not set
CONFIG_INET_XFRM_MODE_TRANSPORT=y
CONFIG_INET_XFRM_MODE_TUNNEL=y
CONFIG_INET_XFRM_MODE_BEET=y
# CONFIG_INET_LRO is not set
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
# CONFIG_TCP_CONG_ADVANCED is not set
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_TCP_MD5SIG is not set
# CONFIG_IPV6 is not set
# CONFIG_INET6_XFRM_TUNNEL is not set
# CONFIG_INET6_TUNNEL is not set
# CONFIG_NETWORK_SECMARK is not set
# CONFIG_NETFILTER is not set
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
# CONFIG_BRIDGE is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_SCHED is not set

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_HAMRADIO is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
# CONFIG_AF_RXRPC is not set

#
# Wireless
#
# CONFIG_CFG80211 is not set
# CONFIG_WIRELESS_EXT is not set
# CONFIG_MAC80211 is not set
# CONFIG_IEEE80211 is not set
# CONFIG_RFKILL is not set
# CONFIG_NET_9P is not set

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_FW_LOADER is not set
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not set
# CONFIG_SYS_HYPERVISOR is not set
# CONFIG_CONNECTOR is not set
# CONFIG_MTD is not set
# CONFIG_PARPORT is not set
CONFIG_BLK_DEV=y
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_DEV_COW_COMMON is not set
# CONFIG_BLK_DEV_LOOP is not set
# CONFIG_BLK_DEV_NBD is not set
CONFIG_BLK_DEV_UB=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=65536
CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
# CONFIG_CDROM_PKTCDVD is not set
# CONFIG_ATA_OVER_ETH is not set
# CONFIG_XILINX_SYSACE is not set
CONFIG_MISC_DEVICES=y
# CONFIG_EEPROM_93CX6 is not set
# CONFIG_IDE is not set

#
# SCSI device support
#
CONFIG_RAID_ATTRS=y
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
CONFIG_SCSI_TGT=y
# CONFIG_SCSI_NETLINK is not set
CONFIG_SCSI_PROC_FS=y

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=y
CONFIG_CHR_DEV_OSST=y
CONFIG_BLK_DEV_SR=y
CONFIG_BLK_DEV_SR_VENDOR=y
CONFIG_CHR_DEV_SG=y
CONFIG_CHR_DEV_SCH=y

#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
CONFIG_SCSI_MULTI_LUN=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
CONFIG_SCSI_SCAN_ASYNC=y

#
# SCSI Transports
#
# CONFIG_SCSI_SPI_ATTRS is not set
# CONFIG_SCSI_FC_ATTRS is not set
# CONFIG_SCSI_ISCSI_ATTRS is not set
# CONFIG_SCSI_SAS_LIBSAS is not set
# CONFIG_SCSI_SRP_ATTRS is not set
CONFIG_SCSI_LOWLEVEL=y
# CONFIG_ISCSI_TCP is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_ATA is not set
# CONFIG_MD is not set
# CONFIG_MACINTOSH_DRIVERS is not set
CONFIG_NETDEVICES=y
# CONFIG_NETDEVICES_MULTIQUEUE is not set
# CONFIG_DUMMY is not set
# CONFIG_BONDING is not set
# CONFIG_MACVLAN is not set
# CONFIG_EQUALIZER is not set
CONFIG_TUN=y
# CONFIG_VETH is not set
# CONFIG_NET_ETHERNET is not set
CONFIG_NETDEV_1000=y
CONFIG_NETDEV_10000=y

#
# Wireless LAN
#
# CONFIG_WLAN_PRE80211 is not set
# CONFIG_WLAN_80211 is not set

#
# USB Network Adapters
#
# CONFIG_USB_CATC is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_USBNET is not set
# CONFIG_WAN is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
# CONFIG_SHAPER is not set
# CONFIG_NETCONSOLE is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_ISDN is not set
# CONFIG_PHONE is not set

#
# Input device support
#
CONFIG_INPUT=y
# CONFIG_INPUT_FF_MEMLESS is not set
# CONFIG_INPUT_POLLDEV is not set

#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
# CONFIG_INPUT_JOYDEV is not set
CONFIG_INPUT_EVDEV=y
# CONFIG_INPUT_EVBUG is not set

#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
# CONFIG_KEYBOARD_NEWTON is not set
# CONFIG_KEYBOARD_STOWAWAY is not set
# CONFIG_INPUT_MOUSE is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
# CONFIG_INPUT_MISC is not set

#
# Hardware I/O ports
#
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
CONFIG_SERIO_SERPORT=y
CONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_RAW is not set
# CONFIG_GAMEPORT is not set

#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_VT_HW_CONSOLE_BINDING is not set
# CONFIG_SERIAL_NONSTANDARD is not set

#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set

#
# Non-8250 serial port support
#
# CONFIG_SERIAL_UARTLITE is not set
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_UNIX98_PTYS=y
# CONFIG_LEGACY_PTYS is not set
# CONFIG_IPMI_HANDLER is not set
CONFIG_HW_RANDOM=y
# CONFIG_NVRAM is not set
# CONFIG_GEN_RTC is not set
# CONFIG_R3964 is not set
# CONFIG_RAW_DRIVER is not set
# CONFIG_TCG_TPM is not set
# CONFIG_I2C is not set

#
# SPI support
#
# CONFIG_SPI is not set
# CONFIG_SPI_MASTER is not set
# CONFIG_W1 is not set
# CONFIG_POWER_SUPPLY is not set
# CONFIG_HWMON is not set
# CONFIG_WATCHDOG is not set

#
# Sonics Silicon Backplane
#
CONFIG_SSB_POSSIBLE=y
# CONFIG_SSB is not set

#
# Multifunction device drivers
#
# CONFIG_MFD_SM501 is not set

#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set
# CONFIG_DVB_CORE is not set
CONFIG_DAB=y
# CONFIG_USB_DABUSB is not set

#
# Graphics support
#
# CONFIG_VGASTATE is not set
# CONFIG_VIDEO_OUTPUT_CONTROL is not set
# CONFIG_FB is not set
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set

#
# Display device support
#
# CONFIG_DISPLAY_SUPPORT is not set

#
# Console display driver support
#
CONFIG_DUMMY_CONSOLE=y

#
# Sound
#
# CONFIG_SOUND is not set
CONFIG_HID_SUPPORT=y
CONFIG_HID=y
CONFIG_HID_DEBUG=y
# CONFIG_HIDRAW is not set

#
# USB Input Devices
#
CONFIG_USB_HID=y
# CONFIG_USB_HIDINPUT_POWERBOOK is not set
# CONFIG_HID_FF is not set
# CONFIG_USB_HIDDEV is not set
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
# CONFIG_USB_ARCH_HAS_OHCI is not set
# CONFIG_USB_ARCH_HAS_EHCI is not set
CONFIG_USB=y
CONFIG_USB_DEBUG=y

#
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
CONFIG_USB_DEVICE_CLASS=y
CONFIG_USB_DYNAMIC_MINORS=y
# CONFIG_USB_OTG is not set

#
# USB Host Controller Drivers
#
# CONFIG_USB_ISP116X_HCD is not set
# CONFIG_USB_SL811_HCD is not set
# CONFIG_USB_R8A66597_HCD is not set
CONFIG_USB_C67X00_DRV=y
CONFIG_USB_C67X00_HCD=y

#
# USB Device Class drivers
#
# CONFIG_USB_ACM is not set
CONFIG_USB_PRINTER=y

#
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
#

#
# may also be needed; see USB_STORAGE Help for more information
#
CONFIG_USB_STORAGE=y
CONFIG_USB_STORAGE_DEBUG=y
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_DPCM is not set
# CONFIG_USB_STORAGE_USBAT is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_SDDR55 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_STORAGE_ALAUDA is not set
# CONFIG_USB_STORAGE_ONETOUCH is not set
# CONFIG_USB_STORAGE_KARMA is not set
CONFIG_USB_LIBUSUAL=y

#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_MICROTEK is not set
# CONFIG_USB_MON is not set

#
# USB port drivers
#

#
# USB Serial Converter support
#
# CONFIG_USB_SERIAL is not set

#
# USB Miscellaneous drivers
#
# CONFIG_USB_EMI62 is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_ADUTUX is not set
# CONFIG_USB_AUERSWALD is not set
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_BERRY_CHARGE is not set
# CONFIG_USB_LED is not set
CONFIG_USB_CYPRESS_CY7C63=y
# CONFIG_USB_CYTHERM is not set
# CONFIG_USB_PHIDGET is not set
# CONFIG_USB_IDMOUSE is not set
# CONFIG_USB_FTDI_ELAN is not set
# CONFIG_USB_APPLEDISPLAY is not set
# CONFIG_USB_LD is not set
# CONFIG_USB_TRANCEVIBRATOR is not set
# CONFIG_USB_IOWARRIOR is not set
# CONFIG_USB_TEST is not set

#
# USB DSL modem support
#

#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set
# CONFIG_MMC is not set
# CONFIG_NEW_LEDS is not set
# CONFIG_EDAC is not set
# CONFIG_RTC_CLASS is not set

#
# Userspace I/O
#
# CONFIG_UIO is not set

#
# File systems
#
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
CONFIG_EXT2_FS_XIP=y
CONFIG_FS_XIP=y
# CONFIG_EXT3_FS is not set
# CONFIG_EXT4DEV_FS is not set
CONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
CONFIG_FS_POSIX_ACL=y
# CONFIG_XFS_FS is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
# CONFIG_QUOTA is not set
CONFIG_DNOTIFY=y
CONFIG_AUTOFS_FS=y
CONFIG_AUTOFS4_FS=y
# CONFIG_FUSE_FS is not set

#
# CD-ROM/DVD Filesystems
#
# CONFIG_ISO9660_FS is not set
# CONFIG_UDF_FS is not set

#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
CONFIG_NTFS_FS=y
CONFIG_NTFS_DEBUG=y
CONFIG_NTFS_RW=y

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_PROC_SYSCTL=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
# CONFIG_TMPFS_POSIX_ACL is not set
# CONFIG_HUGETLB_PAGE is not set
# CONFIG_CONFIGFS_FS is not set

#
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
CONFIG_NETWORK_FILESYSTEMS=y
# CONFIG_NFS_FS is not set
# CONFIG_NFSD is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set

#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
CONFIG_NLS_ASCII=y
CONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
CONFIG_NLS_UTF8=y
# CONFIG_DLM is not set

#
# IBM 40x options
#

#
# Library routines
#
CONFIG_BITREVERSE=y
# CONFIG_CRC_CCITT is not set
# CONFIG_CRC16 is not set
# CONFIG_CRC_ITU_T is not set
CONFIG_CRC32=y
# CONFIG_CRC7 is not set
# CONFIG_LIBCRC32C is not set
CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
CONFIG_INSTRUMENTATION=y
# CONFIG_PROFILING is not set
# CONFIG_MARKERS is not set

#
# Kernel hacking
#
CONFIG_PRINTK_TIME=y
CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_ENABLE_MUST_CHECK=y
CONFIG_MAGIC_SYSRQ=y
# CONFIG_UNUSED_SYMBOLS is not set
# CONFIG_DEBUG_FS is not set
# CONFIG_HEADERS_CHECK is not set
CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_SHIRQ is not set
CONFIG_DETECT_SOFTLOCKUP=y
CONFIG_SCHED_DEBUG=y
# CONFIG_SCHEDSTATS is not set
# CONFIG_TIMER_STATS is not set
# CONFIG_DEBUG_SLAB is not set
# CONFIG_DEBUG_RT_MUTEXES is not set
# CONFIG_RT_MUTEX_TESTER is not set
# CONFIG_DEBUG_SPINLOCK is not set
CONFIG_DEBUG_MUTEXES=y
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
# CONFIG_DEBUG_KOBJECT is not set
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_LIST is not set
# CONFIG_DEBUG_SG is not set
CONFIG_FORCED_INLINING=y
# CONFIG_BOOT_PRINTK_DELAY is not set
# CONFIG_FAULT_INJECTION is not set
# CONFIG_SAMPLES is not set
# CONFIG_KGDB is not set
# CONFIG_XMON is not set
# CONFIG_BDI_SWITCH is not set
# CONFIG_SERIAL_TEXT_DEBUG is not set

#
# Security options
#
# CONFIG_KEYS is not set
# CONFIG_SECURITY is not set
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
# CONFIG_CRYPTO is not set

^ permalink raw reply

* [PATCH 2/2] powerpc: mpic_pasemi_msi: failed allocation unnoticed
From: Roel Kluin @ 2008-04-23 16:54 UTC (permalink / raw)
  To: paulus, linuxppc-dev; +Cc: lkml
In-Reply-To: <480F6905.3070808@tiscali.nl>

A similar problem in arch/powerpc/sysdev/mpic_u3msi.c:
---
bitmap_find_free_region(), called by mpic_msi_alloc_hwirqs() may
return -ENOMEM, but hwirq of type irq_hw_number_t which is unsigned.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
The functions can be found respectively in:
//---[ vi lib/bitmap.c +807 ]---
//---[ vi arch/powerpc/sysdev/mpic_msi.c +39 ]---

diff --git a/arch/powerpc/sysdev/mpic_u3msi.c b/arch/powerpc/sysdev/mpic_u3msi.c
index 1d5a408..30a4e27 100644
--- a/arch/powerpc/sysdev/mpic_u3msi.c
+++ b/arch/powerpc/sysdev/mpic_u3msi.c
@@ -122,7 +122,7 @@ static int u3msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
 
 	list_for_each_entry(entry, &pdev->msi_list, list) {
 		hwirq = mpic_msi_alloc_hwirqs(msi_mpic, 1);
-		if (hwirq < 0) {
+		if (hwirq == -ENOMEM) {
 			pr_debug("u3msi: failed allocating hwirq\n");
 			return hwirq;
 		}

^ permalink raw reply related

* [PATCH] powerpc: mpic_pasemi_msi: failed allocation unnoticed
From: Roel Kluin @ 2008-04-23 16:51 UTC (permalink / raw)
  To: paulus, linuxppc-dev; +Cc: lkml

bitmap_find_free_region(), called by mpic_msi_alloc_hwirqs() may
return -ENOMEM, but hwirq of type irq_hw_number_t which is unsigned.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
The functions can be found respectively in:
//---[ vi lib/bitmap.c +807 ]---
//---[ vi arch/powerpc/sysdev/mpic_msi.c +39 ]---

diff --git a/arch/powerpc/sysdev/mpic_pasemi_msi.c b/arch/powerpc/sysdev/mpic_pasemi_msi.c
index 33cbfb2..a15ac5c 100644
--- a/arch/powerpc/sysdev/mpic_pasemi_msi.c
+++ b/arch/powerpc/sysdev/mpic_pasemi_msi.c
@@ -109,7 +109,7 @@ static int pasemi_msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
 		 * sources can be changed independently.
 		 */
 		hwirq = mpic_msi_alloc_hwirqs(msi_mpic, ALLOC_CHUNK);
-		if (hwirq < 0) {
+		if (hwirq == -ENOMEM) {
 			pr_debug("pasemi_msi: failed allocating hwirq\n");
 			return hwirq;
 		}

^ permalink raw reply related

* Re: mpc8379e rdb nand flash support
From: Scott Wood @ 2008-04-23 16:35 UTC (permalink / raw)
  To: ???; +Cc: linuxppc-embedded
In-Reply-To: <FD78E578AB254426A3B97E7B65553E65@baby>

On Wed, Apr 23, 2008 at 03:47:00PM +0800, ??? wrote:
> Dear all:
>     Did anyone use mpc8379erdb board?  I changed nand flash from samsung 32M to hynix 1G byte.And the 1G byte nand's erase block size is 256KB.
>     Now the problem is: when I use " nand write.jffs2" command to write jffs2 filesystems to nand flash ,there is only 128KByte of every erase blocks can be writed.
>     From the datasheet of the mpc8379e ,"Page size of 2048 main area bytes plus 64 spare area bytes (large page devices);
> FCM RAM buffers are 4 Kbytes each; Flash block size of 128 Kbytes."
>     Is it means mpc8379e only support 128Kbytes block size?
>     Here is the information when I tried to write it :

It looks like you're talking about u-boot, not Linux; the FCM NAND driver
has not yet been merged.  Are you using a Freescale BSP?  If so, it's
best to go through official support channels.  If you're using patches
that were recently posted, make sure you have all the bugfixes that
recently went into the linux mtd tree.

-Scott

^ permalink raw reply

* Re: [PATCH 1/3] MSI driver for Freescale 83xx/85xx/86xx cpu
From: Segher Boessenkool @ 2008-04-23 16:05 UTC (permalink / raw)
  To: michael; +Cc: linuxppc-dev list, Kumar Gala, Jin Zhengxiong
In-Reply-To: <1208929545.9212.12.camel@concordia.ozlabs.ibm.com>

>>> data = ((hwirq / 32) << 5) | ((hwirq % 32) & 0x1F)
>>>
>>> Which doesn't seem to actually do anything?
>>
>> It's not a no-op, because hwirq is signed.  It probably should be
>> unsigned, like most things.
>
> You'll have to draw me a picture.

In C, signed division is round-towards-zero, while unsigned division
is round-towards-negative-infinity.  Suppose hwirq is -1, then
hwirq/32 is 0 and hwirq%32 is -1, so that the full expression above
will be 0x1f, not -1.  There is no such problem if hwirq would be
unsigned; the compiler can generate better code in that case.


Segher

^ permalink raw reply

* Re: SecretLab 2.6.24 with USB
From: Henrik Larson @ 2008-04-23 15:41 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: Aaron Sells, linuxppc-embedded
In-Reply-To: <87iqy8haf8.fsf@macbook.be.48ers.dk>


Allt som har med skatter är per definition inte logiskt!



On Wed, 23 Apr 2008, Peter Korsgaard wrote:

>>>>>> "Aaron" == Aaron Sells <aaron.sells@zin-tech.com> writes:
>
> Hi,
>
> Aaron> root@xilinx-ml403:/# dmesg | grep -i usb
> Aaron> [    0.175963] usbcore: registered new interface driver usbfs
> Aaron> [    0.178207] usbcore: registered new interface driver hub
> Aaron> [    0.179810] usbcore: registered new device driver usb
> Aaron> [    3.426016] usbcore: registered new interface driver ub
> Aaron> [    4.156086] usbmon: debugfs is not available
> Aaron> [    4.209160] Initializing USB Mass Storage driver...
> Aaron> [    4.268302] usbcore: registered new interface driver usb-storage
> Aaron> [    4.336109] USB Mass Storage support registered.
> Aaron> [    4.958294] usbcore: registered new interface driver usbhid
> Aaron> [    5.020120] drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
>
> Yes, the USB core and drivers gets loaded, but because you haven't
> provided a struct platform_device the c67x00 driver doesn't get
> probed.
>
> Aaron> It still doesn't look like the ML403 Cypress host device is being
> Aaron> recognized.  No messages appear upon insertion and removal of USB
> Aaron> devices.
>
> Aaron> Regards,
> Aaron> Aaron Sells
> Aaron> diff linux-2.6-xlnx_arch-ppc-syslib-virtex_devices.c secretlab_arch-ppc-syslib-virtex_devices.c
> Aaron> 77,92d76
> Aaron> <  * ML300/ML403 Video Device: shortcut macro for single instance
>
> Please use diff -u.
>
> I don't see anything with platform devices for the c67x00 driver. You
> need something like:
>
> #include <linux/usb/c67x00.h>
>
> static struct resource c67x00_resources[] = {
> 	[0] = {
> 		.start	= 0x84000000,
> 		.end	= 0x8400000f,
> 		.flags	= IORESOURCE_MEM,
> 	},
> 	[1] = {
> 		.start	= 3,
> 		.end	= 3,
> 		.flags	= IORESOURCE_IRQ,
> 	},
> };
>
> static struct c67x00_platform_data thinlite_c67x00_data = {
> 	.sie_config		= C67X00_SIE1_HOST | C67X00_SIE2_PERIPHERAL_B,
> 	.hpi_regstep		= 0x02, /* A0 not connected on 16bit bus */
> };
>
> static struct platform_device thinlite_c67x00 = {
> 	.name			= "c67x00",
> 	.id			= 0,
> 	.num_resources		= ARRAY_SIZE(c67x00_resources),
> 	.resource		= c67x00_resources,
> 	.dev.platform_data	= &thinlite_c67x00_data,
> };
>
> Which you then register with the platform bus with
> platform_add_devices or similar. Either you do this by hand or you
> create XPAR_* macros which take the needed info out of xparameter.h
> (sorry, I don't have an xparameters.h with those defines at hand).
>
> Aaron> diff -Naur c67x00.old/c67x00-drv.c c67x00/c67x00-drv.c
> Aaron> --- c67x00.old/c67x00-drv.c	2008-04-23 10:36:16.000000000 -0400
> Aaron> +++ c67x00/c67x00-drv.c	2008-04-23 10:39:20.000000000 -0400
> Aaron> @@ -57,8 +57,7 @@
> Aaron>  		c67x00_hcd_probe(sie);
> Aaron>  		break;
>
> Aaron> -	case C67X00_SIE_PERIPHERAL_A:
> Aaron> -	case C67X00_SIE_PERIPHERAL_B:
> Aaron> +	case C67X00_SIE_PERIPHERAL:
>
> This seems to be from an earlier version of my driver.
>
> -- 
> Bye, Peter Korsgaard
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>

^ permalink raw reply

* Re: Question on MPC83xx interrupts
From: Segher Boessenkool @ 2008-04-23 16:00 UTC (permalink / raw)
  To: michael; +Cc: Scott Wood, linux-ppc list, Andre Schwarz
In-Reply-To: <1208905031.6947.0.camel@concordia>

> You can see the mapping between virq and hwirq numbers by turning on
> CONFIG_VIRQ_DEBUG and looking in /sys/kernel/debug/powerpc/virq_mapping
> (after mounting debugfs).

Ooh, nice!  Are there plans to move this into some "real" sysfs
nodes?


Segher

^ permalink raw reply

* Re: Xilinx GPIO driver / CONFIG_OF
From: Johann Baudy @ 2008-04-23 14:54 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev, John Linn
In-Reply-To: <fa686aa40804230733n43064fa5q7b900bcf2b2754e6@mail.gmail.com>

Perfect :)

Many thanks,
Johann Baudy

On Wed, Apr 23, 2008 at 2:33 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
> On Wed, Apr 23, 2008 at 7:21 AM, John Linn <John.Linn@xilinx.com> wrote:
>  > Hi Johann,
>  >
>  >  Not to my knowledge yet.  We have it on our list to do.
>  >
>  >  Thanks,
>  >  John
>
>  I've got a partial driver but it's not updated to the new GPIO
>  infrastructure.  I'll try to post what I have today.
>
>  Cheers,
>  g.
>
>
>  --
>  Grant Likely, B.Sc., P.Eng.
>  Secret Lab Technologies Ltd.
>



-- 
Johann Baudy
johaahn@gmail.com

^ permalink raw reply

* [Cbe-oss-dev] [PATCH] Reworked Cell OProfile: SPU mutex lock fix
From: Carl Love @ 2008-04-23 15:50 UTC (permalink / raw)
  To: linuxppc-dev, cbe-oss-dev, linux-kernel, Arnd Bergmann,
	oprofile-list

This is a reworked patch to fix the SPU data storage.  Currently, the 
SPU escape sequences and program counter data is being added directly 
into the kernel buffer without holding the buffer_mutex lock.  This 
patch changes how the data is stored.  A new function,
oprofile_add_value, is added into the oprofile driver to allow adding
generic data to the per cpu buffers.  This enables a series of calls
to the oprofile_add_value to enter the needed SPU escape sequences 
and SPU program data into the kernel buffer via the per cpu buffers
without any additional processing. The oprofile_add_value function is
generic so it could be used by other architecures as well provided
the needed postprocessing was added to opreport.

Finally, this patch backs out the changes previously added to the 
oprofile generic code for handling the architecture specific 
ops.sync_start and ops.sync_stop that allowed the architecture
to skip the per CPU buffer creation.

Signed-off-by: Carl Love <carll@us.ibm.com>

Index: Cell_kernel_4_15_2008/arch/powerpc/oprofile/cell/pr_util.h
===================================================================
--- Cell_kernel_4_15_2008.orig/arch/powerpc/oprofile/cell/pr_util.h
+++ Cell_kernel_4_15_2008/arch/powerpc/oprofile/cell/pr_util.h
@@ -20,11 +20,6 @@
 #include <asm/cell-regs.h>
 #include <asm/spu.h>
 
-/* Defines used for sync_start */
-#define SKIP_GENERIC_SYNC 0
-#define SYNC_START_ERROR -1
-#define DO_GENERIC_SYNC 1
-
 struct spu_overlay_info {	/* map of sections within an SPU overlay */
 	unsigned int vma;	/* SPU virtual memory address from elf */
 	unsigned int size;	/* size of section from elf */
@@ -85,7 +80,7 @@ void stop_spu_profiling(void);
 int spu_sync_start(void);
 
 /* remove the hooks */
-int spu_sync_stop(void);
+void spu_sync_stop(void);
 
 /* Record SPU program counter samples to the oprofile event buffer. */
 void spu_sync_buffer(int spu_num, unsigned int *samples,
Index: Cell_kernel_4_15_2008/arch/powerpc/oprofile/cell/spu_task_sync.c
===================================================================
--- Cell_kernel_4_15_2008.orig/arch/powerpc/oprofile/cell/spu_task_sync.c
+++ Cell_kernel_4_15_2008/arch/powerpc/oprofile/cell/spu_task_sync.c
@@ -31,11 +31,13 @@
 
 #define RELEASE_ALL 9999
 
-static DEFINE_SPINLOCK(buffer_lock);
+static DEFINE_SPINLOCK(add_value_lock);
 static DEFINE_SPINLOCK(cache_lock);
 static int num_spu_nodes;
+int per_cpu_buffers_exist=0;
 int spu_prof_num_nodes;
 int last_guard_val[MAX_NUMNODES * 8];
+static int spu_ctx_sw_seen[MAX_NUMNODES * 8];
 
 /* Container for caching information about an active SPU task. */
 struct cached_info {
@@ -289,6 +291,7 @@ static int process_context_switch(struct
 	int retval;
 	unsigned int offset = 0;
 	unsigned long spu_cookie = 0, app_dcookie;
+	int cpu_buf;
 
 	retval = prepare_cached_spu_info(spu, objectId);
 	if (retval)
@@ -303,17 +306,28 @@ static int process_context_switch(struct
 		goto out;
 	}
 
-	/* Record context info in event buffer */
-	spin_lock_irqsave(&buffer_lock, flags);
-	add_event_entry(ESCAPE_CODE);
-	add_event_entry(SPU_CTX_SWITCH_CODE);
-	add_event_entry(spu->number);
-	add_event_entry(spu->pid);
-	add_event_entry(spu->tgid);
-	add_event_entry(app_dcookie);
-	add_event_entry(spu_cookie);
-	add_event_entry(offset);
-	spin_unlock_irqrestore(&buffer_lock, flags);
+	/* Record context info in event buffer.  Note, there are 4x more
+	 * SPUs then CPUs.  Map the SPU events/data for a given SPU to
+	 * the same CPU buffer.  Need to ensure the cntxt switch data and
+	 * samples stay in order.
+	 */
+	cpu_buf = spu->number >> 2;
+	spin_lock_irqsave(&add_value_lock, flags);
+	oprofile_add_value(ESCAPE_CODE, cpu_buf);
+	oprofile_add_value(SPU_CTX_SWITCH_CODE, cpu_buf);
+	oprofile_add_value(spu->number, cpu_buf);
+	oprofile_add_value(spu->pid, cpu_buf);
+	oprofile_add_value(spu->tgid, cpu_buf);
+	oprofile_add_value(app_dcookie, cpu_buf);
+	oprofile_add_value(spu_cookie, cpu_buf);
+	oprofile_add_value(offset, cpu_buf);
+
+	/* Set flag to indicate SPU PC data can now be written out.  If
+	 * the SPU program counter data is seen before an SPU context
+	 * record is seen, the postprocessing will fail.
+	 */
+	spu_ctx_sw_seen[spu->number] = 1;
+	spin_unlock_irqrestore(&add_value_lock, flags);
 	smp_wmb();	/* insure spu event buffer updates are written */
 			/* don't want entries intermingled... */
 out:
@@ -363,41 +377,55 @@ static int number_of_online_nodes(void)
 /* The main purpose of this function is to synchronize
  * OProfile with SPUFS by registering to be notified of
  * SPU task switches.
- *
- * NOTE: When profiling SPUs, we must ensure that only
- * spu_sync_start is invoked and not the generic sync_start
- * in drivers/oprofile/oprof.c.	 A return value of
- * SKIP_GENERIC_SYNC or SYNC_START_ERROR will
- * accomplish this.
  */
 int spu_sync_start(void)
 {
 	int k;
-	int ret = SKIP_GENERIC_SYNC;
+	int ret = 0;
 	int register_ret;
-	unsigned long flags = 0;
+	int cpu;
 
 	spu_prof_num_nodes = number_of_online_nodes();
 	num_spu_nodes = spu_prof_num_nodes * 8;
 
-	spin_lock_irqsave(&buffer_lock, flags);
-	add_event_entry(ESCAPE_CODE);
-	add_event_entry(SPU_PROFILING_CODE);
-	add_event_entry(num_spu_nodes);
-	spin_unlock_irqrestore(&buffer_lock, flags);
+	/* At this point, the CPU buffers have been generated so
+	 * writes to the per CPU buffers can occur.  Need to
+	 * set the flag that the buffers exist before registering for
+	 * the SPU context switches or the routine to process the
+	 * context switches will not write context switch information.
+	 */
+	per_cpu_buffers_exist = 1;
+
+	/* The SPU_PROFILING_CODE escape sequence must proceed
+	 * the SPU context switch info.
+	 */
+	for_each_online_cpu(cpu) {
+		oprofile_add_value(ESCAPE_CODE, cpu);
+		oprofile_add_value(SPU_PROFILING_CODE, cpu);
+		oprofile_add_value((unsigned long int)
+					    num_spu_nodes, cpu);
+	}
 
 	/* Register for SPU events  */
 	register_ret = spu_switch_event_register(&spu_active);
 	if (register_ret) {
-		ret = SYNC_START_ERROR;
+		/* Stop the profile_spus() function from trying
+		 * to store samples into the per CPU buffer.  The
+		 * buffer will not be there.
+		 */
+		per_cpu_buffers_exist = 0;
+		ret = -1;
 		goto out;
 	}
 
-	for (k = 0; k < (MAX_NUMNODES * 8); k++)
+	for (k = 0; k < (MAX_NUMNODES * 8); k++) {
 		last_guard_val[k] = 0;
+		spu_ctx_sw_seen[k] = 0;
+	}
 	pr_debug("spu_sync_start -- running.\n");
 out:
 	return ret;
+
 }
 
 /* Record SPU program counter samples to the oprofile event buffer. */
@@ -432,7 +460,7 @@ void spu_sync_buffer(int spu_num, unsign
 
 	map = c_info->map;
 	the_spu = c_info->the_spu;
-	spin_lock(&buffer_lock);
+	spin_lock(&add_value_lock);
 	for (i = 0; i < num_samples; i++) {
 		unsigned int sample = *(samples+i);
 		int grd_val = 0;
@@ -452,15 +480,22 @@ void spu_sync_buffer(int spu_num, unsign
 			break;
 		}
 
-		add_event_entry(file_offset | spu_num_shifted);
+		/* We must ensure that the SPU context switch has been written
+		 * out before samples for the SPU.  Otherwise, the SPU context
+		 * information is not available and the postprocessing of the
+		 * SPU PC will fail with no available anonymous map information.
+		 */
+		if (spu_ctx_sw_seen[spu_num])
+			oprofile_add_value((file_offset | spu_num_shifted),
+						    (spu_num >> 2));
 	}
-	spin_unlock(&buffer_lock);
+	spin_unlock(&add_value_lock);
 out:
 	spin_unlock_irqrestore(&cache_lock, flags);
 }
 
 
-int spu_sync_stop(void)
+void spu_sync_stop(void)
 {
 	unsigned long flags = 0;
 	int ret = spu_switch_event_unregister(&spu_active);
@@ -475,8 +510,9 @@ int spu_sync_stop(void)
 	ret = release_cached_info(RELEASE_ALL);
 	spin_unlock_irqrestore(&cache_lock, flags);
 out:
+	per_cpu_buffers_exist = 0;
 	pr_debug("spu_sync_stop -- done.\n");
-	return ret;
+	return;
 }
 
 
Index: Cell_kernel_4_15_2008/arch/powerpc/oprofile/op_model_cell.c
===================================================================
--- Cell_kernel_4_15_2008.orig/arch/powerpc/oprofile/op_model_cell.c
+++ Cell_kernel_4_15_2008/arch/powerpc/oprofile/op_model_cell.c
@@ -1191,15 +1191,15 @@ static int cell_sync_start(void)
 	if (spu_cycle_reset)
 		return spu_sync_start();
 	else
-		return DO_GENERIC_SYNC;
+		return 0;
 }
 
-static int cell_sync_stop(void)
+static void cell_sync_stop(void)
 {
 	if (spu_cycle_reset)
-		return spu_sync_stop();
-	else
-		return 1;
+		spu_sync_stop();
+
+	return;
 }
 
 struct op_powerpc_model op_model_cell = {
Index: Cell_kernel_4_15_2008/drivers/oprofile/buffer_sync.c
===================================================================
--- Cell_kernel_4_15_2008.orig/drivers/oprofile/buffer_sync.c
+++ Cell_kernel_4_15_2008/drivers/oprofile/buffer_sync.c
@@ -521,6 +521,20 @@ void sync_buffer(int cpu)
 			} else if (s->event == CPU_TRACE_BEGIN) {
 				state = sb_bt_start;
 				add_trace_begin();
+			} else if (s->event == VALUE_HEADER_ID) {
+				/* The next event contains a value
+				 * to enter directly into the event buffer.
+				 */
+				increment_tail(cpu_buf);
+				i++;  /* one less entry in buffer to process */
+
+				s = &cpu_buf->buffer[cpu_buf->tail_pos];
+
+				if (is_code(s->eip))
+					add_event_entry(s->event);
+				else
+					printk("KERN_ERR Oprofile per CPU" \
+					       "buffer sequence error.\n");
 			} else {
 				struct mm_struct * oldmm = mm;
 
Index: Cell_kernel_4_15_2008/drivers/oprofile/cpu_buffer.c
===================================================================
--- Cell_kernel_4_15_2008.orig/drivers/oprofile/cpu_buffer.c
+++ Cell_kernel_4_15_2008/drivers/oprofile/cpu_buffer.c
@@ -224,6 +224,35 @@ static void oprofile_end_trace(struct op
 	cpu_buf->tracing = 0;
 }
 
+/*
+ * Add a value to the per CPU buffer.  The value is passed from the per CPU
+ * buffer to the kernel buffer with no additional processing.  The assumption
+ * is any processing of the value will be done in the postprocessor.  This
+ * function should only be used for special architecture specific data.
+ * Currently only used by the CELL processor.
+ *
+ * The first enty in the per cpu buffer consists of the escape code and
+ * the VALUE_HEADER_ID value.  The next entry consists of an escape code
+ * with the value to store.  The syn_buffer routine takes the value from
+ * the second entry and put it into the kernel buffer.
+ */
+void oprofile_add_value(unsigned long value, int cpu) {
+	struct oprofile_cpu_buffer * cpu_buf = &cpu_buffer[cpu];
+
+	/* Enter a sequence of two evnets.  The first event says the
+	 * next event contains a value that is to be put directly into the
+	 * event buffer.
+	 */
+
+	if (nr_available_slots(cpu_buf) < 3) {
+		cpu_buf->sample_lost_overflow++;
+		return;
+	}
+
+	add_sample(cpu_buf, ESCAPE_CODE, VALUE_HEADER_ID);
+	add_sample(cpu_buf, ESCAPE_CODE, value);
+}
+
 void oprofile_add_ext_sample(unsigned long pc, struct pt_regs * const regs,
 				unsigned long event, int is_kernel)
 {
Index: Cell_kernel_4_15_2008/drivers/oprofile/cpu_buffer.h
===================================================================
--- Cell_kernel_4_15_2008.orig/drivers/oprofile/cpu_buffer.h
+++ Cell_kernel_4_15_2008/drivers/oprofile/cpu_buffer.h
@@ -54,5 +54,6 @@ void cpu_buffer_reset(struct oprofile_cp
 /* transient events for the CPU buffer -> event buffer */
 #define CPU_IS_KERNEL 1
 #define CPU_TRACE_BEGIN 2
+#define VALUE_HEADER_ID 3
 
 #endif /* OPROFILE_CPU_BUFFER_H */
Index: Cell_kernel_4_15_2008/drivers/oprofile/oprof.c
===================================================================
--- Cell_kernel_4_15_2008.orig/drivers/oprofile/oprof.c
+++ Cell_kernel_4_15_2008/drivers/oprofile/oprof.c
@@ -53,24 +53,13 @@ int oprofile_setup(void)
 	 * us missing task deaths and eventually oopsing
 	 * when trying to process the event buffer.
 	 */
-	if (oprofile_ops.sync_start) {
-		int sync_ret = oprofile_ops.sync_start();
-		switch (sync_ret) {
-		case 0:
-			goto post_sync;
-		case 1:
-			goto do_generic;
-		case -1:
-			goto out3;
-		default:
-			goto out3;
-		}
-	}
-do_generic:
+	if (oprofile_ops.sync_start
+	    && ((err = oprofile_ops.sync_start())))
+		goto out2;
+
 	if ((err = sync_start()))
 		goto out3;
 
-post_sync:
 	is_setup = 1;
 	mutex_unlock(&start_mutex);
 	return 0;
@@ -133,20 +122,9 @@ out:
 void oprofile_shutdown(void)
 {
 	mutex_lock(&start_mutex);
-	if (oprofile_ops.sync_stop) {
-		int sync_ret = oprofile_ops.sync_stop();
-		switch (sync_ret) {
-		case 0:
-			goto post_sync;
-		case 1:
-			goto do_generic;
-		default:
-			goto post_sync;
-		}
-	}
-do_generic:
+	if (oprofile_ops.sync_stop)
+		oprofile_ops.sync_stop();
 	sync_stop();
-post_sync:
 	if (oprofile_ops.shutdown)
 		oprofile_ops.shutdown();
 	is_setup = 0;
Index: Cell_kernel_4_15_2008/include/linux/oprofile.h
===================================================================
--- Cell_kernel_4_15_2008.orig/include/linux/oprofile.h
+++ Cell_kernel_4_15_2008/include/linux/oprofile.h
@@ -56,12 +56,10 @@ struct oprofile_operations {
 	/* Stop delivering interrupts. */
 	void (*stop)(void);
 	/* Arch-specific buffer sync functions.
-	 * Return value = 0:  Success
-	 * Return value = -1: Failure
-	 * Return value = 1:  Run generic sync function
+	 * Sync start: Return 0 for Success,  -1 for Failure
 	 */
 	int (*sync_start)(void);
-	int (*sync_stop)(void);
+	void (*sync_stop)(void);
 
 	/* Initiate a stack backtrace. Optional. */
 	void (*backtrace)(struct pt_regs * const regs, unsigned int depth);
@@ -106,6 +104,17 @@ void oprofile_add_sample(struct pt_regs 
 void oprofile_add_ext_sample(unsigned long pc, struct pt_regs * const regs,
 				unsigned long event, int is_kernel);
 
+/*
+ * Add a value to the per CPU buffer.  The value is passed from the per CPU
+ * buffer to the kernel buffer with no additional processing.  The assumption
+ * is any processing of the value will be done in the postprocessor.  This
+ * function should only be used for special architecture specific data.
+ * Currently only used by the CELL processor.
+ *
+ * This function does not perform a backtrace.
+ */
+void oprofile_add_value(unsigned long value, int cpu);
+
 /* Use this instead when the PC value is not from the regs. Doesn't
  * backtrace. */
 void oprofile_add_pc(unsigned long pc, int is_kernel, unsigned long event);
Index: Cell_kernel_4_15_2008/include/asm-powerpc/oprofile_impl.h
===================================================================
--- Cell_kernel_4_15_2008.orig/include/asm-powerpc/oprofile_impl.h
+++ Cell_kernel_4_15_2008/include/asm-powerpc/oprofile_impl.h
@@ -48,7 +48,7 @@ struct op_powerpc_model {
 	void (*stop) (void);
 	void (*global_stop) (void);
 	int (*sync_start)(void);
-	int (*sync_stop)(void);
+	void (*sync_stop)(void);
 	void (*handle_interrupt) (struct pt_regs *,
 				  struct op_counter_config *);
 	int num_counters;

^ permalink raw reply

* [PATCH] powerpc: Don't play type punning games with lock_token
From: Segher Boessenkool @ 2008-04-23 15:13 UTC (permalink / raw)
  To: linuxppc-dev

The two u16 fields lock_token and paca_index in struct paca_struct are
accessed as one u32 field via type punning.  Change this into one u32
field paca_id, and add a paca_get_index() function to access only the
low 16 bits of this.

Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
---
 arch/powerpc/kernel/asm-offsets.c          |    2 +-
 arch/powerpc/kernel/paca.c                 |    3 +--
 arch/powerpc/platforms/iseries/exception.S |    2 +-
 include/asm-powerpc/iseries/hv_call.h      |    2 +-
 include/asm-powerpc/paca.h                 |   18 ++++++++++++------
 include/asm-powerpc/smp.h                  |    2 +-
 include/asm-powerpc/spinlock.h             |    2 +-
 7 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index 4b749c4..d00171f 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -108,7 +108,7 @@ int main(void)
 	DEFINE(ICACHEL1LINESPERPAGE, offsetof(struct ppc64_caches, ilines_per_page));
 	/* paca */
 	DEFINE(PACA_SIZE, sizeof(struct paca_struct));
-	DEFINE(PACAPACAINDEX, offsetof(struct paca_struct, paca_index));
+	DEFINE(PACAPACAID, offsetof(struct paca_struct, paca_id));
 	DEFINE(PACAPROCSTART, offsetof(struct paca_struct, cpu_start));
 	DEFINE(PACAKSAVE, offsetof(struct paca_struct, kstack));
 	DEFINE(PACACURRENT, offsetof(struct paca_struct, __current));
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
index 55f1a25..d68d86c 100644
--- a/arch/powerpc/kernel/paca.c
+++ b/arch/powerpc/kernel/paca.c
@@ -68,8 +68,7 @@ struct slb_shadow slb_shadow[] __cacheline_aligned = {
  */
 #define PACA_INIT_COMMON(number)					    \
 	.lppaca_ptr = &lppaca[number],					    \
-	.lock_token = 0x8000,						    \
-	.paca_index = (number),		/* Paca Index */		    \
+	.paca_id = 0x80000000 | (number),	/* Paca Index */	    \
 	.kernel_toc = (unsigned long)(&__toc_start) + 0x8000UL,		    \
 	.hw_cpu_id = 0xffff,						    \
 	.slb_shadow_ptr = &slb_shadow[number],
diff --git a/arch/powerpc/platforms/iseries/exception.S b/arch/powerpc/platforms/iseries/exception.S
index 5381038..17dea0d 100644
--- a/arch/powerpc/platforms/iseries/exception.S
+++ b/arch/powerpc/platforms/iseries/exception.S
@@ -42,7 +42,7 @@ system_reset_iSeries:
 	mfmsr	r24
 	ori	r24,r24,MSR_RI
 	mtmsrd	r24			/* RI on */
-	lhz	r24,PACAPACAINDEX(r13)	/* Get processor # */
+	lhz	r24,(PACAPACAID+2)(r13)	/* Get processor # */
 	cmpwi	0,r24,0			/* Are we processor 0? */
 	bne	1f
 	b	.__start_initialization_iSeries	/* Start up the first processor */
diff --git a/include/asm-powerpc/iseries/hv_call.h b/include/asm-powerpc/iseries/hv_call.h
index 162d653..998db2c 100644
--- a/include/asm-powerpc/iseries/hv_call.h
+++ b/include/asm-powerpc/iseries/hv_call.h
@@ -105,7 +105,7 @@ extern void HvCall_writeLogBuffer(const void *buffer, u64 bufLen);
 
 static inline void HvCall_sendIPI(struct paca_struct *targetPaca)
 {
-	HvCall1(HvCallBaseSendIPI, targetPaca->paca_index);
+	HvCall1(HvCallBaseSendIPI, paca_get_index(targetPaca));
 }
 
 #endif /* _ASM_POWERPC_ISERIES_HV_CALL_H */
diff --git a/include/asm-powerpc/paca.h b/include/asm-powerpc/paca.h
index 748b35a..7665d0a 100644
--- a/include/asm-powerpc/paca.h
+++ b/include/asm-powerpc/paca.h
@@ -65,13 +65,12 @@ struct paca_struct {
 #endif /* CONFIG_PPC_ISERIES */
 
 	/*
-	 * MAGIC: the spinlock functions in arch/powerpc/lib/locks.c 
-	 * load lock_token and paca_index with a single lwz
-	 * instruction.  They must travel together and be properly
-	 * aligned.
+	 * MAGIC: the spinlock functions in arch/powerpc/lib/locks.c
+	 * load paca_id with a single lwz instruction.  The high half
+	 * of this is constant 0x8000; the low half is the paca index,
+	 * accessed with paca_get_index().
 	 */
-	u16 lock_token;			/* Constant 0x8000, used in locks */
-	u16 paca_index;			/* Logical processor number */
+	u32 paca_id;
 
 	u64 kernel_toc;			/* Kernel TOC address */
 	u64 stab_real;			/* Absolute address of segment table */
@@ -117,6 +116,13 @@ struct paca_struct {
 	u64 startspurr;			/* SPURR value snapshot */
 };
 
+static inline u16 paca_get_index(struct paca_struct *paca)
+{
+	/* GCC will transform this into a single lhz instruction.  */
+
+	return paca->paca_id & 0xffff;
+}
+
 extern struct paca_struct paca[];
 
 #endif /* __KERNEL__ */
diff --git a/include/asm-powerpc/smp.h b/include/asm-powerpc/smp.h
index 505f35b..5fb4f13 100644
--- a/include/asm-powerpc/smp.h
+++ b/include/asm-powerpc/smp.h
@@ -46,7 +46,7 @@ void generic_mach_cpu_die(void);
 #endif
 
 #ifdef CONFIG_PPC64
-#define raw_smp_processor_id()	(local_paca->paca_index)
+#define raw_smp_processor_id()	paca_get_index(local_paca)
 #define hard_smp_processor_id() (get_paca()->hw_cpu_id)
 #else
 /* 32-bit */
diff --git a/include/asm-powerpc/spinlock.h b/include/asm-powerpc/spinlock.h
index cc4cfce..5922a2f 100644
--- a/include/asm-powerpc/spinlock.h
+++ b/include/asm-powerpc/spinlock.h
@@ -31,7 +31,7 @@
 
 #ifdef CONFIG_PPC64
 /* use 0x800000yy when locked, where yy == CPU number */
-#define LOCK_TOKEN	(*(u32 *)(&get_paca()->lock_token))
+#define LOCK_TOKEN	(get_paca()->paca_id)
 #else
 #define LOCK_TOKEN	1
 #endif
-- 
1.5.5.23.g2a5f.dirty

^ permalink raw reply related

* missing current-speed property prevents autoconsole on pegasos
From: Olaf Hering @ 2008-04-23 15:22 UTC (permalink / raw)
  To: linuxppc-dev


Pegasos2 has no current-speed property in
/pci@80000000/isa@C/serial@i2F8. As a result, console=ttyS0,115200 is
still required unless the patch below is used.

What is the correct way to restore console detection on pegasos2?

Index: linux-2.6.25-pegasos/arch/powerpc/platforms/chrp/setup.c
===================================================================
--- linux-2.6.25-pegasos.orig/arch/powerpc/platforms/chrp/setup.c
+++ linux-2.6.25-pegasos/arch/powerpc/platforms/chrp/setup.c
@@ -302,7 +305,7 @@ static void chrp_init_early(void)
        if (!property)
                goto out_put;
        if (!strcmp(property, "failsafe") || !strcmp(property, "serial"))
-               add_preferred_console("ttyS", 0, NULL);
+               add_preferred_console("ttyS", 0, "115200");
 out_put:
        of_node_put(node);
 }

^ permalink raw reply

* Re: SecretLab 2.6.24 with USB
From: Peter Korsgaard @ 2008-04-23 15:12 UTC (permalink / raw)
  To: Aaron Sells; +Cc: linuxppc-embedded
In-Reply-To: <480F4E8E.4010506@zin-tech.com>

>>>>> "Aaron" == Aaron Sells <aaron.sells@zin-tech.com> writes:

Hi,

 Aaron> root@xilinx-ml403:/# dmesg | grep -i usb
 Aaron> [    0.175963] usbcore: registered new interface driver usbfs
 Aaron> [    0.178207] usbcore: registered new interface driver hub
 Aaron> [    0.179810] usbcore: registered new device driver usb
 Aaron> [    3.426016] usbcore: registered new interface driver ub
 Aaron> [    4.156086] usbmon: debugfs is not available
 Aaron> [    4.209160] Initializing USB Mass Storage driver...
 Aaron> [    4.268302] usbcore: registered new interface driver usb-storage
 Aaron> [    4.336109] USB Mass Storage support registered.
 Aaron> [    4.958294] usbcore: registered new interface driver usbhid
 Aaron> [    5.020120] drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver

Yes, the USB core and drivers gets loaded, but because you haven't
provided a struct platform_device the c67x00 driver doesn't get
probed.

 Aaron> It still doesn't look like the ML403 Cypress host device is being
 Aaron> recognized.  No messages appear upon insertion and removal of USB
 Aaron> devices.

 Aaron> Regards,
 Aaron> Aaron Sells
 Aaron> diff linux-2.6-xlnx_arch-ppc-syslib-virtex_devices.c secretlab_arch-ppc-syslib-virtex_devices.c
 Aaron> 77,92d76
 Aaron> <  * ML300/ML403 Video Device: shortcut macro for single instance

Please use diff -u.

I don't see anything with platform devices for the c67x00 driver. You
need something like:

#include <linux/usb/c67x00.h>

static struct resource c67x00_resources[] = {
	[0] = {
		.start	= 0x84000000,
		.end	= 0x8400000f,
		.flags	= IORESOURCE_MEM,
	},
	[1] = {
		.start	= 3,
		.end	= 3,
		.flags	= IORESOURCE_IRQ,
	},
};

static struct c67x00_platform_data thinlite_c67x00_data = {
	.sie_config		= C67X00_SIE1_HOST | C67X00_SIE2_PERIPHERAL_B,
	.hpi_regstep		= 0x02, /* A0 not connected on 16bit bus */
};

static struct platform_device thinlite_c67x00 = {
	.name			= "c67x00",
	.id			= 0,
	.num_resources		= ARRAY_SIZE(c67x00_resources),
	.resource		= c67x00_resources,
	.dev.platform_data	= &thinlite_c67x00_data,
};

Which you then register with the platform bus with
platform_add_devices or similar. Either you do this by hand or you
create XPAR_* macros which take the needed info out of xparameter.h
(sorry, I don't have an xparameters.h with those defines at hand).

 Aaron> diff -Naur c67x00.old/c67x00-drv.c c67x00/c67x00-drv.c
 Aaron> --- c67x00.old/c67x00-drv.c	2008-04-23 10:36:16.000000000 -0400
 Aaron> +++ c67x00/c67x00-drv.c	2008-04-23 10:39:20.000000000 -0400
 Aaron> @@ -57,8 +57,7 @@
 Aaron>  		c67x00_hcd_probe(sie);
 Aaron>  		break;
 
 Aaron> -	case C67X00_SIE_PERIPHERAL_A:
 Aaron> -	case C67X00_SIE_PERIPHERAL_B:
 Aaron> +	case C67X00_SIE_PERIPHERAL:

This seems to be from an earlier version of my driver.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* Re: SecretLab 2.6.24 with USB
From: Aaron Sells @ 2008-04-23 14:58 UTC (permalink / raw)
  To: Grant Likely, Peter Korsgaard; +Cc: linuxppc-embedded
In-Reply-To: <fa686aa40804221355s11f8fd6em3f2075bbb2073c8@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1362 bytes --]

Grant Likely wrote:
> Compare arch/ppc/syslib/virtex_devices.c with the one in my git tree.
> Add the relevant missing bits.

Peter Korsgaard wrote:
> Did you register a struct platform_device for the c67x00?

I copied over the relevant USB code from secretlab's virtex_devices.c to 
my Xilinx tree.  In case I missed something, the diff between the two 
files is attached. And yes, I copied over include/linux/usb/c67x00.h as 
well.  After doing this, I had to modify a couple of the c67x00 driver 
files to get the kernel to compile.  The patch is attached.

root@xilinx-ml403:/# dmesg | grep -i usb
[    0.175963] usbcore: registered new interface driver usbfs
[    0.178207] usbcore: registered new interface driver hub
[    0.179810] usbcore: registered new device driver usb
[    3.426016] usbcore: registered new interface driver ub
[    4.156086] usbmon: debugfs is not available
[    4.209160] Initializing USB Mass Storage driver...
[    4.268302] usbcore: registered new interface driver usb-storage
[    4.336109] USB Mass Storage support registered.
[    4.958294] usbcore: registered new interface driver usbhid
[    5.020120] drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver

It still doesn't look like the ML403 Cypress host device is being 
recognized.  No messages appear upon insertion and removal of USB devices.

Regards,
Aaron Sells

[-- Attachment #2: virtex_devices.c.diff --]
[-- Type: text/plain, Size: 6125 bytes --]

diff linux-2.6-xlnx_arch-ppc-syslib-virtex_devices.c secretlab_arch-ppc-syslib-virtex_devices.c
77,92d76
<  * ML300/ML403 Video Device: shortcut macro for single instance
<  */
< #define XPAR_TFT(num) { \
< 	.name = "xilinxfb", \
< 	.id = num, \
< 	.num_resources = 1, \
< 	.resource = (struct resource[]) { \
< 		{ \
< 			.start = XPAR_TFT_##num##_BASEADDR, \
< 			.end = XPAR_TFT_##num##_BASEADDR+7, \
< 			.flags = IORESOURCE_IO, \
< 		}, \
< 	}, \
< }
< 
< /*
126,152d109
<  * EMAC: shortcut macro for single instance
<  */
< #define XPAR_EMACLITE(num) { \
< 	.name		= "xilinx_emaclite", \
< 	.id		= num, \
< 	.num_resources	= 2, \
< 	.resource = (struct resource[]) { \
< 		{ \
< 			.start	= XPAR_EMACLITE_##num##_BASEADDR, \
< 			.end	= XPAR_EMACLITE_##num##_HIGHADDR, \
< 			.flags	= IORESOURCE_MEM, \
< 		}, \
< 		{ \
< 			.start	= XPAR_INTC_0_EMACLITE_##num##_VEC_ID, \
< 			.flags	= IORESOURCE_IRQ, \
< 		}, \
< 	}, \
< 	.dev.platform_data = &(struct xemaclite_platform_data) { \
< 		.tx_ping_pong = XPAR_EMACLITE_##num##_TX_PING_PONG, \
< 		.rx_ping_pong = XPAR_EMACLITE_##num##_RX_PING_PONG, \
< 		/* locally administered default address */ \
< 		.mac_addr = {2, 0, 0, 0, 0, num}, \
< 	}, \
< }
< 
< 
< /*
199,288c156,160
< #define XPAR_LLTEMAC_RESOURCES(num) \
< 	.name = "xilinx_lltemac", \
< 	.id = XPAR_LLTEMAC_##num##_DEVICE_ID, \
< 	.num_resources = 2, \
< 	.resource = (struct resource[]) { \
< 		{ \
< 			.start = XPAR_LLTEMAC_##num##_BASEADDR, \
< 			.end = XPAR_LLTEMAC_##num##_BASEADDR + 0x1000, \
< 			.flags = IORESOURCE_MEM \
< 		}, \
< 		{ \
< 			.start = XPAR_INTC_0_LLTEMAC_##num##_VEC_ID, \
< 			.end = XPAR_INTC_0_LLTEMAC_##num##_VEC_ID, \
< 			.flags = IORESOURCE_IRQ \
< 		} \
< 	}
< 
< #ifdef XPAR_XLLDMA_USE_DCR
< #define DCRHOST 0xFF
< #else 
< #define DCRHOST 0x00
< #endif
< 
< #define XPAR_LLTEMAC(num) { \
< 	XPAR_LLTEMAC_RESOURCES(num), \
< 	.dev.platform_data = &(struct xlltemac_platform_data) { \
< 		.tx_csum = XPAR_LLTEMAC_##num##_TXCSUM, \
< 		.rx_csum = XPAR_LLTEMAC_##num##_RXCSUM, \
< 		.phy_type = XPAR_LLTEMAC_##num##_PHY_TYPE, \
< 		.dcr_host = DCRHOST, \
< 		.ll_dev_type = XPAR_LLTEMAC_##num##_LLINK_CONNECTED_TYPE, \
< 		.ll_dev_baseaddress = XPAR_LLTEMAC_##num##_LLINK_CONNECTED_BASEADDR, \
< 		.ll_dev_dma_rx_irq = XPAR_LLTEMAC_##num##_LLINK_CONNECTED_DMARX_INTR, \
< 		.ll_dev_dma_tx_irq = XPAR_LLTEMAC_##num##_LLINK_CONNECTED_DMATX_INTR, \
< 		.ll_dev_fifo_irq = XPAR_LLTEMAC_##num##_LLINK_CONNECTED_FIFO_INTR, \
< 		/* locally administered default address */ \
< 		.mac_addr = {2, 0, 0, 0, 0, num}, \
< 	}, \
< }
< 
< 
< #define XPAR_PS2(num) { \
< 	.name = "xilinx_ps2", \
< 	.id = num, \
< 	.num_resources = 2, \
< 	.resource = (struct resource[]) { \
< 		{ \
< 			.start = XPAR_PS2_##num##_BASEADDR, \
< 			.end = XPAR_PS2_##num##_HIGHADDR, \
< 			.flags = IORESOURCE_MEM, \
< 		}, \
< 		{ \
< 			.start = XPAR_INTC_0_PS2_##num##_VEC_ID, \
< 			.flags = IORESOURCE_IRQ, \
< 		}, \
< 	}, \
< }
< 
< #define XPAR_IIC(num) { \
<     .name = "xilinx_iic", \
<     .id = num, \
<     .num_resources = 2, \
<     .resource = (struct resource[]) { \
<         { \
<             .start = XPAR_IIC_##num##_BASEADDR, \
<             .end = XPAR_IIC_##num##_HIGHADDR, \
<             .flags = IORESOURCE_MEM, \
<         }, \
<         { \
<             .start = XPAR_INTC_0_IIC_##num##_VEC_ID, \
<             .flags = IORESOURCE_IRQ, \
<         }, \
<     }, \
< }
< 
< #ifdef CONFIG_XILINX_VIRTEX_II_PRO
< #define XPAR_HWICAP_FAMILY "virtex2p"
< #endif
< #ifdef CONFIG_XILINX_VIRTEX_4_FX
< #define XPAR_HWICAP_FAMILY "virtex4"
< #endif
< #ifdef CONFIG_XILINX_VIRTEX_5
< #define XPAR_HWICAP_FAMILY "virtex5"
< #endif
< #ifndef XPAR_HWICAP_FAMILY
< #define XPAR_HWICAP_FAMILY NULL
< #endif
< 
< #define XPAR_HWICAP(num) { \
< 	.name = "xilinx_icap", \
---
> /*
>  * ML300/ML403 Video Device: shortcut macro for single instance
>  */
> #define XPAR_TFT(num) { \
> 	.name = "xilinxfb", \
293,295c165,167
<                         .start = XPAR_HWICAP_##num##_BASEADDR,  \
< 			.end   = XPAR_HWICAP_##num##_HIGHADDR,    \
< 			.flags = IORESOURCE_MEM, \
---
> 			.start = XPAR_TFT_##num##_BASEADDR, \
> 			.end = XPAR_TFT_##num##_BASEADDR+7, \
> 			.flags = IORESOURCE_IO, \
298d169
< 	.dev.platform_data = XPAR_HWICAP_FAMILY,	\
409,410c280,281
< 		.name = "serial8250",
< 		.id = 0,
---
> 		.name		= "serial8250",
> 		.id		= 0,
437,450d307
< 	/* EMACLITE instances */
< #if defined(XPAR_EMACLITE_0_BASEADDR)
< 	XPAR_EMACLITE(0),
< #endif
< #if defined(XPAR_EMACLITE_1_BASEADDR)
< 	XPAR_EMACLITE(1),
< #endif
< #if defined(XPAR_EMACLITE_2_BASEADDR)
< 	XPAR_EMACLITE(2),
< #endif
< #if defined(XPAR_EMACLITE_3_BASEADDR)
< 	XPAR_EMACLITE(3),
< #endif
< 
484,518d340
< 	/* LLTEMAC instances */
< #if defined(XPAR_LLTEMAC_0_BASEADDR)
< 	XPAR_LLTEMAC(0),
< #endif
< #if defined(XPAR_LLTEMAC_1_BASEADDR)
< 	XPAR_LLTEMAC(1),
< #endif
< #if defined(XPAR_LLTEMAC_2_BASEADDR)
< 	XPAR_LLTEMAC(2),
< #endif
< #if defined(XPAR_LLTEMAC_3_BASEADDR)
< 	XPAR_LLTEMAC(3),
< #endif
< 
< #if defined(XPAR_PS2_0_BASEADDR)
< 	XPAR_PS2(0),
< #endif
< #if defined(XPAR_PS2_1_BASEADDR)
< 	XPAR_PS2(1),
< #endif
< #if defined(XPAR_PS2_2_BASEADDR)
< 	XPAR_PS2(2),
< #endif
< #if defined(XPAR_PS2_3_BASEADDR)
< 	XPAR_PS2(3),
< #endif
< 
< #if defined(XPAR_IIC_0_BASEADDR)
<     XPAR_IIC(0),
< #endif
< 
< #if defined(XPAR_HWICAP_0_BASEADDR)
< 	XPAR_HWICAP(0),
< #endif
< 
554d375
< 	extern void gen550_init(int i, struct uart_port *serial_req);
558,564c379,385
< 	serial_req.mapbase = pdata->mapbase;
< 	serial_req.membase = pdata->membase;
< 	serial_req.irq = pdata->irq;
< 	serial_req.uartclk = pdata->uartclk;
< 	serial_req.regshift = pdata->regshift;
< 	serial_req.iotype = pdata->iotype;
< 	serial_req.flags = pdata->flags;
---
> 	serial_req.mapbase	= pdata->mapbase;
> 	serial_req.membase	= pdata->membase;
> 	serial_req.irq		= pdata->irq;
> 	serial_req.uartclk	= pdata->uartclk;
> 	serial_req.regshift	= pdata->regshift;
> 	serial_req.iotype	= pdata->iotype;
> 	serial_req.flags	= pdata->flags;
608,609d428
< 		printk(KERN_INFO "Registering device %s:%d\n",
< 		       index->name, index->id);

[-- Attachment #3: c67x00.patch --]
[-- Type: text/plain, Size: 1074 bytes --]

diff -Naur c67x00.old/c67x00-drv.c c67x00/c67x00-drv.c
--- c67x00.old/c67x00-drv.c	2008-04-23 10:36:16.000000000 -0400
+++ c67x00/c67x00-drv.c	2008-04-23 10:39:20.000000000 -0400
@@ -57,8 +57,7 @@
 		c67x00_hcd_probe(sie);
 		break;
 
-	case C67X00_SIE_PERIPHERAL_A:
-	case C67X00_SIE_PERIPHERAL_B:
+	case C67X00_SIE_PERIPHERAL:
 		c67x00_udc_probe(sie);
 		break;
 
@@ -82,8 +81,7 @@
 		c67x00_hcd_remove(sie);
 		break;
 
-	case C67X00_SIE_PERIPHERAL_A:
-	case C67X00_SIE_PERIPHERAL_B:
+	case C67X00_SIE_PERIPHERAL:
 		c67x00_udc_remove(sie);
 		break;
 
diff -Naur c67x00.old/c67x00-ll-hpi.c c67x00/c67x00-ll-hpi.c
--- c67x00.old/c67x00-ll-hpi.c	2008-04-23 10:36:16.000000000 -0400
+++ c67x00/c67x00-ll-hpi.c	2008-04-23 10:39:35.000000000 -0400
@@ -431,7 +431,7 @@
 		       USB_CTL_REG(sie->sie_num),
 		       SOF_EOP_EN(0) | SOF_EOP_EN(1));
 
-	if (sie->mode == C67X00_SIE_PERIPHERAL_A)
+	if (sie->mode == C67X00_SIE_PERIPHERAL)
 		hpi_write_word(dev, DEVICE_N_PORT_SEL(sie->sie_num),  0x0000);
 	else
 		hpi_write_word(dev, DEVICE_N_PORT_SEL(sie->sie_num),  0x4000);

^ permalink raw reply

* Re: Xilinx GPIO driver / CONFIG_OF
From: Grant Likely @ 2008-04-23 14:33 UTC (permalink / raw)
  To: John Linn; +Cc: Johann Baudy, linuxppc-dev
In-Reply-To: <20080423132127.632CC1290067@mail80-sin.bigfish.com>

On Wed, Apr 23, 2008 at 7:21 AM, John Linn <John.Linn@xilinx.com> wrote:
> Hi Johann,
>
>  Not to my knowledge yet.  We have it on our list to do.
>
>  Thanks,
>  John

I've got a partial driver but it's not updated to the new GPIO
infrastructure.  I'll try to post what I have today.

Cheers,
g.


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

^ permalink raw reply

* Re: new warnings from stacktrace patch
From: Christoph Hellwig @ 2008-04-23 14:32 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: ppc-dev, Paul Mackerras, Christoph Hellwig
In-Reply-To: <20080423175938.a4b3cc26.sfr@canb.auug.org.au>

On Wed, Apr 23, 2008 at 05:59:38PM +1000, Stephen Rothwell wrote:
> This is from commit fd3e0bbc6052ca9747a5332b382584ece83aab6d ("[POWERPC]
> Stacktrace support for lockdep").  We don't include asm-offsets.h in any
> other C file in the powerpc build.

I think the include can be safely removed.


Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6/arch/powerpc/kernel/stacktrace.c
===================================================================
--- linux-2.6.orig/arch/powerpc/kernel/stacktrace.c	2008-04-23 15:28:05.000000000 +0200
+++ linux-2.6/arch/powerpc/kernel/stacktrace.c	2008-04-23 15:28:16.000000000 +0200
@@ -13,7 +13,6 @@
 #include <linux/sched.h>
 #include <linux/stacktrace.h>
 #include <asm/ptrace.h>
-#include <asm/asm-offsets.h>
 
 /*
  * Save stack-backtrace addresses into a stack_trace buffer.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox