* RE: [patch 30/33] PS3: Bootwrapper support.
From: Levand, Geoffrey @ 2007-06-21 22:24 UTC (permalink / raw)
To: Paul Mackerras; +Cc: ppcdev, Milton Miller
In-Reply-To: <18039.31575.330603.260727@cargo.ozlabs.ibm.com>
-----Original Message-----
From: Paul Mackerras [mailto:paulus@samba.org]
Sent: Mon 6/18/2007 11:44 PM
To: Levand, Geoffrey
Cc: Mark A. Greer; ppcdev; Milton Miller
Subject: Re: [patch 30/33] PS3: Bootwrapper support.
=20
Geoff Levand writes:
> This is from the comment the patch adds to the wrapper script. I =
think
> it gives you what you need:
>=20
> +ps3)
> + # The ps3's loader supports loading gzipped binary images from =
flash
> + # rom to addr zero. The loader enters the image at addr 0x100. A
> + # bootwrapper overlay is use to arrange for the kernel to be =
loaded
> + # to addr zero and to have a suitable bootwrapper entry at 0x100.
> + # To construct the rom image, 0x100 bytes from offset 0x100 in =
the
> + # kernel is copied to the bootwrapper symbol =
__system_reset_kernel.
> + # The 0x100 bytes at the bootwrapper symbol =
__system_reset_overlay is
> + # then copied to offset 0x100. At runtime the bootwrapper =
program
> + # copies the 0x100 bytes at __system_reset_kernel to addr 0x100.
Yes, that is useful, but Mark is right, your patch description is a
bit terse, and something like that in the patch description would be
useful.
I prepared a new patch with this description and was waiting a while to =
get
all the comments. I'll send it out soon.
-Geoff
^ permalink raw reply
* RE: [patch 18/33] PS3: Frame buffer system-bus rework
From: Levand, Geoffrey @ 2007-06-21 22:18 UTC (permalink / raw)
To: Paul Mackerras; +Cc: Geert Uytterhoeven, linuxppc-dev, linux-fbdev-devel
In-Reply-To: <18039.31768.282185.497245@cargo.ozlabs.ibm.com>
-----Original Message-----
From: Paul Mackerras [mailto:paulus@samba.org]
Sent: Mon 6/18/2007 11:47 PM
To: Levand, Geoffrey
Cc: linuxppc-dev@ozlabs.org; linux-fbdev-devel@lists.sourceforge.net; =
Geert Uytterhoeven
Subject: Re: [patch 18/33] PS3: Frame buffer system-bus rework
=20
Geoff Levand writes:
> From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
>=20
> Convert the ps3fb device from a platform device to a PS3 system bus =
device.
> Fix the remove and shutdown methods to support kexec and to make ps3fb =
a
> loadable module.
Are you going to submit this to the fb maintainer (Antonio Daplas?) or
do you want me to take it because of dependencies on other patches in
your series?
Hi Paul,
Sorry for the delay, and this formatting. I am away on holiday,
with just a crappy Web browser interface...
I was hoping you could take it, as it fits in with the series, and
touches my platform code. Thanks.
-Geoff
^ permalink raw reply
* [PATCH] [POWERPC] update g5_defconfig
From: Will Schmidt @ 2007-06-21 21:37 UTC (permalink / raw)
To: ppc-dev; +Cc: will_schmidt, Paul Mackerras
Update the g5_defconfig. This is choosing all defaults via "make
oldconfig", then going back and enabling CONFIG_MACINTOSH_DRIVERS and
options underneath that. Specifically this is to allow the windfarm
driver to be automatically configured when building a defconfig kernel.
Signed-off-by Will Schmidt <will_schmidt@vnet.ibm.com>
---
g5_defconfig | 354 ++++++++++++++++++++++++++++++-----------------------------
1 file changed, 185 insertions(+), 169 deletions(-)
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig
index 3ccf19d..a47a41d 100644
--- a/arch/powerpc/configs/g5_defconfig
+++ b/arch/powerpc/configs/g5_defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.20-rc5
-# Mon Jan 22 22:15:04 2007
+# Linux kernel version: 2.6.22-rc5
+# Thu Jun 21 15:53:16 2007
#
CONFIG_PPC64=y
CONFIG_64BIT=y
@@ -27,6 +27,7 @@ CONFIG_GENERIC_TBSYNC=y
CONFIG_AUDIT_ARCH=y
CONFIG_GENERIC_BUG=y
# CONFIG_DEFAULT_UIMAGE is not set
+CONFIG_PPC64_SWSUSP=y
#
# Processor support
@@ -39,6 +40,7 @@ CONFIG_PPC_FPU=y
# CONFIG_PPC_OF_PLATFORM_PCI is not set
CONFIG_ALTIVEC=y
CONFIG_PPC_STD_MMU=y
+CONFIG_PPC_MM_SLICES=y
CONFIG_VIRT_CPU_ACCOUNTING=y
CONFIG_SMP=y
CONFIG_NR_CPUS=4
@@ -59,6 +61,7 @@ CONFIG_LOCALVERSION_AUTO=y
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
@@ -66,9 +69,11 @@ CONFIG_POSIX_MQUEUE=y
# CONFIG_AUDIT is not set
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=17
# CONFIG_CPUSETS 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
@@ -83,14 +88,19 @@ 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_TIMERFD=y
+CONFIG_EVENTFD=y
CONFIG_SHMEM=y
-CONFIG_SLAB=y
CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
#
# Loadable module support
@@ -131,15 +141,21 @@ CONFIG_PPC_MULTIPLATFORM=y
# CONFIG_PPC_PSERIES is not set
# CONFIG_PPC_ISERIES is not set
# CONFIG_PPC_MPC52xx is not set
+# CONFIG_PPC_MPC5200 is not set
CONFIG_PPC_PMAC=y
CONFIG_PPC_PMAC64=y
# CONFIG_PPC_MAPLE is not set
# CONFIG_PPC_PASEMI is not set
+# CONFIG_PPC_CELLEB is not set
+# CONFIG_PPC_PS3 is not set
# CONFIG_PPC_CELL is not set
# CONFIG_PPC_CELL_NATIVE is not set
# CONFIG_PPC_IBM_CELL_BLADE is not set
-# CONFIG_PPC_PS3 is not set
+# CONFIG_PQ2ADS is not set
CONFIG_PPC_NATIVE=y
+CONFIG_MPIC=y
+# CONFIG_MPIC_WEIRD is not set
+# CONFIG_PPC_I8259 is not set
CONFIG_U3_DART=y
# CONFIG_PPC_RTAS is not set
# CONFIG_MMIO_NVRAM is not set
@@ -160,9 +176,12 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
+
+#
+# CPU Frequency drivers
+#
CONFIG_CPU_FREQ_PMAC64=y
-# CONFIG_WANT_EARLY_SERIAL is not set
-CONFIG_MPIC=y
+# CONFIG_CPM2 is not set
#
# Kernel options
@@ -199,34 +218,34 @@ CONFIG_FLAT_NODE_MEM_MAP=y
# CONFIG_SPARSEMEM_STATIC is not set
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_RESOURCES_64BIT=y
+CONFIG_ZONE_DMA_FLAG=1
+# CONFIG_PPC_HAS_HASH_64K is not set
# CONFIG_PPC_64K_PAGES is not set
# CONFIG_SCHED_SMT is not set
CONFIG_PROC_DEVICETREE=y
# CONFIG_CMDLINE_BOOL is not set
# CONFIG_PM is not set
CONFIG_SECCOMP=y
+# CONFIG_WANT_DEVICE_TREE is not set
CONFIG_ISA_DMA_API=y
#
# Bus options
#
+CONFIG_ZONE_DMA=y
CONFIG_GENERIC_ISA_DMA=y
-# CONFIG_MPIC_WEIRD is not set
-# CONFIG_PPC_I8259 is not set
# CONFIG_PPC_INDIRECT_PCI is not set
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
# CONFIG_PCIEPORTBUS is not set
+CONFIG_ARCH_SUPPORTS_MSI=y
+# CONFIG_PCI_MSI is not set
# CONFIG_PCI_DEBUG is not set
#
# PCCARD (PCMCIA/CardBus) support
#
# CONFIG_PCCARD is not set
-
-#
-# PCI Hotplug Support
-#
# CONFIG_HOTPLUG_PCI is not set
CONFIG_KERNEL_START=0xc000000000000000
@@ -238,14 +257,15 @@ CONFIG_NET=y
#
# Networking options
#
-# CONFIG_NETDEBUG is not set
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
CONFIG_UNIX=y
CONFIG_XFRM=y
CONFIG_XFRM_USER=m
# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
CONFIG_NET_KEY=m
+# CONFIG_NET_KEY_MIGRATE is not set
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -270,10 +290,6 @@ CONFIG_INET_TCP_DIAG=y
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_TCP_MD5SIG is not set
-
-#
-# IP: Virtual Server Configuration
-#
# CONFIG_IP_VS is not set
# CONFIG_IPV6 is not set
# CONFIG_INET6_XFRM_TUNNEL is not set
@@ -287,8 +303,6 @@ CONFIG_NETFILTER=y
#
# CONFIG_NETFILTER_NETLINK is not set
CONFIG_NF_CONNTRACK_ENABLED=m
-CONFIG_NF_CONNTRACK_SUPPORT=y
-# CONFIG_IP_NF_CONNTRACK_SUPPORT is not set
CONFIG_NF_CONNTRACK=m
# CONFIG_NF_CT_ACCT is not set
CONFIG_NF_CONNTRACK_MARK=y
@@ -300,6 +314,7 @@ CONFIG_NF_CONNTRACK_FTP=m
CONFIG_NF_CONNTRACK_IRC=m
# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
# CONFIG_NF_CONNTRACK_PPTP is not set
+# CONFIG_NF_CONNTRACK_SANE is not set
# CONFIG_NF_CONNTRACK_SIP is not set
CONFIG_NF_CONNTRACK_TFTP=m
# CONFIG_NETFILTER_XTABLES is not set
@@ -310,20 +325,10 @@ CONFIG_NF_CONNTRACK_TFTP=m
CONFIG_NF_CONNTRACK_IPV4=m
CONFIG_NF_CONNTRACK_PROC_COMPAT=y
CONFIG_IP_NF_QUEUE=m
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
+# CONFIG_IP_NF_IPTABLES is not set
+# CONFIG_IP_NF_ARPTABLES is not set
# CONFIG_IP_DCCP is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
# CONFIG_IP_SCTP is not set
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
# CONFIG_BRIDGE is not set
@@ -350,7 +355,16 @@ CONFIG_LLC=y
# 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
#
# Device Drivers
@@ -363,16 +377,13 @@ CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
# CONFIG_SYS_HYPERVISOR is not set
#
# Connector - unified userspace <-> kernelspace linker
#
# CONFIG_CONNECTOR is not set
-
-#
-# Memory Technology Devices (MTD)
-#
# CONFIG_MTD is not set
#
@@ -383,6 +394,7 @@ CONFIG_FW_LOADER=y
#
# Plug and Play support
#
+# CONFIG_PNPACPI is not set
#
# Block devices
@@ -402,7 +414,6 @@ CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=65536
CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
-CONFIG_BLK_DEV_INITRD=y
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
# CONFIG_CDROM_PKTCDVD_WCACHE is not set
@@ -411,12 +422,10 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8
#
# Misc devices
#
+# CONFIG_PHANTOM is not set
# CONFIG_SGI_IOC4 is not set
# CONFIG_TIFM_CORE is not set
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
+# CONFIG_BLINK is not set
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
@@ -431,6 +440,7 @@ CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_BLK_DEV_IDESCSI is not set
# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
#
# IDE chipset support/bugfixes
@@ -438,12 +448,12 @@ CONFIG_BLK_DEV_IDECD=y
CONFIG_IDE_GENERIC=y
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_IDEPCI_SHARE_IRQ is not set
+CONFIG_IDEPCI_PCIBUS_ORDER=y
# CONFIG_BLK_DEV_OFFBOARD is not set
# CONFIG_BLK_DEV_GENERIC is not set
# CONFIG_BLK_DEV_OPTI621 is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
@@ -458,6 +468,7 @@ CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_BLK_DEV_JMICRON is not set
# CONFIG_BLK_DEV_SC1200 is not set
# CONFIG_BLK_DEV_PIIX is not set
+# CONFIG_BLK_DEV_IT8213 is not set
# CONFIG_BLK_DEV_IT821X is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
@@ -468,13 +479,13 @@ CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
+# CONFIG_BLK_DEV_TC86C001 is not set
CONFIG_BLK_DEV_IDE_PMAC=y
CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
CONFIG_BLK_DEV_IDEDMA_PMAC=y
# CONFIG_IDE_ARM is not set
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
# CONFIG_BLK_DEV_HD is not set
#
@@ -504,6 +515,7 @@ CONFIG_SCSI_MULTI_LUN=y
CONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_LOGGING is not set
# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
#
# SCSI Transports
@@ -550,11 +562,8 @@ CONFIG_SCSI_SPI_ATTRS=y
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_SCSI_SRP is not set
-
-#
-# Serial ATA (prod) and Parallel ATA (experimental) drivers
-#
CONFIG_ATA=y
+# CONFIG_ATA_NONSTANDARD is not set
# CONFIG_SATA_AHCI is not set
CONFIG_SATA_SVW=y
# CONFIG_ATA_PIIX is not set
@@ -570,10 +579,12 @@ CONFIG_SATA_SVW=y
# CONFIG_SATA_ULI is not set
# CONFIG_SATA_VIA is not set
# CONFIG_SATA_VITESSE is not set
+# CONFIG_SATA_INIC162X is not set
# CONFIG_PATA_ALI is not set
# CONFIG_PATA_AMD is not set
# CONFIG_PATA_ARTOP is not set
# CONFIG_PATA_ATIIXP is not set
+# CONFIG_PATA_CMD640_PCI is not set
# CONFIG_PATA_CMD64X is not set
# CONFIG_PATA_CS5520 is not set
# CONFIG_PATA_CS5530 is not set
@@ -585,6 +596,7 @@ CONFIG_SATA_SVW=y
# CONFIG_PATA_HPT3X2N is not set
# CONFIG_PATA_HPT3X3 is not set
# CONFIG_PATA_IT821X is not set
+# CONFIG_PATA_IT8213 is not set
# CONFIG_PATA_JMICRON is not set
# CONFIG_PATA_TRIFLEX is not set
# CONFIG_PATA_MARVELL is not set
@@ -624,6 +636,7 @@ CONFIG_DM_SNAPSHOT=m
CONFIG_DM_MIRROR=m
CONFIG_DM_ZERO=m
# CONFIG_DM_MULTIPATH is not set
+# CONFIG_DM_DELAY is not set
#
# Fusion MPT device support
@@ -636,28 +649,26 @@ CONFIG_DM_ZERO=m
#
# IEEE 1394 (FireWire) support
#
+# CONFIG_FIREWIRE is not set
CONFIG_IEEE1394=y
#
# Subsystem Options
#
# CONFIG_IEEE1394_VERBOSEDEBUG is not set
-CONFIG_IEEE1394_OUI_DB=y
-CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
-CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
-# CONFIG_IEEE1394_EXPORT_FULL_API is not set
#
-# Device Drivers
+# Controllers
#
# CONFIG_IEEE1394_PCILYNX is not set
CONFIG_IEEE1394_OHCI1394=y
#
-# Protocol Drivers
+# Protocols
#
CONFIG_IEEE1394_VIDEO1394=m
CONFIG_IEEE1394_SBP2=m
+CONFIG_IEEE1394_ETH1394_ROM_ENTRY=y
CONFIG_IEEE1394_ETH1394=m
CONFIG_IEEE1394_DV1394=m
CONFIG_IEEE1394_RAWIO=y
@@ -666,12 +677,10 @@ CONFIG_IEEE1394_RAWIO=y
# I2O device support
#
# CONFIG_I2O is not set
-
-#
-# Macintosh device drivers
-#
+CONFIG_MACINTOSH_DRIVERS=y
CONFIG_ADB_PMU=y
-# CONFIG_ADB_PMU_LED is not set
+CONFIG_ADB_PMU_LED=y
+CONFIG_ADB_PMU_LED_IDE=y
CONFIG_PMAC_SMU=y
CONFIG_MAC_EMUMOUSEBTN=y
CONFIG_THERM_PM72=y
@@ -679,7 +688,7 @@ CONFIG_WINDFARM=y
CONFIG_WINDFARM_PM81=y
CONFIG_WINDFARM_PM91=y
CONFIG_WINDFARM_PM112=y
-# CONFIG_PMAC_RACKMETER is not set
+CONFIG_PMAC_RACKMETER=y
#
# Network device support
@@ -689,15 +698,7 @@ CONFIG_DUMMY=m
CONFIG_BONDING=m
# CONFIG_EQUALIZER is not set
CONFIG_TUN=m
-
-#
-# ARCnet devices
-#
# CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
# CONFIG_PHYLIB is not set
#
@@ -716,10 +717,7 @@ CONFIG_SUNGEM=y
# CONFIG_NET_TULIP is not set
# CONFIG_HP100 is not set
# CONFIG_NET_PCI is not set
-
-#
-# Ethernet (1000 Mbit)
-#
+CONFIG_NETDEV_1000=y
CONFIG_ACENIC=y
CONFIG_ACENIC_OMIT_TIGON_I=y
# CONFIG_DL2K is not set
@@ -734,35 +732,50 @@ CONFIG_E1000=y
# CONFIG_SKGE is not set
# CONFIG_SKY2 is not set
# CONFIG_SK98LIN is not set
+# CONFIG_VIA_VELOCITY is not set
CONFIG_TIGON3=y
# CONFIG_BNX2 is not set
# CONFIG_QLA3XXX is not set
-
-#
-# Ethernet (10000 Mbit)
-#
+# CONFIG_ATL1 is not set
+CONFIG_NETDEV_10000=y
# CONFIG_CHELSIO_T1 is not set
+# CONFIG_CHELSIO_T3 is not set
# CONFIG_IXGB is not set
# CONFIG_S2IO is not set
# CONFIG_MYRI10GE is not set
# CONFIG_NETXEN_NIC is not set
-
-#
-# Token Ring devices
-#
+# CONFIG_PASEMI_MAC is not set
+# CONFIG_MLX4_CORE is not set
CONFIG_TR=y
CONFIG_IBMOL=y
# CONFIG_3C359 is not set
# CONFIG_TMS380TR is not set
#
-# Wireless LAN (non-hamradio)
+# Wireless LAN
#
-# CONFIG_NET_RADIO is not set
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
#
-# Wan interfaces
+# USB Network Adapters
#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+# CONFIG_USB_USBNET_MII is not set
+CONFIG_USB_USBNET=m
+# CONFIG_USB_NET_AX8817X is not set
+CONFIG_USB_NET_CDCETHER=m
+# CONFIG_USB_NET_DM9601 is not set
+# CONFIG_USB_NET_GL620A is not set
+# CONFIG_USB_NET_NET1080 is not set
+# CONFIG_USB_NET_PLUSB is not set
+# CONFIG_USB_NET_MCS7830 is not set
+# CONFIG_USB_NET_RNDIS_HOST is not set
+# CONFIG_USB_NET_CDC_SUBSET is not set
+# CONFIG_USB_NET_ZAURUS is not set
# CONFIG_WAN is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
@@ -798,6 +811,7 @@ CONFIG_SLHC=m
#
CONFIG_INPUT=y
CONFIG_INPUT_FF_MEMLESS=y
+# CONFIG_INPUT_POLLDEV is not set
#
# Userland interfaces
@@ -824,8 +838,10 @@ CONFIG_INPUT_KEYBOARD=y
CONFIG_INPUT_MOUSE=y
# CONFIG_MOUSE_PS2 is not set
# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_APPLETOUCH is not set
# CONFIG_MOUSE_VSXXXAA 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
@@ -866,15 +882,10 @@ CONFIG_LEGACY_PTY_COUNT=256
# IPMI
#
# CONFIG_IPMI_HANDLER is not set
-
-#
-# Watchdog Cards
-#
# CONFIG_WATCHDOG is not set
# CONFIG_HW_RANDOM is not set
CONFIG_GEN_RTC=y
# CONFIG_GEN_RTC_X is not set
-# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
CONFIG_AGP=m
@@ -888,11 +899,9 @@ CONFIG_MAX_RAW_DEVS=256
# TPM devices
#
# CONFIG_TCG_TPM is not set
-
-#
-# I2C support
-#
+CONFIG_DEVPORT=y
CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_CHARDEV=y
#
@@ -919,14 +928,15 @@ CONFIG_I2C_POWERMAC=y
# CONFIG_I2C_PARPORT_LIGHT is not set
# CONFIG_I2C_PROSAVAGE is not set
# CONFIG_I2C_SAVAGE4 is not set
+# CONFIG_I2C_SIMTEC is not set
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_TINY_USB is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set
# CONFIG_I2C_VOODOO3 is not set
-# CONFIG_I2C_PCA_ISA is not set
#
# Miscellaneous I2C Chip support
@@ -953,37 +963,53 @@ CONFIG_I2C_POWERMAC=y
# Dallas's 1-wire bus
#
# CONFIG_W1 is not set
+# CONFIG_HWMON is not set
#
-# Hardware Monitoring support
+# Multifunction device drivers
#
-# CONFIG_HWMON is not set
-# CONFIG_HWMON_VID is not set
+# 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
#
-# Digital Video Broadcasting Devices
+# Graphics support
#
-# CONFIG_DVB is not set
-# CONFIG_USB_DABUSB is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=m
#
-# Graphics support
+# Display device support
#
-CONFIG_FIRMWARE_EDID=y
+# CONFIG_DISPLAY_SUPPORT is not set
+CONFIG_VGASTATE=y
CONFIG_FB=y
+CONFIG_FIRMWARE_EDID=y
CONFIG_FB_DDC=y
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+CONFIG_FB_DEFERRED_IO=y
+# CONFIG_FB_SVGALIB is not set
CONFIG_FB_MACMODES=y
-# CONFIG_FB_BACKLIGHT is not set
+CONFIG_FB_BACKLIGHT=y
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_TILEBLITTING=y
+
+#
+# Frame buffer hardware drivers
+#
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_PM2 is not set
# CONFIG_FB_CYBER2000 is not set
@@ -994,20 +1020,27 @@ CONFIG_FB_OF=y
# CONFIG_FB_S1D13XXX is not set
CONFIG_FB_NVIDIA=y
CONFIG_FB_NVIDIA_I2C=y
+# CONFIG_FB_NVIDIA_DEBUG is not set
+CONFIG_FB_NVIDIA_BACKLIGHT=y
# CONFIG_FB_RIVA is not set
# CONFIG_FB_MATROX is not set
CONFIG_FB_RADEON=y
CONFIG_FB_RADEON_I2C=y
+CONFIG_FB_RADEON_BACKLIGHT=y
# CONFIG_FB_RADEON_DEBUG is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
+# CONFIG_FB_S3 is not set
# CONFIG_FB_SAVAGE is not set
# CONFIG_FB_SIS is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_KYRO is not set
# CONFIG_FB_3DFX is not set
# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_VT8623 is not set
# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_ARK is not set
+# CONFIG_FB_PM3 is not set
# CONFIG_FB_IBM_GXT4500 is not set
# CONFIG_FB_VIRTUAL is not set
@@ -1021,19 +1054,10 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=m
-CONFIG_BACKLIGHT_DEVICE=y
-CONFIG_LCD_CLASS_DEVICE=m
-CONFIG_LCD_DEVICE=y
#
# Sound
@@ -1152,6 +1176,12 @@ CONFIG_SND_AOA_SOUNDBUS_I2S=m
#
CONFIG_SND_USB_AUDIO=m
# CONFIG_SND_USB_USX2Y is not set
+# CONFIG_SND_USB_CAIAQ is not set
+
+#
+# System on Chip audio support
+#
+# CONFIG_SND_SOC is not set
#
# Open Sound System
@@ -1162,6 +1192,20 @@ CONFIG_SND_USB_AUDIO=m
# HID Devices
#
CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=y
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+CONFIG_HID_FF=y
+CONFIG_HID_PID=y
+CONFIG_LOGITECH_FF=y
+# CONFIG_PANTHERLORD_FF is not set
+CONFIG_THRUSTMASTER_FF=y
+# CONFIG_ZEROPLUS_FF is not set
+CONFIG_USB_HIDDEV=y
#
# USB support
@@ -1176,9 +1220,8 @@ CONFIG_USB=y
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
+CONFIG_USB_DEVICE_CLASS=y
# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_MULTITHREAD_PROBE is not set
# CONFIG_USB_OTG is not set
#
@@ -1188,9 +1231,15 @@ CONFIG_USB_EHCI_HCD=y
# CONFIG_USB_EHCI_SPLIT_ISO is not set
# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
# CONFIG_USB_EHCI_TT_NEWSCHED is not set
+# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
# CONFIG_USB_ISP116X_HCD is not set
CONFIG_USB_OHCI_HCD=y
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
+CONFIG_USB_OHCI_HCD_PPC_OF=y
+CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
+# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
+CONFIG_USB_OHCI_HCD_PCI=y
+CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
+CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
# CONFIG_USB_UHCI_HCD is not set
# CONFIG_USB_SL811_HCD is not set
@@ -1224,53 +1273,10 @@ CONFIG_USB_STORAGE_JUMPSHOT=y
# CONFIG_USB_LIBUSUAL is not set
#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-# CONFIG_ZEROPLUS_FF is not set
-CONFIG_USB_HIDDEV=y
-# CONFIG_USB_AIPTEK is not set
-# CONFIG_USB_WACOM is not set
-# CONFIG_USB_ACECAD is not set
-# CONFIG_USB_KBTAB is not set
-# CONFIG_USB_POWERMATE is not set
-# CONFIG_USB_TOUCHSCREEN is not set
-# CONFIG_USB_YEALINK is not set
-# CONFIG_USB_XPAD is not set
-# CONFIG_USB_ATI_REMOTE is not set
-# CONFIG_USB_ATI_REMOTE2 is not set
-# CONFIG_USB_KEYSPAN_REMOTE is not set
-# CONFIG_USB_APPLETOUCH is not set
-
-#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_MICROTEK is not set
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-# CONFIG_USB_USBNET_MII is not set
-CONFIG_USB_USBNET=m
-# CONFIG_USB_NET_AX8817X is not set
-CONFIG_USB_NET_CDCETHER=m
-# CONFIG_USB_NET_GL620A is not set
-# CONFIG_USB_NET_NET1080 is not set
-# CONFIG_USB_NET_PLUSB is not set
-# CONFIG_USB_NET_MCS7830 is not set
-# CONFIG_USB_NET_RNDIS_HOST is not set
-# CONFIG_USB_NET_CDC_SUBSET is not set
-# CONFIG_USB_NET_ZAURUS is not set
CONFIG_USB_MON=y
#
@@ -1343,6 +1349,7 @@ CONFIG_USB_EZUSB=y
# 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 is not set
# CONFIG_USB_CYTHERM is not set
@@ -1353,6 +1360,7 @@ CONFIG_USB_APPLEDISPLAY=m
# CONFIG_USB_SISUSBVGA 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
#
@@ -1363,16 +1371,13 @@ CONFIG_USB_APPLEDISPLAY=m
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
# CONFIG_MMC is not set
#
# LED devices
#
-# CONFIG_NEW_LEDS is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
#
# LED drivers
@@ -1381,6 +1386,10 @@ CONFIG_USB_APPLEDISPLAY=m
#
# LED Triggers
#
+CONFIG_LEDS_TRIGGERS=y
+# CONFIG_LEDS_TRIGGER_TIMER is not set
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
#
# InfiniBand support
@@ -1410,10 +1419,6 @@ CONFIG_USB_APPLEDISPLAY=m
#
#
-# Virtualization
-#
-
-#
# File systems
#
CONFIG_EXT2_FS=y
@@ -1461,7 +1466,6 @@ CONFIG_AUTOFS_FS=m
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
CONFIG_UDF_FS=m
CONFIG_UDF_NLS=y
@@ -1527,6 +1531,7 @@ CONFIG_NFS_ACL_SUPPORT=y
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=y
CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_BIND34 is not set
CONFIG_RPCSEC_GSS_KRB5=y
# CONFIG_RPCSEC_GSS_SPKM3 is not set
# CONFIG_SMB_FS is not set
@@ -1561,6 +1566,7 @@ CONFIG_MSDOS_PARTITION=y
# CONFIG_SUN_PARTITION is not set
# CONFIG_KARMA_PARTITION is not set
# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
#
# Native Language Support
@@ -1610,6 +1616,7 @@ CONFIG_NLS_UTF8=y
# Distributed Lock Manager
#
# CONFIG_DLM is not set
+# CONFIG_UCC_SLOW is not set
#
# Library routines
@@ -1617,12 +1624,15 @@ CONFIG_NLS_UTF8=y
CONFIG_BITREVERSE=y
CONFIG_CRC_CCITT=m
# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
CONFIG_CRC32=y
CONFIG_LIBCRC32C=m
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=m
CONFIG_PLIST=y
-CONFIG_IOMAP_COPY=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
#
# Instrumentation Support
@@ -1641,15 +1651,15 @@ CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_FS=y
# CONFIG_HEADERS_CHECK is not set
CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=17
+# CONFIG_DEBUG_SHIRQ is not set
CONFIG_DETECT_SOFTLOCKUP=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_RWSEMS is not set
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
# CONFIG_DEBUG_KOBJECT is not set
@@ -1659,8 +1669,10 @@ CONFIG_DEBUG_BUGVERBOSE=y
# CONFIG_DEBUG_LIST is not set
CONFIG_FORCED_INLINING=y
# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
# CONFIG_DEBUG_STACKOVERFLOW is not set
# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_PAGEALLOC is not set
# CONFIG_DEBUGGER is not set
CONFIG_IRQSTACKS=y
CONFIG_BOOTX_TEXT=y
@@ -1693,8 +1705,11 @@ CONFIG_CRYPTO_WP512=m
# CONFIG_CRYPTO_GF128MUL is not set
CONFIG_CRYPTO_ECB=m
CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_PCBC=m
# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_CRYPTD is not set
CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
CONFIG_CRYPTO_BLOWFISH=m
CONFIG_CRYPTO_TWOFISH=m
CONFIG_CRYPTO_TWOFISH_COMMON=m
@@ -1709,6 +1724,7 @@ CONFIG_CRYPTO_ANUBIS=m
CONFIG_CRYPTO_DEFLATE=m
CONFIG_CRYPTO_MICHAEL_MIC=m
CONFIG_CRYPTO_CRC32C=m
+# CONFIG_CRYPTO_CAMELLIA is not set
CONFIG_CRYPTO_TEST=m
#
^ permalink raw reply related
* Re: [PATCH v2 0/9] Add Generic PCI-E support to 8641HPCN
From: Jon Loeliger @ 2007-06-21 21:23 UTC (permalink / raw)
To: linuxppc-dev@ozlabs.org
In-Reply-To: <1180996188.9632.68.camel@ld0161-tx32>
On Mon, 2007-06-04 at 17:29, Jon Loeliger wrote:
> Paul,
>
> This 8-part patch set combines the two previous patch
> sets, 5 from Zheng Wei, and 3 from me, along with one
> from Wade Farnsworth into one nice-n-happy set, all
> designed to re-enable PCI-Express on the MPC8641HPCN board.
>
> This is version 2 of the patch set and incorporates
> improvements suggested by list reviewers.
Paul,
I hadn't seen any further comment on this series of
patches for PCI on 8641. Any chance we could get them
applied to your repo?
Thanks,
jdl
^ permalink raw reply
* sata_mv as module on taiga?
From: Leisner, Martin @ 2007-06-21 20:46 UTC (permalink / raw)
To: linuxppc-embedded; +Cc: Puzio, Robert E, Lund, Nathan
I'm using 2.6.20.11 on a taiga board.
With the default kernel config, sata_mv runs fine if nothing is in the
pci slots.
If I install a vitesse 7174 (or an intel gd32144, I happen to have both)
it causes bizarre failures in the sata_mv driver:
sata_mv 0000:00:03.0: version 0.7
sata_mv 0000:00:03.0: 32 slots 4 ports SCSI mode IRQ via INTx
ata1: SATA max UDMA/133 cmd 0x0 ctl 0xE10A2120 bmdma 0x0 irq 38
ata2: SATA max UDMA/133 cmd 0x0 ctl 0xE10A4120 bmdma 0x0 irq 38
ata3: SATA max UDMA/133 cmd 0x0 ctl 0xE10A6120 bmdma 0x0 irq 38
ata4: SATA max UDMA/133 cmd 0x0 ctl 0xE10A8120 bmdma 0x0 irq 38
scsi0 : sata_mv
ATA: abnormal status 0x80 on port 0xE10A211C
ATA: abnormal status 0x80 on port 0xE10A211C
ATA: abnormal status 0x80 on port 0xE10A211C
ATA: abnormal status 0x80 on port 0xE10A211C
ATA: abnormal status 0x80 on port 0xE10A211C
ATA: abnormal status 0x80 on port 0xE10A211C
ata1.00: qc timeout (cmd 0xec)
ata1.00: failed to IDENTIFY (I/O error, err_mask=3D0x4)
ATA: abnormal status 0x80 on port 0xE10A211C
ATA: abnormal status 0x80 on port 0xE10A211C
ATA: abnormal status 0x80 on port 0xE10A211C
ATA: abnormal status 0x80 on port 0xE10A211C
ATA: abnormal status 0x80 on port 0xE10A211C
ata1.00: qc timeout (cmd 0xec)
ata1.00: failed to IDENTIFY (I/O error, err_mask=3D0x4)
ATA: abnormal status 0x80 on port 0xE10A211C
ATA: abnormal status 0x80 on port 0xE10A211C
ATA: abnormal status 0x80 on port 0xE10A211C
ATA: abnormal status 0x80 on port 0xE10A211C
ATA: abnormal status 0x80 on port 0xE10A211C
ata1.00: qc timeout (cmd 0xec)
ata1.00: failed to IDENTIFY (I/O error, err_mask=3D0x4)
ata1.00: limiting speed to PIO0
ata1.00: disabled
When it works I see:
sata_mv 0000:00:03.0: version 0.7
sata_mv 0000:00:03.0: 32 slots 4 ports SCSI mode IRQ via INTx
ata1: SATA max UDMA/133 cmd 0x0 ctl 0xE10A2120 bmdma 0x0 irq 38
ata2: SATA max UDMA/133 cmd 0x0 ctl 0xE10A4120 bmdma 0x0 irq 38
ata3: SATA max UDMA/133 cmd 0x0 ctl 0xE10A6120 bmdma 0x0 irq 38
ata4: SATA max UDMA/133 cmd 0x0 ctl 0xE10A8120 bmdma 0x0 irq 38
scsi0 : sata_mv
ata1.00: ATA-6, max UDMA/133, 156301488 sectors: LBA48 NCQ (depth 0/32)
ata1.00: configured for UDMA/133
scsi1 : sata_mv
ata2: no device found (phy stat 00000000)
scsi2 : sata_mv
ata3: no device found (phy stat 00000000)
scsi3 : sata_mv
ata4: no device found (phy stat 00000000)
scsi 0:0:0:0: Direct-Access ATA ST380817AS 3.42 PQ: 0
ANSI: 5
SCSI device sda: 156301488 512-byte hdwr sectors (80026 MB)
sda: Write Protect is off
SCSI device sda: write cache: enabled, read cache: enabled, doesn't
support DPO or FUA
SCSI device sda: 156301488 512-byte hdwr sectors (80026 MB)
sda: Write Protect is off
SCSI device sda: write cache: enabled, read cache: enabled, doesn't
support DPO or FUA
sda: sda1 sda2 sda3 < sda5 sda6 sda7 sda8 sda9 sda10 sda11 sda12 sda13
sda14 sda15 >
sd 0:0:0:0: Attached scsi disk sda
Note the failure are VERY slow (I don't having timing printks on in the
default configuration).
Also, with 2.6.21.1, it works without a problem (but we want to bring up
2.6.20 on another system
with the GD32144 driver -- which doesn't work on our custom system or
the taiga board.
marty
^ permalink raw reply
* Re: network load 8245 vs. 8347E
From: Marc Leeman @ 2007-06-21 19:09 UTC (permalink / raw)
To: Matt Sealey; +Cc: Linuxppc-dev
In-Reply-To: <467AC93C.2020408@genesi-usa.com>
[-- Attachment #1: Type: text/plain, Size: 624 bytes --]
> You might just be lucky that 2.4 is less bloated and has to handle less
> features than 2.6 and it's lowering the CPU usage :)
Actually, I backported the e100 driver from the 2.6 series to the 2.4
series. It performed better. Perhaps I should re-sync again with what is
currently in the 2.6, but as I said, not much work is put in the older
platforms due to a load of proto 8347e boards being ported..
--
greetz, marc
Long enough for me to see your blue backside meditating, but not long
enough for you to touch me.
Rygel - PK Tech Girl
chiana 2.6.18-4-ixp4xx #1 Tue Mar 27 18:01:56 BST 2007 GNU/Linux
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: network load 8245 vs. 8347E
From: Matt Sealey @ 2007-06-21 18:53 UTC (permalink / raw)
To: Marc Leeman; +Cc: Linuxppc-dev
In-Reply-To: <20070621183349.GT5417@chiana.homelinux.org>
Sure; the 2.4 ethernet driver for the e100 might be extremely efficient
on the CPU but not very good on bandwidth. They've (Intel) rewritten it
a short while back according to the documentation, so it may be that
the newer version on 2.4 may be just as CPU intensive as the gianfar
driver, and you're lucky to be using the old one. I haven't looked at
the 2.4.x version you're running to see what driver it's using, but Intel
do have their latest driver version backported to the 2.4 kernel series
on their site.
You might just be lucky that 2.4 is less bloated and has to handle less
features than 2.6 and it's lowering the CPU usage :)
So, I suppose, comparing at least 2.6 series kernels is a start, making
sure you compare the old 2.4 e100 driver to the new 2.6 e100 driver is
another idea. I think there are too many variables. That said, usually
inbuilt ethernets on SoC's.. at least in my experience.. tend to be
more efficient in some ways but not in others. In any case an Intel
network card has always kicked the pants off it.. :(
--
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations
Marc Leeman wrote:
>> Isn't it just because the Intel chipset is a REALLY nice ethernet
>> controller and the integrated one in the 8347E isn't as good? :)
>
> Well, that's something what I'm afraid off: that for any kind of decent
> network performance we'd need an external chipset. But there are some
> other hickups we need to investigate with the 8347.
>
> I just hope it's either a configuration problem, a not so efficient
> driver implementation -> no re-design :)
>
>> You could try turning the interrupt coaelescing off in the e100
>> driver and see how well it does, then. Or knock the bundling
>> threshold or timer down to something similar to the 8347E is using..
>> or turn the ones on the 8347E up to match the ones the e100 driver
>> is using :)
>>
>> All these options used to be modprobe options but the latest
>> e100 driver seems to hardcode a bunch of them probably for best
>> performance. Anyway, putting them on a level peg would mean at
>> least you are comparing onboard apples with pci apples.
>
> I started doing this this evening, but at first glance, changing sysfs
> params (on the gianfar driver) didn't change much.
>
> I'll start comparing 8245/e100/2.4.34, 8245/e100/2.6.17 and
> 8347E/gianfar/2.6.21.1 tomorrow.
>
> Anyway a load of 30% for a single process where an older processor only
> takes around 5% seems too much of a difference to be solved with simple
> parameter settings.
>
^ permalink raw reply
* Re: network load 8245 vs. 8347E
From: Marc Leeman @ 2007-06-21 18:33 UTC (permalink / raw)
To: Matt Sealey; +Cc: Linuxppc-dev
In-Reply-To: <467ABCDC.8060401@genesi-usa.com>
[-- Attachment #1: Type: text/plain, Size: 1611 bytes --]
> Isn't it just because the Intel chipset is a REALLY nice ethernet
> controller and the integrated one in the 8347E isn't as good? :)
Well, that's something what I'm afraid off: that for any kind of decent
network performance we'd need an external chipset. But there are some
other hickups we need to investigate with the 8347.
I just hope it's either a configuration problem, a not so efficient
driver implementation -> no re-design :)
> You could try turning the interrupt coaelescing off in the e100
> driver and see how well it does, then. Or knock the bundling
> threshold or timer down to something similar to the 8347E is using..
> or turn the ones on the 8347E up to match the ones the e100 driver
> is using :)
>
> All these options used to be modprobe options but the latest
> e100 driver seems to hardcode a bunch of them probably for best
> performance. Anyway, putting them on a level peg would mean at
> least you are comparing onboard apples with pci apples.
I started doing this this evening, but at first glance, changing sysfs
params (on the gianfar driver) didn't change much.
I'll start comparing 8245/e100/2.4.34, 8245/e100/2.6.17 and
8347E/gianfar/2.6.21.1 tomorrow.
Anyway a load of 30% for a single process where an older processor only
takes around 5% seems too much of a difference to be solved with simple
parameter settings.
--
greetz, marc
Open your ears, or your tentacles, or whatever orifice it is you
listen with!
Crichton - Back and Back and Back to the Future
chiana 2.6.18-4-ixp4xx #1 Tue Mar 27 18:01:56 BST 2007 GNU/Linux
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: Virtex 4 Avnet Mini-Module Networking.
From: Andrei Konovalov @ 2007-06-21 18:18 UTC (permalink / raw)
To: Mohammad Sadegh Sadri; +Cc: linuxppc-embedded
In-Reply-To: <BAY115-W111D8089A1F12D9A5764AAB2100@phx.gbl>
Mohammad Sadegh Sadri wrote:
>
> very interesting
>
> the provided xps project from xapp941 results 230Mbits but your custome system is 83.0Mbits, yes?
yes
> just, are you sure the ppc core has the same core clock frequency in both designs? I mean may be the xapp941 is running at 300MHz but yours at 100MHz.
both run at 300MHz
> And what about a custom system with 9.1SP2? does that gives the same performance?
haven't tried this yet
> Finally If possible please release the test results for TCP streams. ( 9.1 no SP and 9.1 SP2 )
The TEMAC driver is from EDK 9.1.02 (IOW, SP2).
bitstream made by myself with EDK 9.1.00:
=========================================
root@192.168.119.11:~/netperf-2.4.1/src# ./netperf -l 30 -H 192.168.119.1 -i 10, 2 -I 99,10 -t TCP_STREAM -- -m 32768 -s 262144
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.119.1 (192.168.119.1) port 0 AF_INET : ±5.0% @ 99% conf.
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
87380 217088 32768 30.00 41.66
bitstream from XAPP941:
=======================
root@192.168.119.11:~/netperf-2.4.1/src# ./netperf -l 30 -H 192.168.119.1 -i 10, 2 -I 99,10 -t TCP_STREAM -- -m 32768 -s 262144
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.119.1 (192.168.119.1) port 0 AF_INET : ±5.0% @ 99% conf.
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
87380 217088 32768 30.00 111.86
And I didn't test ML405 receive performance.
Thanks,
Andrei
> thanks
>
>
>
> ----------------------------------------
>> Date: Thu, 21 Jun 2007 18:53:49 +0400
>> From: akonovalov@ru.mvista.com
>> To: mamsadegh@hotmail.com
>> CC: linuxppc-embedded@ozlabs.org; kashiwagi@co-nss.co.jp; glenn.g.hart@us.westinghouse.com
>> Subject: Re: Virtex 4 Avnet Mini-Module Networking.
>>
>> Mohammad Sadegh Sadri wrote:
>>> I'm wondering where are the original developers of TEMAC driver these days, I have not seen any posts from any of andrei
>>> nor grant in the recent weeks. may be they are involved in other projects.
>> As for me - no, not until the end of this week..
>>
>> I am puzzled with the following:
>>
>> I've got ML405 recently. There is a prebuilt bitstream with TEMAC in SGDMA mode for this board made by Xilinx (XAPP941).
>> With the TEMAC driver from EDK 9.1SP2 and the XAPP941 bitstream I've got (no jumbo frames):
>>
>> XTemac: using sgDMA mode.
>> XTemac: using TxDRE mode
>> XTemac: using RxDRE mode
>> XTemac: buffer descriptor size: 32768 (0x8000)
>> XTemac: (buffer_descriptor_init) phy: 0x3cf8000, virt: 0xff100000, size: 0x8000
>> eth%d: XTemac: PHY detected at address 7.
>> eth0: Xilinx TEMAC #0 at 0x80000000 mapped to 0xC5060000, irq=0
>> eth0: XTemac id 1.0f, block id 5, type 8
>>
>> eth0: XTemac: Options: 0xb8f2
>> eth0: XTemac: We renegotiated the speed to: 1000
>> eth0: XTemac: speed set to 1000Mb/s
>> eth0: XTemac: Send Threshold = 16, Receive Threshold = 2
>> eth0: XTemac: Send Wait bound = 1, Receive Wait bound = 1
>>
>> root@192.168.119.11:~/netperf-2.4.1/src# ./netperf -l 30 -H 192.168.119.1 -i 10,
>> 2 -I 99,10 -t UDP_STREAM -- -m 32768 -s 262144
>> UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.11
>> 9.1 (192.168.119.1) port 0 AF_INET : ±5.0% @ 99% conf.
>> Socket Message Elapsed Messages
>> Size Size Time Okay Errors Throughput
>> bytes bytes secs # # 10^6bits/sec
>>
>> 217088 32768 30.00 26391 0 230.60
>> 107520 30.00 26377 230.48
>>
>> Not that bad for this setup.
>>
>> With xps (EDK 9.1 without any SPs) I've tried creating exact the same design.
>> So that exact the same kernel etc could be used for the both bitstreams.
>> And with the self-made one I see exact the same output with the only difference:
>>
>> root@192.168.119.11:~/netperf-2.4.1/src# ./netperf -l 30 -H 192.168.119.1 -i 10,
>> 2 -I 99,10 -t UDP_STREAM -- -m 32768 -s 262144
>> UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.11
>> 9.1 (192.168.119.1) port 0 AF_INET : ±5.0% @ 99% conf.
>> Socket Message Elapsed Messages
>> Size Size Time Okay Errors Throughput
>> bytes bytes secs # # 10^6bits/sec
>>
>> 217088 32768 30.00 9593 0 83.82
>> 107520 30.00 9586 83.76
>>
>> :o(
>>
>> Rebuilding the XAPP941 project with EDK 9.1.00 still leaves 230Mb/sec.
>> I also pulled the additional timing constraints from XAPP941's data/system.ucf
>> into the self-made data/system.ucf, but this haven't change anything.
>>
>> I've run out of ideas, and switched from TEMAC to other Xilinx stuff for a while.
>>
>>
>> Thanks,
>> Andrei
>
> _________________________________________________________________
> Connect to the next generation of MSN Messenger
> http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply
* Re: network load 8245 vs. 8347E
From: Marc Leeman @ 2007-06-21 17:13 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <20070621155616.GR5417@chiana.homelinux.org>
[-- Attachment #1: Type: text/plain, Size: 574 bytes --]
> Simply the load of the processor. The 8245 is running ppc/2.6.17, the
> 8347e is running powerpc/2.6.21.1.
Sorry, I'm confusing my boards: this particular board with the 8245
processor is running 2.4.34 [1].
so
8245: 2.4.34
8237e: 2.6.21.1
[1] the 2.4 line balanced the load better of multiple streams being
taken in wrt to the 2.6 kernels; this is the reason we stuck with 2.4
for this platform.
--
greetz, marc
He claims to be a human from a planet called Erp.
Aeryn - Premiere
chiana 2.6.18-4-ixp4xx #1 Tue Mar 27 18:01:56 BST 2007 GNU/Linux
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [RFC] Device tree for new desktop platform in arch/powerpc
From: Gerhard Pircher @ 2007-06-21 16:27 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: linuxppc-dev
In-Reply-To: <5e4e419b28d588fa6ee40e2aeb93de2c@kernel.crashing.org>
-------- Original-Nachricht --------
Datum: Thu, 21 Jun 2007 16:38:49 +0200
Von: Segher Boessenkool <segher@kernel.crashing.org>
An: "Gerhard Pircher" <gerhard_pircher@gmx.net>
CC: linuxppc-dev@ozlabs.org, Benjamin Herrenschmidt <benh@kernel.crashing.org>
Betreff: Re: [RFC] Device tree for new desktop platform in arch/powerpc
> Devices on a PCI bus have their interrupts encoded according
> to the PCI bus binding; this is a very much different format
> so you better have a real mapping (probably in the PCI host
> bridge) translating it to ISA interrupts (and pointing it there),
> if that's how the interrupts are routed on your box.
Ah, right. I have already seen that in a dts file, but didn't remember it.
> I hope this helps, it's a bit hard to explain without whiteboard :-)
For sure it helps!
Gerhard
--
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger
^ permalink raw reply
* Re: [RFC] Device tree for new desktop platform in arch/powerpc
From: Gerhard Pircher @ 2007-06-21 16:21 UTC (permalink / raw)
To: Segher Boessenkool, benh; +Cc: linuxppc-dev
In-Reply-To: <e3de5208ef08748bb23d2b19cb040e04@kernel.crashing.org>
-------- Original-Nachricht --------
Datum: Thu, 21 Jun 2007 16:24:17 +0200
Von: Segher Boessenkool <segher@kernel.crashing.org>
An: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: Gerhard Pircher <gerhard_pircher@gmx.net>, list <linuxppc-dev@ozlabs.org>
Betreff: Re: [RFC] Device tree for new desktop platform in arch/powerpc
> Yeah. You can also use the "pnpPNP," name for the 8259 if
> it is hooked up like on a PC.
Yes, it is hooked up like on a PC (or on the Pegasos 1).
> Please send a new .dts based on the comments you've had so far?
Yes, I'll do so.
Gerhard
--
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
^ permalink raw reply
* RE: Virtex 4 Avnet Mini-Module Networking.
From: Mohammad Sadegh Sadri @ 2007-06-21 16:05 UTC (permalink / raw)
To: Andrei Konovalov; +Cc: linuxppc-embedded
very interesting
the provided xps project from xapp941 results 230Mbits but your custome sys=
tem is 83.0Mbits, yes?
just, are you sure the ppc core has the same core clock frequency in both d=
esigns? I mean may be the xapp941 is running at 300MHz but yours at 100MHz.=
=20
And what about a custom system with 9.1SP2? does that gives the same perfor=
mance?
Finally If possible please release the test results for TCP streams. ( 9.1 =
no SP and 9.1 SP2 )
thanks
----------------------------------------
> Date: Thu, 21 Jun 2007 18:53:49 +0400
> From: akonovalov@ru.mvista.com
> To: mamsadegh@hotmail.com
> CC: linuxppc-embedded@ozlabs.org; kashiwagi@co-nss.co.jp; glenn.g.hart@us=
.westinghouse.com
> Subject: Re: Virtex 4 Avnet Mini-Module Networking.
>=20
> Mohammad Sadegh Sadri wrote:
> > I'm wondering where are the original developers of TEMAC driver these d=
ays, I have not seen any posts from any of andrei
> > nor grant in the recent weeks. may be they are involved in other projec=
ts.
>=20
> As for me - no, not until the end of this week..
>=20
> I am puzzled with the following:
>=20
> I've got ML405 recently. There is a prebuilt bitstream with TEMAC in SGDM=
A mode for this board made by Xilinx (XAPP941).
> With the TEMAC driver from EDK 9.1SP2 and the XAPP941 bitstream I've got =
(no jumbo frames):
>=20
> XTemac: using sgDMA mode.
> XTemac: using TxDRE mode
> XTemac: using RxDRE mode
> XTemac: buffer descriptor size: 32768 (0x8000)
> XTemac: (buffer_descriptor_init) phy: 0x3cf8000, virt: 0xff100000, siz=
e: 0x8000
> eth%d: XTemac: PHY detected at address 7.
> eth0: Xilinx TEMAC #0 at 0x80000000 mapped to 0xC5060000, irq=3D0
> eth0: XTemac id 1.0f, block id 5, type 8
>=20
> eth0: XTemac: Options: 0xb8f2
> eth0: XTemac: We renegotiated the speed to: 1000
> eth0: XTemac: speed set to 1000Mb/s
> eth0: XTemac: Send Threshold =3D 16, Receive Threshold =3D 2
> eth0: XTemac: Send Wait bound =3D 1, Receive Wait bound =3D 1
>=20
> root@192.168.119.11:~/netperf-2.4.1/src# ./netperf -l 30 -H 192.168.11=
9.1 -i 10,
> 2 -I 99,10 -t UDP_STREAM -- -m 32768 -s 262144
> UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to =
192.168.11
> 9.1 (192.168.119.1) port 0 AF_INET : =B15.0% @ 99% conf.
> Socket Message Elapsed Messages
> Size Size Time Okay Errors Throughput
> bytes bytes secs # # 10^6bits/sec
>=20
> 217088 32768 30.00 26391 0 230.60
> 107520 30.00 26377 230.48
>=20
> Not that bad for this setup.
>=20
> With xps (EDK 9.1 without any SPs) I've tried creating exact the same des=
ign.
> So that exact the same kernel etc could be used for the both bitstreams.
> And with the self-made one I see exact the same output with the only diff=
erence:
>=20
> root@192.168.119.11:~/netperf-2.4.1/src# ./netperf -l 30 -H 192.168.11=
9.1 -i 10,
> 2 -I 99,10 -t UDP_STREAM -- -m 32768 -s 262144
> UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to =
192.168.11
> 9.1 (192.168.119.1) port 0 AF_INET : =B15.0% @ 99% conf.
> Socket Message Elapsed Messages
> Size Size Time Okay Errors Throughput
> bytes bytes secs # # 10^6bits/sec
>=20
> 217088 32768 30.00 9593 0 83.82
> 107520 30.00 9586 83.76
>=20
> :o(
>=20
> Rebuilding the XAPP941 project with EDK 9.1.00 still leaves 230Mb/sec.
> I also pulled the additional timing constraints from XAPP941's data/syste=
m.ucf
> into the self-made data/system.ucf, but this haven't change anything.
>=20
> I've run out of ideas, and switched from TEMAC to other Xilinx stuff for =
a while.
>=20
>=20
> Thanks,
> Andrei
_________________________________________________________________
Connect to the next generation of MSN Messenger=A0
http://imagine-msn.com/messenger/launch80/default.aspx?locale=3Den-us&sourc=
e=3Dwlmailtagline=
^ permalink raw reply
* Re: network load 8245 vs. 8347E
From: Marc Leeman @ 2007-06-21 15:56 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <0090CCD0-EBB4-4475-BF03-36AF41E2DDA1@kernel.crashing.org>
[-- Attachment #1: Type: text/plain, Size: 1769 bytes --]
> How are you measuring load? I'm assuming the 8245 and 8347 are using
> the same kernel.
Simply the load of the processor. The 8245 is running ppc/2.6.17, the
8347e is running powerpc/2.6.21.1.
The 8245 kernel is not being upgraded anymore since
1. we're not using them anymore on the new designs
2. I didn't bother fixing the board support after the interrupt
handling changed in 2.6.18 because of 1.
Disabling NAPI seems to improve the situation a bit, but there's still a
load difference 25% on a marginally faster processor.
Mem: 10788K used, 116940K free, 0K shrd, 0K buff, 4212K cached
Load average: 0.39 0.43 0.29
PID USER STATUS VSZ PPID %CPU %MEM COMMAND
361 barco SW 152 270 30.8 0.1 recv
2222 barco RW 1124 270 0.3 0.8 top
119 root SW 1216 1 0.0 0.9 dropbear
270 barco SW 1132 1 0.0 0.8 sh
94 root SW 1132 1 0.0 0.8 syslogd
1 root SW 1128 0 0.0 0.8 init
95 root SW 1112 1 0.0 0.8 klogd
Mem: 8144K used, 20944K free, 0K shrd, 888K buff, 2384K cached
Load average: 0.00 0.00 0.00 (Status: S=sleeping R=running, W=waiting)
PID USER STATUS RSS PPID %CPU %MEM COMMAND
407 barco R 124 1 6.4 0.4 recv
510 root S 668 130 0.7 2.2 dropbear
13889 root R 368 7377 0.3 1.2 top
511 barco S 476 510 0.0 1.6 sh
52 root S 376 1 0.0 1.2 syslogd
1 root S 352 0 0.0 1.2 init
59 root S 340 1 0.0 1.1 klogd
--
greetz, marc
Oh no, no, no, no I don't boogie.
Crichton - Won't Get Fooled Again
chiana 2.6.18-4-ixp4xx #1 Tue Mar 27 18:01:56 BST 2007 GNU/Linux
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: network load 8245 vs. 8347E
From: Kumar Gala @ 2007-06-21 15:33 UTC (permalink / raw)
To: Marc Leeman; +Cc: linuxppc-dev
In-Reply-To: <20070621141519.GQ5417@chiana.homelinux.org>
On Jun 21, 2007, at 9:15 AM, Marc Leeman wrote:
> Ok, I guess it's comparing apples to lemons here, but I'll have a
> go at
> it anyway.
>
> I'm trying to figure out why partial network decoding on an 8347E is
> disappointingly slow wrt an older 8245 processor.
>
> When simply receiving (cf. att) a multicast stream of 12 Mbps, an
> 8245/uclibc 0.9.28 @350 MHz, ppc arch , the system runs smoothly at a
> load of around 4% on a e100 based MAC (pci: 8086:1209 ).
>
> When doing the same thing on 8347e/0.9.28 @400 Mhz, powerpc arch, the
> system is loaded at around 34%.
>
> any clues?
How are you measuring load? I'm assuming the 8245 and 8347 are using
the same kernel.
- k
^ permalink raw reply
* Virtex4FX12LC hangs in calibrating delay loop
From: Thomas Glanzmann @ 2007-06-21 15:15 UTC (permalink / raw)
To: linuxppc-embedded
Hello,
I used the HEAD secretlabs kernel and used ml403 defconfig. I still see
no serial output from the _kernel_ on the serial console. But I do see
output from the in kernel embedded boot loader "load_kernel". I typed in
stop in xmd and got an instruction pointer which points to:
c00045a0 <__delay>:
c00045a0: 2c 03 00 00 cmpwi r3,0
c00045a4: 7c 69 03 a6 mtctr r3
c00045a8: 4d 82 00 20 beqlr
c00045ac: 42 00 00 00 bdnz- c00045ac <__delay+0xc> <<<<<<<<
c00045b0: 4e 80 00 20 blr
So I guess it is the calibrating delay loop and I am not sure. I can reproduce
this. It is always in this function. Now I wonder is my board missing
timer interrupts? What could be the reason for this. And of course one
much more important question:
- Is the serial console initialized before or after the
calibrating delay loop?
Is there a way to get a backtrace out of this? If that is the case what
do I have to do? Recompile the Kernel with frame pointers and attach
gdb?
Thomas
^ permalink raw reply
* Re: [RFC] Device tree for new desktop platform in arch/powerpc
From: Segher Boessenkool @ 2007-06-21 14:59 UTC (permalink / raw)
To: Gerhard Pircher; +Cc: david, linuxppc-dev
In-Reply-To: <20070621132851.25900@gmx.net>
>>>> reserved-interrupts =3D <2>;
>>
>> I'm currious about the above though, what is it ?
>
> Quote from the CHRP ISA interrupt controller device binding document:
> =93reserved-interrupts=94
> Standard property name to define reserved interrupts.
> prop-encoded-array: An integer array, encoded with encode-int.
> The value of this property shall be a list of ISA interrupts which=20
> cannot
> be assigned due to cascading, wiring, or other reasons. Only the irq#=20=
> part
> of the property is pertinent to this use.
I never found any situation where this property is useful
(you need a lot more information to do anything but static
IRQ routing on ISA anyway), but it doesn't harm anything
either.
Segher
^ permalink raw reply
* Re: Virtex 4 Avnet Mini-Module Networking.
From: Andrei Konovalov @ 2007-06-21 14:53 UTC (permalink / raw)
To: Mohammad Sadegh Sadri; +Cc: linuxppc-embedded
In-Reply-To: <BAY115-W5609334AE7FC568C37A5DB2120@phx.gbl>
Mohammad Sadegh Sadri wrote:
> I'm wondering where are the original developers of TEMAC driver these days, I have not seen any posts from any of andrei
> nor grant in the recent weeks. may be they are involved in other projects.
As for me - no, not until the end of this week..
I am puzzled with the following:
I've got ML405 recently. There is a prebuilt bitstream with TEMAC in SGDMA mode for this board made by Xilinx (XAPP941).
With the TEMAC driver from EDK 9.1SP2 and the XAPP941 bitstream I've got (no jumbo frames):
XTemac: using sgDMA mode.
XTemac: using TxDRE mode
XTemac: using RxDRE mode
XTemac: buffer descriptor size: 32768 (0x8000)
XTemac: (buffer_descriptor_init) phy: 0x3cf8000, virt: 0xff100000, size: 0x8000
eth%d: XTemac: PHY detected at address 7.
eth0: Xilinx TEMAC #0 at 0x80000000 mapped to 0xC5060000, irq=0
eth0: XTemac id 1.0f, block id 5, type 8
<snip>
eth0: XTemac: Options: 0xb8f2
eth0: XTemac: We renegotiated the speed to: 1000
eth0: XTemac: speed set to 1000Mb/s
eth0: XTemac: Send Threshold = 16, Receive Threshold = 2
eth0: XTemac: Send Wait bound = 1, Receive Wait bound = 1
<snip>
root@192.168.119.11:~/netperf-2.4.1/src# ./netperf -l 30 -H 192.168.119.1 -i 10,
2 -I 99,10 -t UDP_STREAM -- -m 32768 -s 262144
UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.11
9.1 (192.168.119.1) port 0 AF_INET : ±5.0% @ 99% conf.
Socket Message Elapsed Messages
Size Size Time Okay Errors Throughput
bytes bytes secs # # 10^6bits/sec
217088 32768 30.00 26391 0 230.60
107520 30.00 26377 230.48
Not that bad for this setup.
With xps (EDK 9.1 without any SPs) I've tried creating exact the same design.
So that exact the same kernel etc could be used for the both bitstreams.
And with the self-made one I see exact the same output with the only difference:
root@192.168.119.11:~/netperf-2.4.1/src# ./netperf -l 30 -H 192.168.119.1 -i 10,
2 -I 99,10 -t UDP_STREAM -- -m 32768 -s 262144
UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.11
9.1 (192.168.119.1) port 0 AF_INET : ±5.0% @ 99% conf.
Socket Message Elapsed Messages
Size Size Time Okay Errors Throughput
bytes bytes secs # # 10^6bits/sec
217088 32768 30.00 9593 0 83.82
107520 30.00 9586 83.76
:o(
Rebuilding the XAPP941 project with EDK 9.1.00 still leaves 230Mb/sec.
I also pulled the additional timing constraints from XAPP941's data/system.ucf
into the self-made data/system.ucf, but this haven't change anything.
I've run out of ideas, and switched from TEMAC to other Xilinx stuff for a while.
Thanks,
Andrei
^ permalink raw reply
* Re: [RFC] Device tree for new desktop platform in arch/powerpc
From: Segher Boessenkool @ 2007-06-21 14:38 UTC (permalink / raw)
To: Gerhard Pircher; +Cc: linuxppc-dev
In-Reply-To: <20070621132059.25900@gmx.net>
>> You probably also want
>> an interrupt-parent property in the isa bridge node pointing back to
>> the
>> 8259 so it becomes the default for all ISA devices.
> What about PCI devices? Wouldn't it better to define the
> interrupt-parent property in the PCI bus node?
Devices on an ISA bus have their interrupts encoded according
to the ISA bus binding; this is exactly the format that the
ISA interrupt controller (the 8259) expects, so by setting
the interrupt-parent on the bus node to point to the 8259 (and
not doing interrupt mapping in the ISA child nodes) all works
exactly as planned.
Devices on a PCI bus have their interrupts encoded according
to the PCI bus binding; this is a very much different format
so you better have a real mapping (probably in the PCI host
bridge) translating it to ISA interrupts (and pointing it there),
if that's how the interrupts are routed on your box.
I hope this helps, it's a bit hard to explain without whiteboard :-)
Segher
^ permalink raw reply
* Re: [Cbe-oss-dev] [patch 1/5] cell: pmi remove support for mutiple devices.
From: Akinobu Mita @ 2007-06-21 14:07 UTC (permalink / raw)
To: Christian Krafft; +Cc: linuxppc-dev@ozlabs.org, cbe-oss-dev@ozlabs.org
In-Reply-To: <20070621131644.03a8ec31@localhost>
> Index: linux/arch/powerpc/sysdev/pmi.c
> ===================================================================
> --- linux.orig/arch/powerpc/sysdev/pmi.c
> +++ linux/arch/powerpc/sysdev/pmi.c
> @@ -48,15 +48,13 @@ struct pmi_data {
> struct work_struct work;
> };
>
> +static struct pmi_data *data;
>
[...]
> @@ -129,9 +124,14 @@ static int pmi_of_probe(struct of_device
> const struct of_device_id *match)
> {
> struct device_node *np = dev->node;
> - struct pmi_data *data;
> int rc;
>
> + if (data) {
> + printk(KERN_ERR "pmi: driver has already been initialized.\n");
> + rc = -EBUSY;
> + goto out;
> + }
> +
> data = kzalloc(sizeof(struct pmi_data), GFP_KERNEL);
> if (!data) {
> printk(KERN_ERR "pmi: could not allocate memory.\n");
> @@ -154,7 +154,6 @@ static int pmi_of_probe(struct of_device
>
> INIT_WORK(&data->work, pmi_notify_handlers);
>
> - dev->dev.driver_data = data;
> data->dev = dev;
>
> data->irq = irq_of_parse_and_map(np, 0);
> @@ -164,7 +163,7 @@ static int pmi_of_probe(struct of_device
> goto error_cleanup_iomap;
> }
>
> - rc = request_irq(data->irq, pmi_irq_handler, 0, "pmi", data);
> + rc = request_irq(data->irq, pmi_irq_handler, 0, "pmi", NULL);
> if (rc) {
> printk(KERN_ERR "pmi: can't request IRQ %d: returned %d\n",
> data->irq, rc);
> @@ -187,11 +186,8 @@ out:
>
> static int pmi_of_remove(struct of_device *dev)
> {
> - struct pmi_data *data;
> struct pmi_handler *handler, *tmp;
>
> - data = dev->dev.driver_data;
> -
> free_irq(data->irq, data);
> iounmap(data->pmi_reg);
>
> @@ -202,7 +198,7 @@ static int pmi_of_remove(struct of_devic
>
> spin_unlock(&data->handler_spinlock);
>
> - kfree(dev->dev.driver_data);
> + kfree(data);
Shouldn't it set data = NULL here?
I guess we will get "pmi: driver has already been initialized" message
and -EBUSY on reloading pmi driver.
>
> return 0;
> }
^ permalink raw reply
* Re: [RFC] Device tree for new desktop platform in arch/powerpc
From: Segher Boessenkool @ 2007-06-21 14:29 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: list, David Gibson
In-Reply-To: <1182429733.24740.12.camel@localhost.localdomain>
>>> #address-cells = <1>;
>
> Why #address-cells set to 1 ? In a PIC node, in fact, I would expect it
> to be 0 to avoid any spurrious "reg" matching for interrupts.
The "#address-cells" property should be completely absent,
even; for interrupt matching, that means "treat as 0, no
unit address used in interrupt mapping, just the interrupt
number", and for the "normal" purpose (defining the format
of devices on the bus rooted at / represented by this node)
it means "there is no such bus" -- this is different from
#address-cells = 0.
> Just put the interrupt-parent pointer once in the isa bridge and all
> isa
> devices below the bridge.
Definitely.
>>> #address-cells = <1>;
>>> #size-cells = <0>; // No physical
>> address.
>>
>> Comment is arguably incorrect.
>
> Yeah, not sure what that is supposed to be.
#size-cells = 0 means the addressing scheme on this bus is
not directly related to the mechanism (if any) by which
registers on a device on the bus are addressed.
Segher
^ permalink raw reply
* Re: [RFC] Device tree for new desktop platform in arch/powerpc
From: Segher Boessenkool @ 2007-06-21 14:24 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: list
In-Reply-To: <1182429406.24740.6.camel@localhost.localdomain>
>> 3. The dts files define the device_type of a serial port as "serial",
>> whereas the OF spec says "pnpPNP,501". What's the difference between
>> the two?
>
> Use the pnp stuff for "compatible", you can mostly ignore device_type
> or
> set it to the same as name.
Only if the name is indeed the correct, defined, device_type
for that device, and you implement the whole binding for that
device_type (I recommend you do, for serial; it makes it
easier to use that device as an early console).
>> 4. I couldn't find any information for a device tree representation of
>> the i8259 interrupt controller in the booting-without-of.txt file. Is
>> my implementation correct (inspired by the OF documents)?
>
> Haven't looked at your .dts yet but it should be
> "interrupt-controller",
> compatible "chrp,iic" or "i8259", with a #interrupt-cells of 2 and
> interrupts following the standard ISA encoding. You probably also want
> an interrupt-parent property in the isa bridge node pointing back to
> the
> 8259 so it becomes the default for all ISA devices.
Yeah. You can also use the "pnpPNP," name for the 8259 if
it is hooked up like on a PC.
>> I would be grateful, if you could take a look at my dts file and
>> comment on every line that doesn't meet your views.
Please send a new .dts based on the comments you've had so far?
Segher
^ permalink raw reply
* [patch 1/6] ps3: Preallocate bootmem memory for the PS3 FLASH ROM storage driver
From: Geert Uytterhoeven @ 2007-06-21 14:14 UTC (permalink / raw)
To: Paul Mackerras, linuxppc-dev
Cc: Jens Axboe, James E.J. Bottomley, linux-scsi, linux-kernel,
Geert Uytterhoeven
In-Reply-To: <20070621141419.480922000@pademelon.sonytel.be>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3162 bytes --]
Preallocate 256 KiB of bootmem memory for the PS3 FLASH ROM storage driver.
This can be disabled by passing `ps3flash=off' on the kernel command line.
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
---
v3:
- Allow to disable ps3flash (and the preallocated 256 KiB buffer) using
`ps3flash=off'
arch/powerpc/platforms/ps3/setup.c | 31 ++++++++++++++++++++++++++++++-
include/asm-powerpc/ps3.h | 1 +
2 files changed, 31 insertions(+), 1 deletion(-)
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -107,7 +107,8 @@ static void ps3_panic(char *str)
while(1);
}
-#if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE)
+#if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE) || \
+ defined(CONFIG_PS3_FLASH) || defined(CONFIG_PS3_FLASH_MODULE)
static void prealloc(struct ps3_prealloc *p)
{
if (!p->size)
@@ -123,7 +124,9 @@ static void prealloc(struct ps3_prealloc
printk(KERN_INFO "%s: %lu bytes at %p\n", p->name, p->size,
p->address);
}
+#endif
+#if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE)
struct ps3_prealloc ps3fb_videomemory = {
.name = "ps3fb videomemory",
.size = CONFIG_FB_PS3_DEFAULT_SIZE_M*1024*1024,
@@ -146,6 +149,30 @@ early_param("ps3fb", early_parse_ps3fb);
#define prealloc_ps3fb_videomemory() do { } while (0)
#endif
+#if defined(CONFIG_PS3_FLASH) || defined(CONFIG_PS3_FLASH_MODULE)
+struct ps3_prealloc ps3flash_bounce_buffer = {
+ .name = "ps3flash bounce buffer",
+ .size = 256*1024,
+ .align = 256*1024
+};
+EXPORT_SYMBOL_GPL(ps3flash_bounce_buffer);
+#define prealloc_ps3flash_bounce_buffer() prealloc(&ps3flash_bounce_buffer)
+
+static int __init early_parse_ps3flash(char *p)
+{
+ if (!p)
+ return 1;
+
+ if (!strcmp(p, "off"))
+ ps3flash_bounce_buffer.size = 0;
+
+ return 0;
+}
+early_param("ps3flash", early_parse_ps3flash);
+#else
+#define prealloc_ps3flash_bounce_buffer() do { } while (0)
+#endif
+
static int ps3_set_dabr(u64 dabr)
{
enum {DABR_USER = 1, DABR_KERNEL = 2,};
@@ -175,6 +202,8 @@ static void __init ps3_setup_arch(void)
#endif
prealloc_ps3fb_videomemory();
+ prealloc_ps3flash_bounce_buffer();
+
ppc_md.power_save = ps3_power_save;
DBG(" <- %s:%d\n", __func__, __LINE__);
--- a/include/asm-powerpc/ps3.h
+++ b/include/asm-powerpc/ps3.h
@@ -427,6 +427,7 @@ struct ps3_prealloc {
};
extern struct ps3_prealloc ps3fb_videomemory;
+extern struct ps3_prealloc ps3flash_bounce_buffer;
#endif
--
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/
Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619
^ permalink raw reply
* [patch 5/6] ps3: BD/DVD/CD-ROM Storage Driver
From: Geert Uytterhoeven @ 2007-06-21 14:14 UTC (permalink / raw)
To: Paul Mackerras, linuxppc-dev
Cc: Jens Axboe, James E.J. Bottomley, linux-scsi, linux-kernel,
Geert Uytterhoeven
In-Reply-To: <20070621141419.480922000@pademelon.sonytel.be>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 17658 bytes --]
From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Add a BD/DVD/CD-ROM Storage Driver for the PS3:
- Implemented as a SCSI device driver
- Uses software scatter-gather with a 64 KiB bounce buffer as the hypervisor
doesn't support scatter-gather
CC: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
v3:
- Replace dependency on BLK_DEV_SR by SCSI
- Use `BD/DVD/CD-ROM' instead of `ROM' in driver descriptions
- Inform the user to enable "SCSI CDROM support"
- Cleanup #includes
- Group LV1 API related stuff
- Rename ps3rom_private.cmd to ps3rom_private.curr_cmd
- Use shost_priv() (from scsi-misc)
- Set scsi_device.use_10_for_rw and remove support for {READ,WRITE}_6
- Explain why we prefer to use lv1_storage_{read,write}()
- Pass the interrupt handler to ps3stor_setup(), so it doesn't have to be
overridden later
- Reset ps3rom_priv(dev) to NULL during cleanup
v2:
- Don't use `default y' in Kconfig
- Add missing #include <linux/highmem.h>
- Remove ps3rom_private.scsi_done, use scsi_cmnd.scsi_done instead
- Use scsi_device.host.hostdata
- Remove empty ps3rom_slave_{alloc,destroy}()
- Kill superfluous test for command in progress
- Move scsi_host_put() last in cleanup sequence
- Remove scsi_command(), use scsi_print_command() for debugging
- scsi_cmnd.use_sg is always > 0 these days
- Allocate struct ps3rom_private using scsi_host_alloc()
- Remove the thread for handling requests
- Remove unused position parameter enum
- Remove unused NA_PROTO and DIR_NA
- Derive buffer length, data direction, and transfer protocol from the
struct scsi_command, instead of using a big switch() statement
- Kill superfluous spinlock
- Remove manual request sense, as modern hypervisors always do auto sense
- Pass all SCSI commands to the hypervisor as ATAPI commands, except for
READ_*/WRITE_*
- Don't print errors for SCSI commands that are not allowed for an Other OS
by the hypervisor
- Remove superfluous tests for data directions in
{fill_from,fetch_to}_dev_buffer()
- Handle errors in {fill_from,fetch_to}_dev_buffer()
- Reorder routines
- Manually inline ps3rom_send_atapi_command()
- Fix all FIXMEs
arch/powerpc/platforms/ps3/Kconfig | 11
drivers/scsi/Makefile | 1
drivers/scsi/ps3rom.c | 537 +++++++++++++++++++++++++++++++++++++
3 files changed, 549 insertions(+)
--- a/arch/powerpc/platforms/ps3/Kconfig
+++ b/arch/powerpc/platforms/ps3/Kconfig
@@ -112,4 +112,15 @@ config PS3_DISK
This support is required to access the PS3 hard disk.
In general, all users will say Y or M.
+config PS3_ROM
+ tristate "PS3 BD/DVD/CD-ROM Storage Driver"
+ depends on PPC_PS3 && SCSI
+ select PS3_STORAGE
+ help
+ Include support for the PS3 ROM Storage.
+
+ This support is required to access the PS3 BD/DVD/CD-ROM drive.
+ In general, all users will say Y or M.
+ Also make sure to say Y or M to "SCSI CDROM support" later.
+
endmenu
--- a/drivers/scsi/Makefile
+++ b/drivers/scsi/Makefile
@@ -132,6 +132,7 @@ obj-$(CONFIG_SCSI_IBMVSCSI) += ibmvscsi/
obj-$(CONFIG_SCSI_IBMVSCSIS) += ibmvscsi/
obj-$(CONFIG_SCSI_HPTIOP) += hptiop.o
obj-$(CONFIG_SCSI_STEX) += stex.o
+obj-$(CONFIG_PS3_ROM) += ps3rom.o
obj-$(CONFIG_ARM) += arm/
--- /dev/null
+++ b/drivers/scsi/ps3rom.c
@@ -0,0 +1,537 @@
+/*
+ * PS3 BD/DVD/CD-ROM Storage Driver
+ *
+ * Copyright (C) 2007 Sony Computer Entertainment Inc.
+ * Copyright 2007 Sony Corp.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include <linux/cdrom.h>
+#include <linux/highmem.h>
+
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_dbg.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_host.h>
+
+#include <asm/lv1call.h>
+#include <asm/ps3stor.h>
+
+
+#define DEVICE_NAME "ps3rom"
+
+#define BOUNCE_SIZE (64*1024)
+
+#define PS3ROM_MAX_SECTORS (BOUNCE_SIZE / CD_FRAMESIZE)
+
+
+struct ps3rom_private {
+ struct ps3_storage_device *dev;
+ struct scsi_cmnd *curr_cmd;
+};
+#define ps3rom_priv(dev) ((dev)->sbd.core.driver_data)
+
+
+#define LV1_STORAGE_SEND_ATAPI_COMMAND (1)
+
+struct lv1_atapi_cmnd_block {
+ u8 pkt[32]; /* packet command block */
+ u32 pktlen; /* should be 12 for ATAPI 8020 */
+ u32 blocks;
+ u32 block_size;
+ u32 proto; /* transfer mode */
+ u32 in_out; /* transfer direction */
+ u64 buffer; /* parameter except command block */
+ u32 arglen; /* length above */
+};
+
+enum lv1_atapi_proto {
+ NON_DATA_PROTO = 0,
+ PIO_DATA_IN_PROTO = 1,
+ PIO_DATA_OUT_PROTO = 2,
+ DMA_PROTO = 3
+};
+
+enum lv1_atapi_in_out {
+ DIR_WRITE = 0, /* memory -> device */
+ DIR_READ = 1 /* device -> memory */
+};
+
+
+static int ps3rom_slave_configure(struct scsi_device *scsi_dev)
+{
+ struct ps3rom_private *priv = shost_priv(scsi_dev->host);
+ struct ps3_storage_device *dev = priv->dev;
+
+ dev_dbg(&dev->sbd.core, "%s:%u: id %u, lun %u, channel %u\n", __func__,
+ __LINE__, scsi_dev->id, scsi_dev->lun, scsi_dev->channel);
+
+ /*
+ * ATAPI SFF8020 devices use MODE_SENSE_10,
+ * so we can prohibit MODE_SENSE_6
+ */
+ scsi_dev->use_10_for_ms = 1;
+
+ /* we don't support {READ,WRITE}_6 */
+ scsi_dev->use_10_for_rw = 1;
+
+ return 0;
+}
+
+/*
+ * copy data from device into scatter/gather buffer
+ */
+static int fill_from_dev_buffer(struct scsi_cmnd *cmd, const void *buf)
+{
+ int k, req_len, act_len, len, active;
+ void *kaddr;
+ struct scatterlist *sgpnt;
+ unsigned int buflen;
+
+ buflen = cmd->request_bufflen;
+ if (!buflen)
+ return 0;
+
+ if (!cmd->request_buffer)
+ return -1;
+
+ sgpnt = cmd->request_buffer;
+ active = 1;
+ for (k = 0, req_len = 0, act_len = 0; k < cmd->use_sg; ++k, ++sgpnt) {
+ if (active) {
+ kaddr = kmap_atomic(sgpnt->page, KM_USER0);
+ if (!kaddr)
+ return -1;
+ len = sgpnt->length;
+ if ((req_len + len) > buflen) {
+ active = 0;
+ len = buflen - req_len;
+ }
+ memcpy(kaddr + sgpnt->offset, buf + req_len, len);
+ kunmap_atomic(kaddr, KM_USER0);
+ act_len += len;
+ }
+ req_len += sgpnt->length;
+ }
+ cmd->resid = req_len - act_len;
+ return 0;
+}
+
+/*
+ * copy data from scatter/gather into device's buffer
+ */
+static int fetch_to_dev_buffer(struct scsi_cmnd *cmd, void *buf)
+{
+ int k, req_len, len, fin;
+ void *kaddr;
+ struct scatterlist *sgpnt;
+ unsigned int buflen;
+
+ buflen = cmd->request_bufflen;
+ if (!buflen)
+ return 0;
+
+ if (!cmd->request_buffer)
+ return -1;
+
+ sgpnt = cmd->request_buffer;
+ for (k = 0, req_len = 0, fin = 0; k < cmd->use_sg; ++k, ++sgpnt) {
+ kaddr = kmap_atomic(sgpnt->page, KM_USER0);
+ if (!kaddr)
+ return -1;
+ len = sgpnt->length;
+ if ((req_len + len) > buflen) {
+ len = buflen - req_len;
+ fin = 1;
+ }
+ memcpy(buf + req_len, kaddr + sgpnt->offset, len);
+ kunmap_atomic(kaddr, KM_USER0);
+ if (fin)
+ return req_len + len;
+ req_len += sgpnt->length;
+ }
+ return req_len;
+}
+
+static int ps3rom_atapi_request(struct ps3_storage_device *dev,
+ struct scsi_cmnd *cmd)
+{
+ struct lv1_atapi_cmnd_block atapi_cmnd;
+ unsigned char opcode = cmd->cmnd[0];
+ int res;
+ u64 lpar;
+
+ dev_dbg(&dev->sbd.core, "%s:%u: send ATAPI command 0x%02x\n", __func__,
+ __LINE__, opcode);
+
+ memset(&atapi_cmnd, 0, sizeof(struct lv1_atapi_cmnd_block));
+ memcpy(&atapi_cmnd.pkt, cmd->cmnd, 12);
+ atapi_cmnd.pktlen = 12;
+ atapi_cmnd.block_size = 1; /* transfer size is block_size * blocks */
+ atapi_cmnd.blocks = atapi_cmnd.arglen = cmd->request_bufflen;
+ atapi_cmnd.buffer = dev->bounce_lpar;
+
+ switch (cmd->sc_data_direction) {
+ case DMA_FROM_DEVICE:
+ if (cmd->request_bufflen >= CD_FRAMESIZE)
+ atapi_cmnd.proto = DMA_PROTO;
+ else
+ atapi_cmnd.proto = PIO_DATA_IN_PROTO;
+ atapi_cmnd.in_out = DIR_READ;
+ break;
+
+ case DMA_TO_DEVICE:
+ if (cmd->request_bufflen >= CD_FRAMESIZE)
+ atapi_cmnd.proto = DMA_PROTO;
+ else
+ atapi_cmnd.proto = PIO_DATA_OUT_PROTO;
+ atapi_cmnd.in_out = DIR_WRITE;
+ res = fetch_to_dev_buffer(cmd, dev->bounce_buf);
+ if (res < 0)
+ return DID_ERROR << 16;
+ break;
+
+ default:
+ atapi_cmnd.proto = NON_DATA_PROTO;
+ break;
+ }
+
+ lpar = ps3_mm_phys_to_lpar(__pa(&atapi_cmnd));
+ res = lv1_storage_send_device_command(dev->sbd.dev_id,
+ LV1_STORAGE_SEND_ATAPI_COMMAND,
+ lpar, sizeof(atapi_cmnd),
+ atapi_cmnd.buffer,
+ atapi_cmnd.arglen, &dev->tag);
+ if (res == LV1_DENIED_BY_POLICY) {
+ dev_dbg(&dev->sbd.core,
+ "%s:%u: ATAPI command 0x%02x denied by policy\n",
+ __func__, __LINE__, opcode);
+ return DID_ERROR << 16;
+ }
+
+ if (res) {
+ dev_err(&dev->sbd.core,
+ "%s:%u: ATAPI command 0x%02x failed %d\n", __func__,
+ __LINE__, opcode, res);
+ return DID_ERROR << 16;
+ }
+
+ return 0;
+}
+
+static inline unsigned int srb10_lba(const struct scsi_cmnd *cmd)
+{
+ return cmd->cmnd[2] << 24 | cmd->cmnd[3] << 16 | cmd->cmnd[4] << 8 |
+ cmd->cmnd[5];
+}
+
+static inline unsigned int srb10_len(const struct scsi_cmnd *cmd)
+{
+ return cmd->cmnd[7] << 8 | cmd->cmnd[8];
+}
+
+static int ps3rom_read_request(struct ps3_storage_device *dev,
+ struct scsi_cmnd *cmd, u32 start_sector,
+ u32 sectors)
+{
+ int res;
+
+ dev_dbg(&dev->sbd.core, "%s:%u: read %u sectors starting at %u\n",
+ __func__, __LINE__, sectors, start_sector);
+
+ res = lv1_storage_read(dev->sbd.dev_id,
+ dev->regions[dev->region_idx].id, start_sector,
+ sectors, 0, dev->bounce_lpar, &dev->tag);
+ if (res) {
+ dev_err(&dev->sbd.core, "%s:%u: read failed %d\n", __func__,
+ __LINE__, res);
+ return DID_ERROR << 16;
+ }
+
+ return 0;
+}
+
+static int ps3rom_write_request(struct ps3_storage_device *dev,
+ struct scsi_cmnd *cmd, u32 start_sector,
+ u32 sectors)
+{
+ int res;
+
+ dev_dbg(&dev->sbd.core, "%s:%u: write %u sectors starting at %u\n",
+ __func__, __LINE__, sectors, start_sector);
+
+ res = fetch_to_dev_buffer(cmd, dev->bounce_buf);
+ if (res < 0)
+ return DID_ERROR << 16;
+
+ res = lv1_storage_write(dev->sbd.dev_id,
+ dev->regions[dev->region_idx].id, start_sector,
+ sectors, 0, dev->bounce_lpar, &dev->tag);
+ if (res) {
+ dev_err(&dev->sbd.core, "%s:%u: write failed %d\n", __func__,
+ __LINE__, res);
+ return DID_ERROR << 16;
+ }
+
+ return 0;
+}
+
+static int ps3rom_queuecommand(struct scsi_cmnd *cmd,
+ void (*done)(struct scsi_cmnd *))
+{
+ struct ps3rom_private *priv = shost_priv(cmd->device->host);
+ struct ps3_storage_device *dev = priv->dev;
+ unsigned char opcode;
+ int res;
+
+#ifdef DEBUG
+ scsi_print_command(cmd);
+#endif
+
+ priv->curr_cmd = cmd;
+ cmd->scsi_done = done;
+
+ opcode = cmd->cmnd[0];
+ /*
+ * While we can submit READ/WRITE SCSI commands as ATAPI commands,
+ * it's recommended for various reasons (performance, error handling,
+ * ...) to use lv1_storage_{read,write}() instead
+ */
+ switch (opcode) {
+ case READ_10:
+ res = ps3rom_read_request(dev, cmd, srb10_lba(cmd),
+ srb10_len(cmd));
+ break;
+
+ case WRITE_10:
+ res = ps3rom_write_request(dev, cmd, srb10_lba(cmd),
+ srb10_len(cmd));
+ break;
+
+ default:
+ res = ps3rom_atapi_request(dev, cmd);
+ break;
+ }
+
+ if (res) {
+ memset(cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
+ cmd->result = res;
+ cmd->sense_buffer[0] = 0x70;
+ cmd->sense_buffer[2] = ILLEGAL_REQUEST;
+ priv->curr_cmd = NULL;
+ cmd->scsi_done(cmd);
+ }
+
+ return 0;
+}
+
+static int decode_lv1_status(u64 status, unsigned char *sense_key,
+ unsigned char *asc, unsigned char *ascq)
+{
+ if (((status >> 24) & 0xff) != SAM_STAT_CHECK_CONDITION)
+ return -1;
+
+ *sense_key = (status >> 16) & 0xff;
+ *asc = (status >> 8) & 0xff;
+ *ascq = status & 0xff;
+ return 0;
+}
+
+static irqreturn_t ps3rom_interrupt(int irq, void *data)
+{
+ struct ps3_storage_device *dev = data;
+ struct Scsi_Host *host;
+ struct ps3rom_private *priv;
+ struct scsi_cmnd *cmd;
+ int res;
+ u64 tag, status;
+ unsigned char sense_key, asc, ascq;
+
+ res = lv1_storage_get_async_status(dev->sbd.dev_id, &tag, &status);
+ /*
+ * status = -1 may mean that ATAPI transport completed OK, but
+ * ATAPI command itself resulted CHECK CONDITION
+ * so, upper layer should issue REQUEST_SENSE to check the sense data
+ */
+
+ if (tag != dev->tag)
+ dev_err(&dev->sbd.core,
+ "%s:%u: tag mismatch, got %lx, expected %lx\n",
+ __func__, __LINE__, tag, dev->tag);
+
+ if (res) {
+ dev_err(&dev->sbd.core, "%s:%u: res=%d status=0x%lx\n",
+ __func__, __LINE__, res, status);
+ return IRQ_HANDLED;
+ }
+
+ host = ps3rom_priv(dev);
+ priv = shost_priv(host);
+ cmd = priv->curr_cmd;
+
+ if (!status) {
+ /* OK, completed */
+ if (cmd->sc_data_direction == DMA_FROM_DEVICE) {
+ res = fill_from_dev_buffer(cmd, dev->bounce_buf);
+ if (res) {
+ cmd->result = DID_ERROR << 16;
+ goto done;
+ }
+ }
+ cmd->result = DID_OK << 16;
+ goto done;
+ }
+
+ if (cmd->cmnd[0] == REQUEST_SENSE) {
+ /* SCSI spec says request sense should never get error */
+ dev_err(&dev->sbd.core, "%s:%u: end error without autosense\n",
+ __func__, __LINE__);
+ cmd->result = DID_ERROR << 16 | SAM_STAT_CHECK_CONDITION;
+ goto done;
+ }
+
+ if (decode_lv1_status(status, &sense_key, &asc, &ascq)) {
+ cmd->result = DID_ERROR << 16;
+ goto done;
+ }
+
+ cmd->sense_buffer[0] = 0x70;
+ cmd->sense_buffer[2] = sense_key;
+ cmd->sense_buffer[7] = 16 - 6;
+ cmd->sense_buffer[12] = asc;
+ cmd->sense_buffer[13] = ascq;
+ cmd->result = SAM_STAT_CHECK_CONDITION;
+
+done:
+ priv->curr_cmd = NULL;
+ cmd->scsi_done(cmd);
+ return IRQ_HANDLED;
+}
+
+static struct scsi_host_template ps3rom_host_template = {
+ .name = DEVICE_NAME,
+ .slave_configure = ps3rom_slave_configure,
+ .queuecommand = ps3rom_queuecommand,
+ .can_queue = 1,
+ .this_id = 7,
+ .sg_tablesize = SG_ALL,
+ .cmd_per_lun = 1,
+ .emulated = 1, /* only sg driver uses this */
+ .max_sectors = PS3ROM_MAX_SECTORS,
+ .use_clustering = ENABLE_CLUSTERING,
+ .module = THIS_MODULE,
+};
+
+
+static int __devinit ps3rom_probe(struct ps3_system_bus_device *_dev)
+{
+ struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core);
+ int error;
+ struct Scsi_Host *host;
+ struct ps3rom_private *priv;
+
+ if (dev->blk_size != CD_FRAMESIZE) {
+ dev_err(&dev->sbd.core,
+ "%s:%u: cannot handle block size %lu\n", __func__,
+ __LINE__, dev->blk_size);
+ return -EINVAL;
+ }
+
+ dev->bounce_size = BOUNCE_SIZE;
+ dev->bounce_buf = kmalloc(BOUNCE_SIZE, GFP_DMA);
+ if (!dev->bounce_buf)
+ return -ENOMEM;
+
+ error = ps3stor_setup(dev, ps3rom_interrupt);
+ if (error)
+ goto fail_free_bounce;
+
+ host = scsi_host_alloc(&ps3rom_host_template,
+ sizeof(struct ps3rom_private));
+ if (!host) {
+ dev_err(&dev->sbd.core, "%s:%u: scsi_host_alloc failed\n",
+ __func__, __LINE__);
+ goto fail_teardown;
+ }
+
+ priv = shost_priv(host);
+ ps3rom_priv(dev) = host;
+ priv->dev = dev;
+
+ /* One device/LUN per SCSI bus */
+ host->max_id = 1;
+ host->max_lun = 1;
+
+ error = scsi_add_host(host, &dev->sbd.core);
+ if (error) {
+ dev_err(&dev->sbd.core, "%s:%u: scsi_host_alloc failed %d\n",
+ __func__, __LINE__, error);
+ error = -ENODEV;
+ goto fail_host_put;
+ }
+
+ scsi_scan_host(host);
+ return 0;
+
+fail_host_put:
+ scsi_host_put(host);
+ ps3rom_priv(dev) = NULL;
+fail_teardown:
+ ps3stor_teardown(dev);
+fail_free_bounce:
+ kfree(dev->bounce_buf);
+ return error;
+}
+
+static int ps3rom_remove(struct ps3_system_bus_device *_dev)
+{
+ struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core);
+ struct Scsi_Host *host = ps3rom_priv(dev);
+
+ scsi_remove_host(host);
+ ps3stor_teardown(dev);
+ scsi_host_put(host);
+ ps3rom_priv(dev) = NULL;
+ kfree(dev->bounce_buf);
+ return 0;
+}
+
+static struct ps3_system_bus_driver ps3rom = {
+ .match_id = PS3_MATCH_ID_STOR_ROM,
+ .core.name = DEVICE_NAME,
+ .core.owner = THIS_MODULE,
+ .probe = ps3rom_probe,
+ .remove = ps3rom_remove
+};
+
+
+static int __init ps3rom_init(void)
+{
+ return ps3_system_bus_driver_register(&ps3rom);
+}
+
+static void __exit ps3rom_exit(void)
+{
+ ps3_system_bus_driver_unregister(&ps3rom);
+}
+
+module_init(ps3rom_init);
+module_exit(ps3rom_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("PS3 BD/DVD/CD-ROM Storage Driver");
+MODULE_AUTHOR("Sony Corporation");
+MODULE_ALIAS(PS3_MODULE_ALIAS_STOR_ROM);
--
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/
Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619
^ permalink raw reply
* [patch 6/6] ps3: FLASH ROM Storage Driver
From: Geert Uytterhoeven @ 2007-06-21 14:14 UTC (permalink / raw)
To: Paul Mackerras, linuxppc-dev
Cc: Jens Axboe, James E.J. Bottomley, linux-scsi, linux-kernel,
Geert Uytterhoeven
In-Reply-To: <20070621141419.480922000@pademelon.sonytel.be>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 14401 bytes --]
From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Add a FLASH ROM Storage Driver for the PS3:
- Implemented as a misc character device driver
- Uses a fixed 256 KiB buffer allocated from boot memory as the hypervisor
requires the writing of aligned 256 KiB blocks
CC: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
v3:
- Cleanup #includes
- Allow to disable ps3flash (and the preallocated 256 KiB buffer) using
`ps3flash=off'
- Move selection of write/read strings to error path
- Rename and move ps3stor_interrupt() to ps3flash_interrupt()
- Pass the interrupt handler to ps3stor_setup()
- Reset ps3flash_priv(dev) to NULL during cleanup
v2:
- Don't use `default y' in Kconfig
- #include <linux/uaccess.h> instead of <asm/uaccess.h>
- Set up sysfs links between misc character device and PS3 system device:
o /sys/class/misc/ps3flash/device -> ../../../devices/ps3_system/sb_01
o /sys/devices/ps3_system/sb_01/misc:ps3flash -> ../../../class/misc/ps3flash
arch/powerpc/platforms/ps3/Kconfig | 15 +
drivers/char/Makefile | 2
drivers/char/ps3flash.c | 429 +++++++++++++++++++++++++++++++++++++
3 files changed, 446 insertions(+)
--- a/arch/powerpc/platforms/ps3/Kconfig
+++ b/arch/powerpc/platforms/ps3/Kconfig
@@ -123,4 +123,19 @@ config PS3_ROM
In general, all users will say Y or M.
Also make sure to say Y or M to "SCSI CDROM support" later.
+config PS3_FLASH
+ tristate "PS3 FLASH ROM Storage Driver"
+ depends on PPC_PS3
+ select PS3_STORAGE
+ help
+ Include support for the PS3 FLASH ROM Storage.
+
+ This support is required to access the PS3 FLASH ROM, which
+ contains the boot loader and some boot options.
+ In general, all users will say Y or M.
+
+ As this driver needs a fixed buffer of 256 KiB of memory, it can
+ be disabled on the kernel command line using "ps3flash=off", to
+ not allocate this fixed buffer.
+
endmenu
--- a/drivers/char/Makefile
+++ b/drivers/char/Makefile
@@ -104,6 +104,8 @@ obj-$(CONFIG_IPMI_HANDLER) += ipmi/
obj-$(CONFIG_HANGCHECK_TIMER) += hangcheck-timer.o
obj-$(CONFIG_TCG_TPM) += tpm/
+obj-$(CONFIG_PS3_FLASH) += ps3flash.o
+
# Files generated that shall be removed upon make clean
clean-files := consolemap_deftbl.c defkeymap.c
--- /dev/null
+++ b/drivers/char/ps3flash.c
@@ -0,0 +1,429 @@
+/*
+ * PS3 FLASH ROM Storage Driver
+ *
+ * Copyright (C) 2007 Sony Computer Entertainment Inc.
+ * Copyright 2007 Sony Corp.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include <linux/fs.h>
+#include <linux/miscdevice.h>
+#include <linux/uaccess.h>
+
+#include <asm/lv1call.h>
+#include <asm/ps3stor.h>
+
+
+#define DEVICE_NAME "ps3flash"
+
+#define FLASH_BLOCK_SIZE (256*1024)
+
+
+struct ps3flash_private {
+ struct mutex mutex; /* Bounce buffer mutex */
+};
+#define ps3flash_priv(dev) ((dev)->sbd.core.driver_data)
+
+static struct ps3_storage_device *ps3flash_dev;
+
+static ssize_t ps3flash_read_write_sectors(struct ps3_storage_device *dev,
+ u64 lpar, u64 start_sector,
+ u64 sectors, int write)
+{
+ u64 res = ps3stor_read_write_sectors(dev, lpar, start_sector, sectors,
+ write);
+ if (res) {
+ dev_err(&dev->sbd.core, "%s:%u: %s failed 0x%lx\n", __func__,
+ __LINE__, write ? "write" : "read", res);
+ return -EIO;
+ }
+ return sectors;
+}
+
+static ssize_t ps3flash_read_sectors(struct ps3_storage_device *dev,
+ u64 start_sector, u64 sectors,
+ unsigned int sector_offset)
+{
+ u64 max_sectors, lpar;
+
+ max_sectors = dev->bounce_size / dev->blk_size;
+ if (sectors > max_sectors) {
+ dev_dbg(&dev->sbd.core, "%s:%u Limiting sectors to %lu\n",
+ __func__, __LINE__, max_sectors);
+ sectors = max_sectors;
+ }
+
+ lpar = dev->bounce_lpar + sector_offset * dev->blk_size;
+ return ps3flash_read_write_sectors(dev, lpar, start_sector, sectors,
+ 0);
+}
+
+static ssize_t ps3flash_write_chunk(struct ps3_storage_device *dev,
+ u64 start_sector)
+{
+ u64 sectors = dev->bounce_size / dev->blk_size;
+ return ps3flash_read_write_sectors(dev, dev->bounce_lpar, start_sector,
+ sectors, 1);
+}
+
+static loff_t ps3flash_llseek(struct file *file, loff_t offset, int origin)
+{
+ struct ps3_storage_device *dev = ps3flash_dev;
+ u64 size = dev->regions[dev->region_idx].size*dev->blk_size;
+
+ switch (origin) {
+ case 1:
+ offset += file->f_pos;
+ break;
+ case 2:
+ offset += size;
+ break;
+ }
+ if (offset < 0)
+ return -EINVAL;
+
+ file->f_pos = offset;
+ return file->f_pos;
+}
+
+static ssize_t ps3flash_read(struct file *file, char __user *buf, size_t count,
+ loff_t *pos)
+{
+ struct ps3_storage_device *dev = ps3flash_dev;
+ struct ps3flash_private *priv = ps3flash_priv(dev);
+ u64 size, start_sector, end_sector, offset;
+ ssize_t sectors_read;
+ size_t remaining, n;
+
+ dev_dbg(&dev->sbd.core,
+ "%s:%u: Reading %zu bytes at position %lld to user 0x%p\n",
+ __func__, __LINE__, count, *pos, buf);
+
+ size = dev->regions[dev->region_idx].size*dev->blk_size;
+ if (*pos >= size || !count)
+ return 0;
+
+ if (*pos+count > size) {
+ dev_dbg(&dev->sbd.core,
+ "%s:%u Truncating count from %zu to %llu\n", __func__,
+ __LINE__, count, size - *pos);
+ count = size - *pos;
+ }
+
+ start_sector = do_div_llr(*pos, dev->blk_size, &offset);
+ end_sector = DIV_ROUND_UP(*pos+count, dev->blk_size);
+
+ remaining = count;
+ do {
+ mutex_lock(&priv->mutex);
+
+ sectors_read = ps3flash_read_sectors(dev, start_sector,
+ end_sector-start_sector,
+ 0);
+ if (sectors_read < 0) {
+ mutex_unlock(&priv->mutex);
+ return sectors_read;
+ }
+
+ n = min(remaining, sectors_read*dev->blk_size-offset);
+ dev_dbg(&dev->sbd.core,
+ "%s:%u: copy %lu bytes from 0x%p to user 0x%p\n",
+ __func__, __LINE__, n, dev->bounce_buf+offset, buf);
+ if (copy_to_user(buf, dev->bounce_buf+offset, n)) {
+ mutex_unlock(&priv->mutex);
+ return -EFAULT;
+ }
+
+ mutex_unlock(&priv->mutex);
+
+ *pos += n;
+ buf += n;
+ remaining -= n;
+ start_sector += sectors_read;
+ offset = 0;
+ } while (remaining > 0);
+
+ return count;
+}
+
+static ssize_t ps3flash_write(struct file *file, const char __user *buf,
+ size_t count, loff_t *pos)
+{
+ struct ps3_storage_device *dev = ps3flash_dev;
+ struct ps3flash_private *priv = ps3flash_priv(dev);
+ u64 size, chunk_sectors, start_write_sector, end_write_sector,
+ end_read_sector, start_read_sector, head, tail, offset;
+ ssize_t res;
+ size_t remaining, n;
+ unsigned int sec_off;
+
+ dev_dbg(&dev->sbd.core,
+ "%s:%u: Writing %zu bytes at position %lld from user 0x%p\n",
+ __func__, __LINE__, count, *pos, buf);
+
+ size = dev->regions[dev->region_idx].size*dev->blk_size;
+ if (*pos >= size || !count)
+ return 0;
+
+ if (*pos+count > size) {
+ dev_dbg(&dev->sbd.core,
+ "%s:%u Truncating count from %zu to %llu\n", __func__,
+ __LINE__, count, size - *pos);
+ count = size - *pos;
+ }
+
+ chunk_sectors = dev->bounce_size / dev->blk_size;
+
+ start_write_sector = do_div_llr(*pos, dev->bounce_size, &offset) *
+ chunk_sectors;
+ end_write_sector = DIV_ROUND_UP(*pos+count, dev->bounce_size) *
+ chunk_sectors;
+
+ end_read_sector = DIV_ROUND_UP(*pos, dev->blk_size);
+ start_read_sector = (*pos+count) / dev->blk_size;
+
+ /*
+ * As we have to write in 256 KiB chunks, while we can read in blk_size
+ * (usually 512 bytes) chunks, we perform the following steps:
+ * 1. Read from start_write_sector to end_read_sector ("head")
+ * 2. Read from start_read_sector to end_write_sector ("tail")
+ * 3. Copy data to buffer
+ * 4. Write from start_write_sector to end_write_sector
+ * All of this is complicated by using only one 256 KiB bounce buffer.
+ */
+
+ head = end_read_sector-start_write_sector;
+ tail = end_write_sector-start_read_sector;
+
+ remaining = count;
+ do {
+ mutex_lock(&priv->mutex);
+
+ if (end_read_sector >= start_read_sector) {
+ /* Merge head and tail */
+ dev_dbg(&dev->sbd.core,
+ "Merged head and tail: %lu sectors at %lu\n",
+ chunk_sectors, start_write_sector);
+ res = ps3flash_read_sectors(dev, start_write_sector,
+ chunk_sectors, 0);
+ if (res < 0)
+ goto fail;
+ } else {
+ if (head) {
+ /* Read head */
+ dev_dbg(&dev->sbd.core,
+ "head: %lu sectors at %lu\n", head,
+ start_write_sector);
+ res = ps3flash_read_sectors(dev,
+ start_write_sector,
+ head, 0);
+ if (res < 0)
+ goto fail;
+ }
+ if (start_read_sector <
+ start_write_sector+chunk_sectors) {
+ /* Read tail */
+ dev_dbg(&dev->sbd.core,
+ "tail: %lu sectors at %lu\n", tail,
+ start_read_sector);
+ sec_off = start_read_sector-start_write_sector;
+ res = ps3flash_read_sectors(dev,
+ start_read_sector,
+ tail, sec_off);
+ if (res < 0)
+ goto fail;
+ }
+ }
+
+ n = min(remaining, dev->bounce_size-offset);
+ dev_dbg(&dev->sbd.core,
+ "%s:%u: copy %lu bytes from user 0x%p to 0x%p\n",
+ __func__, __LINE__, n, buf, dev->bounce_buf+offset);
+ if (copy_from_user(dev->bounce_buf+offset, buf, n)) {
+ res = -EFAULT;
+ goto fail;
+ }
+
+ res = ps3flash_write_chunk(dev, start_write_sector);
+ if (res < 0)
+ goto fail;
+
+ mutex_unlock(&priv->mutex);
+
+ *pos += n;
+ buf += n;
+ remaining -= n;
+ start_write_sector += chunk_sectors;
+ head = 0;
+ offset = 0;
+ } while (remaining > 0);
+
+ return count;
+
+fail:
+ mutex_unlock(&priv->mutex);
+ return res;
+}
+
+
+static irqreturn_t ps3flash_interrupt(int irq, void *data)
+{
+ struct ps3_storage_device *dev = data;
+ int res;
+ u64 tag, status;
+
+ res = lv1_storage_get_async_status(dev->sbd.dev_id, &tag, &status);
+
+ if (tag != dev->tag)
+ dev_err(&dev->sbd.core,
+ "%s:%u: tag mismatch, got %lx, expected %lx\n",
+ __func__, __LINE__, tag, dev->tag);
+
+ if (res) {
+ dev_err(&dev->sbd.core, "%s:%u: res=%d status=0x%lx\n",
+ __func__, __LINE__, res, status);
+ } else {
+ dev->lv1_status = status;
+ complete(&dev->done);
+ }
+ return IRQ_HANDLED;
+}
+
+
+static const struct file_operations ps3flash_fops = {
+ .owner = THIS_MODULE,
+ .llseek = ps3flash_llseek,
+ .read = ps3flash_read,
+ .write = ps3flash_write,
+};
+
+static struct miscdevice ps3flash_misc = {
+ .minor = MISC_DYNAMIC_MINOR,
+ .name = DEVICE_NAME,
+ .fops = &ps3flash_fops,
+};
+
+static int __devinit ps3flash_probe(struct ps3_system_bus_device *_dev)
+{
+ struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core);
+ struct ps3flash_private *priv;
+ int error;
+ unsigned long tmp;
+
+ tmp = dev->regions[dev->region_idx].start*dev->blk_size;
+ if (tmp % FLASH_BLOCK_SIZE) {
+ dev_err(&dev->sbd.core,
+ "%s:%u region start %lu is not aligned\n", __func__,
+ __LINE__, tmp);
+ return -EINVAL;
+ }
+ tmp = dev->regions[dev->region_idx].size*dev->blk_size;
+ if (tmp % FLASH_BLOCK_SIZE) {
+ dev_err(&dev->sbd.core,
+ "%s:%u region size %lu is not aligned\n", __func__,
+ __LINE__, tmp);
+ return -EINVAL;
+ }
+
+ /* use static buffer, kmalloc cannot allocate 256 KiB */
+ if (!ps3flash_bounce_buffer.address)
+ return -ENODEV;
+
+ if (ps3flash_dev) {
+ dev_err(&dev->sbd.core,
+ "Only one FLASH device is supported\n");
+ return -EBUSY;
+ }
+
+ ps3flash_dev = dev;
+
+ priv = kzalloc(sizeof(*priv), GFP_KERNEL);
+ if (!priv) {
+ error = -ENOMEM;
+ goto fail;
+ }
+
+ ps3flash_priv(dev) = priv;
+ mutex_init(&priv->mutex);
+
+ dev->bounce_size = ps3flash_bounce_buffer.size;
+ dev->bounce_buf = ps3flash_bounce_buffer.address;
+
+ error = ps3stor_setup(dev, ps3flash_interrupt);
+ if (error)
+ goto fail_free_priv;
+
+ ps3flash_misc.parent = &dev->sbd.core;
+ error = misc_register(&ps3flash_misc);
+ if (error) {
+ dev_err(&dev->sbd.core, "%s:%u: misc_register failed %d\n",
+ __func__, __LINE__, error);
+ goto fail_teardown;
+ }
+
+ dev_info(&dev->sbd.core, "%s:%u: registered misc device %d\n",
+ __func__, __LINE__, ps3flash_misc.minor);
+ return 0;
+
+fail_teardown:
+ ps3stor_teardown(dev);
+fail_free_priv:
+ kfree(priv);
+ ps3flash_priv(dev) = NULL;
+fail:
+ ps3flash_dev = NULL;
+ return error;
+}
+
+static int ps3flash_remove(struct ps3_system_bus_device *_dev)
+{
+ struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core);
+
+ misc_deregister(&ps3flash_misc);
+ ps3stor_teardown(dev);
+ kfree(ps3flash_priv(dev));
+ ps3flash_priv(dev) = NULL;
+ ps3flash_dev = NULL;
+ return 0;
+}
+
+
+static struct ps3_system_bus_driver ps3flash = {
+ .match_id = PS3_MATCH_ID_STOR_FLASH,
+ .core.name = DEVICE_NAME,
+ .core.owner = THIS_MODULE,
+ .probe = ps3flash_probe,
+ .remove = ps3flash_remove,
+ .shutdown = ps3flash_remove,
+};
+
+
+static int __init ps3flash_init(void)
+{
+ return ps3_system_bus_driver_register(&ps3flash);
+}
+
+static void __exit ps3flash_exit(void)
+{
+ ps3_system_bus_driver_unregister(&ps3flash);
+}
+
+module_init(ps3flash_init);
+module_exit(ps3flash_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("PS3 FLASH ROM Storage Driver");
+MODULE_AUTHOR("Sony Corporation");
+MODULE_ALIAS(PS3_MODULE_ALIAS_STOR_FLASH);
--
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/
Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox