It is currently 23 May 2013, 17:11

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: ATA DMA support on EFIKA
PostPosted: 26 Dec 2008, 21:35 
Offline
User avatar

Joined: 17 Dec 2005, 14:31
Posts: 310
Location: Italy
Quote:
http://ozlabs.org/pipermail/linuxppc-de ... 66504.html

[PATCH 0/4] powerpc/mpc5200: Add support for ATA DMA
Grant Likely grant.likely at secretlab.ca
Sun Dec 21 19:06:14 EST 2008

* Previous message: Commits added to powerpc.git next and master branches
* Next message: [PATCH 1/4] powerpc/mpc5200: Bugfix on handling variable sized buffer descriptors
* Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

Hey everyone; here is the latest version of the patches to add ATA DMA
support for the MPC5200. I'm pretty confident that these patches won't
break anything and by default DMA support is turned off. Users wanting
to test ATA DMA should add the 'libata.force=udma2' parameter to the
kernel command line.

Since there are just minor changes from the last iteration and a couple
of changes have been broken out into separate patches, I'm pushing this
series out to my -next tree for Paul to pick up.

Cheers,
g.

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


a (working but not stable) test patch against linux-2.6.28 is here

Code:
root@efika:/usr/src/EFIKA# dmesg 
Using Efika machine description
Only using first contiguous memory region<5>Linux version 2.6.28 (root@efika) (gcc version 4.2.4 (CRUX PPC)) #2 Fri Dec 26 21:45:58 CET 2008
console [udbg0] enabled
Efika: PCI bus 0 controlled by /pci@80000000

PCI host bridge /pci@80000000  ranges:
  IO 0x00000000f8000000..0x00000000f800ffff -> 0x0000000000000000
MEM 0x0000000080000000..0x00000000bfffffff -> 0x0000000080000000
Top of RAM: 0x8000000, Total RAM: 0x8000000
Memory hole size: 0MB
Zone PFN ranges:
  DMA      0x00000000 -> 0x00008000
  Normal   0x00008000 -> 0x00008000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00008000
On node 0 totalpages: 32768
free_area_init_node: node 0, pgdat c0496fe4, node_mem_map c04cb000
  DMA zone: 256 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 32512 pages, LIFO batch:7
  Normal zone: 0 pages used for memmap
  Movable zone: 0 pages used for memmap
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: libata.force=udma2 root=/dev/sda3 console=ttyPSC0
MPC52xx PIC is up and running!
PID hash table entries: 512 (order: 9, 2048 bytes)
time_init: decrementer frequency = 33.000000 MHz
time_init: processor frequency   = 396.000000 MHz
clocksource: timebase mult[79364d9] shift[22] registered
clockevent: decrementer mult[872] shift[16] cpu[0]
Console: colour dummy device 80x25
console handover: boot [udbg0] -> real [ttyPSC0]
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 124840k/131072k available (4508k kernel code, 6088k reserved, 196k data, 162k bss, 168k init)
SLUB: Genslabs=12, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 65.64 BogoMIPS (lpj=109824)
Mount-cache hash table entries: 512
net_namespace: 484 bytes
NET: Registered protocol family 16
PCI: Probing PCI hardware
bus: 00 index 0 io port: [0xfdff0000-0xfdffffff]
bus: 00 index 1 mmio: [0x80000000-0xbfffffff]
DMA: MPC52xx BestComm driver
DMA: MPC52xx BestComm engine @f0001200 ok !
SCSI subsystem initialized
libata version 3.00 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: Failed calling CRDA
cfg80211: calling CRDA failed - unable to update world regulatory domain, using static definition
Switched to NOHz mode on CPU #0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
NET: Registered protocol family 1
msgmni has been set to 244
alg: No test for cipher_null (cipher_null-generic)
alg: No test for digest_null (digest_null-generic)
alg: No test for compress_null (compress_null-generic)
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler cfq registered (default)
Generic non-volatile memory driver v1.1
Linux agpgart interface v0.103
Serial: MPC52xx PSC UART driver
f0002000.serial: ttyPSC0 at MMIO 0xf0002000 (irq = 129) is a MPC52xx PSC
brd: module loaded
loop: module loaded
Fixed MDIO Bus: probed
mpc52xx MII bus: probed
net eth0: Using PHY at MDIO address 16
Driver 'sd' needs updating - please use bus_type methods
ata: MPC52xx IDE/ATA libata driver
scsi0 : mpc52xx_ata
ata1: PATA max PIO4 ata_regs 0xf0003a00 irq 135
ata1.00: ATA-4: IBM-DBCA-204860, BC3OA87F, max UDMA/33
ata1.00: 9514260 sectors, multi 0: LBA
ata1.00: FORCE: xfer_mask set to udma2
ata1.00: configured for UDMA/33
scsi 0:0:0:0: Direct-Access     ATA      IBM-DBCA-204860  BC3O PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 9514260 512-byte hardware sectors: (4.87 GB/4.53 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 0:0:0:0: [sda] 9514260 512-byte hardware sectors: (4.87 GB/4.53 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: RDSK (512) sda1 (SWP^@)(res 2 spb 1) sda2 (LNX^@)(res 2 spb 1) sda3 (RFS^@)(res 2 spb 1)
sd 0:0:0:0: [sda] Attached SCSI disk
sd 0:0:0:0: Attached scsi generic sg0 type 0
usbmon: debugfs is not available
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ppc-of-ohci f0001000.usb: OF OHCI
ppc-of-ohci f0001000.usb: new USB bus registered, assigned bus number 1
ppc-of-ohci f0001000.usb: irq 134, io mem 0xf0001000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
platform ppc-rtc.0: rtc core: registered ppc_md as rtc0
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.18rc3.
ALSA device list:
  No soundcards found.
TCP cubic registered
NET: Registered protocol family 10
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
ReiserFS: sda3: found reiserfs format "3.6" with standard journal
ReiserFS: sda3: using ordered data mode
ReiserFS: sda3: journal params: device sda3, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: sda3: checking transaction log (sda3)
ReiserFS: sda3: Using r5 hash to sort names
VFS: Mounted root (reiserfs filesystem) readonly.
Freeing unused kernel memory: 168k init
Adding 246440k swap on /dev/sda1.  Priority:-1 extents:1 across:246440k
ASoC version 0.13.2
net eth0: attached phy 16 to driver Generic PHY
PHY: f0003000:10 - Link is Up - 100/Full
ata1.00: FORCE: xfer_mask set to udma2
ata1.00: configured for UDMA/33
ata1: EH complete
sd 0:0:0:0: [sda] 9514260 512-byte hardware sectors: (4.87 GB/4.53 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
eth0: no IPv6 routers present


Top
 Profile  
 
 Post subject:
PostPosted: 29 Dec 2008, 22:18 
Offline
User avatar

Joined: 17 Dec 2005, 14:31
Posts: 310
Location: Italy
this patch and other improvement for MPC5200 'll be in next stable Linux kernel.


Top
 Profile  
 
 Post subject: Re: ATA DMA support on EFIKA
PostPosted: 21 May 2010, 08:35 
Offline
User avatar

Joined: 17 Dec 2005, 14:31
Posts: 310
Location: Italy
from linux-2.6.34/drivers/ata/pata_mpc52xx.c
Code:
/*
        * By default, all DMA modes are disabled for the MPC5200.  Some
        * boards don't have the required signals routed to make DMA work.
        * Also, the MPC5200B has a silicon bug that causes data corruption
        * with UDMA if it is used at the same time as the LocalPlus bus.
        *
        * Instead of trying to guess what modes are usable, check the
        * ATA device tree node to find out what DMA modes work on the board.
        * UDMA/MWDMA modes can also be forced by adding "libata.force=<mode>"
        * to the kernel boot parameters.
        *
        * The MPC5200 ATA controller supports MWDMA modes 0, 1 and 2 and
        * UDMA modes 0, 1 and 2.
        */


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron