diff --git a/[refs] b/[refs] index b737f57a0687..bd6d2f91ae57 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 80cbd911ca25535f6bb66bbcbb98950ec328eb40 +refs/heads/master: 1c016b2c728b2ecbdd4088bd42e556fd29065cc5 diff --git a/trunk/Documentation/00-INDEX b/trunk/Documentation/00-INDEX index c3014df066c4..299615d821ac 100644 --- a/trunk/Documentation/00-INDEX +++ b/trunk/Documentation/00-INDEX @@ -262,8 +262,6 @@ mtrr.txt - how to use PPro Memory Type Range Registers to increase performance. mutex-design.txt - info on the generic mutex subsystem. -namespaces/ - - directory with various information about namespaces nbd.txt - info on a TCP implementation of a network block device. netlabel/ diff --git a/trunk/Documentation/DocBook/Makefile b/trunk/Documentation/DocBook/Makefile index 4953bc258729..054a7ecf64c6 100644 --- a/trunk/Documentation/DocBook/Makefile +++ b/trunk/Documentation/DocBook/Makefile @@ -11,7 +11,7 @@ DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \ procfs-guide.xml writing_usb_driver.xml \ kernel-api.xml filesystems.xml lsm.xml usb.xml \ gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \ - genericirq.xml s390-drivers.xml uio-howto.xml + genericirq.xml s390-drivers.xml ### # The build process is as follows (targets): diff --git a/trunk/Documentation/DocBook/uio-howto.tmpl b/trunk/Documentation/DocBook/uio-howto.tmpl index fdd7f4f887b7..c119484258b8 100644 --- a/trunk/Documentation/DocBook/uio-howto.tmpl +++ b/trunk/Documentation/DocBook/uio-howto.tmpl @@ -29,12 +29,6 @@ - - 0.4 - 2007-11-26 - hjk - Removed section about uio_dummy. - 0.3 2007-04-29 @@ -100,26 +94,6 @@ interested in translating it, please email me user space. This simplifies development and reduces the risk of serious bugs within a kernel module. - - Please note that UIO is not an universal driver interface. Devices - that are already handled well by other kernel subsystems (like - networking or serial or USB) are no candidates for an UIO driver. - Hardware that is ideally suited for an UIO driver fulfills all of - the following: - - - - The device has memory that can be mapped. The device can be - controlled completely by writing to this memory. - - - The device usually generates interrupts. - - - The device does not fit into one of the standard kernel - subsystems. - - @@ -200,9 +174,8 @@ interested in translating it, please email me For cards that don't generate interrupts but need to be polled, there is the possibility to set up a timer that triggers the interrupt handler at configurable time intervals. - This interrupt simulation is done by calling - uio_event_notify() - from the timer's event handler. + See drivers/uio/uio_dummy.c for an + example of this technique. @@ -290,11 +263,63 @@ offset = N * getpagesize(); + + +Using uio_dummy + + Well, there is no real use for uio_dummy. Its only purpose is + to test most parts of the UIO system (everything except + hardware interrupts), and to serve as an example for the + kernel module that you will have to write yourself. + + + +What uio_dummy does + + The kernel module uio_dummy.ko creates a + device that uses a timer to generate periodic interrupts. The + interrupt handler does nothing but increment a counter. The + driver adds two custom attributes, count + and freq, that appear under + /sys/devices/platform/uio_dummy/. + + + + The attribute count can be read and + written. The associated file + /sys/devices/platform/uio_dummy/count + appears as a normal text file and contains the total number of + timer interrupts. If you look at it (e.g. using + cat), you'll notice it is slowly counting + up. + + + + The attribute freq can be read and written. + The content of + /sys/devices/platform/uio_dummy/freq + represents the number of system timer ticks between two timer + interrupts. The default value of freq is + the value of the kernel variable HZ, which + gives you an interval of one second. Lower values will + increase the frequency. Try the following: + + +cd /sys/devices/platform/uio_dummy/ +echo 100 > freq + + + Use cat count to see how the interrupt + frequency changes. + + + + Writing your own kernel module - Please have a look at uio_cif.c as an + Please have a look at uio_dummy.c as an example. The following paragraphs explain the different sections of this file. @@ -329,8 +354,9 @@ See the description below for details. interrupt, it's your modules task to determine the irq number during initialization. If you don't have a hardware generated interrupt but want to trigger the interrupt handler in some other way, set -irq to UIO_IRQ_CUSTOM. -If you had no interrupt at all, you could set +irq to UIO_IRQ_CUSTOM. The +uio_dummy module does this as it triggers the event mechanism in a timer +routine. If you had no interrupt at all, you could set irq to UIO_IRQ_NONE, though this rarely makes sense. diff --git a/trunk/Documentation/lguest/lguest.c b/trunk/Documentation/lguest/lguest.c index 9b0e322118b5..42008395534d 100644 --- a/trunk/Documentation/lguest/lguest.c +++ b/trunk/Documentation/lguest/lguest.c @@ -1040,11 +1040,6 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs, / getpagesize(); p = get_pages(pages); - /* Initialize the virtqueue */ - vq->next = NULL; - vq->last_avail_idx = 0; - vq->dev = dev; - /* Initialize the configuration. */ vq->config.num = num_descs; vq->config.irq = devices.next_irq++; @@ -1062,6 +1057,9 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs, for (i = &dev->vq; *i; i = &(*i)->next); *i = vq; + /* Link virtqueue back to device. */ + vq->dev = dev; + /* Set the routine to call when the Guest does something to this * virtqueue. */ vq->handle_output = handle_output; @@ -1095,7 +1093,6 @@ static struct device *new_device(const char *name, u16 type, int fd, dev->desc = new_dev_desc(type); dev->handle_input = handle_input; dev->name = name; - dev->vq = NULL; return dev; } diff --git a/trunk/Documentation/namespaces/compatibility-list.txt b/trunk/Documentation/namespaces/compatibility-list.txt deleted file mode 100644 index defc5589bfcd..000000000000 --- a/trunk/Documentation/namespaces/compatibility-list.txt +++ /dev/null @@ -1,39 +0,0 @@ - Namespaces compatibility list - -This document contains the information about the problems user -may have when creating tasks living in different namespaces. - -Here's the summary. This matrix shows the known problems, that -occur when tasks share some namespace (the columns) while living -in different other namespaces (the rows): - - UTS IPC VFS PID User Net -UTS X -IPC X 1 -VFS X -PID 1 1 X -User 2 2 X -Net X - -1. Both the IPC and the PID namespaces provide IDs to address - object inside the kernel. E.g. semaphore with IPCID or - process group with pid. - - In both cases, tasks shouldn't try exposing this ID to some - other task living in a different namespace via a shared filesystem - or IPC shmem/message. The fact is that this ID is only valid - within the namespace it was obtained in and may refer to some - other object in another namespace. - -2. Intentionally, two equal user IDs in different user namespaces - should not be equal from the VFS point of view. In other - words, user 10 in one user namespace shouldn't have the same - access permissions to files, belonging to user 10 in another - namespace. - - The same is true for the IPC namespaces being shared - two users - from different user namespaces should not access the same IPC objects - even having equal UIDs. - - But currently this is not so. - diff --git a/trunk/Documentation/parport-lowlevel.txt b/trunk/Documentation/parport-lowlevel.txt index 120eb20dbb09..265fcdcb8e5f 100644 --- a/trunk/Documentation/parport-lowlevel.txt +++ b/trunk/Documentation/parport-lowlevel.txt @@ -339,10 +339,6 @@ Use this function to register your device driver on a parallel port ('port'). Once you have done that, you will be able to use parport_claim and parport_release in order to use the port. -The ('name') argument is the name of the device that appears in /proc -filesystem. The string must be valid for the whole lifetime of the -device (until parport_unregister_device is called). - This function will register three callbacks into your driver: 'preempt', 'wakeup' and 'irq'. Each of these may be NULL in order to indicate that you do not want a callback. diff --git a/trunk/Documentation/powerpc/booting-without-of.txt b/trunk/Documentation/powerpc/booting-without-of.txt index e9a3cb1d6b06..ac1be25c1e25 100644 --- a/trunk/Documentation/powerpc/booting-without-of.txt +++ b/trunk/Documentation/powerpc/booting-without-of.txt @@ -1645,9 +1645,8 @@ platforms are moved over to use the flattened-device-tree model. MAC addresses passed by the firmware when no information other than indices is available to associate an address with a device. - phy-connection-type : a string naming the controller/PHY interface type, - i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id" (Internal - Delay), "rgmii-txid" (delay on TX only), "rgmii-rxid" (delay on RX only), - "tbi", or "rtbi". + i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id", "tbi", + or "rtbi". Example: ucc@2000 { diff --git a/trunk/Documentation/thinkpad-acpi.txt b/trunk/Documentation/thinkpad-acpi.txt index 10c041ca13c7..ec499265deca 100644 --- a/trunk/Documentation/thinkpad-acpi.txt +++ b/trunk/Documentation/thinkpad-acpi.txt @@ -1,7 +1,7 @@ ThinkPad ACPI Extras Driver - Version 0.17 - October 04th, 2007 + Version 0.16 + August 2nd, 2007 Borislav Deianov Henrique de Moraes Holschuh @@ -923,34 +923,19 @@ sysfs backlight device "thinkpad_screen" This feature allows software control of the LCD brightness on ThinkPad models which don't have a hardware brightness slider. -It has some limitations: the LCD backlight cannot be actually turned on or -off by this interface, and in many ThinkPad models, the "dim while on -battery" functionality will be enabled by the BIOS when this interface is -used, and cannot be controlled. - -On IBM (and some of the earlier Lenovo) ThinkPads, the backlight control -has eight brightness levels, ranging from 0 to 7. Some of the levels -may not be distinct. Later Lenovo models that implement the ACPI -display backlight brightness control methods have 16 levels, ranging -from 0 to 15. - -There are two interfaces to the firmware for direct brightness control, -EC and CMOS. To select which one should be used, use the -brightness_mode module parameter: brightness_mode=1 selects EC mode, -brightness_mode=2 selects CMOS mode, brightness_mode=3 selects both EC -and CMOS. The driver tries to autodetect which interface to use. - -When display backlight brightness controls are available through the -standard ACPI interface, it is best to use it instead of this direct -ThinkPad-specific interface. The driver will disable its native -backlight brightness control interface if it detects that the standard -ACPI interface is available in the ThinkPad. - -The brightness_enable module parameter can be used to control whether -the LCD brightness control feature will be enabled when available. -brightness_enable=0 forces it to be disabled. brightness_enable=1 -forces it to be enabled when available, even if the standard ACPI -interface is also available. +It has some limitations: the LCD backlight cannot be actually turned on or off +by this interface, and in many ThinkPad models, the "dim while on battery" +functionality will be enabled by the BIOS when this interface is used, and +cannot be controlled. + +The backlight control has eight levels, ranging from 0 to 7. Some of the +levels may not be distinct. + +There are two interfaces to the firmware for brightness control, EC and CMOS. +To select which one should be used, use the brightness_mode module parameter: +brightness_mode=1 selects EC mode, brightness_mode=2 selects CMOS mode, +brightness_mode=3 selects both EC and CMOS. The driver tries to autodetect +which interface to use. Procfs notes: @@ -962,11 +947,11 @@ Procfs notes: Sysfs notes: -The interface is implemented through the backlight sysfs class, which is -poorly documented at this time. +The interface is implemented through the backlight sysfs class, which is poorly +documented at this time. -Locate the thinkpad_screen device under /sys/class/backlight, and inside -it there will be the following attributes: +Locate the thinkpad_screen device under /sys/class/backlight, and inside it +there will be the following attributes: max_brightness: Reads the maximum brightness the hardware can be set to. @@ -976,19 +961,17 @@ it there will be the following attributes: Reads what brightness the screen is set to at this instant. brightness: - Writes request the driver to change brightness to the - given value. Reads will tell you what brightness the - driver is trying to set the display to when "power" is set - to zero and the display has not been dimmed by a kernel - power management event. + Writes request the driver to change brightness to the given + value. Reads will tell you what brightness the driver is trying + to set the display to when "power" is set to zero and the display + has not been dimmed by a kernel power management event. power: - power management mode, where 0 is "display on", and 1 to 3 - will dim the display backlight to brightness level 0 - because thinkpad-acpi cannot really turn the backlight - off. Kernel power management events can temporarily - increase the current power management level, i.e. they can - dim the display. + power management mode, where 0 is "display on", and 1 to 3 will + dim the display backlight to brightness level 0 because + thinkpad-acpi cannot really turn the backlight off. Kernel + power management events can temporarily increase the current + power management level, i.e. they can dim the display. Volume control -- /proc/acpi/ibm/volume diff --git a/trunk/Documentation/tty.txt b/trunk/Documentation/tty.txt index 8e65c4498c52..048a8762cfb5 100644 --- a/trunk/Documentation/tty.txt +++ b/trunk/Documentation/tty.txt @@ -132,14 +132,6 @@ set_termios() Notify the tty driver that the device's termios tty->termios. Previous settings should be passed in the "old" argument. - The API is defined such that the driver should return - the actual modes selected. This means that the - driver function is responsible for modifying any - bits in the request it cannot fulfill to indicate - the actual modes being used. A device with no - hardware capability for change (eg a USB dongle or - virtual port) can provide NULL for this method. - throttle() Notify the tty driver that input buffers for the line discipline are close to full, and it should somehow signal that no more characters should be diff --git a/trunk/Documentation/usb/power-management.txt b/trunk/Documentation/usb/power-management.txt index b2fc4d4a9917..97842deec471 100644 --- a/trunk/Documentation/usb/power-management.txt +++ b/trunk/Documentation/usb/power-management.txt @@ -278,14 +278,6 @@ optional. The methods' jobs are quite simple: (although the interfaces will be in the same altsettings as before the suspend). -If the device is disconnected or powered down while it is suspended, -the disconnect method will be called instead of the resume or -reset_resume method. This is also quite likely to happen when -waking up from hibernation, as many systems do not maintain suspend -current to the USB host controllers during hibernation. (It's -possible to work around the hibernation-forces-disconnect problem by -using the USB Persist facility.) - The reset_resume method is used by the USB Persist facility (see Documentation/usb/persist.txt) and it can also be used under certain circumstances when CONFIG_USB_PERSIST is not enabled. Currently, if a diff --git a/trunk/Documentation/x86_64/uefi.txt b/trunk/Documentation/x86_64/uefi.txt deleted file mode 100644 index 91a98edfb588..000000000000 --- a/trunk/Documentation/x86_64/uefi.txt +++ /dev/null @@ -1,29 +0,0 @@ -General note on [U]EFI x86_64 support -------------------------------------- - -The nomenclature EFI and UEFI are used interchangeably in this document. - -Although the tools below are _not_ needed for building the kernel, -the needed bootloader support and associated tools for x86_64 platforms -with EFI firmware and specifications are listed below. - -1. UEFI specification: http://www.uefi.org - -2. Booting Linux kernel on UEFI x86_64 platform requires bootloader - support. Elilo with x86_64 support can be used. - -3. x86_64 platform with EFI/UEFI firmware. - -Mechanics: ---------- -- Build the kernel with the following configuration. - CONFIG_FB_EFI=y - CONFIG_FRAMEBUFFER_CONSOLE=y -- Create a VFAT partition on the disk -- Copy the following to the VFAT partition: - elilo bootloader with x86_64 support, elilo configuration file, - kernel image built in first step and corresponding - initrd. Instructions on building elilo and its dependencies - can be found in the elilo sourceforge project. -- Boot to EFI shell and invoke elilo choosing the kernel image built - in first step. diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index ac425b5b4a40..cad0882754a6 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -323,7 +323,8 @@ S: Maintained ALCATEL SPEEDTOUCH USB DRIVER P: Duncan Sands M: duncan.sands@free.fr -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net W: http://www.linux-usb.org/SpeedTouch/ S: Maintained @@ -1042,7 +1043,7 @@ S: Maintained CIRRUS LOGIC EP93XX OHCI USB HOST DRIVER P: Lennert Buytenhek M: kernel@wantstofly.org -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net S: Maintained CIRRUS LOGIC CS4280/CS461x SOUNDDRIVER @@ -1551,7 +1552,7 @@ S: Maintained FREESCALE HIGHSPEED USB DEVICE DRIVER P: Li Yang M: leoli@freescale.com -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net L: linuxppc-dev@ozlabs.org S: Maintained @@ -1913,8 +1914,10 @@ L: linux1394-devel@lists.sourceforge.net S: Maintained IMS TWINTURBO FRAMEBUFFER DRIVER +P: Paul Mundt +M: lethal@chaoticdreams.org L: linux-fbdev-devel@lists.sourceforge.net (subscribers-only) -S: Orphan +S: Maintained INFINIBAND SUBSYSTEM P: Roland Dreier @@ -2110,14 +2113,6 @@ L: irda-users@lists.sourceforge.net (subscribers-only) W: http://irda.sourceforge.net/ S: Maintained -ISCSI -P: Mike Christie -M: michaelc@cs.wisc.edu -L: open-iscsi@googlegroups.com -W: www.open-iscsi.org -T: git kernel.org:/pub/scm/linux/kernel/mnc/linux-2.6-iscsi.git -S: Maintained - ISAPNP P: Jaroslav Kysela M: perex@perex.cz @@ -2451,7 +2446,7 @@ M68K ON APPLE MACINTOSH P: Joshua Thompson M: funaho@jurai.org W: http://www.mac.linux-m68k.org/ -L: linux-m68k@lists.linux-m68k.org +L: linux-mac68k@mac.linux-m68k.org S: Maintained M68K ON HP9000/300 @@ -3641,12 +3636,18 @@ M: laredo@gnu.org W: http://www.stradis.com/ S: Maintained -SUPERH +SUPERH (sh) P: Paul Mundt M: lethal@linux-sh.org -L: linux-sh@vger.kernel.org +L: linuxsh-dev@lists.sourceforge.net (subscribers-only) +W: http://www.linux-sh.org +S: Maintained + +SUPERH64 (sh64) +P: Paul Mundt +M: lethal@linux-sh.org +L: linuxsh-shmedia-dev@lists.sourceforge.net W: http://www.linux-sh.org -T: git kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6.git S: Maintained SUN3/3X @@ -3732,7 +3733,7 @@ S: Maintained TLAN NETWORK DRIVER P: Samuel Chessman M: chessman@tux.org -L: tlan-devel@lists.sourceforge.net (subscribers-only) +L: tlan-devel@lists.sourceforge.net W: http://sourceforge.net/projects/tlan/ S: Maintained @@ -3817,20 +3818,22 @@ S: Maintained USB ACM DRIVER P: Oliver Neukum M: oliver@neukum.name -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Maintained USB BLOCK DRIVER (UB ub) P: Pete Zaitcev M: zaitcev@redhat.com L: linux-kernel@vger.kernel.org -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net S: Supported USB CDC ETHERNET DRIVER P: Greg Kroah-Hartman M: greg@kroah.com -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Maintained W: http://www.kroah.com/linux-usb/ @@ -3844,13 +3847,13 @@ S: Maintained USB EHCI DRIVER P: David Brownell M: dbrownell@users.sourceforge.net -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net S: Odd Fixes USB ET61X[12]51 DRIVER P: Luca Risolia M: luca.risolia@studio.unibo.it -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net L: video4linux-list@redhat.com W: http://www.linux-projects.org S: Maintained @@ -3858,33 +3861,41 @@ S: Maintained USB GADGET/PERIPHERAL SUBSYSTEM P: David Brownell M: dbrownell@users.sourceforge.net -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net W: http://www.linux-usb.org/gadget S: Maintained USB HID/HIDBP DRIVERS (USB KEYBOARDS, MICE, REMOTE CONTROLS, ...) P: Jiri Kosina M: jkosina@suse.cz -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net T: git kernel.org:/pub/scm/linux/kernel/git/jikos/hid.git S: Maintained +USB HUB DRIVER +P: Johannes Erdfelt +M: johannes@erdfelt.com +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net +S: Maintained + USB ISP116X DRIVER P: Olav Kongas M: ok@artecdesign.ee -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net S: Maintained USB KAWASAKI LSI DRIVER P: Oliver Neukum M: oliver@neukum.name -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Maintained USB MASS STORAGE DRIVER P: Matthew Dharm M: mdharm-usb@one-eyed-alien.net -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net L: usb-storage@lists.one-eyed-alien.net S: Maintained W: http://www.one-eyed-alien.net/~mdharm/linux-usb/ @@ -3892,26 +3903,28 @@ W: http://www.one-eyed-alien.net/~mdharm/linux-usb/ USB OHCI DRIVER P: David Brownell M: dbrownell@users.sourceforge.net -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Odd Fixes USB OPTION-CARD DRIVER P: Matthias Urlichs M: smurf@smurf.noris.de -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net S: Maintained USB OV511 DRIVER P: Mark McClelland M: mmcclell@bigfoot.com -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net W: http://alpha.dyndns.org/ov511/ S: Maintained USB PEGASUS DRIVER P: Petko Manolov M: petkan@users.sourceforge.net -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net L: netdev@vger.kernel.org W: http://pegasus2.sourceforge.net/ S: Maintained @@ -3919,13 +3932,14 @@ S: Maintained USB PRINTER DRIVER (usblp) P: Pete Zaitcev M: zaitcev@redhat.com -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Supported USB RTL8150 DRIVER P: Petko Manolov M: petkan@users.sourceforge.net -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net L: netdev@vger.kernel.org W: http://pegasus2.sourceforge.net/ S: Maintained @@ -3933,7 +3947,8 @@ S: Maintained USB SE401 DRIVER P: Jeroen Vreeken M: pe1rxq@amsat.org -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net W: http://www.chello.nl/~j.vreeken/se401/ S: Maintained @@ -3947,59 +3962,72 @@ USB SERIAL DIGI ACCELEPORT DRIVER P: Peter Berger and Al Borchers M: pberger@brimson.com M: alborchers@steinerpoint.com -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Maintained USB SERIAL DRIVER P: Greg Kroah-Hartman M: gregkh@suse.de -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Supported USB SERIAL BELKIN F5U103 DRIVER P: William Greathouse M: wgreathouse@smva.com -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Maintained USB SERIAL CYPRESS M8 DRIVER P: Lonnie Mendez M: dignome@gmail.com -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Maintained W: http://geocities.com/i0xox0i W: http://firstlight.net/cvs +USB SERIAL CYBERJACK PINPAD/E-COM DRIVER +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net +S: Maintained + USB AUERSWALD DRIVER P: Wolfgang Muees M: wolfgang@iksw-muees.de -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Maintained USB SERIAL EMPEG EMPEG-CAR MARK I/II DRIVER P: Gary Brubaker M: xavyer@ix.netcom.com -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Maintained USB SERIAL KEYSPAN DRIVER P: Greg Kroah-Hartman M: greg@kroah.com -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net W: http://www.kroah.com/linux/ S: Maintained USB SERIAL WHITEHEAT DRIVER P: Support Department M: support@connecttech.com -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net W: http://www.connecttech.com S: Supported USB SN9C1xx DRIVER P: Luca Risolia M: luca.risolia@studio.unibo.it -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net L: video4linux-list@redhat.com W: http://www.linux-projects.org S: Maintained @@ -4007,7 +4035,8 @@ S: Maintained USB SUBSYSTEM P: Greg Kroah-Hartman M: gregkh@suse.de -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net W: http://www.linux-usb.org T: quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/ S: Supported @@ -4015,7 +4044,8 @@ S: Supported USB UHCI DRIVER P: Alan Stern M: stern@rowland.harvard.edu -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net S: Maintained USB "USBNET" DRIVER FRAMEWORK @@ -4028,7 +4058,7 @@ S: Maintained USB W996[87]CF DRIVER P: Luca Risolia M: luca.risolia@studio.unibo.it -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net L: video4linux-list@redhat.com W: http://www.linux-projects.org S: Maintained @@ -4036,7 +4066,7 @@ S: Maintained USB ZC0301 DRIVER P: Luca Risolia M: luca.risolia@studio.unibo.it -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net L: video4linux-list@redhat.com W: http://www.linux-projects.org S: Maintained @@ -4044,14 +4074,15 @@ S: Maintained USB ZD1201 DRIVER P: Jeroen Vreeken M: pe1rxq@amsat.org -L: linux-usb@vger.kernel.org +L: linux-usb-users@lists.sourceforge.net +L: linux-usb-devel@lists.sourceforge.net W: http://linux-lc100020.sourceforge.net S: Maintained USB ZR364XX DRIVER P: Antoine Jacquet M: royale@zerezo.com -L: linux-usb@vger.kernel.org +L: linux-usb-devel@lists.sourceforge.net L: video4linux-list@redhat.com W: http://royale.zerezo.com/zr364xx/ S: Maintained diff --git a/trunk/arch/alpha/kernel/pci-noop.c b/trunk/arch/alpha/kernel/pci-noop.c index 468b76ce66a1..174b729c504b 100644 --- a/trunk/arch/alpha/kernel/pci-noop.c +++ b/trunk/arch/alpha/kernel/pci-noop.c @@ -12,7 +12,6 @@ #include #include #include -#include #include "proto.h" @@ -173,19 +172,18 @@ dma_alloc_coherent(struct device *dev, size_t size, EXPORT_SYMBOL(dma_alloc_coherent); int -dma_map_sg(struct device *dev, struct scatterlist *sgl, int nents, +dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction) { int i; - struct scatterlist *sg; - for_each_sg(sgl, sg, nents, i) { + for (i = 0; i < nents; i++ ) { void *va; - BUG_ON(!sg_page(sg)); - va = sg_virt(sg); - sg_dma_address(sg) = (dma_addr_t)virt_to_bus(va); - sg_dma_len(sg) = sg->length; + BUG_ON(!sg[i].page); + va = page_address(sg[i].page) + sg[i].offset; + sg_dma_address(sg + i) = (dma_addr_t)virt_to_bus(va); + sg_dma_len(sg + i) = sg[i].length; } return nents; diff --git a/trunk/arch/arm/mach-imx/irq.c b/trunk/arch/arm/mach-imx/irq.c index 0791b56caecc..a7465db84893 100644 --- a/trunk/arch/arm/mach-imx/irq.c +++ b/trunk/arch/arm/mach-imx/irq.c @@ -43,12 +43,46 @@ * */ -#define INTENNUM_OFF 0x8 -#define INTDISNUM_OFF 0xC +#define INTCNTL_OFF 0x00 +#define NIMASK_OFF 0x04 +#define INTENNUM_OFF 0x08 +#define INTDISNUM_OFF 0x0C +#define INTENABLEH_OFF 0x10 +#define INTENABLEL_OFF 0x14 +#define INTTYPEH_OFF 0x18 +#define INTTYPEL_OFF 0x1C +#define NIPRIORITY_OFF(x) (0x20+4*(7-(x))) +#define NIVECSR_OFF 0x40 +#define FIVECSR_OFF 0x44 +#define INTSRCH_OFF 0x48 +#define INTSRCL_OFF 0x4C +#define INTFRCH_OFF 0x50 +#define INTFRCL_OFF 0x54 +#define NIPNDH_OFF 0x58 +#define NIPNDL_OFF 0x5C +#define FIPNDH_OFF 0x60 +#define FIPNDL_OFF 0x64 #define VA_AITC_BASE IO_ADDRESS(IMX_AITC_BASE) -#define IMX_AITC_INTDISNUM (VA_AITC_BASE + INTDISNUM_OFF) +#define IMX_AITC_INTCNTL (VA_AITC_BASE + INTCNTL_OFF) +#define IMX_AITC_NIMASK (VA_AITC_BASE + NIMASK_OFF) #define IMX_AITC_INTENNUM (VA_AITC_BASE + INTENNUM_OFF) +#define IMX_AITC_INTDISNUM (VA_AITC_BASE + INTDISNUM_OFF) +#define IMX_AITC_INTENABLEH (VA_AITC_BASE + INTENABLEH_OFF) +#define IMX_AITC_INTENABLEL (VA_AITC_BASE + INTENABLEL_OFF) +#define IMX_AITC_INTTYPEH (VA_AITC_BASE + INTTYPEH_OFF) +#define IMX_AITC_INTTYPEL (VA_AITC_BASE + INTTYPEL_OFF) +#define IMX_AITC_NIPRIORITY(x) (VA_AITC_BASE + NIPRIORITY_OFF(x)) +#define IMX_AITC_NIVECSR (VA_AITC_BASE + NIVECSR_OFF) +#define IMX_AITC_FIVECSR (VA_AITC_BASE + FIVECSR_OFF) +#define IMX_AITC_INTSRCH (VA_AITC_BASE + INTSRCH_OFF) +#define IMX_AITC_INTSRCL (VA_AITC_BASE + INTSRCL_OFF) +#define IMX_AITC_INTFRCH (VA_AITC_BASE + INTFRCH_OFF) +#define IMX_AITC_INTFRCL (VA_AITC_BASE + INTFRCL_OFF) +#define IMX_AITC_NIPNDH (VA_AITC_BASE + NIPNDH_OFF) +#define IMX_AITC_NIPNDL (VA_AITC_BASE + NIPNDL_OFF) +#define IMX_AITC_FIPNDH (VA_AITC_BASE + FIPNDH_OFF) +#define IMX_AITC_FIPNDL (VA_AITC_BASE + FIPNDL_OFF) #if 0 #define DEBUG_IRQ(fmt...) printk(fmt) @@ -222,7 +256,12 @@ imx_init_irq(void) DEBUG_IRQ("Initializing imx interrupts\n"); - /* Mask all interrupts initially */ + /* Disable all interrupts initially. */ + /* Do not rely on the bootloader. */ + __raw_writel(0, IMX_AITC_INTENABLEH); + __raw_writel(0, IMX_AITC_INTENABLEL); + + /* Mask all GPIO interrupts as well */ IMR(0) = 0; IMR(1) = 0; IMR(2) = 0; @@ -245,6 +284,6 @@ imx_init_irq(void) set_irq_chained_handler(GPIO_INT_PORTC, imx_gpioc_demux_handler); set_irq_chained_handler(GPIO_INT_PORTD, imx_gpiod_demux_handler); - /* Disable all interrupts initially. */ - /* In IMX this is done in the bootloader. */ + /* Release masking of interrupts according to priority */ + __raw_writel(-1, IMX_AITC_NIMASK); } diff --git a/trunk/arch/blackfin/Kconfig b/trunk/arch/blackfin/Kconfig index 2a3a7ea5958c..9f9de3e95826 100644 --- a/trunk/arch/blackfin/Kconfig +++ b/trunk/arch/blackfin/Kconfig @@ -3,7 +3,7 @@ # see Documentation/kbuild/kconfig-language.txt. # -mainmenu "Blackfin Kernel Configuration" +mainmenu "uClinux/Blackfin (w/o MMU) Kernel Configuration" config MMU bool @@ -29,6 +29,10 @@ config ZONE_DMA bool default y +config BFIN + bool + default y + config SEMAPHORE_SLEEPERS bool default y @@ -46,7 +50,7 @@ config GENERIC_HARDIRQS default y config GENERIC_IRQ_PROBE - bool + bool default y config GENERIC_TIME @@ -65,6 +69,11 @@ config GENERIC_CALIBRATE_DELAY bool default y +config IRQCHIP_DEMUX_GPIO + bool + depends on (BF52x || BF53x || BF561 || BF54x) + default y + source "init/Kconfig" source "kernel/Kconfig.preempt" @@ -131,11 +140,6 @@ config BF544 help BF544 Processor Support. -config BF547 - bool "BF547" - help - BF547 Processor Support. - config BF548 bool "BF548" help @@ -162,11 +166,11 @@ choice config BF_REV_0_0 bool "0.0" - depends on (BF52x || BF54x) + depends on (BF549 || BF527) config BF_REV_0_1 - bool "0.1" - depends on (BF52x || BF54x) + bool "0.2" + depends on (BF549 || BF527) config BF_REV_0_2 bool "0.2" @@ -204,7 +208,7 @@ config BF53x config BF54x bool - depends on (BF542 || BF544 || BF547 || BF548 || BF549) + depends on (BF542 || BF544 || BF548 || BF549) default y config BFIN_DUAL_CORE @@ -217,6 +221,95 @@ config BFIN_SINGLE_CORE depends on !BFIN_DUAL_CORE default y +choice + prompt "System type" + default BFIN533_STAMP + help + Do NOT change the board here. Please use the top level + configuration to ensure that all the other settings are + correct. + +config BFIN527_EZKIT + bool "BF527-EZKIT" + depends on (BF522 || BF525 || BF527) + help + BF533-EZKIT-LITE board Support. + +config BFIN533_EZKIT + bool "BF533-EZKIT" + depends on (BF533 || BF532 || BF531) + help + BF533-EZKIT-LITE board Support. + +config BFIN533_STAMP + bool "BF533-STAMP" + depends on (BF533 || BF532 || BF531) + help + BF533-STAMP board Support. + +config BFIN537_STAMP + bool "BF537-STAMP" + depends on (BF537 || BF536 || BF534) + help + BF537-STAMP board Support. + +config BFIN533_BLUETECHNIX_CM + bool "Bluetechnix CM-BF533" + depends on (BF533) + help + CM-BF533 support for EVAL- and DEV-Board. + +config BFIN537_BLUETECHNIX_CM + bool "Bluetechnix CM-BF537" + depends on (BF537) + help + CM-BF537 support for EVAL- and DEV-Board. + +config BFIN548_EZKIT + bool "BF548-EZKIT" + depends on (BF548 || BF549) + help + BFIN548-EZKIT board Support. + +config BFIN561_BLUETECHNIX_CM + bool "Bluetechnix CM-BF561" + depends on (BF561) + help + CM-BF561 support for EVAL- and DEV-Board. + +config BFIN561_EZKIT + bool "BF561-EZKIT" + depends on (BF561) + help + BF561-EZKIT-LITE board Support. + +config BFIN561_TEPLA + bool "BF561-TEPLA" + depends on (BF561) + help + BF561-TEPLA board Support. + +config PNAV10 + bool "PNAV 1.0 board" + depends on (BF537) + help + PNAV 1.0 board Support. + +config H8606_HVSISTEMAS + bool "HV Sistemas H8606" + depends on (BF532) + help + HV Sistemas H8606 board support. + +config GENERIC_BOARD + bool "Custom" + depends on (BF537 || BF536 \ + || BF534 || BF561 || BF535 || BF533 || BF532 || BF531) + help + GENERIC or Custom board Support. + +endchoice + config MEM_GENERIC_BOARD bool depends on GENERIC_BOARD @@ -296,9 +389,9 @@ config BFIN_KERNEL_CLOCK configuration. config PLL_BYPASS - bool "Bypass PLL" - depends on BFIN_KERNEL_CLOCK - default n + bool "Bypass PLL" + depends on BFIN_KERNEL_CLOCK + default n config CLKIN_HALF bool "Half Clock In" @@ -375,11 +468,11 @@ config MAX_VCO_HZ default 500000000 if BF534 default 400000000 if BF536 default 600000000 if BF537 - default 533333333 if BF538 - default 533333333 if BF539 + default 533000000 if BF538 + default 533000000 if BF539 default 600000000 if BF542 - default 533333333 if BF544 - default 533333333 if BF549 + default 533000000 if BF544 + default 533000000 if BF549 default 600000000 if BF561 config MIN_VCO_HZ @@ -388,7 +481,7 @@ config MIN_VCO_HZ config MAX_SCLK_HZ int - default 133333333 + default 133000000 config MIN_SCLK_HZ int @@ -866,20 +959,6 @@ config BANK_3 default 0x99B3 endmenu -config EBIU_MBSCTLVAL - hex "EBIU Bank Select Control Register" - depends on BF54x - default 0 - -config EBIU_MODEVAL - hex "Flash Memory Mode Control Register" - depends on BF54x - default 1 - -config EBIU_FCTLVAL - hex "Flash Memory Bank Control Register" - depends on BF54x - default 6 endmenu ############################################################################# @@ -996,7 +1075,174 @@ source "fs/Kconfig" source "kernel/Kconfig.instrumentation" -source "arch/blackfin/Kconfig.debug" +menu "Kernel hacking" + +source "lib/Kconfig.debug" + +config DEBUG_HWERR + bool "Hardware error interrupt debugging" + depends on DEBUG_KERNEL + help + When enabled, the hardware error interrupt is never disabled, and + will happen immediately when an error condition occurs. This comes + at a slight cost in code size, but is necessary if you are getting + hardware error interrupts and need to know where they are coming + from. + +config DEBUG_ICACHE_CHECK + bool "Check Instruction cache coherency" + depends on DEBUG_KERNEL + depends on DEBUG_HWERR + help + Say Y here if you are getting weird unexplained errors. This will + ensure that icache is what SDRAM says it should be by doing a + byte wise comparison between SDRAM and instruction cache. This + also relocates the irq_panic() function to L1 memory, (which is + un-cached). + +config DEBUG_HUNT_FOR_ZERO + bool "Catch NULL pointer reads/writes" + default y + help + Say Y here to catch reads/writes to anywhere in the memory range + from 0x0000 - 0x0FFF (the first 4k) of memory. This is useful in + catching common programming errors such as NULL pointer dereferences. + + Misbehaving applications will be killed (generate a SEGV) while the + kernel will trigger a panic. + + Enabling this option will take up an extra entry in CPLB table. + Otherwise, there is no extra overhead. + +config DEBUG_BFIN_HWTRACE_ON + bool "Turn on Blackfin's Hardware Trace" + default y + help + All Blackfins include a Trace Unit which stores a history of the last + 16 changes in program flow taken by the program sequencer. The history + allows the user to recreate the program sequencer’s recent path. This + can be handy when an application dies - we print out the execution + path of how it got to the offending instruction. + + By turning this off, you may save a tiny amount of power. + +choice + prompt "Omit loop Tracing" + default DEBUG_BFIN_HWTRACE_COMPRESSION_OFF + depends on DEBUG_BFIN_HWTRACE_ON + help + The trace buffer can be configured to omit recording of changes in + program flow that match either the last entry or one of the last + two entries. Omitting one of these entries from the record prevents + the trace buffer from overflowing because of any sort of loop (for, do + while, etc) in the program. + + Because zero-overhead Hardware loops are not recorded in the trace buffer, + this feature can be used to prevent trace overflow from loops that + are nested four deep. + +config DEBUG_BFIN_HWTRACE_COMPRESSION_OFF + bool "Trace all Loops" + help + The trace buffer records all changes of flow + +config DEBUG_BFIN_HWTRACE_COMPRESSION_ONE + bool "Compress single-level loops" + help + The trace buffer does not record single loops - helpful if trace + is spinning on a while or do loop. + +config DEBUG_BFIN_HWTRACE_COMPRESSION_TWO + bool "Compress two-level loops" + help + The trace buffer does not record loops two levels deep. Helpful if + the trace is spinning in a nested loop + +endchoice + +config DEBUG_BFIN_HWTRACE_COMPRESSION + int + depends on DEBUG_BFIN_HWTRACE_ON + default 0 if DEBUG_BFIN_HWTRACE_COMPRESSION_OFF + default 1 if DEBUG_BFIN_HWTRACE_COMPRESSION_ONE + default 2 if DEBUG_BFIN_HWTRACE_COMPRESSION_TWO + + +config DEBUG_BFIN_HWTRACE_EXPAND + bool "Expand Trace Buffer greater than 16 entries" + depends on DEBUG_BFIN_HWTRACE_ON + default n + help + By selecting this option, every time the 16 hardware entries in + the Blackfin's HW Trace buffer are full, the kernel will move them + into a software buffer, for dumping when there is an issue. This + has a great impact on performance, (an interrupt every 16 change of + flows) and should normally be turned off, except in those nasty + debugging sessions + +config DEBUG_BFIN_HWTRACE_EXPAND_LEN + int "Size of Trace buffer (in power of 2k)" + range 0 4 + depends on DEBUG_BFIN_HWTRACE_EXPAND + default 1 + help + This sets the size of the software buffer that the trace information + is kept in. + 0 for (2^0) 1k, or 256 entries, + 1 for (2^1) 2k, or 512 entries, + 2 for (2^2) 4k, or 1024 entries, + 3 for (2^3) 8k, or 2048 entries, + 4 for (2^4) 16k, or 4096 entries + +config DEBUG_BFIN_NO_KERN_HWTRACE + bool "Trace user apps (turn off hwtrace in kernel)" + depends on DEBUG_BFIN_HWTRACE_ON + default n + help + Some pieces of the kernel contain a lot of flow changes which can + quickly fill up the hardware trace buffer. When debugging crashes, + the hardware trace may indicate that the problem lies in kernel + space when in reality an application is buggy. + + Say Y here to disable hardware tracing in some known "jumpy" pieces + of code so that the trace buffer will extend further back. + +config EARLY_PRINTK + bool "Early printk" + default n + help + This option enables special console drivers which allow the kernel + to print messages very early in the bootup process. + + This is useful for kernel debugging when your machine crashes very + early before the console code is initialized. After enabling this + feature, you must add "earlyprintk=serial,uart0,57600" to the + command line (bootargs). It is safe to say Y here in all cases, as + all of this lives in the init section and is thrown away after the + kernel boots completely. + +config DUAL_CORE_TEST_MODULE + tristate "Dual Core Test Module" + depends on (BF561) + default n + help + Say Y here to build-in dual core test module for dual core test. + +config CPLB_INFO + bool "Display the CPLB information" + help + Display the CPLB information. + +config ACCESS_CHECK + bool "Check the user pointer address" + default y + help + Usually the pointer transfer from user space is checked to see if its + address is in the kernel space. + + Say N here to disable that check to improve the performance. + +endmenu source "security/Kconfig" diff --git a/trunk/arch/blackfin/Kconfig.debug b/trunk/arch/blackfin/Kconfig.debug deleted file mode 100644 index 59b87a483c68..000000000000 --- a/trunk/arch/blackfin/Kconfig.debug +++ /dev/null @@ -1,178 +0,0 @@ -menu "Kernel hacking" - -source "lib/Kconfig.debug" - -config DEBUG_MMRS - bool "Generate Blackfin MMR tree" - select DEBUG_FS - help - Create a tree of Blackfin MMRs via the debugfs tree. If - you enable this, you will find all MMRs laid out in the - /sys/kernel/debug/blackfin/ directory where you can read/write - MMRs directly from userspace. This is obviously just a debug - feature. - -config DEBUG_HWERR - bool "Hardware error interrupt debugging" - depends on DEBUG_KERNEL - help - When enabled, the hardware error interrupt is never disabled, and - will happen immediately when an error condition occurs. This comes - at a slight cost in code size, but is necessary if you are getting - hardware error interrupts and need to know where they are coming - from. - -config DEBUG_ICACHE_CHECK - bool "Check Instruction cache coherency" - depends on DEBUG_KERNEL - depends on DEBUG_HWERR - help - Say Y here if you are getting weird unexplained errors. This will - ensure that icache is what SDRAM says it should be by doing a - byte wise comparison between SDRAM and instruction cache. This - also relocates the irq_panic() function to L1 memory, (which is - un-cached). - -config DEBUG_HUNT_FOR_ZERO - bool "Catch NULL pointer reads/writes" - default y - help - Say Y here to catch reads/writes to anywhere in the memory range - from 0x0000 - 0x0FFF (the first 4k) of memory. This is useful in - catching common programming errors such as NULL pointer dereferences. - - Misbehaving applications will be killed (generate a SEGV) while the - kernel will trigger a panic. - - Enabling this option will take up an extra entry in CPLB table. - Otherwise, there is no extra overhead. - -config DEBUG_BFIN_HWTRACE_ON - bool "Turn on Blackfin's Hardware Trace" - default y - help - All Blackfins include a Trace Unit which stores a history of the last - 16 changes in program flow taken by the program sequencer. The history - allows the user to recreate the program sequencer’s recent path. This - can be handy when an application dies - we print out the execution - path of how it got to the offending instruction. - - By turning this off, you may save a tiny amount of power. - -choice - prompt "Omit loop Tracing" - default DEBUG_BFIN_HWTRACE_COMPRESSION_OFF - depends on DEBUG_BFIN_HWTRACE_ON - help - The trace buffer can be configured to omit recording of changes in - program flow that match either the last entry or one of the last - two entries. Omitting one of these entries from the record prevents - the trace buffer from overflowing because of any sort of loop (for, do - while, etc) in the program. - - Because zero-overhead Hardware loops are not recorded in the trace buffer, - this feature can be used to prevent trace overflow from loops that - are nested four deep. - -config DEBUG_BFIN_HWTRACE_COMPRESSION_OFF - bool "Trace all Loops" - help - The trace buffer records all changes of flow - -config DEBUG_BFIN_HWTRACE_COMPRESSION_ONE - bool "Compress single-level loops" - help - The trace buffer does not record single loops - helpful if trace - is spinning on a while or do loop. - -config DEBUG_BFIN_HWTRACE_COMPRESSION_TWO - bool "Compress two-level loops" - help - The trace buffer does not record loops two levels deep. Helpful if - the trace is spinning in a nested loop - -endchoice - -config DEBUG_BFIN_HWTRACE_COMPRESSION - int - depends on DEBUG_BFIN_HWTRACE_ON - default 0 if DEBUG_BFIN_HWTRACE_COMPRESSION_OFF - default 1 if DEBUG_BFIN_HWTRACE_COMPRESSION_ONE - default 2 if DEBUG_BFIN_HWTRACE_COMPRESSION_TWO - - -config DEBUG_BFIN_HWTRACE_EXPAND - bool "Expand Trace Buffer greater than 16 entries" - depends on DEBUG_BFIN_HWTRACE_ON - default n - help - By selecting this option, every time the 16 hardware entries in - the Blackfin's HW Trace buffer are full, the kernel will move them - into a software buffer, for dumping when there is an issue. This - has a great impact on performance, (an interrupt every 16 change of - flows) and should normally be turned off, except in those nasty - debugging sessions - -config DEBUG_BFIN_HWTRACE_EXPAND_LEN - int "Size of Trace buffer (in power of 2k)" - range 0 4 - depends on DEBUG_BFIN_HWTRACE_EXPAND - default 1 - help - This sets the size of the software buffer that the trace information - is kept in. - 0 for (2^0) 1k, or 256 entries, - 1 for (2^1) 2k, or 512 entries, - 2 for (2^2) 4k, or 1024 entries, - 3 for (2^3) 8k, or 2048 entries, - 4 for (2^4) 16k, or 4096 entries - -config DEBUG_BFIN_NO_KERN_HWTRACE - bool "Trace user apps (turn off hwtrace in kernel)" - depends on DEBUG_BFIN_HWTRACE_ON - default n - help - Some pieces of the kernel contain a lot of flow changes which can - quickly fill up the hardware trace buffer. When debugging crashes, - the hardware trace may indicate that the problem lies in kernel - space when in reality an application is buggy. - - Say Y here to disable hardware tracing in some known "jumpy" pieces - of code so that the trace buffer will extend further back. - -config EARLY_PRINTK - bool "Early printk" - default n - help - This option enables special console drivers which allow the kernel - to print messages very early in the bootup process. - - This is useful for kernel debugging when your machine crashes very - early before the console code is initialized. After enabling this - feature, you must add "earlyprintk=serial,uart0,57600" to the - command line (bootargs). It is safe to say Y here in all cases, as - all of this lives in the init section and is thrown away after the - kernel boots completely. - -config DUAL_CORE_TEST_MODULE - tristate "Dual Core Test Module" - depends on (BF561) - default n - help - Say Y here to build-in dual core test module for dual core test. - -config CPLB_INFO - bool "Display the CPLB information" - help - Display the CPLB information. - -config ACCESS_CHECK - bool "Check the user pointer address" - default y - help - Usually the pointer transfer from user space is checked to see if its - address is in the kernel space. - - Say N here to disable that check to improve the performance. - -endmenu diff --git a/trunk/arch/blackfin/Makefile b/trunk/arch/blackfin/Makefile index c47e000f8324..f7cac7c51e7e 100644 --- a/trunk/arch/blackfin/Makefile +++ b/trunk/arch/blackfin/Makefile @@ -31,7 +31,6 @@ machine-$(CONFIG_BF536) := bf537 machine-$(CONFIG_BF537) := bf537 machine-$(CONFIG_BF542) := bf548 machine-$(CONFIG_BF544) := bf548 -machine-$(CONFIG_BF547) := bf548 machine-$(CONFIG_BF548) := bf548 machine-$(CONFIG_BF549) := bf548 machine-$(CONFIG_BF561) := bf561 @@ -49,7 +48,6 @@ cpu-$(CONFIG_BF536) := bf536 cpu-$(CONFIG_BF537) := bf537 cpu-$(CONFIG_BF542) := bf542 cpu-$(CONFIG_BF544) := bf544 -cpu-$(CONFIG_BF547) := bf547 cpu-$(CONFIG_BF548) := bf548 cpu-$(CONFIG_BF549) := bf549 cpu-$(CONFIG_BF561) := bf561 diff --git a/trunk/arch/blackfin/configs/BF527-EZKIT_defconfig b/trunk/arch/blackfin/configs/BF527-EZKIT_defconfig index fa6eb4e00fae..1f6a93df6b32 100644 --- a/trunk/arch/blackfin/configs/BF527-EZKIT_defconfig +++ b/trunk/arch/blackfin/configs/BF527-EZKIT_defconfig @@ -1,6 +1,6 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.22.12 +# Linux kernel version: 2.6.22.9 # # CONFIG_MMU is not set # CONFIG_FPU is not set @@ -8,6 +8,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set CONFIG_BLACKFIN=y CONFIG_ZONE_DMA=y +CONFIG_BFIN=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y @@ -17,6 +18,7 @@ CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_GPIO=y CONFIG_FORCE_MAX_ZONEORDER=14 CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_IRQCHIP_DEMUX_GPIO=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # @@ -125,7 +127,6 @@ CONFIG_BF527=y # CONFIG_BF537 is not set # CONFIG_BF542 is not set # CONFIG_BF544 is not set -# CONFIG_BF547 is not set # CONFIG_BF548 is not set # CONFIG_BF549 is not set # CONFIG_BF561 is not set @@ -139,8 +140,19 @@ CONFIG_BF_REV_0_0=y # CONFIG_BF_REV_NONE is not set CONFIG_BF52x=y CONFIG_BFIN_SINGLE_CORE=y -CONFIG_MEM_MT48LC32M16A2TG_75=y CONFIG_BFIN527_EZKIT=y +# CONFIG_BFIN533_EZKIT is not set +# CONFIG_BFIN533_STAMP is not set +# CONFIG_BFIN537_STAMP is not set +# CONFIG_BFIN533_BLUETECHNIX_CM is not set +# CONFIG_BFIN537_BLUETECHNIX_CM is not set +# CONFIG_BFIN548_EZKIT is not set +# CONFIG_BFIN561_BLUETECHNIX_CM is not set +# CONFIG_BFIN561_EZKIT is not set +# CONFIG_BFIN561_TEPLA is not set +# CONFIG_PNAV10 is not set +# CONFIG_GENERIC_BOARD is not set +CONFIG_MEM_MT48LC32M16A2TG_75=y # # BF527 Specific Configuration @@ -232,7 +244,7 @@ CONFIG_CLKIN_HZ=25000000 # CONFIG_BFIN_KERNEL_CLOCK is not set CONFIG_MAX_VCO_HZ=600000000 CONFIG_MIN_VCO_HZ=50000000 -CONFIG_MAX_SCLK_HZ=133000000 +CONFIG_MAX_SCLK_HZ=133333333 CONFIG_MIN_SCLK_HZ=27000000 # @@ -289,7 +301,6 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 # CONFIG_RESOURCES_64BIT is not set CONFIG_ZONE_DMA_FLAG=1 CONFIG_LARGE_ALLOCS=y -# CONFIG_BFIN_GPTIMERS is not set CONFIG_BFIN_DMA_5XX=y # CONFIG_DMA_UNCACHED_2M is not set CONFIG_DMA_UNCACHED_1M=y @@ -311,7 +322,7 @@ CONFIG_L1_MAX_PIECE=16 # # -# EBIU_AMGCTL Global Control +# EBIU_AMBCTL Global Control # CONFIG_C_AMCKEN=y CONFIG_C_CDPRIO=y @@ -537,7 +548,6 @@ CONFIG_BFIN_NAND_CLE=2 CONFIG_BFIN_NAND_ALE=1 CONFIG_BFIN_NAND_READY=3 CONFIG_MTD_NAND_IDS=m -# CONFIG_MTD_NAND_BF5XX is not set # CONFIG_MTD_NAND_DISKONCHIP is not set # CONFIG_MTD_NAND_NANDSIM is not set # CONFIG_MTD_NAND_PLATFORM is not set @@ -627,7 +637,6 @@ CONFIG_BFIN_MAC_RMII=y # CONFIG_DM9000 is not set CONFIG_NETDEV_1000=y CONFIG_NETDEV_10000=y -# CONFIG_AX88180 is not set # # Wireless LAN @@ -699,7 +708,7 @@ CONFIG_INPUT_MISC=y # CONFIG_SPI_ADC_BF533 is not set # CONFIG_BF5xx_PFLAGS is not set # CONFIG_BF5xx_PPIFCD is not set -# CONFIG_BFIN_SIMPLE_TIMER is not set +# CONFIG_BF5xx_TIMERS is not set # CONFIG_BF5xx_PPI is not set # CONFIG_BFIN_SPORT is not set # CONFIG_BFIN_TIMER_LATENCY is not set diff --git a/trunk/arch/blackfin/configs/BF533-EZKIT_defconfig b/trunk/arch/blackfin/configs/BF533-EZKIT_defconfig index 4fdb49362ba3..9e9b420342d1 100644 --- a/trunk/arch/blackfin/configs/BF533-EZKIT_defconfig +++ b/trunk/arch/blackfin/configs/BF533-EZKIT_defconfig @@ -1,6 +1,6 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.22.12 +# Linux kernel version: 2.6.22.6 # # CONFIG_MMU is not set # CONFIG_FPU is not set @@ -8,6 +8,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set CONFIG_BLACKFIN=y CONFIG_ZONE_DMA=y +CONFIG_BFIN=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y @@ -17,6 +18,7 @@ CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_GPIO=y CONFIG_FORCE_MAX_ZONEORDER=14 CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_IRQCHIP_DEMUX_GPIO=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # @@ -62,6 +64,7 @@ CONFIG_FUTEX=y CONFIG_ANON_INODES=y CONFIG_EPOLL=y CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_VM_EVENT_COUNTERS=y CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 @@ -114,9 +117,6 @@ CONFIG_PREEMPT_VOLUNTARY=y # # Processor and Board Settings # -# CONFIG_BF522 is not set -# CONFIG_BF525 is not set -# CONFIG_BF527 is not set # CONFIG_BF531 is not set # CONFIG_BF532 is not set CONFIG_BF533=y @@ -125,12 +125,10 @@ CONFIG_BF533=y # CONFIG_BF537 is not set # CONFIG_BF542 is not set # CONFIG_BF544 is not set -# CONFIG_BF547 is not set # CONFIG_BF548 is not set # CONFIG_BF549 is not set # CONFIG_BF561 is not set # CONFIG_BF_REV_0_0 is not set -# CONFIG_BF_REV_0_1 is not set # CONFIG_BF_REV_0_2 is not set CONFIG_BF_REV_0_3=y # CONFIG_BF_REV_0_4 is not set @@ -139,12 +137,18 @@ CONFIG_BF_REV_0_3=y # CONFIG_BF_REV_NONE is not set CONFIG_BF53x=y CONFIG_BFIN_SINGLE_CORE=y -CONFIG_MEM_MT48LC16M16A2TG_75=y CONFIG_BFIN533_EZKIT=y # CONFIG_BFIN533_STAMP is not set +# CONFIG_BFIN537_STAMP is not set # CONFIG_BFIN533_BLUETECHNIX_CM is not set -# CONFIG_H8606_HVSISTEMAS is not set -# CONFIG_GENERIC_BF533_BOARD is not set +# CONFIG_BFIN537_BLUETECHNIX_CM is not set +# CONFIG_BFIN548_EZKIT is not set +# CONFIG_BFIN561_BLUETECHNIX_CM is not set +# CONFIG_BFIN561_EZKIT is not set +# CONFIG_BFIN561_TEPLA is not set +# CONFIG_PNAV10 is not set +# CONFIG_GENERIC_BOARD is not set +CONFIG_MEM_MT48LC16M16A2TG_75=y # # BF533/2/1 Specific Configuration @@ -194,7 +198,7 @@ CONFIG_CLKIN_HZ=27000000 # CONFIG_BFIN_KERNEL_CLOCK is not set CONFIG_MAX_VCO_HZ=750000000 CONFIG_MIN_VCO_HZ=50000000 -CONFIG_MAX_SCLK_HZ=133000000 +CONFIG_MAX_SCLK_HZ=133333333 CONFIG_MIN_SCLK_HZ=27000000 # @@ -251,7 +255,6 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 # CONFIG_RESOURCES_64BIT is not set CONFIG_ZONE_DMA_FLAG=1 CONFIG_LARGE_ALLOCS=y -# CONFIG_BFIN_GPTIMERS is not set CONFIG_BFIN_DMA_5XX=y # CONFIG_DMA_UNCACHED_2M is not set CONFIG_DMA_UNCACHED_1M=y @@ -273,7 +276,7 @@ CONFIG_L1_MAX_PIECE=16 # # -# EBIU_AMGCTL Global Control +# EBIU_AMBCTL Global Control # CONFIG_C_AMCKEN=y CONFIG_C_CDPRIO=y @@ -523,6 +526,14 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y CONFIG_MTD_BF5xx=m CONFIG_BFIN_FLASH_SIZE=0x400000 CONFIG_EBIU_FLASH_BASE=0x20000000 + +# +# FLASH_EBIU_AMBCTL Control +# +CONFIG_BFIN_FLASH_BANK_0=0x7BB0 +CONFIG_BFIN_FLASH_BANK_1=0x7BB0 +CONFIG_BFIN_FLASH_BANK_2=0x7BB0 +CONFIG_BFIN_FLASH_BANK_3=0x7BB0 # CONFIG_MTD_UCLINUX is not set # CONFIG_MTD_PLATRAM is not set @@ -611,7 +622,6 @@ CONFIG_SMC91X=y # CONFIG_DM9000 is not set CONFIG_NETDEV_1000=y CONFIG_NETDEV_10000=y -# CONFIG_AX88180 is not set # # Wireless LAN @@ -673,9 +683,9 @@ CONFIG_INPUT_EVDEV=m # # CONFIG_AD9960 is not set # CONFIG_SPI_ADC_BF533 is not set -# CONFIG_BF5xx_PFLAGS is not set +# CONFIG_BFIN_PFLAGS is not set # CONFIG_BF5xx_PPIFCD is not set -# CONFIG_BFIN_SIMPLE_TIMER is not set +# CONFIG_BF5xx_TIMERS is not set # CONFIG_BF5xx_PPI is not set CONFIG_BFIN_SPORT=y # CONFIG_BFIN_TIMER_LATENCY is not set @@ -698,7 +708,6 @@ CONFIG_SERIAL_BFIN_DMA=y # CONFIG_SERIAL_BFIN_PIO is not set CONFIG_SERIAL_BFIN_UART0=y # CONFIG_BFIN_UART0_CTSRTS is not set -# CONFIG_SERIAL_BFIN_UART1 is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_BFIN_SPORT is not set diff --git a/trunk/arch/blackfin/configs/BF533-STAMP_defconfig b/trunk/arch/blackfin/configs/BF533-STAMP_defconfig index b04e8e533e9a..f59ade980109 100644 --- a/trunk/arch/blackfin/configs/BF533-STAMP_defconfig +++ b/trunk/arch/blackfin/configs/BF533-STAMP_defconfig @@ -1,6 +1,6 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.22.12 +# Linux kernel version: 2.6.22.6 # # CONFIG_MMU is not set # CONFIG_FPU is not set @@ -8,6 +8,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set CONFIG_BLACKFIN=y CONFIG_ZONE_DMA=y +CONFIG_BFIN=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y @@ -17,6 +18,7 @@ CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_GPIO=y CONFIG_FORCE_MAX_ZONEORDER=14 CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_IRQCHIP_DEMUX_GPIO=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # @@ -62,6 +64,7 @@ CONFIG_FUTEX=y CONFIG_ANON_INODES=y CONFIG_EPOLL=y CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_VM_EVENT_COUNTERS=y CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 @@ -114,9 +117,6 @@ CONFIG_PREEMPT_VOLUNTARY=y # # Processor and Board Settings # -# CONFIG_BF522 is not set -# CONFIG_BF525 is not set -# CONFIG_BF527 is not set # CONFIG_BF531 is not set # CONFIG_BF532 is not set CONFIG_BF533=y @@ -125,12 +125,10 @@ CONFIG_BF533=y # CONFIG_BF537 is not set # CONFIG_BF542 is not set # CONFIG_BF544 is not set -# CONFIG_BF547 is not set # CONFIG_BF548 is not set # CONFIG_BF549 is not set # CONFIG_BF561 is not set # CONFIG_BF_REV_0_0 is not set -# CONFIG_BF_REV_0_1 is not set # CONFIG_BF_REV_0_2 is not set CONFIG_BF_REV_0_3=y # CONFIG_BF_REV_0_4 is not set @@ -139,13 +137,19 @@ CONFIG_BF_REV_0_3=y # CONFIG_BF_REV_NONE is not set CONFIG_BF53x=y CONFIG_BFIN_SINGLE_CORE=y -CONFIG_MEM_MT48LC64M4A2FB_7E=y -CONFIG_BFIN_SHARED_FLASH_ENET=y # CONFIG_BFIN533_EZKIT is not set CONFIG_BFIN533_STAMP=y +# CONFIG_BFIN537_STAMP is not set # CONFIG_BFIN533_BLUETECHNIX_CM is not set -# CONFIG_H8606_HVSISTEMAS is not set -# CONFIG_GENERIC_BF533_BOARD is not set +# CONFIG_BFIN537_BLUETECHNIX_CM is not set +# CONFIG_BFIN548_EZKIT is not set +# CONFIG_BFIN561_BLUETECHNIX_CM is not set +# CONFIG_BFIN561_EZKIT is not set +# CONFIG_BFIN561_TEPLA is not set +# CONFIG_PNAV10 is not set +# CONFIG_GENERIC_BOARD is not set +CONFIG_MEM_MT48LC64M4A2FB_7E=y +CONFIG_BFIN_SHARED_FLASH_ENET=y # # BF533/2/1 Specific Configuration @@ -195,7 +199,7 @@ CONFIG_CLKIN_HZ=11059200 # CONFIG_BFIN_KERNEL_CLOCK is not set CONFIG_MAX_VCO_HZ=750000000 CONFIG_MIN_VCO_HZ=50000000 -CONFIG_MAX_SCLK_HZ=133000000 +CONFIG_MAX_SCLK_HZ=133333333 CONFIG_MIN_SCLK_HZ=27000000 # @@ -263,7 +267,6 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 # CONFIG_RESOURCES_64BIT is not set CONFIG_ZONE_DMA_FLAG=1 CONFIG_LARGE_ALLOCS=y -# CONFIG_BFIN_GPTIMERS is not set CONFIG_BFIN_DMA_5XX=y # CONFIG_DMA_UNCACHED_2M is not set CONFIG_DMA_UNCACHED_1M=y @@ -285,7 +288,7 @@ CONFIG_L1_MAX_PIECE=16 # # -# EBIU_AMGCTL Global Control +# EBIU_AMBCTL Global Control # CONFIG_C_AMCKEN=y CONFIG_C_CDPRIO=y @@ -631,7 +634,6 @@ CONFIG_SMC91X=y # CONFIG_DM9000 is not set CONFIG_NETDEV_1000=y CONFIG_NETDEV_10000=y -# CONFIG_AX88180 is not set # # Wireless LAN @@ -702,9 +704,9 @@ CONFIG_BFIN_TWIKEYPAD_IRQ_PFX=39 # # CONFIG_AD9960 is not set # CONFIG_SPI_ADC_BF533 is not set -# CONFIG_BF5xx_PFLAGS is not set +# CONFIG_BFIN_PFLAGS is not set # CONFIG_BF5xx_PPIFCD is not set -# CONFIG_BFIN_SIMPLE_TIMER is not set +# CONFIG_BF5xx_TIMERS is not set # CONFIG_BF5xx_PPI is not set CONFIG_BFIN_SPORT=y # CONFIG_BFIN_TIMER_LATENCY is not set @@ -730,7 +732,6 @@ CONFIG_SERIAL_BFIN_DMA=y # CONFIG_SERIAL_BFIN_PIO is not set CONFIG_SERIAL_BFIN_UART0=y # CONFIG_BFIN_UART0_CTSRTS is not set -# CONFIG_SERIAL_BFIN_UART1 is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_BFIN_SPORT is not set @@ -924,7 +925,6 @@ CONFIG_NTSC=y # CONFIG_PAL_YCBCR is not set CONFIG_ADV7393_1XMEM=y # CONFIG_ADV7393_2XMEM is not set -# CONFIG_FB_BFIN_T350MCQB is not set # CONFIG_FB_S1D13XXX is not set # CONFIG_FB_VIRTUAL is not set # CONFIG_LOGO is not set @@ -978,6 +978,11 @@ CONFIG_SND_BFIN_AD73311_SE=4 # # CONFIG_SND_SOC is not set +# +# SoC Audio for the ADI Blackfin +# +# CONFIG_SND_BF5XX_HAVE_COLD_RESET is not set + # # Open Sound System # diff --git a/trunk/arch/blackfin/configs/BF537-STAMP_defconfig b/trunk/arch/blackfin/configs/BF537-STAMP_defconfig index f812b66318b9..07eb63dc25e0 100644 --- a/trunk/arch/blackfin/configs/BF537-STAMP_defconfig +++ b/trunk/arch/blackfin/configs/BF537-STAMP_defconfig @@ -1,6 +1,6 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.22.12 +# Linux kernel version: 2.6.22.6 # # CONFIG_MMU is not set # CONFIG_FPU is not set @@ -8,6 +8,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set CONFIG_BLACKFIN=y CONFIG_ZONE_DMA=y +CONFIG_BFIN=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y @@ -17,6 +18,7 @@ CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_GPIO=y CONFIG_FORCE_MAX_ZONEORDER=14 CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_IRQCHIP_DEMUX_GPIO=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # @@ -62,6 +64,7 @@ CONFIG_FUTEX=y CONFIG_ANON_INODES=y CONFIG_EPOLL=y CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_VM_EVENT_COUNTERS=y CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 @@ -114,9 +117,6 @@ CONFIG_PREEMPT_VOLUNTARY=y # # Processor and Board Settings # -# CONFIG_BF522 is not set -# CONFIG_BF525 is not set -# CONFIG_BF527 is not set # CONFIG_BF531 is not set # CONFIG_BF532 is not set # CONFIG_BF533 is not set @@ -125,12 +125,10 @@ CONFIG_PREEMPT_VOLUNTARY=y CONFIG_BF537=y # CONFIG_BF542 is not set # CONFIG_BF544 is not set -# CONFIG_BF547 is not set # CONFIG_BF548 is not set # CONFIG_BF549 is not set # CONFIG_BF561 is not set # CONFIG_BF_REV_0_0 is not set -# CONFIG_BF_REV_0_1 is not set CONFIG_BF_REV_0_2=y # CONFIG_BF_REV_0_3 is not set # CONFIG_BF_REV_0_4 is not set @@ -139,8 +137,33 @@ CONFIG_BF_REV_0_2=y # CONFIG_BF_REV_NONE is not set CONFIG_BF53x=y CONFIG_BFIN_SINGLE_CORE=y +# CONFIG_BFIN533_EZKIT is not set +# CONFIG_BFIN533_STAMP is not set +CONFIG_BFIN537_STAMP=y +# CONFIG_BFIN533_BLUETECHNIX_CM is not set +# CONFIG_BFIN537_BLUETECHNIX_CM is not set +# CONFIG_BFIN548_EZKIT is not set +# CONFIG_BFIN561_BLUETECHNIX_CM is not set +# CONFIG_BFIN561_EZKIT is not set +# CONFIG_BFIN561_TEPLA is not set +# CONFIG_PNAV10 is not set +# CONFIG_GENERIC_BOARD is not set CONFIG_MEM_MT48LC32M8A2_75=y CONFIG_IRQ_PLL_WAKEUP=7 + +# +# BF537 Specific Configuration +# + +# +# Interrupt Priority Assignment +# + +# +# Priority +# +CONFIG_IRQ_DMA_ERROR=7 +CONFIG_IRQ_ERROR=7 CONFIG_IRQ_RTC=8 CONFIG_IRQ_PPI=8 CONFIG_IRQ_SPORT0_RX=9 @@ -153,6 +176,8 @@ CONFIG_IRQ_UART0_RX=10 CONFIG_IRQ_UART0_TX=10 CONFIG_IRQ_UART1_RX=10 CONFIG_IRQ_UART1_TX=10 +CONFIG_IRQ_CAN_RX=11 +CONFIG_IRQ_CAN_TX=11 CONFIG_IRQ_MAC_RX=11 CONFIG_IRQ_MAC_TX=11 CONFIG_IRQ_TMR0=12 @@ -163,31 +188,11 @@ CONFIG_IRQ_TMR4=12 CONFIG_IRQ_TMR5=12 CONFIG_IRQ_TMR6=12 CONFIG_IRQ_TMR7=12 +CONFIG_IRQ_PROG_INTA=12 CONFIG_IRQ_PORTG_INTB=12 CONFIG_IRQ_MEM_DMA0=13 CONFIG_IRQ_MEM_DMA1=13 CONFIG_IRQ_WATCH=13 -CONFIG_BFIN537_STAMP=y -# CONFIG_BFIN537_BLUETECHNIX_CM is not set -# CONFIG_PNAV10 is not set -# CONFIG_GENERIC_BF537_BOARD is not set - -# -# BF537 Specific Configuration -# - -# -# Interrupt Priority Assignment -# - -# -# Priority -# -CONFIG_IRQ_DMA_ERROR=7 -CONFIG_IRQ_ERROR=7 -CONFIG_IRQ_CAN_RX=11 -CONFIG_IRQ_CAN_TX=11 -CONFIG_IRQ_PROG_INTA=12 # # Board customizations @@ -201,7 +206,7 @@ CONFIG_CLKIN_HZ=25000000 # CONFIG_BFIN_KERNEL_CLOCK is not set CONFIG_MAX_VCO_HZ=600000000 CONFIG_MIN_VCO_HZ=50000000 -CONFIG_MAX_SCLK_HZ=133000000 +CONFIG_MAX_SCLK_HZ=133333333 CONFIG_MIN_SCLK_HZ=27000000 # @@ -258,7 +263,6 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 # CONFIG_RESOURCES_64BIT is not set CONFIG_ZONE_DMA_FLAG=1 CONFIG_LARGE_ALLOCS=y -# CONFIG_BFIN_GPTIMERS is not set CONFIG_BFIN_DMA_5XX=y # CONFIG_DMA_UNCACHED_2M is not set CONFIG_DMA_UNCACHED_1M=y @@ -280,7 +284,7 @@ CONFIG_L1_MAX_PIECE=16 # # -# EBIU_AMGCTL Global Control +# EBIU_AMBCTL Global Control # CONFIG_C_AMCKEN=y CONFIG_C_CDPRIO=y @@ -530,6 +534,14 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y CONFIG_MTD_BF5xx=m CONFIG_BFIN_FLASH_SIZE=0x400000 CONFIG_EBIU_FLASH_BASE=0x20000000 + +# +# FLASH_EBIU_AMBCTL Control +# +CONFIG_BFIN_FLASH_BANK_0=0x7BB0 +CONFIG_BFIN_FLASH_BANK_1=0x7BB0 +CONFIG_BFIN_FLASH_BANK_2=0x7BB0 +CONFIG_BFIN_FLASH_BANK_3=0x7BB0 # CONFIG_MTD_UCLINUX is not set # CONFIG_MTD_PLATRAM is not set @@ -648,7 +660,6 @@ CONFIG_BFIN_RX_DESC_NUM=20 # CONFIG_DM9000 is not set CONFIG_NETDEV_1000=y CONFIG_NETDEV_10000=y -# CONFIG_AX88180 is not set # # Wireless LAN @@ -719,9 +730,9 @@ CONFIG_BFIN_TWIKEYPAD_IRQ_PFX=72 # # CONFIG_AD9960 is not set # CONFIG_SPI_ADC_BF533 is not set -# CONFIG_BF5xx_PFLAGS is not set +# CONFIG_BFIN_PFLAGS is not set # CONFIG_BF5xx_PPIFCD is not set -# CONFIG_BFIN_SIMPLE_TIMER is not set +# CONFIG_BF5xx_TIMERS is not set # CONFIG_BF5xx_PPI is not set CONFIG_BFIN_SPORT=y # CONFIG_BFIN_TIMER_LATENCY is not set @@ -956,7 +967,6 @@ CONFIG_FB_BF537_LQ035=m CONFIG_LQ035_SLAVE_ADDR=0x58 # CONFIG_FB_BFIN_LANDSCAPE is not set # CONFIG_FB_BFIN_BGR is not set -# CONFIG_FB_BFIN_T350MCQB is not set # CONFIG_FB_S1D13XXX is not set # CONFIG_FB_VIRTUAL is not set # CONFIG_LOGO is not set @@ -1010,6 +1020,11 @@ CONFIG_SND_BFIN_AD73311_SE=4 # # CONFIG_SND_SOC is not set +# +# SoC Audio for the ADI Blackfin +# +# CONFIG_SND_BF5XX_HAVE_COLD_RESET is not set + # # Open Sound System # diff --git a/trunk/arch/blackfin/configs/BF548-EZKIT_defconfig b/trunk/arch/blackfin/configs/BF548-EZKIT_defconfig index 48367cc9fe35..0dd3d2253dc2 100644 --- a/trunk/arch/blackfin/configs/BF548-EZKIT_defconfig +++ b/trunk/arch/blackfin/configs/BF548-EZKIT_defconfig @@ -1,6 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.22.12 +# Linux kernel version: 2.6.22.10 +# Sat Oct 27 02:34:07 2007 # # CONFIG_MMU is not set # CONFIG_FPU is not set @@ -8,6 +9,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set CONFIG_BLACKFIN=y CONFIG_ZONE_DMA=y +CONFIG_BFIN=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y @@ -17,6 +19,7 @@ CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_GPIO=y CONFIG_FORCE_MAX_ZONEORDER=14 CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_IRQCHIP_DEMUX_GPIO=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # @@ -125,7 +128,6 @@ CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_BF537 is not set # CONFIG_BF542 is not set # CONFIG_BF544 is not set -# CONFIG_BF547 is not set # CONFIG_BF548 is not set CONFIG_BF549=y # CONFIG_BF561 is not set @@ -139,6 +141,19 @@ CONFIG_BF_REV_0_0=y # CONFIG_BF_REV_NONE is not set CONFIG_BF54x=y CONFIG_BFIN_SINGLE_CORE=y +# CONFIG_BFIN527_EZKIT is not set +# CONFIG_BFIN533_EZKIT is not set +# CONFIG_BFIN533_STAMP is not set +# CONFIG_BFIN537_STAMP is not set +# CONFIG_BFIN533_BLUETECHNIX_CM is not set +# CONFIG_BFIN537_BLUETECHNIX_CM is not set +CONFIG_BFIN548_EZKIT=y +# CONFIG_BFIN561_BLUETECHNIX_CM is not set +# CONFIG_BFIN561_EZKIT is not set +# CONFIG_BFIN561_TEPLA is not set +# CONFIG_PNAV10 is not set +# CONFIG_H8606_HVSISTEMAS is not set +# CONFIG_GENERIC_BOARD is not set CONFIG_IRQ_PLL_WAKEUP=7 CONFIG_IRQ_RTC=8 CONFIG_IRQ_SPORT0_RX=9 @@ -165,7 +180,6 @@ CONFIG_IRQ_TIMER7=11 CONFIG_IRQ_TIMER8=11 CONFIG_IRQ_TIMER9=11 CONFIG_IRQ_TIMER10=11 -CONFIG_BFIN548_EZKIT=y # # BF548 Specific Configuration @@ -265,9 +279,9 @@ CONFIG_PINT3_ASSIGN=0x02020303 # CONFIG_CLKIN_HZ=25000000 # CONFIG_BFIN_KERNEL_CLOCK is not set -CONFIG_MAX_VCO_HZ=533000000 +CONFIG_MAX_VCO_HZ=533333333 CONFIG_MIN_VCO_HZ=50000000 -CONFIG_MAX_SCLK_HZ=133000000 +CONFIG_MAX_SCLK_HZ=133333333 CONFIG_MIN_SCLK_HZ=27000000 # @@ -362,9 +376,6 @@ CONFIG_BANK_0=0x7BB0 CONFIG_BANK_1=0x5554 CONFIG_BANK_2=0x7BB0 CONFIG_BANK_3=0x99B3 -CONFIG_EBUI_MBSCTLVAL=0x0 -CONFIG_EBUI_MODEVAL=0x1 -CONFIG_EBUI_FCTLVAL=0x6 # # Bus options (PCI, PCMCIA, EISA, MCA, ISA) @@ -691,7 +702,6 @@ CONFIG_SMSC911X=y # CONFIG_DM9000 is not set CONFIG_NETDEV_1000=y CONFIG_NETDEV_10000=y -# CONFIG_AX88180 is not set # # Wireless LAN @@ -1048,8 +1058,6 @@ CONFIG_SND_SOC=y CONFIG_SND_BF5XX_SOC=y CONFIG_SND_BF5XX_SOC_AC97=y CONFIG_SND_BF5XX_SOC_BF548_EZKIT=y -# CONFIG_SND_BF5XX_SOC_WM8750 is not set -# CONFIG_SND_BF5XX_SOC_WM8731 is not set CONFIG_SND_BF5XX_SPORT_NUM=0 # CONFIG_SND_BF5XX_HAVE_COLD_RESET is not set CONFIG_SND_SOC_AD1980=y diff --git a/trunk/arch/blackfin/configs/BF561-EZKIT_defconfig b/trunk/arch/blackfin/configs/BF561-EZKIT_defconfig index e9f100b45eb1..277d72dac0f9 100644 --- a/trunk/arch/blackfin/configs/BF561-EZKIT_defconfig +++ b/trunk/arch/blackfin/configs/BF561-EZKIT_defconfig @@ -1,6 +1,6 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.22.12 +# Linux kernel version: 2.6.22.6 # # CONFIG_MMU is not set # CONFIG_FPU is not set @@ -8,6 +8,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set CONFIG_BLACKFIN=y CONFIG_ZONE_DMA=y +CONFIG_BFIN=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y @@ -17,6 +18,7 @@ CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_GPIO=y CONFIG_FORCE_MAX_ZONEORDER=14 CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_IRQCHIP_DEMUX_GPIO=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # @@ -62,6 +64,7 @@ CONFIG_FUTEX=y CONFIG_ANON_INODES=y CONFIG_EPOLL=y CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_VM_EVENT_COUNTERS=y CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 @@ -114,9 +117,6 @@ CONFIG_PREEMPT_VOLUNTARY=y # # Processor and Board Settings # -# CONFIG_BF522 is not set -# CONFIG_BF525 is not set -# CONFIG_BF527 is not set # CONFIG_BF531 is not set # CONFIG_BF532 is not set # CONFIG_BF533 is not set @@ -125,12 +125,10 @@ CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_BF537 is not set # CONFIG_BF542 is not set # CONFIG_BF544 is not set -# CONFIG_BF547 is not set # CONFIG_BF548 is not set # CONFIG_BF549 is not set CONFIG_BF561=y # CONFIG_BF_REV_0_0 is not set -# CONFIG_BF_REV_0_1 is not set # CONFIG_BF_REV_0_2 is not set CONFIG_BF_REV_0_3=y # CONFIG_BF_REV_0_4 is not set @@ -138,15 +136,18 @@ CONFIG_BF_REV_0_3=y # CONFIG_BF_REV_ANY is not set # CONFIG_BF_REV_NONE is not set CONFIG_BFIN_DUAL_CORE=y -CONFIG_MEM_MT48LC16M16A2TG_75=y -CONFIG_IRQ_PLL_WAKEUP=7 -CONFIG_IRQ_SPORT0_ERROR=7 -CONFIG_IRQ_SPORT1_ERROR=7 -CONFIG_IRQ_SPI_ERROR=7 +# CONFIG_BFIN533_EZKIT is not set +# CONFIG_BFIN533_STAMP is not set +# CONFIG_BFIN537_STAMP is not set +# CONFIG_BFIN533_BLUETECHNIX_CM is not set +# CONFIG_BFIN537_BLUETECHNIX_CM is not set +# CONFIG_BFIN548_EZKIT is not set +# CONFIG_BFIN561_BLUETECHNIX_CM is not set CONFIG_BFIN561_EZKIT=y # CONFIG_BFIN561_TEPLA is not set -# CONFIG_BFIN561_BLUETECHNIX_CM is not set -# CONFIG_GENERIC_BF561_BOARD is not set +# CONFIG_PNAV10 is not set +# CONFIG_GENERIC_BOARD is not set +CONFIG_MEM_MT48LC16M16A2TG_75=y # # BF561 Specific Configuration @@ -169,11 +170,15 @@ CONFIG_BF561_COREB_RESET=y # # Priority # +CONFIG_IRQ_PLL_WAKEUP=7 CONFIG_IRQ_DMA1_ERROR=7 CONFIG_IRQ_DMA2_ERROR=7 CONFIG_IRQ_IMDMA_ERROR=7 CONFIG_IRQ_PPI0_ERROR=7 CONFIG_IRQ_PPI1_ERROR=7 +CONFIG_IRQ_SPORT0_ERROR=7 +CONFIG_IRQ_SPORT1_ERROR=7 +CONFIG_IRQ_SPI_ERROR=7 CONFIG_IRQ_UART_ERROR=7 CONFIG_IRQ_RESERVED_ERROR=7 CONFIG_IRQ_DMA1_0=8 @@ -238,7 +243,7 @@ CONFIG_CLKIN_HZ=30000000 # CONFIG_BFIN_KERNEL_CLOCK is not set CONFIG_MAX_VCO_HZ=600000000 CONFIG_MIN_VCO_HZ=50000000 -CONFIG_MAX_SCLK_HZ=133000000 +CONFIG_MAX_SCLK_HZ=133333333 CONFIG_MIN_SCLK_HZ=27000000 # @@ -295,7 +300,6 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 # CONFIG_RESOURCES_64BIT is not set CONFIG_ZONE_DMA_FLAG=1 CONFIG_LARGE_ALLOCS=y -# CONFIG_BFIN_GPTIMERS is not set CONFIG_BFIN_DMA_5XX=y # CONFIG_DMA_UNCACHED_2M is not set CONFIG_DMA_UNCACHED_1M=y @@ -317,7 +321,7 @@ CONFIG_L1_MAX_PIECE=16 # # -# EBIU_AMGCTL Global Control +# EBIU_AMBCTL Global Control # CONFIG_C_AMCKEN=y CONFIG_C_CDPRIO=y @@ -560,6 +564,14 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y CONFIG_MTD_BF5xx=m CONFIG_BFIN_FLASH_SIZE=0x0400000 CONFIG_EBIU_FLASH_BASE=0x20000000 + +# +# FLASH_EBIU_AMBCTL Control +# +CONFIG_BFIN_FLASH_BANK_0=0x7BB0 +CONFIG_BFIN_FLASH_BANK_1=0x7BB0 +CONFIG_BFIN_FLASH_BANK_2=0x7BB0 +CONFIG_BFIN_FLASH_BANK_3=0x7BB0 # CONFIG_MTD_UCLINUX is not set # CONFIG_MTD_PLATRAM is not set @@ -648,7 +660,6 @@ CONFIG_SMC91X=y # CONFIG_DM9000 is not set CONFIG_NETDEV_1000=y CONFIG_NETDEV_10000=y -# CONFIG_AX88180 is not set # # Wireless LAN @@ -710,9 +721,9 @@ CONFIG_INPUT_EVDEV=m # # CONFIG_AD9960 is not set # CONFIG_SPI_ADC_BF533 is not set -# CONFIG_BF5xx_PFLAGS is not set +# CONFIG_BFIN_PFLAGS is not set # CONFIG_BF5xx_PPIFCD is not set -# CONFIG_BFIN_SIMPLE_TIMER is not set +# CONFIG_BF5xx_TIMERS is not set # CONFIG_BF5xx_PPI is not set # CONFIG_BFIN_SPORT is not set # CONFIG_BFIN_TIMER_LATENCY is not set diff --git a/trunk/arch/blackfin/configs/H8606_defconfig b/trunk/arch/blackfin/configs/H8606_defconfig deleted file mode 100644 index 18cbb8c3c373..000000000000 --- a/trunk/arch/blackfin/configs/H8606_defconfig +++ /dev/null @@ -1,1160 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.22.12 -# -# CONFIG_MMU is not set -# CONFIG_FPU is not set -CONFIG_RWSEM_GENERIC_SPINLOCK=y -# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set -CONFIG_BLACKFIN=y -CONFIG_ZONE_DMA=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_GENERIC_FIND_NEXT_BIT=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -# CONFIG_GENERIC_TIME is not set -CONFIG_GENERIC_GPIO=y -CONFIG_FORCE_MAX_ZONEORDER=14 -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SYSVIPC=y -# CONFIG_IPC_NS is not set -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set -# CONFIG_UTS_NS is not set -# CONFIG_AUDIT is not set -# CONFIG_IKCONFIG is not set -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED=y -# CONFIG_RELAY is not set -# CONFIG_BLK_DEV_INITRD is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_EMBEDDED=y -CONFIG_UID16=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_ANON_INODES=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_EVENTFD=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 -# CONFIG_NP2 is not set -CONFIG_SLAB=y -# CONFIG_SLUB is not set -# CONFIG_SLOB is not set -CONFIG_RT_MUTEXES=y -CONFIG_TINY_SHMEM=y -CONFIG_BASE_SMALL=0 - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y - -# -# Block layer -# -CONFIG_BLOCK=y -# CONFIG_LBD is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_LSF is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -# CONFIG_IOSCHED_DEADLINE is not set -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set - -# -# Blackfin Processor Options -# - -# -# Processor and Board Settings -# -# CONFIG_BF522 is not set -# CONFIG_BF525 is not set -# CONFIG_BF527 is not set -# CONFIG_BF531 is not set -CONFIG_BF532=y -# CONFIG_BF533 is not set -# CONFIG_BF534 is not set -# CONFIG_BF536 is not set -# CONFIG_BF537 is not set -# CONFIG_BF542 is not set -# CONFIG_BF544 is not set -# CONFIG_BF547 is not set -# CONFIG_BF548 is not set -# CONFIG_BF549 is not set -# CONFIG_BF561 is not set -# CONFIG_BF_REV_0_0 is not set -# CONFIG_BF_REV_0_1 is not set -# CONFIG_BF_REV_0_2 is not set -# CONFIG_BF_REV_0_3 is not set -# CONFIG_BF_REV_0_4 is not set -CONFIG_BF_REV_0_5=y -# CONFIG_BF_REV_ANY is not set -# CONFIG_BF_REV_NONE is not set -CONFIG_BF53x=y -CONFIG_BFIN_SINGLE_CORE=y -CONFIG_MEM_MT48LC16M16A2TG_75=y -# CONFIG_BFIN533_EZKIT is not set -# CONFIG_BFIN533_STAMP is not set -# CONFIG_BFIN533_BLUETECHNIX_CM is not set -CONFIG_H8606_HVSISTEMAS=y -# CONFIG_GENERIC_BF533_BOARD is not set - -# -# BF533/2/1 Specific Configuration -# - -# -# Interrupt Priority Assignment -# - -# -# Priority -# -CONFIG_UART_ERROR=7 -CONFIG_SPORT0_ERROR=7 -CONFIG_SPI_ERROR=7 -CONFIG_SPORT1_ERROR=7 -CONFIG_PPI_ERROR=7 -CONFIG_DMA_ERROR=7 -CONFIG_PLLWAKE_ERROR=7 -CONFIG_RTC_ERROR=8 -CONFIG_DMA0_PPI=8 -CONFIG_DMA1_SPORT0RX=9 -CONFIG_DMA2_SPORT0TX=9 -CONFIG_DMA3_SPORT1RX=9 -CONFIG_DMA4_SPORT1TX=9 -CONFIG_DMA5_SPI=10 -CONFIG_DMA6_UARTRX=10 -CONFIG_DMA7_UARTTX=10 -CONFIG_TIMER0=11 -CONFIG_TIMER1=11 -CONFIG_TIMER2=11 -CONFIG_PFA=12 -CONFIG_PFB=12 -CONFIG_MEMDMA0=13 -CONFIG_MEMDMA1=13 -CONFIG_WDTIMER=13 - -# -# Board customizations -# -# CONFIG_CMDLINE_BOOL is not set - -# -# Clock/PLL Setup -# -CONFIG_CLKIN_HZ=25000000 -# CONFIG_BFIN_KERNEL_CLOCK is not set -CONFIG_MAX_VCO_HZ=400000000 -CONFIG_MIN_VCO_HZ=50000000 -CONFIG_MAX_SCLK_HZ=133000000 -CONFIG_MIN_SCLK_HZ=27000000 - -# -# Kernel Timer/Scheduler -# -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_300 is not set -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 - -# -# Memory Setup -# -CONFIG_MEM_SIZE=32 -CONFIG_MEM_ADD_WIDTH=9 -CONFIG_BOOT_LOAD=0x1000 -CONFIG_BFIN_SCRATCH_REG_RETN=y -# CONFIG_BFIN_SCRATCH_REG_RETE is not set -# CONFIG_BFIN_SCRATCH_REG_CYCLES is not set - -# -# Blackfin Kernel Optimizations -# - -# -# Memory Optimizations -# -CONFIG_I_ENTRY_L1=y -CONFIG_EXCPT_IRQ_SYSC_L1=y -CONFIG_DO_IRQ_L1=y -CONFIG_CORE_TIMER_IRQ_L1=y -CONFIG_IDLE_L1=y -CONFIG_SCHEDULE_L1=y -CONFIG_ARITHMETIC_OPS_L1=y -CONFIG_ACCESS_OK_L1=y -CONFIG_MEMSET_L1=y -CONFIG_MEMCPY_L1=y -CONFIG_SYS_BFIN_SPINLOCK_L1=y -# CONFIG_IP_CHECKSUM_L1 is not set -# CONFIG_CACHELINE_ALIGNED_L1 is not set -# CONFIG_SYSCALL_TAB_L1 is not set -# CONFIG_CPLB_SWITCH_TAB_L1 is not set -CONFIG_RAMKERNEL=y -# CONFIG_ROMKERNEL is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -CONFIG_ZONE_DMA_FLAG=1 -CONFIG_LARGE_ALLOCS=y -CONFIG_BFIN_GPTIMERS=y -CONFIG_BFIN_DMA_5XX=y -# CONFIG_DMA_UNCACHED_2M is not set -CONFIG_DMA_UNCACHED_1M=y -# CONFIG_DMA_UNCACHED_NONE is not set - -# -# Cache Support -# -CONFIG_BFIN_ICACHE=y -CONFIG_BFIN_DCACHE=y -# CONFIG_BFIN_DCACHE_BANKA is not set -CONFIG_BFIN_ICACHE_LOCK=y -CONFIG_BFIN_WB=y -# CONFIG_BFIN_WT is not set -CONFIG_L1_MAX_PIECE=16 - -# -# Asynchonous Memory Configuration -# - -# -# EBIU_AMGCTL Global Control -# -CONFIG_C_AMCKEN=y -CONFIG_C_CDPRIO=y -# CONFIG_C_AMBEN is not set -# CONFIG_C_AMBEN_B0 is not set -# CONFIG_C_AMBEN_B0_B1 is not set -# CONFIG_C_AMBEN_B0_B1_B2 is not set -CONFIG_C_AMBEN_ALL=y - -# -# EBIU_AMBCTL Control -# -CONFIG_BANK_0=0x7BB0 -CONFIG_BANK_1=0x7BB0 -CONFIG_BANK_2=0x7BB0 -CONFIG_BANK_3=0x99B3 - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -# CONFIG_PCI is not set -# CONFIG_ARCH_SUPPORTS_MSI is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF_FDPIC=y -CONFIG_BINFMT_FLAT=y -CONFIG_BINFMT_ZFLAT=y -# CONFIG_BINFMT_SHARED_FLAT is not set -# CONFIG_BINFMT_MISC is not set - -# -# Power management options -# -CONFIG_PM=y -CONFIG_PM_LEGACY=y -# CONFIG_PM_DEBUG is not set -# CONFIG_PM_SYSFS_DEPRECATED is not set -CONFIG_PM_WAKEUP_GPIO_BY_SIC_IWR=y -# CONFIG_PM_WAKEUP_BY_GPIO is not set -# CONFIG_PM_WAKEUP_GPIO_API is not set -CONFIG_PM_WAKEUP_SIC_IWR=0x100000 - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -# CONFIG_XFRM_MIGRATE is not set -# CONFIG_NET_KEY is not set -CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_PNP=y -# CONFIG_IP_PNP_DHCP is not set -# CONFIG_IP_PNP_BOOTP is not set -# CONFIG_IP_PNP_RARP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set -# CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -# CONFIG_IPV6 is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_NETLABEL is not set -# CONFIG_NETWORK_SECMARK is not set -# CONFIG_NETFILTER is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -CONFIG_IRDA=m - -# -# IrDA protocols -# -CONFIG_IRLAN=m -CONFIG_IRCOMM=m -# CONFIG_IRDA_ULTRA is not set - -# -# IrDA options -# -CONFIG_IRDA_CACHE_LAST_LSAP=y -# CONFIG_IRDA_FAST_RR is not set -# CONFIG_IRDA_DEBUG is not set - -# -# Infrared-port device drivers -# - -# -# SIR device drivers -# -CONFIG_IRTTY_SIR=m - -# -# Dongle support -# -# CONFIG_DONGLE is not set - -# -# Old SIR device drivers -# -# CONFIG_IRPORT_SIR is not set - -# -# Old Serial dongle support -# - -# -# FIR device drivers -# -# 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 -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set -# CONFIG_SYS_HYPERVISOR is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLKDEVS=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set -# CONFIG_SSFDC is not set - -# -# RAM/ROM/Flash chip drivers -# -# CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set -CONFIG_MTD_CFI_I1=y -CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set -CONFIG_MTD_RAM=y -CONFIG_MTD_ROM=y -# CONFIG_MTD_ABSENT is not set - -# -# Mapping drivers for chip access -# -CONFIG_MTD_COMPLEX_MAPPINGS=y -# CONFIG_MTD_PHYSMAP is not set -# CONFIG_MTD_BF5xx is not set -# CONFIG_MTD_UCLINUX is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_DATAFLASH is not set -CONFIG_MTD_M25P80=y -CONFIG_M25PXX_USE_FAST_READ=y -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set -# CONFIG_MTD_NAND is not set -# CONFIG_MTD_ONENAND is not set - -# -# UBI - Unsorted block images -# -# CONFIG_MTD_UBI is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# -# CONFIG_PNPACPI is not set - -# -# Block devices -# -# CONFIG_BLK_DEV_COW_COMMON is not set -# CONFIG_BLK_DEV_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# Misc devices -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -# CONFIG_SCSI is not set -# CONFIG_SCSI_NETLINK is not set -# CONFIG_ATA is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set -# CONFIG_PHYLIB is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -# CONFIG_SMC91X is not set -# CONFIG_SMSC911X is not set -CONFIG_DM9000=y -CONFIG_NETDEV_1000=y -CONFIG_NETDEV_10000=y -# CONFIG_AX88180 is not set - -# -# Wireless LAN -# -# CONFIG_WLAN_PRE80211 is not set -# CONFIG_WLAN_80211 is not set -# CONFIG_WAN is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=m -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -CONFIG_INPUT_MISC=y -# CONFIG_INPUT_ATI_REMOTE is not set -# CONFIG_INPUT_ATI_REMOTE2 is not set -# CONFIG_INPUT_KEYSPAN_REMOTE is not set -# CONFIG_INPUT_POWERMATE is not set -# CONFIG_INPUT_YEALINK is not set -# CONFIG_INPUT_UINPUT is not set -# CONFIG_BF53X_PFBUTTONS is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -# CONFIG_AD9960 is not set -# CONFIG_SPI_ADC_BF533 is not set -CONFIG_BF5xx_PFLAGS=y -# CONFIG_BF5xx_PFLAGS_PROC is not set -# CONFIG_BF5xx_PPIFCD is not set -CONFIG_BFIN_SIMPLE_TIMER=y -# CONFIG_BF5xx_PPI is not set -CONFIG_BFIN_SPORT=y -CONFIG_BFIN_TIMER_LATENCY=y -# CONFIG_AD5304 is not set -# CONFIG_BF5xx_FBDMA is not set -# CONFIG_VT is not set -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_BFIN=y -CONFIG_SERIAL_BFIN_CONSOLE=y -CONFIG_SERIAL_BFIN_DMA=y -# CONFIG_SERIAL_BFIN_PIO is not set -CONFIG_SERIAL_BFIN_UART0=y -# CONFIG_BFIN_UART0_CTSRTS is not set -# CONFIG_SERIAL_BFIN_UART1 is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_BFIN_SPORT is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set - -# -# CAN, the car bus and industrial fieldbus -# -# CONFIG_CAN4LINUX is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -# CONFIG_SOFT_WATCHDOG is not set -# CONFIG_BFIN_WDT is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_GEN_RTC is not set -CONFIG_BLACKFIN_DPMC=y -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_I2C is not set - -# -# SPI support -# -CONFIG_SPI=y -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -CONFIG_SPI_BFIN=y -# CONFIG_SPI_BITBANG is not set - -# -# SPI Protocol Masters -# -CONFIG_SPI_AT25=y -CONFIG_SPI_SPIDEV=y - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ABITUGURU is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_LM70 is not set -# CONFIG_SENSORS_PC87427 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_VT1211 is not set -# CONFIG_SENSORS_W83627HF is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_SM501 is not set - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set -# CONFIG_DVB_CORE is not set -CONFIG_DAB=y - -# -# Graphics support -# -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Display device support -# -# CONFIG_DISPLAY_SUPPORT is not set -# CONFIG_VGASTATE is not set -# CONFIG_FB is not set - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -# CONFIG_SND_SEQUENCER is not set -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -# CONFIG_SND_DYNAMIC_MINORS is not set -CONFIG_SND_SUPPORT_OLD_API=y -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set - -# -# ALSA Blackfin devices -# -CONFIG_SND_BLACKFIN_AD1836=m -CONFIG_SND_BLACKFIN_AD1836_TDM=y -# CONFIG_SND_BLACKFIN_AD1836_I2S is not set -CONFIG_SND_BLACKFIN_AD1836_MULSUB=y -# CONFIG_SND_BLACKFIN_AD1836_5P1 is not set -CONFIG_SND_BLACKFIN_SPORT=0 -CONFIG_SND_BLACKFIN_SPI_PFBIT=4 -# CONFIG_SND_BFIN_AD73311 is not set - -# -# System on Chip audio support -# -# CONFIG_SND_SOC is not set - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set - -# -# HID Devices -# -CONFIG_HID=y -# CONFIG_HID_DEBUG is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -# CONFIG_USB_ARCH_HAS_OHCI is not set -# CONFIG_USB_ARCH_HAS_EHCI is not set -# CONFIG_USB is not set - -# -# Enable Host or Gadget support to see Inventra options -# - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set -# CONFIG_MMC is not set - -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - -# -# InfiniBand support -# - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# - -# -# Real Time Clock -# -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -CONFIG_RTC_INTF_DEV_UIE_EMUL=y -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# - -# -# SPI RTC drivers -# -# CONFIG_RTC_DRV_RS5C348 is not set -# CONFIG_RTC_DRV_MAX6902 is not set - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_V3020 is not set - -# -# on-CPU RTC drivers -# -CONFIG_RTC_DRV_BFIN=y - -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - -# -# PBX support -# -# CONFIG_PBX is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -# CONFIG_EXT2_FS_POSIX_ACL is not set -# CONFIG_EXT2_FS_SECURITY is not set -# CONFIG_EXT3_FS is not set -# CONFIG_EXT4DEV_FS is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_FS_POSIX_ACL is not set -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_SYSFS=y -# CONFIG_TMPFS is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_YAFFS_FS is not set -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -# CONFIG_JFFS2_SUMMARY is not set -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -# CONFIG_CRAMFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -# CONFIG_NFS_V3_ACL is not set -# CONFIG_NFS_V4 is not set -# CONFIG_NFS_DIRECTIO is not set -# CONFIG_NFSD is not set -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -# CONFIG_SUNRPC_BIND34 is not set -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y - -# -# Native Language Support -# -CONFIG_NLS=m -CONFIG_NLS_DEFAULT="iso8859-1" -# CONFIG_NLS_CODEPAGE_437 is not set -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ASCII is not set -# CONFIG_NLS_ISO8859_1 is not set -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -# CONFIG_NLS_UTF8 is not set - -# -# Distributed Lock Manager -# -# CONFIG_DLM is not set - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_ENABLE_MUST_CHECK=y -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set -# CONFIG_DEBUG_FS is not set -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_KERNEL is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_DEBUG_MMRS is not set -CONFIG_DEBUG_HUNT_FOR_ZERO=y -CONFIG_DEBUG_BFIN_HWTRACE_ON=y -CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y -# CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE is not set -# CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_TWO is not set -CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0 -# CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set -# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set -# CONFIG_EARLY_PRINTK is not set -CONFIG_CPLB_INFO=y -CONFIG_ACCESS_CHECK=y - -# -# Security options -# -# CONFIG_KEYS is not set -CONFIG_SECURITY=y -# CONFIG_SECURITY_NETWORK is not set -CONFIG_SECURITY_CAPABILITIES=y - -# -# Cryptographic options -# -# CONFIG_CRYPTO is not set - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_CRC_CCITT=m -# CONFIG_CRC16 is not set -# CONFIG_CRC_ITU_T is not set -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y -CONFIG_PLIST=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y diff --git a/trunk/arch/blackfin/configs/PNAV-10_defconfig b/trunk/arch/blackfin/configs/PNAV-10_defconfig index 25709f504d8f..3d403e0b82c2 100644 --- a/trunk/arch/blackfin/configs/PNAV-10_defconfig +++ b/trunk/arch/blackfin/configs/PNAV-10_defconfig @@ -1,6 +1,6 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.22.12 +# Linux kernel version: 2.6.22.6 # # CONFIG_MMU is not set # CONFIG_FPU is not set @@ -8,6 +8,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set CONFIG_BLACKFIN=y CONFIG_ZONE_DMA=y +CONFIG_BFIN=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y @@ -17,6 +18,7 @@ CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_GPIO=y CONFIG_FORCE_MAX_ZONEORDER=14 CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_IRQCHIP_DEMUX_GPIO=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # @@ -60,6 +62,7 @@ CONFIG_FUTEX=y CONFIG_ANON_INODES=y CONFIG_EPOLL=y CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_VM_EVENT_COUNTERS=y CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=9 @@ -112,9 +115,6 @@ CONFIG_PREEMPT_VOLUNTARY=y # # Processor and Board Settings # -# CONFIG_BF522 is not set -# CONFIG_BF525 is not set -# CONFIG_BF527 is not set # CONFIG_BF531 is not set # CONFIG_BF532 is not set # CONFIG_BF533 is not set @@ -123,12 +123,10 @@ CONFIG_PREEMPT_VOLUNTARY=y CONFIG_BF537=y # CONFIG_BF542 is not set # CONFIG_BF544 is not set -# CONFIG_BF547 is not set # CONFIG_BF548 is not set # CONFIG_BF549 is not set # CONFIG_BF561 is not set # CONFIG_BF_REV_0_0 is not set -# CONFIG_BF_REV_0_1 is not set CONFIG_BF_REV_0_2=y # CONFIG_BF_REV_0_3 is not set # CONFIG_BF_REV_0_4 is not set @@ -137,8 +135,33 @@ CONFIG_BF_REV_0_2=y # CONFIG_BF_REV_NONE is not set CONFIG_BF53x=y CONFIG_BFIN_SINGLE_CORE=y +# CONFIG_BFIN533_EZKIT is not set +# CONFIG_BFIN533_STAMP is not set +# CONFIG_BFIN537_STAMP is not set +# CONFIG_BFIN533_BLUETECHNIX_CM is not set +# CONFIG_BFIN537_BLUETECHNIX_CM is not set +# CONFIG_BFIN548_EZKIT is not set +# CONFIG_BFIN561_BLUETECHNIX_CM is not set +# CONFIG_BFIN561_EZKIT is not set +# CONFIG_BFIN561_TEPLA is not set +CONFIG_PNAV10=y +# CONFIG_GENERIC_BOARD is not set CONFIG_MEM_MT48LC32M8A2_75=y CONFIG_IRQ_PLL_WAKEUP=7 + +# +# BF537 Specific Configuration +# + +# +# Interrupt Priority Assignment +# + +# +# Priority +# +CONFIG_IRQ_DMA_ERROR=7 +CONFIG_IRQ_ERROR=7 CONFIG_IRQ_RTC=8 CONFIG_IRQ_PPI=8 CONFIG_IRQ_SPORT0_RX=9 @@ -151,6 +174,8 @@ CONFIG_IRQ_UART0_RX=10 CONFIG_IRQ_UART0_TX=10 CONFIG_IRQ_UART1_RX=10 CONFIG_IRQ_UART1_TX=10 +CONFIG_IRQ_CAN_RX=11 +CONFIG_IRQ_CAN_TX=11 CONFIG_IRQ_MAC_RX=11 CONFIG_IRQ_MAC_TX=11 CONFIG_IRQ_TMR0=12 @@ -161,31 +186,11 @@ CONFIG_IRQ_TMR4=12 CONFIG_IRQ_TMR5=12 CONFIG_IRQ_TMR6=12 CONFIG_IRQ_TMR7=12 +CONFIG_IRQ_PROG_INTA=12 CONFIG_IRQ_PORTG_INTB=12 CONFIG_IRQ_MEM_DMA0=13 CONFIG_IRQ_MEM_DMA1=13 CONFIG_IRQ_WATCH=13 -# CONFIG_BFIN537_STAMP is not set -# CONFIG_BFIN537_BLUETECHNIX_CM is not set -CONFIG_PNAV10=y -# CONFIG_GENERIC_BF537_BOARD is not set - -# -# BF537 Specific Configuration -# - -# -# Interrupt Priority Assignment -# - -# -# Priority -# -CONFIG_IRQ_DMA_ERROR=7 -CONFIG_IRQ_ERROR=7 -CONFIG_IRQ_CAN_RX=11 -CONFIG_IRQ_CAN_TX=11 -CONFIG_IRQ_PROG_INTA=12 # # Board customizations @@ -199,7 +204,7 @@ CONFIG_CLKIN_HZ=24576000 # CONFIG_BFIN_KERNEL_CLOCK is not set CONFIG_MAX_VCO_HZ=600000000 CONFIG_MIN_VCO_HZ=50000000 -CONFIG_MAX_SCLK_HZ=133000000 +CONFIG_MAX_SCLK_HZ=133333333 CONFIG_MIN_SCLK_HZ=27000000 # @@ -256,7 +261,6 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 # CONFIG_RESOURCES_64BIT is not set CONFIG_ZONE_DMA_FLAG=1 CONFIG_LARGE_ALLOCS=y -# CONFIG_BFIN_GPTIMERS is not set CONFIG_BFIN_DMA_5XX=y # CONFIG_DMA_UNCACHED_2M is not set CONFIG_DMA_UNCACHED_1M=y @@ -278,7 +282,7 @@ CONFIG_L1_MAX_PIECE=16 # # -# EBIU_AMGCTL Global Control +# EBIU_AMBCTL Global Control # CONFIG_C_AMCKEN=y CONFIG_C_CDPRIO=y @@ -589,7 +593,6 @@ CONFIG_BFIN_MAC_RMII=y # CONFIG_DM9000 is not set CONFIG_NETDEV_1000=y CONFIG_NETDEV_10000=y -# CONFIG_AX88180 is not set # # Wireless LAN @@ -672,9 +675,9 @@ CONFIG_INPUT_UINPUT=y # # CONFIG_AD9960 is not set # CONFIG_SPI_ADC_BF533 is not set -# CONFIG_BF5xx_PFLAGS is not set +# CONFIG_BFIN_PFLAGS is not set # CONFIG_BF5xx_PPIFCD is not set -# CONFIG_BFIN_SIMPLE_TIMER is not set +# CONFIG_BF5xx_TIMERS is not set # CONFIG_BF5xx_PPI is not set CONFIG_BFIN_SPORT=y # CONFIG_BFIN_TIMER_LATENCY is not set @@ -894,7 +897,6 @@ CONFIG_FB_BF537_LQ035=y CONFIG_LQ035_SLAVE_ADDR=0x58 CONFIG_FB_BFIN_LANDSCAPE=y # CONFIG_FB_BFIN_BGR is not set -# CONFIG_FB_BFIN_T350MCQB is not set # CONFIG_FB_S1D13XXX is not set # CONFIG_FB_VIRTUAL is not set # CONFIG_LOGO is not set @@ -936,6 +938,11 @@ CONFIG_SND=m # # CONFIG_SND_SOC is not set +# +# SoC Audio for the ADI Blackfin +# +# CONFIG_SND_BF5XX_HAVE_COLD_RESET is not set + # # Open Sound System # diff --git a/trunk/arch/blackfin/kernel/bfin_dma_5xx.c b/trunk/arch/blackfin/kernel/bfin_dma_5xx.c index b54446055a43..503eef4c7fec 100644 --- a/trunk/arch/blackfin/kernel/bfin_dma_5xx.c +++ b/trunk/arch/blackfin/kernel/bfin_dma_5xx.c @@ -436,7 +436,6 @@ unsigned long get_dma_curr_desc_ptr(unsigned int channel) return dma_ch[channel].regs->curr_desc_ptr; } -EXPORT_SYMBOL(get_dma_curr_desc_ptr); unsigned long get_dma_curr_addr(unsigned int channel) { diff --git a/trunk/arch/blackfin/kernel/bfin_ksyms.c b/trunk/arch/blackfin/kernel/bfin_ksyms.c index 0bfbb269e350..2198afe40f33 100644 --- a/trunk/arch/blackfin/kernel/bfin_ksyms.c +++ b/trunk/arch/blackfin/kernel/bfin_ksyms.c @@ -37,6 +37,9 @@ /* platform dependent support */ EXPORT_SYMBOL(__ioremap); +EXPORT_SYMBOL(strcmp); +EXPORT_SYMBOL(strncmp); +EXPORT_SYMBOL(dump_thread); EXPORT_SYMBOL(ip_fast_csum); @@ -48,7 +51,6 @@ EXPORT_SYMBOL(__down_trylock); EXPORT_SYMBOL(__down_interruptible); EXPORT_SYMBOL(is_in_rom); -EXPORT_SYMBOL(bfin_return_from_exception); /* Networking helper routines. */ EXPORT_SYMBOL(csum_partial_copy); @@ -58,11 +60,13 @@ EXPORT_SYMBOL(csum_partial_copy); * their interface isn't gonna change any time soon now, so * it's OK to leave it out of version control. */ +EXPORT_SYMBOL(strcpy); EXPORT_SYMBOL(memcpy); EXPORT_SYMBOL(memset); EXPORT_SYMBOL(memcmp); EXPORT_SYMBOL(memmove); EXPORT_SYMBOL(memchr); +EXPORT_SYMBOL(get_wchan); /* * libgcc functions - functions that are used internally by the @@ -98,7 +102,6 @@ EXPORT_SYMBOL(outsw); EXPORT_SYMBOL(insw); EXPORT_SYMBOL(outsl); EXPORT_SYMBOL(insl); -EXPORT_SYMBOL(insl_16); EXPORT_SYMBOL(irq_flags); EXPORT_SYMBOL(iounmap); EXPORT_SYMBOL(blackfin_dcache_invalidate_range); diff --git a/trunk/arch/blackfin/kernel/cplbinit.c b/trunk/arch/blackfin/kernel/cplbinit.c index 6320bc45fbba..f2db6a5e2b5b 100644 --- a/trunk/arch/blackfin/kernel/cplbinit.c +++ b/trunk/arch/blackfin/kernel/cplbinit.c @@ -26,22 +26,29 @@ #include #include -u_long icplb_table[MAX_CPLBS + 1]; -u_long dcplb_table[MAX_CPLBS + 1]; +u_long icplb_table[MAX_CPLBS+1]; +u_long dcplb_table[MAX_CPLBS+1]; #ifdef CONFIG_CPLB_SWITCH_TAB_L1 -# define PDT_ATTR __attribute__((l1_data)) +u_long ipdt_table[MAX_SWITCH_I_CPLBS+1]__attribute__((l1_data)); +u_long dpdt_table[MAX_SWITCH_D_CPLBS+1]__attribute__((l1_data)); + +#ifdef CONFIG_CPLB_INFO +u_long ipdt_swapcount_table[MAX_SWITCH_I_CPLBS]__attribute__((l1_data)); +u_long dpdt_swapcount_table[MAX_SWITCH_D_CPLBS]__attribute__((l1_data)); +#endif /* CONFIG_CPLB_INFO */ + #else -# define PDT_ATTR -#endif -u_long ipdt_table[MAX_SWITCH_I_CPLBS + 1] PDT_ATTR; -u_long dpdt_table[MAX_SWITCH_D_CPLBS + 1] PDT_ATTR; +u_long ipdt_table[MAX_SWITCH_I_CPLBS+1]; +u_long dpdt_table[MAX_SWITCH_D_CPLBS+1]; #ifdef CONFIG_CPLB_INFO -u_long ipdt_swapcount_table[MAX_SWITCH_I_CPLBS] PDT_ATTR; -u_long dpdt_swapcount_table[MAX_SWITCH_D_CPLBS] PDT_ATTR; -#endif +u_long ipdt_swapcount_table[MAX_SWITCH_I_CPLBS]; +u_long dpdt_swapcount_table[MAX_SWITCH_D_CPLBS]; +#endif /* CONFIG_CPLB_INFO */ + +#endif /*CONFIG_CPLB_SWITCH_TAB_L1*/ struct s_cplb { struct cplb_tab init_i; @@ -64,7 +71,7 @@ static struct cplb_desc cplb_data[] = { #else .valid = 0, #endif - .name = "Zero Pointer Guard Page", + .name = "ZERO Pointer Saveguard", }, { .start = L1_CODE_START, @@ -95,20 +102,20 @@ static struct cplb_desc cplb_data[] = { .end = 0, /* dynamic */ .psize = 0, .attr = INITIAL_T | SWITCH_T | I_CPLB | D_CPLB, - .i_conf = SDRAM_IGENERIC, - .d_conf = SDRAM_DGENERIC, + .i_conf = SDRAM_IGENERIC, + .d_conf = SDRAM_DGENERIC, .valid = 1, - .name = "Kernel Memory", + .name = "SDRAM Kernel", }, { .start = 0, /* dynamic */ .end = 0, /* dynamic */ .psize = 0, .attr = INITIAL_T | SWITCH_T | D_CPLB, - .i_conf = SDRAM_IGENERIC, - .d_conf = SDRAM_DNON_CHBL, + .i_conf = SDRAM_IGENERIC, + .d_conf = SDRAM_DNON_CHBL, .valid = 1, - .name = "uClinux MTD Memory", + .name = "SDRAM RAM MTD", }, { .start = 0, /* dynamic */ @@ -117,7 +124,7 @@ static struct cplb_desc cplb_data[] = { .attr = INITIAL_T | SWITCH_T | D_CPLB, .d_conf = SDRAM_DNON_CHBL, .valid = 1, - .name = "Uncached DMA Zone", + .name = "SDRAM Uncached DMA ZONE", }, { .start = 0, /* dynamic */ @@ -127,7 +134,7 @@ static struct cplb_desc cplb_data[] = { .i_conf = 0, /* dynamic */ .d_conf = 0, /* dynamic */ .valid = 1, - .name = "Reserved Memory", + .name = "SDRAM Reserved Memory", }, { .start = ASYNC_BANK0_BASE, @@ -136,14 +143,14 @@ static struct cplb_desc cplb_data[] = { .attr = SWITCH_T | D_CPLB, .d_conf = SDRAM_EBIU, .valid = 1, - .name = "Asynchronous Memory Banks", + .name = "ASYNC Memory", }, { -#ifdef L2_START - .start = L2_START, - .end = L2_START + L2_LENGTH, +#if defined(CONFIG_BF561) + .start = L2_SRAM, + .end = L2_SRAM_END, .psize = SIZE_1M, - .attr = SWITCH_T | I_CPLB | D_CPLB, + .attr = SWITCH_T | D_CPLB, .i_conf = L2_MEMORY, .d_conf = L2_MEMORY, .valid = 1, @@ -151,23 +158,13 @@ static struct cplb_desc cplb_data[] = { .valid = 0, #endif .name = "L2 Memory", - }, - { - .start = BOOT_ROM_START, - .end = BOOT_ROM_START + BOOT_ROM_LENGTH, - .psize = SIZE_1M, - .attr = SWITCH_T | I_CPLB | D_CPLB, - .i_conf = SDRAM_IGENERIC, - .d_conf = SDRAM_DGENERIC, - .valid = 1, - .name = "On-Chip BootROM", - }, + } }; static u16 __init lock_kernel_check(u32 start, u32 end) { - if ((end <= (u32) _end && end >= (u32)_stext) || - (start <= (u32) _end && start >= (u32)_stext)) + if ((start <= (u32) _stext && end >= (u32) _end) + || (start >= (u32) _stext && end <= (u32) _end)) return IN_KERNEL; return 0; } @@ -353,7 +350,7 @@ void __init generate_cpl_tables(void) else cplb_data[RES_MEM].i_conf = SDRAM_INON_CHBL; - for (i = ZERO_P; i < ARRAY_SIZE(cplb_data); ++i) { + for (i = ZERO_P; i <= L2_MEM; i++) { if (!cplb_data[i].valid) continue; diff --git a/trunk/arch/blackfin/kernel/early_printk.c b/trunk/arch/blackfin/kernel/early_printk.c index 724f4a5a1d46..6ec518a81113 100644 --- a/trunk/arch/blackfin/kernel/early_printk.c +++ b/trunk/arch/blackfin/kernel/early_printk.c @@ -205,8 +205,7 @@ asmlinkage void __init early_trap_c(struct pt_regs *fp, void *retaddr) if (likely(early_console == NULL)) setup_early_printk(DEFAULT_EARLY_PORT); - dump_bfin_mem((void *)fp->retx); - show_regs(fp); + dump_bfin_regs(fp, retaddr); dump_bfin_trace_buffer(); panic("Died early"); diff --git a/trunk/arch/blackfin/kernel/process.c b/trunk/arch/blackfin/kernel/process.c index 5bf15125f0d6..9124467651c4 100644 --- a/trunk/arch/blackfin/kernel/process.c +++ b/trunk/arch/blackfin/kernel/process.c @@ -134,6 +134,27 @@ void cpu_idle(void) } } +void show_regs(struct pt_regs *regs) +{ + printk(KERN_NOTICE "\n"); + printk(KERN_NOTICE + "PC: %08lu Status: %04lu SysStatus: %04lu RETS: %08lu\n", + regs->pc, regs->astat, regs->seqstat, regs->rets); + printk(KERN_NOTICE + "A0.x: %08lx A0.w: %08lx A1.x: %08lx A1.w: %08lx\n", + regs->a0x, regs->a0w, regs->a1x, regs->a1w); + printk(KERN_NOTICE "P0: %08lx P1: %08lx P2: %08lx P3: %08lx\n", + regs->p0, regs->p1, regs->p2, regs->p3); + printk(KERN_NOTICE "P4: %08lx P5: %08lx\n", regs->p4, regs->p5); + printk(KERN_NOTICE "R0: %08lx R1: %08lx R2: %08lx R3: %08lx\n", + regs->r0, regs->r1, regs->r2, regs->r3); + printk(KERN_NOTICE "R4: %08lx R5: %08lx R6: %08lx R7: %08lx\n", + regs->r4, regs->r5, regs->r6, regs->r7); + + if (!regs->ipend) + printk(KERN_NOTICE "USP: %08lx\n", rdusp()); +} + /* Fill in the fpu structure for a core dump. */ int dump_fpu(struct pt_regs *regs, elf_fpregset_t * fpregs) @@ -217,6 +238,51 @@ copy_thread(int nr, unsigned long clone_flags, return 0; } +/* + * fill in the user structure for a core dump.. + */ +void dump_thread(struct pt_regs *regs, struct user *dump) +{ + dump->magic = CMAGIC; + dump->start_code = 0; + dump->start_stack = rdusp() & ~(PAGE_SIZE - 1); + dump->u_tsize = ((unsigned long)current->mm->end_code) >> PAGE_SHIFT; + dump->u_dsize = ((unsigned long)(current->mm->brk + + (PAGE_SIZE - 1))) >> PAGE_SHIFT; + dump->u_dsize -= dump->u_tsize; + dump->u_ssize = 0; + + if (dump->start_stack < TASK_SIZE) + dump->u_ssize = + ((unsigned long)(TASK_SIZE - + dump->start_stack)) >> PAGE_SHIFT; + + dump->u_ar0 = (struct user_regs_struct *)((int)&dump->regs - (int)dump); + + dump->regs.r0 = regs->r0; + dump->regs.r1 = regs->r1; + dump->regs.r2 = regs->r2; + dump->regs.r3 = regs->r3; + dump->regs.r4 = regs->r4; + dump->regs.r5 = regs->r5; + dump->regs.r6 = regs->r6; + dump->regs.r7 = regs->r7; + dump->regs.p0 = regs->p0; + dump->regs.p1 = regs->p1; + dump->regs.p2 = regs->p2; + dump->regs.p3 = regs->p3; + dump->regs.p4 = regs->p4; + dump->regs.p5 = regs->p5; + dump->regs.orig_p0 = regs->orig_p0; + dump->regs.a0w = regs->a0w; + dump->regs.a1w = regs->a1w; + dump->regs.a0x = regs->a0x; + dump->regs.a1x = regs->a1x; + dump->regs.rets = regs->rets; + dump->regs.astat = regs->astat; + dump->regs.pc = regs->pc; +} + /* * sys_execve() executes a new program. */ diff --git a/trunk/arch/blackfin/kernel/setup.c b/trunk/arch/blackfin/kernel/setup.c index d2822010b7ce..934234f43839 100644 --- a/trunk/arch/blackfin/kernel/setup.c +++ b/trunk/arch/blackfin/kernel/setup.c @@ -43,7 +43,6 @@ #include #include #include -#include #include #include @@ -505,17 +504,13 @@ EXPORT_SYMBOL(get_sclk); unsigned long sclk_to_usecs(unsigned long sclk) { - u64 tmp = USEC_PER_SEC * (u64)sclk; - do_div(tmp, get_sclk()); - return tmp; + return (USEC_PER_SEC * (u64)sclk) / get_sclk(); } EXPORT_SYMBOL(sclk_to_usecs); unsigned long usecs_to_sclk(unsigned long usecs) { - u64 tmp = get_sclk() * (u64)usecs; - do_div(tmp, USEC_PER_SEC); - return tmp; + return (get_sclk() * (u64)usecs) / USEC_PER_SEC; } EXPORT_SYMBOL(usecs_to_sclk); diff --git a/trunk/arch/blackfin/kernel/traps.c b/trunk/arch/blackfin/kernel/traps.c index 21a55ef19cbd..cfa05436c972 100644 --- a/trunk/arch/blackfin/kernel/traps.c +++ b/trunk/arch/blackfin/kernel/traps.c @@ -158,7 +158,7 @@ static void decode_address(char *buf, unsigned long address) } /* we were unable to find this address anywhere */ - sprintf(buf, "<0x%p> /* unknown address */", (void *)address); + sprintf(buf, "[<0x%p>]", (void *)address); done: write_unlock_irqrestore(&tasklist_lock, flags); @@ -169,9 +169,7 @@ asmlinkage void double_fault_c(struct pt_regs *fp) console_verbose(); oops_in_progress = 1; printk(KERN_EMERG "\n" KERN_EMERG "Double Fault\n"); - dump_bfin_process(fp); - dump_bfin_mem((void *)fp->retx); - show_regs(fp); + dump_bfin_regs(fp, (void *)fp->retx); panic("Double Fault - unrecoverable event\n"); } @@ -252,7 +250,7 @@ asmlinkage void trap_c(struct pt_regs *fp) case VEC_EXCPT03: info.si_code = SEGV_STACKFLOW; sig = SIGSEGV; - printk(KERN_NOTICE EXC_0x03(KERN_NOTICE)); + printk(KERN_NOTICE EXC_0x03); CHK_DEBUGGER_TRAP(); break; /* 0x04 - User Defined, Caught by default */ @@ -281,7 +279,7 @@ asmlinkage void trap_c(struct pt_regs *fp) case VEC_OVFLOW: info.si_code = TRAP_TRACEFLOW; sig = SIGTRAP; - printk(KERN_NOTICE EXC_0x11(KERN_NOTICE)); + printk(KERN_NOTICE EXC_0x11); CHK_DEBUGGER_TRAP(); break; /* 0x12 - Reserved, Caught by default */ @@ -303,35 +301,36 @@ asmlinkage void trap_c(struct pt_regs *fp) case VEC_UNDEF_I: info.si_code = ILL_ILLOPC; sig = SIGILL; - printk(KERN_NOTICE EXC_0x21(KERN_NOTICE)); + printk(KERN_NOTICE EXC_0x21); CHK_DEBUGGER_TRAP(); break; /* 0x22 - Illegal Instruction Combination, handled here */ case VEC_ILGAL_I: info.si_code = ILL_ILLPARAOP; sig = SIGILL; - printk(KERN_NOTICE EXC_0x22(KERN_NOTICE)); + printk(KERN_NOTICE EXC_0x22); CHK_DEBUGGER_TRAP(); break; - /* 0x23 - Data CPLB protection violation, handled here */ + /* 0x23 - Data CPLB Protection Violation, + normal case is handled in _cplb_hdr */ case VEC_CPLB_VL: info.si_code = ILL_CPLB_VI; - sig = SIGBUS; - printk(KERN_NOTICE EXC_0x23(KERN_NOTICE)); + sig = SIGILL; + printk(KERN_NOTICE EXC_0x23); CHK_DEBUGGER_TRAP(); break; /* 0x24 - Data access misaligned, handled here */ case VEC_MISALI_D: info.si_code = BUS_ADRALN; sig = SIGBUS; - printk(KERN_NOTICE EXC_0x24(KERN_NOTICE)); + printk(KERN_NOTICE EXC_0x24); CHK_DEBUGGER_TRAP(); break; /* 0x25 - Unrecoverable Event, handled here */ case VEC_UNCOV: info.si_code = ILL_ILLEXCPT; sig = SIGILL; - printk(KERN_NOTICE EXC_0x25(KERN_NOTICE)); + printk(KERN_NOTICE EXC_0x25); CHK_DEBUGGER_TRAP(); break; /* 0x26 - Data CPLB Miss, normal case is handled in _cplb_hdr, @@ -339,7 +338,7 @@ asmlinkage void trap_c(struct pt_regs *fp) case VEC_CPLB_M: info.si_code = BUS_ADRALN; sig = SIGBUS; - printk(KERN_NOTICE EXC_0x26(KERN_NOTICE)); + printk(KERN_NOTICE EXC_0x26); CHK_DEBUGGER_TRAP(); break; /* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero, handled here */ @@ -350,7 +349,7 @@ asmlinkage void trap_c(struct pt_regs *fp) printk(KERN_NOTICE "NULL pointer access (probably)\n"); #else sig = SIGILL; - printk(KERN_NOTICE EXC_0x27(KERN_NOTICE)); + printk(KERN_NOTICE EXC_0x27); #endif CHK_DEBUGGER_TRAP(); break; @@ -358,7 +357,7 @@ asmlinkage void trap_c(struct pt_regs *fp) case VEC_WATCH: info.si_code = TRAP_WATCHPT; sig = SIGTRAP; - pr_debug(EXC_0x28(KERN_DEBUG)); + pr_debug(EXC_0x28); CHK_DEBUGGER_TRAP_MAYBE(); /* Check if this is a watchpoint in kernel space */ if (fp->ipend & 0xffc0) @@ -380,21 +379,22 @@ asmlinkage void trap_c(struct pt_regs *fp) case VEC_MISALI_I: info.si_code = BUS_ADRALN; sig = SIGBUS; - printk(KERN_NOTICE EXC_0x2A(KERN_NOTICE)); + printk(KERN_NOTICE EXC_0x2A); CHK_DEBUGGER_TRAP(); break; - /* 0x2B - Instruction CPLB protection violation, handled here */ + /* 0x2B - Instruction CPLB protection Violation, + handled in _cplb_hdr */ case VEC_CPLB_I_VL: info.si_code = ILL_CPLB_VI; - sig = SIGBUS; - printk(KERN_NOTICE EXC_0x2B(KERN_NOTICE)); + sig = SIGILL; + printk(KERN_NOTICE EXC_0x2B); CHK_DEBUGGER_TRAP(); break; /* 0x2C - Instruction CPLB miss, handled in _cplb_hdr */ case VEC_CPLB_I_M: info.si_code = ILL_CPLB_MISS; sig = SIGBUS; - printk(KERN_NOTICE EXC_0x2C(KERN_NOTICE)); + printk(KERN_NOTICE EXC_0x2C); CHK_DEBUGGER_TRAP(); break; /* 0x2D - Instruction CPLB Multiple Hits, handled here */ @@ -405,7 +405,7 @@ asmlinkage void trap_c(struct pt_regs *fp) printk(KERN_NOTICE "Jump to address 0 - 0x0fff\n"); #else sig = SIGILL; - printk(KERN_NOTICE EXC_0x2D(KERN_NOTICE)); + printk(KERN_NOTICE EXC_0x2D); #endif CHK_DEBUGGER_TRAP(); break; @@ -413,7 +413,7 @@ asmlinkage void trap_c(struct pt_regs *fp) case VEC_ILL_RES: info.si_code = ILL_PRVOPC; sig = SIGILL; - printk(KERN_NOTICE EXC_0x2E(KERN_NOTICE)); + printk(KERN_NOTICE EXC_0x2E); CHK_DEBUGGER_TRAP(); break; /* 0x2F - Reserved, Caught by default */ @@ -446,9 +446,7 @@ asmlinkage void trap_c(struct pt_regs *fp) if (sig != SIGTRAP) { unsigned long stack; - dump_bfin_process(fp); - dump_bfin_mem((void *)fp->retx); - show_regs(fp); + dump_bfin_regs(fp, (void *)fp->retx); /* Print out the trace buffer if it makes sense */ #ifndef CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE @@ -462,25 +460,22 @@ asmlinkage void trap_c(struct pt_regs *fp) show_stack(current, &stack); if (oops_in_progress) { #ifndef CONFIG_ACCESS_CHECK - printk(KERN_EMERG "Please turn on " - "CONFIG_ACCESS_CHECK\n"); + printk(KERN_EMERG "Hey - dork - please turn on " + "CONFIG_ACCESS_CHECK\n"); #endif panic("Kernel exception"); } - } + /* Ensure that bad return addresses don't end up in an infinite + * loop, due to speculative loads/reads + */ + fp->pc = SAFE_USER_INSTRUCTION; + } info.si_signo = sig; info.si_errno = 0; info.si_addr = (void *)fp->pc; force_sig_info(sig, &info, current); - /* Ensure that bad return addresses don't end up in an infinite - * loop, due to speculative loads/reads. This needs to be done after - * the signal has been sent. - */ - if (trapnr == VEC_CPLB_I_M && sig != SIGTRAP) - fp->pc = SAFE_USER_INSTRUCTION; - trace_buffer_restore(j); return; } @@ -605,48 +600,37 @@ void dump_stack(void) show_stack(current, &stack); trace_buffer_restore(tflags); } + EXPORT_SYMBOL(dump_stack); -void dump_bfin_process(struct pt_regs *fp) +void dump_bfin_regs(struct pt_regs *fp, void *retaddr) { - /* We should be able to look at fp->ipend, but we don't push it on the - * stack all the time, so do this until we fix that */ - unsigned int context = bfin_read_IPEND(); - - if (oops_in_progress) - printk(KERN_EMERG "Kernel OOPS in progress\n"); - - if (context & 0x0020) - printk(KERN_NOTICE "Deferred excecption or HW Error context\n"); - else if (context & 0x3FC0) - printk(KERN_NOTICE "Interrupt context\n"); - else if (context & 0x4000) - printk(KERN_NOTICE "Deferred Interrupt context\n"); - else if (context & 0x8000) - printk(KERN_NOTICE "Kernel process context\n"); - - if (current->pid && current->mm) { - printk(KERN_NOTICE "CURRENT PROCESS:\n"); - printk(KERN_NOTICE "COMM=%s PID=%d\n", - current->comm, current->pid); - - printk(KERN_NOTICE "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n" - KERN_NOTICE "BSS = 0x%p-0x%p USER-STACK = 0x%p\n" - KERN_NOTICE "\n", - (void *)current->mm->start_code, - (void *)current->mm->end_code, - (void *)current->mm->start_data, - (void *)current->mm->end_data, - (void *)current->mm->end_data, - (void *)current->mm->brk, - (void *)current->mm->start_stack); - } else - printk(KERN_NOTICE "\n" KERN_NOTICE - "No Valid process in current context\n"); -} + char buf [150]; -void dump_bfin_mem(void *retaddr) -{ + if (!oops_in_progress) { + if (current->pid && current->mm) { + printk(KERN_NOTICE "\n" KERN_NOTICE "CURRENT PROCESS:\n"); + printk(KERN_NOTICE "COMM=%s PID=%d\n", + current->comm, current->pid); + + printk(KERN_NOTICE "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n" + KERN_NOTICE "BSS = 0x%p-0x%p USER-STACK = 0x%p\n" + KERN_NOTICE "\n", + (void *)current->mm->start_code, + (void *)current->mm->end_code, + (void *)current->mm->start_data, + (void *)current->mm->end_data, + (void *)current->mm->end_data, + (void *)current->mm->brk, + (void *)current->mm->start_stack); + } else { + printk (KERN_NOTICE "\n" KERN_NOTICE + "No Valid pid - Either things are really messed up," + " or you are in the kernel\n"); + } + } else { + printk(KERN_NOTICE "Kernel or interrupt exception\n"); + } if (retaddr >= (void *)FIXED_CODE_START && retaddr < (void *)physical_mem_end #if L1_CODE_LENGTH != 0 @@ -687,13 +671,8 @@ void dump_bfin_mem(void *retaddr) printk("\n"); } else printk("\n" KERN_NOTICE - "Cannot look at the [PC] <%p> for it is" - " in unreadable memory - sorry\n", retaddr); -} - -void show_regs(struct pt_regs *fp) -{ - char buf [150]; + "Cannot look at the [PC] for it is" + " in unreadable memory - sorry\n"); printk(KERN_NOTICE "\n" KERN_NOTICE "SEQUENCER STATUS:\n"); printk(KERN_NOTICE " SEQSTAT: %08lx IPEND: %04lx SYSCFG: %04lx\n", @@ -707,8 +686,6 @@ void show_regs(struct pt_regs *fp) printk(KERN_NOTICE " RETX: %s\n", buf); decode_address(buf, fp->rets); printk(KERN_NOTICE " RETS: %s\n", buf); - decode_address(buf, fp->pc); - printk(KERN_NOTICE " PC: %s\n", buf); if ((long)fp->seqstat & SEQSTAT_EXCAUSE) { decode_address(buf, bfin_read_DCPLB_FAULT_ADDR()); @@ -823,9 +800,7 @@ void panic_cplb_error(int cplb_panic, struct pt_regs *fp) printk(KERN_EMERG "DCPLB_FAULT_ADDR=%p\n", (void *)bfin_read_DCPLB_FAULT_ADDR()); printk(KERN_EMERG "ICPLB_FAULT_ADDR=%p\n", (void *)bfin_read_ICPLB_FAULT_ADDR()); - dump_bfin_process(fp); - dump_bfin_mem((void *)fp->retx); - show_regs(fp); + dump_bfin_regs(fp, (void *)fp->retx); dump_stack(); panic("Unrecoverable event\n"); } diff --git a/trunk/arch/blackfin/lib/Makefile b/trunk/arch/blackfin/lib/Makefile index 635288fc5f54..bfdad52c570b 100644 --- a/trunk/arch/blackfin/lib/Makefile +++ b/trunk/arch/blackfin/lib/Makefile @@ -4,7 +4,7 @@ lib-y := \ ashldi3.o ashrdi3.o lshrdi3.o \ - muldi3.o divsi3.o udivsi3.o modsi3.o umodsi3.o \ + muldi3.o divsi3.o udivsi3.o udivdi3.o modsi3.o umodsi3.o \ checksum.o memcpy.o memset.o memcmp.o memchr.o memmove.o \ strcmp.o strcpy.o strncmp.o strncpy.o \ umulsi3_highpart.o smulsi3_highpart.o \ diff --git a/trunk/arch/blackfin/lib/ins.S b/trunk/arch/blackfin/lib/ins.S index df7b8833a0c5..a17cc77ac36f 100644 --- a/trunk/arch/blackfin/lib/ins.S +++ b/trunk/arch/blackfin/lib/ins.S @@ -77,22 +77,3 @@ ENTRY(_insb) sti R3; RTS; ENDPROC(_insb) - - - -ENTRY(_insl_16) - P0 = R0; /* P0 = port */ - cli R3; - P1 = R1; /* P1 = address */ - P2 = R2; /* P2 = count */ - SSYNC; - LSETUP( .Llong16_loop_s, .Llong16_loop_e) LC0 = P2; -.Llong16_loop_s: R0 = [P0]; - W[P1++] = R0; - R0 = R0 >> 16; - W[P1++] = R0; - NOP; -.Llong16_loop_e: NOP; - sti R3; - RTS; -ENDPROC(_insl_16) diff --git a/trunk/arch/blackfin/lib/strcmp.c b/trunk/arch/blackfin/lib/strcmp.c index fde39a1950ce..4eeefd86907f 100644 --- a/trunk/arch/blackfin/lib/strcmp.c +++ b/trunk/arch/blackfin/lib/strcmp.c @@ -1,19 +1,10 @@ -/* - * Provide symbol in case str func is not inlined. - * - * Copyright (c) 2006-2007 Analog Devices Inc. - * - * Licensed under the GPL-2 or later. - */ +#include #define strcmp __inline_strcmp #include #undef strcmp -#include - int strcmp(const char *dest, const char *src) { return __inline_strcmp(dest, src); } -EXPORT_SYMBOL(strcmp); diff --git a/trunk/arch/blackfin/lib/strcpy.c b/trunk/arch/blackfin/lib/strcpy.c index 2a8836b1f4d3..534589db7256 100644 --- a/trunk/arch/blackfin/lib/strcpy.c +++ b/trunk/arch/blackfin/lib/strcpy.c @@ -1,19 +1,10 @@ -/* - * Provide symbol in case str func is not inlined. - * - * Copyright (c) 2006-2007 Analog Devices Inc. - * - * Licensed under the GPL-2 or later. - */ +#include #define strcpy __inline_strcpy #include #undef strcpy -#include - char *strcpy(char *dest, const char *src) { return __inline_strcpy(dest, src); } -EXPORT_SYMBOL(strcpy); diff --git a/trunk/arch/blackfin/lib/strncmp.c b/trunk/arch/blackfin/lib/strncmp.c index 2aaae78a68e0..d791f120bff7 100644 --- a/trunk/arch/blackfin/lib/strncmp.c +++ b/trunk/arch/blackfin/lib/strncmp.c @@ -1,19 +1,10 @@ -/* - * Provide symbol in case str func is not inlined. - * - * Copyright (c) 2006-2007 Analog Devices Inc. - * - * Licensed under the GPL-2 or later. - */ +#include #define strncmp __inline_strncmp #include #undef strncmp -#include - int strncmp(const char *cs, const char *ct, size_t count) { return __inline_strncmp(cs, ct, count); } -EXPORT_SYMBOL(strncmp); diff --git a/trunk/arch/blackfin/lib/strncpy.c b/trunk/arch/blackfin/lib/strncpy.c index ea1dc6bf2373..1fecb5c71ffb 100644 --- a/trunk/arch/blackfin/lib/strncpy.c +++ b/trunk/arch/blackfin/lib/strncpy.c @@ -1,19 +1,10 @@ -/* - * Provide symbol in case str func is not inlined. - * - * Copyright (c) 2006-2007 Analog Devices Inc. - * - * Licensed under the GPL-2 or later. - */ +#include #define strncpy __inline_strncpy #include #undef strncpy -#include - char *strncpy(char *dest, const char *src, size_t n) { return __inline_strncpy(dest, src, n); } -EXPORT_SYMBOL(strncpy); diff --git a/trunk/arch/blackfin/lib/udivdi3.S b/trunk/arch/blackfin/lib/udivdi3.S new file mode 100644 index 000000000000..ad1ebee675e1 --- /dev/null +++ b/trunk/arch/blackfin/lib/udivdi3.S @@ -0,0 +1,375 @@ +/* + * udivdi3.S - unsigned long long division + * + * Copyright 2003-2007 Analog Devices Inc. + * Enter bugs at http://blackfin.uclinux.org/ + * + * Licensed under the GPLv2 or later. + */ + +#include + +#define CARRY AC0 + +#ifdef CONFIG_ARITHMETIC_OPS_L1 +.section .l1.text +#else +.text +#endif + + +ENTRY(___udivdi3) + R3 = [SP + 12]; + [--SP] = (R7:4, P5:3); + + /* Attempt to use divide primitive first; these will handle + ** most cases, and they're quick - avoids stalls incurred by + ** testing for identities. + */ + + R4 = R2 | R3; + CC = R4 == 0; + IF CC JUMP .LDIV_BY_ZERO; + + R4.H = 0x8000; + R4 >>>= 16; // R4 now 0xFFFF8000 + R5 = R0 | R2; // If either dividend or + R4 = R5 & R4; // divisor have bits in + CC = R4; // top half or low half's sign + IF CC JUMP .LIDENTS; // bit, skip builtins. + R4 = R1 | R3; // Also check top halves + CC = R4; + IF CC JUMP .LIDENTS; + + /* Can use the builtins. */ + + AQ = CC; // Clear AQ (CC==0) + DIVQ(R0, R2); + DIVQ(R0, R2); + DIVQ(R0, R2); + DIVQ(R0, R2); + DIVQ(R0, R2); + DIVQ(R0, R2); + DIVQ(R0, R2); + DIVQ(R0, R2); + DIVQ(R0, R2); + DIVQ(R0, R2); + DIVQ(R0, R2); + DIVQ(R0, R2); + DIVQ(R0, R2); + DIVQ(R0, R2); + DIVQ(R0, R2); + DIVQ(R0, R2); + DIVQ(R0, R2); + R0 = R0.L (Z); + R1 = 0; + (R7:4, P5:3) = [SP++]; + RTS; + +.LIDENTS: + /* Test for common identities. Value to be returned is + ** placed in R6,R7. + */ + // Check for 0/y, return 0 + R4 = R0 | R1; + CC = R4 == 0; + IF CC JUMP .LRETURN_R0; + + // Check for x/x, return 1 + R6 = R0 - R2; // If x == y, then both R6 and R7 will be zero + R7 = R1 - R3; + R4 = R6 | R7; // making R4 zero. + R6 += 1; // which would now make R6:R7==1. + CC = R4 == 0; + IF CC JUMP .LRETURN_IDENT; + + // Check for x/1, return x + R6 = R0; + R7 = R1; + CC = R3 == 0; + IF !CC JUMP .Lnexttest; + CC = R2 == 1; + IF CC JUMP .LRETURN_IDENT; + +.Lnexttest: + R4.L = ONES R2; // check for div by power of two which + R5.L = ONES R3; // can be done using a shift + R6 = PACK (R5.L, R4.L); + CC = R6 == 1; + IF CC JUMP .Lpower_of_two_upper_zero; + R6 = PACK (R4.L, R5.L); + CC = R6 == 1; + IF CC JUMP .Lpower_of_two_lower_zero; + + // Check for x < y, return 0 + R6 = 0; + R7 = R6; + CC = R1 < R3 (IU); + IF CC JUMP .LRETURN_IDENT; + CC = R1 == R3; + IF !CC JUMP .Lno_idents; + CC = R0 < R2 (IU); + IF CC JUMP .LRETURN_IDENT; + +.Lno_idents: // Idents don't match. Go for the full operation + + + // If X, or X and Y have high bit set, it'll affect the + // results, so shift right one to stop this. Note: we've already + // checked that X >= Y, so Y's msb won't be set unless X's + // is. + + R4 = 0; + CC = R1 < 0; + IF !CC JUMP .Lx_msb_clear; + CC = !CC; // 1 -> 0; + R1 = ROT R1 BY -1; // Shift X >> 1 + R0 = ROT R0 BY -1; // lsb -> CC + BITSET(R4,31); // to record only x msb was set + CC = R3 < 0; + IF !CC JUMP .Ly_msb_clear; + CC = !CC; + R3 = ROT R3 BY -1; // Shift Y >> 1 + R2 = ROT R2 BY -1; + BITCLR(R4,31); // clear bit to record only x msb was set + +.Ly_msb_clear: +.Lx_msb_clear: + // Bit 31 in R4 indicates X msb set, but Y msb wasn't, and no bits + // were lost, so we should shift result left by one. + + [--SP] = R4; // save for later + + // In the loop that follows, each iteration we add + // either Y' or -Y' to the Remainder. We compute the + // negated Y', and store, for convenience. Y' goes + // into P0:P1, while -Y' goes into P2:P3. + + P0 = R2; + P1 = R3; + R2 = -R2; + CC = CARRY; + CC = !CC; + R4 = CC; + R3 = -R3; + R3 = R3 - R4; + + R6 = 0; // remainder = 0 + R7 = R6; + + [--SP] = R2; P2 = SP; + [--SP] = R3; P3 = SP; + [--SP] = R6; P5 = SP; // AQ = 0 + [--SP] = P1; + + /* In the loop that follows, we use the following + ** register assignments: + ** R0,R1 X, workspace + ** R2,R3 Y, workspace + ** R4,R5 partial Div + ** R6,R7 partial remainder + ** P5 AQ + ** The remainder and div form a 128-bit number, with + ** the remainder in the high 64-bits. + */ + R4 = R0; // Div = X' + R5 = R1; + R3 = 0; + + P4 = 64; // Iterate once per bit + LSETUP(.LULST,.LULEND) LC0 = P4; +.LULST: + /* Shift Div and remainder up by one. The bit shifted + ** out of the top of the quotient is shifted into the bottom + ** of the remainder. + */ + CC = R3; + R4 = ROT R4 BY 1; + R5 = ROT R5 BY 1 || // low q to high q + R2 = [P5]; // load saved AQ + R6 = ROT R6 BY 1 || // high q to low r + R0 = [P2]; // load -Y' + R7 = ROT R7 BY 1 || // low r to high r + R1 = [P3]; + + // Assume add -Y' + CC = R2 < 0; // But if AQ is set... + IF CC R0 = P0; // then add Y' instead + IF CC R1 = P1; + + R6 = R6 + R0; // Rem += (Y' or -Y') + CC = CARRY; + R0 = CC; + R7 = R7 + R1; + R7 = R7 + R0 (NS) || + R1 = [SP]; + // Set the next AQ bit + R1 = R7 ^ R1; // from Remainder and Y' + R1 = R1 >> 31 || // Negate AQ's value, and + [P5] = R1; // save next AQ + BITTGL(R1, 0); // add neg AQ to the Div +.LULEND: R4 = R4 + R1; + + R6 = [SP + 16]; + + R0 = R4; + R1 = R5; + CC = BITTST(R6,30); // Just set CC=0 + R4 = ROT R0 BY 1; // but if we had to shift X, + R5 = ROT R1 BY 1; // and didn't shift any bits out, + CC = BITTST(R6,31); // then the result will be half as + IF CC R0 = R4; // much as required, so shift left + IF CC R1 = R5; // one space. + + SP += 20; + (R7:4, P5:3) = [SP++]; + RTS; + +.Lpower_of_two: + /* Y has a single bit set, which means it's a power of two. + ** That means we can perform the division just by shifting + ** X to the right the appropriate number of bits + */ + + /* signbits returns the number of sign bits, minus one. + ** 1=>30, 2=>29, ..., 0x40000000=>0. Which means we need + ** to shift right n-signbits spaces. It also means 0x80000000 + ** is a special case, because that *also* gives a signbits of 0 + */ +.Lpower_of_two_lower_zero: + R7 = 0; + R6 = R1 >> 31; + CC = R3 < 0; + IF CC JUMP .LRETURN_IDENT; + + R2.L = SIGNBITS R3; + R2 = R2.L (Z); + R2 += -62; + (R7:4, P5:3) = [SP++]; + JUMP ___lshftli; + +.Lpower_of_two_upper_zero: + CC = R2 < 0; + IF CC JUMP .Lmaxint_shift; + + R2.L = SIGNBITS R2; + R2 = R2.L (Z); + R2 += -30; + (R7:4, P5:3) = [SP++]; + JUMP ___lshftli; + +.Lmaxint_shift: + R2 = -31; + (R7:4, P5:3) = [SP++]; + JUMP ___lshftli; + +.LRETURN_IDENT: + R0 = R6; + R1 = R7; +.LRETURN_R0: + (R7:4, P5:3) = [SP++]; + RTS; +.LDIV_BY_ZERO: + R0 = ~R2; + R1 = R0; + (R7:4, P5:3) = [SP++]; + RTS; + +ENDPROC(___udivdi3) + + +ENTRY(___lshftli) + CC = R2 == 0; + IF CC JUMP .Lfinished; // nothing to do + CC = R2 < 0; + IF CC JUMP .Lrshift; + R3 = 64; + CC = R2 < R3; + IF !CC JUMP .Lretzero; + + // We're shifting left, and it's less than 64 bits, so + // a valid result will be returned. + + R3 >>= 1; // R3 now 32 + CC = R2 < R3; + + IF !CC JUMP .Lzerohalf; + + // We're shifting left, between 1 and 31 bits, which means + // some of the low half will be shifted into the high half. + // Work out how much. + + R3 = R3 - R2; + + // Save that much data from the bottom half. + + P1 = R7; + R7 = R0; + R7 >>= R3; + + // Adjust both parts of the parameter. + + R0 <<= R2; + R1 <<= R2; + + // And include the bits moved across. + + R1 = R1 | R7; + R7 = P1; + RTS; + +.Lzerohalf: + // We're shifting left, between 32 and 63 bits, so the + // bottom half will become zero, and the top half will + // lose some bits. How many? + + R2 = R2 - R3; // N - 32 + R1 = LSHIFT R0 BY R2.L; + R0 = R0 - R0; + RTS; + +.Lretzero: + R0 = R0 - R0; + R1 = R0; +.Lfinished: + RTS; + +.Lrshift: + // We're shifting right, but by how much? + R2 = -R2; + R3 = 64; + CC = R2 < R3; + IF !CC JUMP .Lretzero; + + // Shifting right less than 64 bits, so some result bits will + // be retained. + + R3 >>= 1; // R3 now 32 + CC = R2 < R3; + IF !CC JUMP .Lsignhalf; + + // Shifting right between 1 and 31 bits, so need to copy + // data across words. + + P1 = R7; + R3 = R3 - R2; + R7 = R1; + R7 <<= R3; + R1 >>= R2; + R0 >>= R2; + R0 = R7 | R0; + R7 = P1; + RTS; + +.Lsignhalf: + // Shifting right between 32 and 63 bits, so the top half + // will become all zero-bits, and the bottom half is some + // of the top half. But how much? + + R2 = R2 - R3; + R0 = R1; + R0 >>= R2; + R1 = 0; + RTS; + +ENDPROC(___lshftli) diff --git a/trunk/arch/blackfin/mach-bf527/Kconfig b/trunk/arch/blackfin/mach-bf527/Kconfig index 5c736837d4bf..50321f723dee 100644 --- a/trunk/arch/blackfin/mach-bf527/Kconfig +++ b/trunk/arch/blackfin/mach-bf527/Kconfig @@ -1,7 +1,5 @@ if (BF52x) -source "arch/blackfin/mach-bf527/boards/Kconfig" - menu "BF527 Specific Configuration" comment "Alternative Multiplexing Scheme" diff --git a/trunk/arch/blackfin/mach-bf527/boards/Kconfig b/trunk/arch/blackfin/mach-bf527/boards/Kconfig deleted file mode 100644 index 6a570ad03746..000000000000 --- a/trunk/arch/blackfin/mach-bf527/boards/Kconfig +++ /dev/null @@ -1,12 +0,0 @@ -choice - prompt "System type" - default BFIN527_EZKIT - help - Select your board! - -config BFIN527_EZKIT - bool "BF527-EZKIT" - help - BF527-EZKIT-LITE board support. - -endchoice diff --git a/trunk/arch/blackfin/mach-bf527/boards/Makefile b/trunk/arch/blackfin/mach-bf527/boards/Makefile index 7277d35ef111..912ac8ebc889 100644 --- a/trunk/arch/blackfin/mach-bf527/boards/Makefile +++ b/trunk/arch/blackfin/mach-bf527/boards/Makefile @@ -1,5 +1,7 @@ # -# arch/blackfin/mach-bf527/boards/Makefile +# arch/blackfin/mach-bf532/boards/Makefile # -obj-$(CONFIG_BFIN527_EZKIT) += ezkit.o +obj-y += eth_mac.o +obj-$(CONFIG_BFIN527_EZKIT) += ezkit.o + diff --git a/trunk/arch/blackfin/mach-bf527/boards/eth_mac.c b/trunk/arch/blackfin/mach-bf527/boards/eth_mac.c new file mode 100644 index 000000000000..a725cc8a9290 --- /dev/null +++ b/trunk/arch/blackfin/mach-bf527/boards/eth_mac.c @@ -0,0 +1,50 @@ +/* + * arch/blackfin/mach-bf537/board/eth_mac.c + * + * Copyright (C) 2007 Analog Devices, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include + +#if defined(CONFIG_GENERIC_BOARD) || defined(CONFIG_BFIN537_STAMP) + +/* + * Currently the MAC address is saved in Flash by U-Boot + */ +#define FLASH_MAC 0x203f0000 + +void get_bf537_ether_addr(char *addr) +{ + unsigned int flash_mac = (unsigned int) FLASH_MAC; + *(u32 *)(&(addr[0])) = bfin_read32(flash_mac); + flash_mac += 4; + *(u16 *)(&(addr[4])) = bfin_read16(flash_mac); +} + +#else + +/* + * Provide MAC address function for other specific board setting + */ +void get_bf537_ether_addr(char *addr) +{ + printk(KERN_WARNING "%s: No valid Ethernet MAC address found\n", __FILE__); +} + +#endif + +EXPORT_SYMBOL(get_bf537_ether_addr); diff --git a/trunk/arch/blackfin/mach-bf527/boards/ezkit.c b/trunk/arch/blackfin/mach-bf527/boards/ezkit.c index 003e2ac654d8..bf1bedcc8868 100644 --- a/trunk/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/trunk/arch/blackfin/mach-bf527/boards/ezkit.c @@ -35,18 +35,17 @@ #include #include #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) -#include +#include #endif #include #include #include -#include +#include #include #include #include #include #include -#include #include /* @@ -451,13 +450,6 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { }; #endif -#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ - && defined(CONFIG_SND_SOC_WM8731_SPI) -static struct bfin5xx_spi_chip spi_wm8731_chip_info = { - .enable_dma = 0, - .bits_per_word = 16, -}; -#endif static struct spi_board_info bfin_spi_board_info[] __initdata = { #if defined(CONFIG_MTD_M25P80) \ || defined(CONFIG_MTD_M25P80_MODULE) @@ -559,29 +551,17 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { .platform_data = &bfin_ad7877_ts_info, .irq = IRQ_PF6, .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ - .bus_num = 0, + .bus_num = 1, .chip_select = 1, .controller_data = &spi_ad7877_chip_info, }, #endif -#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ - && defined(CONFIG_SND_SOC_WM8731_SPI) - { - .modalias = "wm8731", - .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ - .bus_num = 0, - .chip_select = 5, - .controller_data = &spi_wm8731_chip_info, - .mode = SPI_MODE_0, - }, -#endif }; /* SPI controller data */ static struct bfin5xx_spi_master bfin_spi0_info = { .num_chipselect = 8, .enable_dma = 1, /* master has the ability to do dma transfer */ - .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, }; /* SPI (0) */ @@ -808,14 +788,3 @@ void native_machine_restart(char *cmd) if ((bfin_read_SYSCR() & 0x7) == 0x3) bfin_gpio_reset_spi0_ssel1(); } - -/* - * Currently the MAC address is saved in Flash by U-Boot - */ -#define FLASH_MAC 0x203f0000 -void bfin_get_ether_addr(char *addr) -{ - *(u32 *)(&(addr[0])) = bfin_read32(FLASH_MAC); - *(u16 *)(&(addr[4])) = bfin_read16(FLASH_MAC + 4); -} -EXPORT_SYMBOL(bfin_get_ether_addr); diff --git a/trunk/arch/blackfin/mach-bf533/Kconfig b/trunk/arch/blackfin/mach-bf533/Kconfig index 76beb75f12da..14297b3ed5c3 100644 --- a/trunk/arch/blackfin/mach-bf533/Kconfig +++ b/trunk/arch/blackfin/mach-bf533/Kconfig @@ -1,7 +1,5 @@ if (BF533 || BF532 || BF531) -source "arch/blackfin/mach-bf533/boards/Kconfig" - menu "BF533/2/1 Specific Configuration" comment "Interrupt Priority Assignment" diff --git a/trunk/arch/blackfin/mach-bf533/boards/H8606.c b/trunk/arch/blackfin/mach-bf533/boards/H8606.c index 6bcf4047f89c..b941550f9568 100644 --- a/trunk/arch/blackfin/mach-bf533/boards/H8606.c +++ b/trunk/arch/blackfin/mach-bf533/boards/H8606.c @@ -36,21 +36,20 @@ #include #include #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) -#include +#include #endif #include #include #include #include #include -#include /* * Name the Board for the /proc/cpuinfo */ const char bfin_board_name[] = "HV Sistemas H8606"; -#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) +#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_BFIN_MODULE) static struct platform_device rtc_device = { .name = "rtc-bfin", .id = -1, @@ -94,6 +93,10 @@ static struct resource smc91x_resources[] = { .end = IRQ_PROG_INTB, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, }, { + /* + * denotes the flag pin and is used directly if + * CONFIG_IRQCHIP_DEMUX_GPIO is defined. + */ .start = IRQ_PF7, .end = IRQ_PF7, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, @@ -266,7 +269,6 @@ static struct resource bfin_spi0_resource[] = { static struct bfin5xx_spi_master bfin_spi0_info = { .num_chipselect = 8, .enable_dma = 1, /* master has the ability to do dma transfer */ - .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, }; static struct platform_device bfin_spi0_device = { @@ -340,4 +342,4 @@ static int __init H8606_init(void) return 0; } -arch_initcall(H8606_init); +arch_initcall(H8606_init); \ No newline at end of file diff --git a/trunk/arch/blackfin/mach-bf533/boards/Kconfig b/trunk/arch/blackfin/mach-bf533/boards/Kconfig deleted file mode 100644 index 751de5110afc..000000000000 --- a/trunk/arch/blackfin/mach-bf533/boards/Kconfig +++ /dev/null @@ -1,34 +0,0 @@ -choice - prompt "System type" - default BFIN533_STAMP - help - Select your board! - -config BFIN533_EZKIT - bool "BF533-EZKIT" - help - BF533-EZKIT-LITE board support. - -config BFIN533_STAMP - bool "BF533-STAMP" - help - BF533-STAMP board support. - -config BFIN533_BLUETECHNIX_CM - bool "Bluetechnix CM-BF533" - depends on (BF533) - help - CM-BF533 support for EVAL- and DEV-Board. - -config H8606_HVSISTEMAS - bool "HV Sistemas H8606" - depends on (BF532) - help - HV Sistemas H8606 board support. - -config GENERIC_BF533_BOARD - bool "Generic" - help - Generic or Custom board support. - -endchoice diff --git a/trunk/arch/blackfin/mach-bf533/boards/Makefile b/trunk/arch/blackfin/mach-bf533/boards/Makefile index 54f57fb9791e..2452b456ccbd 100644 --- a/trunk/arch/blackfin/mach-bf533/boards/Makefile +++ b/trunk/arch/blackfin/mach-bf533/boards/Makefile @@ -2,7 +2,7 @@ # arch/blackfin/mach-bf533/boards/Makefile # -obj-$(CONFIG_GENERIC_BF533_BOARD) += generic_board.o +obj-$(CONFIG_GENERIC_BOARD) += generic_board.o obj-$(CONFIG_BFIN533_STAMP) += stamp.o obj-$(CONFIG_BFIN533_EZKIT) += ezkit.o obj-$(CONFIG_BFIN533_BLUETECHNIX_CM) += cm_bf533.o diff --git a/trunk/arch/blackfin/mach-bf533/boards/cm_bf533.c b/trunk/arch/blackfin/mach-bf533/boards/cm_bf533.c index 21df2f375497..a863522a4467 100644 --- a/trunk/arch/blackfin/mach-bf533/boards/cm_bf533.c +++ b/trunk/arch/blackfin/mach-bf533/boards/cm_bf533.c @@ -33,12 +33,11 @@ #include #include #include -#include +#include #include #include #include #include -#include /* * Name the Board for the /proc/cpuinfo @@ -176,7 +175,6 @@ static struct resource bfin_spi0_resource[] = { static struct bfin5xx_spi_master bfin_spi0_info = { .num_chipselect = 8, .enable_dma = 1, /* master has the ability to do dma transfer */ - .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, }; static struct platform_device bfin_spi0_device = { diff --git a/trunk/arch/blackfin/mach-bf533/boards/ezkit.c b/trunk/arch/blackfin/mach-bf533/boards/ezkit.c index be852034a68b..34b63920e272 100644 --- a/trunk/arch/blackfin/mach-bf533/boards/ezkit.c +++ b/trunk/arch/blackfin/mach-bf533/boards/ezkit.c @@ -34,12 +34,11 @@ #include #include #include -#include +#include #include #include #include #include -#include /* * Name the Board for the /proc/cpuinfo @@ -188,7 +187,6 @@ static struct resource bfin_spi0_resource[] = { static struct bfin5xx_spi_master bfin_spi0_info = { .num_chipselect = 8, .enable_dma = 1, /* master has the ability to do dma transfer */ - .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, }; static struct platform_device bfin_spi0_device = { diff --git a/trunk/arch/blackfin/mach-bf533/boards/generic_board.c b/trunk/arch/blackfin/mach-bf533/boards/generic_board.c index e359a0d6467f..310b7772c458 100644 --- a/trunk/arch/blackfin/mach-bf533/boards/generic_board.c +++ b/trunk/arch/blackfin/mach-bf533/boards/generic_board.c @@ -58,6 +58,10 @@ static struct resource smc91x_resources[] = { .end = IRQ_PROG_INTB, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, }, { + /* + * denotes the flag pin and is used directly if + * CONFIG_IRQCHIP_DEMUX_GPIO is defined. + */ .start = IRQ_PF7, .end = IRQ_PF7, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, diff --git a/trunk/arch/blackfin/mach-bf533/boards/stamp.c b/trunk/arch/blackfin/mach-bf533/boards/stamp.c index 8fde8d832850..62ffa500420f 100644 --- a/trunk/arch/blackfin/mach-bf533/boards/stamp.c +++ b/trunk/arch/blackfin/mach-bf533/boards/stamp.c @@ -35,14 +35,13 @@ #include #include #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) -#include +#include #endif #include #include #include #include #include -#include /* * Name the Board for the /proc/cpuinfo @@ -287,7 +286,6 @@ static struct resource bfin_spi0_resource[] = { static struct bfin5xx_spi_master bfin_spi0_info = { .num_chipselect = 8, .enable_dma = 1, /* master has the ability to do dma transfer */ - .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, }; static struct platform_device bfin_spi0_device = { diff --git a/trunk/arch/blackfin/mach-bf537/Kconfig b/trunk/arch/blackfin/mach-bf537/Kconfig index 8255374c04aa..e6648db09519 100644 --- a/trunk/arch/blackfin/mach-bf537/Kconfig +++ b/trunk/arch/blackfin/mach-bf537/Kconfig @@ -1,7 +1,5 @@ if (BF537 || BF534 || BF536) -source "arch/blackfin/mach-bf537/boards/Kconfig" - menu "BF537 Specific Configuration" comment "Interrupt Priority Assignment" diff --git a/trunk/arch/blackfin/mach-bf537/boards/Kconfig b/trunk/arch/blackfin/mach-bf537/boards/Kconfig deleted file mode 100644 index 96a15196e416..000000000000 --- a/trunk/arch/blackfin/mach-bf537/boards/Kconfig +++ /dev/null @@ -1,29 +0,0 @@ -choice - prompt "System type" - default BFIN537_STAMP - help - Select your board! - -config BFIN537_STAMP - bool "BF537-STAMP" - help - BF537-STAMP board support. - -config BFIN537_BLUETECHNIX_CM - bool "Bluetechnix CM-BF537" - depends on (BF537) - help - CM-BF537 support for EVAL- and DEV-Board. - -config PNAV10 - bool "PNAV board" - depends on (BF537) - help - PNAV board support. - -config GENERIC_BF537_BOARD - bool "Generic" - help - Generic or Custom board support. - -endchoice diff --git a/trunk/arch/blackfin/mach-bf537/boards/Makefile b/trunk/arch/blackfin/mach-bf537/boards/Makefile index 94a85174283a..23323cacc3aa 100644 --- a/trunk/arch/blackfin/mach-bf537/boards/Makefile +++ b/trunk/arch/blackfin/mach-bf537/boards/Makefile @@ -2,7 +2,8 @@ # arch/blackfin/mach-bf537/boards/Makefile # -obj-$(CONFIG_GENERIC_BF537_BOARD) += generic_board.o -obj-$(CONFIG_BFIN537_STAMP) += stamp.o led.o -obj-$(CONFIG_BFIN537_BLUETECHNIX_CM) += cm_bf537.o -obj-$(CONFIG_PNAV10) += pnav10.o +obj-y += eth_mac.o +obj-$(CONFIG_GENERIC_BOARD) += generic_board.o +obj-$(CONFIG_BFIN537_STAMP) += stamp.o led.o +obj-$(CONFIG_BFIN537_BLUETECHNIX_CM) += cm_bf537.o +obj-$(CONFIG_PNAV10) += pnav10.o diff --git a/trunk/arch/blackfin/mach-bf537/boards/cm_bf537.c b/trunk/arch/blackfin/mach-bf537/boards/cm_bf537.c index c0fb06dbc42e..2915931045e3 100644 --- a/trunk/arch/blackfin/mach-bf537/boards/cm_bf537.c +++ b/trunk/arch/blackfin/mach-bf537/boards/cm_bf537.c @@ -34,12 +34,11 @@ #include #include #include -#include +#include #include #include #include #include -#include /* * Name the Board for the /proc/cpuinfo @@ -195,7 +194,6 @@ static struct resource bfin_spi0_resource[] = { static struct bfin5xx_spi_master bfin_spi0_info = { .num_chipselect = 8, .enable_dma = 1, /* master has the ability to do dma transfer */ - .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, }; static struct platform_device bfin_spi0_device = { @@ -427,10 +425,3 @@ static int __init cm_bf537_init(void) } arch_initcall(cm_bf537_init); - -void bfin_get_ether_addr(char *addr) -{ - random_ether_addr(addr); - printk(KERN_WARNING "%s:%s: Setting Ethernet MAC to a random one\n", __FILE__, __func__); -} -EXPORT_SYMBOL(bfin_get_ether_addr); diff --git a/trunk/arch/blackfin/mach-bf537/boards/eth_mac.c b/trunk/arch/blackfin/mach-bf537/boards/eth_mac.c new file mode 100644 index 000000000000..a725cc8a9290 --- /dev/null +++ b/trunk/arch/blackfin/mach-bf537/boards/eth_mac.c @@ -0,0 +1,50 @@ +/* + * arch/blackfin/mach-bf537/board/eth_mac.c + * + * Copyright (C) 2007 Analog Devices, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include + +#if defined(CONFIG_GENERIC_BOARD) || defined(CONFIG_BFIN537_STAMP) + +/* + * Currently the MAC address is saved in Flash by U-Boot + */ +#define FLASH_MAC 0x203f0000 + +void get_bf537_ether_addr(char *addr) +{ + unsigned int flash_mac = (unsigned int) FLASH_MAC; + *(u32 *)(&(addr[0])) = bfin_read32(flash_mac); + flash_mac += 4; + *(u16 *)(&(addr[4])) = bfin_read16(flash_mac); +} + +#else + +/* + * Provide MAC address function for other specific board setting + */ +void get_bf537_ether_addr(char *addr) +{ + printk(KERN_WARNING "%s: No valid Ethernet MAC address found\n", __FILE__); +} + +#endif + +EXPORT_SYMBOL(get_bf537_ether_addr); diff --git a/trunk/arch/blackfin/mach-bf537/boards/generic_board.c b/trunk/arch/blackfin/mach-bf537/boards/generic_board.c index 09f4bfbd2350..255da7a98481 100644 --- a/trunk/arch/blackfin/mach-bf537/boards/generic_board.c +++ b/trunk/arch/blackfin/mach-bf537/boards/generic_board.c @@ -35,7 +35,7 @@ #include #include #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) -#include +#include #endif #include #include @@ -44,7 +44,6 @@ #include #include #include -#include #include /* @@ -503,7 +502,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { .platform_data = &bfin_ad7877_ts_info, .irq = IRQ_PF6, .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ - .bus_num = 0, + .bus_num = 1, .chip_select = 1, .controller_data = &spi_ad7877_chip_info, }, @@ -514,7 +513,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct bfin5xx_spi_master bfin_spi0_info = { .num_chipselect = 8, .enable_dma = 1, /* master has the ability to do dma transfer */ - .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, }; /* SPI (0) */ @@ -732,10 +730,3 @@ void native_machine_restart(char *cmd) if ((bfin_read_SYSCR() & 0x7) == 0x3) bfin_gpio_reset_spi0_ssel1(); } - -void bfin_get_ether_addr(char *addr) -{ - random_ether_addr(addr); - printk(KERN_WARNING "%s:%s: Setting Ethernet MAC to a random one\n", __FILE__, __func__); -} -EXPORT_SYMBOL(bfin_get_ether_addr); diff --git a/trunk/arch/blackfin/mach-bf537/boards/pnav10.c b/trunk/arch/blackfin/mach-bf537/boards/pnav10.c index fd5f4a6f08e4..87b808926789 100644 --- a/trunk/arch/blackfin/mach-bf537/boards/pnav10.c +++ b/trunk/arch/blackfin/mach-bf537/boards/pnav10.c @@ -35,12 +35,11 @@ #include #include #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) -#include +#include #endif #include #include #include -#include #include #include @@ -296,7 +295,7 @@ static struct bfin5xx_spi_chip spi_mmc_chip_info = { #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) static struct bfin5xx_spi_chip spi_ad7877_chip_info = { - .cs_change_per_word = 0, + .cs_change_per_word = 1, .enable_dma = 0, .bits_per_word = 16, }; @@ -388,7 +387,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { .platform_data = &bfin_ad7877_ts_info, .irq = IRQ_PF2, .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ - .bus_num = 0, + .bus_num = 1, .chip_select = 5, .controller_data = &spi_ad7877_chip_info, }, @@ -414,7 +413,6 @@ static struct resource bfin_spi0_resource[] = { static struct bfin5xx_spi_master bfin_spi0_info = { .num_chipselect = 8, .enable_dma = 1, /* master has the ability to do dma transfer */ - .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, }; static struct platform_device bfin_spi0_device = { @@ -510,10 +508,3 @@ static int __init stamp_init(void) } arch_initcall(stamp_init); - -void bfin_get_ether_addr(char *addr) -{ - random_ether_addr(addr); - printk(KERN_WARNING "%s:%s: Setting Ethernet MAC to a random one\n", __FILE__, __func__); -} -EXPORT_SYMBOL(bfin_get_ether_addr); diff --git a/trunk/arch/blackfin/mach-bf537/boards/stamp.c b/trunk/arch/blackfin/mach-bf537/boards/stamp.c index 07b0dc273d2f..5f7b91fbafe8 100644 --- a/trunk/arch/blackfin/mach-bf537/boards/stamp.c +++ b/trunk/arch/blackfin/mach-bf537/boards/stamp.c @@ -35,7 +35,7 @@ #include #include #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) -#include +#include #endif #include #include @@ -44,7 +44,6 @@ #include #include #include -#include #include /* @@ -183,28 +182,6 @@ static struct platform_device dm9000_device = { }; #endif -#if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE) -static struct resource ax88180_resources[] = { - [0] = { - .start = 0x20300000, - .end = 0x20300000 + 0x8000, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_PF7, - .end = IRQ_PF7, - .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL), - }, -}; - -static struct platform_device ax88180_device = { - .name = "ax88180", - .id = -1, - .num_resources = ARRAY_SIZE(ax88180_resources), - .resource = ax88180_resources, -}; -#endif - #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) static struct resource sl811_hcd_resources[] = { { @@ -525,7 +502,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { .platform_data = &bfin_ad7877_ts_info, .irq = IRQ_PF6, .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ - .bus_num = 0, + .bus_num = 1, .chip_select = 1, .controller_data = &spi_ad7877_chip_info, }, @@ -536,7 +513,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct bfin5xx_spi_master bfin_spi0_info = { .num_chipselect = 8, .enable_dma = 1, /* master has the ability to do dma transfer */ - .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, }; /* SPI (0) */ @@ -578,20 +554,15 @@ static struct platform_device bfin_fb_adv7393_device = { #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) static struct resource bfin_uart_resources[] = { -#ifdef CONFIG_SERIAL_BFIN_UART0 { .start = 0xFFC00400, .end = 0xFFC004FF, .flags = IORESOURCE_MEM, - }, -#endif -#ifdef CONFIG_SERIAL_BFIN_UART1 - { + }, { .start = 0xFFC02000, .end = 0xFFC020FF, .flags = IORESOURCE_MEM, }, -#endif }; static struct platform_device bfin_uart_device = { @@ -698,10 +669,6 @@ static struct platform_device *stamp_devices[] __initdata = { &dm9000_device, #endif -#if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE) - &ax88180_device, -#endif - #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) &bfin_mac_device, #endif @@ -763,14 +730,3 @@ void native_machine_restart(char *cmd) if ((bfin_read_SYSCR() & 0x7) == 0x3) bfin_gpio_reset_spi0_ssel1(); } - -/* - * Currently the MAC address is saved in Flash by U-Boot - */ -#define FLASH_MAC 0x203f0000 -void bfin_get_ether_addr(char *addr) -{ - *(u32 *)(&(addr[0])) = bfin_read32(FLASH_MAC); - *(u16 *)(&(addr[4])) = bfin_read16(FLASH_MAC + 4); -} -EXPORT_SYMBOL(bfin_get_ether_addr); diff --git a/trunk/arch/blackfin/mach-bf548/Kconfig b/trunk/arch/blackfin/mach-bf548/Kconfig index d8bd3b49f150..08d8dc83701c 100644 --- a/trunk/arch/blackfin/mach-bf548/Kconfig +++ b/trunk/arch/blackfin/mach-bf548/Kconfig @@ -1,7 +1,5 @@ if (BF54x) -source "arch/blackfin/mach-bf548/boards/Kconfig" - menu "BF548 Specific Configuration" config DEB_DMA_URGENT diff --git a/trunk/arch/blackfin/mach-bf548/boards/Kconfig b/trunk/arch/blackfin/mach-bf548/boards/Kconfig deleted file mode 100644 index 057129064037..000000000000 --- a/trunk/arch/blackfin/mach-bf548/boards/Kconfig +++ /dev/null @@ -1,12 +0,0 @@ -choice - prompt "System type" - default BFIN548_EZKIT - help - Select your board! - -config BFIN548_EZKIT - bool "BF548-EZKIT" - help - BFIN548-EZKIT board support. - -endchoice diff --git a/trunk/arch/blackfin/mach-bf548/boards/Makefile b/trunk/arch/blackfin/mach-bf548/boards/Makefile index a444cc739578..486e07c99a51 100644 --- a/trunk/arch/blackfin/mach-bf548/boards/Makefile +++ b/trunk/arch/blackfin/mach-bf548/boards/Makefile @@ -2,4 +2,4 @@ # arch/blackfin/mach-bf548/boards/Makefile # -obj-$(CONFIG_BFIN548_EZKIT) += ezkit.o led.o +obj-$(CONFIG_BFIN548_EZKIT) += ezkit.o led.o diff --git a/trunk/arch/blackfin/mach-bf548/boards/ezkit.c b/trunk/arch/blackfin/mach-bf548/boards/ezkit.c index d37d6653c4bc..6b6490e66b30 100644 --- a/trunk/arch/blackfin/mach-bf548/boards/ezkit.c +++ b/trunk/arch/blackfin/mach-bf548/boards/ezkit.c @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include @@ -378,7 +377,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) static struct bfin5xx_spi_chip spi_ad7877_chip_info = { - .cs_change_per_word = 0, + .cs_change_per_word = 1, .enable_dma = 0, .bits_per_word = 16, }; @@ -454,10 +453,9 @@ static struct resource bfin_spi1_resource[] = { }; /* SPI controller data */ -static struct bfin5xx_spi_master bf54x_spi_master_info0 = { +static struct bfin5xx_spi_master bf54x_spi_master_info = { .num_chipselect = 8, .enable_dma = 1, /* master has the ability to do dma transfer */ - .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, }; static struct platform_device bf54x_spi_master0 = { @@ -466,23 +464,17 @@ static struct platform_device bf54x_spi_master0 = { .num_resources = ARRAY_SIZE(bfin_spi0_resource), .resource = bfin_spi0_resource, .dev = { - .platform_data = &bf54x_spi_master_info0, /* Passed to driver */ + .platform_data = &bf54x_spi_master_info, /* Passed to driver */ }, }; -static struct bfin5xx_spi_master bf54x_spi_master_info1 = { - .num_chipselect = 8, - .enable_dma = 1, /* master has the ability to do dma transfer */ - .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0}, -}; - static struct platform_device bf54x_spi_master1 = { .name = "bfin-spi", .id = 1, /* Bus number */ .num_resources = ARRAY_SIZE(bfin_spi1_resource), .resource = bfin_spi1_resource, .dev = { - .platform_data = &bf54x_spi_master_info1, /* Passed to driver */ + .platform_data = &bf54x_spi_master_info, /* Passed to driver */ }, }; #endif /* spi master and devices */ @@ -508,7 +500,6 @@ static struct platform_device i2c_bfin_twi0_device = { .resource = bfin_twi0_resource, }; -#if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */ static struct resource bfin_twi1_resource[] = { [0] = { .start = TWI1_REGBASE, @@ -529,7 +520,6 @@ static struct platform_device i2c_bfin_twi1_device = { .resource = bfin_twi1_resource, }; #endif -#endif static struct platform_device *ezkit_devices[] __initdata = { #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) @@ -579,10 +569,8 @@ static struct platform_device *ezkit_devices[] __initdata = { #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) &i2c_bfin_twi0_device, -#if !defined(CONFIG_BF542) &i2c_bfin_twi1_device, #endif -#endif }; static int __init stamp_init(void) diff --git a/trunk/arch/blackfin/mach-bf548/head.S b/trunk/arch/blackfin/mach-bf548/head.S index 74b34c7f3629..3071c243d426 100644 --- a/trunk/arch/blackfin/mach-bf548/head.S +++ b/trunk/arch/blackfin/mach-bf548/head.S @@ -158,27 +158,6 @@ ENTRY(__stext) w[p2] = r0; ssync; - p2.h = hi(EBIU_MBSCTL); - p2.l = lo(EBIU_MBSCTL); - r0.h = hi(CONFIG_EBIU_MBSCTLVAL); - r0.l = lo(CONFIG_EBIU_MBSCTLVAL); - [p2] = r0; - ssync; - - p2.h = hi(EBIU_MODE); - p2.l = lo(EBIU_MODE); - r0.h = hi(CONFIG_EBIU_MODEVAL); - r0.l = lo(CONFIG_EBIU_MODEVAL); - [p2] = r0; - ssync; - - p2.h = hi(EBIU_FCTL); - p2.l = lo(EBIU_FCTL); - r0.h = hi(CONFIG_EBIU_FCTLVAL); - r0.l = lo(CONFIG_EBIU_FCTLVAL); - [p2] = r0; - ssync; - /* This section keeps the processor in supervisor mode * during kernel boot. Switches to user mode at end of boot. * See page 3-9 of Hardware Reference manual for documentation. diff --git a/trunk/arch/blackfin/mach-bf561/Kconfig b/trunk/arch/blackfin/mach-bf561/Kconfig index 3f4895450bea..0a17c4cf0059 100644 --- a/trunk/arch/blackfin/mach-bf561/Kconfig +++ b/trunk/arch/blackfin/mach-bf561/Kconfig @@ -1,6 +1,4 @@ -if (BF561) - -source "arch/blackfin/mach-bf561/boards/Kconfig" +if BF561 menu "BF561 Specific Configuration" diff --git a/trunk/arch/blackfin/mach-bf561/boards/Kconfig b/trunk/arch/blackfin/mach-bf561/boards/Kconfig deleted file mode 100644 index e41a67b1fb53..000000000000 --- a/trunk/arch/blackfin/mach-bf561/boards/Kconfig +++ /dev/null @@ -1,27 +0,0 @@ -choice - prompt "System type" - default BFIN561_EZKIT - help - Select your board! - -config BFIN561_EZKIT - bool "BF561-EZKIT" - help - BF561-EZKIT-LITE board support. - -config BFIN561_TEPLA - bool "BF561-TEPLA" - help - BF561-TEPLA board support. - -config BFIN561_BLUETECHNIX_CM - bool "Bluetechnix CM-BF561" - help - CM-BF561 support for EVAL- and DEV-Board. - -config GENERIC_BF561_BOARD - bool "Generic" - help - Generic or Custom board support. - -endchoice diff --git a/trunk/arch/blackfin/mach-bf561/boards/Makefile b/trunk/arch/blackfin/mach-bf561/boards/Makefile index 04add010b568..495a1cf9d452 100644 --- a/trunk/arch/blackfin/mach-bf561/boards/Makefile +++ b/trunk/arch/blackfin/mach-bf561/boards/Makefile @@ -2,7 +2,7 @@ # arch/blackfin/mach-bf561/boards/Makefile # -obj-$(CONFIG_GENERIC_BF561_BOARD) += generic_board.o +obj-$(CONFIG_GENERIC_BOARD) += generic_board.o obj-$(CONFIG_BFIN561_BLUETECHNIX_CM) += cm_bf561.o obj-$(CONFIG_BFIN561_EZKIT) += ezkit.o obj-$(CONFIG_BFIN561_TEPLA) += tepla.o diff --git a/trunk/arch/blackfin/mach-bf561/boards/cm_bf561.c b/trunk/arch/blackfin/mach-bf561/boards/cm_bf561.c index c19cd29b948a..97aeb43fd8b4 100644 --- a/trunk/arch/blackfin/mach-bf561/boards/cm_bf561.c +++ b/trunk/arch/blackfin/mach-bf561/boards/cm_bf561.c @@ -33,12 +33,11 @@ #include #include #include -#include +#include #include #include #include #include -#include /* * Name the Board for the /proc/cpuinfo @@ -183,7 +182,6 @@ static struct resource bfin_spi0_resource[] = { static struct bfin5xx_spi_master bfin_spi0_info = { .num_chipselect = 8, .enable_dma = 1, /* master has the ability to do dma transfer */ - .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, }; static struct platform_device bfin_spi0_device = { diff --git a/trunk/arch/blackfin/mach-bf561/boards/ezkit.c b/trunk/arch/blackfin/mach-bf561/boards/ezkit.c index 4ff8f6e7a11f..059d516cec23 100644 --- a/trunk/arch/blackfin/mach-bf561/boards/ezkit.c +++ b/trunk/arch/blackfin/mach-bf561/boards/ezkit.c @@ -35,7 +35,6 @@ #include #include #include -#include /* * Name the Board for the /proc/cpuinfo @@ -116,28 +115,6 @@ static struct platform_device smc91x_device = { }; #endif -#if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE) -static struct resource ax88180_resources[] = { - [0] = { - .start = 0x2c000000, - .end = 0x2c000000 + 0x8000, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_PF10, - .end = IRQ_PF10, - .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL), - }, -}; - -static struct platform_device ax88180_device = { - .name = "ax88180", - .id = -1, - .num_resources = ARRAY_SIZE(ax88180_resources), - .resource = ax88180_resources, -}; -#endif - #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) static struct resource bfin_uart_resources[] = { { @@ -183,7 +160,6 @@ static struct resource bfin_spi0_resource[] = { static struct bfin5xx_spi_master bfin_spi0_info = { .num_chipselect = 8, .enable_dma = 1, /* master has the ability to do dma transfer */ - .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, }; static struct platform_device bfin_spi0_device = { @@ -250,11 +226,6 @@ static struct platform_device *ezkit_devices[] __initdata = { #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) &smc91x_device, #endif - -#if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE) - &ax88180_device, -#endif - #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) &bfin_spi0_device, #endif diff --git a/trunk/arch/blackfin/mach-bf561/boards/generic_board.c b/trunk/arch/blackfin/mach-bf561/boards/generic_board.c index fc80c5d059f8..46816be4b2ba 100644 --- a/trunk/arch/blackfin/mach-bf561/boards/generic_board.c +++ b/trunk/arch/blackfin/mach-bf561/boards/generic_board.c @@ -48,6 +48,10 @@ static struct resource smc91x_resources[] = { .end = IRQ_PROG_INTB, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, }, { + /* + * denotes the flag pin and is used directly if + * CONFIG_IRQCHIP_DEMUX_GPIO is defined. + */ .start = IRQ_PF9, .end = IRQ_PF9, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, diff --git a/trunk/arch/blackfin/mach-bf561/boards/tepla.c b/trunk/arch/blackfin/mach-bf561/boards/tepla.c index ec6a2207c202..4a17c6da2a59 100644 --- a/trunk/arch/blackfin/mach-bf561/boards/tepla.c +++ b/trunk/arch/blackfin/mach-bf561/boards/tepla.c @@ -31,6 +31,10 @@ static struct resource smc91x_resources[] = { .end = IRQ_PROG_INTB, .flags = IORESOURCE_IRQ|IORESOURCE_IRQ_HIGHLEVEL, }, { + /* + * denotes the flag pin and is used directly if + * CONFIG_IRQCHIP_DEMUX_GPIO is defined. + */ .start = IRQ_PF7, .end = IRQ_PF7, .flags = IORESOURCE_IRQ|IORESOURCE_IRQ_HIGHLEVEL, diff --git a/trunk/arch/blackfin/mach-common/cplbinfo.c b/trunk/arch/blackfin/mach-common/cplbinfo.c index a4f0b428a34d..785ca9816971 100644 --- a/trunk/arch/blackfin/mach-common/cplbinfo.c +++ b/trunk/arch/blackfin/mach-common/cplbinfo.c @@ -91,7 +91,7 @@ static char *cplb_print_entry(char *buf, int type) } else buf += sprintf(buf, "Data CPLB entry:\n"); - buf += sprintf(buf, "Address\t\tData\tSize\tValid\tLocked\tSwapin\tiCount\toCount\n"); + buf += sprintf(buf, "Address\t\tData\tSize\tValid\tLocked\tSwapin\n\tiCount\toCount\n"); while (*p_addr != 0xffffffff) { entry = cplb_find_entry(cplb_addr, cplb_data, *p_addr, *p_data); diff --git a/trunk/arch/blackfin/mach-common/cplbmgr.S b/trunk/arch/blackfin/mach-common/cplbmgr.S index 6f909cbfac7b..946703ef48ff 100644 --- a/trunk/arch/blackfin/mach-common/cplbmgr.S +++ b/trunk/arch/blackfin/mach-common/cplbmgr.S @@ -73,7 +73,7 @@ ENTRY(_cplb_mgr) /* ICPLB Miss Exception. We need to choose one of the * currently-installed CPLBs, and replace it with one * from the configuration table. - */ + */ P4.L = LO(ICPLB_FAULT_ADDR); P4.H = HI(ICPLB_FAULT_ADDR); @@ -222,7 +222,7 @@ ENTRY(_cplb_mgr) /* See if failed address > start address */ CC = R4 <= R0(IU); - IF !CC JUMP .Linext; + IF !CC JUMP .Linext; /* extract page size (17:16)*/ R3 = EXTRACT(R2, R1.L) (Z); @@ -271,27 +271,16 @@ ENTRY(_cplb_mgr) /* FAILED CASES*/ .Lno_page_in_table: + ( R7:4,P5:3 ) = [SP++]; R0 = CPLB_NO_ADDR_MATCH; - JUMP .Lfail_ret; - + RTS; .Lall_locked: + ( R7:4,P5:3 ) = [SP++]; R0 = CPLB_NO_UNLOCKED; - JUMP .Lfail_ret; - + RTS; .Lprot_violation: - R0 = CPLB_PROT_VIOL; - -.Lfail_ret: - /* Make sure we turn protection/cache back on, even in the failing case */ - BITSET(R5,ENICPLB_P); - CLI R2; - SSYNC; /* SSYNC required before writing to IMEM_CONTROL. */ - .align 8; - [P4] = R5; - SSYNC; - STI R2; - ( R7:4,P5:3 ) = [SP++]; + R0 = CPLB_PROT_VIOL; RTS; .Ldcplb_write: diff --git a/trunk/arch/blackfin/mach-common/entry.S b/trunk/arch/blackfin/mach-common/entry.S index dc9d3ee2e691..1b13fa470977 100644 --- a/trunk/arch/blackfin/mach-common/entry.S +++ b/trunk/arch/blackfin/mach-common/entry.S @@ -33,7 +33,7 @@ * after a timer-interrupt and after each system call. */ -#include + #include #include #include @@ -71,44 +71,25 @@ ENDPROC(_safe_speculative_execution) * This one does not lower the level to IRQ5, and thus can be used to * patch up CPLB misses on the kernel stack. */ +ENTRY(_ex_dcplb) #if ANOMALY_05000261 -#define _ex_dviol _ex_workaround_261 -#define _ex_dmiss _ex_workaround_261 -#define _ex_dmult _ex_workaround_261 - -ENTRY(_ex_workaround_261) /* * Work around an anomaly: if we see a new DCPLB fault, return * without doing anything. Then, if we get the same fault again, * handle it. */ - P4 = R7; /* Store EXCAUSE */ p5.l = _last_cplb_fault_retx; p5.h = _last_cplb_fault_retx; r7 = [p5]; r6 = retx; [p5] = r6; cc = r6 == r7; - if !cc jump _bfin_return_from_exception; + if !cc jump _return_from_exception; /* fall through */ - R7 = P4; - R6 = 0x26; /* Data CPLB Miss */ - cc = R6 == R7; - if cc jump _ex_dcplb_miss (BP); - /* Handle 0x23 Data CPLB Protection Violation - * and Data CPLB Multiple Hits - Linux Trap Zero - */ - jump _ex_trap_c; -ENDPROC(_ex_workaround_261) - -#else -#define _ex_dviol _ex_trap_c -#define _ex_dmiss _ex_dcplb_miss -#define _ex_dmult _ex_trap_c #endif +ENDPROC(_ex_dcplb) -ENTRY(_ex_dcplb_miss) -ENTRY(_ex_icplb_miss) +ENTRY(_ex_icplb) (R7:6,P5:4) = [sp++]; ASTAT = [sp++]; SAVE_ALL_SYS @@ -117,7 +98,7 @@ ENTRY(_ex_icplb_miss) RESTORE_ALL_SYS SP = EX_SCRATCH_REG; rtx; -ENDPROC(_ex_icplb_miss) +ENDPROC(_ex_icplb) ENTRY(_ex_syscall) DEBUG_START_HWTRACE(p5, r7) @@ -139,7 +120,7 @@ ENTRY(_ex_single_step) r7 = retx; r6 = reti; cc = r7 == r6; - if cc jump _bfin_return_from_exception + if cc jump _return_from_exception r7 = syscfg; bitclr (r7, 0); syscfg = R7; @@ -156,9 +137,8 @@ ENTRY(_ex_single_step) r7 = [p4]; cc = r6 == r7; if !cc jump _ex_trap_c; -ENDPROC(_ex_single_step) -ENTRY(_bfin_return_from_exception) +ENTRY(_return_from_exception) DEBUG_START_HWTRACE(p5, r7) #if ANOMALY_05000257 R7=LC0; @@ -170,7 +150,7 @@ ENTRY(_bfin_return_from_exception) ASTAT = [sp++]; sp = EX_SCRATCH_REG; rtx; -ENDPROC(_bfin_return_from_exception) +ENDPROC(_ex_soft_bp) ENTRY(_handle_bad_cplb) /* To get here, we just tried and failed to change a CPLB @@ -863,7 +843,7 @@ ENTRY(_ex_trace_buff_full) LC0 = [sp++]; P2 = [sp++]; P3 = [sp++]; - jump _bfin_return_from_exception; + jump _return_from_exception; ENDPROC(_ex_trace_buff_full) #if CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN == 4 @@ -881,7 +861,7 @@ ENTRY(_software_trace_buff) #endif /* CONFIG_DEBUG_BFIN_HWTRACE_EXPAND */ #if CONFIG_EARLY_PRINTK -__INIT +.section .init.text ENTRY(_early_trap) SAVE_ALL_SYS trace_buffer_stop(p0,r0); @@ -916,7 +896,6 @@ ENTRY(_early_trap) call _early_trap_c; SP += 12; ENDPROC(_early_trap) -__FINIT #endif /* CONFIG_EARLY_PRINTK */ /* @@ -929,7 +908,6 @@ __FINIT #else .data #endif - ENTRY(_ex_table) /* entry for each EXCAUSE[5:0] * This table must be in sync with the table in ./kernel/traps.c @@ -974,16 +952,16 @@ ENTRY(_ex_table) .long _ex_trap_c /* 0x20 - Reserved */ .long _ex_trap_c /* 0x21 - Undefined Instruction */ .long _ex_trap_c /* 0x22 - Illegal Instruction Combination */ - .long _ex_dviol /* 0x23 - Data CPLB Protection Violation */ + .long _ex_dcplb /* 0x23 - Data CPLB Protection Violation */ .long _ex_trap_c /* 0x24 - Data access misaligned */ .long _ex_trap_c /* 0x25 - Unrecoverable Event */ - .long _ex_dmiss /* 0x26 - Data CPLB Miss */ - .long _ex_dmult /* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero */ + .long _ex_dcplb /* 0x26 - Data CPLB Miss */ + .long _ex_trap_c /* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero */ .long _ex_trap_c /* 0x28 - Emulation Watchpoint */ .long _ex_trap_c /* 0x29 - Instruction fetch access error (535 only) */ .long _ex_trap_c /* 0x2A - Instruction fetch misaligned */ - .long _ex_trap_c /* 0x2B - Instruction CPLB protection Violation */ - .long _ex_icplb_miss /* 0x2C - Instruction CPLB miss */ + .long _ex_icplb /* 0x2B - Instruction CPLB protection Violation */ + .long _ex_icplb /* 0x2C - Instruction CPLB miss */ .long _ex_trap_c /* 0x2D - Instruction CPLB Multiple Hits */ .long _ex_trap_c /* 0x2E - Illegal use of Supervisor Resource */ .long _ex_trap_c /* 0x2E - Illegal use of Supervisor Resource */ diff --git a/trunk/arch/blackfin/mach-common/interrupt.S b/trunk/arch/blackfin/mach-common/interrupt.S index 4de376418a18..c6b32fe0f6e9 100644 --- a/trunk/arch/blackfin/mach-common/interrupt.S +++ b/trunk/arch/blackfin/mach-common/interrupt.S @@ -30,6 +30,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/blackfin/mach-common/ints-priority-dc.c b/trunk/arch/blackfin/mach-common/ints-priority-dc.c index 4882f0e801a9..c2f05fabedc1 100644 --- a/trunk/arch/blackfin/mach-common/ints-priority-dc.c +++ b/trunk/arch/blackfin/mach-common/ints-priority-dc.c @@ -181,6 +181,7 @@ static struct irq_chip bf561_internal_irqchip = { .unmask = bf561_internal_unmask_irq, }; +#ifdef CONFIG_IRQCHIP_DEMUX_GPIO static unsigned short gpio_enabled[gpio_bank(MAX_BLACKFIN_GPIOS)]; static unsigned short gpio_edge_triggered[gpio_bank(MAX_BLACKFIN_GPIOS)]; @@ -361,6 +362,8 @@ static void bf561_demux_gpio_irq(unsigned int inta_irq, } +#endif /* CONFIG_IRQCHIP_DEMUX_GPIO */ + void __init init_exception_vectors(void) { SSYNC(); @@ -410,21 +413,26 @@ int __init init_arch_irq(void) set_irq_chip(irq, &bf561_core_irqchip); else set_irq_chip(irq, &bf561_internal_irqchip); - +#ifdef CONFIG_IRQCHIP_DEMUX_GPIO if ((irq != IRQ_PROG0_INTA) && - (irq != IRQ_PROG1_INTA) && - (irq != IRQ_PROG2_INTA)) + (irq != IRQ_PROG1_INTA) && (irq != IRQ_PROG2_INTA)) { +#endif set_irq_handler(irq, handle_simple_irq); - else +#ifdef CONFIG_IRQCHIP_DEMUX_GPIO + } else { set_irq_chained_handler(irq, bf561_demux_gpio_irq); + } +#endif + } +#ifdef CONFIG_IRQCHIP_DEMUX_GPIO for (irq = IRQ_PF0; irq <= IRQ_PF47; irq++) { set_irq_chip(irq, &bf561_gpio_irqchip); /* if configured as edge, then will be changed to do_edge_IRQ */ set_irq_handler(irq, handle_level_irq); } - +#endif bfin_write_IMASK(0); CSYNC(); ilat = bfin_read_ILAT(); @@ -449,8 +457,9 @@ int __init init_arch_irq(void) } #ifdef CONFIG_DO_IRQ_L1 -__attribute__((l1_text)) +void do_irq(int vec, struct pt_regs *fp)__attribute__((l1_text)); #endif + void do_irq(int vec, struct pt_regs *fp) { if (vec == EVT_IVTMR_P) { diff --git a/trunk/arch/blackfin/mach-common/ints-priority-sc.c b/trunk/arch/blackfin/mach-common/ints-priority-sc.c index 147f0731087a..2d2b63567b30 100644 --- a/trunk/arch/blackfin/mach-common/ints-priority-sc.c +++ b/trunk/arch/blackfin/mach-common/ints-priority-sc.c @@ -308,7 +308,7 @@ static void bfin_demux_error_irq(unsigned int int_err_irq, } #endif /* BF537_GENERIC_ERROR_INT_DEMUX */ -#if !defined(CONFIG_BF54x) +#if defined(CONFIG_IRQCHIP_DEMUX_GPIO) && !defined(CONFIG_BF54x) static unsigned short gpio_enabled[gpio_bank(MAX_BLACKFIN_GPIOS)]; static unsigned short gpio_edge_triggered[gpio_bank(MAX_BLACKFIN_GPIOS)]; @@ -464,7 +464,7 @@ static void bfin_demux_gpio_irq(unsigned int intb_irq, } } -#else /* CONFIG_BF54x */ +#else /* CONFIG_IRQCHIP_DEMUX_GPIO */ #define NR_PINT_SYS_IRQS 4 #define NR_PINT_BITS 32 @@ -726,7 +726,7 @@ static void bfin_demux_gpio_irq(unsigned int intb_irq, } } -#endif +#endif /* CONFIG_IRQCHIP_DEMUX_GPIO */ void __init init_exception_vectors(void) { @@ -766,10 +766,10 @@ int __init init_arch_irq(void) bfin_write_SIC_IMASK1(SIC_UNMASK_ALL); bfin_write_SIC_IWR0(IWR_ENABLE_ALL); bfin_write_SIC_IWR1(IWR_ENABLE_ALL); -# ifdef CONFIG_BF54x +#ifdef CONFIG_BF54x bfin_write_SIC_IMASK2(SIC_UNMASK_ALL); bfin_write_SIC_IWR2(IWR_ENABLE_ALL); -# endif +#endif #else bfin_write_SIC_IMASK(SIC_UNMASK_ALL); bfin_write_SIC_IWR(IWR_ENABLE_ALL); @@ -778,13 +778,13 @@ int __init init_arch_irq(void) local_irq_disable(); -#ifdef CONFIG_BF54x -# ifdef CONFIG_PINTx_REASSIGN +#if defined(CONFIG_IRQCHIP_DEMUX_GPIO) && defined(CONFIG_BF54x) +#ifdef CONFIG_PINTx_REASSIGN pint[0]->assign = CONFIG_PINT0_ASSIGN; pint[1]->assign = CONFIG_PINT1_ASSIGN; pint[2]->assign = CONFIG_PINT2_ASSIGN; pint[3]->assign = CONFIG_PINT3_ASSIGN; -# endif +#endif /* Whenever PINTx_ASSIGN is altered init_pint_lut() must be executed! */ init_pint_lut(); #endif @@ -799,17 +799,18 @@ int __init init_arch_irq(void) #endif switch (irq) { +#ifdef CONFIG_IRQCHIP_DEMUX_GPIO #if defined(CONFIG_BF53x) case IRQ_PROG_INTA: set_irq_chained_handler(irq, bfin_demux_gpio_irq); break; -# if defined(BF537_FAMILY) && !(defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)) +#if defined(BF537_FAMILY) && !(defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)) case IRQ_MAC_RX: set_irq_chained_handler(irq, bfin_demux_gpio_irq); break; -# endif +#endif #elif defined(CONFIG_BF54x) case IRQ_PINT0: set_irq_chained_handler(irq, @@ -840,6 +841,7 @@ int __init init_arch_irq(void) set_irq_chained_handler(irq, bfin_demux_gpio_irq); break; +#endif #endif default: set_irq_handler(irq, handle_simple_irq); @@ -859,6 +861,7 @@ int __init init_arch_irq(void) } #endif +#ifdef CONFIG_IRQCHIP_DEMUX_GPIO #ifndef CONFIG_BF54x for (irq = IRQ_PF0; irq < NR_IRQS; irq++) { #else @@ -868,7 +871,7 @@ int __init init_arch_irq(void) /* if configured as edge, then will be changed to do_edge_IRQ */ set_irq_handler(irq, handle_level_irq); } - +#endif bfin_write_IMASK(0); CSYNC(); ilat = bfin_read_ILAT(); @@ -893,8 +896,9 @@ int __init init_arch_irq(void) } #ifdef CONFIG_DO_IRQ_L1 -__attribute__((l1_text)) +void do_irq(int vec, struct pt_regs *fp) __attribute__((l1_text)); #endif + void do_irq(int vec, struct pt_regs *fp) { if (vec == EVT_IVTMR_P) { diff --git a/trunk/arch/blackfin/mach-common/irqpanic.c b/trunk/arch/blackfin/mach-common/irqpanic.c index b22959b197e5..f05e3dadaf33 100644 --- a/trunk/arch/blackfin/mach-common/irqpanic.c +++ b/trunk/arch/blackfin/mach-common/irqpanic.c @@ -153,29 +153,27 @@ asmlinkage void irq_panic(int reason, struct pt_regs *regs) case (SEQSTAT_HWERRCAUSE_SYSTEM_MMR): /* System MMR Error */ info.si_code = BUS_ADRALN; sig = SIGBUS; - printk(KERN_EMERG HWC_x2(KERN_EMERG)); + printk(KERN_EMERG HWC_x2); break; case (SEQSTAT_HWERRCAUSE_EXTERN_ADDR): /* External Memory Addressing Error */ info.si_code = BUS_ADRERR; sig = SIGBUS; - printk(KERN_EMERG HWC_x3(KERN_EMERG)); + printk(KERN_EMERG HWC_x3); break; case (SEQSTAT_HWERRCAUSE_PERF_FLOW): /* Performance Monitor Overflow */ - printk(KERN_EMERG HWC_x12(KERN_EMERG)); + printk(KERN_EMERG HWC_x12); break; case (SEQSTAT_HWERRCAUSE_RAISE_5): /* RAISE 5 instruction */ - printk(KERN_EMERG HWC_x18(KERN_EMERG)); + printk(KERN_EMERG HWC_x18); break; default: /* Reserved */ - printk(KERN_EMERG HWC_default(KERN_EMERG)); + printk(KERN_EMERG HWC_default); break; } } regs->ipend = bfin_read_IPEND(); - dump_bfin_process(regs); - dump_bfin_mem((void *)regs->pc); - show_regs(regs); + dump_bfin_regs(regs, (void *)regs->pc); if (0 == (info.si_signo = sig) || 0 == user_mode(regs)) /* in kernelspace */ panic("Unhandled IRQ or exceptions!\n"); else { /* in userspace */ diff --git a/trunk/arch/blackfin/mm/blackfin_sram.c b/trunk/arch/blackfin/mm/blackfin_sram.c index e41f0e8ecacb..b99ea883cd22 100644 --- a/trunk/arch/blackfin/mm/blackfin_sram.c +++ b/trunk/arch/blackfin/mm/blackfin_sram.c @@ -27,6 +27,7 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include #include #include diff --git a/trunk/arch/cris/arch-v10/drivers/Kconfig b/trunk/arch/cris/arch-v10/drivers/Kconfig index e3c0f2928149..faf8b4d3ca01 100644 --- a/trunk/arch/cris/arch-v10/drivers/Kconfig +++ b/trunk/arch/cris/arch-v10/drivers/Kconfig @@ -542,6 +542,45 @@ config ETRAX_RS485_DISABLE_RECEIVER loopback. Not all products are able to do this in software only. Axis 2400/2401 must disable receiver. +config ETRAX_IDE + bool "ATA/IDE support" + select IDE + select BLK_DEV_IDE + select BLK_DEV_IDEDISK + select BLK_DEV_IDECD + select BLK_DEV_IDEDMA + select IDE_GENERIC + help + Enable this to get support for ATA/IDE. + You can't use parallel ports or SCSI ports + at the same time. + + +config ETRAX_IDE_DELAY + int "Delay for drives to regain consciousness" + depends on ETRAX_IDE + default 15 + help + Number of seconds to wait for IDE drives to spin up after an IDE + reset. +choice + prompt "IDE reset pin" + depends on ETRAX_IDE + default ETRAX_IDE_PB7_RESET + +config ETRAX_IDE_PB7_RESET + bool "Port_PB_Bit_7" + help + IDE reset on pin 7 on port B + +config ETRAX_IDE_G27_RESET + bool "Port_G_Bit_27" + help + IDE reset on pin 27 on port G + +endchoice + + config ETRAX_USB_HOST bool "USB host" select USB diff --git a/trunk/arch/cris/arch-v32/drivers/Kconfig b/trunk/arch/cris/arch-v32/drivers/Kconfig index 9bccb5e2a960..7f72d7c9e1ce 100644 --- a/trunk/arch/cris/arch-v32/drivers/Kconfig +++ b/trunk/arch/cris/arch-v32/drivers/Kconfig @@ -582,6 +582,18 @@ config ETRAX_PE_CHANGEABLE_BITS that a user can change the value on using ioctl's. Bit set = changeable. +config ETRAX_IDE + bool "ATA/IDE support" + depends on ETRAX_ARCH_V32 + select IDE + select BLK_DEV_IDE + select BLK_DEV_IDEDISK + select BLK_DEV_IDECD + select BLK_DEV_IDEDMA + select IDE_GENERIC + help + Enables the ETRAX IDE driver. + config ETRAX_CARDBUS bool "Cardbus support" depends on ETRAX_ARCH_V32 diff --git a/trunk/arch/frv/kernel/break.S b/trunk/arch/frv/kernel/break.S index bd0bdf908d93..dac4a5f68c2e 100644 --- a/trunk/arch/frv/kernel/break.S +++ b/trunk/arch/frv/kernel/break.S @@ -63,7 +63,7 @@ __break_trace_through_exceptions: # entry point for Break Exceptions/Interrupts # ############################################################################### - .section .text.break + .text .balign 4 .globl __entry_break __entry_break: diff --git a/trunk/arch/frv/kernel/entry.S b/trunk/arch/frv/kernel/entry.S index f926c7094776..1e74f3c5cee2 100644 --- a/trunk/arch/frv/kernel/entry.S +++ b/trunk/arch/frv/kernel/entry.S @@ -38,7 +38,7 @@ #define nr_syscalls ((syscall_table_size)/4) - .section .text.entry + .text .balign 4 .macro LEDS val diff --git a/trunk/arch/frv/kernel/vmlinux.lds.S b/trunk/arch/frv/kernel/vmlinux.lds.S index a17a81d58bf6..3b71e0c86399 100644 --- a/trunk/arch/frv/kernel/vmlinux.lds.S +++ b/trunk/arch/frv/kernel/vmlinux.lds.S @@ -76,12 +76,6 @@ SECTIONS *(.data.init_task) } - . = ALIGN(4096); - .data.page_aligned : { *(.data.idt) } - - . = ALIGN(L1_CACHE_BYTES); - .data.cacheline_aligned : { *(.data.cacheline_aligned) } - .trap : { /* trap table management - read entry-table.S before modifying */ . = ALIGN(8192); @@ -92,25 +86,28 @@ SECTIONS *(.trap.break) } + . = ALIGN(4096); + .data.page_aligned : { *(.data.idt) } + + . = ALIGN(L1_CACHE_BYTES); + .data.cacheline_aligned : { *(.data.cacheline_aligned) } + /* Text and read-only data */ . = ALIGN(4); _text = .; _stext = .; .text : { - *(.text.start) - *(.text.entry) - *(.text.break) - *(.text.tlbmiss) - TEXT_TEXT - SCHED_TEXT - LOCK_TEXT -#ifdef CONFIG_DEBUG_INFO *( + .text.start .text.* +#ifdef CONFIG_DEBUG_INFO .init.text .exit.text .exitcall.exit - ) #endif + ) + TEXT_TEXT + SCHED_TEXT + LOCK_TEXT *(.fixup) *(.gnu.warning) *(.exitcall.exit) diff --git a/trunk/arch/frv/mm/tlb-miss.S b/trunk/arch/frv/mm/tlb-miss.S index 07643482cad2..04da67468378 100644 --- a/trunk/arch/frv/mm/tlb-miss.S +++ b/trunk/arch/frv/mm/tlb-miss.S @@ -16,7 +16,7 @@ #include #include - .section .text.tlbmiss + .section .text .balign 4 .globl __entry_insn_mmu_miss diff --git a/trunk/arch/m32r/kernel/signal.c b/trunk/arch/m32r/kernel/signal.c index 18124542a6eb..a753d79c4e89 100644 --- a/trunk/arch/m32r/kernel/signal.c +++ b/trunk/arch/m32r/kernel/signal.c @@ -36,7 +36,7 @@ sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize, unsigned long r2, unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, struct pt_regs *regs) { - sigset_t newset; + sigset_t saveset, newset; /* XXX: Don't preclude handling different sized sigset_t's. */ if (sigsetsize != sizeof(sigset_t)) @@ -44,18 +44,21 @@ sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize, if (copy_from_user(&newset, unewset, sizeof(newset))) return -EFAULT; - sigdelsetmask(&newset, sigmask(SIGKILL)|sigmask(SIGSTOP)); + sigdelsetmask(&newset, ~_BLOCKABLE); spin_lock_irq(¤t->sighand->siglock); - current->saved_sigmask = current->blocked; + saveset = current->blocked; current->blocked = newset; recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock); - current->state = TASK_INTERRUPTIBLE; - schedule(); - set_thread_flag(TIF_RESTORE_SIGMASK); - return -ERESTARTNOHAND; + regs->r0 = -EINTR; + while (1) { + current->state = TASK_INTERRUPTIBLE; + schedule(); + if (do_signal(regs, &saveset)) + return regs->r0; + } } asmlinkage int diff --git a/trunk/arch/m32r/kernel/syscall_table.S b/trunk/arch/m32r/kernel/syscall_table.S index 95aa79874847..751ac2a3d120 100644 --- a/trunk/arch/m32r/kernel/syscall_table.S +++ b/trunk/arch/m32r/kernel/syscall_table.S @@ -284,43 +284,3 @@ ENTRY(sys_call_table) .long sys_mq_getsetattr .long sys_ni_syscall /* reserved for kexec */ .long sys_waitid - .long sys_ni_syscall /* 285 */ /* available */ - .long sys_add_key - .long sys_request_key - .long sys_keyctl - .long sys_ioprio_set - .long sys_ioprio_get /* 290 */ - .long sys_inotify_init - .long sys_inotify_add_watch - .long sys_inotify_rm_watch - .long sys_migrate_pages - .long sys_openat /* 295 */ - .long sys_mkdirat - .long sys_mknodat - .long sys_fchownat - .long sys_futimesat - .long sys_fstatat64 /* 300 */ - .long sys_unlinkat - .long sys_renameat - .long sys_linkat - .long sys_symlinkat - .long sys_readlinkat /* 305 */ - .long sys_fchmodat - .long sys_faccessat - .long sys_pselect6 - .long sys_ppoll - .long sys_unshare /* 310 */ - .long sys_set_robust_list - .long sys_get_robust_list - .long sys_splice - .long sys_sync_file_range - .long sys_tee /* 315 */ - .long sys_vmsplice - .long sys_move_pages - .long sys_getcpu - .long sys_epoll_pwait - .long sys_utimensat /* 320 */ - .long sys_signalfd - .long sys_timerfd - .long sys_eventfd - .long sys_fallocate diff --git a/trunk/arch/m68k/atari/atakeyb.c b/trunk/arch/m68k/atari/atakeyb.c index 8a2a53b33616..880add120eb3 100644 --- a/trunk/arch/m68k/atari/atakeyb.c +++ b/trunk/arch/m68k/atari/atakeyb.c @@ -565,7 +565,7 @@ void atari_kbd_leds(unsigned int leds) static int atari_keyb_done = 0; -int atari_keyb_init(void) +int __init atari_keyb_init(void) { if (atari_keyb_done) return 0; @@ -631,7 +631,6 @@ int atari_keyb_init(void) atari_keyb_done = 1; return 0; } -EXPORT_SYMBOL_GPL(atari_keyb_init); int atari_kbd_translate(unsigned char keycode, unsigned char *keycodep, char raw_mode) { diff --git a/trunk/arch/mips/Kconfig b/trunk/arch/mips/Kconfig index 455bd1f560aa..2f2ce0c28bc0 100644 --- a/trunk/arch/mips/Kconfig +++ b/trunk/arch/mips/Kconfig @@ -22,7 +22,6 @@ config MACH_ALCHEMY config BASLER_EXCITE bool "Basler eXcite smart camera" select CEVT_R4K - select CSRC_R4K select DMA_COHERENT select HW_HAS_PCI select IRQ_CPU @@ -50,7 +49,6 @@ config BASLER_EXCITE_PROTOTYPE config BCM47XX bool "BCM47XX based boards" select CEVT_R4K - select CSRC_R4K select DMA_NONCOHERENT select HW_HAS_PCI select IRQ_CPU @@ -68,7 +66,6 @@ config BCM47XX config MIPS_COBALT bool "Cobalt Server" select CEVT_R4K - select CSRC_R4K select CEVT_GT641XX select DMA_NONCOHERENT select HW_HAS_PCI @@ -88,7 +85,6 @@ config MACH_DECSTATION bool "DECstations" select BOOT_ELF32 select CEVT_R4K - select CSRC_R4K select DMA_NONCOHERENT select NO_IOPORT select IRQ_CPU @@ -121,7 +117,6 @@ config MACH_JAZZ select ARC32 select ARCH_MAY_HAVE_PC_FDC select CEVT_R4K - select CSRC_R4K select GENERIC_ISA_DMA select IRQ_CPU select I8253 @@ -142,7 +137,6 @@ config MACH_JAZZ config LASAT bool "LASAT Networks platforms" select CEVT_R4K - select CSRC_R4K select DMA_NONCOHERENT select SYS_HAS_EARLY_PRINTK select HW_HAS_PCI @@ -160,7 +154,6 @@ config LEMOTE_FULONG bool "Lemote Fulong mini-PC" select ARCH_SPARSEMEM_ENABLE select CEVT_R4K - select CSRC_R4K select SYS_HAS_CPU_LOONGSON2 select DMA_NONCOHERENT select BOOT_ELF32 @@ -186,7 +179,6 @@ config MIPS_ATLAS bool "MIPS Atlas board" select BOOT_ELF32 select CEVT_R4K - select CSRC_R4K select DMA_NONCOHERENT select SYS_HAS_EARLY_PRINTK select IRQ_CPU @@ -218,7 +210,6 @@ config MIPS_MALTA select ARCH_MAY_HAVE_PC_FDC select BOOT_ELF32 select CEVT_R4K - select CSRC_R4K select DMA_NONCOHERENT select GENERIC_ISA_DMA select IRQ_CPU @@ -250,7 +241,6 @@ config MIPS_MALTA config MIPS_SEAD bool "MIPS SEAD board" select CEVT_R4K - select CSRC_R4K select IRQ_CPU select DMA_NONCOHERENT select SYS_HAS_EARLY_PRINTK @@ -270,7 +260,6 @@ config MIPS_SEAD config MIPS_SIM bool 'MIPS simulator (MIPSsim)' select CEVT_R4K - select CSRC_R4K select DMA_NONCOHERENT select SYS_HAS_EARLY_PRINTK select IRQ_CPU @@ -289,7 +278,6 @@ config MIPS_SIM config MARKEINS bool "NEC EMMA2RH Mark-eins" select CEVT_R4K - select CSRC_R4K select DMA_NONCOHERENT select HW_HAS_PCI select IRQ_CPU @@ -305,7 +293,6 @@ config MARKEINS config MACH_VR41XX bool "NEC VR4100 series based machines" select CEVT_R4K - select CSRC_R4K select SYS_HAS_CPU_VR41XX select GENERIC_HARDIRQS_NO__DO_IRQ @@ -343,7 +330,6 @@ config PMC_MSP config PMC_YOSEMITE bool "PMC-Sierra Yosemite eval board" select CEVT_R4K - select CSRC_R4K select DMA_COHERENT select HW_HAS_PCI select IRQ_CPU @@ -365,7 +351,6 @@ config PMC_YOSEMITE config QEMU bool "Qemu" select CEVT_R4K - select CSRC_R4K select DMA_COHERENT select GENERIC_ISA_DMA select HAVE_STD_PC_SERIAL_PORT @@ -397,11 +382,9 @@ config SGI_IP22 select ARC32 select BOOT_ELF32 select CEVT_R4K - select CSRC_R4K select DMA_NONCOHERENT select HW_HAS_EISA select I8253 - select I8259 select IP22_CPU_SCACHE select IRQ_CPU select GENERIC_ISA_DMA_SUPPORT_BROKEN @@ -444,7 +427,6 @@ config SGI_IP32 select ARC32 select BOOT_ELF32 select CEVT_R4K - select CSRC_R4K select DMA_NONCOHERENT select HW_HAS_PCI select IRQ_CPU @@ -516,7 +498,6 @@ config SIBYTE_SWARM select SYS_SUPPORTS_HIGHMEM select SYS_SUPPORTS_KGDB select SYS_SUPPORTS_LITTLE_ENDIAN - select ZONE_DMA32 if 64BIT config SIBYTE_LITTLESUR bool "Sibyte BCM91250C2-LittleSur" @@ -567,7 +548,6 @@ config SIBYTE_BIGSUR select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_HIGHMEM select SYS_SUPPORTS_LITTLE_ENDIAN - select ZONE_DMA32 if 64BIT config SNI_RM bool "SNI RM200/300/400" @@ -576,7 +556,6 @@ config SNI_RM select ARCH_MAY_HAVE_PC_FDC select BOOT_ELF32 select CEVT_R4K - select CSRC_R4K select DMA_NONCOHERENT select GENERIC_ISA_DMA select HW_HAS_EISA @@ -620,7 +599,6 @@ config TOSHIBA_JMR3927 config TOSHIBA_RBTX4927 bool "Toshiba RBTX49[23]7 board" select CEVT_R4K - select CSRC_R4K select CEVT_TXX9 select DMA_NONCOHERENT select HAS_TXX9_SERIAL @@ -643,7 +621,6 @@ config TOSHIBA_RBTX4927 config TOSHIBA_RBTX4938 bool "Toshiba RBTX4938 board" select CEVT_R4K - select CSRC_R4K select CEVT_TXX9 select DMA_NONCOHERENT select HAS_TXX9_SERIAL @@ -665,7 +642,6 @@ config TOSHIBA_RBTX4938 config WR_PPMC bool "Wind River PPMC board" select CEVT_R4K - select CSRC_R4K select IRQ_CPU select BOOT_ELF32 select DMA_NONCOHERENT @@ -776,9 +752,6 @@ config CEVT_TXX9 config CSRC_BCM1480 bool -config CSRC_R4K - bool - config CSRC_SB1250 bool @@ -1667,9 +1640,6 @@ config ARCH_DISCONTIGMEM_ENABLE or have huge holes in the physical address space for other reasons. See for more. -config ARCH_POPULATES_NODE_MAP - def_bool y - config ARCH_SPARSEMEM_ENABLE bool select SPARSEMEM_STATIC @@ -1975,9 +1945,6 @@ config I8253 config PCSPEAKER bool -config ZONE_DMA32 - bool - source "drivers/pcmcia/Kconfig" source "drivers/pci/hotplug/Kconfig" diff --git a/trunk/arch/mips/au1000/Kconfig b/trunk/arch/mips/au1000/Kconfig index 05d1354aad3a..b36cec58a9a8 100644 --- a/trunk/arch/mips/au1000/Kconfig +++ b/trunk/arch/mips/au1000/Kconfig @@ -138,7 +138,6 @@ config SOC_AU1X00 bool select 64BIT_PHYS_ADDR select CEVT_R4K - select CSRC_R4K select IRQ_CPU select SYS_HAS_CPU_MIPS32_R1 select SYS_SUPPORTS_32BIT_KERNEL diff --git a/trunk/arch/mips/kernel/Makefile b/trunk/arch/mips/kernel/Makefile index ffa08362de17..b551535b7e48 100644 --- a/trunk/arch/mips/kernel/Makefile +++ b/trunk/arch/mips/kernel/Makefile @@ -14,7 +14,6 @@ obj-$(CONFIG_CEVT_GT641XX) += cevt-gt641xx.o obj-$(CONFIG_CEVT_SB1250) += cevt-sb1250.o obj-$(CONFIG_CEVT_TXX9) += cevt-txx9.o obj-$(CONFIG_CSRC_BCM1480) += csrc-bcm1480.o -obj-$(CONFIG_CSRC_R4K) += csrc-r4k.o obj-$(CONFIG_CSRC_SB1250) += csrc-sb1250.o binfmt_irix-objs := irixelf.o irixinv.o irixioctl.o irixsig.o \ @@ -44,7 +43,6 @@ obj-$(CONFIG_CPU_TX49XX) += r4k_fpu.o r4k_switch.o obj-$(CONFIG_CPU_VR41XX) += r4k_fpu.o r4k_switch.o obj-$(CONFIG_SMP) += smp.o -obj-$(CONFIG_SMP_UP) += smp-up.o obj-$(CONFIG_MIPS_MT) += mips-mt.o obj-$(CONFIG_MIPS_MT_FPAFF) += mips-mt-fpaff.o diff --git a/trunk/arch/mips/kernel/cevt-r4k.c b/trunk/arch/mips/kernel/cevt-r4k.c index 24a2d907aa0d..bab935a3d74b 100644 --- a/trunk/arch/mips/kernel/cevt-r4k.c +++ b/trunk/arch/mips/kernel/cevt-r4k.c @@ -219,7 +219,7 @@ static int c0_compare_int_usable(void) return 1; } -int __cpuinit mips_clockevent_init(void) +void __cpuinit mips_clockevent_init(void) { uint64_t mips_freq = mips_hpt_frequency; unsigned int cpu = smp_processor_id(); @@ -227,7 +227,7 @@ int __cpuinit mips_clockevent_init(void) unsigned int irq; if (!cpu_has_counter || !mips_hpt_frequency) - return -ENXIO; + return; #ifdef CONFIG_MIPS_MT_SMTC setup_smtc_dummy_clockevent_device(); @@ -237,11 +237,11 @@ int __cpuinit mips_clockevent_init(void) * device. */ if (cpu) - return 0; + return; #endif if (!c0_compare_int_usable()) - return -ENXIO; + return; /* * With vectored interrupts things are getting platform specific. @@ -276,8 +276,8 @@ int __cpuinit mips_clockevent_init(void) clockevents_register_device(cd); - if (cp0_timer_irq_installed) - return 0; + if (!cp0_timer_irq_installed) + return; cp0_timer_irq_installed = 1; @@ -287,6 +287,4 @@ int __cpuinit mips_clockevent_init(void) #else setup_irq(irq, &c0_compare_irqaction); #endif - - return 0; } diff --git a/trunk/arch/mips/kernel/csrc-r4k.c b/trunk/arch/mips/kernel/csrc-r4k.c deleted file mode 100644 index 74c5c62365a8..000000000000 --- a/trunk/arch/mips/kernel/csrc-r4k.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * - * Copyright (C) 2007 by Ralf Baechle - */ - -static cycle_t c0_hpt_read(void) -{ - return read_c0_count(); -} - -static struct clocksource clocksource_mips = { - .name = "MIPS", - .read = c0_hpt_read, - .mask = CLOCKSOURCE_MASK(32), - .flags = CLOCK_SOURCE_IS_CONTINUOUS, -}; - -static void __init init_mips_clocksource(void) -{ - /* Calclate a somewhat reasonable rating value */ - clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000; - - clocksource_set_clock(&clocksource_mips, mips_hpt_frequency); - - clocksource_register(&clocksource_mips); -} diff --git a/trunk/arch/mips/kernel/setup.c b/trunk/arch/mips/kernel/setup.c index 7f6ddcb5d485..a06a27d6cfcd 100644 --- a/trunk/arch/mips/kernel/setup.c +++ b/trunk/arch/mips/kernel/setup.c @@ -269,7 +269,7 @@ static void __init bootmem_init(void) static void __init bootmem_init(void) { - unsigned long init_begin, reserved_end; + unsigned long reserved_end; unsigned long mapstart = ~0UL; unsigned long bootmap_size; int i; @@ -342,35 +342,6 @@ static void __init bootmem_init(void) */ bootmap_size = init_bootmem_node(NODE_DATA(0), mapstart, min_low_pfn, max_low_pfn); - - - init_begin = PFN_UP(__pa_symbol(&__init_begin)); - for (i = 0; i < boot_mem_map.nr_map; i++) { - unsigned long start, end; - - start = PFN_UP(boot_mem_map.map[i].addr); - end = PFN_DOWN(boot_mem_map.map[i].addr - + boot_mem_map.map[i].size); - - if (start <= init_begin) - start = init_begin; - if (start >= end) - continue; - -#ifndef CONFIG_HIGHMEM - if (end > max_low_pfn) - end = max_low_pfn; - - /* - * ... finally, is the area going away? - */ - if (end <= start) - continue; -#endif - - add_active_range(0, start, end); - } - /* * Register fully available low RAM pages with the bootmem allocator. */ diff --git a/trunk/arch/mips/kernel/smp-up.c b/trunk/arch/mips/kernel/smp-up.c deleted file mode 100644 index ead6c30eeb14..000000000000 --- a/trunk/arch/mips/kernel/smp-up.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * - * Copyright (C) 2006, 07 by Ralf Baechle (ralf@linux-mips.org) - * - * Symmetric Uniprocessor (TM) Support - */ -#include -#include - -/* - * Send inter-processor interrupt - */ -void up_send_ipi_single(int cpu, unsigned int action) -{ - panic(KERN_ERR "%s called", __func__); -} - -static inline void up_send_ipi_mask(cpumask_t mask, unsigned int action) -{ - panic(KERN_ERR "%s called", __func__); -} - -/* - * After we've done initial boot, this function is called to allow the - * board code to clean up state, if needed - */ -void __cpuinit up_init_secondary(void) -{ -} - -void __cpuinit up_smp_finish(void) -{ -} - -/* Hook for after all CPUs are online */ -void up_cpus_done(void) -{ -} - -/* - * Firmware CPU startup hook - */ -void __cpuinit up_boot_secondary(int cpu, struct task_struct *idle) -{ -} - -void __init up_smp_setup(void) -{ -} - -void __init up_prepare_cpus(unsigned int max_cpus) -{ -} - -struct plat_smp_ops up_smp_ops = { - .send_ipi_single = up_send_ipi_single, - .send_ipi_mask = up_send_ipi_mask, - .init_secondary = up_init_secondary, - .smp_finish = up_smp_finish, - .cpus_done = up_cpus_done, - .boot_secondary = up_boot_secondary, - .smp_setup = up_smp_setup, - .prepare_cpus = up_prepare_cpus, -}; diff --git a/trunk/arch/mips/kernel/time.c b/trunk/arch/mips/kernel/time.c index 52075426c373..3284b9b4ecac 100644 --- a/trunk/arch/mips/kernel/time.c +++ b/trunk/arch/mips/kernel/time.c @@ -50,6 +50,14 @@ int update_persistent_clock(struct timespec now) return rtc_mips_set_mmss(now.tv_sec); } +/* + * High precision timer functions for a R4k-compatible timer. + */ +static cycle_t c0_hpt_read(void) +{ + return read_c0_count(); +} + int (*mips_timer_state)(void); int null_perf_irq(void) @@ -76,6 +84,55 @@ EXPORT_SYMBOL(perf_irq); unsigned int mips_hpt_frequency; +static struct clocksource clocksource_mips = { + .name = "MIPS", + .read = c0_hpt_read, + .mask = CLOCKSOURCE_MASK(32), + .flags = CLOCK_SOURCE_IS_CONTINUOUS, +}; + +static unsigned int __init calibrate_hpt(void) +{ + cycle_t frequency, hpt_start, hpt_end, hpt_count, hz; + + const int loops = HZ / 10; + int log_2_loops = 0; + int i; + + /* + * We want to calibrate for 0.1s, but to avoid a 64-bit + * division we round the number of loops up to the nearest + * power of 2. + */ + while (loops > 1 << log_2_loops) + log_2_loops++; + i = 1 << log_2_loops; + + /* + * Wait for a rising edge of the timer interrupt. + */ + while (mips_timer_state()); + while (!mips_timer_state()); + + /* + * Now see how many high precision timer ticks happen + * during the calculated number of periods between timer + * interrupts. + */ + hpt_start = clocksource_mips.read(); + do { + while (mips_timer_state()); + while (!mips_timer_state()); + } while (--i); + hpt_end = clocksource_mips.read(); + + hpt_count = (hpt_end - hpt_start) & clocksource_mips.mask; + hz = HZ; + frequency = hpt_count * hz; + + return frequency >> log_2_loops; +} + void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock) { u64 temp; @@ -109,6 +166,16 @@ void __cpuinit clockevent_set_clock(struct clock_event_device *cd, cd->mult = (u32) temp; } +static void __init init_mips_clocksource(void) +{ + /* Calclate a somewhat reasonable rating value */ + clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000; + + clocksource_set_clock(&clocksource_mips, mips_hpt_frequency); + + clocksource_register(&clocksource_mips); +} + void __init __weak plat_time_init(void) { } @@ -127,42 +194,21 @@ void __init plat_timer_setup(void) BUG(); } -static __init int cpu_has_mfc0_count_bug(void) -{ - switch (current_cpu_type()) { - case CPU_R4000PC: - case CPU_R4000SC: - case CPU_R4000MC: - /* - * V3.0 is documented as suffering from the mfc0 from count bug. - * Afaik this is the last version of the R4000. Later versions - * were marketed as R4400. - */ - return 1; - - case CPU_R4400PC: - case CPU_R4400SC: - case CPU_R4400MC: - /* - * The published errata for the R4400 upto 3.0 say the CPU - * has the mfc0 from count bug. - */ - if ((current_cpu_data.processor_id & 0xff) <= 0x30) - return 1; - - /* - * I don't have erratas for newer R4400 so be paranoid. - */ - return 1; - } - - return 0; -} - void __init time_init(void) { plat_time_init(); - if (mips_clockevent_init() || !cpu_has_mfc0_count_bug()) + if (cpu_has_counter && (mips_hpt_frequency || mips_timer_state)) { + /* We know counter frequency. Or we can get it. */ + if (!mips_hpt_frequency) + mips_hpt_frequency = calibrate_hpt(); + + /* Report the high precision timer rate for a reference. */ + printk("Using %u.%03u MHz high precision timer.\n", + ((mips_hpt_frequency + 500) / 1000) / 1000, + ((mips_hpt_frequency + 500) / 1000) % 1000); init_mips_clocksource(); + } + + mips_clockevent_init(); } diff --git a/trunk/arch/mips/kernel/vpe.c b/trunk/arch/mips/kernel/vpe.c index c06eb812a95e..38bd33fa2a23 100644 --- a/trunk/arch/mips/kernel/vpe.c +++ b/trunk/arch/mips/kernel/vpe.c @@ -470,7 +470,7 @@ static int apply_r_mips_lo16(struct module *me, uint32_t *location, */ if (v != l->value) { printk(KERN_DEBUG "VPE loader: " - "apply_r_mips_lo16/hi16: \t" + "apply_r_mips_lo16/hi16: " "inconsistent value information\n"); return -ENOEXEC; } @@ -629,7 +629,7 @@ static void simplify_symbols(Elf_Shdr * sechdrs, break; case SHN_MIPS_SCOMMON: - printk(KERN_DEBUG "simplify_symbols: ignoring SHN_MIPS_SCOMMON " + printk(KERN_DEBUG "simplify_symbols: ignoring SHN_MIPS_SCOMMON" "symbol <%s> st_shndx %d\n", strtab + sym[i].st_name, sym[i].st_shndx); // .sbss section diff --git a/trunk/arch/mips/math-emu/ieee754.c b/trunk/arch/mips/math-emu/ieee754.c index cb1b6822711a..946aee331788 100644 --- a/trunk/arch/mips/math-emu/ieee754.c +++ b/trunk/arch/mips/math-emu/ieee754.c @@ -108,7 +108,6 @@ int ieee754si_xcpt(int r, const char *op, ...) ax.rv.si = r; va_start(ax.ap, op); ieee754_xcpt(&ax); - va_end(ax.ap); return ax.rv.si; } @@ -123,6 +122,5 @@ s64 ieee754di_xcpt(s64 r, const char *op, ...) ax.rv.di = r; va_start(ax.ap, op); ieee754_xcpt(&ax); - va_end(ax.ap); return ax.rv.di; } diff --git a/trunk/arch/mips/math-emu/ieee754dp.c b/trunk/arch/mips/math-emu/ieee754dp.c index 6d2d89f32472..3e214aac4b12 100644 --- a/trunk/arch/mips/math-emu/ieee754dp.c +++ b/trunk/arch/mips/math-emu/ieee754dp.c @@ -57,7 +57,6 @@ ieee754dp ieee754dp_xcpt(ieee754dp r, const char *op, ...) ax.rv.dp = r; va_start(ax.ap, op); ieee754_xcpt(&ax); - va_end(ax.ap); return ax.rv.dp; } @@ -84,7 +83,6 @@ ieee754dp ieee754dp_nanxcpt(ieee754dp r, const char *op, ...) ax.rv.dp = r; va_start(ax.ap, op); ieee754_xcpt(&ax); - va_end(ax.ap); return ax.rv.dp; } diff --git a/trunk/arch/mips/math-emu/ieee754sp.c b/trunk/arch/mips/math-emu/ieee754sp.c index 463534045ab6..adda851cd04f 100644 --- a/trunk/arch/mips/math-emu/ieee754sp.c +++ b/trunk/arch/mips/math-emu/ieee754sp.c @@ -58,7 +58,6 @@ ieee754sp ieee754sp_xcpt(ieee754sp r, const char *op, ...) ax.rv.sp = r; va_start(ax.ap, op); ieee754_xcpt(&ax); - va_end(ax.ap); return ax.rv.sp; } @@ -85,7 +84,6 @@ ieee754sp ieee754sp_nanxcpt(ieee754sp r, const char *op, ...) ax.rv.sp = r; va_start(ax.ap, op); ieee754_xcpt(&ax); - va_end(ax.ap); return ax.rv.sp; } diff --git a/trunk/arch/mips/mipssim/sim_time.c b/trunk/arch/mips/mipssim/sim_time.c index e39bbe989da3..bfaafa38846f 100644 --- a/trunk/arch/mips/mipssim/sim_time.c +++ b/trunk/arch/mips/mipssim/sim_time.c @@ -101,7 +101,9 @@ unsigned __init get_c0_compare_int(void) void __init plat_time_init(void) { - unsigned int est_freq; + unsigned int est_freq, flags; + + local_irq_save(flags); /* Set Data mode - binary. */ CMOS_WRITE(CMOS_READ(RTC_CONTROL) | RTC_DM_BINARY, RTC_CONTROL); @@ -112,4 +114,6 @@ void __init plat_time_init(void) (est_freq % 1000000) * 100 / 1000000); cpu_khz = est_freq / 1000; + + local_irq_restore(flags); } diff --git a/trunk/arch/mips/mm/dma-default.c b/trunk/arch/mips/mm/dma-default.c index ae76795685cc..33519ce49540 100644 --- a/trunk/arch/mips/mm/dma-default.c +++ b/trunk/arch/mips/mm/dma-default.c @@ -40,38 +40,16 @@ static inline int cpu_is_noncoherent_r10000(struct device *dev) current_cpu_type() == CPU_R12000); } -static gfp_t massage_gfp_flags(const struct device *dev, gfp_t gfp) -{ - /* ignore region specifiers */ - gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM); - -#ifdef CONFIG_ZONE_DMA32 - if (dev == NULL) - gfp |= __GFP_DMA; - else if (dev->coherent_dma_mask < DMA_BIT_MASK(24)) - gfp |= __GFP_DMA; - else -#endif -#ifdef CONFIG_ZONE_DMA32 - if (dev->coherent_dma_mask < DMA_BIT_MASK(32)) - gfp |= __GFP_DMA32; - else -#endif - ; - - /* Don't invoke OOM killer */ - gfp |= __GFP_NORETRY; - - return gfp; -} - void *dma_alloc_noncoherent(struct device *dev, size_t size, dma_addr_t * dma_handle, gfp_t gfp) { void *ret; - gfp = massage_gfp_flags(dev, gfp); + /* ignore region specifiers */ + gfp &= ~(__GFP_DMA | __GFP_HIGHMEM); + if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff)) + gfp |= GFP_DMA; ret = (void *) __get_free_pages(gfp, get_order(size)); if (ret != NULL) { @@ -89,8 +67,11 @@ void *dma_alloc_coherent(struct device *dev, size_t size, { void *ret; - gfp = massage_gfp_flags(dev, gfp); + /* ignore region specifiers */ + gfp &= ~(__GFP_DMA | __GFP_HIGHMEM); + if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff)) + gfp |= GFP_DMA; ret = (void *) __get_free_pages(gfp, get_order(size)); if (ret) { @@ -362,7 +343,7 @@ int dma_supported(struct device *dev, u64 mask) * so we can't guarantee allocations that must be * within a tighter range than GFP_DMA.. */ - if (mask < DMA_BIT_MASK(24)) + if (mask < 0x00ffffff) return 0; return 1; diff --git a/trunk/arch/mips/mm/init.c b/trunk/arch/mips/mm/init.c index 480dec04f552..ec3b9e9f30f4 100644 --- a/trunk/arch/mips/mm/init.c +++ b/trunk/arch/mips/mm/init.c @@ -347,8 +347,11 @@ static int __init page_is_ram(unsigned long pagenr) void __init paging_init(void) { - unsigned long max_zone_pfns[MAX_NR_ZONES]; - unsigned long lastpfn; + unsigned long zones_size[MAX_NR_ZONES] = { 0, }; +#ifndef CONFIG_FLATMEM + unsigned long zholes_size[MAX_NR_ZONES] = { 0, }; + unsigned long i, j, pfn; +#endif pagetable_init(); @@ -358,27 +361,35 @@ void __init paging_init(void) kmap_coherent_init(); #ifdef CONFIG_ZONE_DMA - max_zone_pfns[ZONE_DMA] = MAX_DMA_PFN; -#endif -#ifdef CONFIG_ZONE_DMA32 - max_zone_pfns[ZONE_DMA32] = MAX_DMA32_PFN; + if (min_low_pfn < MAX_DMA_PFN && MAX_DMA_PFN <= max_low_pfn) { + zones_size[ZONE_DMA] = MAX_DMA_PFN - min_low_pfn; + zones_size[ZONE_NORMAL] = max_low_pfn - MAX_DMA_PFN; + } else if (max_low_pfn < MAX_DMA_PFN) + zones_size[ZONE_DMA] = max_low_pfn - min_low_pfn; + else #endif - max_zone_pfns[ZONE_NORMAL] = max_low_pfn; - lastpfn = max_low_pfn; + zones_size[ZONE_NORMAL] = max_low_pfn - min_low_pfn; + #ifdef CONFIG_HIGHMEM - max_zone_pfns[ZONE_HIGHMEM] = highend_pfn; - lastpfn = highend_pfn; + zones_size[ZONE_HIGHMEM] = highend_pfn - highstart_pfn; - if (cpu_has_dc_aliases && max_low_pfn != highend_pfn) { + if (cpu_has_dc_aliases && zones_size[ZONE_HIGHMEM]) { printk(KERN_WARNING "This processor doesn't support highmem." - " %ldk highmem ignored\n", - (highend_pfn - max_low_pfn) << (PAGE_SHIFT - 10)); - max_zone_pfns[ZONE_HIGHMEM] = max_low_pfn; - lastpfn = max_low_pfn; + " %ldk highmem ignored\n", zones_size[ZONE_HIGHMEM]); + zones_size[ZONE_HIGHMEM] = 0; } #endif - free_area_init_nodes(max_zone_pfns); +#ifdef CONFIG_FLATMEM + free_area_init(zones_size); +#else + pfn = min_low_pfn; + for (i = 0; i < MAX_NR_ZONES; i++) + for (j = 0; j < zones_size[i]; j++, pfn++) + if (!page_is_ram(pfn)) + zholes_size[i]++; + free_area_init_node(0, NODE_DATA(0), zones_size, 0, zholes_size); +#endif } static struct kcore_list kcore_mem, kcore_vmalloc; diff --git a/trunk/arch/mips/pmc-sierra/Kconfig b/trunk/arch/mips/pmc-sierra/Kconfig index 90261b83db04..6b293ce0935f 100644 --- a/trunk/arch/mips/pmc-sierra/Kconfig +++ b/trunk/arch/mips/pmc-sierra/Kconfig @@ -5,14 +5,12 @@ choice config PMC_MSP4200_EVAL bool "PMC-Sierra MSP4200 Eval Board" select CEVT_R4K - select CSRC_R4K select IRQ_MSP_SLP select HW_HAS_PCI config PMC_MSP4200_GW bool "PMC-Sierra MSP4200 VoIP Gateway" select CEVT_R4K - select CSRC_R4K select IRQ_MSP_SLP select HW_HAS_PCI diff --git a/trunk/arch/mips/sgi-ip22/ip22-eisa.c b/trunk/arch/mips/sgi-ip22/ip22-eisa.c index 1617241d2737..26854fb11e7c 100644 --- a/trunk/arch/mips/sgi-ip22/ip22-eisa.c +++ b/trunk/arch/mips/sgi-ip22/ip22-eisa.c @@ -36,7 +36,6 @@ #include #include #include -#include /* I2 has four EISA slots. */ #define IP22_EISA_MAX_SLOTS 4 @@ -94,11 +93,126 @@ static irqreturn_t ip22_eisa_intr(int irq, void *dev_id) return IRQ_NONE; } +static void enable_eisa1_irq(unsigned int irq) +{ + u8 mask; + + mask = inb(EISA_INT1_MASK); + mask &= ~((u8) (1 << irq)); + outb(mask, EISA_INT1_MASK); +} + +static unsigned int startup_eisa1_irq(unsigned int irq) +{ + u8 edge; + + /* Only use edge interrupts for EISA */ + + edge = inb(EISA_INT1_EDGE_LEVEL); + edge &= ~((u8) (1 << irq)); + outb(edge, EISA_INT1_EDGE_LEVEL); + + enable_eisa1_irq(irq); + return 0; +} + +static void disable_eisa1_irq(unsigned int irq) +{ + u8 mask; + + mask = inb(EISA_INT1_MASK); + mask |= ((u8) (1 << irq)); + outb(mask, EISA_INT1_MASK); +} + +static void mask_and_ack_eisa1_irq(unsigned int irq) +{ + disable_eisa1_irq(irq); + + outb(0x20, EISA_INT1_CTRL); +} + +static void end_eisa1_irq(unsigned int irq) +{ + if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) + enable_eisa1_irq(irq); +} + +static struct irq_chip ip22_eisa1_irq_type = { + .name = "IP22 EISA", + .startup = startup_eisa1_irq, + .ack = mask_and_ack_eisa1_irq, + .mask = disable_eisa1_irq, + .mask_ack = mask_and_ack_eisa1_irq, + .unmask = enable_eisa1_irq, + .end = end_eisa1_irq, +}; + +static void enable_eisa2_irq(unsigned int irq) +{ + u8 mask; + + mask = inb(EISA_INT2_MASK); + mask &= ~((u8) (1 << (irq - 8))); + outb(mask, EISA_INT2_MASK); +} + +static unsigned int startup_eisa2_irq(unsigned int irq) +{ + u8 edge; + + /* Only use edge interrupts for EISA */ + + edge = inb(EISA_INT2_EDGE_LEVEL); + edge &= ~((u8) (1 << (irq - 8))); + outb(edge, EISA_INT2_EDGE_LEVEL); + + enable_eisa2_irq(irq); + return 0; +} + +static void disable_eisa2_irq(unsigned int irq) +{ + u8 mask; + + mask = inb(EISA_INT2_MASK); + mask |= ((u8) (1 << (irq - 8))); + outb(mask, EISA_INT2_MASK); +} + +static void mask_and_ack_eisa2_irq(unsigned int irq) +{ + disable_eisa2_irq(irq); + + outb(0x20, EISA_INT2_CTRL); +} + +static void end_eisa2_irq(unsigned int irq) +{ + if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) + enable_eisa2_irq(irq); +} + +static struct irq_chip ip22_eisa2_irq_type = { + .name = "IP22 EISA", + .startup = startup_eisa2_irq, + .ack = mask_and_ack_eisa2_irq, + .mask = disable_eisa2_irq, + .mask_ack = mask_and_ack_eisa2_irq, + .unmask = enable_eisa2_irq, + .end = end_eisa2_irq, +}; + static struct irqaction eisa_action = { .handler = ip22_eisa_intr, .name = "EISA", }; +static struct irqaction cascade_action = { + .handler = no_action, + .name = "EISA cascade", +}; + int __init ip22_eisa_init(void) { int i, c; @@ -134,13 +248,29 @@ int __init ip22_eisa_init(void) outb(1, EISA_EXT_NMI_RESET_CTRL); udelay(50); /* Wait long enough for the dust to settle */ outb(0, EISA_EXT_NMI_RESET_CTRL); + outb(0x11, EISA_INT1_CTRL); + outb(0x11, EISA_INT2_CTRL); + outb(0, EISA_INT1_MASK); + outb(8, EISA_INT2_MASK); + outb(4, EISA_INT1_MASK); + outb(2, EISA_INT2_MASK); + outb(1, EISA_INT1_MASK); + outb(1, EISA_INT2_MASK); + outb(0xfb, EISA_INT1_MASK); + outb(0xff, EISA_INT2_MASK); outb(0, EISA_DMA2_WRITE_SINGLE); - init_i8259_irqs(); + for (i = SGINT_EISA; i < (SGINT_EISA + EISA_MAX_IRQ); i++) { + if (i < (SGINT_EISA + 8)) + set_irq_chip(i, &ip22_eisa1_irq_type); + else + set_irq_chip(i, &ip22_eisa2_irq_type); + } /* Cannot use request_irq because of kmalloc not being ready at such * an early stage. Yes, I've been bitten... */ setup_irq(SGI_EISA_IRQ, &eisa_action); + setup_irq(SGINT_EISA + 2, &cascade_action); EISA_bus = 1; return 0; diff --git a/trunk/arch/mips/sgi-ip22/ip22-nvram.c b/trunk/arch/mips/sgi-ip22/ip22-nvram.c index 0177566475d4..e19d60d5fcc1 100644 --- a/trunk/arch/mips/sgi-ip22/ip22-nvram.c +++ b/trunk/arch/mips/sgi-ip22/ip22-nvram.c @@ -32,19 +32,19 @@ for (x=0; x<100000; x++) __asm__ __volatile__(""); }) #define eeprom_cs_on(ptr) ({ \ - __raw_writel(__raw_readl(ptr) & ~EEPROM_DATO, ptr); \ - __raw_writel(__raw_readl(ptr) & ~EEPROM_ECLK, ptr); \ - __raw_writel(__raw_readl(ptr) & ~EEPROM_EPROT, ptr); \ - delay(); \ - __raw_writel(__raw_readl(ptr) | EEPROM_CSEL, ptr); \ - __raw_writel(__raw_readl(ptr) | EEPROM_ECLK, ptr); }) + *ptr &= ~EEPROM_DATO; \ + *ptr &= ~EEPROM_ECLK; \ + *ptr &= ~EEPROM_EPROT; \ + delay(); \ + *ptr |= EEPROM_CSEL; \ + *ptr |= EEPROM_ECLK; }) #define eeprom_cs_off(ptr) ({ \ - __raw_writel(__raw_readl(ptr) & ~EEPROM_ECLK, ptr); \ - __raw_writel(__raw_readl(ptr) & ~EEPROM_CSEL, ptr); \ - __raw_writel(__raw_readl(ptr) | EEPROM_EPROT, ptr); \ - __raw_writel(__raw_readl(ptr) | EEPROM_ECLK, ptr); }) + *ptr &= ~EEPROM_ECLK; \ + *ptr &= ~EEPROM_CSEL; \ + *ptr |= EEPROM_EPROT; \ + *ptr |= EEPROM_ECLK; }) #define BITS_IN_COMMAND 11 /* @@ -60,17 +60,15 @@ static inline void eeprom_cmd(unsigned int *ctrl, unsigned cmd, unsigned reg) ser_cmd = cmd | (reg << (16 - BITS_IN_COMMAND)); for (i = 0; i < BITS_IN_COMMAND; i++) { if (ser_cmd & (1<<15)) /* if high order bit set */ - __raw_writel(__raw_readl(ctrl) | EEPROM_DATO, ctrl); + writel(readl(ctrl) | EEPROM_DATO, ctrl); else - __raw_writel(__raw_readl(ctrl) & ~EEPROM_DATO, ctrl); - __raw_writel(__raw_readl(ctrl) & ~EEPROM_ECLK, ctrl); - delay(); - __raw_writel(__raw_readl(ctrl) | EEPROM_ECLK, ctrl); - delay(); + writel(readl(ctrl) & ~EEPROM_DATO, ctrl); + writel(readl(ctrl) & ~EEPROM_ECLK, ctrl); + writel(readl(ctrl) | EEPROM_ECLK, ctrl); ser_cmd <<= 1; } /* see data sheet timing diagram */ - __raw_writel(__raw_readl(ctrl) & ~EEPROM_DATO, ctrl); + writel(readl(ctrl) & ~EEPROM_DATO, ctrl); } unsigned short ip22_eeprom_read(unsigned int *ctrl, int reg) @@ -78,18 +76,18 @@ unsigned short ip22_eeprom_read(unsigned int *ctrl, int reg) unsigned short res = 0; int i; - __raw_writel(__raw_readl(ctrl) & ~EEPROM_EPROT, ctrl); + writel(readl(ctrl) & ~EEPROM_EPROT, ctrl); eeprom_cs_on(ctrl); eeprom_cmd(ctrl, EEPROM_READ, reg); /* clock the data ouf of serial mem */ for (i = 0; i < 16; i++) { - __raw_writel(__raw_readl(ctrl) & ~EEPROM_ECLK, ctrl); + writel(readl(ctrl) & ~EEPROM_ECLK, ctrl); delay(); - __raw_writel(__raw_readl(ctrl) | EEPROM_ECLK, ctrl); + writel(readl(ctrl) | EEPROM_ECLK, ctrl); delay(); res <<= 1; - if (__raw_readl(ctrl) & EEPROM_DATI) + if (readl(ctrl) & EEPROM_DATI) res |= 1; } diff --git a/trunk/arch/mips/sgi-ip22/ip22-setup.c b/trunk/arch/mips/sgi-ip22/ip22-setup.c index 5f389ee26fca..174f09e42f6b 100644 --- a/trunk/arch/mips/sgi-ip22/ip22-setup.c +++ b/trunk/arch/mips/sgi-ip22/ip22-setup.c @@ -31,6 +31,25 @@ unsigned long sgi_gfxaddr; EXPORT_SYMBOL_GPL(sgi_gfxaddr); +/* + * Stop-A is originally a Sun thing that isn't standard on IP22 so to avoid + * accidents it's disabled by default on IP22. + * + * FIXME: provide a mechanism to change the value of stop_a_enabled. + */ +int stop_a_enabled; + +void ip22_do_break(void) +{ + if (!stop_a_enabled) + return; + + printk("\n"); + ArcEnterInteractiveMode(); +} + +EXPORT_SYMBOL(ip22_do_break); + extern void ip22_be_init(void) __init; void __init plat_mem_setup(void) diff --git a/trunk/arch/mips/sgi-ip32/ip32-irq.c b/trunk/arch/mips/sgi-ip32/ip32-irq.c index cab7cc22ab67..aab17ddd2f30 100644 --- a/trunk/arch/mips/sgi-ip32/ip32-irq.c +++ b/trunk/arch/mips/sgi-ip32/ip32-irq.c @@ -209,18 +209,18 @@ static unsigned long macepci_mask; static void enable_macepci_irq(unsigned int irq) { - macepci_mask |= MACEPCI_CONTROL_INT(irq - MACEPCI_SCSI0_IRQ); + macepci_mask |= MACEPCI_CONTROL_INT(irq - 9); mace->pci.control = macepci_mask; - crime_mask |= 1 << (irq - CRIME_IRQ_BASE); + crime_mask |= 1 << (irq - 1); crime->imask = crime_mask; } static void disable_macepci_irq(unsigned int irq) { - crime_mask &= ~(1 << (irq - CRIME_IRQ_BASE)); + crime_mask &= ~(1 << (irq - 1)); crime->imask = crime_mask; flush_crime_bus(); - macepci_mask &= ~MACEPCI_CONTROL_INT(irq - MACEPCI_SCSI0_IRQ); + macepci_mask &= ~MACEPCI_CONTROL_INT(irq - 9); mace->pci.control = macepci_mask; flush_mace_bus(); } @@ -299,7 +299,7 @@ static void enable_maceisa_irq(unsigned int irq) pr_debug("crime_int %08x enabled\n", crime_int); crime_mask |= crime_int; crime->imask = crime_mask; - maceisa_mask |= 1 << (irq - MACEISA_AUDIO_SW_IRQ); + maceisa_mask |= 1 << (irq - 33); mace->perif.ctrl.imask = maceisa_mask; } @@ -307,7 +307,7 @@ static void disable_maceisa_irq(unsigned int irq) { unsigned int crime_int = 0; - maceisa_mask &= ~(1 << (irq - MACEISA_AUDIO_SW_IRQ)); + maceisa_mask &= ~(1 << (irq - 33)); if (!(maceisa_mask & MACEISA_AUDIO_INT)) crime_int |= MACE_AUDIO_INT; if (!(maceisa_mask & MACEISA_MISC_INT)) @@ -331,7 +331,7 @@ static void mask_and_ack_maceisa_irq(unsigned int irq) case MACEISA_SERIAL2_TDMAPR_IRQ: /* edge triggered */ mace_int = mace->perif.ctrl.istat; - mace_int &= ~(1 << (irq - MACEISA_AUDIO_SW_IRQ)); + mace_int &= ~(1 << (irq - 33)); mace->perif.ctrl.istat = mace_int; break; } @@ -359,17 +359,13 @@ static struct irq_chip ip32_maceisa_interrupt = { static void enable_mace_irq(unsigned int irq) { - unsigned int bit = irq - CRIME_IRQ_BASE; - - crime_mask |= (1 << bit); + crime_mask |= 1 << (irq - 1); crime->imask = crime_mask; } static void disable_mace_irq(unsigned int irq) { - unsigned int bit = irq - CRIME_IRQ_BASE; - - crime_mask &= ~(1 << bit); + crime_mask &= ~(1 << (irq - 1)); crime->imask = crime_mask; flush_crime_bus(); } @@ -493,7 +489,7 @@ void __init arch_init_irq(void) mace->perif.ctrl.imask = 0; mips_cpu_irq_init(); - for (irq = CRIME_IRQ_BASE; irq <= IP32_IRQ_MAX; irq++) { + for (irq = MIPS_CPU_IRQ_BASE + 8; irq <= IP32_IRQ_MAX; irq++) { switch (irq) { case MACE_VID_IN1_IRQ ... MACE_PCI_BRIDGE_IRQ: set_irq_chip(irq, &ip32_mace_interrupt); diff --git a/trunk/arch/mips/vr41xx/Kconfig b/trunk/arch/mips/vr41xx/Kconfig index 559acc09c819..eeb089f20c0d 100644 --- a/trunk/arch/mips/vr41xx/Kconfig +++ b/trunk/arch/mips/vr41xx/Kconfig @@ -6,7 +6,6 @@ choice config CASIO_E55 bool "CASIO CASSIOPEIA E-10/15/55/65" select CEVT_R4K - select CSRC_R4K select DMA_NONCOHERENT select IRQ_CPU select ISA @@ -16,7 +15,6 @@ config CASIO_E55 config IBM_WORKPAD bool "IBM WorkPad z50" select CEVT_R4K - select CSRC_R4K select DMA_NONCOHERENT select IRQ_CPU select ISA @@ -26,7 +24,6 @@ config IBM_WORKPAD config NEC_CMBVR4133 bool "NEC CMB-VR4133" select CEVT_R4K - select CSRC_R4K select DMA_NONCOHERENT select IRQ_CPU select HW_HAS_PCI @@ -36,7 +33,6 @@ config NEC_CMBVR4133 config TANBAC_TB022X bool "TANBAC VR4131 multichip module and TANBAC VR4131DIMM" select CEVT_R4K - select CSRC_R4K select DMA_NONCOHERENT select IRQ_CPU select HW_HAS_PCI @@ -52,7 +48,6 @@ config TANBAC_TB022X config VICTOR_MPC30X bool "Victor MP-C303/304" select CEVT_R4K - select CSRC_R4K select DMA_NONCOHERENT select IRQ_CPU select HW_HAS_PCI @@ -63,7 +58,6 @@ config VICTOR_MPC30X config ZAO_CAPCELLA bool "ZAO Networks Capcella" select CEVT_R4K - select CSRC_R4K select DMA_NONCOHERENT select IRQ_CPU select HW_HAS_PCI diff --git a/trunk/arch/powerpc/Kconfig b/trunk/arch/powerpc/Kconfig index 232c298c933f..18f397ca05ef 100644 --- a/trunk/arch/powerpc/Kconfig +++ b/trunk/arch/powerpc/Kconfig @@ -187,11 +187,6 @@ config FORCE_MAX_ZONEORDER default "9" if PPC_64K_PAGES default "13" -config HUGETLB_PAGE_SIZE_VARIABLE - bool - depends on HUGETLB_PAGE - default y - config MATH_EMULATION bool "Math emulation" depends on 4xx || 8xx || E200 || PPC_MPC832x || E500 diff --git a/trunk/arch/powerpc/boot/dts/mpc832x_mds.dts b/trunk/arch/powerpc/boot/dts/mpc832x_mds.dts index c64f3037a13b..fcd333c391ec 100644 --- a/trunk/arch/powerpc/boot/dts/mpc832x_mds.dts +++ b/trunk/arch/powerpc/boot/dts/mpc832x_mds.dts @@ -57,19 +57,12 @@ }; i2c@3000 { - #address-cells = <1>; - #size-cells = <0>; device_type = "i2c"; compatible = "fsl-i2c"; reg = <3000 100>; interrupts = ; interrupt-parent = < &ipic >; dfsrr; - - rtc@68 { - compatible = "dallas,ds1374"; - reg = <68>; - }; }; serial@4500 { @@ -111,7 +104,7 @@ reg = <700 100>; device_type = "ipic"; }; - + par_io@1400 { reg = <1400 100>; device_type = "par_io"; @@ -124,6 +117,7 @@ 3 5 1 0 2 0 /* MDC */ 0 d 2 0 1 0 /* RX_CLK (CLK9) */ 3 18 2 0 1 0 /* TX_CLK (CLK10) */ + 1 1 1 0 1 0 /* TxD1 */ 1 0 1 0 1 0 /* TxD0 */ 1 1 1 0 1 0 /* TxD1 */ 1 2 1 0 1 0 /* TxD2 */ @@ -171,11 +165,11 @@ reg = ; brg-frequency = <0>; bus-frequency = ; - + muram@10000 { device_type = "muram"; ranges = <0 00010000 00004000>; - + data-only@0 { reg = <0 4000>; }; @@ -234,7 +228,7 @@ compatible = "ucc_geth"; model = "UCC"; device-id = <4>; - reg = <3200 200>; + reg = <3000 200>; interrupts = <23>; interrupt-parent = < &qeic >; /* diff --git a/trunk/arch/powerpc/boot/dts/mpc834x_mds.dts b/trunk/arch/powerpc/boot/dts/mpc834x_mds.dts index 49363f89cb71..e5a84ef9f4b0 100644 --- a/trunk/arch/powerpc/boot/dts/mpc834x_mds.dts +++ b/trunk/arch/powerpc/boot/dts/mpc834x_mds.dts @@ -57,24 +57,15 @@ }; i2c@3000 { - #address-cells = <1>; - #size-cells = <0>; device_type = "i2c"; compatible = "fsl-i2c"; reg = <3000 100>; interrupts = ; interrupt-parent = < &ipic >; dfsrr; - - rtc@68 { - compatible = "dallas,ds1374"; - reg = <68>; - }; }; i2c@3100 { - #address-cells = <1>; - #size-cells = <0>; device_type = "i2c"; compatible = "fsl-i2c"; reg = <3100 100>; diff --git a/trunk/arch/powerpc/boot/dts/mpc836x_mds.dts b/trunk/arch/powerpc/boot/dts/mpc836x_mds.dts index 0b2d2b588daa..fbd1573c348b 100644 --- a/trunk/arch/powerpc/boot/dts/mpc836x_mds.dts +++ b/trunk/arch/powerpc/boot/dts/mpc836x_mds.dts @@ -62,24 +62,15 @@ }; i2c@3000 { - #address-cells = <1>; - #size-cells = <0>; device_type = "i2c"; compatible = "fsl-i2c"; reg = <3000 100>; interrupts = ; interrupt-parent = < &ipic >; dfsrr; - - rtc@68 { - compatible = "dallas,ds1374"; - reg = <68>; - }; }; i2c@3100 { - #address-cells = <1>; - #size-cells = <0>; device_type = "i2c"; compatible = "fsl-i2c"; reg = <3100 100>; diff --git a/trunk/arch/powerpc/boot/dts/mpc8544ds.dts b/trunk/arch/powerpc/boot/dts/mpc8544ds.dts index 6c608de1fc1b..3f9d15cf13e0 100644 --- a/trunk/arch/powerpc/boot/dts/mpc8544ds.dts +++ b/trunk/arch/powerpc/boot/dts/mpc8544ds.dts @@ -272,24 +272,24 @@ clock-frequency = <1fca055>; interrupt-parent = <&mpic>; interrupts = <1b 2>; - interrupt-map-mask = ; + interrupt-map-mask = ; interrupt-map = < // IDSEL 0x1c USB - e000 0 0 1 &i8259 c 2 - e100 0 0 1 &i8259 9 2 - e200 0 0 1 &i8259 a 2 - e300 0 0 1 &i8259 b 2 + e000 0 0 0 &i8259 c 2 + e100 0 0 0 &i8259 9 2 + e200 0 0 0 &i8259 a 2 + e300 0 0 0 &i8259 b 2 // IDSEL 0x1d Audio - e800 0 0 1 &i8259 6 2 + e800 0 0 0 &i8259 6 2 // IDSEL 0x1e Legacy - f000 0 0 1 &i8259 7 2 - f100 0 0 1 &i8259 7 2 + f000 0 0 0 &i8259 7 2 + f100 0 0 0 &i8259 7 2 // IDSEL 0x1f IDE/SATA - f800 0 0 1 &i8259 e 2 - f900 0 0 1 &i8259 5 2 + f800 0 0 0 &i8259 e 2 + f900 0 0 0 &i8259 5 2 >; pcie@0 { diff --git a/trunk/arch/powerpc/boot/dts/mpc8572ds.dts b/trunk/arch/powerpc/boot/dts/mpc8572ds.dts index 0eb44fb9647d..d638deec7652 100644 --- a/trunk/arch/powerpc/boot/dts/mpc8572ds.dts +++ b/trunk/arch/powerpc/boot/dts/mpc8572ds.dts @@ -219,120 +219,36 @@ clock-frequency = <1fca055>; interrupt-parent = <&mpic>; interrupts = <18 2>; - interrupt-map-mask = ; + interrupt-map-mask = ; interrupt-map = < - /* IDSEL 0x11 func 0 - PCI slot 1 */ + /* IDSEL 0x11 - PCI slot 1 */ 8800 0 0 1 &mpic 2 1 8800 0 0 2 &mpic 3 1 8800 0 0 3 &mpic 4 1 8800 0 0 4 &mpic 1 1 - /* IDSEL 0x11 func 1 - PCI slot 1 */ - 8900 0 0 1 &mpic 2 1 - 8900 0 0 2 &mpic 3 1 - 8900 0 0 3 &mpic 4 1 - 8900 0 0 4 &mpic 1 1 - - /* IDSEL 0x11 func 2 - PCI slot 1 */ - 8a00 0 0 1 &mpic 2 1 - 8a00 0 0 2 &mpic 3 1 - 8a00 0 0 3 &mpic 4 1 - 8a00 0 0 4 &mpic 1 1 - - /* IDSEL 0x11 func 3 - PCI slot 1 */ - 8b00 0 0 1 &mpic 2 1 - 8b00 0 0 2 &mpic 3 1 - 8b00 0 0 3 &mpic 4 1 - 8b00 0 0 4 &mpic 1 1 - - /* IDSEL 0x11 func 4 - PCI slot 1 */ - 8c00 0 0 1 &mpic 2 1 - 8c00 0 0 2 &mpic 3 1 - 8c00 0 0 3 &mpic 4 1 - 8c00 0 0 4 &mpic 1 1 - - /* IDSEL 0x11 func 5 - PCI slot 1 */ - 8d00 0 0 1 &mpic 2 1 - 8d00 0 0 2 &mpic 3 1 - 8d00 0 0 3 &mpic 4 1 - 8d00 0 0 4 &mpic 1 1 - - /* IDSEL 0x11 func 6 - PCI slot 1 */ - 8e00 0 0 1 &mpic 2 1 - 8e00 0 0 2 &mpic 3 1 - 8e00 0 0 3 &mpic 4 1 - 8e00 0 0 4 &mpic 1 1 - - /* IDSEL 0x11 func 7 - PCI slot 1 */ - 8f00 0 0 1 &mpic 2 1 - 8f00 0 0 2 &mpic 3 1 - 8f00 0 0 3 &mpic 4 1 - 8f00 0 0 4 &mpic 1 1 - - /* IDSEL 0x12 func 0 - PCI slot 2 */ + /* IDSEL 0x12 - PCI slot 2 */ 9000 0 0 1 &mpic 3 1 9000 0 0 2 &mpic 4 1 9000 0 0 3 &mpic 1 1 9000 0 0 4 &mpic 2 1 - /* IDSEL 0x12 func 1 - PCI slot 2 */ - 9100 0 0 1 &mpic 3 1 - 9100 0 0 2 &mpic 4 1 - 9100 0 0 3 &mpic 1 1 - 9100 0 0 4 &mpic 2 1 - - /* IDSEL 0x12 func 2 - PCI slot 2 */ - 9200 0 0 1 &mpic 3 1 - 9200 0 0 2 &mpic 4 1 - 9200 0 0 3 &mpic 1 1 - 9200 0 0 4 &mpic 2 1 - - /* IDSEL 0x12 func 3 - PCI slot 2 */ - 9300 0 0 1 &mpic 3 1 - 9300 0 0 2 &mpic 4 1 - 9300 0 0 3 &mpic 1 1 - 9300 0 0 4 &mpic 2 1 - - /* IDSEL 0x12 func 4 - PCI slot 2 */ - 9400 0 0 1 &mpic 3 1 - 9400 0 0 2 &mpic 4 1 - 9400 0 0 3 &mpic 1 1 - 9400 0 0 4 &mpic 2 1 - - /* IDSEL 0x12 func 5 - PCI slot 2 */ - 9500 0 0 1 &mpic 3 1 - 9500 0 0 2 &mpic 4 1 - 9500 0 0 3 &mpic 1 1 - 9500 0 0 4 &mpic 2 1 - - /* IDSEL 0x12 func 6 - PCI slot 2 */ - 9600 0 0 1 &mpic 3 1 - 9600 0 0 2 &mpic 4 1 - 9600 0 0 3 &mpic 1 1 - 9600 0 0 4 &mpic 2 1 - - /* IDSEL 0x12 func 7 - PCI slot 2 */ - 9700 0 0 1 &mpic 3 1 - 9700 0 0 2 &mpic 4 1 - 9700 0 0 3 &mpic 1 1 - 9700 0 0 4 &mpic 2 1 - // IDSEL 0x1c USB - e000 0 0 1 &i8259 c 2 - e100 0 0 1 &i8259 9 2 - e200 0 0 1 &i8259 a 2 - e300 0 0 1 &i8259 b 2 + e000 0 0 0 &i8259 c 2 + e100 0 0 0 &i8259 9 2 + e200 0 0 0 &i8259 a 2 + e300 0 0 0 &i8259 b 2 // IDSEL 0x1d Audio - e800 0 0 1 &i8259 6 2 + e800 0 0 0 &i8259 6 2 // IDSEL 0x1e Legacy - f000 0 0 1 &i8259 7 2 - f100 0 0 1 &i8259 7 2 + f000 0 0 0 &i8259 7 2 + f100 0 0 0 &i8259 7 2 // IDSEL 0x1f IDE/SATA - f800 0 0 1 &i8259 e 2 - f900 0 0 1 &i8259 5 2 + f800 0 0 0 &i8259 e 2 + f900 0 0 0 &i8259 5 2 >; diff --git a/trunk/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/trunk/arch/powerpc/boot/dts/mpc8641_hpcn.dts index abb26dc42558..367765937a06 100644 --- a/trunk/arch/powerpc/boot/dts/mpc8641_hpcn.dts +++ b/trunk/arch/powerpc/boot/dts/mpc8641_hpcn.dts @@ -235,120 +235,36 @@ clock-frequency = <1fca055>; interrupt-parent = <&mpic>; interrupts = <18 2>; - interrupt-map-mask = ; + interrupt-map-mask = ; interrupt-map = < - /* IDSEL 0x11 func 0 - PCI slot 1 */ - 8800 0 0 1 &mpic 2 1 - 8800 0 0 2 &mpic 3 1 - 8800 0 0 3 &mpic 4 1 - 8800 0 0 4 &mpic 1 1 - - /* IDSEL 0x11 func 1 - PCI slot 1 */ - 8900 0 0 1 &mpic 2 1 - 8900 0 0 2 &mpic 3 1 - 8900 0 0 3 &mpic 4 1 - 8900 0 0 4 &mpic 1 1 - - /* IDSEL 0x11 func 2 - PCI slot 1 */ - 8a00 0 0 1 &mpic 2 1 - 8a00 0 0 2 &mpic 3 1 - 8a00 0 0 3 &mpic 4 1 - 8a00 0 0 4 &mpic 1 1 - - /* IDSEL 0x11 func 3 - PCI slot 1 */ - 8b00 0 0 1 &mpic 2 1 - 8b00 0 0 2 &mpic 3 1 - 8b00 0 0 3 &mpic 4 1 - 8b00 0 0 4 &mpic 1 1 - - /* IDSEL 0x11 func 4 - PCI slot 1 */ - 8c00 0 0 1 &mpic 2 1 - 8c00 0 0 2 &mpic 3 1 - 8c00 0 0 3 &mpic 4 1 - 8c00 0 0 4 &mpic 1 1 - - /* IDSEL 0x11 func 5 - PCI slot 1 */ - 8d00 0 0 1 &mpic 2 1 - 8d00 0 0 2 &mpic 3 1 - 8d00 0 0 3 &mpic 4 1 - 8d00 0 0 4 &mpic 1 1 - - /* IDSEL 0x11 func 6 - PCI slot 1 */ - 8e00 0 0 1 &mpic 2 1 - 8e00 0 0 2 &mpic 3 1 - 8e00 0 0 3 &mpic 4 1 - 8e00 0 0 4 &mpic 1 1 - - /* IDSEL 0x11 func 7 - PCI slot 1 */ - 8f00 0 0 1 &mpic 2 1 - 8f00 0 0 2 &mpic 3 1 - 8f00 0 0 3 &mpic 4 1 - 8f00 0 0 4 &mpic 1 1 - - /* IDSEL 0x12 func 0 - PCI slot 2 */ - 9000 0 0 1 &mpic 3 1 - 9000 0 0 2 &mpic 4 1 - 9000 0 0 3 &mpic 1 1 - 9000 0 0 4 &mpic 2 1 - - /* IDSEL 0x12 func 1 - PCI slot 2 */ - 9100 0 0 1 &mpic 3 1 - 9100 0 0 2 &mpic 4 1 - 9100 0 0 3 &mpic 1 1 - 9100 0 0 4 &mpic 2 1 - - /* IDSEL 0x12 func 2 - PCI slot 2 */ - 9200 0 0 1 &mpic 3 1 - 9200 0 0 2 &mpic 4 1 - 9200 0 0 3 &mpic 1 1 - 9200 0 0 4 &mpic 2 1 - - /* IDSEL 0x12 func 3 - PCI slot 2 */ - 9300 0 0 1 &mpic 3 1 - 9300 0 0 2 &mpic 4 1 - 9300 0 0 3 &mpic 1 1 - 9300 0 0 4 &mpic 2 1 - - /* IDSEL 0x12 func 4 - PCI slot 2 */ - 9400 0 0 1 &mpic 3 1 - 9400 0 0 2 &mpic 4 1 - 9400 0 0 3 &mpic 1 1 - 9400 0 0 4 &mpic 2 1 - - /* IDSEL 0x12 func 5 - PCI slot 2 */ - 9500 0 0 1 &mpic 3 1 - 9500 0 0 2 &mpic 4 1 - 9500 0 0 3 &mpic 1 1 - 9500 0 0 4 &mpic 2 1 - - /* IDSEL 0x12 func 6 - PCI slot 2 */ - 9600 0 0 1 &mpic 3 1 - 9600 0 0 2 &mpic 4 1 - 9600 0 0 3 &mpic 1 1 - 9600 0 0 4 &mpic 2 1 - - /* IDSEL 0x12 func 7 - PCI slot 2 */ - 9700 0 0 1 &mpic 3 1 - 9700 0 0 2 &mpic 4 1 - 9700 0 0 3 &mpic 1 1 - 9700 0 0 4 &mpic 2 1 + /* IDSEL 0x11 */ + 8800 0 0 1 &i8259 9 2 + 8800 0 0 2 &i8259 a 2 + 8800 0 0 3 &i8259 b 2 + 8800 0 0 4 &i8259 c 2 + + /* IDSEL 0x12 */ + 9000 0 0 1 &i8259 a 2 + 9000 0 0 2 &i8259 b 2 + 9000 0 0 3 &i8259 c 2 + 9000 0 0 4 &i8259 9 2 // IDSEL 0x1c USB - e000 0 0 1 &i8259 c 2 - e100 0 0 1 &i8259 9 2 - e200 0 0 1 &i8259 a 2 - e300 0 0 1 &i8259 b 2 + e000 0 0 0 &i8259 c 2 + e100 0 0 0 &i8259 9 2 + e200 0 0 0 &i8259 a 2 + e300 0 0 0 &i8259 b 2 // IDSEL 0x1d Audio - e800 0 0 1 &i8259 6 2 + e800 0 0 0 &i8259 6 2 // IDSEL 0x1e Legacy - f000 0 0 1 &i8259 7 2 - f100 0 0 1 &i8259 7 2 + f000 0 0 0 &i8259 7 2 + f100 0 0 0 &i8259 7 2 // IDSEL 0x1f IDE/SATA - f800 0 0 1 &i8259 e 2 - f900 0 0 1 &i8259 5 2 + f800 0 0 0 &i8259 e 2 + f900 0 0 0 &i8259 5 2 >; pcie@0 { diff --git a/trunk/arch/powerpc/configs/mpc832x_mds_defconfig b/trunk/arch/powerpc/configs/mpc832x_mds_defconfig index e069018276ca..dd68d1818d6b 100644 --- a/trunk/arch/powerpc/configs/mpc832x_mds_defconfig +++ b/trunk/arch/powerpc/configs/mpc832x_mds_defconfig @@ -774,53 +774,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y # CONFIG_NEW_LEDS is not set # CONFIG_INFINIBAND is not set # CONFIG_EDAC is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -CONFIG_RTC_DRV_DS1374=y -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set - -# -# SPI RTC drivers -# - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_V3020 is not set - -# -# on-CPU RTC drivers -# +# CONFIG_RTC_CLASS is not set # # DMA Engine support diff --git a/trunk/arch/powerpc/configs/mpc832x_rdb_defconfig b/trunk/arch/powerpc/configs/mpc832x_rdb_defconfig index 7a5b13f4140f..4f391028c79c 100644 --- a/trunk/arch/powerpc/configs/mpc832x_rdb_defconfig +++ b/trunk/arch/powerpc/configs/mpc832x_rdb_defconfig @@ -685,21 +685,8 @@ CONFIG_I2C_MPC=y # # SPI support # -CONFIG_SPI=y -CONFIG_SPI_MASTER=y - -# -# SPI Master Controller Drivers -# -CONFIG_SPI_BITBANG=y -CONFIG_SPI_MPC83xx=y - -# -# SPI Protocol Masters -# -# CONFIG_SPI_AT25 is not set -# CONFIG_SPI_SPIDEV is not set -# CONFIG_SPI_TLE62X0 is not set +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set # CONFIG_W1 is not set # CONFIG_POWER_SUPPLY is not set CONFIG_HWMON=y @@ -723,7 +710,6 @@ CONFIG_HWMON=y # CONFIG_SENSORS_GL520SM is not set # CONFIG_SENSORS_IT87 is not set # CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM70 is not set # CONFIG_SENSORS_LM75 is not set # CONFIG_SENSORS_LM77 is not set # CONFIG_SENSORS_LM78 is not set @@ -910,24 +896,7 @@ CONFIG_USB_MON=y # USB Gadget Support # # CONFIG_USB_GADGET is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -# CONFIG_MMC_UNSAFE_RESUME is not set - -# -# MMC/SD Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_SDIO_UART is not set - -# -# MMC/SD Host Controller Drivers -# -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_WBSD is not set -# CONFIG_MMC_TIFM_SD is not set -CONFIG_MMC_SPI=y +# CONFIG_MMC is not set # CONFIG_NEW_LEDS is not set # CONFIG_INFINIBAND is not set # CONFIG_EDAC is not set @@ -1132,9 +1101,9 @@ CONFIG_UCC=y CONFIG_BITREVERSE=y # CONFIG_CRC_CCITT is not set # CONFIG_CRC16 is not set -CONFIG_CRC_ITU_T=y +# CONFIG_CRC_ITU_T is not set CONFIG_CRC32=y -CONFIG_CRC7=y +# CONFIG_CRC7 is not set # CONFIG_LIBCRC32C is not set CONFIG_PLIST=y CONFIG_HAS_IOMEM=y diff --git a/trunk/arch/powerpc/configs/mpc834x_itx_defconfig b/trunk/arch/powerpc/configs/mpc834x_itx_defconfig index ba512d13f3a3..eb28dd85cb2b 100644 --- a/trunk/arch/powerpc/configs/mpc834x_itx_defconfig +++ b/trunk/arch/powerpc/configs/mpc834x_itx_defconfig @@ -867,7 +867,7 @@ CONFIG_USB_EHCI_ROOT_HUB_TT=y CONFIG_USB_EHCI_FSL=y # CONFIG_USB_ISP116X_HCD is not set # CONFIG_USB_OHCI_HCD is not set -CONFIG_USB_UHCI_HCD=y +# CONFIG_USB_UHCI_HCD is not set # CONFIG_USB_SL811_HCD is not set # CONFIG_USB_R8A66597_HCD is not set diff --git a/trunk/arch/powerpc/configs/mpc834x_itxgp_defconfig b/trunk/arch/powerpc/configs/mpc834x_itxgp_defconfig index 9faa948c22ad..22b95462c913 100644 --- a/trunk/arch/powerpc/configs/mpc834x_itxgp_defconfig +++ b/trunk/arch/powerpc/configs/mpc834x_itxgp_defconfig @@ -760,100 +760,14 @@ CONFIG_USB_SUPPORT=y CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -# CONFIG_USB_DEVICEFS is not set -CONFIG_USB_DEVICE_CLASS=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -CONFIG_USB_EHCI_HCD=y -# CONFIG_USB_EHCI_SPLIT_ISO is not set +# CONFIG_USB is not set CONFIG_USB_EHCI_ROOT_HUB_TT=y -# CONFIG_USB_EHCI_TT_NEWSCHED is not set CONFIG_USB_EHCI_FSL=y -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_OHCI_HCD is not set -CONFIG_USB_UHCI_HCD=y -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set # # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' # -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=y -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_USBAT is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_SDDR55 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_STORAGE_ALAUDA is not set -# CONFIG_USB_STORAGE_KARMA is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_AUERSWALD is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_BERRY_CHARGE is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_PHIDGET is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_SISUSBVGA is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TRANCEVIBRATOR is not set -# CONFIG_USB_IOWARRIOR is not set - -# -# USB DSL modem support -# - # # USB Gadget Support # diff --git a/trunk/arch/powerpc/configs/mpc834x_mds_defconfig b/trunk/arch/powerpc/configs/mpc834x_mds_defconfig index 356f736a5d3d..e59a88e95486 100644 --- a/trunk/arch/powerpc/configs/mpc834x_mds_defconfig +++ b/trunk/arch/powerpc/configs/mpc834x_mds_defconfig @@ -721,53 +721,7 @@ CONFIG_USB_EHCI_FSL=y # CONFIG_NEW_LEDS is not set # CONFIG_INFINIBAND is not set # CONFIG_EDAC is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -CONFIG_RTC_DRV_DS1374=y -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set - -# -# SPI RTC drivers -# - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_V3020 is not set - -# -# on-CPU RTC drivers -# +# CONFIG_RTC_CLASS is not set # # DMA Engine support diff --git a/trunk/arch/powerpc/configs/mpc836x_mds_defconfig b/trunk/arch/powerpc/configs/mpc836x_mds_defconfig index 1b4d37570eb1..75657528518e 100644 --- a/trunk/arch/powerpc/configs/mpc836x_mds_defconfig +++ b/trunk/arch/powerpc/configs/mpc836x_mds_defconfig @@ -773,53 +773,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y # CONFIG_NEW_LEDS is not set # CONFIG_INFINIBAND is not set # CONFIG_EDAC is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -CONFIG_RTC_DRV_DS1374=y -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set - -# -# SPI RTC drivers -# - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_V3020 is not set - -# -# on-CPU RTC drivers -# +# CONFIG_RTC_CLASS is not set # # DMA Engine support diff --git a/trunk/arch/powerpc/configs/mpc8568mds_defconfig b/trunk/arch/powerpc/configs/mpc8568mds_defconfig index d665e7a797c0..883d8af9debd 100644 --- a/trunk/arch/powerpc/configs/mpc8568mds_defconfig +++ b/trunk/arch/powerpc/configs/mpc8568mds_defconfig @@ -768,53 +768,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y # CONFIG_NEW_LEDS is not set # CONFIG_INFINIBAND is not set # CONFIG_EDAC is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -CONFIG_RTC_DRV_DS1374=y -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set - -# -# SPI RTC drivers -# - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_V3020 is not set - -# -# on-CPU RTC drivers -# +# CONFIG_RTC_CLASS is not set # # DMA Engine support diff --git a/trunk/arch/powerpc/kernel/asm-offsets.c b/trunk/arch/powerpc/kernel/asm-offsets.c index d67bcd84f329..2c8e756d19a3 100644 --- a/trunk/arch/powerpc/kernel/asm-offsets.c +++ b/trunk/arch/powerpc/kernel/asm-offsets.c @@ -284,10 +284,6 @@ int main(void) DEFINE(CFG_SYSCALL_MAP32, offsetof(struct vdso_data, syscall_map_32)); DEFINE(WTOM_CLOCK_SEC, offsetof(struct vdso_data, wtom_clock_sec)); DEFINE(WTOM_CLOCK_NSEC, offsetof(struct vdso_data, wtom_clock_nsec)); - DEFINE(CFG_ICACHE_BLOCKSZ, offsetof(struct vdso_data, icache_block_size)); - DEFINE(CFG_DCACHE_BLOCKSZ, offsetof(struct vdso_data, dcache_block_size)); - DEFINE(CFG_ICACHE_LOGBLOCKSZ, offsetof(struct vdso_data, icache_log_block_size)); - DEFINE(CFG_DCACHE_LOGBLOCKSZ, offsetof(struct vdso_data, dcache_log_block_size)); #ifdef CONFIG_PPC64 DEFINE(CFG_SYSCALL_MAP64, offsetof(struct vdso_data, syscall_map_64)); DEFINE(TVAL64_TV_SEC, offsetof(struct timeval, tv_sec)); diff --git a/trunk/arch/powerpc/kernel/rtas.c b/trunk/arch/powerpc/kernel/rtas.c index 053cac19f714..214780798289 100644 --- a/trunk/arch/powerpc/kernel/rtas.c +++ b/trunk/arch/powerpc/kernel/rtas.c @@ -19,9 +19,6 @@ #include #include #include -#include -#include -#include #include #include @@ -37,8 +34,6 @@ #include #include #include -#include -#include struct rtas_t rtas = { .lock = SPIN_LOCK_UNLOCKED @@ -46,10 +41,8 @@ struct rtas_t rtas = { EXPORT_SYMBOL(rtas); struct rtas_suspend_me_data { - atomic_t working; /* number of cpus accessing this struct */ - int token; /* ibm,suspend-me */ - int error; - struct completion *complete; /* wait on this until working == 0 */ + long waiting; + struct rtas_args *args; }; DEFINE_SPINLOCK(rtas_data_buf_lock); @@ -638,18 +631,18 @@ void rtas_halt(void) /* Must be in the RMO region, so we place it here */ static char rtas_os_term_buf[2048]; -void rtas_panic_msg(char *str) -{ - snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str); -} - -void rtas_os_term(void) +void rtas_os_term(char *str) { int status; + if (panic_timeout) + return; + if (RTAS_UNKNOWN_SERVICE == rtas_token("ibm,os-term")) return; + snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str); + do { status = rtas_call(rtas_token("ibm,os-term"), 1, 1, NULL, __pa(rtas_os_term_buf)); @@ -664,62 +657,50 @@ static int ibm_suspend_me_token = RTAS_UNKNOWN_SERVICE; #ifdef CONFIG_PPC_PSERIES static void rtas_percpu_suspend_me(void *info) { + int i; long rc; - unsigned long msr_save; - int cpu; + long flags; struct rtas_suspend_me_data *data = (struct rtas_suspend_me_data *)info; - atomic_inc(&data->working); - - /* really need to ensure MSR.EE is off for H_JOIN */ - msr_save = mfmsr(); - mtmsr(msr_save & ~(MSR_EE)); - - rc = plpar_hcall_norets(H_JOIN); - - mtmsr(msr_save); - - if (rc == H_SUCCESS) { - /* This cpu was prodded and the suspend is complete. */ + /* + * We use "waiting" to indicate our state. As long + * as it is >0, we are still trying to all join up. + * If it goes to 0, we have successfully joined up and + * one thread got H_CONTINUE. If any error happens, + * we set it to <0. + */ + local_irq_save(flags); + do { + rc = plpar_hcall_norets(H_JOIN); + smp_rmb(); + } while (rc == H_SUCCESS && data->waiting > 0); + if (rc == H_SUCCESS) goto out; - } else if (rc == H_CONTINUE) { - /* All other cpus are in H_JOIN, this cpu does - * the suspend. - */ - printk(KERN_DEBUG "calling ibm,suspend-me on cpu %i\n", - smp_processor_id()); - data->error = rtas_call(data->token, 0, 1, NULL); - - if (data->error) - printk(KERN_DEBUG "ibm,suspend-me returned %d\n", - data->error); + + if (rc == H_CONTINUE) { + data->waiting = 0; + data->args->args[data->args->nargs] = + rtas_call(ibm_suspend_me_token, 0, 1, NULL); + for_each_possible_cpu(i) + plpar_hcall_norets(H_PROD,i); } else { - printk(KERN_ERR "H_JOIN on cpu %i failed with rc = %ld\n", - smp_processor_id(), rc); - data->error = rc; + data->waiting = -EBUSY; + printk(KERN_ERR "Error on H_JOIN hypervisor call\n"); } - /* This cpu did the suspend or got an error; in either case, - * we need to prod all other other cpus out of join state. - * Extra prods are harmless. - */ - for_each_online_cpu(cpu) - plpar_hcall_norets(H_PROD, get_hard_smp_processor_id(cpu)); + out: - if (atomic_dec_return(&data->working) == 0) - complete(data->complete); + local_irq_restore(flags); + return; } static int rtas_ibm_suspend_me(struct rtas_args *args) { + int i; long state; long rc; unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; struct rtas_suspend_me_data data; - DECLARE_COMPLETION_ONSTACK(done); - - if (!rtas_service_present("ibm,suspend-me")) - return -ENOSYS; /* Make sure the state is valid */ rc = plpar_hcall(H_VASI_STATE, retbuf, @@ -740,23 +721,25 @@ static int rtas_ibm_suspend_me(struct rtas_args *args) return 0; } - atomic_set(&data.working, 0); - data.token = rtas_token("ibm,suspend-me"); - data.error = 0; - data.complete = &done; + data.waiting = 1; + data.args = args; /* Call function on all CPUs. One of us will make the * rtas call */ if (on_each_cpu(rtas_percpu_suspend_me, &data, 1, 0)) - data.error = -EINVAL; + data.waiting = -EINVAL; - wait_for_completion(&done); - - if (data.error != 0) + if (data.waiting != 0) printk(KERN_ERR "Error doing global join\n"); - return data.error; + /* Prod each CPU. This won't hurt, and will wake + * anyone we successfully put to sleep with H_JOIN. + */ + for_each_possible_cpu(i) + plpar_hcall_norets(H_PROD, i); + + return data.waiting; } #else /* CONFIG_PPC_PSERIES */ static int rtas_ibm_suspend_me(struct rtas_args *args) diff --git a/trunk/arch/powerpc/kernel/time.c b/trunk/arch/powerpc/kernel/time.c index a925a8eae121..c0d77723ba11 100644 --- a/trunk/arch/powerpc/kernel/time.c +++ b/trunk/arch/powerpc/kernel/time.c @@ -241,9 +241,8 @@ void account_system_vtime(struct task_struct *tsk) /* deltascaled includes both user and system time. * Hence scale it based on the purr ratio to estimate * the system time */ - if (get_paca()->user_time) - deltascaled = deltascaled * get_paca()->system_time / - (get_paca()->system_time + get_paca()->user_time); + deltascaled = deltascaled * get_paca()->system_time / + (get_paca()->system_time + get_paca()->user_time); delta += get_paca()->system_time; get_paca()->system_time = 0; } diff --git a/trunk/arch/powerpc/kernel/vdso.c b/trunk/arch/powerpc/kernel/vdso.c index 3702df7dc567..2322ba5cce4c 100644 --- a/trunk/arch/powerpc/kernel/vdso.c +++ b/trunk/arch/powerpc/kernel/vdso.c @@ -699,22 +699,11 @@ static int __init vdso_init(void) vdso_data->icache_size = ppc64_caches.isize; vdso_data->icache_line_size = ppc64_caches.iline_size; - /* XXXOJN: Blocks should be added to ppc64_caches and used instead */ - vdso_data->dcache_block_size = ppc64_caches.dline_size; - vdso_data->icache_block_size = ppc64_caches.iline_size; - vdso_data->dcache_log_block_size = ppc64_caches.log_dline_size; - vdso_data->icache_log_block_size = ppc64_caches.log_iline_size; - /* * Calculate the size of the 64 bits vDSO */ vdso64_pages = (&vdso64_end - &vdso64_start) >> PAGE_SHIFT; DBG("vdso64_kbase: %p, 0x%x pages\n", vdso64_kbase, vdso64_pages); -#else - vdso_data->dcache_block_size = L1_CACHE_BYTES; - vdso_data->dcache_log_block_size = L1_CACHE_SHIFT; - vdso_data->icache_block_size = L1_CACHE_BYTES; - vdso_data->icache_log_block_size = L1_CACHE_SHIFT; #endif /* CONFIG_PPC64 */ diff --git a/trunk/arch/powerpc/kernel/vdso32/cacheflush.S b/trunk/arch/powerpc/kernel/vdso32/cacheflush.S index 1ba6feb71b31..9cb319992c38 100644 --- a/trunk/arch/powerpc/kernel/vdso32/cacheflush.S +++ b/trunk/arch/powerpc/kernel/vdso32/cacheflush.S @@ -23,46 +23,29 @@ * * Flushes the data cache & invalidate the instruction cache for the * provided range [start, end[ + * + * Note: all CPUs supported by this kernel have a 128 bytes cache + * line size so we don't have to peek that info from the datapage */ V_FUNCTION_BEGIN(__kernel_sync_dicache) .cfi_startproc - mflr r12 - .cfi_register lr,r12 - mr r11,r3 - bl __get_datapage@local - mtlr r12 - mr r10,r3 - - lwz r7,CFG_DCACHE_BLOCKSZ(r10) - addi r5,r7,-1 - andc r6,r11,r5 /* round low to line bdy */ + li r5,127 + andc r6,r3,r5 /* round low to line bdy */ subf r8,r6,r4 /* compute length */ add r8,r8,r5 /* ensure we get enough */ - lwz r9,CFG_DCACHE_LOGBLOCKSZ(r10) - srw. r8,r8,r9 /* compute line count */ + srwi. r8,r8,7 /* compute line count */ crclr cr0*4+so beqlr /* nothing to do? */ mtctr r8 -1: dcbst 0,r6 - add r6,r6,r7 + mr r3,r6 +1: dcbst 0,r3 + addi r3,r3,128 bdnz 1b sync - -/* Now invalidate the instruction cache */ - - lwz r7,CFG_ICACHE_BLOCKSZ(r10) - addi r5,r7,-1 - andc r6,r11,r5 /* round low to line bdy */ - subf r8,r6,r4 /* compute length */ - add r8,r8,r5 - lwz r9,CFG_ICACHE_LOGBLOCKSZ(r10) - srw. r8,r8,r9 /* compute line count */ - crclr cr0*4+so - beqlr /* nothing to do? */ mtctr r8 -2: icbi 0,r6 - add r6,r6,r7 - bdnz 2b +1: icbi 0,r6 + addi r6,r6,128 + bdnz 1b isync li r3,0 blr diff --git a/trunk/arch/powerpc/kernel/vdso64/cacheflush.S b/trunk/arch/powerpc/kernel/vdso64/cacheflush.S index 69c5af2b3c96..66a36d3cc6ad 100644 --- a/trunk/arch/powerpc/kernel/vdso64/cacheflush.S +++ b/trunk/arch/powerpc/kernel/vdso64/cacheflush.S @@ -23,46 +23,29 @@ * * Flushes the data cache & invalidate the instruction cache for the * provided range [start, end[ + * + * Note: all CPUs supported by this kernel have a 128 bytes cache + * line size so we don't have to peek that info from the datapage */ V_FUNCTION_BEGIN(__kernel_sync_dicache) .cfi_startproc - mflr r12 - .cfi_register lr,r12 - mr r11,r3 - bl V_LOCAL_FUNC(__get_datapage) - mtlr r12 - mr r10,r3 - - lwz r7,CFG_DCACHE_BLOCKSZ(r10) - addi r5,r7,-1 - andc r6,r11,r5 /* round low to line bdy */ + li r5,127 + andc r6,r3,r5 /* round low to line bdy */ subf r8,r6,r4 /* compute length */ add r8,r8,r5 /* ensure we get enough */ - lwz r9,CFG_DCACHE_LOGBLOCKSZ(r10) - srw. r8,r8,r9 /* compute line count */ + srwi. r8,r8,7 /* compute line count */ crclr cr0*4+so beqlr /* nothing to do? */ mtctr r8 -1: dcbst 0,r6 - add r6,r6,r7 + mr r3,r6 +1: dcbst 0,r3 + addi r3,r3,128 bdnz 1b sync - -/* Now invalidate the instruction cache */ - - lwz r7,CFG_ICACHE_BLOCKSZ(r10) - addi r5,r7,-1 - andc r6,r11,r5 /* round low to line bdy */ - subf r8,r6,r4 /* compute length */ - add r8,r8,r5 - lwz r9,CFG_ICACHE_LOGBLOCKSZ(r10) - srw. r8,r8,r9 /* compute line count */ - crclr cr0*4+so - beqlr /* nothing to do? */ mtctr r8 -2: icbi 0,r6 - add r6,r6,r7 - bdnz 2b +1: icbi 0,r6 + addi r6,r6,128 + bdnz 1b isync li r3,0 blr diff --git a/trunk/arch/powerpc/mm/mem.c b/trunk/arch/powerpc/mm/mem.c index 5402fb6b3aae..81eb96ec13b2 100644 --- a/trunk/arch/powerpc/mm/mem.c +++ b/trunk/arch/powerpc/mm/mem.c @@ -464,7 +464,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, * we invalidate the TLB here, thus avoiding dcbst * misbehaviour. */ - _tlbie(address, 0 /* 8xx doesn't care about PID */); + _tlbie(address); #endif if (!PageReserved(page) && !test_bit(PG_arch_1, &page->flags)) { diff --git a/trunk/arch/powerpc/mm/mmu_decl.h b/trunk/arch/powerpc/mm/mmu_decl.h index ebfd13dc9d19..eb3a732e91db 100644 --- a/trunk/arch/powerpc/mm/mmu_decl.h +++ b/trunk/arch/powerpc/mm/mmu_decl.h @@ -56,7 +56,7 @@ extern unsigned long total_lowmem; * architectures. -- Dan */ #if defined(CONFIG_8xx) -#define flush_HPTE(X, va, pg) _tlbie(va, 0 /* 8xx doesn't care about PID */) +#define flush_HPTE(X, va, pg) _tlbie(va) #define MMU_init_hw() do { } while(0) #define mmu_mapin_ram() (0UL) diff --git a/trunk/arch/powerpc/mm/stab.c b/trunk/arch/powerpc/mm/stab.c index 50448d5de9d2..9e85bda76216 100644 --- a/trunk/arch/powerpc/mm/stab.c +++ b/trunk/arch/powerpc/mm/stab.c @@ -20,7 +20,6 @@ #include #include #include -#include struct stab_entry { unsigned long esid_data; diff --git a/trunk/arch/powerpc/platforms/40x/walnut.c b/trunk/arch/powerpc/platforms/40x/walnut.c index ff6db2431798..eb0c136b1c44 100644 --- a/trunk/arch/powerpc/platforms/40x/walnut.c +++ b/trunk/arch/powerpc/platforms/40x/walnut.c @@ -17,13 +17,12 @@ */ #include -#include - #include #include #include #include #include +#include static struct of_device_id walnut_of_bus[] = { { .compatible = "ibm,plb3", }, diff --git a/trunk/arch/powerpc/platforms/44x/bamboo.c b/trunk/arch/powerpc/platforms/44x/bamboo.c index be23f112184f..470e1a3fd755 100644 --- a/trunk/arch/powerpc/platforms/44x/bamboo.c +++ b/trunk/arch/powerpc/platforms/44x/bamboo.c @@ -14,13 +14,12 @@ * option) any later version. */ #include -#include - #include #include #include #include #include +#include #include "44x.h" static struct of_device_id bamboo_of_bus[] = { diff --git a/trunk/arch/powerpc/platforms/44x/ebony.c b/trunk/arch/powerpc/platforms/44x/ebony.c index 6cd3476767cc..40e18fcb666c 100644 --- a/trunk/arch/powerpc/platforms/44x/ebony.c +++ b/trunk/arch/powerpc/platforms/44x/ebony.c @@ -17,13 +17,12 @@ */ #include -#include - #include #include #include #include #include +#include #include "44x.h" diff --git a/trunk/arch/powerpc/platforms/44x/sequoia.c b/trunk/arch/powerpc/platforms/44x/sequoia.c index 21a9dd14f297..30700b31d43b 100644 --- a/trunk/arch/powerpc/platforms/44x/sequoia.c +++ b/trunk/arch/powerpc/platforms/44x/sequoia.c @@ -14,13 +14,12 @@ * option) any later version. */ #include -#include - #include #include #include #include #include +#include #include "44x.h" static struct of_device_id sequoia_of_bus[] = { diff --git a/trunk/arch/powerpc/platforms/83xx/mpc832x_mds.c b/trunk/arch/powerpc/platforms/83xx/mpc832x_mds.c index 39ee7a13b25a..972fa8528a8c 100644 --- a/trunk/arch/powerpc/platforms/83xx/mpc832x_mds.c +++ b/trunk/arch/powerpc/platforms/83xx/mpc832x_mds.c @@ -90,11 +90,10 @@ static void __init mpc832x_sys_setup_arch(void) if ((np = of_find_compatible_node(NULL, "network", "ucc_geth")) != NULL){ - /* Reset the Ethernet PHYs */ -#define BCSR8_FETH_RST 0x50 - bcsr_regs[8] &= ~BCSR8_FETH_RST; + /* Reset the Ethernet PHY */ + bcsr_regs[9] &= ~0x20; udelay(1000); - bcsr_regs[8] |= BCSR8_FETH_RST; + bcsr_regs[9] |= 0x20; iounmap(bcsr_regs); of_node_put(np); } @@ -146,6 +145,30 @@ static void __init mpc832x_sys_init_IRQ(void) #endif /* CONFIG_QUICC_ENGINE */ } +#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374) +extern ulong ds1374_get_rtc_time(void); +extern int ds1374_set_rtc_time(ulong); + +static int __init mpc832x_rtc_hookup(void) +{ + struct timespec tv; + + if (!machine_is(mpc832x_mds)) + return 0; + + ppc_md.get_rtc_time = ds1374_get_rtc_time; + ppc_md.set_rtc_time = ds1374_set_rtc_time; + + tv.tv_nsec = 0; + tv.tv_sec = (ppc_md.get_rtc_time) (); + do_settimeofday(&tv); + + return 0; +} + +late_initcall(mpc832x_rtc_hookup); +#endif + /* * Called very early, MMU is off, device-tree isn't unflattened */ diff --git a/trunk/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/trunk/arch/powerpc/platforms/83xx/mpc832x_rdb.c index d4bd04001b99..fbca336aa0ae 100644 --- a/trunk/arch/powerpc/platforms/83xx/mpc832x_rdb.c +++ b/trunk/arch/powerpc/platforms/83xx/mpc832x_rdb.c @@ -15,10 +15,7 @@ */ #include -#include #include -#include -#include #include #include @@ -49,16 +46,15 @@ static void mpc83xx_spi_deactivate_cs(u8 cs, u8 polarity) par_io_data_set(3, 13, !polarity); } -static struct mmc_spi_platform_data mpc832x_mmc_pdata = { - .ocr_mask = MMC_VDD_33_34, -}; - static struct spi_board_info mpc832x_spi_boardinfo = { .bus_num = 0x4c0, .chip_select = 0, .max_speed_hz = 50000000, - .modalias = "mmc_spi", - .platform_data = &mpc832x_mmc_pdata, + /* + * XXX: This is spidev (spi in userspace) stub, should + * be replaced by "mmc_spi" when mmc_spi will hit mainline. + */ + .modalias = "spidev", }; static int __init mpc832x_spi_init(void) diff --git a/trunk/arch/powerpc/platforms/83xx/mpc834x_mds.c b/trunk/arch/powerpc/platforms/83xx/mpc834x_mds.c index a81bb3ce6b94..00aed7c2269e 100644 --- a/trunk/arch/powerpc/platforms/83xx/mpc834x_mds.c +++ b/trunk/arch/powerpc/platforms/83xx/mpc834x_mds.c @@ -106,6 +106,30 @@ static void __init mpc834x_mds_init_IRQ(void) ipic_set_default_priority(); } +#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374) +extern ulong ds1374_get_rtc_time(void); +extern int ds1374_set_rtc_time(ulong); + +static int __init mpc834x_rtc_hookup(void) +{ + struct timespec tv; + + if (!machine_is(mpc834x_mds)) + return 0; + + ppc_md.get_rtc_time = ds1374_get_rtc_time; + ppc_md.set_rtc_time = ds1374_set_rtc_time; + + tv.tv_nsec = 0; + tv.tv_sec = (ppc_md.get_rtc_time) (); + do_settimeofday(&tv); + + return 0; +} + +late_initcall(mpc834x_rtc_hookup); +#endif + /* * Called very early, MMU is off, device-tree isn't unflattened */ diff --git a/trunk/arch/powerpc/platforms/83xx/mpc836x_mds.c b/trunk/arch/powerpc/platforms/83xx/mpc836x_mds.c index e40012f8f488..0f3855c95ff5 100644 --- a/trunk/arch/powerpc/platforms/83xx/mpc836x_mds.c +++ b/trunk/arch/powerpc/platforms/83xx/mpc836x_mds.c @@ -96,39 +96,14 @@ static void __init mpc836x_mds_setup_arch(void) if ((np = of_find_compatible_node(NULL, "network", "ucc_geth")) != NULL){ - uint svid; - /* Reset the Ethernet PHY */ -#define BCSR9_GETHRST 0x20 - clrbits8(&bcsr_regs[9], BCSR9_GETHRST); + bcsr_regs[9] &= ~0x20; udelay(1000); - setbits8(&bcsr_regs[9], BCSR9_GETHRST); - - /* handle mpc8360ea rev.2.1 erratum 2: RGMII Timing */ - svid = mfspr(SPRN_SVR); - if (svid == 0x80480021) { - void __iomem *immap; - - immap = ioremap(get_immrbase() + 0x14a8, 8); - - /* - * IMMR + 0x14A8[4:5] = 11 (clk delay for UCC 2) - * IMMR + 0x14A8[18:19] = 11 (clk delay for UCC 1) - */ - setbits32(immap, 0x0c003000); - - /* - * IMMR + 0x14AC[20:27] = 10101010 - * (data delay for both UCC's) - */ - clrsetbits_be32(immap + 4, 0xff0, 0xaa0); - - iounmap(immap); - } - + bcsr_regs[9] |= 0x20; iounmap(bcsr_regs); of_node_put(np); } + #endif /* CONFIG_QUICC_ENGINE */ } @@ -177,6 +152,30 @@ static void __init mpc836x_mds_init_IRQ(void) #endif /* CONFIG_QUICC_ENGINE */ } +#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374) +extern ulong ds1374_get_rtc_time(void); +extern int ds1374_set_rtc_time(ulong); + +static int __init mpc8360_rtc_hookup(void) +{ + struct timespec tv; + + if (!machine_is(mpc836x_mds)) + return 0; + + ppc_md.get_rtc_time = ds1374_get_rtc_time; + ppc_md.set_rtc_time = ds1374_set_rtc_time; + + tv.tv_nsec = 0; + tv.tv_sec = (ppc_md.get_rtc_time) (); + do_settimeofday(&tv); + + return 0; +} + +late_initcall(mpc8360_rtc_hookup); +#endif + /* * Called very early, MMU is off, device-tree isn't unflattened */ diff --git a/trunk/arch/powerpc/platforms/83xx/usb.c b/trunk/arch/powerpc/platforms/83xx/usb.c index b45160f8d084..eafe7605cdac 100644 --- a/trunk/arch/powerpc/platforms/83xx/usb.c +++ b/trunk/arch/powerpc/platforms/83xx/usb.c @@ -130,7 +130,7 @@ int mpc831x_usb_cfg(void) out_be32(immap + MPC83XX_SCCR_OFFS, temp); /* Configure pin mux for ULPI. There is no pin mux for UTMI */ - if (prop && !strcmp(prop, "ulpi")) { + if (!strcmp(prop, "ulpi")) { temp = in_be32(immap + MPC83XX_SICRL_OFFS); temp &= ~MPC831X_SICRL_USB_MASK; temp |= MPC831X_SICRL_USB_ULPI; @@ -153,13 +153,13 @@ int mpc831x_usb_cfg(void) usb_regs = ioremap(res.start, res.end - res.start + 1); /* Using on-chip PHY */ - if (prop && (!strcmp(prop, "utmi_wide") || - !strcmp(prop, "utmi"))) { + if (!strcmp(prop, "utmi_wide") || + !strcmp(prop, "utmi")) { /* Set UTMI_PHY_EN, REFSEL to 48MHZ */ out_be32(usb_regs + FSL_USB2_CONTROL_OFFS, CONTROL_UTMI_PHY_EN | CONTROL_REFSEL_48MHZ); /* Using external UPLI PHY */ - } else if (prop && !strcmp(prop, "ulpi")) { + } else if (!strcmp(prop, "ulpi")) { /* Set PHY_CLK_SEL to ULPI */ temp = CONTROL_PHY_CLK_SEL_ULPI; #ifdef CONFIG_USB_OTG diff --git a/trunk/arch/powerpc/platforms/cell/spufs/inode.c b/trunk/arch/powerpc/platforms/cell/spufs/inode.c index c0e968a4c211..0966d093db43 100644 --- a/trunk/arch/powerpc/platforms/cell/spufs/inode.c +++ b/trunk/arch/powerpc/platforms/cell/spufs/inode.c @@ -171,7 +171,6 @@ static int spufs_rmdir(struct inode *parent, struct dentry *dir) { /* remove all entries */ spufs_prune_dir(dir); - d_drop(dir); return simple_rmdir(parent, dir); } diff --git a/trunk/arch/powerpc/platforms/embedded6xx/prpmc2800.c b/trunk/arch/powerpc/platforms/embedded6xx/prpmc2800.c index 653a5eb91c90..e484cac75095 100644 --- a/trunk/arch/powerpc/platforms/embedded6xx/prpmc2800.c +++ b/trunk/arch/powerpc/platforms/embedded6xx/prpmc2800.c @@ -144,7 +144,6 @@ static int __init prpmc2800_probe(void) strncpy(prpmc2800_platform_name, m, min((int)len, PLATFORM_NAME_MAX - 1)); - _set_L2CR(_get_L2CR() | L2CR_L2E); return 1; } diff --git a/trunk/arch/powerpc/platforms/pasemi/setup.c b/trunk/arch/powerpc/platforms/pasemi/setup.c index 3d62060498b4..3a5d112af5e0 100644 --- a/trunk/arch/powerpc/platforms/pasemi/setup.c +++ b/trunk/arch/powerpc/platforms/pasemi/setup.c @@ -214,7 +214,7 @@ static __init void pas_init_IRQ(void) printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr); mpic = mpic_alloc(mpic_node, openpic_addr, - MPIC_PRIMARY|MPIC_LARGE_VECTORS, + MPIC_PRIMARY|MPIC_LARGE_VECTORS|MPIC_WANTS_RESET, 0, 0, " PAS-OPIC "); BUG_ON(!mpic); diff --git a/trunk/arch/powerpc/platforms/pseries/Kconfig b/trunk/arch/powerpc/platforms/pseries/Kconfig index 306a9d07491d..16e4e401b820 100644 --- a/trunk/arch/powerpc/platforms/pseries/Kconfig +++ b/trunk/arch/powerpc/platforms/pseries/Kconfig @@ -21,7 +21,7 @@ config PPC_SPLPAR config EEH bool "PCI Extended Error Handling (EEH)" if EMBEDDED - depends on PPC_PSERIES && PCI + depends on PPC_PSERIES default y if !EMBEDDED config SCANLOG diff --git a/trunk/arch/powerpc/platforms/pseries/setup.c b/trunk/arch/powerpc/platforms/pseries/setup.c index fdeefe54ea91..fdb9b1c8f977 100644 --- a/trunk/arch/powerpc/platforms/pseries/setup.c +++ b/trunk/arch/powerpc/platforms/pseries/setup.c @@ -507,8 +507,7 @@ define_machine(pseries) { .restart = rtas_restart, .power_off = pSeries_power_off, .halt = rtas_halt, - .panic = rtas_panic_msg, - .machine_shutdown = rtas_os_term, + .panic = rtas_os_term, .get_boot_time = rtas_get_boot_time, .get_rtc_time = rtas_get_rtc_time, .set_rtc_time = rtas_set_rtc_time, diff --git a/trunk/arch/powerpc/sysdev/uic.c b/trunk/arch/powerpc/sysdev/uic.c index 847a5496b869..5149716c734d 100644 --- a/trunk/arch/powerpc/sysdev/uic.c +++ b/trunk/arch/powerpc/sysdev/uic.c @@ -97,22 +97,6 @@ static void uic_ack_irq(unsigned int virq) spin_unlock_irqrestore(&uic->lock, flags); } -static void uic_mask_ack_irq(unsigned int virq) -{ - struct uic *uic = get_irq_chip_data(virq); - unsigned int src = uic_irq_to_hw(virq); - unsigned long flags; - u32 er, sr; - - sr = 1 << (31-src); - spin_lock_irqsave(&uic->lock, flags); - er = mfdcr(uic->dcrbase + UIC_ER); - er &= ~sr; - mtdcr(uic->dcrbase + UIC_ER, er); - mtdcr(uic->dcrbase + UIC_SR, sr); - spin_unlock_irqrestore(&uic->lock, flags); -} - static int uic_set_irq_type(unsigned int virq, unsigned int flow_type) { struct uic *uic = get_irq_chip_data(virq); @@ -168,7 +152,7 @@ static struct irq_chip uic_irq_chip = { .typename = " UIC ", .unmask = uic_unmask_irq, .mask = uic_mask_irq, - .mask_ack = uic_mask_ack_irq, +/* .mask_ack = uic_mask_irq_and_ack, */ .ack = uic_ack_irq, .set_type = uic_set_irq_type, }; diff --git a/trunk/arch/ppc/kernel/setup.c b/trunk/arch/ppc/kernel/setup.c index 5255bd80aa6b..aac88c2f3db9 100644 --- a/trunk/arch/ppc/kernel/setup.c +++ b/trunk/arch/ppc/kernel/setup.c @@ -312,14 +312,7 @@ early_init(int r3, int r4, int r5) * Identify the CPU type and fix up code sections * that depend on which cpu we have. */ -#if defined(CONFIG_440EP) && defined(CONFIG_PPC_FPU) - /* We pass the virtual PVR here for 440EP as 440EP and 440GR have - * identical PVRs and there is no reliable way to check for the FPU - */ - spec = identify_cpu(offset, (mfspr(SPRN_PVR) | 0x8)); -#else spec = identify_cpu(offset, mfspr(SPRN_PVR)); -#endif do_feature_fixups(spec->cpu_features, PTRRELOC(&__start___ftr_fixup), PTRRELOC(&__stop___ftr_fixup)); diff --git a/trunk/arch/ppc/mm/init.c b/trunk/arch/ppc/mm/init.c index dd898d32480e..390dd1995c2a 100644 --- a/trunk/arch/ppc/mm/init.c +++ b/trunk/arch/ppc/mm/init.c @@ -561,7 +561,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, * That means the zeroed TLB has to be invalidated * whenever a page miss occurs. */ - _tlbie(address, 0 /* 8xx doesn't care about PID */); + _tlbie(address); #endif if (!PageReserved(page) && !test_bit(PG_arch_1, &page->flags)) { diff --git a/trunk/arch/ppc/mm/mmu_decl.h b/trunk/arch/ppc/mm/mmu_decl.h index b298b60c202f..f1d4f2109a99 100644 --- a/trunk/arch/ppc/mm/mmu_decl.h +++ b/trunk/arch/ppc/mm/mmu_decl.h @@ -49,7 +49,7 @@ extern unsigned int num_tlbcam_entries; * architectures. -- Dan */ #if defined(CONFIG_8xx) -#define flush_HPTE(X, va, pg) _tlbie(va, 0 /* 8xx doesn't care about PID */) +#define flush_HPTE(X, va, pg) _tlbie(va) #define MMU_init_hw() do { } while(0) #define mmu_mapin_ram() (0UL) diff --git a/trunk/arch/ppc/platforms/4xx/yucca.c b/trunk/arch/ppc/platforms/4xx/yucca.c index 66a44ff0d926..a83b0baea011 100644 --- a/trunk/arch/ppc/platforms/4xx/yucca.c +++ b/trunk/arch/ppc/platforms/4xx/yucca.c @@ -211,7 +211,6 @@ static void __init yucca_setup_pcie_fpga_rootpoint(int port) break; default: - iounmap(pcie_reg_fpga_base); return; } diff --git a/trunk/arch/ppc/syslib/virtex_devices.c b/trunk/arch/ppc/syslib/virtex_devices.c index f658ff3b3890..ace4ec08de51 100644 --- a/trunk/arch/ppc/syslib/virtex_devices.c +++ b/trunk/arch/ppc/syslib/virtex_devices.c @@ -87,29 +87,6 @@ }, \ } -#define XPAR_AC97_CONTROLLER_REFERENCE(num) { \ - .name = "ml403_ac97cr", \ - .id = num, \ - .num_resources = 3, \ - .resource = (struct resource[]) { \ - { \ - .start = XPAR_OPB_AC97_CONTROLLER_REF_##num##_BASEADDR, \ - .end = XPAR_OPB_AC97_CONTROLLER_REF_##num##_HIGHADDR, \ - .flags = IORESOURCE_MEM, \ - }, \ - { \ - .start = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_PLAYBACK_INTERRUPT_INTR, \ - .end = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_PLAYBACK_INTERRUPT_INTR, \ - .flags = IORESOURCE_IRQ, \ - }, \ - { \ - .start = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_RECORD_INTERRUPT_INTR, \ - .end = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_RECORD_INTERRUPT_INTR, \ - .flags = IORESOURCE_IRQ, \ - }, \ - }, \ -} - /* UART 8250 driver platform data table */ struct plat_serial8250_port virtex_serial_platform_data[] = { #if defined(XPAR_UARTNS550_0_BASEADDR) @@ -196,14 +173,6 @@ struct platform_device virtex_platform_devices[] = { #if defined(XPAR_TFT_3_BASEADDR) XPAR_TFT(3), #endif - - /* AC97 Controller Reference instances */ -#if defined(XPAR_OPB_AC97_CONTROLLER_REF_0_BASEADDR) - XPAR_AC97_CONTROLLER_REFERENCE(0), -#endif -#if defined(XPAR_OPB_AC97_CONTROLLER_REF_1_BASEADDR) - XPAR_AC97_CONTROLLER_REFERENCE(1), -#endif }; /* Early serial support functions */ diff --git a/trunk/arch/s390/appldata/appldata.h b/trunk/arch/s390/appldata/appldata.h index db3ae8505103..4069b81f7f1d 100644 --- a/trunk/arch/s390/appldata/appldata.h +++ b/trunk/arch/s390/appldata/appldata.h @@ -45,6 +45,7 @@ struct appldata_ops { int active; /* monitoring status */ /* fill in from here */ + unsigned int ctl_nr; /* sysctl ID */ char name[APPLDATA_PROC_NAME_LENGTH]; /* name of /proc fs node */ unsigned char record_nr; /* Record Nr. for Product ID */ void (*callback)(void *data); /* callback function */ diff --git a/trunk/arch/s390/appldata/appldata_base.c b/trunk/arch/s390/appldata/appldata_base.c index 655d52543e2d..ac61cf43a7d9 100644 --- a/trunk/arch/s390/appldata/appldata_base.c +++ b/trunk/arch/s390/appldata/appldata_base.c @@ -53,26 +53,29 @@ static int appldata_interval_handler(ctl_table *ctl, int write, static struct ctl_table_header *appldata_sysctl_header; static struct ctl_table appldata_table[] = { { + .ctl_name = CTL_APPLDATA_TIMER, .procname = "timer", .mode = S_IRUGO | S_IWUSR, .proc_handler = &appldata_timer_handler, }, { + .ctl_name = CTL_APPLDATA_INTERVAL, .procname = "interval", .mode = S_IRUGO | S_IWUSR, .proc_handler = &appldata_interval_handler, }, - { }, + { .ctl_name = 0 } }; static struct ctl_table appldata_dir_table[] = { { + .ctl_name = CTL_APPLDATA, .procname = appldata_proc_name, .maxlen = 0, .mode = S_IRUGO | S_IXUGO, .child = appldata_table, }, - { }, + { .ctl_name = 0 } }; /* @@ -438,38 +441,75 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp, */ int appldata_register_ops(struct appldata_ops *ops) { - if ((ops->size > APPLDATA_MAX_REC_SIZE) || (ops->size < 0)) - return -EINVAL; + struct list_head *lh; + struct appldata_ops *tmp_ops; + int i; - ops->ctl_table = kzalloc(4 * sizeof(struct ctl_table), GFP_KERNEL); - if (!ops->ctl_table) + i = 0; + + if ((ops->size > APPLDATA_MAX_REC_SIZE) || + (ops->size < 0)){ + P_ERROR("Invalid size of %s record = %i, maximum = %i!\n", + ops->name, ops->size, APPLDATA_MAX_REC_SIZE); + return -ENOMEM; + } + if ((ops->ctl_nr == CTL_APPLDATA) || + (ops->ctl_nr == CTL_APPLDATA_TIMER) || + (ops->ctl_nr == CTL_APPLDATA_INTERVAL)) { + P_ERROR("ctl_nr %i already in use!\n", ops->ctl_nr); + return -EBUSY; + } + ops->ctl_table = kzalloc(4*sizeof(struct ctl_table), GFP_KERNEL); + if (ops->ctl_table == NULL) { + P_ERROR("Not enough memory for %s ctl_table!\n", ops->name); return -ENOMEM; + } spin_lock(&appldata_ops_lock); + list_for_each(lh, &appldata_ops_list) { + tmp_ops = list_entry(lh, struct appldata_ops, list); + P_DEBUG("register_ops loop: %i) name = %s, ctl = %i\n", + ++i, tmp_ops->name, tmp_ops->ctl_nr); + P_DEBUG("Comparing %s (ctl %i) with %s (ctl %i)\n", + tmp_ops->name, tmp_ops->ctl_nr, ops->name, + ops->ctl_nr); + if (strncmp(tmp_ops->name, ops->name, + APPLDATA_PROC_NAME_LENGTH) == 0) { + P_ERROR("Name \"%s\" already registered!\n", ops->name); + kfree(ops->ctl_table); + spin_unlock(&appldata_ops_lock); + return -EBUSY; + } + if (tmp_ops->ctl_nr == ops->ctl_nr) { + P_ERROR("ctl_nr %i already registered!\n", ops->ctl_nr); + kfree(ops->ctl_table); + spin_unlock(&appldata_ops_lock); + return -EBUSY; + } + } list_add(&ops->list, &appldata_ops_list); spin_unlock(&appldata_ops_lock); + ops->ctl_table[0].ctl_name = CTL_APPLDATA; ops->ctl_table[0].procname = appldata_proc_name; ops->ctl_table[0].maxlen = 0; ops->ctl_table[0].mode = S_IRUGO | S_IXUGO; ops->ctl_table[0].child = &ops->ctl_table[2]; + ops->ctl_table[1].ctl_name = 0; + + ops->ctl_table[2].ctl_name = ops->ctl_nr; ops->ctl_table[2].procname = ops->name; ops->ctl_table[2].mode = S_IRUGO | S_IWUSR; ops->ctl_table[2].proc_handler = appldata_generic_handler; ops->ctl_table[2].data = ops; + ops->ctl_table[3].ctl_name = 0; + ops->sysctl_header = register_sysctl_table(ops->ctl_table); - if (!ops->sysctl_header) - goto out; + P_INFO("%s-ops registered!\n", ops->name); return 0; -out: - spin_lock(&appldata_ops_lock); - list_del(&ops->list); - spin_unlock(&appldata_ops_lock); - kfree(ops->ctl_table); - return -ENOMEM; } /* @@ -479,11 +519,15 @@ int appldata_register_ops(struct appldata_ops *ops) */ void appldata_unregister_ops(struct appldata_ops *ops) { + void *table; spin_lock(&appldata_ops_lock); list_del(&ops->list); + /* at that point any incoming access will fail */ + table = ops->ctl_table; + ops->ctl_table = NULL; spin_unlock(&appldata_ops_lock); unregister_sysctl_table(ops->sysctl_header); - kfree(ops->ctl_table); + kfree(table); P_INFO("%s-ops unregistered!\n", ops->name); } /********************** module-ops management **************************/ diff --git a/trunk/arch/s390/appldata/appldata_mem.c b/trunk/arch/s390/appldata/appldata_mem.c index 51181ccdb87b..697eb30a68a3 100644 --- a/trunk/arch/s390/appldata/appldata_mem.c +++ b/trunk/arch/s390/appldata/appldata_mem.c @@ -147,6 +147,7 @@ static void appldata_get_mem_data(void *data) static struct appldata_ops ops = { + .ctl_nr = CTL_APPLDATA_MEM, .name = "mem", .record_nr = APPLDATA_RECORD_MEM_ID, .size = sizeof(struct appldata_mem_data), diff --git a/trunk/arch/s390/appldata/appldata_net_sum.c b/trunk/arch/s390/appldata/appldata_net_sum.c index 4d8344336001..6c1815a47714 100644 --- a/trunk/arch/s390/appldata/appldata_net_sum.c +++ b/trunk/arch/s390/appldata/appldata_net_sum.c @@ -142,6 +142,7 @@ static void appldata_get_net_sum_data(void *data) static struct appldata_ops ops = { + .ctl_nr = CTL_APPLDATA_NET_SUM, .name = "net_sum", .record_nr = APPLDATA_RECORD_NET_SUM_ID, .size = sizeof(struct appldata_net_sum_data), diff --git a/trunk/arch/s390/appldata/appldata_os.c b/trunk/arch/s390/appldata/appldata_os.c index 6b3eafe10453..76a15523ae9e 100644 --- a/trunk/arch/s390/appldata/appldata_os.c +++ b/trunk/arch/s390/appldata/appldata_os.c @@ -82,6 +82,7 @@ struct appldata_os_data { static struct appldata_os_data *appldata_os_data; static struct appldata_ops ops = { + .ctl_nr = CTL_APPLDATA_OS, .name = "os", .record_nr = APPLDATA_RECORD_OS_ID, .owner = THIS_MODULE, diff --git a/trunk/arch/s390/kernel/early.c b/trunk/arch/s390/kernel/early.c index 1b3af7dab816..8bf4ae1150be 100644 --- a/trunk/arch/s390/kernel/early.c +++ b/trunk/arch/s390/kernel/early.c @@ -200,7 +200,7 @@ static noinline __init void find_memory_chunks(unsigned long memsize) cc = __tprot(addr); while (cc == old_cc) { addr += CHUNK_INCR; - if (memsize && addr >= memsize) + if (addr >= memsize) break; #ifndef CONFIG_64BIT if (addr == ADDR2G) diff --git a/trunk/arch/s390/kernel/entry.S b/trunk/arch/s390/kernel/entry.S index b2b2edc40eb1..139ca153d5cc 100644 --- a/trunk/arch/s390/kernel/entry.S +++ b/trunk/arch/s390/kernel/entry.S @@ -69,31 +69,13 @@ STACK_SIZE = 1 << STACK_SHIFT basr %r14,%r1 .endm - .macro TRACE_IRQS_CHECK - tm SP_PSW(%r15),0x03 # irqs enabled? - jz 0f - l %r1,BASED(.Ltrace_irq_on) - basr %r14,%r1 - j 1f -0: l %r1,BASED(.Ltrace_irq_off) - basr %r14,%r1 -1: - .endm -#else -#define TRACE_IRQS_ON -#define TRACE_IRQS_OFF -#define TRACE_IRQS_CHECK -#endif - -#ifdef CONFIG_LOCKDEP .macro LOCKDEP_SYS_EXIT - tm SP_PSW+1(%r15),0x01 # returning to user ? - jz 0f l %r1,BASED(.Llockdep_sys_exit) basr %r14,%r1 -0: .endm #else +#define TRACE_IRQS_ON +#define TRACE_IRQS_OFF #define LOCKDEP_SYS_EXIT #endif @@ -252,6 +234,8 @@ sysc_saveall: lh %r7,0x8a # get svc number from lowcore #ifdef CONFIG_VIRT_CPU_ACCOUNTING sysc_vtime: + tm SP_PSW+1(%r15),0x01 # interrupting from user ? + bz BASED(sysc_do_svc) UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER sysc_stime: UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER @@ -279,34 +263,19 @@ sysc_do_restart: sysc_return: tm SP_PSW+1(%r15),0x01 # returning to user ? - bno BASED(sysc_restore) + bno BASED(sysc_leave) tm __TI_flags+3(%r9),_TIF_WORK_SVC bnz BASED(sysc_work) # there is work to do (signals etc.) -sysc_restore: -#ifdef CONFIG_TRACE_IRQFLAGS - la %r1,BASED(sysc_restore_trace_psw) - lpsw 0(%r1) -sysc_restore_trace: - TRACE_IRQS_CHECK LOCKDEP_SYS_EXIT -#endif sysc_leave: RESTORE_ALL __LC_RETURN_PSW,1 -sysc_done: - -#ifdef CONFIG_TRACE_IRQFLAGS - .align 8 - .globl sysc_restore_trace_psw -sysc_restore_trace_psw: - .long 0, sysc_restore_trace + 0x80000000 -#endif # # recheck if there is more work to do # sysc_work_loop: tm __TI_flags+3(%r9),_TIF_WORK_SVC - bz BASED(sysc_restore) # there is no work to do + bz BASED(sysc_leave) # there is no work to do # # One of the work bits is on. Find out which one. # @@ -321,8 +290,8 @@ sysc_work: bo BASED(sysc_restart) tm __TI_flags+3(%r9),_TIF_SINGLE_STEP bo BASED(sysc_singlestep) - b BASED(sysc_restore) -sysc_work_done: + LOCKDEP_SYS_EXIT + b BASED(sysc_leave) # # _TIF_NEED_RESCHED is set, call schedule @@ -489,7 +458,6 @@ pgm_check_handler: pgm_no_vtime: #endif l %r9,__LC_THREAD_INFO # load pointer to thread_info struct - TRACE_IRQS_OFF l %r3,__LC_PGM_ILC # load program interruption code la %r8,0x7f nr %r8,%r3 @@ -529,7 +497,6 @@ pgm_per_std: pgm_no_vtime2: #endif l %r9,__LC_THREAD_INFO # load pointer to thread_info struct - TRACE_IRQS_OFF l %r1,__TI_task(%r9) mvc __THREAD_per+__PER_atmid(2,%r1),__LC_PER_ATMID mvc __THREAD_per+__PER_address(4,%r1),__LC_PER_ADDRESS @@ -550,13 +517,15 @@ pgm_svcper: SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA #ifdef CONFIG_VIRT_CPU_ACCOUNTING + tm SP_PSW+1(%r15),0x01 # interrupting from user ? + bz BASED(pgm_no_vtime3) UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER mvc __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER +pgm_no_vtime3: #endif lh %r7,0x8a # get svc number from lowcore l %r9,__LC_THREAD_INFO # load pointer to thread_info struct - TRACE_IRQS_OFF l %r1,__TI_task(%r9) mvc __THREAD_per+__PER_atmid(2,%r1),__LC_PER_ATMID mvc __THREAD_per+__PER_address(4,%r1),__LC_PER_ADDRESS @@ -573,7 +542,7 @@ kernel_per: mvi SP_TRAP+1(%r15),0x28 # set trap indication to pgm check la %r2,SP_PTREGS(%r15) # address of register-save area l %r1,BASED(.Lhandle_per) # load adr. of per handler - la %r14,BASED(sysc_restore)# load adr. of system return + la %r14,BASED(sysc_leave) # load adr. of system return br %r1 # branch to do_single_step /* @@ -600,38 +569,26 @@ io_no_vtime: l %r1,BASED(.Ldo_IRQ) # load address of do_IRQ la %r2,SP_PTREGS(%r15) # address of register-save area basr %r14,%r1 # branch to standard irq handler + TRACE_IRQS_ON + io_return: tm SP_PSW+1(%r15),0x01 # returning to user ? #ifdef CONFIG_PREEMPT bno BASED(io_preempt) # no -> check for preemptive scheduling #else - bno BASED(io_restore) # no-> skip resched & signal + bno BASED(io_leave) # no-> skip resched & signal #endif tm __TI_flags+3(%r9),_TIF_WORK_INT bnz BASED(io_work) # there is work to do (signals etc.) -io_restore: -#ifdef CONFIG_TRACE_IRQFLAGS - la %r1,BASED(io_restore_trace_psw) - lpsw 0(%r1) -io_restore_trace: - TRACE_IRQS_CHECK LOCKDEP_SYS_EXIT -#endif io_leave: RESTORE_ALL __LC_RETURN_PSW,0 io_done: -#ifdef CONFIG_TRACE_IRQFLAGS - .align 8 - .globl io_restore_trace_psw -io_restore_trace_psw: - .long 0, io_restore_trace + 0x80000000 -#endif - #ifdef CONFIG_PREEMPT io_preempt: icm %r0,15,__TI_precount(%r9) - bnz BASED(io_restore) + bnz BASED(io_leave) l %r1,SP_R15(%r15) s %r1,BASED(.Lc_spsize) mvc SP_PTREGS(__PT_SIZE,%r1),SP_PTREGS(%r15) @@ -639,10 +596,14 @@ io_preempt: lr %r15,%r1 io_resume_loop: tm __TI_flags+3(%r9),_TIF_NEED_RESCHED - bno BASED(io_restore) - l %r1,BASED(.Lpreempt_schedule_irq) - la %r14,BASED(io_resume_loop) - br %r1 # call schedule + bno BASED(io_leave) + mvc __TI_precount(4,%r9),BASED(.Lc_pactive) + stosm __SF_EMPTY(%r15),0x03 # reenable interrupts + l %r1,BASED(.Lschedule) + basr %r14,%r1 # call schedule + stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts + xc __TI_precount(4,%r9),__TI_precount(%r9) + b BASED(io_resume_loop) #endif # @@ -666,42 +627,40 @@ io_work_loop: bo BASED(io_reschedule) tm __TI_flags+3(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK) bnz BASED(io_sigpending) - b BASED(io_restore) -io_work_done: + LOCKDEP_SYS_EXIT + b BASED(io_leave) # # _TIF_MCCK_PENDING is set, call handler # io_mcck_pending: + TRACE_IRQS_OFF l %r1,BASED(.Ls390_handle_mcck) basr %r14,%r1 # TIF bit will be cleared by handler + TRACE_IRQS_ON b BASED(io_work_loop) # # _TIF_NEED_RESCHED is set, call schedule # io_reschedule: - TRACE_IRQS_ON l %r1,BASED(.Lschedule) stosm __SF_EMPTY(%r15),0x03 # reenable interrupts basr %r14,%r1 # call scheduler stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts - TRACE_IRQS_OFF tm __TI_flags+3(%r9),_TIF_WORK_INT - bz BASED(io_restore) # there is no work to do + bz BASED(io_leave) # there is no work to do b BASED(io_work_loop) # # _TIF_SIGPENDING or _TIF_RESTORE_SIGMASK is set, call do_signal # io_sigpending: - TRACE_IRQS_ON stosm __SF_EMPTY(%r15),0x03 # reenable interrupts la %r2,SP_PTREGS(%r15) # load pt_regs l %r1,BASED(.Ldo_signal) basr %r14,%r1 # call do_signal stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts - TRACE_IRQS_OFF b BASED(io_work_loop) /* @@ -729,6 +688,7 @@ ext_no_vtime: lh %r3,__LC_EXT_INT_CODE # get interruption code l %r1,BASED(.Ldo_extint) basr %r14,%r1 + TRACE_IRQS_ON b BASED(io_return) __critical_end: @@ -893,15 +853,15 @@ cleanup_table_system_call: cleanup_table_sysc_return: .long sysc_return + 0x80000000, sysc_leave + 0x80000000 cleanup_table_sysc_leave: - .long sysc_leave + 0x80000000, sysc_done + 0x80000000 + .long sysc_leave + 0x80000000, sysc_work_loop + 0x80000000 cleanup_table_sysc_work_loop: - .long sysc_work_loop + 0x80000000, sysc_work_done + 0x80000000 + .long sysc_work_loop + 0x80000000, sysc_reschedule + 0x80000000 cleanup_table_io_return: .long io_return + 0x80000000, io_leave + 0x80000000 cleanup_table_io_leave: .long io_leave + 0x80000000, io_done + 0x80000000 cleanup_table_io_work_loop: - .long io_work_loop + 0x80000000, io_work_done + 0x80000000 + .long io_work_loop + 0x80000000, io_mcck_pending + 0x80000000 cleanup_critical: clc 4(4,%r12),BASED(cleanup_table_system_call) @@ -970,6 +930,8 @@ cleanup_system_call: cleanup_vtime: clc __LC_RETURN_PSW+4(4),BASED(cleanup_system_call_insn+12) bhe BASED(cleanup_stime) + tm SP_PSW+1(%r15),0x01 # interrupting from user ? + bz BASED(cleanup_novtime) UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER cleanup_stime: clc __LC_RETURN_PSW+4(4),BASED(cleanup_system_call_insn+16) @@ -977,6 +939,7 @@ cleanup_stime: UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER cleanup_update: mvc __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER +cleanup_novtime: #endif mvc __LC_RETURN_PSW+4(4),BASED(cleanup_table_system_call+4) la %r12,__LC_RETURN_PSW @@ -1015,10 +978,10 @@ cleanup_sysc_leave: 2: la %r12,__LC_RETURN_PSW br %r14 cleanup_sysc_leave_insn: - .long sysc_done - 4 + 0x80000000 #ifdef CONFIG_VIRT_CPU_ACCOUNTING - .long sysc_done - 8 + 0x80000000 + .long sysc_leave + 14 + 0x80000000 #endif + .long sysc_leave + 10 + 0x80000000 cleanup_io_return: mvc __LC_RETURN_PSW(4),0(%r12) @@ -1045,10 +1008,10 @@ cleanup_io_leave: 2: la %r12,__LC_RETURN_PSW br %r14 cleanup_io_leave_insn: - .long io_done - 4 + 0x80000000 #ifdef CONFIG_VIRT_CPU_ACCOUNTING - .long io_done - 8 + 0x80000000 + .long io_leave + 18 + 0x80000000 #endif + .long io_leave + 14 + 0x80000000 /* * Integer constants @@ -1056,6 +1019,7 @@ cleanup_io_leave_insn: .align 4 .Lc_spsize: .long SP_SIZE .Lc_overhead: .long STACK_FRAME_OVERHEAD +.Lc_pactive: .long PREEMPT_ACTIVE .Lnr_syscalls: .long NR_syscalls .L0x018: .short 0x018 .L0x020: .short 0x020 @@ -1079,8 +1043,6 @@ cleanup_io_leave_insn: .Lexecve_tail: .long execve_tail .Ljump_table: .long pgm_check_table .Lschedule: .long schedule -.Lpreempt_schedule_irq: - .long preempt_schedule_irq .Ltrace: .long syscall_trace .Lschedtail: .long schedule_tail .Lsysc_table: .long sys_call_table diff --git a/trunk/arch/s390/kernel/entry64.S b/trunk/arch/s390/kernel/entry64.S index a3e47b893f07..05e26d1fdf40 100644 --- a/trunk/arch/s390/kernel/entry64.S +++ b/trunk/arch/s390/kernel/entry64.S @@ -67,28 +67,12 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \ brasl %r14,trace_hardirqs_off .endm - .macro TRACE_IRQS_CHECK - tm SP_PSW(%r15),0x03 # irqs enabled? - jz 0f - brasl %r14,trace_hardirqs_on - j 1f -0: brasl %r14,trace_hardirqs_off -1: + .macro LOCKDEP_SYS_EXIT + brasl %r14,lockdep_sys_exit .endm #else #define TRACE_IRQS_ON #define TRACE_IRQS_OFF -#define TRACE_IRQS_CHECK -#endif - -#ifdef CONFIG_LOCKDEP - .macro LOCKDEP_SYS_EXIT - tm SP_PSW+1(%r15),0x01 # returning to user ? - jz 0f - brasl %r14,lockdep_sys_exit -0: - .endm -#else #define LOCKDEP_SYS_EXIT #endif @@ -238,6 +222,8 @@ sysc_saveall: llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore #ifdef CONFIG_VIRT_CPU_ACCOUNTING sysc_vtime: + tm SP_PSW+1(%r15),0x01 # interrupting from user ? + jz sysc_do_svc UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER sysc_stime: UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER @@ -271,34 +257,19 @@ sysc_noemu: sysc_return: tm SP_PSW+1(%r15),0x01 # returning to user ? - jno sysc_restore + jno sysc_leave tm __TI_flags+7(%r9),_TIF_WORK_SVC jnz sysc_work # there is work to do (signals etc.) -sysc_restore: -#ifdef CONFIG_TRACE_IRQFLAGS - larl %r1,sysc_restore_trace_psw - lpswe 0(%r1) -sysc_restore_trace: - TRACE_IRQS_CHECK LOCKDEP_SYS_EXIT -#endif sysc_leave: RESTORE_ALL __LC_RETURN_PSW,1 -sysc_done: - -#ifdef CONFIG_TRACE_IRQFLAGS - .align 8 - .globl sysc_restore_trace_psw -sysc_restore_trace_psw: - .quad 0, sysc_restore_trace -#endif # # recheck if there is more work to do # sysc_work_loop: tm __TI_flags+7(%r9),_TIF_WORK_SVC - jz sysc_restore # there is no work to do + jz sysc_leave # there is no work to do # # One of the work bits is on. Find out which one. # @@ -313,8 +284,8 @@ sysc_work: jo sysc_restart tm __TI_flags+7(%r9),_TIF_SINGLE_STEP jo sysc_singlestep - j sysc_restore -sysc_work_done: + LOCKDEP_SYS_EXIT + j sysc_leave # # _TIF_NEED_RESCHED is set, call schedule @@ -474,7 +445,6 @@ pgm_check_handler: pgm_no_vtime: #endif lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct - TRACE_IRQS_OFF lgf %r3,__LC_PGM_ILC # load program interruption code lghi %r8,0x7f ngr %r8,%r3 @@ -514,7 +484,6 @@ pgm_per_std: pgm_no_vtime2: #endif lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct - TRACE_IRQS_OFF lg %r1,__TI_task(%r9) tm SP_PSW+1(%r15),0x01 # kernel per event ? jz kernel_per @@ -535,9 +504,12 @@ pgm_svcper: SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA #ifdef CONFIG_VIRT_CPU_ACCOUNTING + tm SP_PSW+1(%r15),0x01 # interrupting from user ? + jz pgm_no_vtime3 UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER mvc __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER +pgm_no_vtime3: #endif llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct @@ -557,7 +529,7 @@ kernel_per: lhi %r0,__LC_PGM_OLD_PSW sth %r0,SP_TRAP(%r15) # set trap indication to pgm check la %r2,SP_PTREGS(%r15) # address of register-save area - larl %r14,sysc_restore # load adr. of system ret, no work + larl %r14,sysc_leave # load adr. of system ret, no work jg do_single_step # branch to do_single_step /* @@ -582,38 +554,26 @@ io_no_vtime: TRACE_IRQS_OFF la %r2,SP_PTREGS(%r15) # address of register-save area brasl %r14,do_IRQ # call standard irq handler + TRACE_IRQS_ON + io_return: tm SP_PSW+1(%r15),0x01 # returning to user ? #ifdef CONFIG_PREEMPT jno io_preempt # no -> check for preemptive scheduling #else - jno io_restore # no-> skip resched & signal + jno io_leave # no-> skip resched & signal #endif tm __TI_flags+7(%r9),_TIF_WORK_INT jnz io_work # there is work to do (signals etc.) -io_restore: -#ifdef CONFIG_TRACE_IRQFLAGS - larl %r1,io_restore_trace_psw - lpswe 0(%r1) -io_restore_trace: - TRACE_IRQS_CHECK LOCKDEP_SYS_EXIT -#endif io_leave: RESTORE_ALL __LC_RETURN_PSW,0 io_done: -#ifdef CONFIG_TRACE_IRQFLAGS - .align 8 - .globl io_restore_trace_psw -io_restore_trace_psw: - .quad 0, io_restore_trace -#endif - #ifdef CONFIG_PREEMPT io_preempt: icm %r0,15,__TI_precount(%r9) - jnz io_restore + jnz io_leave # switch to kernel stack lg %r1,SP_R15(%r15) aghi %r1,-SP_SIZE @@ -622,9 +582,14 @@ io_preempt: lgr %r15,%r1 io_resume_loop: tm __TI_flags+7(%r9),_TIF_NEED_RESCHED - jno io_restore - larl %r14,io_resume_loop - jg preempt_schedule_irq + jno io_leave + larl %r1,.Lc_pactive + mvc __TI_precount(4,%r9),0(%r1) + stosm __SF_EMPTY(%r15),0x03 # reenable interrupts + brasl %r14,schedule # call schedule + stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts + xc __TI_precount(4,%r9),__TI_precount(%r9) + j io_resume_loop #endif # @@ -648,39 +613,37 @@ io_work_loop: jo io_reschedule tm __TI_flags+7(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK) jnz io_sigpending - j io_restore -io_work_done: + LOCKDEP_SYS_EXIT + j io_leave # # _TIF_MCCK_PENDING is set, call handler # io_mcck_pending: + TRACE_IRQS_OFF brasl %r14,s390_handle_mcck # TIF bit will be cleared by handler + TRACE_IRQS_ON j io_work_loop # # _TIF_NEED_RESCHED is set, call schedule # io_reschedule: - TRACE_IRQS_ON stosm __SF_EMPTY(%r15),0x03 # reenable interrupts brasl %r14,schedule # call scheduler stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts - TRACE_IRQS_OFF tm __TI_flags+7(%r9),_TIF_WORK_INT - jz io_restore # there is no work to do + jz io_leave # there is no work to do j io_work_loop # # _TIF_SIGPENDING or _TIF_RESTORE_SIGMASK is set, call do_signal # io_sigpending: - TRACE_IRQS_ON stosm __SF_EMPTY(%r15),0x03 # reenable interrupts la %r2,SP_PTREGS(%r15) # load pt_regs brasl %r14,do_signal # call do_signal stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts - TRACE_IRQS_OFF j io_work_loop /* @@ -706,6 +669,7 @@ ext_no_vtime: la %r2,SP_PTREGS(%r15) # address of register-save area llgh %r3,__LC_EXT_INT_CODE # get interruption code brasl %r14,do_extint + TRACE_IRQS_ON j io_return __critical_end: @@ -860,15 +824,15 @@ cleanup_table_system_call: cleanup_table_sysc_return: .quad sysc_return, sysc_leave cleanup_table_sysc_leave: - .quad sysc_leave, sysc_done + .quad sysc_leave, sysc_work_loop cleanup_table_sysc_work_loop: - .quad sysc_work_loop, sysc_work_done + .quad sysc_work_loop, sysc_reschedule cleanup_table_io_return: .quad io_return, io_leave cleanup_table_io_leave: .quad io_leave, io_done cleanup_table_io_work_loop: - .quad io_work_loop, io_work_done + .quad io_work_loop, io_mcck_pending cleanup_critical: clc 8(8,%r12),BASED(cleanup_table_system_call) @@ -937,6 +901,8 @@ cleanup_system_call: cleanup_vtime: clc __LC_RETURN_PSW+8(8),BASED(cleanup_system_call_insn+24) jhe cleanup_stime + tm SP_PSW+1(%r15),0x01 # interrupting from user ? + jz cleanup_novtime UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER cleanup_stime: clc __LC_RETURN_PSW+8(8),BASED(cleanup_system_call_insn+32) @@ -944,6 +910,7 @@ cleanup_stime: UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER cleanup_update: mvc __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER +cleanup_novtime: #endif mvc __LC_RETURN_PSW+8(8),BASED(cleanup_table_system_call+8) la %r12,__LC_RETURN_PSW @@ -982,10 +949,10 @@ cleanup_sysc_leave: 2: la %r12,__LC_RETURN_PSW br %r14 cleanup_sysc_leave_insn: - .quad sysc_done - 4 #ifdef CONFIG_VIRT_CPU_ACCOUNTING - .quad sysc_done - 8 + .quad sysc_leave + 16 #endif + .quad sysc_leave + 12 cleanup_io_return: mvc __LC_RETURN_PSW(8),0(%r12) @@ -1012,16 +979,17 @@ cleanup_io_leave: 2: la %r12,__LC_RETURN_PSW br %r14 cleanup_io_leave_insn: - .quad io_done - 4 #ifdef CONFIG_VIRT_CPU_ACCOUNTING - .quad io_done - 8 + .quad io_leave + 20 #endif + .quad io_leave + 16 /* * Integer constants */ .align 4 .Lconst: +.Lc_pactive: .long PREEMPT_ACTIVE .Lnr_syscalls: .long NR_syscalls .L0x0130: .short 0x130 .L0x0140: .short 0x140 diff --git a/trunk/arch/s390/kernel/setup.c b/trunk/arch/s390/kernel/setup.c index 50f8f1e3760e..7e1bfb984064 100644 --- a/trunk/arch/s390/kernel/setup.c +++ b/trunk/arch/s390/kernel/setup.c @@ -347,7 +347,7 @@ void (*_machine_power_off)(void) = do_machine_power_off_nonsmp; void machine_restart(char *command) { - if ((!in_interrupt() && !in_atomic()) || oops_in_progress) + if (!in_interrupt() || oops_in_progress) /* * Only unblank the console if we are called in enabled * context or a bust_spinlocks cleared the way for us. @@ -492,10 +492,6 @@ static void setup_addressing_mode(void) printk("S390 address spaces switched, "); set_amode_and_uaccess(PSW_ASC_PRIMARY, PSW32_ASC_PRIMARY); } -#ifdef CONFIG_TRACE_IRQFLAGS - sysc_restore_trace_psw.mask = psw_kernel_bits & ~PSW_MASK_MCHECK; - io_restore_trace_psw.mask = psw_kernel_bits & ~PSW_MASK_MCHECK; -#endif } static void __init diff --git a/trunk/arch/s390/kernel/smp.c b/trunk/arch/s390/kernel/smp.c index 264ea906db4c..b05ae8584258 100644 --- a/trunk/arch/s390/kernel/smp.c +++ b/trunk/arch/s390/kernel/smp.c @@ -193,16 +193,10 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info, } EXPORT_SYMBOL(smp_call_function_single); -void smp_send_stop(void) +static void do_send_stop(void) { int cpu, rc; - /* Disable all interrupts/machine checks */ - __load_psw_mask(psw_kernel_bits & ~PSW_MASK_MCHECK); - - /* write magic number to zero page (absolute 0) */ - lowcore_ptr[smp_processor_id()]->panic_magic = __PANIC_MAGIC; - /* stop all processors */ for_each_online_cpu(cpu) { if (cpu == smp_processor_id()) @@ -210,12 +204,60 @@ void smp_send_stop(void) do { rc = signal_processor(cpu, sigp_stop); } while (rc == sigp_busy); + } +} + +static void do_store_status(void) +{ + int cpu, rc; + + /* store status of all processors in their lowcores (real 0) */ + for_each_online_cpu(cpu) { + if (cpu == smp_processor_id()) + continue; + do { + rc = signal_processor_p( + (__u32)(unsigned long) lowcore_ptr[cpu], cpu, + sigp_store_status_at_address); + } while (rc == sigp_busy); + } +} +static void do_wait_for_stop(void) +{ + int cpu; + + /* Wait for all other cpus to enter stopped state */ + for_each_online_cpu(cpu) { + if (cpu == smp_processor_id()) + continue; while (!smp_cpu_not_running(cpu)) cpu_relax(); } } +/* + * this function sends a 'stop' sigp to all other CPUs in the system. + * it goes straight through. + */ +void smp_send_stop(void) +{ + /* Disable all interrupts/machine checks */ + __load_psw_mask(psw_kernel_bits & ~PSW_MASK_MCHECK); + + /* write magic number to zero page (absolute 0) */ + lowcore_ptr[smp_processor_id()]->panic_magic = __PANIC_MAGIC; + + /* stop other processors. */ + do_send_stop(); + + /* wait until other processors are stopped */ + do_wait_for_stop(); + + /* store status of other processors. */ + do_store_status(); +} + /* * Reboot, halt and power_off routines for SMP. */ diff --git a/trunk/arch/s390/kernel/traps.c b/trunk/arch/s390/kernel/traps.c index 8ed16a83fba7..8ec9def83ccb 100644 --- a/trunk/arch/s390/kernel/traps.c +++ b/trunk/arch/s390/kernel/traps.c @@ -260,7 +260,6 @@ void die(const char * str, struct pt_regs * regs, long err) bust_spinlocks(1); printk("%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); print_modules(); - notify_die(DIE_OOPS, str, regs, err, current->thread.trap_no, SIGSEGV); show_regs(regs); bust_spinlocks(0); add_taint(TAINT_DIE); diff --git a/trunk/arch/s390/mm/cmm.c b/trunk/arch/s390/mm/cmm.c index 413c240cbca7..d4ed93dfb9c7 100644 --- a/trunk/arch/s390/mm/cmm.c +++ b/trunk/arch/s390/mm/cmm.c @@ -341,16 +341,19 @@ cmm_timeout_handler(ctl_table *ctl, int write, struct file *filp, static struct ctl_table cmm_table[] = { { + .ctl_name = VM_CMM_PAGES, .procname = "cmm_pages", .mode = 0644, .proc_handler = &cmm_pages_handler, }, { + .ctl_name = VM_CMM_TIMED_PAGES, .procname = "cmm_timed_pages", .mode = 0644, .proc_handler = &cmm_pages_handler, }, { + .ctl_name = VM_CMM_TIMEOUT, .procname = "cmm_timeout", .mode = 0644, .proc_handler = &cmm_timeout_handler, diff --git a/trunk/arch/sh/boards/renesas/rts7751r2d/setup.c b/trunk/arch/sh/boards/renesas/rts7751r2d/setup.c index 8125d20fdbd8..37f2c0b447fe 100644 --- a/trunk/arch/sh/boards/renesas/rts7751r2d/setup.c +++ b/trunk/arch/sh/boards/renesas/rts7751r2d/setup.c @@ -53,12 +53,10 @@ static struct resource cf_ide_resources[] = { .end = PA_AREA5_IO + 0x80c, .flags = IORESOURCE_MEM, }, -#ifndef CONFIG_RTS7751R2D_1 /* For R2D-1 polling is preferred */ [2] = { .start = IRQ_CF_IDE, .flags = IORESOURCE_IRQ, }, -#endif }; static struct pata_platform_info pata_info = { diff --git a/trunk/arch/sh/configs/r7780mp_defconfig b/trunk/arch/sh/configs/r7780mp_defconfig index 2ad804ec920a..ac4de4973b60 100644 --- a/trunk/arch/sh/configs/r7780mp_defconfig +++ b/trunk/arch/sh/configs/r7780mp_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.24-rc2 -# Tue Nov 13 20:32:39 2007 +# Linux kernel version: 2.6.22-rc4 +# Mon Jun 11 10:24:57 2007 # CONFIG_SUPERH=y CONFIG_RWSEM_GENERIC_SPINLOCK=y @@ -13,39 +13,38 @@ CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_TIME=y CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_SYS_SUPPORTS_PCI=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_LOCKDEP_SUPPORT=y # CONFIG_ARCH_HAS_ILOG2_U32 is not set # CONFIG_ARCH_HAS_ILOG2_U64 is not set -CONFIG_ARCH_NO_VIRT_TO_BUS=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # -# General setup +# Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_BROKEN_ON_SMP=y CONFIG_LOCK_KERNEL=y CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# CONFIG_LOCALVERSION="" CONFIG_LOCALVERSION_AUTO=y CONFIG_SWAP=y CONFIG_SYSVIPC=y +# CONFIG_IPC_NS is not set CONFIG_SYSVIPC_SYSCTL=y # CONFIG_POSIX_MQUEUE is not set CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set # CONFIG_TASKSTATS is not set -# CONFIG_USER_NS is not set +# CONFIG_UTS_NS is not set # CONFIG_AUDIT is not set CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_CGROUPS is not set -CONFIG_FAIR_GROUP_SCHED=y -CONFIG_FAIR_USER_SCHED=y -# CONFIG_FAIR_CGROUP_SCHED is not set # CONFIG_SYSFS_DEPRECATED is not set # CONFIG_RELAY is not set # CONFIG_BLK_DEV_INITRD is not set @@ -66,6 +65,7 @@ CONFIG_BASE_FULL=y CONFIG_ANON_INODES=y # CONFIG_EPOLL is not set CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y CONFIG_VM_EVENT_COUNTERS=y @@ -74,17 +74,24 @@ CONFIG_SLAB=y # CONFIG_SLOB is not set # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 + +# +# Loadable module support +# CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y + +# +# Block layer +# CONFIG_BLOCK=y # CONFIG_LBD is not set # CONFIG_BLK_DEV_IO_TRACE is not set # CONFIG_LSF is not set -# CONFIG_BLK_DEV_BSG is not set # # IO Schedulers @@ -106,6 +113,7 @@ CONFIG_CPU_SH4=y CONFIG_CPU_SH4A=y # CONFIG_CPU_SUBTYPE_SH7619 is not set # CONFIG_CPU_SUBTYPE_SH7206 is not set +# CONFIG_CPU_SUBTYPE_SH7300 is not set # CONFIG_CPU_SUBTYPE_SH7705 is not set # CONFIG_CPU_SUBTYPE_SH7706 is not set # CONFIG_CPU_SUBTYPE_SH7707 is not set @@ -113,7 +121,6 @@ CONFIG_CPU_SH4A=y # CONFIG_CPU_SUBTYPE_SH7709 is not set # CONFIG_CPU_SUBTYPE_SH7710 is not set # CONFIG_CPU_SUBTYPE_SH7712 is not set -# CONFIG_CPU_SUBTYPE_SH7720 is not set # CONFIG_CPU_SUBTYPE_SH7750 is not set # CONFIG_CPU_SUBTYPE_SH7091 is not set # CONFIG_CPU_SUBTYPE_SH7750R is not set @@ -122,10 +129,12 @@ CONFIG_CPU_SH4A=y # CONFIG_CPU_SUBTYPE_SH7751R is not set # CONFIG_CPU_SUBTYPE_SH7760 is not set # CONFIG_CPU_SUBTYPE_SH4_202 is not set +# CONFIG_CPU_SUBTYPE_ST40STB1 is not set +# CONFIG_CPU_SUBTYPE_ST40GX1 is not set # CONFIG_CPU_SUBTYPE_SH7770 is not set CONFIG_CPU_SUBTYPE_SH7780=y # CONFIG_CPU_SUBTYPE_SH7785 is not set -# CONFIG_CPU_SUBTYPE_SHX3 is not set +# CONFIG_CPU_SUBTYPE_SH73180 is not set # CONFIG_CPU_SUBTYPE_SH7343 is not set # CONFIG_CPU_SUBTYPE_SH7722 is not set @@ -160,7 +169,6 @@ CONFIG_FLATMEM_MANUAL=y CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_SPARSEMEM_STATIC=y -# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set CONFIG_SPLIT_PTLOCK_CPUS=4 # CONFIG_RESOURCES_64BIT is not set CONFIG_ZONE_DMA_FLAG=0 @@ -170,9 +178,8 @@ CONFIG_NR_QUICK=2 # Cache configuration # # CONFIG_SH_DIRECT_MAPPED is not set -CONFIG_CACHE_WRITEBACK=y -# CONFIG_CACHE_WRITETHROUGH is not set -# CONFIG_CACHE_OFF is not set +# CONFIG_SH_WRITETHROUGH is not set +# CONFIG_SH_OCRAM is not set # # Processor features @@ -180,11 +187,12 @@ CONFIG_CACHE_WRITEBACK=y CONFIG_CPU_LITTLE_ENDIAN=y # CONFIG_CPU_BIG_ENDIAN is not set CONFIG_SH_FPU=y +# CONFIG_SH_DSP is not set CONFIG_SH_STORE_QUEUES=y CONFIG_SPECULATIVE_EXECUTION=y CONFIG_CPU_HAS_INTEVT=y +CONFIG_CPU_HAS_INTC_IRQ=y CONFIG_CPU_HAS_SR_RB=y -CONFIG_CPU_HAS_FPU=y # # Board support @@ -204,7 +212,6 @@ CONFIG_SH_PCLK_FREQ=32000000 # CONFIG_TICK_ONESHOT is not set # CONFIG_NO_HZ is not set # CONFIG_HIGH_RES_TIMERS is not set -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y # # CPU Frequency scaling @@ -219,6 +226,7 @@ CONFIG_GENERIC_CLOCKEVENTS_BUILD=y # # Companion Chips # +# CONFIG_HD6446X_SERIES is not set # # Additional SuperH Device Drivers @@ -236,17 +244,18 @@ CONFIG_HZ_250=y CONFIG_HZ=250 CONFIG_KEXEC=y # CONFIG_CRASH_DUMP is not set +# CONFIG_SMP is not set # CONFIG_PREEMPT_NONE is not set # CONFIG_PREEMPT_VOLUNTARY is not set CONFIG_PREEMPT=y CONFIG_PREEMPT_BKL=y -CONFIG_GUSA=y # # Boot options # CONFIG_ZERO_PAGE_OFFSET=0x00001000 CONFIG_BOOT_LINK_OFFSET=0x00800000 +# CONFIG_UBC_WAKEUP is not set CONFIG_CMDLINE_BOOL=y CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1" @@ -258,8 +267,11 @@ CONFIG_SH_PCIDMA_NONCOHERENT=y CONFIG_PCI_AUTO=y CONFIG_PCI_AUTO_UPDATE_RESOURCES=y # CONFIG_ARCH_SUPPORTS_MSI is not set -CONFIG_PCI_LEGACY=y # CONFIG_PCI_DEBUG is not set + +# +# PCCARD (PCMCIA/CardBus) support +# # CONFIG_PCCARD is not set # CONFIG_HOTPLUG_PCI is not set @@ -269,6 +281,11 @@ CONFIG_PCI_LEGACY=y CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set +# +# Power management options (EXPERIMENTAL) +# +# CONFIG_PM is not set + # # Networking # @@ -310,7 +327,6 @@ CONFIG_IP_PNP_DHCP=y CONFIG_INET_XFRM_MODE_TRANSPORT=y CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -337,6 +353,10 @@ CONFIG_LLC=m # CONFIG_LAPB is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# # CONFIG_NET_SCHED is not set # @@ -356,7 +376,6 @@ CONFIG_WIRELESS_EXT=y # CONFIG_MAC80211 is not set # CONFIG_IEEE80211 is not set # CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set # # Device Drivers @@ -365,17 +384,33 @@ CONFIG_WIRELESS_EXT=y # # Generic Driver Options # -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m # 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 # CONFIG_MTD is not set + +# +# Parallel port support +# # CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y + +# +# Plug and Play support +# +# CONFIG_PNPACPI is not set + +# +# Block devices +# +# CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set @@ -389,11 +424,14 @@ CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set -CONFIG_MISC_DEVICES=y + +# +# Misc devices +# # CONFIG_PHANTOM is not set -CONFIG_EEPROM_93CX6=y # CONFIG_SGI_IOC4 is not set # CONFIG_TIFM_CORE is not set +# CONFIG_BLINK is not set # CONFIG_IDE is not set # @@ -401,7 +439,6 @@ CONFIG_EEPROM_93CX6=y # # CONFIG_RAID_ATTRS is not set CONFIG_SCSI=y -CONFIG_SCSI_DMA=y # CONFIG_SCSI_TGT is not set # CONFIG_SCSI_NETLINK is not set CONFIG_SCSI_PROC_FS=y @@ -431,9 +468,12 @@ CONFIG_SCSI_WAIT_SCAN=m # CONFIG_SCSI_SPI_ATTRS is not set # CONFIG_SCSI_FC_ATTRS is not set # CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set # CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -CONFIG_SCSI_LOWLEVEL=y + +# +# SCSI low-level drivers +# # CONFIG_ISCSI_TCP is not set # CONFIG_BLK_DEV_3W_XXXX_RAID is not set # CONFIG_SCSI_3W_9XXX is not set @@ -443,6 +483,7 @@ CONFIG_SCSI_LOWLEVEL=y # CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_AIC79XX is not set # CONFIG_SCSI_AIC94XX is not set +# CONFIG_SCSI_DPT_I2O is not set # CONFIG_SCSI_ARCMSR is not set # CONFIG_MEGARAID_NEWGEN is not set # CONFIG_MEGARAID_LEGACY is not set @@ -507,7 +548,6 @@ CONFIG_SATA_SIL=y # CONFIG_PATA_OLDPIIX is not set # CONFIG_PATA_NETCELL is not set # CONFIG_PATA_NS87410 is not set -# CONFIG_PATA_NS87415 is not set # CONFIG_PATA_OPTI is not set # CONFIG_PATA_OPTIDMA is not set # CONFIG_PATA_PDC_OLD is not set @@ -521,43 +561,59 @@ CONFIG_SATA_SIL=y # CONFIG_PATA_VIA is not set # CONFIG_PATA_WINBOND is not set CONFIG_PATA_PLATFORM=y + +# +# Multi-device support (RAID and LVM) +# # CONFIG_MD is not set + +# +# Fusion MPT device support +# # CONFIG_FUSION is not set +# CONFIG_FUSION_SPI is not set +# CONFIG_FUSION_FC is not set +# CONFIG_FUSION_SAS is not set # # IEEE 1394 (FireWire) support # # CONFIG_FIREWIRE is not set # CONFIG_IEEE1394 is not set + +# +# I2O device support +# # CONFIG_I2O is not set + +# +# Network device support +# CONFIG_NETDEVICES=y -# CONFIG_NETDEVICES_MULTIQUEUE is not set # CONFIG_DUMMY is not set # CONFIG_BONDING is not set -# CONFIG_MACVLAN is not set # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set -# CONFIG_VETH is not set -# CONFIG_IP1000 is not set # CONFIG_ARCNET is not set # CONFIG_PHYLIB is not set + +# +# Ethernet (10 or 100Mbit) +# CONFIG_NET_ETHERNET=y CONFIG_MII=y -CONFIG_AX88796=y -CONFIG_AX88796_93CX6=y # CONFIG_STNIC is not set # CONFIG_HAPPYMEAL is not set # CONFIG_SUNGEM is not set # CONFIG_CASSINI is not set # CONFIG_NET_VENDOR_3COM is not set # CONFIG_SMC91X is not set -# CONFIG_SMC911X is not set + +# +# Tulip family network device support +# # CONFIG_NET_TULIP is not set # CONFIG_HP100 is not set -# CONFIG_IBM_NEW_EMAC_ZMII is not set -# CONFIG_IBM_NEW_EMAC_RGMII is not set -# CONFIG_IBM_NEW_EMAC_TAH is not set -# CONFIG_IBM_NEW_EMAC_EMAC4 is not set CONFIG_NET_PCI=y CONFIG_PCNET32=m # CONFIG_PCNET32_NAPI is not set @@ -565,6 +621,7 @@ CONFIG_PCNET32=m # CONFIG_ADAPTEC_STARFIRE is not set # CONFIG_B44 is not set # CONFIG_FORCEDETH is not set +# CONFIG_DGRS is not set # CONFIG_EEPRO100 is not set # CONFIG_E100 is not set # CONFIG_FEALNX is not set @@ -590,7 +647,6 @@ CONFIG_NETDEV_1000=y CONFIG_E1000=m # CONFIG_E1000_NAPI is not set # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -# CONFIG_E1000E is not set # CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set @@ -608,14 +664,11 @@ CONFIG_R8169=y CONFIG_NETDEV_10000=y # CONFIG_CHELSIO_T1 is not set # CONFIG_CHELSIO_T3 is not set -# CONFIG_IXGBE is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set # CONFIG_MYRI10GE is not set # CONFIG_NETXEN_NIC is not set -# CONFIG_NIU is not set # CONFIG_MLX4_CORE is not set -# CONFIG_TEHUTI is not set # CONFIG_TR is not set # @@ -633,7 +686,15 @@ CONFIG_NETDEV_10000=y # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set + +# +# ISDN subsystem +# # CONFIG_ISDN is not set + +# +# Telephony Support +# # CONFIG_PHONE is not set # @@ -641,7 +702,6 @@ CONFIG_NETDEV_10000=y # CONFIG_INPUT=y # CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set # # Userland interfaces @@ -651,6 +711,7 @@ CONFIG_INPUT_MOUSEDEV=y CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set # CONFIG_INPUT_EVDEV is not set # CONFIG_INPUT_EVBUG is not set @@ -704,11 +765,21 @@ CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# # CONFIG_IPMI_HANDLER is not set +# CONFIG_WATCHDOG is not set CONFIG_HW_RANDOM=y # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set +# CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# # CONFIG_TCG_TPM is not set CONFIG_DEVPORT=y # CONFIG_I2C is not set @@ -718,31 +789,21 @@ CONFIG_DEVPORT=y # # CONFIG_SPI is not set # CONFIG_SPI_MASTER is not set + +# +# Dallas's 1-wire bus +# # CONFIG_W1 is not set -# CONFIG_POWER_SUPPLY is not set CONFIG_HWMON=y # CONFIG_HWMON_VID is not set +# CONFIG_SENSORS_ABITUGURU is not set # CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_F71882FG is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_PC87360 is not set # CONFIG_SENSORS_PC87427 is not set -# CONFIG_SENSORS_SIS5595 is not set # CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_VT1211 is not set -# CONFIG_SENSORS_VT8231 is not set # CONFIG_SENSORS_W83627HF is not set -# CONFIG_SENSORS_W83627EHF is not set # CONFIG_HWMON_DEBUG_CHIP is not set -# CONFIG_WATCHDOG is not set - -# -# Sonics Silicon Backplane -# -CONFIG_SSB_POSSIBLE=y -# CONFIG_SSB is not set # # Multifunction device drivers @@ -759,16 +820,14 @@ CONFIG_DAB=y # # Graphics support # -# CONFIG_DRM is not set -# CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set -# CONFIG_FB is not set # CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Display device support # # CONFIG_DISPLAY_SUPPORT is not set +# CONFIG_VGASTATE is not set +# CONFIG_FB is not set # # Sound @@ -784,14 +843,20 @@ CONFIG_SOUND=m # Open Sound System # CONFIG_SOUND_PRIME=m +# CONFIG_OSS_OBSOLETE is not set # CONFIG_SOUND_TRIDENT is not set # CONFIG_SOUND_MSNDCLAS is not set # CONFIG_SOUND_MSNDPIN is not set -CONFIG_HID_SUPPORT=y + +# +# HID Devices +# CONFIG_HID=y # CONFIG_HID_DEBUG is not set -# CONFIG_HIDRAW is not set -CONFIG_USB_SUPPORT=y + +# +# USB support +# CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y CONFIG_USB_ARCH_HAS_EHCI=y @@ -806,8 +871,32 @@ CONFIG_USB_ARCH_HAS_EHCI=y # # CONFIG_USB_GADGET is not set # CONFIG_MMC is not set + +# +# LED devices +# # CONFIG_NEW_LEDS is not set + +# +# LED drivers +# + +# +# LED Triggers +# + +# +# InfiniBand support +# # CONFIG_INFINIBAND is not set + +# +# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) +# + +# +# Real Time Clock +# CONFIG_RTC_LIB=y CONFIG_RTC_CLASS=y CONFIG_RTC_HCTOSYS=y @@ -823,6 +912,10 @@ CONFIG_RTC_INTF_DEV=y # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set # CONFIG_RTC_DRV_TEST is not set +# +# I2C RTC drivers +# + # # SPI RTC drivers # @@ -831,10 +924,8 @@ CONFIG_RTC_INTF_DEV=y # Platform RTC drivers # # CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set # CONFIG_RTC_DRV_DS1742 is not set # CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T59 is not set # CONFIG_RTC_DRV_V3020 is not set # @@ -843,9 +934,17 @@ CONFIG_RTC_INTF_DEV=y CONFIG_RTC_DRV_SH=y # -# Userspace I/O +# DMA Engine support +# +# CONFIG_DMA_ENGINE is not set + +# +# DMA Clients +# + +# +# DMA Devices # -# CONFIG_UIO is not set # # File systems @@ -906,6 +1005,7 @@ CONFIG_TMPFS=y # CONFIG_TMPFS_POSIX_ACL is not set CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y +CONFIG_RAMFS=y CONFIG_CONFIGFS_FS=m # @@ -924,7 +1024,10 @@ CONFIG_CONFIGFS_FS=m # CONFIG_QNX4FS_FS is not set # CONFIG_SYSV_FS is not set # CONFIG_UFS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y + +# +# Network File Systems +# CONFIG_NFS_FS=y CONFIG_NFS_V3=y # CONFIG_NFS_V3_ACL is not set @@ -950,12 +1053,17 @@ CONFIG_RPCSEC_GSS_KRB5=y # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set +# CONFIG_9P_FS is not set # # Partition Types # # CONFIG_PARTITION_ADVANCED is not set CONFIG_MSDOS_PARTITION=y + +# +# Native Language Support +# CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_CODEPAGE_437=y @@ -996,18 +1104,23 @@ CONFIG_NLS_ISO8859_1=y # CONFIG_NLS_KOI8_R is not set # CONFIG_NLS_KOI8_U is not set # CONFIG_NLS_UTF8 is not set + +# +# Distributed Lock Manager +# # CONFIG_DLM is not set -CONFIG_INSTRUMENTATION=y + +# +# Profiling support +# CONFIG_PROFILING=y CONFIG_OPROFILE=m -# CONFIG_MARKERS is not set # # Kernel hacking # CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME is not set -CONFIG_ENABLE_WARN_DEPRECATED=y CONFIG_ENABLE_MUST_CHECK=y CONFIG_MAGIC_SYSRQ=y # CONFIG_UNUSED_SYMBOLS is not set @@ -1016,7 +1129,6 @@ CONFIG_DEBUG_FS=y CONFIG_DEBUG_KERNEL=y # CONFIG_DEBUG_SHIRQ is not set CONFIG_DETECT_SOFTLOCKUP=y -CONFIG_SCHED_DEBUG=y # CONFIG_SCHEDSTATS is not set # CONFIG_TIMER_STATS is not set # CONFIG_DEBUG_SLAB is not set @@ -1025,7 +1137,6 @@ CONFIG_SCHED_DEBUG=y # CONFIG_DEBUG_MUTEXES is not set # CONFIG_DEBUG_LOCK_ALLOC is not set # CONFIG_PROVE_LOCKING is not set -# CONFIG_LOCK_STAT is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set @@ -1033,13 +1144,10 @@ CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y # CONFIG_DEBUG_VM is not set # CONFIG_DEBUG_LIST is not set -# CONFIG_DEBUG_SG is not set # CONFIG_FRAME_POINTER is not set CONFIG_FORCED_INLINING=y -# CONFIG_BOOT_PRINTK_DELAY is not set # CONFIG_RCU_TORTURE_TEST is not set # CONFIG_FAULT_INJECTION is not set -# CONFIG_SAMPLES is not set CONFIG_SH_STANDARD_BIOS=y # CONFIG_EARLY_SCIF_CONSOLE is not set CONFIG_EARLY_PRINTK=y @@ -1047,7 +1155,6 @@ CONFIG_EARLY_PRINTK=y CONFIG_DEBUG_STACKOVERFLOW=y # CONFIG_DEBUG_STACK_USAGE is not set # CONFIG_4KSTACKS is not set -# CONFIG_IRQSTACKS is not set # CONFIG_SH_KGDB is not set # @@ -1055,7 +1162,10 @@ CONFIG_DEBUG_STACKOVERFLOW=y # # CONFIG_KEYS is not set # CONFIG_SECURITY is not set -# CONFIG_SECURITY_FILE_CAPABILITIES is not set + +# +# Cryptographic options +# CONFIG_CRYPTO=y CONFIG_CRYPTO_ALGAPI=y CONFIG_CRYPTO_BLKCIPHER=y @@ -1076,7 +1186,6 @@ CONFIG_CRYPTO_ECB=m CONFIG_CRYPTO_CBC=y CONFIG_CRYPTO_PCBC=m # CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_XTS is not set # CONFIG_CRYPTO_CRYPTD is not set CONFIG_CRYPTO_DES=y # CONFIG_CRYPTO_FCRYPT is not set @@ -1090,14 +1199,15 @@ CONFIG_CRYPTO_DES=y # CONFIG_CRYPTO_ARC4 is not set # CONFIG_CRYPTO_KHAZAD is not set # CONFIG_CRYPTO_ANUBIS is not set -# CONFIG_CRYPTO_SEED is not set # CONFIG_CRYPTO_DEFLATE is not set # CONFIG_CRYPTO_MICHAEL_MIC is not set # CONFIG_CRYPTO_CRC32C is not set # CONFIG_CRYPTO_CAMELLIA is not set # CONFIG_CRYPTO_TEST is not set -# CONFIG_CRYPTO_AUTHENC is not set -CONFIG_CRYPTO_HW=y + +# +# Hardware crypto devices +# # # Library routines @@ -1107,7 +1217,6 @@ CONFIG_BITREVERSE=y # CONFIG_CRC16 is not set # CONFIG_CRC_ITU_T is not set CONFIG_CRC32=y -# CONFIG_CRC7 is not set # CONFIG_LIBCRC32C is not set CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y diff --git a/trunk/arch/sh/configs/r7785rp_defconfig b/trunk/arch/sh/configs/r7785rp_defconfig index 2e43a2a971a9..158e03f0b1ef 100644 --- a/trunk/arch/sh/configs/r7785rp_defconfig +++ b/trunk/arch/sh/configs/r7785rp_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.24-rc2 -# Tue Nov 13 20:34:57 2007 +# Linux kernel version: 2.6.24-rc1 +# Fri Nov 2 14:30:49 2007 # CONFIG_SUPERH=y CONFIG_RWSEM_GENERIC_SPINLOCK=y @@ -124,6 +124,8 @@ CONFIG_CPU_SHX2=y # CONFIG_CPU_SUBTYPE_SH7751R is not set # CONFIG_CPU_SUBTYPE_SH7760 is not set # CONFIG_CPU_SUBTYPE_SH4_202 is not set +# CONFIG_CPU_SUBTYPE_ST40STB1 is not set +# CONFIG_CPU_SUBTYPE_ST40GX1 is not set # CONFIG_CPU_SUBTYPE_SH7770 is not set # CONFIG_CPU_SUBTYPE_SH7780 is not set CONFIG_CPU_SUBTYPE_SH7785=y @@ -252,6 +254,7 @@ CONFIG_GUSA=y # CONFIG_ZERO_PAGE_OFFSET=0x00001000 CONFIG_BOOT_LINK_OFFSET=0x00800000 +# CONFIG_UBC_WAKEUP is not set CONFIG_CMDLINE_BOOL=y CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1" @@ -263,7 +266,6 @@ CONFIG_SH_PCIDMA_NONCOHERENT=y CONFIG_PCI_AUTO=y CONFIG_PCI_AUTO_UPDATE_RESOURCES=y # CONFIG_ARCH_SUPPORTS_MSI is not set -CONFIG_PCI_LEGACY=y # CONFIG_PCI_DEBUG is not set # CONFIG_PCCARD is not set # CONFIG_HOTPLUG_PCI is not set @@ -548,8 +550,6 @@ CONFIG_NETDEVICES=y # CONFIG_PHYLIB is not set CONFIG_NET_ETHERNET=y CONFIG_MII=y -CONFIG_AX88796=y -CONFIG_AX88796_93CX6=y # CONFIG_STNIC is not set # CONFIG_HAPPYMEAL is not set # CONFIG_SUNGEM is not set diff --git a/trunk/arch/sh/mm/fault.c b/trunk/arch/sh/mm/fault.c index 60d74f793a1d..f33cedb353fc 100644 --- a/trunk/arch/sh/mm/fault.c +++ b/trunk/arch/sh/mm/fault.c @@ -258,6 +258,9 @@ asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs, pmd_t *pmd; pte_t *pte; pte_t entry; + struct mm_struct *mm = current->mm; + spinlock_t *ptl = NULL; + int ret = 1; #ifdef CONFIG_SH_KGDB if (kgdb_nofault && kgdb_bus_err_hook) @@ -271,11 +274,12 @@ asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs, */ if (address >= P3SEG && address < P3_ADDR_MAX) { pgd = pgd_offset_k(address); + mm = NULL; } else { - if (unlikely(address >= TASK_SIZE || !current->mm)) + if (unlikely(address >= TASK_SIZE || !mm)) return 1; - pgd = pgd_offset(current->mm, address); + pgd = pgd_offset(mm, address); } pud = pud_offset(pgd, address); @@ -285,19 +289,34 @@ asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs, if (pmd_none_or_clear_bad(pmd)) return 1; - pte = pte_offset_kernel(pmd, address); + if (mm) + pte = pte_offset_map_lock(mm, pmd, address, &ptl); + else + pte = pte_offset_kernel(pmd, address); + entry = *pte; if (unlikely(pte_none(entry) || pte_not_present(entry))) - return 1; + goto unlock; if (unlikely(writeaccess && !pte_write(entry))) - return 1; + goto unlock; if (writeaccess) entry = pte_mkdirty(entry); entry = pte_mkyoung(entry); +#ifdef CONFIG_CPU_SH4 + /* + * ITLB is not affected by "ldtlb" instruction. + * So, we need to flush the entry by ourselves. + */ + local_flush_tlb_one(get_asid(), address & PAGE_MASK); +#endif + set_pte(pte, entry); update_mmu_cache(NULL, address, entry); - - return 0; + ret = 0; +unlock: + if (mm) + pte_unmap_unlock(pte, ptl); + return ret; } diff --git a/trunk/arch/um/Makefile b/trunk/arch/um/Makefile index ba6813a4aa37..31999bc1c8a4 100644 --- a/trunk/arch/um/Makefile +++ b/trunk/arch/um/Makefile @@ -168,7 +168,7 @@ ifneq ($(KBUILD_SRC),) $(Q)mkdir -p $(objtree)/include/asm-um $(Q)ln -fsn $(srctree)/include/asm-$(HEADER_ARCH) include/asm-um/arch else - $(Q)cd $(TOPDIR)/include/asm-um && ln -fsn ../asm-$(HEADER_ARCH) arch + $(Q)cd $(TOPDIR)/include/asm-um && ln -fsn ../asm-$(SUBARCH) arch endif $(objtree)/$(ARCH_DIR)/include: diff --git a/trunk/arch/um/drivers/ubd_kern.c b/trunk/arch/um/drivers/ubd_kern.c index b1a77b11f089..7e6cdde62ead 100644 --- a/trunk/arch/um/drivers/ubd_kern.c +++ b/trunk/arch/um/drivers/ubd_kern.c @@ -1128,7 +1128,6 @@ static void do_ubd_request(struct request_queue *q) "errno = %d\n", -n); else if(list_empty(&dev->restart)) list_add(&dev->restart, &restart); - kfree(io_req); return; } diff --git a/trunk/arch/um/os-Linux/time.c b/trunk/arch/um/os-Linux/time.c index ef02d941c2ad..e34e1effe0f5 100644 --- a/trunk/arch/um/os-Linux/time.c +++ b/trunk/arch/um/os-Linux/time.c @@ -59,7 +59,7 @@ long long disable_timer(void) { struct itimerval time = ((struct itimerval) { { 0, 0 }, { 0, 0 } }); - if (setitimer(ITIMER_VIRTUAL, &time, &time) < 0) + if(setitimer(ITIMER_VIRTUAL, &time, &time) < 0) printk(UM_KERN_ERR "disable_timer - setitimer failed, " "errno = %d\n", errno); @@ -74,61 +74,13 @@ long long os_nsecs(void) return timeval_to_ns(&tv); } -#ifdef UML_CONFIG_NO_HZ -static int after_sleep_interval(struct timespec *ts) -{ -} -#else -static inline long long timespec_to_us(const struct timespec *ts) -{ - return ((long long) ts->tv_sec * UM_USEC_PER_SEC) + - ts->tv_nsec / UM_NSEC_PER_USEC; -} - -static int after_sleep_interval(struct timespec *ts) -{ - int usec = UM_USEC_PER_SEC / UM_HZ; - long long start_usecs = timespec_to_us(ts); - struct timeval tv; - struct itimerval interval; - - /* - * It seems that rounding can increase the value returned from - * setitimer to larger than the one passed in. Over time, - * this will cause the remaining time to be greater than the - * tick interval. If this happens, then just reduce the first - * tick to the interval value. - */ - if (start_usecs > usec) - start_usecs = usec; - tv = ((struct timeval) { .tv_sec = start_usecs / UM_USEC_PER_SEC, - .tv_usec = start_usecs % UM_USEC_PER_SEC }); - interval = ((struct itimerval) { { 0, usec }, tv }); - - if (setitimer(ITIMER_VIRTUAL, &interval, NULL) == -1) - return -errno; - - return 0; -} -#endif - extern void alarm_handler(int sig, struct sigcontext *sc); void idle_sleep(unsigned long long nsecs) { - struct timespec ts; - - /* - * nsecs can come in as zero, in which case, this starts a - * busy loop. To prevent this, reset nsecs to the tick - * interval if it is zero. - */ - if (nsecs == 0) - nsecs = UM_NSEC_PER_SEC / UM_HZ; - ts = ((struct timespec) { .tv_sec = nsecs / UM_NSEC_PER_SEC, - .tv_nsec = nsecs % UM_NSEC_PER_SEC }); + struct timespec ts = { .tv_sec = nsecs / UM_NSEC_PER_SEC, + .tv_nsec = nsecs % UM_NSEC_PER_SEC }; if (nanosleep(&ts, &ts) == 0) alarm_handler(SIGVTALRM, NULL); - after_sleep_interval(&ts); } diff --git a/trunk/arch/x86/Makefile b/trunk/arch/x86/Makefile index 7aa1dc6d67c8..116b03a45636 100644 --- a/trunk/arch/x86/Makefile +++ b/trunk/arch/x86/Makefile @@ -11,9 +11,10 @@ endif $(srctree)/arch/x86/Makefile%: ; ifeq ($(CONFIG_X86_32),y) - UTS_MACHINE := i386 include $(srctree)/arch/x86/Makefile_32 else - UTS_MACHINE := x86_64 include $(srctree)/arch/x86/Makefile_64 endif + + + diff --git a/trunk/arch/x86/boot/header.S b/trunk/arch/x86/boot/header.S index 4cc5b0411db5..6ef5a060fa11 100644 --- a/trunk/arch/x86/boot/header.S +++ b/trunk/arch/x86/boot/header.S @@ -236,30 +236,39 @@ start_of_setup: movw %ax, %es cld -# Apparently some ancient versions of LILO invoked the kernel with %ss != %ds, -# which happened to work by accident for the old code. Recalculate the stack -# pointer if %ss is invalid. Otherwise leave it alone, LOADLIN sets up the -# stack behind its own code, so we can't blindly put it directly past the heap. +# Apparently some ancient versions of LILO invoked the kernel +# with %ss != %ds, which happened to work by accident for the +# old code. If the CAN_USE_HEAP flag is set in loadflags, or +# %ss != %ds, then adjust the stack pointer. + # Smallest possible stack we can tolerate + movw $(_end+STACK_SIZE), %cx + + movw heap_end_ptr, %dx + addw $512, %dx + jnc 1f + xorw %dx, %dx # Wraparound - whole segment available +1: testb $CAN_USE_HEAP, loadflags + jnz 2f + + # No CAN_USE_HEAP movw %ss, %dx cmpw %ax, %dx # %ds == %ss? movw %sp, %dx - je 2f # -> assume %sp is reasonably set - - # Invalid %ss, make up a new stack - movw $_end, %dx - testb $CAN_USE_HEAP, loadflags - jz 1f - movw heap_end_ptr, %dx -1: addw $STACK_SIZE, %dx - jnc 2f - xorw %dx, %dx # Prevent wraparound + # If so, assume %sp is reasonably set, otherwise use + # the smallest possible stack. + jne 4f # -> Smallest possible stack... -2: # Now %dx should point to the end of our stack space + # Make sure the stack is at least minimum size. Take a value + # of zero to mean "full segment." +2: andw $~3, %dx # dword align (might as well...) jnz 3f movw $0xfffc, %dx # Make sure we're not zero -3: movw %ax, %ss +3: cmpw %cx, %dx + jnb 5f +4: movw %cx, %dx # Minimum value we can possibly use +5: movw %ax, %ss movzwl %dx, %esp # Clear upper half of %esp sti # Now we should have a working stack diff --git a/trunk/arch/x86/kernel/acpi/processor.c b/trunk/arch/x86/kernel/acpi/processor.c index a25db514c719..f63e5ff0aca1 100644 --- a/trunk/arch/x86/kernel/acpi/processor.c +++ b/trunk/arch/x86/kernel/acpi/processor.c @@ -49,9 +49,6 @@ static void init_intel_pdc(struct acpi_processor *pr, struct cpuinfo_x86 *c) if (cpu_has(c, X86_FEATURE_EST)) buf[2] |= ACPI_PDC_EST_CAPABILITY_SWSMP; - if (cpu_has(c, X86_FEATURE_ACPI)) - buf[2] |= ACPI_PDC_T_FFH; - obj->type = ACPI_TYPE_BUFFER; obj->buffer.length = 12; obj->buffer.pointer = (u8 *) buf; diff --git a/trunk/arch/x86/kernel/acpi/sleep_64.c b/trunk/arch/x86/kernel/acpi/sleep_64.c index da42de261ba8..79475d237071 100644 --- a/trunk/arch/x86/kernel/acpi/sleep_64.c +++ b/trunk/arch/x86/kernel/acpi/sleep_64.c @@ -115,3 +115,6 @@ static int __init acpi_sleep_setup(char *str) __setup("acpi_sleep=", acpi_sleep_setup); +void acpi_pci_link_exit(void) +{ +} diff --git a/trunk/arch/x86/kernel/apic_32.c b/trunk/arch/x86/kernel/apic_32.c index 96986b46bc85..08b07c176962 100644 --- a/trunk/arch/x86/kernel/apic_32.c +++ b/trunk/arch/x86/kernel/apic_32.c @@ -789,7 +789,7 @@ void __init sync_Arb_IDs(void) * Unsupported on P4 - see Intel Dev. Manual Vol. 3, Ch. 8.6.1 And not * needed on AMD. */ - if (modern_apic() || boot_cpu_data.x86_vendor == X86_VENDOR_AMD) + if (modern_apic()) return; /* * Wait for idle. diff --git a/trunk/arch/x86/kernel/i386_ksyms_32.c b/trunk/arch/x86/kernel/i386_ksyms_32.c index 02112fcc0de7..edd39ccf139e 100644 --- a/trunk/arch/x86/kernel/i386_ksyms_32.c +++ b/trunk/arch/x86/kernel/i386_ksyms_32.c @@ -2,7 +2,6 @@ #include #include #include -#include EXPORT_SYMBOL(__down_failed); EXPORT_SYMBOL(__down_failed_interruptible); @@ -30,4 +29,3 @@ EXPORT_SYMBOL(__read_lock_failed); #endif EXPORT_SYMBOL(csum_partial); -EXPORT_SYMBOL(empty_zero_page); diff --git a/trunk/arch/x86/kernel/io_apic_32.c b/trunk/arch/x86/kernel/io_apic_32.c index 6cf27319a91c..f35c6eb33da9 100644 --- a/trunk/arch/x86/kernel/io_apic_32.c +++ b/trunk/arch/x86/kernel/io_apic_32.c @@ -962,7 +962,7 @@ static int EISA_ELCR(unsigned int irq) #define default_MCA_trigger(idx) (1) #define default_MCA_polarity(idx) (0) -static int MPBIOS_polarity(int idx) +static int __init MPBIOS_polarity(int idx) { int bus = mp_irqs[idx].mpc_srcbus; int polarity; @@ -2166,10 +2166,6 @@ static inline void __init check_timer(void) { int apic1, pin1, apic2, pin2; int vector; - unsigned int ver; - - ver = apic_read(APIC_LVR); - ver = GET_APIC_VERSION(ver); /* * get/set the timer IRQ vector: @@ -2183,15 +2179,11 @@ static inline void __init check_timer(void) * mode for the 8259A whenever interrupts are routed * through I/O APICs. Also IRQ0 has to be enabled in * the 8259A which implies the virtual wire has to be - * disabled in the local APIC. Finally timer interrupts - * need to be acknowledged manually in the 8259A for - * timer_interrupt() and for the i82489DX when using - * the NMI watchdog. + * disabled in the local APIC. */ apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); init_8259A(1); - timer_ack = !cpu_has_tsc; - timer_ack |= (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver)); + timer_ack = 1; if (timer_over_8254 > 0) enable_8259A_irq(0); @@ -2838,25 +2830,6 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a return 0; } -int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity) -{ - int i; - - if (skip_ioapic_setup) - return -1; - - for (i = 0; i < mp_irq_entries; i++) - if (mp_irqs[i].mpc_irqtype == mp_INT && - mp_irqs[i].mpc_srcbusirq == bus_irq) - break; - if (i >= mp_irq_entries) - return -1; - - *trigger = irq_trigger(i); - *polarity = irq_polarity(i); - return 0; -} - #endif /* CONFIG_ACPI */ static int __init parse_disable_timer_pin_1(char *arg) diff --git a/trunk/arch/x86/kernel/io_apic_64.c b/trunk/arch/x86/kernel/io_apic_64.c index 435a8c9b55f8..953328b55a30 100644 --- a/trunk/arch/x86/kernel/io_apic_64.c +++ b/trunk/arch/x86/kernel/io_apic_64.c @@ -546,7 +546,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin) #define default_PCI_trigger(idx) (1) #define default_PCI_polarity(idx) (1) -static int MPBIOS_polarity(int idx) +static int __init MPBIOS_polarity(int idx) { int bus = mp_irqs[idx].mpc_srcbus; int polarity; @@ -2222,28 +2222,9 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int triggering, int p return 0; } - -int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity) -{ - int i; - - if (skip_ioapic_setup) - return -1; - - for (i = 0; i < mp_irq_entries; i++) - if (mp_irqs[i].mpc_irqtype == mp_INT && - mp_irqs[i].mpc_srcbusirq == bus_irq) - break; - if (i >= mp_irq_entries) - return -1; - - *trigger = irq_trigger(i); - *polarity = irq_polarity(i); - return 0; -} - #endif /* CONFIG_ACPI */ + /* * This function currently is only a helper for the i386 smp boot process where * we need to reprogram the ioredtbls to cater for the cpus which have come online @@ -2279,4 +2260,3 @@ void __init setup_ioapic_dest(void) } } #endif - diff --git a/trunk/arch/x86/kernel/kprobes_64.c b/trunk/arch/x86/kernel/kprobes_64.c index 0c467644589c..3db3611933d8 100644 --- a/trunk/arch/x86/kernel/kprobes_64.c +++ b/trunk/arch/x86/kernel/kprobes_64.c @@ -58,7 +58,7 @@ const int kretprobe_blacklist_size = ARRAY_SIZE(kretprobe_blacklist); /* * returns non-zero if opcode modifies the interrupt flag. */ -static int __kprobes is_IF_modifier(kprobe_opcode_t *insn) +static __always_inline int is_IF_modifier(kprobe_opcode_t *insn) { switch (*insn) { case 0xfa: /* cli */ diff --git a/trunk/arch/x86/kernel/nmi_32.c b/trunk/arch/x86/kernel/nmi_32.c index f5cc47c60b13..600fd404e440 100644 --- a/trunk/arch/x86/kernel/nmi_32.c +++ b/trunk/arch/x86/kernel/nmi_32.c @@ -25,7 +25,6 @@ #include #include -#include #include "mach_traps.h" @@ -84,7 +83,7 @@ static int __init check_nmi_watchdog(void) prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL); if (!prev_nmi_count) - goto error; + return -1; printk(KERN_INFO "Testing NMI watchdog ... "); @@ -118,7 +117,7 @@ static int __init check_nmi_watchdog(void) if (!atomic_read(&nmi_active)) { kfree(prev_nmi_count); atomic_set(&nmi_active, -1); - goto error; + return -1; } printk("OK.\n"); @@ -129,10 +128,6 @@ static int __init check_nmi_watchdog(void) kfree(prev_nmi_count); return 0; -error: - timer_ack = !cpu_has_tsc; - - return -1; } /* This needs to happen later in boot so counters are working */ late_initcall(check_nmi_watchdog); diff --git a/trunk/arch/x86/kernel/paravirt_32.c b/trunk/arch/x86/kernel/paravirt_32.c index f5000799f8ef..6a80d67c2121 100644 --- a/trunk/arch/x86/kernel/paravirt_32.c +++ b/trunk/arch/x86/kernel/paravirt_32.c @@ -465,8 +465,8 @@ struct pv_mmu_ops pv_mmu_ops = { }; EXPORT_SYMBOL_GPL(pv_time_ops); -EXPORT_SYMBOL (pv_cpu_ops); -EXPORT_SYMBOL (pv_mmu_ops); +EXPORT_SYMBOL_GPL(pv_cpu_ops); +EXPORT_SYMBOL_GPL(pv_mmu_ops); EXPORT_SYMBOL_GPL(pv_apic_ops); EXPORT_SYMBOL_GPL(pv_info); EXPORT_SYMBOL (pv_irq_ops); diff --git a/trunk/arch/x86/kernel/pci-dma_64.c b/trunk/arch/x86/kernel/pci-dma_64.c index 5552d23d23c2..aa805b11b24f 100644 --- a/trunk/arch/x86/kernel/pci-dma_64.c +++ b/trunk/arch/x86/kernel/pci-dma_64.c @@ -12,7 +12,7 @@ #include #include -int iommu_merge __read_mostly = 0; +int iommu_merge __read_mostly = 1; EXPORT_SYMBOL(iommu_merge); dma_addr_t bad_dma_address __read_mostly; diff --git a/trunk/arch/x86/kernel/traps_32.c b/trunk/arch/x86/kernel/traps_32.c index ef6010262597..298d13ed3ab3 100644 --- a/trunk/arch/x86/kernel/traps_32.c +++ b/trunk/arch/x86/kernel/traps_32.c @@ -283,11 +283,6 @@ void dump_stack(void) { unsigned long stack; - printk("Pid: %d, comm: %.20s %s %s %.*s\n", - current->pid, current->comm, print_tainted(), - init_utsname()->release, - (int)strcspn(init_utsname()->version, " "), - init_utsname()->version); show_trace(current, NULL, &stack); } @@ -833,8 +828,6 @@ fastcall void __kprobes do_debug(struct pt_regs * regs, long error_code) unsigned int condition; struct task_struct *tsk = current; - trace_hardirqs_fixup(); - get_debugreg(condition, 6); if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code, diff --git a/trunk/arch/x86/kernel/traps_64.c b/trunk/arch/x86/kernel/traps_64.c index d11525ad81b4..4a6bd4965f56 100644 --- a/trunk/arch/x86/kernel/traps_64.c +++ b/trunk/arch/x86/kernel/traps_64.c @@ -31,7 +31,6 @@ #include #include #include -#include #if defined(CONFIG_EDAC) #include @@ -401,12 +400,6 @@ void show_stack(struct task_struct *tsk, unsigned long * rsp) void dump_stack(void) { unsigned long dummy; - - printk("Pid: %d, comm: %.20s %s %s %.*s\n", - current->pid, current->comm, print_tainted(), - init_utsname()->release, - (int)strcspn(init_utsname()->version, " "), - init_utsname()->version); show_trace(NULL, NULL, &dummy); } @@ -853,8 +846,6 @@ asmlinkage void __kprobes do_debug(struct pt_regs * regs, struct task_struct *tsk = current; siginfo_t info; - trace_hardirqs_fixup(); - get_debugreg(condition, 6); if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code, diff --git a/trunk/arch/x86/lguest/Kconfig b/trunk/arch/x86/lguest/Kconfig index 19626ace0f50..c4dffbeea5e1 100644 --- a/trunk/arch/x86/lguest/Kconfig +++ b/trunk/arch/x86/lguest/Kconfig @@ -2,7 +2,6 @@ config LGUEST_GUEST bool "Lguest guest support" select PARAVIRT depends on !X86_PAE - depends on !(X86_VISWS || X86_VOYAGER) select VIRTIO select VIRTIO_RING select VIRTIO_CONSOLE diff --git a/trunk/arch/x86/mm/init_64.c b/trunk/arch/x86/mm/init_64.c index 0f9c8c890658..a7308b2cd058 100644 --- a/trunk/arch/x86/mm/init_64.c +++ b/trunk/arch/x86/mm/init_64.c @@ -345,7 +345,7 @@ static void __init find_early_table_space(unsigned long end) /* Setup the direct mapping of the physical memory at PAGE_OFFSET. This runs before bootmem is initialized and gets pages directly from the physical memory. To access them they are temporarily mapped. */ -void __init_refok init_memory_mapping(unsigned long start, unsigned long end) +void __meminit init_memory_mapping(unsigned long start, unsigned long end) { unsigned long next; diff --git a/trunk/arch/x86/pci/acpi.c b/trunk/arch/x86/pci/acpi.c index 0234f2831bf3..7e35078673a4 100644 --- a/trunk/arch/x86/pci/acpi.c +++ b/trunk/arch/x86/pci/acpi.c @@ -13,7 +13,7 @@ static int __devinit can_skip_ioresource_align(const struct dmi_system_id *d) return 0; } -static struct dmi_system_id acpi_pciprobe_dmi_table[] __devinitdata = { +static struct dmi_system_id acpi_pciprobe_dmi_table[] = { /* * Systems where PCI IO resource ISA alignment can be skipped * when the ISA enable bit in the bridge control is not set diff --git a/trunk/arch/x86/pci/common.c b/trunk/arch/x86/pci/common.c index 862746390666..f4386990b150 100644 --- a/trunk/arch/x86/pci/common.c +++ b/trunk/arch/x86/pci/common.c @@ -315,22 +315,6 @@ static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = { }, }, #endif - { - .callback = set_bf_sort, - .ident = "HP ProLiant DL385 G2", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "HP"), - DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL385 G2"), - }, - }, - { - .callback = set_bf_sort, - .ident = "HP ProLiant DL585 G2", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "HP"), - DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL585 G2"), - }, - }, {} }; diff --git a/trunk/arch/x86/xen/mmu.c b/trunk/arch/x86/xen/mmu.c index 0ac6c5dc49ba..b2e32f9d0071 100644 --- a/trunk/arch/x86/xen/mmu.c +++ b/trunk/arch/x86/xen/mmu.c @@ -244,8 +244,6 @@ pte_t xen_make_pte(unsigned long long pte) if (pte & 1) pte = phys_to_machine(XPADDR(pte)).maddr; - pte &= ~_PAGE_PCD; - return (pte_t){ pte, pte >> 32 }; } @@ -293,8 +291,6 @@ pte_t xen_make_pte(unsigned long pte) if (pte & _PAGE_PRESENT) pte = phys_to_machine(XPADDR(pte)).maddr; - pte &= ~_PAGE_PCD; - return (pte_t){ pte }; } diff --git a/trunk/block/blktrace.c b/trunk/block/blktrace.c index 498a0a54a6aa..d00ac3993c18 100644 --- a/trunk/block/blktrace.c +++ b/trunk/block/blktrace.c @@ -202,7 +202,6 @@ static void blk_remove_tree(struct dentry *dir) static struct dentry *blk_create_tree(const char *blk_name) { struct dentry *dir = NULL; - int created = 0; mutex_lock(&blk_tree_mutex); @@ -210,17 +209,13 @@ static struct dentry *blk_create_tree(const char *blk_name) blk_tree_root = debugfs_create_dir("block", NULL); if (!blk_tree_root) goto err; - created = 1; } dir = debugfs_create_dir(blk_name, blk_tree_root); if (dir) root_users++; - else { - /* Delete root only if we created it */ - if (created) - blk_remove_root(); - } + else + blk_remove_root(); err: mutex_unlock(&blk_tree_mutex); diff --git a/trunk/block/genhd.c b/trunk/block/genhd.c index f2ac914160d1..e609996f2e76 100644 --- a/trunk/block/genhd.c +++ b/trunk/block/genhd.c @@ -715,7 +715,6 @@ struct gendisk *alloc_disk_node(int minors, int node_id) disk->part = kmalloc_node(size, GFP_KERNEL | __GFP_ZERO, node_id); if (!disk->part) { - free_disk_stats(disk); kfree(disk); return NULL; } diff --git a/trunk/block/ll_rw_blk.c b/trunk/block/ll_rw_blk.c index 8b919940b2ab..3b927be03850 100644 --- a/trunk/block/ll_rw_blk.c +++ b/trunk/block/ll_rw_blk.c @@ -4080,7 +4080,23 @@ static ssize_t queue_max_hw_sectors_show(struct request_queue *q, char *page) return queue_var_show(max_hw_sectors_kb, (page)); } +static ssize_t queue_max_segments_show(struct request_queue *q, char *page) +{ + return queue_var_show(q->max_phys_segments, page); +} + +static ssize_t queue_max_segments_store(struct request_queue *q, + const char *page, size_t count) +{ + unsigned long segments; + ssize_t ret = queue_var_store(&segments, page, count); + spin_lock_irq(q->queue_lock); + q->max_phys_segments = segments; + spin_unlock_irq(q->queue_lock); + + return ret; +} static struct queue_sysfs_entry queue_requests_entry = { .attr = {.name = "nr_requests", .mode = S_IRUGO | S_IWUSR }, .show = queue_requests_show, @@ -4104,6 +4120,12 @@ static struct queue_sysfs_entry queue_max_hw_sectors_entry = { .show = queue_max_hw_sectors_show, }; +static struct queue_sysfs_entry queue_max_segments_entry = { + .attr = {.name = "max_segments", .mode = S_IRUGO | S_IWUSR }, + .show = queue_max_segments_show, + .store = queue_max_segments_store, +}; + static struct queue_sysfs_entry queue_iosched_entry = { .attr = {.name = "scheduler", .mode = S_IRUGO | S_IWUSR }, .show = elv_iosched_show, @@ -4115,6 +4137,7 @@ static struct attribute *default_attrs[] = { &queue_ra_entry.attr, &queue_max_hw_sectors_entry.attr, &queue_max_sectors_entry.attr, + &queue_max_segments_entry.attr, &queue_iosched_entry.attr, NULL, }; diff --git a/trunk/crypto/algapi.c b/trunk/crypto/algapi.c index 8383282de1dd..8ff8c2656d9c 100644 --- a/trunk/crypto/algapi.c +++ b/trunk/crypto/algapi.c @@ -95,9 +95,6 @@ static void crypto_remove_spawn(struct crypto_spawn *spawn, return; inst->alg.cra_flags |= CRYPTO_ALG_DEAD; - if (hlist_unhashed(&inst->list)) - return; - if (!tmpl || !crypto_tmpl_get(tmpl)) return; @@ -338,6 +335,9 @@ int crypto_register_instance(struct crypto_template *tmpl, LIST_HEAD(list); int err = -EINVAL; + if (inst->alg.cra_destroy) + goto err; + err = crypto_check_alg(&inst->alg); if (err) goto err; diff --git a/trunk/crypto/authenc.c b/trunk/crypto/authenc.c index 126a529b496d..0b29a6ae673d 100644 --- a/trunk/crypto/authenc.c +++ b/trunk/crypto/authenc.c @@ -84,8 +84,8 @@ static int crypto_authenc_hash(struct aead_request *req) .tfm = auth, }; u8 *hash = aead_request_ctx(req); - struct scatterlist *dst = req->dst; - unsigned int cryptlen = req->cryptlen; + struct scatterlist *dst; + unsigned int cryptlen; int err; hash = (u8 *)ALIGN((unsigned long)hash + crypto_hash_alignmask(auth), @@ -100,6 +100,8 @@ static int crypto_authenc_hash(struct aead_request *req) if (err) goto auth_unlock; + cryptlen = req->cryptlen; + dst = req->dst; err = crypto_hash_update(&desc, dst, cryptlen); if (err) goto auth_unlock; @@ -157,8 +159,8 @@ static int crypto_authenc_verify(struct aead_request *req) }; u8 *ohash = aead_request_ctx(req); u8 *ihash; - struct scatterlist *src = req->src; - unsigned int cryptlen = req->cryptlen; + struct scatterlist *src; + unsigned int cryptlen; unsigned int authsize; int err; @@ -175,6 +177,8 @@ static int crypto_authenc_verify(struct aead_request *req) if (err) goto auth_unlock; + cryptlen = req->cryptlen; + src = req->src; err = crypto_hash_update(&desc, src, cryptlen); if (err) goto auth_unlock; diff --git a/trunk/drivers/acpi/Kconfig b/trunk/drivers/acpi/Kconfig index b9f923ef173d..087a7028ae84 100644 --- a/trunk/drivers/acpi/Kconfig +++ b/trunk/drivers/acpi/Kconfig @@ -50,6 +50,7 @@ config ACPI_SLEEP config ACPI_PROCFS bool "Deprecated /proc/acpi files" depends on PROC_FS + default y ---help--- For backwards compatibility, this option allows deprecated /proc/acpi/ files to exist, even when @@ -60,6 +61,7 @@ config ACPI_PROCFS /proc/acpi/info (/sys/modules/acpi/parameters/acpica_version) /proc/acpi/dsdt (/sys/firmware/acpi/tables/DSDT) /proc/acpi/fadt (/sys/firmware/acpi/tables/FACP) + /proc/acpi/battery (/sys/class/power_supply) /proc/acpi/debug_layer (/sys/module/acpi/parameters/debug_layer) /proc/acpi/debug_level (/sys/module/acpi/parameters/debug_level) @@ -67,21 +69,7 @@ config ACPI_PROCFS and functions which do not yet exist in /sys. Say N to delete /proc/acpi/ files that have moved to /sys/ -config ACPI_PROCFS_POWER - bool "Deprecated power /proc/acpi folders" - depends on PROC_FS - default y - ---help--- - For backwards compatibility, this option allows - deprecated power /proc/acpi/ folders to exist, even when - they have been replaced by functions in /sys. - The deprecated folders (and their replacements) include: - /proc/acpi/battery/* (/sys/class/power_supply/*) - /proc/acpi/ac_adapter/* (sys/class/power_supply/*) - This option has no effect on /proc/acpi/ folders - and functions, which do not yet exist in /sys - - Say N to delete power /proc/acpi/ folders that have moved to /sys/ + config ACPI_PROC_EVENT bool "Deprecated /proc/acpi/event support" depends on PROC_FS diff --git a/trunk/drivers/acpi/Makefile b/trunk/drivers/acpi/Makefile index 456446f90077..54e3ab0e5fc0 100644 --- a/trunk/drivers/acpi/Makefile +++ b/trunk/drivers/acpi/Makefile @@ -58,6 +58,6 @@ obj-$(CONFIG_ACPI_NUMA) += numa.o obj-$(CONFIG_ACPI_ASUS) += asus_acpi.o obj-$(CONFIG_ACPI_TOSHIBA) += toshiba_acpi.o obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug.o -obj-$(CONFIG_ACPI_PROCFS_POWER) += cm_sbs.o +obj-y += cm_sbs.o obj-$(CONFIG_ACPI_SBS) += sbs.o obj-$(CONFIG_ACPI_SBS) += sbshc.o diff --git a/trunk/drivers/acpi/ac.c b/trunk/drivers/acpi/ac.c index 76ed4f52bebd..30238f6ff232 100644 --- a/trunk/drivers/acpi/ac.c +++ b/trunk/drivers/acpi/ac.c @@ -27,7 +27,7 @@ #include #include #include -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS #include #include #endif @@ -51,7 +51,7 @@ MODULE_AUTHOR("Paul Diefenbaugh"); MODULE_DESCRIPTION("ACPI AC Adapter Driver"); MODULE_LICENSE("GPL"); -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS extern struct proc_dir_entry *acpi_lock_ac_dir(void); extern void *acpi_unlock_ac_dir(struct proc_dir_entry *acpi_ac_dir); static int acpi_ac_open_fs(struct inode *inode, struct file *file); @@ -86,7 +86,7 @@ struct acpi_ac { #define to_acpi_ac(x) container_of(x, struct acpi_ac, charger); -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS static const struct file_operations acpi_ac_fops = { .open = acpi_ac_open_fs, .read = seq_read, @@ -136,7 +136,7 @@ static int acpi_ac_get_state(struct acpi_ac *ac) return 0; } -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS /* -------------------------------------------------------------------------- FS Interface (/proc) -------------------------------------------------------------------------- */ @@ -275,7 +275,7 @@ static int acpi_ac_add(struct acpi_device *device) if (result) goto end; -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS result = acpi_ac_add_fs(device); #endif if (result) @@ -300,7 +300,7 @@ static int acpi_ac_add(struct acpi_device *device) end: if (result) { -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS acpi_ac_remove_fs(device); #endif kfree(ac); @@ -339,7 +339,7 @@ static int acpi_ac_remove(struct acpi_device *device, int type) ACPI_ALL_NOTIFY, acpi_ac_notify); if (ac->charger.dev) power_supply_unregister(&ac->charger); -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS acpi_ac_remove_fs(device); #endif @@ -355,7 +355,7 @@ static int __init acpi_ac_init(void) if (acpi_disabled) return -ENODEV; -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS acpi_ac_dir = acpi_lock_ac_dir(); if (!acpi_ac_dir) return -ENODEV; @@ -363,7 +363,7 @@ static int __init acpi_ac_init(void) result = acpi_bus_register_driver(&acpi_ac_driver); if (result < 0) { -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS acpi_unlock_ac_dir(acpi_ac_dir); #endif return -ENODEV; @@ -377,7 +377,7 @@ static void __exit acpi_ac_exit(void) acpi_bus_unregister_driver(&acpi_ac_driver); -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS acpi_unlock_ac_dir(acpi_ac_dir); #endif diff --git a/trunk/drivers/acpi/battery.c b/trunk/drivers/acpi/battery.c index 7d6be23eff89..192c244f6190 100644 --- a/trunk/drivers/acpi/battery.c +++ b/trunk/drivers/acpi/battery.c @@ -31,7 +31,7 @@ #include #include -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS #include #include #include @@ -63,7 +63,7 @@ static unsigned int cache_time = 1000; module_param(cache_time, uint, 0644); MODULE_PARM_DESC(cache_time, "cache time in milliseconds"); -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS extern struct proc_dir_entry *acpi_lock_battery_dir(void); extern void *acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir); @@ -153,8 +153,6 @@ static int acpi_battery_get_property(struct power_supply *psy, val->intval = POWER_SUPPLY_STATUS_CHARGING; else if (battery->state == 0) val->intval = POWER_SUPPLY_STATUS_FULL; - else - val->intval = POWER_SUPPLY_STATUS_UNKNOWN; break; case POWER_SUPPLY_PROP_PRESENT: val->intval = acpi_battery_present(battery); @@ -223,7 +221,7 @@ static enum power_supply_property energy_battery_props[] = { POWER_SUPPLY_PROP_MANUFACTURER, }; -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS inline char *acpi_battery_units(struct acpi_battery *battery) { return (battery->power_unit)?"mA":"mW"; @@ -481,7 +479,7 @@ static int acpi_battery_update(struct acpi_battery *battery) FS Interface (/proc) -------------------------------------------------------------------------- */ -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS static struct proc_dir_entry *acpi_battery_dir; static int acpi_battery_print_info(struct seq_file *seq, int result) @@ -788,7 +786,7 @@ static int acpi_battery_add(struct acpi_device *device) acpi_driver_data(device) = battery; mutex_init(&battery->lock); acpi_battery_update(battery); -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS result = acpi_battery_add_fs(device); if (result) goto end; @@ -806,7 +804,7 @@ static int acpi_battery_add(struct acpi_device *device) device->status.battery_present ? "present" : "absent"); end: if (result) { -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS acpi_battery_remove_fs(device); #endif kfree(battery); @@ -825,7 +823,7 @@ static int acpi_battery_remove(struct acpi_device *device, int type) status = acpi_remove_notify_handler(device->handle, ACPI_ALL_NOTIFY, acpi_battery_notify); -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS acpi_battery_remove_fs(device); #endif sysfs_remove_battery(battery); @@ -861,13 +859,13 @@ static int __init acpi_battery_init(void) { if (acpi_disabled) return -ENODEV; -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS acpi_battery_dir = acpi_lock_battery_dir(); if (!acpi_battery_dir) return -ENODEV; #endif if (acpi_bus_register_driver(&acpi_battery_driver) < 0) { -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS acpi_unlock_battery_dir(acpi_battery_dir); #endif return -ENODEV; @@ -878,7 +876,7 @@ static int __init acpi_battery_init(void) static void __exit acpi_battery_exit(void) { acpi_bus_unregister_driver(&acpi_battery_driver); -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS acpi_unlock_battery_dir(acpi_battery_dir); #endif } diff --git a/trunk/drivers/acpi/ec.c b/trunk/drivers/acpi/ec.c index d411017f8c06..06b78e5e33a1 100644 --- a/trunk/drivers/acpi/ec.c +++ b/trunk/drivers/acpi/ec.c @@ -47,9 +47,6 @@ #undef PREFIX #define PREFIX "ACPI: EC: " -/* Uncomment next line to get verbose print outs*/ -/* #define DEBUG */ - /* EC status register */ #define ACPI_EC_FLAG_OBF 0x01 /* Output buffer full */ #define ACPI_EC_FLAG_IBF 0x02 /* Input buffer full */ @@ -78,10 +75,7 @@ enum { EC_FLAGS_WAIT_GPE = 0, /* Don't check status until GPE arrives */ EC_FLAGS_QUERY_PENDING, /* Query is pending */ EC_FLAGS_GPE_MODE, /* Expect GPE to be sent for status change */ - EC_FLAGS_NO_ADDRESS_GPE, /* Expect GPE only for non-address event */ - EC_FLAGS_ADDRESS, /* Address is being written */ - EC_FLAGS_NO_WDATA_GPE, /* Don't expect WDATA GPE event */ - EC_FLAGS_WDATA, /* Data is being written */ + EC_FLAGS_ONLY_IBF_GPE, /* Expect GPE only for IBF = 0 event */ }; static int acpi_ec_remove(struct acpi_device *device, int type); @@ -137,27 +131,21 @@ static struct acpi_ec { static inline u8 acpi_ec_read_status(struct acpi_ec *ec) { - u8 x = inb(ec->command_addr); - pr_debug(PREFIX "---> status = 0x%2x\n", x); - return x; + return inb(ec->command_addr); } static inline u8 acpi_ec_read_data(struct acpi_ec *ec) { - u8 x = inb(ec->data_addr); - pr_debug(PREFIX "---> data = 0x%2x\n", x); return inb(ec->data_addr); } static inline void acpi_ec_write_cmd(struct acpi_ec *ec, u8 command) { - pr_debug(PREFIX "<--- command = 0x%2x\n", command); outb(command, ec->command_addr); } static inline void acpi_ec_write_data(struct acpi_ec *ec, u8 data) { - pr_debug(PREFIX "<--- data = 0x%2x\n", data); outb(data, ec->data_addr); } @@ -178,54 +166,38 @@ static inline int acpi_ec_check_status(struct acpi_ec *ec, enum ec_event event) static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll) { - int ret = 0; - if (unlikely(test_bit(EC_FLAGS_ADDRESS, &ec->flags) && - test_bit(EC_FLAGS_NO_ADDRESS_GPE, &ec->flags))) - force_poll = 1; - if (unlikely(test_bit(EC_FLAGS_WDATA, &ec->flags) && - test_bit(EC_FLAGS_NO_WDATA_GPE, &ec->flags))) - force_poll = 1; if (likely(test_bit(EC_FLAGS_GPE_MODE, &ec->flags)) && likely(!force_poll)) { if (wait_event_timeout(ec->wait, acpi_ec_check_status(ec, event), msecs_to_jiffies(ACPI_EC_DELAY))) - goto end; + return 0; clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags); if (acpi_ec_check_status(ec, event)) { - if (test_bit(EC_FLAGS_ADDRESS, &ec->flags)) { - /* miss address GPE, don't expect it anymore */ - pr_info(PREFIX "missing address confirmation, " - "don't expect it any longer.\n"); - set_bit(EC_FLAGS_NO_ADDRESS_GPE, &ec->flags); - } else if (test_bit(EC_FLAGS_WDATA, &ec->flags)) { - /* miss write data GPE, don't expect it */ - pr_info(PREFIX "missing write data confirmation, " - "don't expect it any longer.\n"); - set_bit(EC_FLAGS_NO_WDATA_GPE, &ec->flags); + if (event == ACPI_EC_EVENT_OBF_1) { + /* miss OBF = 1 GPE, don't expect it anymore */ + printk(KERN_INFO PREFIX "missing OBF_1 confirmation," + "switching to degraded mode.\n"); + set_bit(EC_FLAGS_ONLY_IBF_GPE, &ec->flags); } else { /* missing GPEs, switch back to poll mode */ - if (printk_ratelimit()) - pr_info(PREFIX "missing confirmations, " - "switch off interrupt mode.\n"); + printk(KERN_INFO PREFIX "missing IBF_1 confirmations," + "switch off interrupt mode.\n"); clear_bit(EC_FLAGS_GPE_MODE, &ec->flags); } - goto end; + return 0; } } else { unsigned long delay = jiffies + msecs_to_jiffies(ACPI_EC_DELAY); clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags); while (time_before(jiffies, delay)) { if (acpi_ec_check_status(ec, event)) - goto end; + return 0; } } - pr_err(PREFIX "acpi_ec_wait timeout," + printk(KERN_ERR PREFIX "acpi_ec_wait timeout," " status = %d, expect_event = %d\n", acpi_ec_read_status(ec), event); - ret = -ETIME; - end: - clear_bit(EC_FLAGS_ADDRESS, &ec->flags); - return ret; + return -ETIME; } static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, u8 command, @@ -236,26 +208,22 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, u8 command, int result = 0; set_bit(EC_FLAGS_WAIT_GPE, &ec->flags); acpi_ec_write_cmd(ec, command); - pr_debug(PREFIX "transaction start\n"); + for (; wdata_len > 0; --wdata_len) { result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, force_poll); if (result) { - pr_err(PREFIX + printk(KERN_ERR PREFIX "write_cmd timeout, command = %d\n", command); goto end; } - /* mark the address byte written to EC */ - if (rdata_len + wdata_len > 1) - set_bit(EC_FLAGS_ADDRESS, &ec->flags); set_bit(EC_FLAGS_WAIT_GPE, &ec->flags); acpi_ec_write_data(ec, *(wdata++)); } if (!rdata_len) { - set_bit(EC_FLAGS_WDATA, &ec->flags); result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, force_poll); if (result) { - pr_err(PREFIX + printk(KERN_ERR PREFIX "finish-write timeout, command = %d\n", command); goto end; } @@ -263,9 +231,12 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, u8 command, clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags); for (; rdata_len > 0; --rdata_len) { + if (test_bit(EC_FLAGS_ONLY_IBF_GPE, &ec->flags)) + force_poll = 1; result = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF_1, force_poll); if (result) { - pr_err(PREFIX "read timeout, command = %d\n", command); + printk(KERN_ERR PREFIX "read timeout, command = %d\n", + command); goto end; } /* Don't expect GPE after last read */ @@ -274,7 +245,6 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, u8 command, *(rdata++) = acpi_ec_read_data(ec); } end: - pr_debug(PREFIX "transaction end\n"); return result; } @@ -303,8 +273,8 @@ static int acpi_ec_transaction(struct acpi_ec *ec, u8 command, status = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, 0); if (status) { - pr_err(PREFIX "input buffer is not empty, " - "aborting transaction\n"); + printk(KERN_ERR PREFIX + "input buffer is not empty, aborting transaction\n"); goto end; } @@ -518,7 +488,6 @@ static u32 acpi_ec_gpe_handler(void *data) acpi_status status = AE_OK; struct acpi_ec *ec = data; - pr_debug(PREFIX "~~~> interrupt\n"); clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags); if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags)) wake_up(&ec->wait); @@ -529,9 +498,8 @@ static u32 acpi_ec_gpe_handler(void *data) acpi_ec_gpe_query, ec); } else if (unlikely(!test_bit(EC_FLAGS_GPE_MODE, &ec->flags))) { /* this is non-query, must be confirmation */ - if (printk_ratelimit()) - pr_info(PREFIX "non-query interrupt received," - " switching to interrupt mode\n"); + printk(KERN_INFO PREFIX "non-query interrupt received," + " switching to interrupt mode\n"); set_bit(EC_FLAGS_GPE_MODE, &ec->flags); } @@ -733,10 +701,10 @@ static void ec_remove_handlers(struct acpi_ec *ec) { if (ACPI_FAILURE(acpi_remove_address_space_handler(ec->handle, ACPI_ADR_SPACE_EC, &acpi_ec_space_handler))) - pr_err(PREFIX "failed to remove space handler\n"); + printk(KERN_ERR PREFIX "failed to remove space handler\n"); if (ACPI_FAILURE(acpi_remove_gpe_handler(NULL, ec->gpe, &acpi_ec_gpe_handler))) - pr_err(PREFIX "failed to remove gpe handler\n"); + printk(KERN_ERR PREFIX "failed to remove gpe handler\n"); ec->handlers_installed = 0; } @@ -779,9 +747,9 @@ static int acpi_ec_add(struct acpi_device *device) first_ec = ec; acpi_driver_data(device) = ec; acpi_ec_add_fs(device); - pr_info(PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n", + printk(KERN_INFO PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n", ec->gpe, ec->command_addr, ec->data_addr); - pr_info(PREFIX "driver started in %s mode\n", + printk(KERN_INFO PREFIX "driver started in %s mode\n", (test_bit(EC_FLAGS_GPE_MODE, &ec->flags))?"interrupt":"poll"); return 0; } @@ -907,26 +875,18 @@ int __init acpi_ec_ecdt_probe(void) status = acpi_get_table(ACPI_SIG_ECDT, 1, (struct acpi_table_header **)&ecdt_ptr); if (ACPI_SUCCESS(status)) { - pr_info(PREFIX "EC description table is found, configuring boot EC\n"); + printk(KERN_INFO PREFIX "EC description table is found, configuring boot EC\n"); boot_ec->command_addr = ecdt_ptr->control.address; boot_ec->data_addr = ecdt_ptr->data.address; boot_ec->gpe = ecdt_ptr->gpe; boot_ec->handle = ACPI_ROOT_OBJECT; } else { - /* This workaround is needed only on some broken machines, - * which require early EC, but fail to provide ECDT */ - acpi_handle x; printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n"); status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device, boot_ec, NULL); /* Check that acpi_get_devices actually find something */ if (ACPI_FAILURE(status) || !boot_ec->handle) goto error; - /* We really need to limit this workaround, the only ASUS, - * which needs it, has fake EC._INI method, so use it as flag. - */ - if (ACPI_FAILURE(acpi_get_handle(boot_ec->handle, "_INI", &x))) - goto error; } ret = ec_install_handlers(boot_ec); diff --git a/trunk/drivers/acpi/osl.c b/trunk/drivers/acpi/osl.c index e3a673a00845..aabc6ca4a81c 100644 --- a/trunk/drivers/acpi/osl.c +++ b/trunk/drivers/acpi/osl.c @@ -387,14 +387,17 @@ acpi_status acpi_os_read_port(acpi_io_address port, u32 * value, u32 width) if (!value) value = &dummy; - *value = 0; - if (width <= 8) { + switch (width) { + case 8: *(u8 *) value = inb(port); - } else if (width <= 16) { + break; + case 16: *(u16 *) value = inw(port); - } else if (width <= 32) { + break; + case 32: *(u32 *) value = inl(port); - } else { + break; + default: BUG(); } @@ -405,13 +408,17 @@ EXPORT_SYMBOL(acpi_os_read_port); acpi_status acpi_os_write_port(acpi_io_address port, u32 value, u32 width) { - if (width <= 8) { + switch (width) { + case 8: outb(value, port); - } else if (width <= 16) { + break; + case 16: outw(value, port); - } else if (width <= 32) { + break; + case 32: outl(value, port); - } else { + break; + default: BUG(); } diff --git a/trunk/drivers/acpi/processor_core.c b/trunk/drivers/acpi/processor_core.c index e48ee4f8749f..235a51e328c3 100644 --- a/trunk/drivers/acpi/processor_core.c +++ b/trunk/drivers/acpi/processor_core.c @@ -494,7 +494,7 @@ static int get_cpu_id(acpi_handle handle, u32 acpi_id) if (apic_id == -1) return apic_id; - for_each_possible_cpu(i) { + for (i = 0; i < NR_CPUS; ++i) { if (cpu_physical_id(i) == apic_id) return i; } @@ -612,6 +612,12 @@ static int acpi_processor_get_info(struct acpi_processor *pr, unsigned has_uid) request_region(pr->throttling.address, 6, "ACPI CPU throttle"); } +#ifdef CONFIG_CPU_FREQ + acpi_processor_ppc_has_changed(pr); +#endif + acpi_processor_get_throttling_info(pr); + acpi_processor_get_limit_info(pr); + return 0; } @@ -632,7 +638,7 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device) return 0; } - BUG_ON((pr->id >= nr_cpu_ids) || (pr->id < 0)); + BUG_ON((pr->id >= NR_CPUS) || (pr->id < 0)); /* * Buggy BIOS check @@ -641,7 +647,7 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device) */ if (processor_device_array[pr->id] != NULL && processor_device_array[pr->id] != device) { - printk(KERN_WARNING "BIOS reported wrong ACPI id " + printk(KERN_WARNING "BIOS reported wrong ACPI id" "for the processor\n"); return -ENODEV; } @@ -659,12 +665,6 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device) /* _PDC call should be done before doing anything else (if reqd.). */ arch_acpi_processor_init_pdc(pr); acpi_processor_set_pdc(pr); -#ifdef CONFIG_CPU_FREQ - acpi_processor_ppc_has_changed(pr); -#endif - acpi_processor_get_throttling_info(pr); - acpi_processor_get_limit_info(pr); - acpi_processor_power_init(pr, device); @@ -684,7 +684,7 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data) { struct acpi_processor *pr = data; struct acpi_device *device = NULL; - int saved; + if (!pr) return; @@ -694,10 +694,7 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data) switch (event) { case ACPI_PROCESSOR_NOTIFY_PERFORMANCE: - saved = pr->performance_platform_limit; acpi_processor_ppc_has_changed(pr); - if (saved == pr->performance_platform_limit) - break; acpi_bus_generate_proc_event(device, event, pr->performance_platform_limit); acpi_bus_generate_netlink_event(device->pnp.device_class, @@ -774,7 +771,7 @@ static int acpi_processor_remove(struct acpi_device *device, int type) pr = acpi_driver_data(device); - if (pr->id >= nr_cpu_ids) { + if (pr->id >= NR_CPUS) { kfree(pr); return 0; } @@ -845,7 +842,7 @@ int acpi_processor_device_add(acpi_handle handle, struct acpi_device **device) if (!pr) return -ENODEV; - if ((pr->id >= 0) && (pr->id < nr_cpu_ids)) { + if ((pr->id >= 0) && (pr->id < NR_CPUS)) { kobject_uevent(&(*device)->dev.kobj, KOBJ_ONLINE); } return 0; @@ -883,13 +880,13 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) break; } - if (pr->id >= 0 && (pr->id < nr_cpu_ids)) { + if (pr->id >= 0 && (pr->id < NR_CPUS)) { kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE); break; } result = acpi_processor_start(device); - if ((!result) && ((pr->id >= 0) && (pr->id < nr_cpu_ids))) { + if ((!result) && ((pr->id >= 0) && (pr->id < NR_CPUS))) { kobject_uevent(&device->dev.kobj, KOBJ_ONLINE); } else { printk(KERN_ERR PREFIX "Device [%s] failed to start\n", @@ -912,7 +909,7 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) return; } - if ((pr->id < nr_cpu_ids) && (cpu_present(pr->id))) + if ((pr->id < NR_CPUS) && (cpu_present(pr->id))) kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE); break; default: diff --git a/trunk/drivers/acpi/processor_idle.c b/trunk/drivers/acpi/processor_idle.c index b1fbee3f7fe1..f996d0e37689 100644 --- a/trunk/drivers/acpi/processor_idle.c +++ b/trunk/drivers/acpi/processor_idle.c @@ -197,19 +197,6 @@ static inline u32 ticks_elapsed_in_us(u32 t1, u32 t2) return PM_TIMER_TICKS_TO_US((0xFFFFFFFF - t1) + t2); } -static void acpi_safe_halt(void) -{ - current_thread_info()->status &= ~TS_POLLING; - /* - * TS_POLLING-cleared state must be visible before we - * test NEED_RESCHED: - */ - smp_mb(); - if (!need_resched()) - safe_halt(); - current_thread_info()->status |= TS_POLLING; -} - #ifndef CONFIG_CPU_IDLE static void @@ -252,6 +239,19 @@ acpi_processor_power_activate(struct acpi_processor *pr, return; } +static void acpi_safe_halt(void) +{ + current_thread_info()->status &= ~TS_POLLING; + /* + * TS_POLLING-cleared state must be visible before we + * test NEED_RESCHED: + */ + smp_mb(); + if (!need_resched()) + safe_halt(); + current_thread_info()->status |= TS_POLLING; +} + static atomic_t c3_cpu_count; /* Common C-state entry for C2, C3, .. */ @@ -1373,7 +1373,15 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev, if (pr->flags.bm_check) acpi_idle_update_bm_rld(pr, cx); - acpi_safe_halt(); + current_thread_info()->status &= ~TS_POLLING; + /* + * TS_POLLING-cleared state must be visible before we test + * NEED_RESCHED: + */ + smp_mb(); + if (!need_resched()) + safe_halt(); + current_thread_info()->status |= TS_POLLING; cx->usage++; @@ -1391,8 +1399,6 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, struct acpi_processor *pr; struct acpi_processor_cx *cx = cpuidle_get_statedata(state); u32 t1, t2; - int sleep_ticks = 0; - pr = processors[smp_processor_id()]; if (unlikely(!pr)) @@ -1422,8 +1428,6 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, ACPI_FLUSH_CPU_CACHE(); t1 = inl(acpi_gbl_FADT.xpm_timer_block.address); - /* Tell the scheduler that we are going deep-idle: */ - sched_clock_idle_sleep_event(); acpi_state_timer_broadcast(pr, cx, 1); acpi_idle_do_entry(cx); t2 = inl(acpi_gbl_FADT.xpm_timer_block.address); @@ -1432,10 +1436,6 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, /* TSC could halt in idle, so notify users */ mark_tsc_unstable("TSC halts in idle");; #endif - sleep_ticks = ticks_elapsed(t1, t2); - - /* Tell the scheduler how much we idled: */ - sched_clock_idle_wakeup_event(sleep_ticks*PM_TIMER_TICK_NS); local_irq_enable(); current_thread_info()->status |= TS_POLLING; @@ -1443,7 +1443,7 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, cx->usage++; acpi_state_timer_broadcast(pr, cx, 0); - cx->time += sleep_ticks; + cx->time += ticks_elapsed(t1, t2); return ticks_elapsed_in_us(t1, t2); } @@ -1463,8 +1463,6 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, struct acpi_processor *pr; struct acpi_processor_cx *cx = cpuidle_get_statedata(state); u32 t1, t2; - int sleep_ticks = 0; - pr = processors[smp_processor_id()]; if (unlikely(!pr)) @@ -1473,15 +1471,6 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, if (acpi_idle_suspend) return(acpi_idle_enter_c1(dev, state)); - if (acpi_idle_bm_check()) { - if (dev->safe_state) { - return dev->safe_state->enter(dev, dev->safe_state); - } else { - acpi_safe_halt(); - return 0; - } - } - local_irq_disable(); current_thread_info()->status &= ~TS_POLLING; /* @@ -1496,45 +1485,38 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, return 0; } - /* Tell the scheduler that we are going deep-idle: */ - sched_clock_idle_sleep_event(); /* * Must be done before busmaster disable as we might need to * access HPET ! */ acpi_state_timer_broadcast(pr, cx, 1); - acpi_idle_update_bm_rld(pr, cx); + if (acpi_idle_bm_check()) { + cx = pr->power.bm_state; + + acpi_idle_update_bm_rld(pr, cx); + + t1 = inl(acpi_gbl_FADT.xpm_timer_block.address); + acpi_idle_do_entry(cx); + t2 = inl(acpi_gbl_FADT.xpm_timer_block.address); + } else { + acpi_idle_update_bm_rld(pr, cx); - /* - * disable bus master - * bm_check implies we need ARB_DIS - * !bm_check implies we need cache flush - * bm_control implies whether we can do ARB_DIS - * - * That leaves a case where bm_check is set and bm_control is - * not set. In that case we cannot do much, we enter C3 - * without doing anything. - */ - if (pr->flags.bm_check && pr->flags.bm_control) { spin_lock(&c3_lock); c3_cpu_count++; /* Disable bus master arbitration when all CPUs are in C3 */ if (c3_cpu_count == num_online_cpus()) acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1); spin_unlock(&c3_lock); - } else if (!pr->flags.bm_check) { - ACPI_FLUSH_CPU_CACHE(); - } - t1 = inl(acpi_gbl_FADT.xpm_timer_block.address); - acpi_idle_do_entry(cx); - t2 = inl(acpi_gbl_FADT.xpm_timer_block.address); + t1 = inl(acpi_gbl_FADT.xpm_timer_block.address); + acpi_idle_do_entry(cx); + t2 = inl(acpi_gbl_FADT.xpm_timer_block.address); - /* Re-enable bus master arbitration */ - if (pr->flags.bm_check && pr->flags.bm_control) { spin_lock(&c3_lock); - acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0); + /* Re-enable bus master arbitration */ + if (c3_cpu_count == num_online_cpus()) + acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0); c3_cpu_count--; spin_unlock(&c3_lock); } @@ -1543,9 +1525,6 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, /* TSC could halt in idle, so notify users */ mark_tsc_unstable("TSC halts in idle"); #endif - sleep_ticks = ticks_elapsed(t1, t2); - /* Tell the scheduler how much we idled: */ - sched_clock_idle_wakeup_event(sleep_ticks*PM_TIMER_TICK_NS); local_irq_enable(); current_thread_info()->status |= TS_POLLING; @@ -1553,7 +1532,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, cx->usage++; acpi_state_timer_broadcast(pr, cx, 0); - cx->time += sleep_ticks; + cx->time += ticks_elapsed(t1, t2); return ticks_elapsed_in_us(t1, t2); } @@ -1605,14 +1584,12 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr) case ACPI_STATE_C1: state->flags |= CPUIDLE_FLAG_SHALLOW; state->enter = acpi_idle_enter_c1; - dev->safe_state = state; break; case ACPI_STATE_C2: state->flags |= CPUIDLE_FLAG_BALANCED; state->flags |= CPUIDLE_FLAG_TIME_VALID; state->enter = acpi_idle_enter_simple; - dev->safe_state = state; break; case ACPI_STATE_C3: @@ -1633,6 +1610,14 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr) if (!count) return -EINVAL; + /* find the deepest state that can handle active BM */ + if (pr->flags.bm_check) { + for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) + if (pr->power.states[i].type == ACPI_STATE_C3) + break; + pr->power.bm_state = &pr->power.states[i-1]; + } + return 0; } @@ -1673,7 +1658,6 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr, if (!first_run) { dmi_check_system(processor_power_dmi_table); - max_cstate = acpi_processor_cstate_check(max_cstate); if (max_cstate < ACPI_C_STATES_MAX) printk(KERN_NOTICE "ACPI: processor limited to max C-state %d\n", diff --git a/trunk/drivers/acpi/processor_throttling.c b/trunk/drivers/acpi/processor_throttling.c index c26c61fb36c3..0b8204e7082a 100644 --- a/trunk/drivers/acpi/processor_throttling.c +++ b/trunk/drivers/acpi/processor_throttling.c @@ -70,55 +70,7 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr) int acpi_processor_tstate_has_changed(struct acpi_processor *pr) { - int result = 0; - int throttling_limit; - int current_state; - struct acpi_processor_limit *limit; - int target_state; - - result = acpi_processor_get_platform_limit(pr); - if (result) { - /* Throttling Limit is unsupported */ - return result; - } - - throttling_limit = pr->throttling_platform_limit; - if (throttling_limit >= pr->throttling.state_count) { - /* Uncorrect Throttling Limit */ - return -EINVAL; - } - - current_state = pr->throttling.state; - if (current_state > throttling_limit) { - /* - * The current state can meet the requirement of - * _TPC limit. But it is reasonable that OSPM changes - * t-states from high to low for better performance. - * Of course the limit condition of thermal - * and user should be considered. - */ - limit = &pr->limit; - target_state = throttling_limit; - if (limit->thermal.tx > target_state) - target_state = limit->thermal.tx; - if (limit->user.tx > target_state) - target_state = limit->user.tx; - } else if (current_state == throttling_limit) { - /* - * Unnecessary to change the throttling state - */ - return 0; - } else { - /* - * If the current state is lower than the limit of _TPC, it - * will be forced to switch to the throttling state defined - * by throttling_platfor_limit. - * Because the previous state meets with the limit condition - * of thermal and user, it is unnecessary to check it again. - */ - target_state = throttling_limit; - } - return acpi_processor_set_throttling(pr, target_state); + return acpi_processor_get_platform_limit(pr); } /* @@ -131,7 +83,6 @@ static int acpi_processor_get_throttling_control(struct acpi_processor *pr) struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; union acpi_object *ptc = NULL; union acpi_object obj = { 0 }; - struct acpi_processor_throttling *throttling; status = acpi_evaluate_object(pr->handle, "_PTC", NULL, &buffer); if (ACPI_FAILURE(status)) { @@ -183,22 +134,6 @@ static int acpi_processor_get_throttling_control(struct acpi_processor *pr) memcpy(&pr->throttling.status_register, obj.buffer.pointer, sizeof(struct acpi_ptc_register)); - throttling = &pr->throttling; - - if ((throttling->control_register.bit_width + - throttling->control_register.bit_offset) > 32) { - printk(KERN_ERR PREFIX "Invalid _PTC control register\n"); - result = -EFAULT; - goto end; - } - - if ((throttling->status_register.bit_width + - throttling->status_register.bit_offset) > 32) { - printk(KERN_ERR PREFIX "Invalid _PTC status register\n"); - result = -EFAULT; - goto end; - } - end: kfree(buffer.pointer); @@ -393,132 +328,44 @@ static int acpi_processor_get_throttling_fadt(struct acpi_processor *pr) return 0; } -#ifdef CONFIG_X86 -static int acpi_throttling_rdmsr(struct acpi_processor *pr, - acpi_integer * value) +static int acpi_read_throttling_status(struct acpi_processor_throttling + *throttling) { - struct cpuinfo_x86 *c; - u64 msr_high, msr_low; - unsigned int cpu; - u64 msr = 0; - int ret = -1; - - cpu = pr->id; - c = &cpu_data(cpu); - - if ((c->x86_vendor != X86_VENDOR_INTEL) || - !cpu_has(c, X86_FEATURE_ACPI)) { - printk(KERN_ERR PREFIX - "HARDWARE addr space,NOT supported yet\n"); - } else { - msr_low = 0; - msr_high = 0; - rdmsr_on_cpu(cpu, MSR_IA32_THERM_CONTROL, - (u32 *)&msr_low , (u32 *) &msr_high); - msr = (msr_high << 32) | msr_low; - *value = (acpi_integer) msr; - ret = 0; - } - return ret; -} - -static int acpi_throttling_wrmsr(struct acpi_processor *pr, acpi_integer value) -{ - struct cpuinfo_x86 *c; - unsigned int cpu; - int ret = -1; - u64 msr; - - cpu = pr->id; - c = &cpu_data(cpu); - - if ((c->x86_vendor != X86_VENDOR_INTEL) || - !cpu_has(c, X86_FEATURE_ACPI)) { - printk(KERN_ERR PREFIX - "HARDWARE addr space,NOT supported yet\n"); - } else { - msr = value; - wrmsr_on_cpu(cpu, MSR_IA32_THERM_CONTROL, - msr & 0xffffffff, msr >> 32); - ret = 0; - } - return ret; -} -#else -static int acpi_throttling_rdmsr(struct acpi_processor *pr, - acpi_integer * value) -{ - printk(KERN_ERR PREFIX - "HARDWARE addr space,NOT supported yet\n"); - return -1; -} - -static int acpi_throttling_wrmsr(struct acpi_processor *pr, acpi_integer value) -{ - printk(KERN_ERR PREFIX - "HARDWARE addr space,NOT supported yet\n"); - return -1; -} -#endif - -static int acpi_read_throttling_status(struct acpi_processor *pr, - acpi_integer *value) -{ - u32 bit_width, bit_offset; - u64 ptc_value; - u64 ptc_mask; - struct acpi_processor_throttling *throttling; - int ret = -1; - - throttling = &pr->throttling; + int value = -1; switch (throttling->status_register.space_id) { case ACPI_ADR_SPACE_SYSTEM_IO: - ptc_value = 0; - bit_width = throttling->status_register.bit_width; - bit_offset = throttling->status_register.bit_offset; - acpi_os_read_port((acpi_io_address) throttling->status_register. - address, (u32 *) &ptc_value, - (u32) (bit_width + bit_offset)); - ptc_mask = (1 << bit_width) - 1; - *value = (acpi_integer) ((ptc_value >> bit_offset) & ptc_mask); - ret = 0; + address, &value, + (u32) throttling->status_register.bit_width * + 8); break; case ACPI_ADR_SPACE_FIXED_HARDWARE: - ret = acpi_throttling_rdmsr(pr, value); + printk(KERN_ERR PREFIX + "HARDWARE addr space,NOT supported yet\n"); break; default: printk(KERN_ERR PREFIX "Unknown addr space %d\n", (u32) (throttling->status_register.space_id)); } - return ret; + return value; } -static int acpi_write_throttling_state(struct acpi_processor *pr, - acpi_integer value) +static int acpi_write_throttling_state(struct acpi_processor_throttling + *throttling, int value) { - u32 bit_width, bit_offset; - u64 ptc_value; - u64 ptc_mask; - struct acpi_processor_throttling *throttling; int ret = -1; - throttling = &pr->throttling; switch (throttling->control_register.space_id) { case ACPI_ADR_SPACE_SYSTEM_IO: - bit_width = throttling->control_register.bit_width; - bit_offset = throttling->control_register.bit_offset; - ptc_mask = (1 << bit_width) - 1; - ptc_value = value & ptc_mask; - acpi_os_write_port((acpi_io_address) throttling-> - control_register.address, - (u32) (ptc_value << bit_offset), - (u32) (bit_width + bit_offset)); + control_register.address, value, + (u32) throttling->control_register. + bit_width * 8); ret = 0; break; case ACPI_ADR_SPACE_FIXED_HARDWARE: - ret = acpi_throttling_wrmsr(pr, value); + printk(KERN_ERR PREFIX + "HARDWARE addr space,NOT supported yet\n"); break; default: printk(KERN_ERR PREFIX "Unknown addr space %d\n", @@ -527,8 +374,7 @@ static int acpi_write_throttling_state(struct acpi_processor *pr, return ret; } -static int acpi_get_throttling_state(struct acpi_processor *pr, - acpi_integer value) +static int acpi_get_throttling_state(struct acpi_processor *pr, int value) { int i; @@ -544,26 +390,22 @@ static int acpi_get_throttling_state(struct acpi_processor *pr, return i; } -static int acpi_get_throttling_value(struct acpi_processor *pr, - int state, acpi_integer *value) +static int acpi_get_throttling_value(struct acpi_processor *pr, int state) { - int ret = -1; - + int value = -1; if (state >= 0 && state <= pr->throttling.state_count) { struct acpi_processor_tx_tss *tx = (struct acpi_processor_tx_tss *)&(pr->throttling. states_tss[state]); - *value = tx->control; - ret = 0; + value = tx->control; } - return ret; + return value; } static int acpi_processor_get_throttling_ptc(struct acpi_processor *pr) { int state = 0; - int ret; - acpi_integer value; + u32 value = 0; if (!pr) return -EINVAL; @@ -573,9 +415,8 @@ static int acpi_processor_get_throttling_ptc(struct acpi_processor *pr) pr->throttling.state = 0; local_irq_disable(); - value = 0; - ret = acpi_read_throttling_status(pr, &value); - if (ret >= 0) { + value = acpi_read_throttling_status(&pr->throttling); + if (value >= 0) { state = acpi_get_throttling_state(pr, value); pr->throttling.state = state; } @@ -589,40 +430,6 @@ static int acpi_processor_get_throttling(struct acpi_processor *pr) return pr->throttling.acpi_processor_get_throttling(pr); } -static int acpi_processor_get_fadt_info(struct acpi_processor *pr) -{ - int i, step; - - if (!pr->throttling.address) { - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling register\n")); - return -EINVAL; - } else if (!pr->throttling.duty_width) { - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling states\n")); - return -EINVAL; - } - /* TBD: Support duty_cycle values that span bit 4. */ - else if ((pr->throttling.duty_offset + pr->throttling.duty_width) > 4) { - printk(KERN_WARNING PREFIX "duty_cycle spans bit 4\n"); - return -EINVAL; - } - - pr->throttling.state_count = 1 << acpi_gbl_FADT.duty_width; - - /* - * Compute state values. Note that throttling displays a linear power - * performance relationship (at 50% performance the CPU will consume - * 50% power). Values are in 1/10th of a percent to preserve accuracy. - */ - - step = (1000 / pr->throttling.state_count); - - for (i = 0; i < pr->throttling.state_count; i++) { - pr->throttling.states[i].performance = 1000 - step * i; - pr->throttling.states[i].power = 1000 - step * i; - } - return 0; -} - static int acpi_processor_set_throttling_fadt(struct acpi_processor *pr, int state) { @@ -699,8 +506,7 @@ static int acpi_processor_set_throttling_fadt(struct acpi_processor *pr, static int acpi_processor_set_throttling_ptc(struct acpi_processor *pr, int state) { - int ret; - acpi_integer value; + u32 value = 0; if (!pr) return -EINVAL; @@ -718,10 +524,10 @@ static int acpi_processor_set_throttling_ptc(struct acpi_processor *pr, return -EPERM; local_irq_disable(); - value = 0; - ret = acpi_get_throttling_value(pr, state, &value); - if (ret >= 0) { - acpi_write_throttling_state(pr, value); + + value = acpi_get_throttling_value(pr, state); + if (value >= 0) { + acpi_write_throttling_state(&pr->throttling, value); pr->throttling.state = state; } local_irq_enable(); @@ -737,6 +543,8 @@ int acpi_processor_set_throttling(struct acpi_processor *pr, int state) int acpi_processor_get_throttling_info(struct acpi_processor *pr) { int result = 0; + int step = 0; + int i = 0; ACPI_DEBUG_PRINT((ACPI_DB_INFO, "pblk_address[0x%08x] duty_offset[%d] duty_width[%d]\n", @@ -755,8 +563,6 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr) acpi_processor_get_throttling_states(pr) || acpi_processor_get_platform_limit(pr)) { - if (acpi_processor_get_fadt_info(pr)) - return 0; pr->throttling.acpi_processor_get_throttling = &acpi_processor_get_throttling_fadt; pr->throttling.acpi_processor_set_throttling = @@ -770,6 +576,19 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr) acpi_processor_get_tsd(pr); + if (!pr->throttling.address) { + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling register\n")); + return 0; + } else if (!pr->throttling.duty_width) { + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling states\n")); + return 0; + } + /* TBD: Support duty_cycle values that span bit 4. */ + else if ((pr->throttling.duty_offset + pr->throttling.duty_width) > 4) { + printk(KERN_WARNING PREFIX "duty_cycle spans bit 4\n"); + return 0; + } + /* * PIIX4 Errata: We don't support throttling on the original PIIX4. * This shouldn't be an issue as few (if any) mobile systems ever @@ -781,6 +600,21 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr) return 0; } + pr->throttling.state_count = 1 << acpi_gbl_FADT.duty_width; + + /* + * Compute state values. Note that throttling displays a linear power/ + * performance relationship (at 50% performance the CPU will consume + * 50% power). Values are in 1/10th of a percent to preserve accuracy. + */ + + step = (1000 / pr->throttling.state_count); + + for (i = 0; i < pr->throttling.state_count; i++) { + pr->throttling.states[i].performance = step * i; + pr->throttling.states[i].power = step * i; + } + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %d throttling states\n", pr->throttling.state_count)); diff --git a/trunk/drivers/acpi/sbs.c b/trunk/drivers/acpi/sbs.c index 6045cdbe176b..90fd09c65f95 100644 --- a/trunk/drivers/acpi/sbs.c +++ b/trunk/drivers/acpi/sbs.c @@ -29,7 +29,7 @@ #include #include -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS #include #include #include @@ -88,7 +88,7 @@ MODULE_DEVICE_TABLE(acpi, sbs_device_ids); struct acpi_battery { struct power_supply bat; struct acpi_sbs *sbs; -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS struct proc_dir_entry *proc_entry; #endif unsigned long update_time; @@ -113,7 +113,6 @@ struct acpi_battery { u16 spec; u8 id; u8 present:1; - u8 have_sysfs_alarm:1; }; #define to_acpi_battery(x) container_of(x, struct acpi_battery, bat); @@ -123,7 +122,7 @@ struct acpi_sbs { struct acpi_device *device; struct acpi_smb_hc *hc; struct mutex lock; -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS struct proc_dir_entry *charger_entry; #endif struct acpi_battery battery[MAX_SBS_BAT]; @@ -469,7 +468,7 @@ static struct device_attribute alarm_attr = { FS Interface (/proc/acpi) -------------------------------------------------------------------------- */ -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS /* Generic Routines */ static int acpi_sbs_add_fs(struct proc_dir_entry **dir, @@ -790,7 +789,7 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id) return result; sprintf(battery->name, ACPI_BATTERY_DIR_NAME, id); -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS acpi_sbs_add_fs(&battery->proc_entry, acpi_battery_dir, battery->name, &acpi_battery_info_fops, &acpi_battery_state_fops, &acpi_battery_alarm_fops, @@ -809,13 +808,7 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id) } battery->bat.get_property = acpi_sbs_battery_get_property; result = power_supply_register(&sbs->device->dev, &battery->bat); - if (result) - goto end; - result = device_create_file(battery->bat.dev, &alarm_attr); - if (result) - goto end; - battery->have_sysfs_alarm = 1; - end: + device_create_file(battery->bat.dev, &alarm_attr); printk(KERN_INFO PREFIX "%s [%s]: Battery Slot [%s] (battery %s)\n", ACPI_SBS_DEVICE_NAME, acpi_device_bid(sbs->device), battery->name, sbs->battery->present ? "present" : "absent"); @@ -824,16 +817,14 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id) static void acpi_battery_remove(struct acpi_sbs *sbs, int id) { - struct acpi_battery *battery = &sbs->battery[id]; - - if (battery->bat.dev) { - if (battery->have_sysfs_alarm) - device_remove_file(battery->bat.dev, &alarm_attr); - power_supply_unregister(&battery->bat); + if (sbs->battery[id].bat.dev) + device_remove_file(sbs->battery[id].bat.dev, &alarm_attr); + power_supply_unregister(&sbs->battery[id].bat); +#ifdef CONFIG_ACPI_PROCFS + if (sbs->battery[id].proc_entry) { + acpi_sbs_remove_fs(&(sbs->battery[id].proc_entry), + acpi_battery_dir); } -#ifdef CONFIG_ACPI_PROCFS_POWER - if (battery->proc_entry) - acpi_sbs_remove_fs(&battery->proc_entry, acpi_battery_dir); #endif } @@ -844,7 +835,7 @@ static int acpi_charger_add(struct acpi_sbs *sbs) result = acpi_ac_get_present(sbs); if (result) goto end; -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS result = acpi_sbs_add_fs(&sbs->charger_entry, acpi_ac_dir, ACPI_AC_DIR_NAME, NULL, &acpi_ac_state_fops, NULL, sbs); @@ -868,7 +859,7 @@ static void acpi_charger_remove(struct acpi_sbs *sbs) { if (sbs->charger.dev) power_supply_unregister(&sbs->charger); -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS if (sbs->charger_entry) acpi_sbs_remove_fs(&sbs->charger_entry, acpi_ac_dir); #endif @@ -974,7 +965,7 @@ static int acpi_sbs_remove(struct acpi_device *device, int type) static void acpi_sbs_rmdirs(void) { -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS if (acpi_ac_dir) { acpi_unlock_ac_dir(acpi_ac_dir); acpi_ac_dir = NULL; @@ -1013,7 +1004,7 @@ static int __init acpi_sbs_init(void) if (acpi_disabled) return -ENODEV; -#ifdef CONFIG_ACPI_PROCFS_POWER +#ifdef CONFIG_ACPI_PROCFS acpi_ac_dir = acpi_lock_ac_dir(); if (!acpi_ac_dir) return -ENODEV; diff --git a/trunk/drivers/acpi/tables/tbutils.c b/trunk/drivers/acpi/tables/tbutils.c index 010f19652f80..5f1d85f2ffe4 100644 --- a/trunk/drivers/acpi/tables/tbutils.c +++ b/trunk/drivers/acpi/tables/tbutils.c @@ -449,7 +449,7 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags) /* XSDT has NULL entry, RSDT is used */ address = rsdt_address; table_entry_size = sizeof(u32); - ACPI_WARNING((AE_INFO, "BIOS XSDT has NULL entry, " + ACPI_WARNING((AE_INFO, "BIOS XSDT has NULL entry," "using RSDT")); } } diff --git a/trunk/drivers/acpi/video.c b/trunk/drivers/acpi/video.c index 44a0d9ba9bd6..bac956b30c57 100644 --- a/trunk/drivers/acpi/video.c +++ b/trunk/drivers/acpi/video.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -136,8 +135,8 @@ struct acpi_video_bus { u8 attached_count; struct acpi_video_bus_cap cap; struct acpi_video_bus_flags flags; + struct semaphore sem; struct list_head video_device_list; - struct mutex device_list_lock; /* protects video_device_list */ struct proc_dir_entry *dir; struct input_dev *input; char phys[32]; /* for input device */ @@ -897,7 +896,7 @@ acpi_video_device_write_brightness(struct file *file, { struct seq_file *m = file->private_data; struct acpi_video_device *dev = m->private; - char str[5] = { 0 }; + char str[4] = { 0 }; unsigned int level = 0; int i; @@ -1437,9 +1436,9 @@ acpi_video_bus_get_one_device(struct acpi_device *device, return -ENODEV; } - mutex_lock(&video->device_list_lock); + down(&video->sem); list_add_tail(&data->entry, &video->video_device_list); - mutex_unlock(&video->device_list_lock); + up(&video->sem); acpi_video_device_add_fs(device); @@ -1463,14 +1462,12 @@ acpi_video_bus_get_one_device(struct acpi_device *device, static void acpi_video_device_rebind(struct acpi_video_bus *video) { - struct acpi_video_device *dev; - - mutex_lock(&video->device_list_lock); - - list_for_each_entry(dev, &video->video_device_list, entry) + struct list_head *node, *next; + list_for_each_safe(node, next, &video->video_device_list) { + struct acpi_video_device *dev = + container_of(node, struct acpi_video_device, entry); acpi_video_device_bind(video, dev); - - mutex_unlock(&video->device_list_lock); + } } /* @@ -1595,33 +1592,30 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video) static int acpi_video_switch_output(struct acpi_video_bus *video, int event) { - struct list_head *node; + struct list_head *node, *next; struct acpi_video_device *dev = NULL; struct acpi_video_device *dev_next = NULL; struct acpi_video_device *dev_prev = NULL; unsigned long state; int status = 0; - mutex_lock(&video->device_list_lock); - list_for_each(node, &video->video_device_list) { + list_for_each_safe(node, next, &video->video_device_list) { dev = container_of(node, struct acpi_video_device, entry); status = acpi_video_device_get_state(dev, &state); if (state & 0x2) { - dev_next = container_of(node->next, - struct acpi_video_device, entry); - dev_prev = container_of(node->prev, - struct acpi_video_device, entry); + dev_next = + container_of(node->next, struct acpi_video_device, + entry); + dev_prev = + container_of(node->prev, struct acpi_video_device, + entry); goto out; } } - dev_next = container_of(node->next, struct acpi_video_device, entry); dev_prev = container_of(node->prev, struct acpi_video_device, entry); - - out: - mutex_unlock(&video->device_list_lock); - + out: switch (event) { case ACPI_VIDEO_NOTIFY_CYCLE: case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT: @@ -1697,17 +1691,24 @@ acpi_video_bus_get_devices(struct acpi_video_bus *video, struct acpi_device *device) { int status = 0; - struct acpi_device *dev; + struct list_head *node, *next; + acpi_video_device_enumerate(video); - list_for_each_entry(dev, &device->children, node) { + list_for_each_safe(node, next, &device->children) { + struct acpi_device *dev = + list_entry(node, struct acpi_device, node); + + if (!dev) + continue; status = acpi_video_bus_get_one_device(dev, video); if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, "Cant attach device")); continue; } + } return status; } @@ -1723,6 +1724,9 @@ static int acpi_video_bus_put_one_device(struct acpi_video_device *device) video = device->video; + down(&video->sem); + list_del(&device->entry); + up(&video->sem); acpi_video_device_remove_fs(device->dev); status = acpi_remove_notify_handler(device->dev->handle, @@ -1730,34 +1734,32 @@ static int acpi_video_bus_put_one_device(struct acpi_video_device *device) acpi_video_device_notify); backlight_device_unregister(device->backlight); video_output_unregister(device->output_dev); - return 0; } static int acpi_video_bus_put_devices(struct acpi_video_bus *video) { int status; - struct acpi_video_device *dev, *next; + struct list_head *node, *next; - mutex_lock(&video->device_list_lock); - list_for_each_entry_safe(dev, next, &video->video_device_list, entry) { + list_for_each_safe(node, next, &video->video_device_list) { + struct acpi_video_device *data = + list_entry(node, struct acpi_video_device, entry); + if (!data) + continue; - status = acpi_video_bus_put_one_device(dev); + status = acpi_video_bus_put_one_device(data); if (ACPI_FAILURE(status)) printk(KERN_WARNING PREFIX "hhuuhhuu bug in acpi video driver.\n"); - if (dev->brightness) { - kfree(dev->brightness->levels); - kfree(dev->brightness); - } - list_del(&dev->entry); - kfree(dev); + if (data->brightness) + kfree(data->brightness->levels); + kfree(data->brightness); + kfree(data); } - mutex_unlock(&video->device_list_lock); - return 0; } @@ -1780,6 +1782,9 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data) struct input_dev *input; int keycode; + + printk("video bus notify\n"); + if (!video) return; @@ -1892,10 +1897,14 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data) static int instance; static int acpi_video_bus_add(struct acpi_device *device) { - acpi_status status; - struct acpi_video_bus *video; + int result = 0; + acpi_status status = 0; + struct acpi_video_bus *video = NULL; struct input_dev *input; - int error; + + + if (!device) + return -EINVAL; video = kzalloc(sizeof(struct acpi_video_bus), GFP_KERNEL); if (!video) @@ -1914,15 +1923,15 @@ static int acpi_video_bus_add(struct acpi_device *device) acpi_driver_data(device) = video; acpi_video_bus_find_cap(video); - error = acpi_video_bus_check(video); - if (error) - goto err_free_video; + result = acpi_video_bus_check(video); + if (result) + goto end; - error = acpi_video_bus_add_fs(device); - if (error) - goto err_free_video; + result = acpi_video_bus_add_fs(device); + if (result) + goto end; - mutex_init(&video->device_list_lock); + init_MUTEX(&video->sem); INIT_LIST_HEAD(&video->video_device_list); acpi_video_bus_get_devices(video, device); @@ -1934,15 +1943,16 @@ static int acpi_video_bus_add(struct acpi_device *device) if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error installing notify handler\n")); - error = -ENODEV; - goto err_stop_video; + acpi_video_bus_stop_devices(video); + acpi_video_bus_put_devices(video); + kfree(video->attached_array); + acpi_video_bus_remove_fs(device); + result = -ENODEV; + goto end; } + video->input = input = input_allocate_device(); - if (!input) { - error = -ENOMEM; - goto err_uninstall_notify; - } snprintf(video->phys, sizeof(video->phys), "%s/video/input0", acpi_device_hid(video->device)); @@ -1951,7 +1961,6 @@ static int acpi_video_bus_add(struct acpi_device *device) input->phys = video->phys; input->id.bustype = BUS_HOST; input->id.product = 0x06; - input->dev.parent = &device->dev; input->evbit[0] = BIT(EV_KEY); set_bit(KEY_SWITCHVIDEOMODE, input->keybit); set_bit(KEY_VIDEO_NEXT, input->keybit); @@ -1962,10 +1971,18 @@ static int acpi_video_bus_add(struct acpi_device *device) set_bit(KEY_BRIGHTNESS_ZERO, input->keybit); set_bit(KEY_DISPLAY_OFF, input->keybit); set_bit(KEY_UNKNOWN, input->keybit); + result = input_register_device(input); + if (result) { + acpi_remove_notify_handler(video->device->handle, + ACPI_DEVICE_NOTIFY, + acpi_video_bus_notify); + acpi_video_bus_stop_devices(video); + acpi_video_bus_put_devices(video); + kfree(video->attached_array); + acpi_video_bus_remove_fs(device); + goto end; + } - error = input_register_device(input); - if (error) - goto err_free_input_dev; printk(KERN_INFO PREFIX "%s [%s] (multi-head: %s rom: %s post: %s)\n", ACPI_VIDEO_DEVICE_NAME, acpi_device_bid(device), @@ -1973,23 +1990,11 @@ static int acpi_video_bus_add(struct acpi_device *device) video->flags.rom ? "yes" : "no", video->flags.post ? "yes" : "no"); - return 0; - - err_free_input_dev: - input_free_device(input); - err_uninstall_notify: - acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY, - acpi_video_bus_notify); - err_stop_video: - acpi_video_bus_stop_devices(video); - acpi_video_bus_put_devices(video); - kfree(video->attached_array); - acpi_video_bus_remove_fs(device); - err_free_video: - kfree(video); - acpi_driver_data(device) = NULL; + end: + if (result) + kfree(video); - return error; + return result; } static int acpi_video_bus_remove(struct acpi_device *device, int type) diff --git a/trunk/drivers/ata/ata_piix.c b/trunk/drivers/ata/ata_piix.c index 483269db2c7d..328ce8a08426 100644 --- a/trunk/drivers/ata/ata_piix.c +++ b/trunk/drivers/ata/ata_piix.c @@ -119,19 +119,18 @@ enum { PIIX_80C_SEC = (1 << 7) | (1 << 6), /* controller IDs */ - piix_pata_mwdma = 0, /* PIIX3 MWDMA only */ - piix_pata_33, /* PIIX4 at 33Mhz */ - ich_pata_33, /* ICH up to UDMA 33 only */ - ich_pata_66, /* ICH up to 66 Mhz */ - ich_pata_100, /* ICH up to UDMA 100 */ - ich5_sata, - ich6_sata, - ich6_sata_ahci, - ich6m_sata_ahci, - ich8_sata_ahci, - ich8_2port_sata, - ich8m_apple_sata_ahci, /* locks up on second port enable */ - tolapai_sata_ahci, + piix_pata_33 = 0, /* PIIX4 at 33Mhz */ + ich_pata_33 = 1, /* ICH up to UDMA 33 only */ + ich_pata_66 = 2, /* ICH up to 66 Mhz */ + ich_pata_100 = 3, /* ICH up to UDMA 100 */ + ich5_sata = 5, + ich6_sata = 6, + ich6_sata_ahci = 7, + ich6m_sata_ahci = 8, + ich8_sata_ahci = 9, + piix_pata_mwdma = 10, /* PIIX3 MWDMA only */ + tolapai_sata_ahci = 11, + ich9_2port_sata = 12, /* constants for mapping table */ P0 = 0, /* port 0 */ @@ -240,21 +239,19 @@ static const struct pci_device_id piix_pci_tbl[] = { /* SATA Controller 1 IDE (ICH8) */ { 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, /* SATA Controller 2 IDE (ICH8) */ - { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, + { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_2port_sata }, /* Mobile SATA Controller IDE (ICH8M) */ { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, - /* Mobile SATA Controller IDE (ICH8M), Apple */ - { 0x8086, 0x2828, 0x106b, 0x00a0, 0, 0, ich8m_apple_sata_ahci }, /* SATA Controller IDE (ICH9) */ { 0x8086, 0x2920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, /* SATA Controller IDE (ICH9) */ - { 0x8086, 0x2921, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, + { 0x8086, 0x2921, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_2port_sata }, /* SATA Controller IDE (ICH9) */ - { 0x8086, 0x2926, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, + { 0x8086, 0x2926, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_2port_sata }, /* SATA Controller IDE (ICH9M) */ - { 0x8086, 0x2928, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, + { 0x8086, 0x2928, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_2port_sata }, /* SATA Controller IDE (ICH9M) */ - { 0x8086, 0x292d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, + { 0x8086, 0x292d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_2port_sata }, /* SATA Controller IDE (ICH9M) */ { 0x8086, 0x292e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, /* SATA Controller IDE (Tolapai) */ @@ -430,7 +427,7 @@ static const struct piix_map_db ich6m_map_db = { static const struct piix_map_db ich8_map_db = { .mask = 0x3, - .port_enable = 0xf, + .port_enable = 0x3, .map = { /* PM PS SM SS MAP */ { P0, P2, P1, P3 }, /* 00b (hardwired when in AHCI) */ @@ -440,7 +437,7 @@ static const struct piix_map_db ich8_map_db = { }, }; -static const struct piix_map_db ich8_2port_map_db = { +static const struct piix_map_db tolapai_map_db = { .mask = 0x3, .port_enable = 0x3, .map = { @@ -452,19 +449,7 @@ static const struct piix_map_db ich8_2port_map_db = { }, }; -static const struct piix_map_db ich8m_apple_map_db = { - .mask = 0x3, - .port_enable = 0x1, - .map = { - /* PM PS SM SS MAP */ - { P0, NA, NA, NA }, /* 00b */ - { RV, RV, RV, RV }, - { P0, P2, IDE, IDE }, /* 10b */ - { RV, RV, RV, RV }, - }, -}; - -static const struct piix_map_db tolapai_map_db = { +static const struct piix_map_db ich9_2port_map_db = { .mask = 0x3, .port_enable = 0x3, .map = { @@ -482,21 +467,11 @@ static const struct piix_map_db *piix_map_db_table[] = { [ich6_sata_ahci] = &ich6_map_db, [ich6m_sata_ahci] = &ich6m_map_db, [ich8_sata_ahci] = &ich8_map_db, - [ich8_2port_sata] = &ich8_2port_map_db, - [ich8m_apple_sata_ahci] = &ich8m_apple_map_db, [tolapai_sata_ahci] = &tolapai_map_db, + [ich9_2port_sata] = &ich9_2port_map_db, }; static struct ata_port_info piix_port_info[] = { - [piix_pata_mwdma] = /* PIIX3 MWDMA only */ - { - .sht = &piix_sht, - .flags = PIIX_PATA_FLAGS, - .pio_mask = 0x1f, /* pio0-4 */ - .mwdma_mask = 0x06, /* mwdma1-2 ?? CHECK 0 should be ok but slow */ - .port_ops = &piix_pata_ops, - }, - [piix_pata_33] = /* PIIX4 at 33MHz */ { .sht = &piix_sht, @@ -590,15 +565,13 @@ static struct ata_port_info piix_port_info[] = { .port_ops = &piix_sata_ops, }, - [ich8_2port_sata] = + [piix_pata_mwdma] = /* PIIX3 MWDMA only */ { .sht = &piix_sht, - .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SCR | - PIIX_FLAG_AHCI, + .flags = PIIX_PATA_FLAGS, .pio_mask = 0x1f, /* pio0-4 */ - .mwdma_mask = 0x07, /* mwdma0-2 */ - .udma_mask = ATA_UDMA6, - .port_ops = &piix_sata_ops, + .mwdma_mask = 0x06, /* mwdma1-2 ?? CHECK 0 should be ok but slow */ + .port_ops = &piix_pata_ops, }, [tolapai_sata_ahci] = @@ -612,7 +585,7 @@ static struct ata_port_info piix_port_info[] = { .port_ops = &piix_sata_ops, }, - [ich8m_apple_sata_ahci] = + [ich9_2port_sata] = { .sht = &piix_sht, .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SCR | @@ -622,7 +595,6 @@ static struct ata_port_info piix_port_info[] = { .udma_mask = ATA_UDMA6, .port_ops = &piix_sata_ops, }, - }; static struct pci_bits piix_enable_bits[] = { @@ -1001,13 +973,6 @@ static int piix_broken_suspend(void) DMI_MATCH(DMI_PRODUCT_NAME, "Satellite U205"), }, }, - { - .ident = "SATELLITE U205", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), - DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE U205"), - }, - }, { .ident = "Portege M500", .matches = { @@ -1121,12 +1086,12 @@ static int piix_disable_ahci(struct pci_dev *pdev) if (!mmio) return -ENOMEM; - tmp = ioread32(mmio + AHCI_GLOBAL_CTL); + tmp = readl(mmio + AHCI_GLOBAL_CTL); if (tmp & AHCI_ENABLE) { tmp &= ~AHCI_ENABLE; - iowrite32(tmp, mmio + AHCI_GLOBAL_CTL); + writel(tmp, mmio + AHCI_GLOBAL_CTL); - tmp = ioread32(mmio + AHCI_GLOBAL_CTL); + tmp = readl(mmio + AHCI_GLOBAL_CTL); if (tmp & AHCI_ENABLE) rc = -EIO; } diff --git a/trunk/drivers/ata/libata-core.c b/trunk/drivers/ata/libata-core.c index 33f06277b3be..81898036dbca 100644 --- a/trunk/drivers/ata/libata-core.c +++ b/trunk/drivers/ata/libata-core.c @@ -30,14 +30,6 @@ * Hardware documentation available from http://www.t13.org/ and * http://www.sata-io.org/ * - * Standards documents from: - * http://www.t13.org (ATA standards, PCI DMA IDE spec) - * http://www.t10.org (SCSI MMC - for ATAPI MMC) - * http://www.sata-io.org (SATA) - * http://www.compactflash.org (CF) - * http://www.qic.org (QIC157 - Tape and DSC) - * http://www.ce-ata.org (CE-ATA: not supported) - * */ #include @@ -2315,10 +2307,8 @@ int ata_dev_configure(struct ata_device *dev) } if ((dev->class == ATA_DEV_ATAPI) && - (atapi_command_packet_set(id) == TYPE_TAPE)) { + (atapi_command_packet_set(id) == TYPE_TAPE)) dev->max_sectors = ATA_MAX_SECTORS_TAPE; - dev->horkage |= ATA_HORKAGE_STUCK_ERR; - } if (dev->horkage & ATA_HORKAGE_MAX_SEC_128) dev->max_sectors = min_t(unsigned int, ATA_MAX_SECTORS_128, @@ -2590,6 +2580,81 @@ void sata_print_link_status(struct ata_link *link) } } +/** + * __sata_phy_reset - Wake/reset a low-level SATA PHY + * @ap: SATA port associated with target SATA PHY. + * + * This function issues commands to standard SATA Sxxx + * PHY registers, to wake up the phy (and device), and + * clear any reset condition. + * + * LOCKING: + * PCI/etc. bus probe sem. + * + */ +void __sata_phy_reset(struct ata_port *ap) +{ + struct ata_link *link = &ap->link; + unsigned long timeout = jiffies + (HZ * 5); + u32 sstatus; + + if (ap->flags & ATA_FLAG_SATA_RESET) { + /* issue phy wake/reset */ + sata_scr_write_flush(link, SCR_CONTROL, 0x301); + /* Couldn't find anything in SATA I/II specs, but + * AHCI-1.1 10.4.2 says at least 1 ms. */ + mdelay(1); + } + /* phy wake/clear reset */ + sata_scr_write_flush(link, SCR_CONTROL, 0x300); + + /* wait for phy to become ready, if necessary */ + do { + msleep(200); + sata_scr_read(link, SCR_STATUS, &sstatus); + if ((sstatus & 0xf) != 1) + break; + } while (time_before(jiffies, timeout)); + + /* print link status */ + sata_print_link_status(link); + + /* TODO: phy layer with polling, timeouts, etc. */ + if (!ata_link_offline(link)) + ata_port_probe(ap); + else + ata_port_disable(ap); + + if (ap->flags & ATA_FLAG_DISABLED) + return; + + if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) { + ata_port_disable(ap); + return; + } + + ap->cbl = ATA_CBL_SATA; +} + +/** + * sata_phy_reset - Reset SATA bus. + * @ap: SATA port associated with target SATA PHY. + * + * This function resets the SATA bus, and then probes + * the bus for devices. + * + * LOCKING: + * PCI/etc. bus probe sem. + * + */ +void sata_phy_reset(struct ata_port *ap) +{ + __sata_phy_reset(ap); + if (ap->flags & ATA_FLAG_DISABLED) + return; + ata_bus_reset(ap); +} + /** * ata_dev_pair - return other device on cable * @adev: device @@ -5425,19 +5490,11 @@ int ata_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc, * let the EH abort the command or reset the device. */ if (unlikely(status & (ATA_ERR | ATA_DF))) { - /* Some ATAPI tape drives forget to clear the ERR bit - * when doing the next command (mostly request sense). - * We ignore ERR here to workaround and proceed sending - * the CDB. - */ - if (!(qc->dev->horkage & ATA_HORKAGE_STUCK_ERR)) { - ata_port_printk(ap, KERN_WARNING, - "DRQ=1 with device error, " - "dev_stat 0x%X\n", status); - qc->err_mask |= AC_ERR_HSM; - ap->hsm_task_state = HSM_ST_ERR; - goto fsm_start; - } + ata_port_printk(ap, KERN_WARNING, "DRQ=1 with device " + "error, dev_stat 0x%X\n", status); + qc->err_mask |= AC_ERR_HSM; + ap->hsm_task_state = HSM_ST_ERR; + goto fsm_start; } /* Send the CDB (atapi) or the first data block (ata pio out). @@ -7596,6 +7653,8 @@ EXPORT_SYMBOL_GPL(ata_dev_disable); EXPORT_SYMBOL_GPL(sata_set_spd); EXPORT_SYMBOL_GPL(sata_link_debounce); EXPORT_SYMBOL_GPL(sata_link_resume); +EXPORT_SYMBOL_GPL(sata_phy_reset); +EXPORT_SYMBOL_GPL(__sata_phy_reset); EXPORT_SYMBOL_GPL(ata_bus_reset); EXPORT_SYMBOL_GPL(ata_std_prereset); EXPORT_SYMBOL_GPL(ata_std_softreset); @@ -7666,6 +7725,7 @@ EXPORT_SYMBOL_GPL(ata_port_desc); #ifdef CONFIG_PCI EXPORT_SYMBOL_GPL(ata_port_pbar_desc); #endif /* CONFIG_PCI */ +EXPORT_SYMBOL_GPL(ata_eng_timeout); EXPORT_SYMBOL_GPL(ata_port_schedule_eh); EXPORT_SYMBOL_GPL(ata_link_abort); EXPORT_SYMBOL_GPL(ata_port_abort); diff --git a/trunk/drivers/ata/libata-eh.c b/trunk/drivers/ata/libata-eh.c index 0dac69db1fdf..ed8813b222a0 100644 --- a/trunk/drivers/ata/libata-eh.c +++ b/trunk/drivers/ata/libata-eh.c @@ -559,6 +559,101 @@ void ata_port_wait_eh(struct ata_port *ap) } } +/** + * ata_qc_timeout - Handle timeout of queued command + * @qc: Command that timed out + * + * Some part of the kernel (currently, only the SCSI layer) + * has noticed that the active command on port @ap has not + * completed after a specified length of time. Handle this + * condition by disabling DMA (if necessary) and completing + * transactions, with error if necessary. + * + * This also handles the case of the "lost interrupt", where + * for some reason (possibly hardware bug, possibly driver bug) + * an interrupt was not delivered to the driver, even though the + * transaction completed successfully. + * + * TODO: kill this function once old EH is gone. + * + * LOCKING: + * Inherited from SCSI layer (none, can sleep) + */ +static void ata_qc_timeout(struct ata_queued_cmd *qc) +{ + struct ata_port *ap = qc->ap; + u8 host_stat = 0, drv_stat; + unsigned long flags; + + DPRINTK("ENTER\n"); + + ap->hsm_task_state = HSM_ST_IDLE; + + spin_lock_irqsave(ap->lock, flags); + + switch (qc->tf.protocol) { + + case ATA_PROT_DMA: + case ATA_PROT_ATAPI_DMA: + host_stat = ap->ops->bmdma_status(ap); + + /* before we do anything else, clear DMA-Start bit */ + ap->ops->bmdma_stop(qc); + + /* fall through */ + + default: + ata_altstatus(ap); + drv_stat = ata_chk_status(ap); + + /* ack bmdma irq events */ + ap->ops->irq_clear(ap); + + ata_dev_printk(qc->dev, KERN_ERR, "command 0x%x timeout, " + "stat 0x%x host_stat 0x%x\n", + qc->tf.command, drv_stat, host_stat); + + /* complete taskfile transaction */ + qc->err_mask |= AC_ERR_TIMEOUT; + break; + } + + spin_unlock_irqrestore(ap->lock, flags); + + ata_eh_qc_complete(qc); + + DPRINTK("EXIT\n"); +} + +/** + * ata_eng_timeout - Handle timeout of queued command + * @ap: Port on which timed-out command is active + * + * Some part of the kernel (currently, only the SCSI layer) + * has noticed that the active command on port @ap has not + * completed after a specified length of time. Handle this + * condition by disabling DMA (if necessary) and completing + * transactions, with error if necessary. + * + * This also handles the case of the "lost interrupt", where + * for some reason (possibly hardware bug, possibly driver bug) + * an interrupt was not delivered to the driver, even though the + * transaction completed successfully. + * + * TODO: kill this function once old EH is gone. + * + * LOCKING: + * Inherited from SCSI layer (none, can sleep) + */ +void ata_eng_timeout(struct ata_port *ap) +{ + DPRINTK("ENTER\n"); + + ata_qc_timeout(ata_qc_from_tag(ap, ap->link.active_tag)); + + DPRINTK("EXIT\n"); +} + static int ata_eh_nr_in_flight(struct ata_port *ap) { unsigned int tag; diff --git a/trunk/drivers/ata/libata-scsi.c b/trunk/drivers/ata/libata-scsi.c index a883bb03d4c7..94144ed50a6b 100644 --- a/trunk/drivers/ata/libata-scsi.c +++ b/trunk/drivers/ata/libata-scsi.c @@ -2485,40 +2485,11 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc) if (!using_pio && ata_check_atapi_dma(qc)) using_pio = 1; - /* Some controller variants snoop this value for Packet - * transfers to do state machine and FIFO management. Thus we - * want to set it properly, and for DMA where it is - * effectively meaningless. - */ + /* Some controller variants snoop this value for Packet transfers + to do state machine and FIFO management. Thus we want to set it + properly, and for DMA where it is effectively meaningless */ nbytes = min(qc->nbytes, (unsigned int)63 * 1024); - /* Most ATAPI devices which honor transfer chunk size don't - * behave according to the spec when odd chunk size which - * matches the transfer length is specified. If the number of - * bytes to transfer is 2n+1. According to the spec, what - * should happen is to indicate that 2n+1 is going to be - * transferred and transfer 2n+2 bytes where the last byte is - * padding. - * - * In practice, this doesn't happen. ATAPI devices first - * indicate and transfer 2n bytes and then indicate and - * transfer 2 bytes where the last byte is padding. - * - * This inconsistency confuses several controllers which - * perform PIO using DMA such as Intel AHCIs and sil3124/32. - * These controllers use actual number of transferred bytes to - * update DMA poitner and transfer of 4n+2 bytes make those - * controller push DMA pointer by 4n+4 bytes because SATA data - * FISes are aligned to 4 bytes. This causes data corruption - * and buffer overrun. - * - * Always setting nbytes to even number solves this problem - * because then ATAPI devices don't have to split data at 2n - * boundaries. - */ - if (nbytes & 0x1) - nbytes++; - qc->tf.lbam = (nbytes & 0xFF); qc->tf.lbah = (nbytes >> 8); @@ -2898,8 +2869,7 @@ static inline int __ata_scsi_queuecmd(struct scsi_cmnd *scmd, xlat_func = NULL; if (likely((scsi_op != ATA_16) || !atapi_passthru16)) { /* relay SCSI command to ATAPI device */ - int len = COMMAND_SIZE(scsi_op); - if (unlikely(len > scmd->cmd_len || len > dev->cdb_len)) + if (unlikely(scmd->cmd_len > dev->cdb_len)) goto bad_cdb_len; xlat_func = atapi_xlat; diff --git a/trunk/drivers/ata/pata_ali.c b/trunk/drivers/ata/pata_ali.c index 8caf9afc8b90..364534e7aff4 100644 --- a/trunk/drivers/ata/pata_ali.c +++ b/trunk/drivers/ata/pata_ali.c @@ -63,9 +63,6 @@ static int ali_cable_override(struct pci_dev *pdev) /* Fujitsu P2000 */ if (pdev->subsystem_vendor == 0x10CF && pdev->subsystem_device == 0x10AF) return 1; - /* Mitac 8317 (Winbook-A) and relatives */ - if (pdev->subsystem_vendor == 0x1071 && pdev->subsystem_device == 0x8317) - return 1; /* Systems by DMI */ if (dmi_check_system(cable_dmi_table)) return 1; @@ -285,21 +282,6 @@ static void ali_lock_sectors(struct ata_device *adev) adev->max_sectors = 255; } -/** - * ali_check_atapi_dma - DMA check for most ALi controllers - * @adev: Device - * - * Called to decide whether commands should be sent by DMA or PIO - */ - -static int ali_check_atapi_dma(struct ata_queued_cmd *qc) -{ - /* If its not a media command, its not worth it */ - if (qc->nbytes < 2048) - return -EOPNOTSUPP; - return 0; -} - static struct scsi_host_template ali_sht = { .module = THIS_MODULE, .name = DRV_NAME, @@ -396,7 +378,6 @@ static struct ata_port_operations ali_c2_port_ops = { .mode_filter = ata_pci_default_filter, .tf_load = ata_tf_load, .tf_read = ata_tf_read, - .check_atapi_dma = ali_check_atapi_dma, .check_status = ata_check_status, .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, @@ -434,7 +415,6 @@ static struct ata_port_operations ali_c5_port_ops = { .mode_filter = ata_pci_default_filter, .tf_load = ata_tf_load, .tf_read = ata_tf_read, - .check_atapi_dma = ali_check_atapi_dma, .check_status = ata_check_status, .exec_command = ata_exec_command, .dev_select = ata_std_dev_select, diff --git a/trunk/drivers/ata/pata_bf54x.c b/trunk/drivers/ata/pata_bf54x.c index 81db405a5445..b5e38426b815 100644 --- a/trunk/drivers/ata/pata_bf54x.c +++ b/trunk/drivers/ata/pata_bf54x.c @@ -1145,13 +1145,13 @@ static unsigned char bfin_bmdma_status(struct ata_port *ap) unsigned short int_status = ATAPI_GET_INT_STATUS(base); if (ATAPI_GET_STATUS(base) & (MULTI_XFER_ON|ULTRA_XFER_ON)) { - host_stat |= ATA_DMA_ACTIVE; + host_stat = ATA_DMA_ACTIVE; } if (int_status & (MULTI_DONE_INT|UDMAIN_DONE_INT|UDMAOUT_DONE_INT)) { - host_stat |= ATA_DMA_INTR; + host_stat = ATA_DMA_INTR; } if (int_status & (MULTI_TERM_INT|UDMAIN_TERM_INT|UDMAOUT_TERM_INT)) { - host_stat |= ATA_DMA_ERR; + host_stat = ATA_DMA_ERR; } return host_stat; diff --git a/trunk/drivers/ata/pata_hpt37x.c b/trunk/drivers/ata/pata_hpt37x.c index 46dc70e0dee7..3816b8605e0d 100644 --- a/trunk/drivers/ata/pata_hpt37x.c +++ b/trunk/drivers/ata/pata_hpt37x.c @@ -329,7 +329,7 @@ static int hpt37x_pre_reset(struct ata_link *link, unsigned long deadline) /* Restore state */ pci_write_config_byte(pdev, 0x5B, scr2); - if (ata66 & (2 >> ap->port_no)) + if (ata66 & (1 << ap->port_no)) ap->cbl = ATA_CBL_PATA40; else ap->cbl = ATA_CBL_PATA80; diff --git a/trunk/drivers/ata/pata_isapnp.c b/trunk/drivers/ata/pata_isapnp.c index 4320e7986321..88ab0e1d353f 100644 --- a/trunk/drivers/ata/pata_isapnp.c +++ b/trunk/drivers/ata/pata_isapnp.c @@ -75,16 +75,13 @@ static int isapnp_init_one(struct pnp_dev *idev, const struct pnp_device_id *dev struct ata_host *host; struct ata_port *ap; void __iomem *cmd_addr, *ctl_addr; - int irq = 0; - irq_handler_t handler = NULL; if (pnp_port_valid(idev, 0) == 0) return -ENODEV; - if (pnp_irq_valid(idev, 0)) { - irq = pnp_irq(idev, 0); - handler = ata_interrupt; - } + /* FIXME: Should selected polled PIO here not fail */ + if (pnp_irq_valid(idev, 0) == 0) + return -ENODEV; /* allocate host */ host = ata_host_alloc(&idev->dev, 1); @@ -118,7 +115,7 @@ static int isapnp_init_one(struct pnp_dev *idev, const struct pnp_device_id *dev (unsigned long long)pnp_port_start(idev, 1)); /* activate */ - return ata_host_activate(host, irq, handler, 0, + return ata_host_activate(host, pnp_irq(idev, 0), ata_interrupt, 0, &isapnp_sht); } diff --git a/trunk/drivers/ata/pata_jmicron.c b/trunk/drivers/ata/pata_jmicron.c index 5b8174d94067..225a7223a726 100644 --- a/trunk/drivers/ata/pata_jmicron.c +++ b/trunk/drivers/ata/pata_jmicron.c @@ -80,10 +80,11 @@ static int jmicron_pre_reset(struct ata_link *link, unsigned long deadline) * actually do our cable checking etc. Thankfully we don't need * to do the plumbing for other cases. */ - switch (port_map[port]) { + switch (port_map[port]) + { case PORT_PATA0: - if ((control & (1 << 5)) == 0) - return -ENOENT; + if (control & (1 << 5)) + return 0; if (control & (1 << 3)) /* 40/80 pin primary */ ap->cbl = ATA_CBL_PATA40; else @@ -92,7 +93,7 @@ static int jmicron_pre_reset(struct ata_link *link, unsigned long deadline) case PORT_PATA1: /* Bit 21 is set if the port is enabled */ if ((control5 & (1 << 21)) == 0) - return -ENOENT; + return 0; if (control5 & (1 << 19)) /* 40/80 pin secondary */ ap->cbl = ATA_CBL_PATA40; else diff --git a/trunk/drivers/ata/pata_sil680.c b/trunk/drivers/ata/pata_sil680.c index 503245a1eafa..5c1e9cb59ecb 100644 --- a/trunk/drivers/ata/pata_sil680.c +++ b/trunk/drivers/ata/pata_sil680.c @@ -33,7 +33,7 @@ #include #define DRV_NAME "pata_sil680" -#define DRV_VERSION "0.4.8" +#define DRV_VERSION "0.4.7" #define SIL680_MMIO_BAR 5 @@ -93,6 +93,34 @@ static int sil680_cable_detect(struct ata_port *ap) { return ATA_CBL_PATA40; } +/** + * sil680_bus_reset - reset the SIL680 bus + * @link: ATA link to reset + * @deadline: deadline jiffies for the operation + * + * Perform the SIL680 housekeeping when doing an ATA bus reset + */ + +static int sil680_bus_reset(struct ata_link *link, unsigned int *classes, + unsigned long deadline) +{ + struct ata_port *ap = link->ap; + struct pci_dev *pdev = to_pci_dev(ap->host->dev); + unsigned long addr = sil680_selreg(ap, 0); + u8 reset; + + pci_read_config_byte(pdev, addr, &reset); + pci_write_config_byte(pdev, addr, reset | 0x03); + udelay(25); + pci_write_config_byte(pdev, addr, reset); + return ata_std_softreset(link, classes, deadline); +} + +static void sil680_error_handler(struct ata_port *ap) +{ + ata_bmdma_drive_eh(ap, ata_std_prereset, sil680_bus_reset, NULL, ata_std_postreset); +} + /** * sil680_set_piomode - set initial PIO mode data * @ap: ATA interface @@ -221,7 +249,7 @@ static struct ata_port_operations sil680_port_ops = { .freeze = ata_bmdma_freeze, .thaw = ata_bmdma_thaw, - .error_handler = ata_bmdma_error_handler, + .error_handler = sil680_error_handler, .post_internal_cmd = ata_bmdma_post_internal_cmd, .cable_detect = sil680_cable_detect, diff --git a/trunk/drivers/ata/pata_sis.c b/trunk/drivers/ata/pata_sis.c index 87546d9f1ca0..3b5be77e861c 100644 --- a/trunk/drivers/ata/pata_sis.c +++ b/trunk/drivers/ata/pata_sis.c @@ -55,7 +55,6 @@ static const struct sis_laptop sis_laptop[] = { /* devid, subvendor, subdev */ { 0x5513, 0x1043, 0x1107 }, /* ASUS A6K */ { 0x5513, 0x1734, 0x105F }, /* FSC Amilo A1630 */ - { 0x5513, 0x1071, 0x8640 }, /* EasyNote K5305 */ /* end marker */ { 0, } }; diff --git a/trunk/drivers/ata/sata_sil24.c b/trunk/drivers/ata/sata_sil24.c index 96fd5260446d..187dcb02c681 100644 --- a/trunk/drivers/ata/sata_sil24.c +++ b/trunk/drivers/ata/sata_sil24.c @@ -63,21 +63,6 @@ enum { SIL24_HOST_BAR = 0, SIL24_PORT_BAR = 2, - /* sil24 fetches in chunks of 64bytes. The first block - * contains the PRB and two SGEs. From the second block, it's - * consisted of four SGEs and called SGT. Calculate the - * number of SGTs that fit into one page. - */ - SIL24_PRB_SZ = sizeof(struct sil24_prb) - + 2 * sizeof(struct sil24_sge), - SIL24_MAX_SGT = (PAGE_SIZE - SIL24_PRB_SZ) - / (4 * sizeof(struct sil24_sge)), - - /* This will give us one unused SGEs for ATA. This extra SGE - * will be used to store CDB for ATAPI devices. - */ - SIL24_MAX_SGE = 4 * SIL24_MAX_SGT + 1, - /* * Global controller registers (128 bytes @ BAR0) */ @@ -262,13 +247,13 @@ enum { struct sil24_ata_block { struct sil24_prb prb; - struct sil24_sge sge[SIL24_MAX_SGE]; + struct sil24_sge sge[LIBATA_MAX_PRD]; }; struct sil24_atapi_block { struct sil24_prb prb; u8 cdb[16]; - struct sil24_sge sge[SIL24_MAX_SGE]; + struct sil24_sge sge[LIBATA_MAX_PRD - 1]; }; union sil24_cmd_block { @@ -393,7 +378,7 @@ static struct scsi_host_template sil24_sht = { .change_queue_depth = ata_scsi_change_queue_depth, .can_queue = SIL24_MAX_CMDS, .this_id = ATA_SHT_THIS_ID, - .sg_tablesize = SIL24_MAX_SGE, + .sg_tablesize = LIBATA_MAX_PRD, .cmd_per_lun = ATA_SHT_CMD_PER_LUN, .emulated = ATA_SHT_EMULATED, .use_clustering = ATA_SHT_USE_CLUSTERING, @@ -1299,7 +1284,6 @@ static void sil24_init_controller(struct ata_host *host) static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { - extern int __MARKER__sil24_cmd_block_is_sized_wrongly; static int printed_version; struct ata_port_info pi = sil24_port_info[ent->driver_data]; const struct ata_port_info *ppi[] = { &pi, NULL }; @@ -1308,10 +1292,6 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) int i, rc; u32 tmp; - /* cause link error if sil24_cmd_block is sized wrongly */ - if (sizeof(union sil24_cmd_block) != PAGE_SIZE) - __MARKER__sil24_cmd_block_is_sized_wrongly = 1; - if (!printed_version++) dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); diff --git a/trunk/drivers/atm/he.c b/trunk/drivers/atm/he.c index 3b64a99772ea..d33aba6864c2 100644 --- a/trunk/drivers/atm/he.c +++ b/trunk/drivers/atm/he.c @@ -394,11 +394,6 @@ he_init_one(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent) he_dev->atm_dev->dev_data = he_dev; atm_dev->dev_data = he_dev; he_dev->number = atm_dev->number; -#ifdef USE_TASKLET - tasklet_init(&he_dev->tasklet, he_tasklet, (unsigned long) he_dev); -#endif - spin_lock_init(&he_dev->global_lock); - if (he_start(atm_dev)) { he_stop(he_dev); err = -ENODEV; @@ -1178,6 +1173,11 @@ he_start(struct atm_dev *dev) if ((err = he_init_irq(he_dev)) != 0) return err; +#ifdef USE_TASKLET + tasklet_init(&he_dev->tasklet, he_tasklet, (unsigned long) he_dev); +#endif + spin_lock_init(&he_dev->global_lock); + /* 4.11 enable pci bus controller state machines */ host_cntl |= (OUTFF_ENB | CMDFF_ENB | QUICK_RD_RETRY | QUICK_WR_RETRY | PERR_INT_ENB); diff --git a/trunk/drivers/base/core.c b/trunk/drivers/base/core.c index 2683eac30c68..3f4d6aa13990 100644 --- a/trunk/drivers/base/core.c +++ b/trunk/drivers/base/core.c @@ -770,10 +770,9 @@ int device_add(struct device *dev) error = device_add_attrs(dev); if (error) goto AttrsError; - error = dpm_sysfs_add(dev); + error = device_pm_add(dev); if (error) goto PMError; - device_pm_add(dev); error = bus_add_device(dev); if (error) goto BusError; @@ -798,7 +797,6 @@ int device_add(struct device *dev) return error; BusError: device_pm_remove(dev); - dpm_sysfs_remove(dev); PMError: if (dev->bus) blocking_notifier_call_chain(&dev->bus->bus_notifier, diff --git a/trunk/drivers/base/power/Makefile b/trunk/drivers/base/power/Makefile index 44504e6618fb..a803733c839e 100644 --- a/trunk/drivers/base/power/Makefile +++ b/trunk/drivers/base/power/Makefile @@ -1,6 +1,5 @@ obj-y := shutdown.o -obj-$(CONFIG_PM) += sysfs.o -obj-$(CONFIG_PM_SLEEP) += main.o +obj-$(CONFIG_PM_SLEEP) += main.o sysfs.o obj-$(CONFIG_PM_TRACE) += trace.o ifeq ($(CONFIG_DEBUG_DRIVER),y) diff --git a/trunk/drivers/base/power/main.c b/trunk/drivers/base/power/main.c index 691ffb64cc37..0ab4ab21f564 100644 --- a/trunk/drivers/base/power/main.c +++ b/trunk/drivers/base/power/main.c @@ -38,14 +38,20 @@ static DEFINE_MUTEX(dpm_list_mtx); int (*platform_enable_wakeup)(struct device *dev, int is_on); -void device_pm_add(struct device *dev) +int device_pm_add(struct device *dev) { + int error; + pr_debug("PM: Adding info for %s:%s\n", dev->bus ? dev->bus->name : "No Bus", kobject_name(&dev->kobj)); mutex_lock(&dpm_list_mtx); list_add_tail(&dev->power.entry, &dpm_active); + error = dpm_sysfs_add(dev); + if (error) + list_del(&dev->power.entry); mutex_unlock(&dpm_list_mtx); + return error; } void device_pm_remove(struct device *dev) diff --git a/trunk/drivers/base/power/power.h b/trunk/drivers/base/power/power.h index 379da4e958e0..5c4efd493fa5 100644 --- a/trunk/drivers/base/power/power.h +++ b/trunk/drivers/base/power/power.h @@ -13,29 +13,14 @@ extern void device_shutdown(void); extern struct list_head dpm_active; /* The active device list */ -static inline struct device *to_device(struct list_head *entry) +static inline struct device * to_device(struct list_head * entry) { return container_of(entry, struct device, power.entry); } -extern void device_pm_add(struct device *); +extern int device_pm_add(struct device *); extern void device_pm_remove(struct device *); -#else /* CONFIG_PM_SLEEP */ - - -static inline void device_pm_add(struct device *dev) -{ -} - -static inline void device_pm_remove(struct device *dev) -{ -} - -#endif - -#ifdef CONFIG_PM - /* * sysfs.c */ @@ -43,15 +28,16 @@ static inline void device_pm_remove(struct device *dev) extern int dpm_sysfs_add(struct device *); extern void dpm_sysfs_remove(struct device *); -#else /* CONFIG_PM */ +#else /* CONFIG_PM_SLEEP */ + -static inline int dpm_sysfs_add(struct device *dev) +static inline int device_pm_add(struct device * dev) { return 0; } - -static inline void dpm_sysfs_remove(struct device *dev) +static inline void device_pm_remove(struct device * dev) { + } #endif diff --git a/trunk/drivers/block/virtio_blk.c b/trunk/drivers/block/virtio_blk.c index 924ddd8bccd2..3cf7129d83e6 100644 --- a/trunk/drivers/block/virtio_blk.c +++ b/trunk/drivers/block/virtio_blk.c @@ -223,7 +223,7 @@ static int virtblk_probe(struct virtio_device *vdev) err = virtio_config_val(vdev, VIRTIO_CONFIG_BLK_F_CAPACITY, &cap); if (err) { dev_err(&vdev->dev, "Bad/missing capacity in config\n"); - goto out_cleanup_queue; + goto out_put_disk; } /* If capacity is too big, truncate with warning. */ @@ -239,7 +239,7 @@ static int virtblk_probe(struct virtio_device *vdev) blk_queue_max_segment_size(vblk->disk->queue, v); else if (err != -ENOENT) { dev_err(&vdev->dev, "Bad SIZE_MAX in config\n"); - goto out_cleanup_queue; + goto out_put_disk; } err = virtio_config_val(vdev, VIRTIO_CONFIG_BLK_F_SEG_MAX, &v); @@ -247,14 +247,12 @@ static int virtblk_probe(struct virtio_device *vdev) blk_queue_max_hw_segments(vblk->disk->queue, v); else if (err != -ENOENT) { dev_err(&vdev->dev, "Bad SEG_MAX in config\n"); - goto out_cleanup_queue; + goto out_put_disk; } add_disk(vblk->disk); return 0; -out_cleanup_queue: - blk_cleanup_queue(vblk->disk->queue); out_put_disk: put_disk(vblk->disk); out_unregister_blkdev: @@ -279,8 +277,6 @@ static void virtblk_remove(struct virtio_device *vdev) put_disk(vblk->disk); unregister_blkdev(major, "virtblk"); mempool_destroy(vblk->pool); - /* There should be nothing in the queue now, so no need to shutdown */ - vdev->config->del_vq(vblk->vq); kfree(vblk); } diff --git a/trunk/drivers/char/Kconfig b/trunk/drivers/char/Kconfig index a509b8d79781..bf18d757b876 100644 --- a/trunk/drivers/char/Kconfig +++ b/trunk/drivers/char/Kconfig @@ -457,7 +457,7 @@ config LEGACY_PTYS config LEGACY_PTY_COUNT int "Maximum number of legacy PTY in use" depends on LEGACY_PTYS - range 0 256 + range 1 256 default "256" ---help--- The maximum number of legacy PTYs that can be used at any one time. diff --git a/trunk/drivers/char/sonypi.c b/trunk/drivers/char/sonypi.c index 921c6d2bc8fc..877e53dcb996 100644 --- a/trunk/drivers/char/sonypi.c +++ b/trunk/drivers/char/sonypi.c @@ -1163,7 +1163,7 @@ static struct acpi_driver sonypi_acpi_driver = { }; #endif -static int __devinit sonypi_create_input_devices(struct platform_device *pdev) +static int __devinit sonypi_create_input_devices(void) { struct input_dev *jog_dev; struct input_dev *key_dev; @@ -1177,7 +1177,6 @@ static int __devinit sonypi_create_input_devices(struct platform_device *pdev) jog_dev->name = "Sony Vaio Jogdial"; jog_dev->id.bustype = BUS_ISA; jog_dev->id.vendor = PCI_VENDOR_ID_SONY; - jog_dev->dev.parent = &pdev->dev; jog_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); jog_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_MIDDLE); @@ -1192,7 +1191,6 @@ static int __devinit sonypi_create_input_devices(struct platform_device *pdev) key_dev->name = "Sony Vaio Keys"; key_dev->id.bustype = BUS_ISA; key_dev->id.vendor = PCI_VENDOR_ID_SONY; - key_dev->dev.parent = &pdev->dev; /* Initialize the Input Drivers: special keys */ key_dev->evbit[0] = BIT_MASK(EV_KEY); @@ -1387,7 +1385,7 @@ static int __devinit sonypi_probe(struct platform_device *dev) if (useinput) { - error = sonypi_create_input_devices(dev); + error = sonypi_create_input_devices(); if (error) { printk(KERN_ERR "sonypi: failed to create input devices\n"); @@ -1434,7 +1432,7 @@ static int __devexit sonypi_remove(struct platform_device *dev) { sonypi_disable(); - synchronize_irq(sonypi_device.irq); + synchronize_sched(); /* Allow sonypi interrupt to complete. */ flush_scheduled_work(); if (useinput) { diff --git a/trunk/drivers/char/tpm/tpm_tis.c b/trunk/drivers/char/tpm/tpm_tis.c index 81503d94fecc..fd771a4d6d18 100644 --- a/trunk/drivers/char/tpm/tpm_tis.c +++ b/trunk/drivers/char/tpm/tpm_tis.c @@ -450,11 +450,6 @@ static int tpm_tis_init(struct device *dev, resource_size_t start, goto out_err; } - if (request_locality(chip, 0) != 0) { - rc = -ENODEV; - goto out_err; - } - vendor = ioread32(chip->vendor.iobase + TPM_DID_VID(0)); /* Default timeouts */ @@ -492,6 +487,11 @@ static int tpm_tis_init(struct device *dev, resource_size_t start, if (intfcaps & TPM_INTF_DATA_AVAIL_INT) dev_dbg(dev, "\tData Avail Int Support\n"); + if (request_locality(chip, 0) != 0) { + rc = -ENODEV; + goto out_err; + } + /* INTERRUPT Setup */ init_waitqueue_head(&chip->vendor.read_queue); init_waitqueue_head(&chip->vendor.int_queue); diff --git a/trunk/drivers/dma/Kconfig b/trunk/drivers/dma/Kconfig index c46b7c219ee9..6a7d25fc2470 100644 --- a/trunk/drivers/dma/Kconfig +++ b/trunk/drivers/dma/Kconfig @@ -3,13 +3,11 @@ # menuconfig DMADEVICES - bool "DMA Engine support" + bool "DMA Offload Engine support" depends on (PCI && X86) || ARCH_IOP32X || ARCH_IOP33X || ARCH_IOP13XX help - DMA engines can do asynchronous data transfers without - involving the host CPU. Currently, this framework can be - used to offload memory copies in the network stack and - RAID operations in the MD driver. + Intel(R) offload engines enable offloading memory copies in the + network stack and RAID operations in the MD driver. if DMADEVICES diff --git a/trunk/drivers/ide/Kconfig b/trunk/drivers/ide/Kconfig index 45b22282f149..e445fe6e4ba9 100644 --- a/trunk/drivers/ide/Kconfig +++ b/trunk/drivers/ide/Kconfig @@ -313,6 +313,7 @@ comment "IDE chipset support/bugfixes" config IDE_GENERIC tristate "generic/default IDE chipset support" + default H8300 help If unsure, say N. @@ -483,7 +484,6 @@ config WDC_ALI15X3 config BLK_DEV_AMD74XX tristate "AMD and nVidia IDE support" - depends on !ARM select BLK_DEV_IDEDMA_PCI help This driver adds explicit support for AMD-7xx and AMD-8111 chips @@ -883,49 +883,6 @@ config BLK_DEV_IDE_BAST Say Y here if you want to support the onboard IDE channels on the Simtec BAST or the Thorcom VR1000 -config ETRAX_IDE - bool "ETRAX IDE support" - depends on CRIS && BROKEN - select BLK_DEV_IDEDMA - select IDE_GENERIC - help - Enables the ETRAX IDE driver. - - You can't use parallel ports or SCSI ports at the same time. - -config ETRAX_IDE_DELAY - int "Delay for drives to regain consciousness" - depends on ETRAX_IDE && ETRAX_ARCH_V10 - default 15 - help - Number of seconds to wait for IDE drives to spin up after an IDE - reset. - -choice - prompt "IDE reset pin" - depends on ETRAX_IDE && ETRAX_ARCH_V10 - default ETRAX_IDE_PB7_RESET - -config ETRAX_IDE_PB7_RESET - bool "Port_PB_Bit_7" - help - IDE reset on pin 7 on port B - -config ETRAX_IDE_G27_RESET - bool "Port_G_Bit_27" - help - IDE reset on pin 27 on port G - -endchoice - -config IDE_H8300 - bool "H8300 IDE support" - depends on H8300 - select IDE_GENERIC - default y - help - Enables the H8300 IDE driver. - config BLK_DEV_GAYLE bool "Amiga Gayle IDE interface support" depends on AMIGA @@ -1006,7 +963,7 @@ config BLK_DEV_Q40IDE config BLK_DEV_MPC8xx_IDE bool "MPC8xx IDE support" - depends on 8xx && (LWMON || IVMS8 || IVML24 || TQM8xxL) && IDE=y && BLK_DEV_IDE=y && !PPC_MERGE + depends on 8xx && IDE=y && BLK_DEV_IDE=y && !PPC_MERGE select IDE_GENERIC help This option provides support for IDE on Motorola MPC8xx Systems. diff --git a/trunk/drivers/ide/Makefile b/trunk/drivers/ide/Makefile index b181fc672057..75dc6969e0a7 100644 --- a/trunk/drivers/ide/Makefile +++ b/trunk/drivers/ide/Makefile @@ -39,7 +39,7 @@ ide-core-$(CONFIG_BLK_DEV_MPC8xx_IDE) += ppc/mpc8xx.o ide-core-$(CONFIG_BLK_DEV_IDE_PMAC) += ppc/pmac.o # built-in only drivers from h8300/ -ide-core-$(CONFIG_IDE_H8300) += h8300/ide-h8300.o +ide-core-$(CONFIG_H8300) += h8300/ide-h8300.o obj-$(CONFIG_BLK_DEV_IDE) += ide-core.o obj-$(CONFIG_IDE_GENERIC) += ide-generic.o diff --git a/trunk/drivers/ide/cris/ide-cris.c b/trunk/drivers/ide/cris/ide-cris.c index 476e0d65ed43..7f5bc2ee6c7e 100644 --- a/trunk/drivers/ide/cris/ide-cris.c +++ b/trunk/drivers/ide/cris/ide-cris.c @@ -773,16 +773,15 @@ init_e100_ide (void) /* the IDE control register is at ATA address 6, with CS1 active instead of CS0 */ ide_offsets[IDE_CONTROL_OFFSET] = cris_ide_reg_addr(6, 1, 0); - for (h = 0; h < 4; h++) { - ide_hwif_t *hwif = NULL; + /* first fill in some stuff in the ide_hwifs fields */ + for(h = 0; h < MAX_HWIFS; h++) { + ide_hwif_t *hwif = &ide_hwifs[h]; ide_setup_ports(&hw, cris_ide_base_address(h), ide_offsets, 0, 0, cris_ide_ack_intr, ide_default_irq(0)); ide_register_hw(&hw, NULL, 1, &hwif); - if (hwif == NULL) - continue; hwif->mmio = 1; hwif->chipset = ide_etrax100; hwif->set_pio_mode = &cris_set_pio_mode; diff --git a/trunk/drivers/ide/ide-dma.c b/trunk/drivers/ide/ide-dma.c index 0d795a1678c7..e3add70b9cd8 100644 --- a/trunk/drivers/ide/ide-dma.c +++ b/trunk/drivers/ide/ide-dma.c @@ -130,7 +130,6 @@ static const struct drive_list_entry drive_blacklist [] = { { "_NEC DV5800A", NULL }, { "SAMSUNG CD-ROM SN-124", "N001" }, { "Seagate STT20000A", NULL }, - { "CD-ROM CDR_U200", "1.09" }, { NULL , NULL } }; diff --git a/trunk/drivers/ide/ide-iops.c b/trunk/drivers/ide/ide-iops.c index 5c3256180ae5..e17a9ee120ea 100644 --- a/trunk/drivers/ide/ide-iops.c +++ b/trunk/drivers/ide/ide-iops.c @@ -303,6 +303,9 @@ void default_hwif_transport(ide_hwif_t *hwif) hwif->atapi_output_bytes = atapi_output_bytes; } +/* + * Beginning of Taskfile OPCODE Library and feature sets. + */ void ide_fix_driveid (struct hd_driveid *id) { #ifndef __LITTLE_ENDIAN @@ -589,9 +592,6 @@ EXPORT_SYMBOL_GPL(ide_in_drive_list); static const struct drive_list_entry ivb_list[] = { { "QUANTUM FIREBALLlct10 05" , "A03.0900" }, { "TSSTcorp CDDVDW SH-S202J" , "SB00" }, - { "TSSTcorp CDDVDW SH-S202J" , "SB01" }, - { "TSSTcorp CDDVDW SH-S202N" , "SB00" }, - { "TSSTcorp CDDVDW SH-S202N" , "SB01" }, { NULL , NULL } }; @@ -756,7 +756,7 @@ int ide_driveid_update(ide_drive_t *drive) int ide_config_drive_speed(ide_drive_t *drive, u8 speed) { ide_hwif_t *hwif = drive->hwif; - int error = 0; + int error; u8 stat; // while (HWGROUP(drive)->busy) @@ -767,10 +767,6 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed) hwif->dma_host_off(drive); #endif - /* Skip setting PIO flow-control modes on pre-EIDE drives */ - if ((speed & 0xf8) == XFER_PIO_0 && !(drive->id->capability & 0x08)) - goto skip; - /* * Don't use ide_wait_cmd here - it will * attempt to set_geometry and recalibrate, @@ -818,7 +814,6 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed) drive->id->dma_mword &= ~0x0F00; drive->id->dma_1word &= ~0x0F00; - skip: #ifdef CONFIG_BLK_DEV_IDEDMA if (speed >= XFER_SW_DMA_0) hwif->dma_host_on(drive); diff --git a/trunk/drivers/ide/ide-probe.c b/trunk/drivers/ide/ide-probe.c index ee848c705995..56fb0b843429 100644 --- a/trunk/drivers/ide/ide-probe.c +++ b/trunk/drivers/ide/ide-probe.c @@ -644,7 +644,7 @@ static void hwif_register (ide_hwif_t *hwif) static int wait_hwif_ready(ide_hwif_t *hwif) { - int unit, rc; + int rc; printk(KERN_DEBUG "Probing IDE interface %s...\n", hwif->name); @@ -661,26 +661,20 @@ static int wait_hwif_ready(ide_hwif_t *hwif) return rc; /* Now make sure both master & slave are ready */ - for (unit = 0; unit < MAX_DRIVES; unit++) { - ide_drive_t *drive = &hwif->drives[unit]; + SELECT_DRIVE(&hwif->drives[0]); + hwif->OUTB(8, hwif->io_ports[IDE_CONTROL_OFFSET]); + mdelay(2); + rc = ide_wait_not_busy(hwif, 35000); + if (rc) + return rc; + SELECT_DRIVE(&hwif->drives[1]); + hwif->OUTB(8, hwif->io_ports[IDE_CONTROL_OFFSET]); + mdelay(2); + rc = ide_wait_not_busy(hwif, 35000); - /* Ignore disks that we will not probe for later. */ - if (!drive->noprobe || drive->present) { - SELECT_DRIVE(drive); - hwif->OUTB(8, hwif->io_ports[IDE_CONTROL_OFFSET]); - mdelay(2); - rc = ide_wait_not_busy(hwif, 35000); - if (rc) - goto out; - } else - printk(KERN_DEBUG "%s: ide_wait_not_busy() skipped\n", - drive->name); - } -out: /* Exit function with master reselected (let's be sane) */ - if (unit) - SELECT_DRIVE(&hwif->drives[0]); - + SELECT_DRIVE(&hwif->drives[0]); + return rc; } diff --git a/trunk/drivers/ide/legacy/ali14xx.c b/trunk/drivers/ide/legacy/ali14xx.c index 38c3a6d63f30..10311ecc674a 100644 --- a/trunk/drivers/ide/legacy/ali14xx.c +++ b/trunk/drivers/ide/legacy/ali14xx.c @@ -53,13 +53,12 @@ /* port addresses for auto-detection */ #define ALI_NUM_PORTS 4 -static const int ports[ALI_NUM_PORTS] __initdata = - { 0x074, 0x0f4, 0x034, 0x0e4 }; +static int ports[ALI_NUM_PORTS] __initdata = {0x074, 0x0f4, 0x034, 0x0e4}; /* register initialization data */ typedef struct { u8 reg, data; } RegInitializer; -static const RegInitializer initData[] __initdata = { +static RegInitializer initData[] __initdata = { {0x01, 0x0f}, {0x02, 0x00}, {0x03, 0x00}, {0x04, 0x00}, {0x05, 0x00}, {0x06, 0x00}, {0x07, 0x2b}, {0x0a, 0x0f}, {0x25, 0x00}, {0x26, 0x00}, {0x27, 0x00}, {0x28, 0x00}, @@ -178,7 +177,7 @@ static int __init findPort (void) * Initialize controller registers with default values. */ static int __init initRegisters (void) { - const RegInitializer *p; + RegInitializer *p; u8 t; unsigned long flags; diff --git a/trunk/drivers/ide/legacy/macide.c b/trunk/drivers/ide/legacy/macide.c index 5c6aa77c2370..e87cd2f16430 100644 --- a/trunk/drivers/ide/legacy/macide.c +++ b/trunk/drivers/ide/legacy/macide.c @@ -81,7 +81,7 @@ int macide_ack_intr(ide_hwif_t* hwif) * Probe for a Macintosh IDE interface */ -void __init macide_init(void) +void macide_init(void) { hw_regs_t hw; ide_hwif_t *hwif; diff --git a/trunk/drivers/ide/legacy/q40ide.c b/trunk/drivers/ide/legacy/q40ide.c index 6ea46a6723e2..a73db1bd482d 100644 --- a/trunk/drivers/ide/legacy/q40ide.c +++ b/trunk/drivers/ide/legacy/q40ide.c @@ -111,7 +111,7 @@ static const char *q40_ide_names[Q40IDE_NUM_HWIFS]={ * Probe for Q40 IDE interfaces */ -void __init q40ide_init(void) +void q40ide_init(void) { int i; ide_hwif_t *hwif; diff --git a/trunk/drivers/ide/pci/aec62xx.c b/trunk/drivers/ide/pci/aec62xx.c index 44268504ae43..19ec421f7b9f 100644 --- a/trunk/drivers/ide/pci/aec62xx.c +++ b/trunk/drivers/ide/pci/aec62xx.c @@ -260,11 +260,6 @@ static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_devi { struct ide_port_info d; u8 idx = id->driver_data; - int err; - - err = pci_enable_device(dev); - if (err) - return err; d = aec62xx_chipsets[idx]; @@ -277,11 +272,7 @@ static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_devi } } - err = ide_setup_pci_device(dev, &d); - if (err) - pci_disable_device(dev); - - return err; + return ide_setup_pci_device(dev, &d); } static const struct pci_device_id aec62xx_pci_tbl[] = { diff --git a/trunk/drivers/ide/pci/alim15x3.c b/trunk/drivers/ide/pci/alim15x3.c index ce293936af4b..a607dd31a64c 100644 --- a/trunk/drivers/ide/pci/alim15x3.c +++ b/trunk/drivers/ide/pci/alim15x3.c @@ -603,11 +603,6 @@ static int ali_cable_override(struct pci_dev *pdev) pdev->subsystem_device == 0x10AF) return 1; - /* Mitac 8317 (Winbook-A) and relatives */ - if (pdev->subsystem_vendor == 0x1071 && - pdev->subsystem_device == 0x8317) - return 1; - /* Systems by DMI */ if (dmi_check_system(cable_dmi_table)) return 1; diff --git a/trunk/drivers/ide/pci/piix.c b/trunk/drivers/ide/pci/piix.c index 27781d294cea..63625a0be712 100644 --- a/trunk/drivers/ide/pci/piix.c +++ b/trunk/drivers/ide/pci/piix.c @@ -306,7 +306,6 @@ static const struct ich_laptop ich_laptop[] = { { 0x27DF, 0x0005, 0x0280 }, /* ICH7 on Acer 5602WLMi */ { 0x27DF, 0x1025, 0x0110 }, /* ICH7 on Acer 3682WLMi */ { 0x27DF, 0x1043, 0x1267 }, /* ICH7 on Asus W5F */ - { 0x27DF, 0x103C, 0x30A1 }, /* ICH7 on HP Compaq nc2400 */ { 0x24CA, 0x1025, 0x0061 }, /* ICH4 on Acer Aspire 2023WLMi */ /* end marker */ { 0, } diff --git a/trunk/drivers/ide/pci/siimage.c b/trunk/drivers/ide/pci/siimage.c index 5709c252543b..6d99441c605b 100644 --- a/trunk/drivers/ide/pci/siimage.c +++ b/trunk/drivers/ide/pci/siimage.c @@ -1,5 +1,5 @@ /* - * linux/drivers/ide/pci/siimage.c Version 1.19 Nov 16 2007 + * linux/drivers/ide/pci/siimage.c Version 1.18 Oct 18 2007 * * Copyright (C) 2001-2002 Andre Hedrick * Copyright (C) 2003 Red Hat @@ -459,6 +459,48 @@ static void sil_sata_pre_reset(ide_drive_t *drive) } } +/** + * siimage_reset - reset a device on an siimage controller + * @drive: drive to reset + * + * Perform a controller level reset fo the device. For + * SATA we must also check the PHY. + */ + +static void siimage_reset (ide_drive_t *drive) +{ + ide_hwif_t *hwif = HWIF(drive); + u8 reset = 0; + unsigned long addr = siimage_selreg(hwif, 0); + + if (hwif->mmio) { + reset = hwif->INB(addr); + hwif->OUTB((reset|0x03), addr); + /* FIXME:posting */ + udelay(25); + hwif->OUTB(reset, addr); + (void) hwif->INB(addr); + } else { + pci_read_config_byte(hwif->pci_dev, addr, &reset); + pci_write_config_byte(hwif->pci_dev, addr, reset|0x03); + udelay(25); + pci_write_config_byte(hwif->pci_dev, addr, reset); + pci_read_config_byte(hwif->pci_dev, addr, &reset); + } + + if (SATA_STATUS_REG) { + /* SATA_STATUS_REG is valid only when in MMIO mode */ + u32 sata_stat = readl((void __iomem *)SATA_STATUS_REG); + printk(KERN_WARNING "%s: reset phy, status=0x%08x, %s\n", + hwif->name, sata_stat, __FUNCTION__); + if (!(sata_stat)) { + printk(KERN_WARNING "%s: reset phy dead, status=0x%08x\n", + hwif->name, sata_stat); + drive->failures++; + } + } +} + /** * proc_reports_siimage - add siimage controller to proc * @dev: PCI device @@ -815,6 +857,7 @@ static void __devinit init_hwif_siimage(ide_hwif_t *hwif) { u8 sata = is_sata(hwif); + hwif->resetproc = &siimage_reset; hwif->set_pio_mode = &sil_set_pio_mode; hwif->set_dma_mode = &sil_set_dma_mode; diff --git a/trunk/drivers/ide/pci/sis5513.c b/trunk/drivers/ide/pci/sis5513.c index d90b42917775..f6e2ab3dd166 100644 --- a/trunk/drivers/ide/pci/sis5513.c +++ b/trunk/drivers/ide/pci/sis5513.c @@ -526,7 +526,6 @@ static const struct sis_laptop sis_laptop[] = { /* devid, subvendor, subdev */ { 0x5513, 0x1043, 0x1107 }, /* ASUS A6K */ { 0x5513, 0x1734, 0x105f }, /* FSC Amilo A1630 */ - { 0x5513, 0x1071, 0x8640 }, /* EasyNote K5305 */ /* end marker */ { 0, } }; diff --git a/trunk/drivers/ide/pci/trm290.c b/trunk/drivers/ide/pci/trm290.c index 0895e753a35d..5011ba22e36c 100644 --- a/trunk/drivers/ide/pci/trm290.c +++ b/trunk/drivers/ide/pci/trm290.c @@ -240,6 +240,9 @@ static int trm290_ide_dma_test_irq (ide_drive_t *drive) return (status == 0x00ff); } +/* + * Invoked from ide-dma.c at boot time. + */ static void __devinit init_hwif_trm290(ide_hwif_t *hwif) { unsigned int cfgbase = 0; diff --git a/trunk/drivers/ide/ppc/pmac.c b/trunk/drivers/ide/ppc/pmac.c index 7f7a59885777..5afdfef7264c 100644 --- a/trunk/drivers/ide/ppc/pmac.c +++ b/trunk/drivers/ide/ppc/pmac.c @@ -1513,7 +1513,7 @@ pmac_ide_build_dmatable(ide_drive_t *drive, struct request *rq) if (pmif->broken_dma && cur_addr & (L1_CACHE_BYTES - 1)) { if (pmif->broken_dma_warn == 0) { - printk(KERN_WARNING "%s: DMA on non aligned address, " + printk(KERN_WARNING "%s: DMA on non aligned address," "switching to PIO on Ohare chipset\n", drive->name); pmif->broken_dma_warn = 1; } diff --git a/trunk/drivers/infiniband/hw/ehca/ehca_qp.c b/trunk/drivers/infiniband/hw/ehca/ehca_qp.c index dd126681fed0..2e3e6547cb78 100644 --- a/trunk/drivers/infiniband/hw/ehca/ehca_qp.c +++ b/trunk/drivers/infiniband/hw/ehca/ehca_qp.c @@ -1203,7 +1203,7 @@ static int internal_modify_qp(struct ib_qp *ibqp, mqpcb->service_level = attr->ah_attr.sl; update_mask |= EHCA_BMASK_SET(MQPCB_MASK_SERVICE_LEVEL, 1); - if (ehca_calc_ipd(shca, mqpcb->prim_phys_port, + if (ehca_calc_ipd(shca, my_qp->init_attr.port_num, attr->ah_attr.static_rate, &mqpcb->max_static_rate)) { ret = -EINVAL; @@ -1302,7 +1302,7 @@ static int internal_modify_qp(struct ib_qp *ibqp, mqpcb->source_path_bits_al = attr->alt_ah_attr.src_path_bits; mqpcb->service_level_al = attr->alt_ah_attr.sl; - if (ehca_calc_ipd(shca, mqpcb->alt_phys_port, + if (ehca_calc_ipd(shca, my_qp->init_attr.port_num, attr->alt_ah_attr.static_rate, &mqpcb->max_static_rate_al)) { ret = -EINVAL; diff --git a/trunk/drivers/infiniband/hw/ipath/ipath_cq.c b/trunk/drivers/infiniband/hw/ipath/ipath_cq.c index d1380c7a1703..08d8ae148cd0 100644 --- a/trunk/drivers/infiniband/hw/ipath/ipath_cq.c +++ b/trunk/drivers/infiniband/hw/ipath/ipath_cq.c @@ -395,9 +395,12 @@ int ipath_resize_cq(struct ib_cq *ibcq, int cqe, struct ib_udata *udata) goto bail; } - /* Check that we can write the offset to mmap. */ + /* + * Return the address of the WC as the offset to mmap. + * See ipath_mmap() for details. + */ if (udata && udata->outlen >= sizeof(__u64)) { - __u64 offset = 0; + __u64 offset = (__u64) wc; ret = ib_copy_to_udata(udata, &offset, sizeof(offset)); if (ret) @@ -447,18 +450,6 @@ int ipath_resize_cq(struct ib_cq *ibcq, int cqe, struct ib_udata *udata) struct ipath_mmap_info *ip = cq->ip; ipath_update_mmap_info(dev, ip, sz, wc); - - /* - * Return the offset to mmap. - * See ipath_mmap() for details. - */ - if (udata && udata->outlen >= sizeof(__u64)) { - ret = ib_copy_to_udata(udata, &ip->offset, - sizeof(ip->offset)); - if (ret) - goto bail; - } - spin_lock_irq(&dev->pending_lock); if (list_empty(&ip->pending_mmaps)) list_add(&ip->pending_mmaps, &dev->pending_mmaps); diff --git a/trunk/drivers/infiniband/hw/ipath/ipath_qp.c b/trunk/drivers/infiniband/hw/ipath/ipath_qp.c index b997ff88401b..6a41fdbc8e57 100644 --- a/trunk/drivers/infiniband/hw/ipath/ipath_qp.c +++ b/trunk/drivers/infiniband/hw/ipath/ipath_qp.c @@ -835,8 +835,7 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd, init_attr->qp_type); if (err) { ret = ERR_PTR(err); - vfree(qp->r_rq.wq); - goto bail_qp; + goto bail_rwq; } qp->ip = NULL; ipath_reset_qp(qp); @@ -864,7 +863,7 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd, sizeof(offset)); if (err) { ret = ERR_PTR(err); - goto bail_ip; + goto bail_rwq; } } else { u32 s = sizeof(struct ipath_rwq) + @@ -876,7 +875,7 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd, qp->r_rq.wq); if (!qp->ip) { ret = ERR_PTR(-ENOMEM); - goto bail_ip; + goto bail_rwq; } err = ib_copy_to_udata(udata, &(qp->ip->offset), @@ -908,11 +907,9 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd, goto bail; bail_ip: - if (qp->ip) - kref_put(&qp->ip->ref, ipath_release_mmap_info); - else - vfree(qp->r_rq.wq); - ipath_free_qp(&dev->qp_table, qp); + kfree(qp->ip); +bail_rwq: + vfree(qp->r_rq.wq); bail_qp: kfree(qp); bail_swq: diff --git a/trunk/drivers/infiniband/hw/ipath/ipath_srq.c b/trunk/drivers/infiniband/hw/ipath/ipath_srq.c index 2fef36f4b675..40c36ec19016 100644 --- a/trunk/drivers/infiniband/hw/ipath/ipath_srq.c +++ b/trunk/drivers/infiniband/hw/ipath/ipath_srq.c @@ -59,7 +59,7 @@ int ipath_post_srq_receive(struct ib_srq *ibsrq, struct ib_recv_wr *wr, if ((unsigned) wr->num_sge > srq->rq.max_sge) { *bad_wr = wr; - ret = -EINVAL; + ret = -ENOMEM; goto bail; } @@ -211,11 +211,11 @@ int ipath_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr, struct ib_udata *udata) { struct ipath_srq *srq = to_isrq(ibsrq); - struct ipath_rwq *wq; int ret = 0; if (attr_mask & IB_SRQ_MAX_WR) { struct ipath_rwq *owq; + struct ipath_rwq *wq; struct ipath_rwqe *p; u32 sz, size, n, head, tail; @@ -236,20 +236,27 @@ int ipath_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr, goto bail; } - /* Check that we can write the offset to mmap. */ + /* + * Return the address of the RWQ as the offset to mmap. + * See ipath_mmap() for details. + */ if (udata && udata->inlen >= sizeof(__u64)) { __u64 offset_addr; - __u64 offset = 0; + __u64 offset = (__u64) wq; ret = ib_copy_from_udata(&offset_addr, udata, sizeof(offset_addr)); - if (ret) - goto bail_free; + if (ret) { + vfree(wq); + goto bail; + } udata->outbuf = (void __user *) offset_addr; ret = ib_copy_to_udata(udata, &offset, sizeof(offset)); - if (ret) - goto bail_free; + if (ret) { + vfree(wq); + goto bail; + } } spin_lock_irq(&srq->rq.lock); @@ -270,8 +277,10 @@ int ipath_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr, else n -= tail; if (size <= n) { + spin_unlock_irq(&srq->rq.lock); + vfree(wq); ret = -EINVAL; - goto bail_unlock; + goto bail; } n = 0; p = wq->wq; @@ -305,18 +314,6 @@ int ipath_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr, u32 s = sizeof(struct ipath_rwq) + size * sz; ipath_update_mmap_info(dev, ip, s, wq); - - /* - * Return the offset to mmap. - * See ipath_mmap() for details. - */ - if (udata && udata->inlen >= sizeof(__u64)) { - ret = ib_copy_to_udata(udata, &ip->offset, - sizeof(ip->offset)); - if (ret) - goto bail; - } - spin_lock_irq(&dev->pending_lock); if (list_empty(&ip->pending_mmaps)) list_add(&ip->pending_mmaps, @@ -331,12 +328,7 @@ int ipath_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr, srq->limit = attr->srq_limit; spin_unlock_irq(&srq->rq.lock); } - goto bail; -bail_unlock: - spin_unlock_irq(&srq->rq.lock); -bail_free: - vfree(wq); bail: return ret; } diff --git a/trunk/drivers/infiniband/hw/ipath/ipath_verbs.c b/trunk/drivers/infiniband/hw/ipath/ipath_verbs.c index c4c998446c7b..74f77e7c2c1b 100644 --- a/trunk/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/trunk/drivers/infiniband/hw/ipath/ipath_verbs.c @@ -302,10 +302,8 @@ static int ipath_post_one_send(struct ipath_qp *qp, struct ib_send_wr *wr) next = qp->s_head + 1; if (next >= qp->s_size) next = 0; - if (next == qp->s_last) { - ret = -ENOMEM; - goto bail; - } + if (next == qp->s_last) + goto bail_inval; wqe = get_swqe_ptr(qp, qp->s_head); wqe->wr = *wr; @@ -406,7 +404,7 @@ static int ipath_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr, if ((unsigned) wr->num_sge > qp->r_rq.max_sge) { *bad_wr = wr; - ret = -EINVAL; + ret = -ENOMEM; goto bail; } diff --git a/trunk/drivers/infiniband/ulp/iser/iser_memory.c b/trunk/drivers/infiniband/ulp/iser/iser_memory.c index 4a17743a639f..d68798061795 100644 --- a/trunk/drivers/infiniband/ulp/iser/iser_memory.c +++ b/trunk/drivers/infiniband/ulp/iser/iser_memory.c @@ -310,15 +310,13 @@ static unsigned int iser_data_buf_aligned_len(struct iser_data_buf *data, if (i + 1 < data->dma_nents) { next_addr = ib_sg_dma_address(ibdev, sg_next(sg)); /* are i, i+1 fragments of the same page? */ - if (end_addr == next_addr) { - cnt++; + if (end_addr == next_addr) continue; - } else if (!IS_4K_ALIGNED(end_addr)) { + else if (!IS_4K_ALIGNED(end_addr)) { ret_len = cnt + 1; break; } } - cnt++; } if (i == data->dma_nents) ret_len = cnt; /* loop ended */ diff --git a/trunk/drivers/input/keyboard/Kconfig b/trunk/drivers/input/keyboard/Kconfig index dfa6592c10f6..2316a018fae6 100644 --- a/trunk/drivers/input/keyboard/Kconfig +++ b/trunk/drivers/input/keyboard/Kconfig @@ -286,7 +286,7 @@ config KEYBOARD_MAPLE config KEYBOARD_BFIN tristate "Blackfin BF54x keypad support" - depends on (BF54x && !BF544) + depends on BF54x help Say Y here if you want to use the BF54x keypad. diff --git a/trunk/drivers/input/keyboard/gpio_keys.c b/trunk/drivers/input/keyboard/gpio_keys.c index 6a9ca4bdcb74..3eddf52a0bba 100644 --- a/trunk/drivers/input/keyboard/gpio_keys.c +++ b/trunk/drivers/input/keyboard/gpio_keys.c @@ -75,32 +75,16 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev) for (i = 0; i < pdata->nbuttons; i++) { struct gpio_keys_button *button = &pdata->buttons[i]; - int irq; + int irq = gpio_to_irq(button->gpio); unsigned int type = button->type ?: EV_KEY; - error = gpio_request(button->gpio, button->desc ?: "gpio_keys"); - if (error < 0) { - pr_err("gpio-keys: failed to request GPIO %d," - " error %d\n", button->gpio, error); - goto fail; - } - - error = gpio_direction_input(button->gpio); - if (error < 0) { - pr_err("gpio-keys: failed to configure input" - " direction for GPIO %d, error %d\n", - button->gpio, error); - gpio_free(button->gpio); - goto fail; - } - - irq = gpio_to_irq(button->gpio); if (irq < 0) { error = irq; - pr_err("gpio-keys: Unable to get irq number" - " for GPIO %d, error %d\n", + printk(KERN_ERR + "gpio-keys: " + "Unable to get irq number for GPIO %d," + "error %d\n", button->gpio, error); - gpio_free(button->gpio); goto fail; } @@ -110,9 +94,9 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev) button->desc ? button->desc : "gpio_keys", pdev); if (error) { - pr_err("gpio-keys: Unable to claim irq %d; error %d\n", + printk(KERN_ERR + "gpio-keys: Unable to claim irq %d; error %d\n", irq, error); - gpio_free(button->gpio); goto fail; } @@ -124,7 +108,8 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev) error = input_register_device(input); if (error) { - pr_err("gpio-keys: Unable to register input device, " + printk(KERN_ERR + "gpio-keys: Unable to register input device, " "error: %d\n", error); goto fail; } @@ -134,10 +119,8 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev) return 0; fail: - while (--i >= 0) { + while (--i >= 0) free_irq(gpio_to_irq(pdata->buttons[i].gpio), pdev); - gpio_free(pdata->buttons[i].gpio); - } platform_set_drvdata(pdev, NULL); input_free_device(input); @@ -156,7 +139,6 @@ static int __devexit gpio_keys_remove(struct platform_device *pdev) for (i = 0; i < pdata->nbuttons; i++) { int irq = gpio_to_irq(pdata->buttons[i].gpio); free_irq(irq, pdev); - gpio_free(pdata->buttons[i].gpio); } input_unregister_device(input); diff --git a/trunk/drivers/input/serio/Kconfig b/trunk/drivers/input/serio/Kconfig index b88569e21d60..5ce632ca6815 100644 --- a/trunk/drivers/input/serio/Kconfig +++ b/trunk/drivers/input/serio/Kconfig @@ -21,7 +21,7 @@ if SERIO config SERIO_I8042 tristate "i8042 PC Keyboard controller" if EMBEDDED || !X86 default y - depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && !M68K && !BLACKFIN + depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && !M68K && !BFIN ---help--- i8042 is the chip over which the standard AT keyboard and PS/2 mouse are connected to the computer. If you use these devices, diff --git a/trunk/drivers/input/serio/i8042-x86ia64io.h b/trunk/drivers/input/serio/i8042-x86ia64io.h index c5e68dcd88ac..f8fe42148093 100644 --- a/trunk/drivers/input/serio/i8042-x86ia64io.h +++ b/trunk/drivers/input/serio/i8042-x86ia64io.h @@ -110,14 +110,6 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = { DMI_MATCH(DMI_PRODUCT_VERSION, "5a"), }, }, - { - .ident = "Microsoft Virtual Machine", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"), - DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"), - DMI_MATCH(DMI_PRODUCT_VERSION, "VS2005R2"), - }, - }, { } }; diff --git a/trunk/drivers/isdn/hisax/hfcscard.c b/trunk/drivers/isdn/hisax/hfcscard.c index 909d6709ec16..57670dc5034d 100644 --- a/trunk/drivers/isdn/hisax/hfcscard.c +++ b/trunk/drivers/isdn/hisax/hfcscard.c @@ -118,7 +118,8 @@ hfcs_card_msg(struct IsdnCardState *cs, int mt, void *arg) return(0); case CARD_INIT: delay = (75*HZ)/100 +1; - mod_timer(&cs->hw.hfcD.timer, jiffies + delay); + cs->hw.hfcD.timer.expires = jiffies + delay; + add_timer(&cs->hw.hfcD.timer); spin_lock_irqsave(&cs->lock, flags); reset_hfcs(cs); init2bds0(cs); diff --git a/trunk/drivers/isdn/i4l/isdn_net.c b/trunk/drivers/isdn/i4l/isdn_net.c index ced83c202cac..b39d1f5b378e 100644 --- a/trunk/drivers/isdn/i4l/isdn_net.c +++ b/trunk/drivers/isdn/i4l/isdn_net.c @@ -2104,7 +2104,7 @@ isdn_net_find_icall(int di, int ch, int idx, setup_parm *setup) u_long flags; isdn_net_dev *p; isdn_net_phone *n; - char nr[ISDN_MSNLEN]; + char nr[32]; char *my_eaz; /* Search name in netdev-chain */ @@ -2113,7 +2113,7 @@ isdn_net_find_icall(int di, int ch, int idx, setup_parm *setup) nr[1] = '\0'; printk(KERN_INFO "isdn_net: Incoming call without OAD, assuming '0'\n"); } else - strlcpy(nr, setup->phone, ISDN_MSNLEN); + strcpy(nr, setup->phone); si1 = (int) setup->si1; si2 = (int) setup->si2; if (!setup->eazmsn[0]) { @@ -2789,7 +2789,7 @@ isdn_net_setcfg(isdn_net_ioctl_cfg * cfg) chidx = -1; } } - strlcpy(lp->msn, cfg->eaz, sizeof(lp->msn)); + strcpy(lp->msn, cfg->eaz); lp->pre_device = drvidx; lp->pre_channel = chidx; lp->onhtime = cfg->onhtime; @@ -2936,7 +2936,7 @@ isdn_net_addphone(isdn_net_ioctl_phone * phone) if (p) { if (!(n = kmalloc(sizeof(isdn_net_phone), GFP_KERNEL))) return -ENOMEM; - strlcpy(n->num, phone->phone, sizeof(n->num)); + strcpy(n->num, phone->phone); n->next = p->local->phone[phone->outgoing & 1]; p->local->phone[phone->outgoing & 1] = n; return 0; diff --git a/trunk/drivers/kvm/kvm_main.c b/trunk/drivers/kvm/kvm_main.c index 47c10b8f89b3..07ae280e8fe5 100644 --- a/trunk/drivers/kvm/kvm_main.c +++ b/trunk/drivers/kvm/kvm_main.c @@ -1188,7 +1188,8 @@ int emulate_invlpg(struct kvm_vcpu *vcpu, gva_t address) int emulate_clts(struct kvm_vcpu *vcpu) { - kvm_x86_ops->set_cr0(vcpu, vcpu->cr0 & ~X86_CR0_TS); + vcpu->cr0 &= ~X86_CR0_TS; + kvm_x86_ops->set_cr0(vcpu, vcpu->cr0); return X86EMUL_CONTINUE; } diff --git a/trunk/drivers/kvm/svm.c b/trunk/drivers/kvm/svm.c index 4e04e49a2f1c..7a6eead63a6b 100644 --- a/trunk/drivers/kvm/svm.c +++ b/trunk/drivers/kvm/svm.c @@ -663,7 +663,6 @@ static void svm_vcpu_put(struct kvm_vcpu *vcpu) wrmsrl(host_save_user_msrs[i], svm->host_user_msrs[i]); rdtscll(vcpu->host_tsc); - kvm_put_guest_fpu(vcpu); } static void svm_vcpu_decache(struct kvm_vcpu *vcpu) diff --git a/trunk/drivers/kvm/x86_emulate.c b/trunk/drivers/kvm/x86_emulate.c index bd46de6bf891..33b181451557 100644 --- a/trunk/drivers/kvm/x86_emulate.c +++ b/trunk/drivers/kvm/x86_emulate.c @@ -448,7 +448,8 @@ struct operand { #define JMP_REL(rel) \ do { \ - register_address_increment(_eip, rel); \ + _eip += (int)(rel); \ + _eip = ((op_bytes == 2) ? (uint16_t)_eip : (uint32_t)_eip); \ } while (0) /* @@ -1146,7 +1147,7 @@ x86_emulate_memop(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) } register_address_increment(_regs[VCPU_REGS_RSP], -dst.bytes); - if ((rc = ops->write_emulated( + if ((rc = ops->write_std( register_address(ctxt->ss_base, _regs[VCPU_REGS_RSP]), &dst.val, dst.bytes, ctxt->vcpu)) != 0) @@ -1358,7 +1359,6 @@ x86_emulate_memop(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops) } src.val = (unsigned long) _eip; JMP_REL(rel); - op_bytes = ad_bytes; goto push; } case 0xe9: /* jmp rel */ diff --git a/trunk/drivers/lguest/lguest_device.c b/trunk/drivers/lguest/lguest_device.c index e2eec38c83c2..66f38722253a 100644 --- a/trunk/drivers/lguest/lguest_device.c +++ b/trunk/drivers/lguest/lguest_device.c @@ -247,8 +247,6 @@ static void lg_del_vq(struct virtqueue *vq) { struct lguest_vq_info *lvq = vq->priv; - /* Release the interrupt */ - free_irq(lvq->config.irq, vq); /* Tell virtio_ring.c to free the virtqueue. */ vring_del_virtqueue(vq); /* Unmap the pages containing the ring. */ diff --git a/trunk/drivers/mfd/sm501.c b/trunk/drivers/mfd/sm501.c index afd82966f9a0..8135e4c3bf47 100644 --- a/trunk/drivers/mfd/sm501.c +++ b/trunk/drivers/mfd/sm501.c @@ -156,7 +156,7 @@ static void sm501_dump_clk(struct sm501_devdata *sm) dev_dbg(sm->dev, "PM0[%c]: " "P2 %ld.%ld MHz (%ld), V2 %ld.%ld (%ld), " - "M %ld.%ld (%ld), MX1 %ld.%ld (%ld)\n", +x "M %ld.%ld (%ld), MX1 %ld.%ld (%ld)\n", (pmc & 3 ) == 0 ? '*' : '-', fmt_freq(decode_div(pll2, pm0, 24, 1<<29, 31, px_div)), fmt_freq(decode_div(pll2, pm0, 16, 1<<20, 15, misc_div)), diff --git a/trunk/drivers/misc/sony-laptop.c b/trunk/drivers/misc/sony-laptop.c index b0f68031b49d..bb13858f60a1 100644 --- a/trunk/drivers/misc/sony-laptop.c +++ b/trunk/drivers/misc/sony-laptop.c @@ -338,7 +338,7 @@ static void sony_laptop_report_input_event(u8 event) dprintk("unknown input event %.2x\n", event); } -static int sony_laptop_setup_input(struct acpi_device *acpi_device) +static int sony_laptop_setup_input(void) { struct input_dev *jog_dev; struct input_dev *key_dev; @@ -379,7 +379,6 @@ static int sony_laptop_setup_input(struct acpi_device *acpi_device) key_dev->name = "Sony Vaio Keys"; key_dev->id.bustype = BUS_ISA; key_dev->id.vendor = PCI_VENDOR_ID_SONY; - key_dev->dev.parent = &acpi_device->dev; /* Initialize the Input Drivers: special keys */ set_bit(EV_KEY, key_dev->evbit); @@ -411,7 +410,6 @@ static int sony_laptop_setup_input(struct acpi_device *acpi_device) jog_dev->name = "Sony Vaio Jogdial"; jog_dev->id.bustype = BUS_ISA; jog_dev->id.vendor = PCI_VENDOR_ID_SONY; - key_dev->dev.parent = &acpi_device->dev; jog_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); jog_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_MIDDLE); @@ -1008,7 +1006,7 @@ static int sony_nc_add(struct acpi_device *device) } /* setup input devices and helper fifo */ - result = sony_laptop_setup_input(device); + result = sony_laptop_setup_input(); if (result) { printk(KERN_ERR DRV_PFX "Unabe to create input devices.\n"); @@ -1036,7 +1034,7 @@ static int sony_nc_add(struct acpi_device *device) sony_backlight_device->props.brightness = sony_backlight_get_brightness (sony_backlight_device); - sony_backlight_device->props.max_brightness = + sony_backlight_device->props.max_brightness = SONY_MAX_BRIGHTNESS - 1; } @@ -2455,7 +2453,7 @@ static int sony_pic_add(struct acpi_device *device) } /* setup input devices and helper fifo */ - result = sony_laptop_setup_input(device); + result = sony_laptop_setup_input(); if (result) { printk(KERN_ERR DRV_PFX "Unabe to create input devices.\n"); diff --git a/trunk/drivers/misc/thinkpad_acpi.c b/trunk/drivers/misc/thinkpad_acpi.c index ab23a3221585..e953276664a0 100644 --- a/trunk/drivers/misc/thinkpad_acpi.c +++ b/trunk/drivers/misc/thinkpad_acpi.c @@ -21,7 +21,7 @@ * 02110-1301, USA. */ -#define IBM_VERSION "0.17" +#define IBM_VERSION "0.16" #define TPACPI_SYSFS_VERSION 0x020000 /* @@ -964,15 +964,15 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) KEY_UNKNOWN, /* 0x0C: FN+BACKSPACE */ KEY_UNKNOWN, /* 0x0D: FN+INSERT */ KEY_UNKNOWN, /* 0x0E: FN+DELETE */ - KEY_RESERVED, /* 0x0F: FN+HOME (brightness up) */ + KEY_BRIGHTNESSUP, /* 0x0F: FN+HOME (brightness up) */ /* Scan codes 0x10 to 0x1F: Extended ACPI HKEY hot keys */ - KEY_RESERVED, /* 0x10: FN+END (brightness down) */ + KEY_BRIGHTNESSDOWN, /* 0x10: FN+END (brightness down) */ KEY_RESERVED, /* 0x11: FN+PGUP (thinklight toggle) */ KEY_UNKNOWN, /* 0x12: FN+PGDOWN */ KEY_ZOOM, /* 0x13: FN+SPACE (zoom) */ - KEY_RESERVED, /* 0x14: VOLUME UP */ - KEY_RESERVED, /* 0x15: VOLUME DOWN */ - KEY_RESERVED, /* 0x16: MUTE */ + KEY_VOLUMEUP, /* 0x14: VOLUME UP */ + KEY_VOLUMEDOWN, /* 0x15: VOLUME DOWN */ + KEY_MUTE, /* 0x16: MUTE */ KEY_VENDOR, /* 0x17: Thinkpad/AccessIBM/Lenovo */ /* (assignments unknown, please report if found) */ KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, @@ -993,9 +993,9 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) KEY_RESERVED, /* 0x11: FN+PGUP (thinklight toggle) */ KEY_UNKNOWN, /* 0x12: FN+PGDOWN */ KEY_ZOOM, /* 0x13: FN+SPACE (zoom) */ - KEY_RESERVED, /* 0x14: VOLUME UP */ - KEY_RESERVED, /* 0x15: VOLUME DOWN */ - KEY_RESERVED, /* 0x16: MUTE */ + KEY_VOLUMEUP, /* 0x14: VOLUME UP */ + KEY_VOLUMEDOWN, /* 0x15: VOLUME DOWN */ + KEY_MUTE, /* 0x16: MUTE */ KEY_VENDOR, /* 0x17: Thinkpad/AccessIBM/Lenovo */ /* (assignments unknown, please report if found) */ KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, @@ -1342,8 +1342,9 @@ static int hotkey_read(char *p) return len; } - if (mutex_lock_interruptible(&hotkey_mutex)) - return -ERESTARTSYS; + res = mutex_lock_interruptible(&hotkey_mutex); + if (res < 0) + return res; res = hotkey_get(&status, &mask); mutex_unlock(&hotkey_mutex); if (res) @@ -1372,8 +1373,9 @@ static int hotkey_write(char *buf) if (!tp_features.hotkey) return -ENODEV; - if (mutex_lock_interruptible(&hotkey_mutex)) - return -ERESTARTSYS; + res = mutex_lock_interruptible(&hotkey_mutex); + if (res < 0) + return res; res = hotkey_get(&status, &mask); if (res) @@ -3112,99 +3114,6 @@ static struct backlight_ops ibm_backlight_data = { static struct mutex brightness_mutex; -static int __init tpacpi_query_bcll_levels(acpi_handle handle) -{ - struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; - union acpi_object *obj; - int rc; - - if (ACPI_SUCCESS(acpi_evaluate_object(handle, NULL, NULL, &buffer))) { - obj = (union acpi_object *)buffer.pointer; - if (!obj || (obj->type != ACPI_TYPE_PACKAGE)) { - printk(IBM_ERR "Unknown BCLL data, " - "please report this to %s\n", IBM_MAIL); - rc = 0; - } else { - rc = obj->package.count; - } - } else { - return 0; - } - - kfree(buffer.pointer); - return rc; -} - -static acpi_status __init brightness_find_bcll(acpi_handle handle, u32 lvl, - void *context, void **rv) -{ - char name[ACPI_PATH_SEGMENT_LENGTH]; - struct acpi_buffer buffer = { sizeof(name), &name }; - - if (ACPI_SUCCESS(acpi_get_name(handle, ACPI_SINGLE_NAME, &buffer)) && - !strncmp("BCLL", name, sizeof(name) - 1)) { - if (tpacpi_query_bcll_levels(handle) == 16) { - *rv = handle; - return AE_CTRL_TERMINATE; - } else { - return AE_OK; - } - } else { - return AE_OK; - } -} - -static int __init brightness_check_levels(void) -{ - int status; - void *found_node = NULL; - - if (!vid_handle) { - IBM_ACPIHANDLE_INIT(vid); - } - if (!vid_handle) - return 0; - - /* Search for a BCLL package with 16 levels */ - status = acpi_walk_namespace(ACPI_TYPE_PACKAGE, vid_handle, 3, - brightness_find_bcll, NULL, &found_node); - - return (ACPI_SUCCESS(status) && found_node != NULL); -} - -static acpi_status __init brightness_find_bcl(acpi_handle handle, u32 lvl, - void *context, void **rv) -{ - char name[ACPI_PATH_SEGMENT_LENGTH]; - struct acpi_buffer buffer = { sizeof(name), &name }; - - if (ACPI_SUCCESS(acpi_get_name(handle, ACPI_SINGLE_NAME, &buffer)) && - !strncmp("_BCL", name, sizeof(name) - 1)) { - *rv = handle; - return AE_CTRL_TERMINATE; - } else { - return AE_OK; - } -} - -static int __init brightness_check_std_acpi_support(void) -{ - int status; - void *found_node = NULL; - - if (!vid_handle) { - IBM_ACPIHANDLE_INIT(vid); - } - if (!vid_handle) - return 0; - - /* Search for a _BCL method, but don't execute it */ - status = acpi_walk_namespace(ACPI_TYPE_METHOD, vid_handle, 3, - brightness_find_bcl, NULL, &found_node); - - return (ACPI_SUCCESS(status) && found_node != NULL); -} - static int __init brightness_init(struct ibm_init_struct *iibm) { int b; @@ -3213,18 +3122,6 @@ static int __init brightness_init(struct ibm_init_struct *iibm) mutex_init(&brightness_mutex); - if (!brightness_enable) { - dbg_printk(TPACPI_DBG_INIT, - "brightness support disabled by module parameter\n"); - return 1; - } else if (brightness_enable > 1) { - if (brightness_check_std_acpi_support()) { - printk(IBM_NOTICE - "standard ACPI backlight interface available, not loading native one...\n"); - return 1; - } - } - if (!brightness_mode) { if (thinkpad_id.vendor == PCI_VENDOR_ID_LENOVO) brightness_mode = 2; @@ -3238,17 +3135,10 @@ static int __init brightness_init(struct ibm_init_struct *iibm) if (brightness_mode > 3) return -EINVAL; - tp_features.bright_16levels = - thinkpad_id.vendor == PCI_VENDOR_ID_LENOVO && - brightness_check_levels(); - b = brightness_get(NULL); if (b < 0) return 1; - if (tp_features.bright_16levels) - printk(IBM_INFO "detected a 16-level brightness capable ThinkPad\n"); - ibm_backlight_device = backlight_device_register( TPACPI_BACKLIGHT_DEV_NAME, NULL, NULL, &ibm_backlight_data); @@ -3258,8 +3148,7 @@ static int __init brightness_init(struct ibm_init_struct *iibm) } vdbg_printk(TPACPI_DBG_INIT, "brightness is supported\n"); - ibm_backlight_device->props.max_brightness = - (tp_features.bright_16levels)? 15 : 7; + ibm_backlight_device->props.max_brightness = 7; ibm_backlight_device->props.brightness = b; backlight_update_status(ibm_backlight_device); @@ -3278,8 +3167,6 @@ static void brightness_exit(void) static int brightness_update_status(struct backlight_device *bd) { - /* it is the backlight class's job (caller) to handle - * EINTR and other errors properly */ return brightness_set( (bd->props.fb_blank == FB_BLANK_UNBLANK && bd->props.power == FB_BLANK_UNBLANK) ? @@ -3297,14 +3184,13 @@ static int brightness_get(struct backlight_device *bd) if (brightness_mode & 1) { if (!acpi_ec_read(brightness_offset, &lec)) return -EIO; - lec &= (tp_features.bright_16levels)? 0x0f : 0x07; + lec &= 7; level = lec; }; if (brightness_mode & 2) { lcmos = (nvram_read_byte(TP_NVRAM_ADDR_BRIGHTNESS) & TP_NVRAM_MASK_LEVEL_BRIGHTNESS) >> TP_NVRAM_POS_LEVEL_BRIGHTNESS; - lcmos &= (tp_features.bright_16levels)? 0x0f : 0x07; level = lcmos; } @@ -3320,13 +3206,12 @@ static int brightness_get(struct backlight_device *bd) return level; } -/* May return EINTR which can always be mapped to ERESTARTSYS */ static int brightness_set(int value) { int cmos_cmd, inc, i, res; int current_value; - if (value > ((tp_features.bright_16levels)? 15 : 7)) + if (value > 7) return -EINVAL; res = mutex_lock_interruptible(&brightness_mutex); @@ -3342,7 +3227,7 @@ static int brightness_set(int value) cmos_cmd = value > current_value ? TP_CMOS_BRIGHTNESS_UP : TP_CMOS_BRIGHTNESS_DOWN; - inc = (value > current_value)? 1 : -1; + inc = value > current_value ? 1 : -1; res = 0; for (i = current_value; i != value; i += inc) { @@ -3371,11 +3256,10 @@ static int brightness_read(char *p) if ((level = brightness_get(NULL)) < 0) { len += sprintf(p + len, "level:\t\tunreadable\n"); } else { - len += sprintf(p + len, "level:\t\t%d\n", level); + len += sprintf(p + len, "level:\t\t%d\n", level & 0x7); len += sprintf(p + len, "commands:\tup, down\n"); len += sprintf(p + len, "commands:\tlevel " - " ( is 0-%d)\n", - (tp_features.bright_16levels) ? 15 : 7); + " ( is 0-7)\n"); } return len; @@ -3384,34 +3268,28 @@ static int brightness_read(char *p) static int brightness_write(char *buf) { int level; - int rc; + int new_level; char *cmd; - int max_level = (tp_features.bright_16levels) ? 15 : 7; - - level = brightness_get(NULL); - if (level < 0) - return level; while ((cmd = next_cmd(&buf))) { + if ((level = brightness_get(NULL)) < 0) + return level; + level &= 7; + if (strlencmp(cmd, "up") == 0) { - if (level < max_level) - level++; + new_level = level == 7 ? 7 : level + 1; } else if (strlencmp(cmd, "down") == 0) { - if (level > 0) - level--; - } else if (sscanf(cmd, "level %d", &level) == 1 && - level >= 0 && level <= max_level) { - /* new level set */ + new_level = level == 0 ? 0 : level - 1; + } else if (sscanf(cmd, "level %d", &new_level) == 1 && + new_level >= 0 && new_level <= 7) { + /* new_level set */ } else return -EINVAL; + + brightness_set(new_level); } - /* - * Now we know what the final level should be, so we try to set it. - * Doing it this way makes the syscall restartable in case of EINTR - */ - rc = brightness_set(level); - return (rc == -EINTR)? ERESTARTSYS : rc; + return 0; } static struct ibm_struct brightness_driver_data = { @@ -3774,8 +3652,9 @@ static ssize_t fan_pwm1_store(struct device *dev, /* scale down from 0-255 to 0-7 */ newlevel = (s >> 5) & 0x07; - if (mutex_lock_interruptible(&fan_mutex)) - return -ERESTARTSYS; + rc = mutex_lock_interruptible(&fan_mutex); + if (rc < 0) + return rc; rc = fan_get_status(&status); if (!rc && (status & @@ -4025,8 +3904,9 @@ static int fan_get_status_safe(u8 *status) int rc; u8 s; - if (mutex_lock_interruptible(&fan_mutex)) - return -ERESTARTSYS; + rc = mutex_lock_interruptible(&fan_mutex); + if (rc < 0) + return rc; rc = fan_get_status(&s); if (!rc) fan_update_desired_level(s); @@ -4160,8 +4040,9 @@ static int fan_set_level_safe(int level) if (!fan_control_allowed) return -EPERM; - if (mutex_lock_interruptible(&fan_mutex)) - return -ERESTARTSYS; + rc = mutex_lock_interruptible(&fan_mutex); + if (rc < 0) + return rc; if (level == TPACPI_FAN_LAST_LEVEL) level = fan_control_desired_level; @@ -4182,8 +4063,9 @@ static int fan_set_enable(void) if (!fan_control_allowed) return -EPERM; - if (mutex_lock_interruptible(&fan_mutex)) - return -ERESTARTSYS; + rc = mutex_lock_interruptible(&fan_mutex); + if (rc < 0) + return rc; switch (fan_control_access_mode) { case TPACPI_FAN_WR_ACPI_FANS: @@ -4237,8 +4119,9 @@ static int fan_set_disable(void) if (!fan_control_allowed) return -EPERM; - if (mutex_lock_interruptible(&fan_mutex)) - return -ERESTARTSYS; + rc = mutex_lock_interruptible(&fan_mutex); + if (rc < 0) + return rc; rc = 0; switch (fan_control_access_mode) { @@ -4275,8 +4158,9 @@ static int fan_set_speed(int speed) if (!fan_control_allowed) return -EPERM; - if (mutex_lock_interruptible(&fan_mutex)) - return -ERESTARTSYS; + rc = mutex_lock_interruptible(&fan_mutex); + if (rc < 0) + return rc; rc = 0; switch (fan_control_access_mode) { @@ -4817,15 +4701,9 @@ static int __init set_ibm_param(const char *val, struct kernel_param *kp) unsigned int i; struct ibm_struct *ibm; - if (!kp || !kp->name || !val) - return -EINVAL; - for (i = 0; i < ARRAY_SIZE(ibms_init); i++) { ibm = ibms_init[i].data; - WARN_ON(ibm == NULL); - - if (!ibm || !ibm->name) - continue; + BUG_ON(ibm == NULL); if (strcmp(ibm->name, kp->name) == 0 && ibm->write) { if (strlen(val) > sizeof(ibms_init[i].param) - 2) @@ -4854,9 +4732,6 @@ module_param_named(fan_control, fan_control_allowed, bool, 0); static int brightness_mode; module_param_named(brightness_mode, brightness_mode, int, 0); -static unsigned int brightness_enable = 2; /* 2 = auto, 0 = no, 1 = yes */ -module_param(brightness_enable, uint, 0); - static unsigned int hotkey_report_mode; module_param(hotkey_report_mode, uint, 0); diff --git a/trunk/drivers/misc/thinkpad_acpi.h b/trunk/drivers/misc/thinkpad_acpi.h index 8fba2bbe345e..3abcc8120634 100644 --- a/trunk/drivers/misc/thinkpad_acpi.h +++ b/trunk/drivers/misc/thinkpad_acpi.h @@ -84,7 +84,7 @@ /* ThinkPad CMOS NVRAM constants */ #define TP_NVRAM_ADDR_BRIGHTNESS 0x5e -#define TP_NVRAM_MASK_LEVEL_BRIGHTNESS 0x0f +#define TP_NVRAM_MASK_LEVEL_BRIGHTNESS 0x07 #define TP_NVRAM_POS_LEVEL_BRIGHTNESS 0 #define onoff(status,bit) ((status) & (1 << (bit)) ? "on" : "off") @@ -246,7 +246,6 @@ static struct { u32 hotkey_wlsw:1; u32 light:1; u32 light_status:1; - u32 bright_16levels:1; u32 wan:1; u32 fan_ctrl_status_undef:1; u32 input_device_registered:1; @@ -339,7 +338,6 @@ static int bluetooth_write(char *buf); static struct backlight_device *ibm_backlight_device; static int brightness_offset = 0x31; static int brightness_mode; -static unsigned int brightness_enable; /* 0 = no, 1 = yes, 2 = auto */ static int brightness_init(struct ibm_init_struct *iibm); static void brightness_exit(void); diff --git a/trunk/drivers/mmc/card/block.c b/trunk/drivers/mmc/card/block.c index aeb32a93f6a0..e38d5a3b2a89 100644 --- a/trunk/drivers/mmc/card/block.c +++ b/trunk/drivers/mmc/card/block.c @@ -44,9 +44,6 @@ * max 8 partitions per card */ #define MMC_SHIFT 3 -#define MMC_NUM_MINORS (256 >> MMC_SHIFT) - -static unsigned long dev_use[MMC_NUM_MINORS/(8*sizeof(unsigned long))]; /* * There is one mmc_blk_data per slot. @@ -83,9 +80,6 @@ static void mmc_blk_put(struct mmc_blk_data *md) mutex_lock(&open_lock); md->usage--; if (md->usage == 0) { - int devidx = md->disk->first_minor >> MMC_SHIFT; - __clear_bit(devidx, dev_use); - put_disk(md->disk); kfree(md); } @@ -327,13 +321,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) req->rq_disk->disk_name, err); goto cmd_err; } - /* - * Some cards mishandle the status bits, - * so make sure to check both the busy - * indication and the card state. - */ - } while (!(cmd.resp[0] & R1_READY_FOR_DATA) || - (R1_CURRENT_STATE(cmd.resp[0]) == 7)); + } while (!(cmd.resp[0] & R1_READY_FOR_DATA)); #if 0 if (cmd.resp[0] & ~0x00000900) @@ -412,6 +400,9 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) return 0; } +#define MMC_NUM_MINORS (256 >> MMC_SHIFT) + +static unsigned long dev_use[MMC_NUM_MINORS/(8*sizeof(unsigned long))]; static inline int mmc_blk_readonly(struct mmc_card *card) { @@ -577,12 +568,17 @@ static void mmc_blk_remove(struct mmc_card *card) struct mmc_blk_data *md = mmc_get_drvdata(card); if (md) { + int devidx; + /* Stop new requests from getting into the queue */ del_gendisk(md->disk); /* Then flush out any already in there */ mmc_cleanup_queue(&md->queue); + devidx = md->disk->first_minor >> MMC_SHIFT; + __clear_bit(devidx, dev_use); + mmc_blk_put(md); } mmc_set_drvdata(card, NULL); diff --git a/trunk/drivers/mmc/card/queue.c b/trunk/drivers/mmc/card/queue.c index 30cd13b13ac3..1b9c9b6da5b7 100644 --- a/trunk/drivers/mmc/card/queue.c +++ b/trunk/drivers/mmc/card/queue.c @@ -180,13 +180,12 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock blk_queue_max_hw_segments(mq->queue, host->max_hw_segs); blk_queue_max_segment_size(mq->queue, host->max_seg_size); - mq->sg = kmalloc(sizeof(struct scatterlist) * + mq->sg = kzalloc(sizeof(struct scatterlist) * host->max_phys_segs, GFP_KERNEL); if (!mq->sg) { ret = -ENOMEM; goto cleanup_queue; } - sg_init_table(mq->sg, host->max_phys_segs); } init_MUTEX(&mq->thread_sem); diff --git a/trunk/drivers/mmc/card/sdio_uart.c b/trunk/drivers/mmc/card/sdio_uart.c index eeea84c309e6..d552de683110 100644 --- a/trunk/drivers/mmc/card/sdio_uart.c +++ b/trunk/drivers/mmc/card/sdio_uart.c @@ -386,7 +386,7 @@ static void sdio_uart_stop_rx(struct sdio_uart_port *port) sdio_out(port, UART_IER, port->ier); } -static void sdio_uart_receive_chars(struct sdio_uart_port *port, unsigned int *status) +static void sdio_uart_receive_chars(struct sdio_uart_port *port, int *status) { struct tty_struct *tty = port->tty; unsigned int ch, flag; diff --git a/trunk/drivers/mmc/host/tifm_sd.c b/trunk/drivers/mmc/host/tifm_sd.c index 20d5c7bd940a..c11a3d256051 100644 --- a/trunk/drivers/mmc/host/tifm_sd.c +++ b/trunk/drivers/mmc/host/tifm_sd.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #define DRIVER_NAME "tifm_sd" @@ -637,15 +638,17 @@ static void tifm_sd_request(struct mmc_host *mmc, struct mmc_request *mrq) goto err_out; } + if (mrq->data && !is_power_of_2(mrq->data->blksz)) { + printk(KERN_ERR "%s: Unsupported block size (%d bytes)\n", + sock->dev.bus_id, mrq->data->blksz); + mrq->cmd->error = -EINVAL; + goto err_out; + } + host->cmd_flags = 0; host->block_pos = 0; host->sg_pos = 0; - if (mrq->data && !is_power_of_2(mrq->data->blksz)) - host->no_dma = 1; - else - host->no_dma = no_dma ? 1 : 0; - if (r_data) { tifm_sd_set_data_timeout(host, r_data); @@ -673,7 +676,7 @@ static void tifm_sd_request(struct mmc_host *mmc, struct mmc_request *mrq) : PCI_DMA_FROMDEVICE)) { printk(KERN_ERR "%s : scatterlist map failed\n", sock->dev.bus_id); - mrq->cmd->error = -ENOMEM; + spin_unlock_irqrestore(&sock->lock, flags); goto err_out; } host->sg_len = tifm_map_sg(sock, r_data->sg, @@ -689,7 +692,7 @@ static void tifm_sd_request(struct mmc_host *mmc, struct mmc_request *mrq) r_data->flags & MMC_DATA_WRITE ? PCI_DMA_TODEVICE : PCI_DMA_FROMDEVICE); - mrq->cmd->error = -ENOMEM; + spin_unlock_irqrestore(&sock->lock, flags); goto err_out; } @@ -963,6 +966,7 @@ static int tifm_sd_probe(struct tifm_dev *sock) return -ENOMEM; host = mmc_priv(mmc); + host->no_dma = no_dma; tifm_set_drvdata(sock, mmc); host->dev = sock; host->timeout_jiffies = msecs_to_jiffies(1000); diff --git a/trunk/drivers/net/bfin_mac.c b/trunk/drivers/net/bfin_mac.c index 0b99b5549295..084acfd6fc5f 100644 --- a/trunk/drivers/net/bfin_mac.c +++ b/trunk/drivers/net/bfin_mac.c @@ -924,7 +924,7 @@ static int __init bf537mac_probe(struct net_device *dev) if (!is_valid_ether_addr(dev->dev_addr)) { /* Grab the MAC from the board somehow - this is done in the arch/blackfin/mach-bf537/boards/eth_mac.c */ - bfin_get_ether_addr(dev->dev_addr); + get_bf537_ether_addr(dev->dev_addr); } /* If still not valid, get a random one */ diff --git a/trunk/drivers/net/bfin_mac.h b/trunk/drivers/net/bfin_mac.h index 5970ea7142cd..3a107ad75381 100644 --- a/trunk/drivers/net/bfin_mac.h +++ b/trunk/drivers/net/bfin_mac.h @@ -92,4 +92,4 @@ struct bf537mac_local { struct mii_bus mii_bus; }; -extern void bfin_get_ether_addr(char *addr); +extern void get_bf537_ether_addr(char *addr); diff --git a/trunk/drivers/net/mlx4/qp.c b/trunk/drivers/net/mlx4/qp.c index fa24e6597591..42b47639c81c 100644 --- a/trunk/drivers/net/mlx4/qp.c +++ b/trunk/drivers/net/mlx4/qp.c @@ -113,7 +113,7 @@ int mlx4_qp_modify(struct mlx4_dev *dev, struct mlx4_mtt *mtt, struct mlx4_cmd_mailbox *mailbox; int ret = 0; - if (cur_state >= MLX4_QP_NUM_STATE || new_state >= MLX4_QP_NUM_STATE || + if (cur_state >= MLX4_QP_NUM_STATE || cur_state >= MLX4_QP_NUM_STATE || !op[cur_state][new_state]) return -EINVAL; diff --git a/trunk/drivers/net/plip.c b/trunk/drivers/net/plip.c index 57c98669984d..5071fcd8a0bd 100644 --- a/trunk/drivers/net/plip.c +++ b/trunk/drivers/net/plip.c @@ -663,7 +663,7 @@ plip_receive_packet(struct net_device *dev, struct net_local *nl, case PLIP_PK_DONE: /* Inform the upper layer for the arrival of a packet. */ rcv->skb->protocol=plip_type_trans(rcv->skb, dev); - netif_rx_ni(rcv->skb); + netif_rx(rcv->skb); dev->last_rx = jiffies; dev->stats.rx_bytes += rcv->length.h; dev->stats.rx_packets++; @@ -1269,7 +1269,7 @@ static void plip_attach (struct parport *port) nl = netdev_priv(dev); nl->dev = dev; - nl->pardev = parport_register_device(port, dev->name, plip_preempt, + nl->pardev = parport_register_device(port, name, plip_preempt, plip_wakeup, plip_interrupt, 0, dev); diff --git a/trunk/drivers/net/virtio_net.c b/trunk/drivers/net/virtio_net.c index 5413dbf3d4ac..a75be57fb209 100644 --- a/trunk/drivers/net/virtio_net.c +++ b/trunk/drivers/net/virtio_net.c @@ -198,8 +198,8 @@ static int virtnet_poll(struct napi_struct *napi, int budget) if (vi->num < vi->max / 2) try_fill_recv(vi); - /* Out of packets? */ - if (received < budget) { + /* All done? */ + if (!skb) { netif_rx_complete(vi->dev, napi); if (unlikely(!vi->rvq->vq_ops->restart(vi->rvq)) && netif_rx_reschedule(vi->dev, napi)) @@ -404,12 +404,8 @@ static int virtnet_probe(struct virtio_device *vdev) static void virtnet_remove(struct virtio_device *vdev) { - struct virtnet_info *vi = vdev->priv; - - vdev->config->del_vq(vi->svq); - vdev->config->del_vq(vi->rvq); - unregister_netdev(vi->dev); - free_netdev(vi->dev); + unregister_netdev(vdev->priv); + free_netdev(vdev->priv); } static struct virtio_device_id id_table[] = { diff --git a/trunk/drivers/net/wireless/rt2x00/rt2500usb.c b/trunk/drivers/net/wireless/rt2x00/rt2500usb.c index 50775f9234cc..277a020b35e9 100644 --- a/trunk/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/trunk/drivers/net/wireless/rt2x00/rt2500usb.c @@ -1032,7 +1032,7 @@ static void rt2500usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, } static int rt2500usb_get_tx_data_len(struct rt2x00_dev *rt2x00dev, - struct sk_buff *skb) + int maxpacket, struct sk_buff *skb) { int length; @@ -1041,7 +1041,7 @@ static int rt2500usb_get_tx_data_len(struct rt2x00_dev *rt2x00dev, * but it must _not_ be a multiple of the USB packet size. */ length = roundup(skb->len, 2); - length += (2 * !(length % rt2x00dev->usb_maxpacket)); + length += (2 * !(length % maxpacket)); return length; } @@ -1643,6 +1643,7 @@ static int rt2500usb_beacon_update(struct ieee80211_hw *hw, struct data_entry *beacon; struct data_entry *guardian; int pipe = usb_sndbulkpipe(usb_dev, 1); + int max_packet = usb_maxpacket(usb_dev, pipe, 1); int length; /* @@ -1671,7 +1672,7 @@ static int rt2500usb_beacon_update(struct ieee80211_hw *hw, ring->desc_size), skb->len - ring->desc_size, control); - length = rt2500usb_get_tx_data_len(rt2x00dev, skb); + length = rt2500usb_get_tx_data_len(rt2x00dev, max_packet, skb); usb_fill_bulk_urb(beacon->priv, usb_dev, pipe, skb->data, length, rt2500usb_beacondone, beacon); diff --git a/trunk/drivers/net/wireless/rt2x00/rt2x00.h b/trunk/drivers/net/wireless/rt2x00/rt2x00.h index c8f16f161c28..d1ad5251a77a 100644 --- a/trunk/drivers/net/wireless/rt2x00/rt2x00.h +++ b/trunk/drivers/net/wireless/rt2x00/rt2x00.h @@ -418,7 +418,7 @@ struct rt2x00lib_ops { int (*write_tx_data) (struct rt2x00_dev *rt2x00dev, struct data_ring *ring, struct sk_buff *skb, struct ieee80211_tx_control *control); - int (*get_tx_data_len) (struct rt2x00_dev *rt2x00dev, + int (*get_tx_data_len) (struct rt2x00_dev *rt2x00dev, int maxpacket, struct sk_buff *skb); void (*kick_tx_queue) (struct rt2x00_dev *rt2x00dev, unsigned int queue); @@ -598,11 +598,6 @@ struct rt2x00_dev { */ u32 *rf; - /* - * USB Max frame size (for rt2500usb & rt73usb). - */ - u16 usb_maxpacket; - /* * Current TX power value. */ diff --git a/trunk/drivers/net/wireless/rt2x00/rt2x00usb.c b/trunk/drivers/net/wireless/rt2x00/rt2x00usb.c index 1f5675dd329f..73cc726c4046 100644 --- a/trunk/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/trunk/drivers/net/wireless/rt2x00/rt2x00usb.c @@ -159,6 +159,7 @@ int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev, interface_to_usbdev(rt2x00dev_usb(rt2x00dev)); struct data_entry *entry = rt2x00_get_data_entry(ring); int pipe = usb_sndbulkpipe(usb_dev, 1); + int max_packet = usb_maxpacket(usb_dev, pipe, 1); u32 length; if (rt2x00_ring_full(ring)) { @@ -193,7 +194,8 @@ int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev, * length of the data to usb_fill_bulk_urb. Pass the skb * to the driver to determine what the length should be. */ - length = rt2x00dev->ops->lib->get_tx_data_len(rt2x00dev, skb); + length = rt2x00dev->ops->lib->get_tx_data_len(rt2x00dev, + max_packet, skb); /* * Initialize URB and send the frame to the device. @@ -488,11 +490,6 @@ int rt2x00usb_probe(struct usb_interface *usb_intf, rt2x00dev->ops = ops; rt2x00dev->hw = hw; - rt2x00dev->usb_maxpacket = - usb_maxpacket(usb_dev, usb_sndbulkpipe(usb_dev, 1), 1); - if (!rt2x00dev->usb_maxpacket) - rt2x00dev->usb_maxpacket = 1; - retval = rt2x00usb_alloc_reg(rt2x00dev); if (retval) goto exit_free_device; diff --git a/trunk/drivers/net/wireless/rt2x00/rt73usb.c b/trunk/drivers/net/wireless/rt2x00/rt73usb.c index c0671c2e6e73..dc640bf6b5eb 100644 --- a/trunk/drivers/net/wireless/rt2x00/rt73usb.c +++ b/trunk/drivers/net/wireless/rt2x00/rt73usb.c @@ -1251,7 +1251,7 @@ static void rt73usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, } static int rt73usb_get_tx_data_len(struct rt2x00_dev *rt2x00dev, - struct sk_buff *skb) + int maxpacket, struct sk_buff *skb) { int length; @@ -1260,7 +1260,7 @@ static int rt73usb_get_tx_data_len(struct rt2x00_dev *rt2x00dev, * but it must _not_ be a multiple of the USB packet size. */ length = roundup(skb->len, 4); - length += (4 * !(length % rt2x00dev->usb_maxpacket)); + length += (4 * !(length % maxpacket)); return length; } diff --git a/trunk/drivers/pci/hotplug/acpiphp.h b/trunk/drivers/pci/hotplug/acpiphp.h index 1ef417cca2db..f6cc0c5b5657 100644 --- a/trunk/drivers/pci/hotplug/acpiphp.h +++ b/trunk/drivers/pci/hotplug/acpiphp.h @@ -66,7 +66,7 @@ struct slot { char name[SLOT_NAME_SIZE]; }; -/* +/** * struct acpiphp_bridge - PCI bridge information * * for each bridge device in ACPI namespace @@ -97,7 +97,7 @@ struct acpiphp_bridge { }; -/* +/** * struct acpiphp_slot - PCI slot information * * PCI slot information for each *physical* PCI slot @@ -118,7 +118,7 @@ struct acpiphp_slot { }; -/* +/** * struct acpiphp_func - PCI function information * * PCI function information for each object in ACPI namespace @@ -137,7 +137,7 @@ struct acpiphp_func { u32 flags; /* see below */ }; -/* +/** * struct acpiphp_attention_info - device specific attention registration * * ACPI has no generic method of setting/getting attention status diff --git a/trunk/drivers/pci/hotplug/acpiphp_core.c b/trunk/drivers/pci/hotplug/acpiphp_core.c index c8c263875c21..a0ca63adad5a 100644 --- a/trunk/drivers/pci/hotplug/acpiphp_core.c +++ b/trunk/drivers/pci/hotplug/acpiphp_core.c @@ -91,10 +91,10 @@ static struct hotplug_slot_ops acpi_hotplug_slot_ops = { * acpiphp_register_attention - set attention LED callback * @info: must be completely filled with LED callbacks * - * Description: This is used to register a hardware specific ACPI + * Description: this is used to register a hardware specific ACPI * driver that manipulates the attention LED. All the fields in * info must be set. - */ + **/ int acpiphp_register_attention(struct acpiphp_attention_info *info) { int retval = -EINVAL; @@ -112,10 +112,10 @@ int acpiphp_register_attention(struct acpiphp_attention_info *info) * acpiphp_unregister_attention - unset attention LED callback * @info: must match the pointer used to register * - * Description: This is used to un-register a hardware specific acpi + * Description: this is used to un-register a hardware specific acpi * driver that manipulates the attention LED. The pointer to the * info struct must be the same as the one used to set it. - */ + **/ int acpiphp_unregister_attention(struct acpiphp_attention_info *info) { int retval = -EINVAL; @@ -133,6 +133,7 @@ int acpiphp_unregister_attention(struct acpiphp_attention_info *info) * @hotplug_slot: slot to enable * * Actual tasks are done in acpiphp_enable_slot() + * */ static int enable_slot(struct hotplug_slot *hotplug_slot) { @@ -150,6 +151,7 @@ static int enable_slot(struct hotplug_slot *hotplug_slot) * @hotplug_slot: slot to disable * * Actual tasks are done in acpiphp_disable_slot() + * */ static int disable_slot(struct hotplug_slot *hotplug_slot) { @@ -166,15 +168,15 @@ static int disable_slot(struct hotplug_slot *hotplug_slot) } -/** - * set_attention_status - set attention LED + /** + * set_attention_status - set attention LED * @hotplug_slot: slot to set attention LED on * @status: value to set attention LED to (0 or 1) * * attention status LED, so we use a callback that * was registered with us. This allows hardware specific * ACPI implementations to blink the light for us. - */ + **/ static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 status) { int retval = -ENODEV; @@ -197,6 +199,7 @@ static int disable_slot(struct hotplug_slot *hotplug_slot) * * Some platforms may not implement _STA method properly. * In that case, the value returned may not be reliable. + * */ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 *value) { @@ -210,7 +213,7 @@ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 *value) } -/** + /** * get_attention_status - get attention LED status * @hotplug_slot: slot to get status from * @value: returns with value of attention LED @@ -218,8 +221,8 @@ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 *value) * ACPI doesn't have known method to determine the state * of the attention status LED, so we use a callback that * was registered with us. This allows hardware specific - * ACPI implementations to determine its state. - */ + * ACPI implementations to determine its state + **/ static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 *value) { int retval = -EINVAL; @@ -241,7 +244,8 @@ static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 *value) * @value: pointer to store status * * ACPI doesn't provide any formal means to access latch status. - * Instead, we fake latch status from _STA. + * Instead, we fake latch status from _STA + * */ static int get_latch_status(struct hotplug_slot *hotplug_slot, u8 *value) { @@ -261,7 +265,8 @@ static int get_latch_status(struct hotplug_slot *hotplug_slot, u8 *value) * @value: pointer to store status * * ACPI doesn't provide any formal means to access adapter status. - * Instead, we fake adapter status from _STA. + * Instead, we fake adapter status from _STA + * */ static int get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value) { diff --git a/trunk/drivers/pci/hotplug/acpiphp_glue.c b/trunk/drivers/pci/hotplug/acpiphp_glue.c index ff1b1c71291a..1e125b56c9a9 100644 --- a/trunk/drivers/pci/hotplug/acpiphp_glue.c +++ b/trunk/drivers/pci/hotplug/acpiphp_glue.c @@ -82,6 +82,7 @@ static void handle_hotplug_event_func(acpi_handle handle, u32 type, void *contex * 2. has _PS0 method * 3. has _PS3 method * 4. .. + * */ static int is_ejectable(acpi_handle handle) { @@ -985,8 +986,10 @@ static int power_off_slot(struct acpiphp_slot *slot) /** - * acpiphp_max_busnr - return the highest reserved bus number under the given bus. + * acpiphp_max_busnr - return the highest reserved bus number under + * the given bus. * @bus: bus to start search with + * */ static unsigned char acpiphp_max_busnr(struct pci_bus *bus) { @@ -1015,6 +1018,7 @@ static unsigned char acpiphp_max_busnr(struct pci_bus *bus) /** * acpiphp_bus_add - add a new bus to acpi subsystem * @func: acpiphp_func of the bridge + * */ static int acpiphp_bus_add(struct acpiphp_func *func) { @@ -1059,6 +1063,7 @@ static int acpiphp_bus_add(struct acpiphp_func *func) /** * acpiphp_bus_trim - trim a bus from acpi subsystem * @handle: handle to acpi namespace + * */ static int acpiphp_bus_trim(acpi_handle handle) { @@ -1084,6 +1089,7 @@ static int acpiphp_bus_trim(acpi_handle handle) * * This function should be called per *physical slot*, * not per each slot object in ACPI namespace. + * */ static int enable_device(struct acpiphp_slot *slot) { @@ -1179,7 +1185,6 @@ static void disable_bridges(struct pci_bus *bus) /** * disable_device - disable a slot - * @slot: ACPI PHP slot */ static int disable_device(struct acpiphp_slot *slot) { @@ -1235,15 +1240,14 @@ static int disable_device(struct acpiphp_slot *slot) /** * get_slot_status - get ACPI slot status - * @slot: ACPI PHP slot * - * If a slot has _STA for each function and if any one of them - * returned non-zero status, return it. + * if a slot has _STA for each function and if any one of them + * returned non-zero status, return it * - * If a slot doesn't have _STA and if any one of its functions' - * configuration space is configured, return 0x0f as a _STA. + * if a slot doesn't have _STA and if any one of its functions' + * configuration space is configured, return 0x0f as a _STA * - * Otherwise return 0. + * otherwise return 0 */ static unsigned int get_slot_status(struct acpiphp_slot *slot) { @@ -1277,7 +1281,6 @@ static unsigned int get_slot_status(struct acpiphp_slot *slot) /** * acpiphp_eject_slot - physically eject the slot - * @slot: ACPI PHP slot */ int acpiphp_eject_slot(struct acpiphp_slot *slot) { @@ -1311,7 +1314,6 @@ int acpiphp_eject_slot(struct acpiphp_slot *slot) /** * acpiphp_check_bridge - re-enumerate devices - * @bridge: where to begin re-enumeration * * Iterate over all slots under this bridge and make sure that if a * card is present they are enabled, and if not they are disabled. @@ -1536,11 +1538,13 @@ check_sub_bridges(acpi_handle handle, u32 lvl, void *context, void **rv) /** * handle_hotplug_event_bridge - handle ACPI event on bridges + * * @handle: Notify()'ed acpi_handle * @type: Notify code * @context: pointer to acpiphp_bridge structure * - * Handles ACPI event notification on {host,p2p} bridges. + * handles ACPI event notification on {host,p2p} bridges + * */ static void handle_hotplug_event_bridge(acpi_handle handle, u32 type, void *context) { @@ -1630,11 +1634,13 @@ static void handle_hotplug_event_bridge(acpi_handle handle, u32 type, void *cont /** * handle_hotplug_event_func - handle ACPI event on functions (i.e. slots) + * * @handle: Notify()'ed acpi_handle * @type: Notify code * @context: pointer to acpiphp_func structure * - * Handles ACPI event notification on slots. + * handles ACPI event notification on slots + * */ static void handle_hotplug_event_func(acpi_handle handle, u32 type, void *context) { @@ -1699,6 +1705,7 @@ static struct acpi_pci_driver acpi_pci_hp_driver = { /** * acpiphp_glue_init - initializes all PCI hotplug - ACPI glue data structures + * */ int __init acpiphp_glue_init(void) { @@ -1719,7 +1726,7 @@ int __init acpiphp_glue_init(void) /** * acpiphp_glue_exit - terminates all PCI hotplug - ACPI glue data structures * - * This function frees all data allocated in acpiphp_glue_init(). + * This function frees all data allocated in acpiphp_glue_init() */ void acpiphp_glue_exit(void) { @@ -1753,6 +1760,7 @@ int __init acpiphp_get_num_slots(void) * acpiphp_for_each_slot - call function for each slot * @fn: callback function * @data: context to be passed to callback function + * */ static int acpiphp_for_each_slot(acpiphp_callback fn, void *data) { @@ -1778,7 +1786,6 @@ static int acpiphp_for_each_slot(acpiphp_callback fn, void *data) /** * acpiphp_enable_slot - power on slot - * @slot: ACPI PHP slot */ int acpiphp_enable_slot(struct acpiphp_slot *slot) { @@ -1808,7 +1815,6 @@ int acpiphp_enable_slot(struct acpiphp_slot *slot) /** * acpiphp_disable_slot - power off slot - * @slot: ACPI PHP slot */ int acpiphp_disable_slot(struct acpiphp_slot *slot) { diff --git a/trunk/drivers/pci/hotplug/acpiphp_ibm.c b/trunk/drivers/pci/hotplug/acpiphp_ibm.c index 47d26b65e99a..56829f82be4a 100644 --- a/trunk/drivers/pci/hotplug/acpiphp_ibm.c +++ b/trunk/drivers/pci/hotplug/acpiphp_ibm.c @@ -134,11 +134,11 @@ static struct acpiphp_attention_info ibm_attention_info = * ibm_slot_from_id - workaround for bad ibm hardware * @id: the slot number that linux refers to the slot by * - * Description: This method returns the aCPI slot descriptor + * Description: this method returns the aCPI slot descriptor * corresponding to the Linux slot number. This descriptor * has info about the aPCI slot id and attention status. * This descriptor must be freed using kfree when done. - */ + **/ static union apci_descriptor *ibm_slot_from_id(int id) { int ind = 0, size; @@ -173,9 +173,9 @@ static union apci_descriptor *ibm_slot_from_id(int id) * @slot: the hotplug_slot to work with * @status: what to set the LED to (0 or 1) * - * Description: This method is registered with the acpiphp module as a - * callback to do the device specific task of setting the LED status. - */ + * Description: this method is registered with the acpiphp module as a + * callback to do the device specific task of setting the LED status + **/ static int ibm_set_attention_status(struct hotplug_slot *slot, u8 status) { union acpi_object args[2]; @@ -213,13 +213,13 @@ static int ibm_set_attention_status(struct hotplug_slot *slot, u8 status) * @slot: the hotplug_slot to work with * @status: returns what the LED is set to (0 or 1) * - * Description: This method is registered with the acpiphp module as a - * callback to do the device specific task of getting the LED status. + * Description: this method is registered with the acpiphp module as a + * callback to do the device specific task of getting the LED status * * Because there is no direct method of getting the LED status directly * from an ACPI call, we read the aPCI table and parse out our * slot descriptor to read the status from that. - */ + **/ static int ibm_get_attention_status(struct hotplug_slot *slot, u8 *status) { union apci_descriptor *ibm_slot; @@ -245,8 +245,8 @@ static int ibm_get_attention_status(struct hotplug_slot *slot, u8 *status) * @event: the event info (device specific) * @context: passed context (our notification struct) * - * Description: This method is registered as a callback with the ACPI - * subsystem it is called when this device has an event to notify the OS of. + * Description: this method is registered as a callback with the ACPI + * subsystem it is called when this device has an event to notify the OS of * * The events actually come from the device as two events that get * synthesized into one event with data by this function. The event @@ -256,7 +256,7 @@ static int ibm_get_attention_status(struct hotplug_slot *slot, u8 *status) * From section 5.6.2.2 of the ACPI 2.0 spec, I understand that the OSPM will * only re-enable the interrupt that causes this event AFTER this method * has returned, thereby enforcing serial access for the notification struct. - */ + **/ static void ibm_handle_events(acpi_handle handle, u32 event, void *context) { u8 detail = event & 0x0f; @@ -279,16 +279,16 @@ static void ibm_handle_events(acpi_handle handle, u32 event, void *context) * ibm_get_table_from_acpi - reads the APLS buffer from ACPI * @bufp: address to pointer to allocate for the table * - * Description: This method reads the APLS buffer in from ACPI and + * Description: this method reads the APLS buffer in from ACPI and * stores the "stripped" table into a single buffer - * it allocates and passes the address back in bufp. + * it allocates and passes the address back in bufp * * If NULL is passed in as buffer, this method only calculates * the size of the table and returns that without filling - * in the buffer. + * in the buffer * - * Returns < 0 on error or the size of the table on success. - */ + * returns < 0 on error or the size of the table on success + **/ static int ibm_get_table_from_acpi(char **bufp) { union acpi_object *package; @@ -349,18 +349,17 @@ static int ibm_get_table_from_acpi(char **bufp) /** * ibm_read_apci_table - callback for the sysfs apci_table file * @kobj: the kobject this binary attribute is a part of - * @bin_attr: struct bin_attribute for this file * @buffer: the kernel space buffer to fill * @pos: the offset into the file * @size: the number of bytes requested * - * Description: Gets registered with sysfs as the reader callback - * to be executed when /sys/bus/pci/slots/apci_table gets read. + * Description: gets registered with sysfs as the reader callback + * to be executed when /sys/bus/pci/slots/apci_table gets read * * Since we don't get notified on open and close for this file, * things get really tricky here... - * our solution is to only allow reading the table in all at once. - */ + * our solution is to only allow reading the table in all at once + **/ static ssize_t ibm_read_apci_table(struct kobject *kobj, struct bin_attribute *bin_attr, char *buffer, loff_t pos, size_t size) @@ -386,10 +385,10 @@ static ssize_t ibm_read_apci_table(struct kobject *kobj, * @context: a pointer to our handle to fill when we find the device * @rv: a return value to fill if desired * - * Description: Used as a callback when calling acpi_walk_namespace + * Description: used as a callback when calling acpi_walk_namespace * to find our device. When this method returns non-zero - * acpi_walk_namespace quits its search and returns our value. - */ + * acpi_walk_namespace quits its search and returns our value + **/ static acpi_status __init ibm_find_acpi_device(acpi_handle handle, u32 lvl, void *context, void **rv) { diff --git a/trunk/drivers/pci/hotplug/cpqphp_core.c b/trunk/drivers/pci/hotplug/cpqphp_core.c index 74178875b949..a96b739b2d35 100644 --- a/trunk/drivers/pci/hotplug/cpqphp_core.c +++ b/trunk/drivers/pci/hotplug/cpqphp_core.c @@ -117,10 +117,12 @@ static inline int is_slot66mhz(struct slot *slot) /** * detect_SMBIOS_pointer - find the System Management BIOS Table in mem region. + * * @begin: begin pointer for region to be scanned. * @end: end pointer for region to be scanned. * - * Returns pointer to the head of the SMBIOS tables (or %NULL). + * Returns pointer to the head of the SMBIOS tables (or NULL) + * */ static void __iomem * detect_SMBIOS_pointer(void __iomem *begin, void __iomem *end) { @@ -155,9 +157,9 @@ static void __iomem * detect_SMBIOS_pointer(void __iomem *begin, void __iomem *e /** * init_SERR - Initializes the per slot SERR generation. - * @ctrl: controller to use * * For unexpected switch opens + * */ static int init_SERR(struct controller * ctrl) { @@ -222,15 +224,14 @@ static int pci_print_IRQ_route (void) /** * get_subsequent_smbios_entry: get the next entry from bios table. - * @smbios_start: where to start in the SMBIOS table - * @smbios_table: location of the SMBIOS table - * @curr: %NULL or pointer to previously returned structure * - * Gets the first entry if previous == NULL; - * otherwise, returns the next entry. - * Uses global SMBIOS Table pointer. + * Gets the first entry if previous == NULL + * Otherwise, returns the next entry + * Uses global SMBIOS Table pointer * - * Returns a pointer to an SMBIOS structure or NULL if none found. + * @curr: %NULL or pointer to previously returned structure + * + * returns a pointer to an SMBIOS structure or NULL if none found */ static void __iomem *get_subsequent_smbios_entry(void __iomem *smbios_start, void __iomem *smbios_table, @@ -271,18 +272,17 @@ static void __iomem *get_subsequent_smbios_entry(void __iomem *smbios_start, /** - * get_SMBIOS_entry - return the requested SMBIOS entry or %NULL - * @smbios_start: where to start in the SMBIOS table - * @smbios_table: location of the SMBIOS table - * @type: SMBIOS structure type to be returned + * get_SMBIOS_entry + * + * @type:SMBIOS structure type to be returned * @previous: %NULL or pointer to previously returned structure * - * Gets the first entry of the specified type if previous == %NULL; + * Gets the first entry of the specified type if previous == NULL * Otherwise, returns the next entry of the given type. - * Uses global SMBIOS Table pointer. - * Uses get_subsequent_smbios_entry. + * Uses global SMBIOS Table pointer + * Uses get_subsequent_smbios_entry * - * Returns a pointer to an SMBIOS structure or %NULL if none found. + * returns a pointer to an SMBIOS structure or %NULL if none found */ static void __iomem *get_SMBIOS_entry(void __iomem *smbios_start, void __iomem *smbios_table, @@ -581,9 +581,7 @@ get_slot_mapping(struct pci_bus *bus, u8 bus_num, u8 dev_num, u8 *slot) /** * cpqhp_set_attention_status - Turns the Amber LED for a slot on or off - * @ctrl: struct controller to use - * @func: PCI device/function info - * @status: LED control flag: 1 = LED on, 0 = LED off + * */ static int cpqhp_set_attention_status(struct controller *ctrl, struct pci_func *func, @@ -623,8 +621,7 @@ cpqhp_set_attention_status(struct controller *ctrl, struct pci_func *func, /** * set_attention_status - Turns the Amber LED for a slot on or off - * @hotplug_slot: slot to change LED on - * @status: LED control flag + * */ static int set_attention_status (struct hotplug_slot *hotplug_slot, u8 status) { diff --git a/trunk/drivers/pci/hotplug/cpqphp_ctrl.c b/trunk/drivers/pci/hotplug/cpqphp_ctrl.c index 4018420c6f95..856d57b4d604 100644 --- a/trunk/drivers/pci/hotplug/cpqphp_ctrl.c +++ b/trunk/drivers/pci/hotplug/cpqphp_ctrl.c @@ -123,7 +123,7 @@ static u8 handle_switch_change(u8 change, struct controller * ctrl) } /** - * cpqhp_find_slot - find the struct slot of given device + * cpqhp_find_slot: find the struct slot of given device * @ctrl: scan lots of this controller * @device: the device id to find */ @@ -305,8 +305,9 @@ static u8 handle_power_fault(u8 change, struct controller * ctrl) /** - * sort_by_size - sort nodes on the list by their length, smallest first. + * sort_by_size: sort nodes on the list by their length, smallest first. * @head: list to sort + * */ static int sort_by_size(struct pci_resource **head) { @@ -353,8 +354,9 @@ static int sort_by_size(struct pci_resource **head) /** - * sort_by_max_size - sort nodes on the list by their length, largest first. + * sort_by_max_size: sort nodes on the list by their length, largest first. * @head: list to sort + * */ static int sort_by_max_size(struct pci_resource **head) { @@ -401,10 +403,8 @@ static int sort_by_max_size(struct pci_resource **head) /** - * do_pre_bridge_resource_split - find node of resources that are unused - * @head: new list head - * @orig_head: original list head - * @alignment: max node size (?) + * do_pre_bridge_resource_split: find node of resources that are unused + * */ static struct pci_resource *do_pre_bridge_resource_split(struct pci_resource **head, struct pci_resource **orig_head, u32 alignment) @@ -477,9 +477,8 @@ static struct pci_resource *do_pre_bridge_resource_split(struct pci_resource **h /** - * do_bridge_resource_split - find one node of resources that aren't in use - * @head: list head - * @alignment: max node size (?) + * do_bridge_resource_split: find one node of resources that aren't in use + * */ static struct pci_resource *do_bridge_resource_split(struct pci_resource **head, u32 alignment) { @@ -526,13 +525,14 @@ static struct pci_resource *do_bridge_resource_split(struct pci_resource **head, /** - * get_io_resource - find first node of given size not in ISA aliasing window. + * get_io_resource: find first node of given size not in ISA aliasing window. * @head: list to search * @size: size of node to find, must be a power of two. * - * Description: This function sorts the resource list by size and then returns + * Description: this function sorts the resource list by size and then returns * returns the first node of "size" length that is not in the ISA aliasing * window. If it finds a node larger than "size" it will split it up. + * */ static struct pci_resource *get_io_resource(struct pci_resource **head, u32 size) { @@ -620,7 +620,7 @@ static struct pci_resource *get_io_resource(struct pci_resource **head, u32 size /** - * get_max_resource - get largest node which has at least the given size. + * get_max_resource: get largest node which has at least the given size. * @head: the list to search the node in * @size: the minimum size of the node to find * @@ -712,7 +712,7 @@ static struct pci_resource *get_max_resource(struct pci_resource **head, u32 siz /** - * get_resource - find resource of given size and split up larger ones. + * get_resource: find resource of given size and split up larger ones. * @head: the list to search for resources * @size: the size limit to use * @@ -804,14 +804,14 @@ static struct pci_resource *get_resource(struct pci_resource **head, u32 size) /** - * cpqhp_resource_sort_and_combine - sort nodes by base addresses and clean up + * cpqhp_resource_sort_and_combine: sort nodes by base addresses and clean up. * @head: the list to sort and clean up * * Description: Sorts all of the nodes in the list in ascending order by * their base addresses. Also does garbage collection by * combining adjacent nodes. * - * Returns %0 if success. + * returns 0 if success */ int cpqhp_resource_sort_and_combine(struct pci_resource **head) { @@ -951,9 +951,9 @@ irqreturn_t cpqhp_ctrl_intr(int IRQ, void *data) /** * cpqhp_slot_create - Creates a node and adds it to the proper bus. - * @busnumber: bus where new node is to be located + * @busnumber - bus where new node is to be located * - * Returns pointer to the new node or %NULL if unsuccessful. + * Returns pointer to the new node or NULL if unsuccessful */ struct pci_func *cpqhp_slot_create(u8 busnumber) { @@ -986,7 +986,7 @@ struct pci_func *cpqhp_slot_create(u8 busnumber) * slot_remove - Removes a node from the linked list of slots. * @old_slot: slot to remove * - * Returns %0 if successful, !0 otherwise. + * Returns 0 if successful, !0 otherwise. */ static int slot_remove(struct pci_func * old_slot) { @@ -1026,7 +1026,7 @@ static int slot_remove(struct pci_func * old_slot) * bridge_slot_remove - Removes a node from the linked list of slots. * @bridge: bridge to remove * - * Returns %0 if successful, !0 otherwise. + * Returns 0 if successful, !0 otherwise. */ static int bridge_slot_remove(struct pci_func *bridge) { @@ -1071,7 +1071,7 @@ static int bridge_slot_remove(struct pci_func *bridge) * cpqhp_slot_find - Looks for a node by bus, and device, multiple functions accessed * @bus: bus to find * @device: device to find - * @index: is %0 for first function found, %1 for the second... + * @index: is 0 for first function found, 1 for the second... * * Returns pointer to the node if successful, %NULL otherwise. */ @@ -1115,13 +1115,16 @@ static int is_bridge(struct pci_func * func) /** - * set_controller_speed - set the frequency and/or mode of a specific controller segment. + * set_controller_speed - set the frequency and/or mode of a specific + * controller segment. + * * @ctrl: controller to change frequency/mode for. * @adapter_speed: the speed of the adapter we want to match. * @hp_slot: the slot number where the adapter is installed. * - * Returns %0 if we successfully change frequency and/or mode to match the + * Returns 0 if we successfully change frequency and/or mode to match the * adapter speed. + * */ static u8 set_controller_speed(struct controller *ctrl, u8 adapter_speed, u8 hp_slot) { @@ -1250,14 +1253,13 @@ static u8 set_controller_speed(struct controller *ctrl, u8 adapter_speed, u8 hp_ /** * board_replaced - Called after a board has been replaced in the system. - * @func: PCI device/function information - * @ctrl: hotplug controller * - * This is only used if we don't have resources for hot add. - * Turns power on for the board. - * Checks to see if board is the same. - * If board is same, reconfigures it. + * This is only used if we don't have resources for hot add + * Turns power on for the board + * Checks to see if board is the same + * If board is same, reconfigures it * If board isn't same, turns it back off. + * */ static u32 board_replaced(struct pci_func *func, struct controller *ctrl) { @@ -1401,11 +1403,10 @@ static u32 board_replaced(struct pci_func *func, struct controller *ctrl) /** * board_added - Called after a board has been added to the system. - * @func: PCI device/function info - * @ctrl: hotplug controller * - * Turns power on for the board. - * Configures board. + * Turns power on for the board + * Configures board + * */ static u32 board_added(struct pci_func *func, struct controller *ctrl) { @@ -1606,10 +1607,8 @@ static u32 board_added(struct pci_func *func, struct controller *ctrl) /** - * remove_board - Turns off slot and LEDs - * @func: PCI device/function info - * @replace_flag: whether replacing or adding a new device - * @ctrl: target controller + * remove_board - Turns off slot and LED's + * */ static u32 remove_board(struct pci_func * func, u32 replace_flag, struct controller * ctrl) { @@ -1903,11 +1902,11 @@ static void interrupt_event_handler(struct controller *ctrl) /** - * cpqhp_pushbutton_thread - handle pushbutton events - * @slot: target slot (struct) + * cpqhp_pushbutton_thread * - * Scheduled procedure to handle blocking stuff for the pushbuttons. + * Scheduled procedure to handle blocking stuff for the pushbuttons * Handles all pending events and exits. + * */ void cpqhp_pushbutton_thread(unsigned long slot) { @@ -2138,10 +2137,9 @@ int cpqhp_process_SS(struct controller *ctrl, struct pci_func *func) } /** - * switch_leds - switch the leds, go from one site to the other. + * switch_leds: switch the leds, go from one site to the other. * @ctrl: controller to use * @num_of_slots: number of slots to use - * @work_LED: LED control value * @direction: 1 to start from the left side, 0 to start right. */ static void switch_leds(struct controller *ctrl, const int num_of_slots, @@ -2167,11 +2165,11 @@ static void switch_leds(struct controller *ctrl, const int num_of_slots, } /** - * cpqhp_hardware_test - runs hardware tests - * @ctrl: target controller - * @test_num: the number written to the "test" file in sysfs. + * hardware_test - runs hardware tests * * For hot plug ctrl folks to play with. + * test_num is the number written to the "test" file in sysfs + * */ int cpqhp_hardware_test(struct controller *ctrl, int test_num) { @@ -2251,12 +2249,14 @@ int cpqhp_hardware_test(struct controller *ctrl, int test_num) /** * configure_new_device - Configures the PCI header information of one board. + * * @ctrl: pointer to controller structure * @func: pointer to function structure * @behind_bridge: 1 if this is a recursive call, 0 if not * @resources: pointer to set of resource lists * - * Returns 0 if success. + * Returns 0 if success + * */ static u32 configure_new_device(struct controller * ctrl, struct pci_func * func, u8 behind_bridge, struct resource_lists * resources) @@ -2346,13 +2346,15 @@ static u32 configure_new_device(struct controller * ctrl, struct pci_func * func /** * configure_new_function - Configures the PCI header information of one device + * * @ctrl: pointer to controller structure * @func: pointer to function structure * @behind_bridge: 1 if this is a recursive call, 0 if not * @resources: pointer to set of resource lists * * Calls itself recursively for bridged devices. - * Returns 0 if success. + * Returns 0 if success + * */ static int configure_new_function(struct controller *ctrl, struct pci_func *func, u8 behind_bridge, diff --git a/trunk/drivers/pci/hotplug/fakephp.c b/trunk/drivers/pci/hotplug/fakephp.c index d7a293e3faf5..027f6865d7e3 100644 --- a/trunk/drivers/pci/hotplug/fakephp.c +++ b/trunk/drivers/pci/hotplug/fakephp.c @@ -165,11 +165,11 @@ static void remove_slot(struct dummy_slot *dslot) } /** - * pci_rescan_slot - Rescan slot - * @temp: Device template. Should be set: bus and devfn. + * Rescan slot. + * Tries hard not to re-enable already existing devices + * also handles scanning of subfunctions * - * Tries hard not to re-enable already existing devices; - * also handles scanning of subfunctions. + * @param temp Device template. Should be set: bus and devfn. */ static void pci_rescan_slot(struct pci_dev *temp) { @@ -229,10 +229,10 @@ static void pci_rescan_slot(struct pci_dev *temp) /** - * pci_rescan_bus - Rescan PCI bus - * @bus: the PCI bus to rescan + * Rescan PCI bus. + * call pci_rescan_slot for each possible function of the bus * - * Call pci_rescan_slot for each possible function of the bus. + * @param bus */ static void pci_rescan_bus(const struct pci_bus *bus) { diff --git a/trunk/drivers/pci/hotplug/pciehp_ctrl.c b/trunk/drivers/pci/hotplug/pciehp_ctrl.c index f1e0966cee95..c8cb49c5a752 100644 --- a/trunk/drivers/pci/hotplug/pciehp_ctrl.c +++ b/trunk/drivers/pci/hotplug/pciehp_ctrl.c @@ -208,10 +208,10 @@ static void set_slot_off(struct controller *ctrl, struct slot * pslot) /** * board_added - Called after a board has been added to the system. - * @p_slot: &slot where board is added * - * Turns power on for the board. - * Configures board. + * Turns power on for the board + * Configures board + * */ static int board_added(struct slot *p_slot) { @@ -276,8 +276,8 @@ static int board_added(struct slot *p_slot) } /** - * remove_board - Turns off slot and LEDs - * @p_slot: slot where board is being removed + * remove_board - Turns off slot and LED's + * */ static int remove_board(struct slot *p_slot) { @@ -319,11 +319,11 @@ struct power_work_info { }; /** - * pciehp_power_thread - handle pushbutton events - * @work: &struct work_struct describing work to be done + * pciehp_pushbutton_thread * - * Scheduled procedure to handle blocking stuff for the pushbuttons. + * Scheduled procedure to handle blocking stuff for the pushbuttons * Handles all pending events and exits. + * */ static void pciehp_power_thread(struct work_struct *work) { diff --git a/trunk/drivers/pci/hotplug/rpadlpar_core.c b/trunk/drivers/pci/hotplug/rpadlpar_core.c index b169b0e2647f..deb6b5e35feb 100644 --- a/trunk/drivers/pci/hotplug/rpadlpar_core.c +++ b/trunk/drivers/pci/hotplug/rpadlpar_core.c @@ -100,7 +100,6 @@ static struct device_node *find_dlpar_node(char *drc_name, int *node_type) /** * find_php_slot - return hotplug slot structure for device node - * @dn: target &device_node * * This routine will return the hotplug slot structure * for a given device node. Note that built-in PCI slots @@ -294,8 +293,9 @@ static int dlpar_add_vio_slot(char *drc_name, struct device_node *dn) * dlpar_add_slot - DLPAR add an I/O Slot * @drc_name: drc-name of newly added slot * - * Make the hotplug module and the kernel aware of a newly added I/O Slot. - * Return Codes: + * Make the hotplug module and the kernel aware + * of a newly added I/O Slot. + * Return Codes - * 0 Success * -ENODEV Not a valid drc_name * -EINVAL Slot already added @@ -339,9 +339,9 @@ int dlpar_add_slot(char *drc_name) /** * dlpar_remove_vio_slot - DLPAR remove a virtual I/O Slot * @drc_name: drc-name of newly added slot - * @dn: &device_node * - * Remove the kernel and hotplug representations of an I/O Slot. + * Remove the kernel and hotplug representations + * of an I/O Slot. * Return Codes: * 0 Success * -EINVAL Vio dev doesn't exist @@ -359,11 +359,11 @@ static int dlpar_remove_vio_slot(char *drc_name, struct device_node *dn) } /** - * dlpar_remove_pci_slot - DLPAR remove a PCI I/O Slot + * dlpar_remove_slot - DLPAR remove a PCI I/O Slot * @drc_name: drc-name of newly added slot - * @dn: &device_node * - * Remove the kernel and hotplug representations of a PCI I/O Slot. + * Remove the kernel and hotplug representations + * of a PCI I/O Slot. * Return Codes: * 0 Success * -ENODEV Not a valid drc_name @@ -405,7 +405,8 @@ int dlpar_remove_pci_slot(char *drc_name, struct device_node *dn) * dlpar_remove_slot - DLPAR remove an I/O Slot * @drc_name: drc-name of newly added slot * - * Remove the kernel and hotplug representations of an I/O Slot. + * Remove the kernel and hotplug representations + * of an I/O Slot. * Return Codes: * 0 Success * -ENODEV Not a valid drc_name diff --git a/trunk/drivers/pci/hotplug/rpaphp_core.c b/trunk/drivers/pci/hotplug/rpaphp_core.c index 58f1a9927709..458c08ef2654 100644 --- a/trunk/drivers/pci/hotplug/rpaphp_core.c +++ b/trunk/drivers/pci/hotplug/rpaphp_core.c @@ -54,12 +54,10 @@ module_param(debug, bool, 0644); /** * set_attention_status - set attention LED - * @hotplug_slot: target &hotplug_slot - * @value: LED control value - * * echo 0 > attention -- set LED OFF * echo 1 > attention -- set LED ON * echo 2 > attention -- set LED ID(identify, light is blinking) + * */ static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 value) { @@ -101,8 +99,6 @@ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 * value) /** * get_attention_status - get attention LED status - * @hotplug_slot: slot to get status - * @value: pointer to store status */ static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 * value) { @@ -258,11 +254,6 @@ static int is_php_type(char *drc_type) /** * is_php_dn() - return 1 if this is a hotpluggable pci slot, else 0 - * @dn: target &device_node - * @indexes: passed to get_children_props() - * @names: passed to get_children_props() - * @types: returned from get_children_props() - * @power_domains: * * This routine will return true only if the device node is * a hotpluggable slot. This routine will return false @@ -288,7 +279,7 @@ static int is_php_dn(struct device_node *dn, const int **indexes, /** * rpaphp_add_slot -- declare a hotplug slot to the hotplug subsystem. - * @dn: device node of slot + * @dn device node of slot * * This subroutine will register a hotplugable slot with the * PCI hotplug infrastructure. This routine is typicaly called @@ -300,7 +291,7 @@ static int is_php_dn(struct device_node *dn, const int **indexes, * routine will just return without doing anything, since embedded * slots cannot be hotplugged. * - * To remove a slot, it suffices to call rpaphp_deregister_slot(). + * To remove a slot, it suffices to call rpaphp_deregister_slot() */ int rpaphp_add_slot(struct device_node *dn) { diff --git a/trunk/drivers/pci/hotplug/rpaphp_pci.c b/trunk/drivers/pci/hotplug/rpaphp_pci.c index 0de84533cd80..54ca8650d511 100644 --- a/trunk/drivers/pci/hotplug/rpaphp_pci.c +++ b/trunk/drivers/pci/hotplug/rpaphp_pci.c @@ -79,7 +79,6 @@ static void set_slot_name(struct slot *slot) /** * rpaphp_enable_slot - record slot state, config pci device - * @slot: target &slot * * Initialize values in the slot, and the hotplug_slot info * structures to indicate if there is a pci card plugged into diff --git a/trunk/drivers/pci/hotplug/shpchp_ctrl.c b/trunk/drivers/pci/hotplug/shpchp_ctrl.c index eb5cac6f08ae..d2fc35598cdd 100644 --- a/trunk/drivers/pci/hotplug/shpchp_ctrl.c +++ b/trunk/drivers/pci/hotplug/shpchp_ctrl.c @@ -231,10 +231,10 @@ static int fix_bus_speed(struct controller *ctrl, struct slot *pslot, /** * board_added - Called after a board has been added to the system. - * @p_slot: target &slot * - * Turns power on for the board. - * Configures board. + * Turns power on for the board + * Configures board + * */ static int board_added(struct slot *p_slot) { @@ -350,8 +350,8 @@ static int board_added(struct slot *p_slot) /** - * remove_board - Turns off slot and LEDs - * @p_slot: target &slot + * remove_board - Turns off slot and LED's + * */ static int remove_board(struct slot *p_slot) { @@ -397,11 +397,11 @@ struct pushbutton_work_info { }; /** - * shpchp_pushbutton_thread - handle pushbutton events - * @work: &struct work_struct to be handled + * shpchp_pushbutton_thread * - * Scheduled procedure to handle blocking stuff for the pushbuttons. + * Scheduled procedure to handle blocking stuff for the pushbuttons * Handles all pending events and exits. + * */ static void shpchp_pushbutton_thread(struct work_struct *work) { diff --git a/trunk/drivers/pci/pci-sysfs.c b/trunk/drivers/pci/pci-sysfs.c index 7d1877341aad..1b7b2812bf2d 100644 --- a/trunk/drivers/pci/pci-sysfs.c +++ b/trunk/drivers/pci/pci-sysfs.c @@ -702,10 +702,8 @@ static int __init pci_sysfs_init(void) sysfs_initialized = 1; for_each_pci_dev(pdev) { retval = pci_create_sysfs_dev_files(pdev); - if (retval) { - pci_dev_put(pdev); + if (retval) return retval; - } } return 0; diff --git a/trunk/drivers/pci/pcie/aer/aerdrv_core.c b/trunk/drivers/pci/pcie/aer/aerdrv_core.c index 3c0d8d138f5a..92a8469b21ba 100644 --- a/trunk/drivers/pci/pcie/aer/aerdrv_core.c +++ b/trunk/drivers/pci/pcie/aer/aerdrv_core.c @@ -168,11 +168,11 @@ static int find_device_iter(struct device *device, void *data) /** * find_source_device - search through device hierarchy for source device - * @parent: pointer to Root Port pci_dev data structure + * @p_dev: pointer to Root Port pci_dev data structure * @id: device ID of agent who sends an error message to this Root Port * * Invoked when error is detected at the Root Port. - */ + **/ static struct device* find_source_device(struct pci_dev *parent, u16 id) { struct pci_dev *dev = parent; @@ -286,15 +286,14 @@ static void report_resume(struct pci_dev *dev, void *data) /** * broadcast_error_message - handle message broadcast to downstream drivers - * @dev: pointer to from where in a hierarchy message is broadcasted down + * @device: pointer to from where in a hierarchy message is broadcasted down + * @api: callback to be broadcasted * @state: error state - * @error_mesg: message to print - * @cb: callback to be broadcasted * * Invoked during error recovery process. Once being invoked, the content * of error severity will be broadcasted to all downstream drivers in a * hierarchy in question. - */ + **/ static pci_ers_result_t broadcast_error_message(struct pci_dev *dev, enum pci_channel_state state, char *error_mesg, @@ -429,7 +428,7 @@ static pci_ers_result_t reset_link(struct pcie_device *aerdev, * Invoked when an error is nonfatal/fatal. Once being invoked, broadcast * error detected message to all downstream drivers within a hierarchy in * question and return the returned code. - */ + **/ static pci_ers_result_t do_recovery(struct pcie_device *aerdev, struct pci_dev *dev, int severity) @@ -489,7 +488,7 @@ static pci_ers_result_t do_recovery(struct pcie_device *aerdev, * @info: comprehensive error information * * Invoked when an error being detected by Root Port. - */ + **/ static void handle_error_source(struct pcie_device * aerdev, struct pci_dev *dev, struct aer_err_info info) @@ -522,7 +521,7 @@ static void handle_error_source(struct pcie_device * aerdev, * @rpc: pointer to a Root Port data structure * * Invoked when PCIE bus loads AER service driver. - */ + **/ void aer_enable_rootport(struct aer_rpc *rpc) { struct pci_dev *pdev = rpc->rpd->port; @@ -570,7 +569,7 @@ void aer_enable_rootport(struct aer_rpc *rpc) * @rpc: pointer to a Root Port data structure * * Invoked when PCIE bus unloads AER service driver. - */ + **/ static void disable_root_aer(struct aer_rpc *rpc) { struct pci_dev *pdev = rpc->rpd->port; @@ -591,7 +590,7 @@ static void disable_root_aer(struct aer_rpc *rpc) * @rpc: pointer to the root port which holds an error * * Invoked by DPC handler to consume an error. - */ + **/ static struct aer_err_source* get_e_source(struct aer_rpc *rpc) { struct aer_err_source *e_source; @@ -656,7 +655,7 @@ static int get_device_error_info(struct pci_dev *dev, struct aer_err_info *info) * aer_isr_one_error - consume an error detected by root port * @p_device: pointer to error root port service device * @e_src: pointer to an error source - */ + **/ static void aer_isr_one_error(struct pcie_device *p_device, struct aer_err_source *e_src) { @@ -707,7 +706,7 @@ static void aer_isr_one_error(struct pcie_device *p_device, * @work: definition of this work item * * Invoked, as DPC, when root port records new detected error - */ + **/ void aer_isr(struct work_struct *work) { struct aer_rpc *rpc = container_of(work, struct aer_rpc, dpc_handler); @@ -730,7 +729,7 @@ void aer_isr(struct work_struct *work) * @rpc: pointer to a root port device being deleted * * Invoked when AER service unloaded on a specific Root Port - */ + **/ void aer_delete_rootport(struct aer_rpc *rpc) { /* Disable root port AER itself */ @@ -744,7 +743,7 @@ void aer_delete_rootport(struct aer_rpc *rpc) * @dev: pointer to AER pcie device * * Invoked when AER service driver is loaded. - */ + **/ int aer_init(struct pcie_device *dev) { if (aer_osc_setup(dev) && !forceload) diff --git a/trunk/drivers/pci/pcie/portdrv_pci.c b/trunk/drivers/pci/pcie/portdrv_pci.c index 26057f98f72e..df383645e366 100644 --- a/trunk/drivers/pci/pcie/portdrv_pci.c +++ b/trunk/drivers/pci/pcie/portdrv_pci.c @@ -217,7 +217,7 @@ static int slot_reset_iter(struct device *device, void *data) static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev) { - pci_ers_result_t status = PCI_ERS_RESULT_NONE; + pci_ers_result_t status; int retval; /* If fatal, restore cfg space for possible link reset at upstream */ diff --git a/trunk/drivers/pnp/pnpacpi/rsparser.c b/trunk/drivers/pnp/pnpacpi/rsparser.c index 3c5eb374adf8..cd0a204d96d1 100644 --- a/trunk/drivers/pnp/pnpacpi/rsparser.c +++ b/trunk/drivers/pnp/pnpacpi/rsparser.c @@ -75,7 +75,6 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res, { int i = 0; int irq; - int p, t; if (!valid_IRQ(gsi)) return; @@ -83,27 +82,18 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res, while (!(res->irq_resource[i].flags & IORESOURCE_UNSET) && i < PNP_MAX_IRQ) i++; - if (i >= PNP_MAX_IRQ) { - printk(KERN_ERR "pnpacpi: exceeded the max number of IRQ " - "resources: %d \n", PNP_MAX_IRQ); + if (i >= PNP_MAX_IRQ) return; + +#ifdef CONFIG_X86 + if (gsi < 16 && (triggering != ACPI_EDGE_SENSITIVE || + polarity != ACPI_ACTIVE_HIGH)) { + pnp_warn("BIOS BUG: legacy PNP IRQ %d should be edge trigger, " + "active high", gsi); + triggering = ACPI_EDGE_SENSITIVE; + polarity = ACPI_ACTIVE_HIGH; } - /* - * in IO-APIC mode, use overrided attribute. Two reasons: - * 1. BIOS bug in DSDT - * 2. BIOS uses IO-APIC mode Interrupt Source Override - */ - if (!acpi_get_override_irq(gsi, &t, &p)) { - t = t ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE; - p = p ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH; - - if (triggering != t || polarity != p) { - pnp_warn("IRQ %d override to %s, %s", - gsi, t ? "edge":"level", p ? "low":"high"); - triggering = t; - polarity = p; - } - } +#endif res->irq_resource[i].flags = IORESOURCE_IRQ; // Also clears _UNSET flag res->irq_resource[i].flags |= irq_flags(triggering, polarity); @@ -183,9 +173,6 @@ static void pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table *res, } res->dma_resource[i].start = dma; res->dma_resource[i].end = dma; - } else { - printk(KERN_ERR "pnpacpi: exceeded the max number of DMA " - "resources: %d \n", PNP_MAX_DMA); } } @@ -207,9 +194,6 @@ static void pnpacpi_parse_allocated_ioresource(struct pnp_resource_table *res, } res->port_resource[i].start = io; res->port_resource[i].end = io + len - 1; - } else { - printk(KERN_ERR "pnpacpi: exceeded the max number of IO " - "resources: %d \n", PNP_MAX_PORT); } } @@ -233,9 +217,6 @@ static void pnpacpi_parse_allocated_memresource(struct pnp_resource_table *res, res->mem_resource[i].start = mem; res->mem_resource[i].end = mem + len - 1; - } else { - printk(KERN_ERR "pnpacpi: exceeded the max number of mem " - "resources: %d\n", PNP_MAX_MEM); } } diff --git a/trunk/drivers/pnp/resource.c b/trunk/drivers/pnp/resource.c index e50ebcffb962..41d73a5e9312 100644 --- a/trunk/drivers/pnp/resource.c +++ b/trunk/drivers/pnp/resource.c @@ -367,10 +367,8 @@ int pnp_check_irq(struct pnp_dev *dev, int idx) { struct pci_dev *pci = NULL; for_each_pci_dev(pci) { - if (pci->irq == *irq) { - pci_dev_put(pci); + if (pci->irq == *irq) return 0; - } } } #endif diff --git a/trunk/drivers/ps3/Makefile b/trunk/drivers/ps3/Makefile index 1f5a2d33bf5b..746031de2195 100644 --- a/trunk/drivers/ps3/Makefile +++ b/trunk/drivers/ps3/Makefile @@ -1,6 +1,6 @@ -obj-$(CONFIG_PS3_VUART) += ps3-vuart.o +obj-$(CONFIG_PS3_VUART) += vuart.o obj-$(CONFIG_PS3_PS3AV) += ps3av_mod.o ps3av_mod-objs += ps3av.o ps3av_cmd.o obj-$(CONFIG_PPC_PS3) += sys-manager-core.o -obj-$(CONFIG_PS3_SYS_MANAGER) += ps3-sys-manager.o +obj-$(CONFIG_PS3_SYS_MANAGER) += sys-manager.o obj-$(CONFIG_PS3_STORAGE) += ps3stor_lib.o diff --git a/trunk/drivers/ps3/ps3-sys-manager.c b/trunk/drivers/ps3/sys-manager.c similarity index 100% rename from trunk/drivers/ps3/ps3-sys-manager.c rename to trunk/drivers/ps3/sys-manager.c diff --git a/trunk/drivers/ps3/ps3-vuart.c b/trunk/drivers/ps3/vuart.c similarity index 100% rename from trunk/drivers/ps3/ps3-vuart.c rename to trunk/drivers/ps3/vuart.c diff --git a/trunk/drivers/rtc/Kconfig b/trunk/drivers/rtc/Kconfig index 1e6715ec51ef..e5cdc0294aaa 100644 --- a/trunk/drivers/rtc/Kconfig +++ b/trunk/drivers/rtc/Kconfig @@ -447,7 +447,7 @@ config RTC_DRV_AT91RM9200 config RTC_DRV_BFIN tristate "Blackfin On-Chip RTC" - depends on BLACKFIN + depends on BFIN help If you say yes here you will get support for the Blackfin On-Chip Real Time Clock. diff --git a/trunk/drivers/rtc/interface.c b/trunk/drivers/rtc/interface.c index a4f56e95cf96..de0da545c7a1 100644 --- a/trunk/drivers/rtc/interface.c +++ b/trunk/drivers/rtc/interface.c @@ -293,7 +293,7 @@ int rtc_irq_register(struct rtc_device *rtc, struct rtc_task *task) return -EINVAL; /* Cannot register while the char dev is in use */ - if (test_and_set_bit(RTC_DEV_BUSY, &rtc->flags)) + if (!(mutex_trylock(&rtc->char_lock))) return -EBUSY; spin_lock_irq(&rtc->irq_task_lock); @@ -303,7 +303,7 @@ int rtc_irq_register(struct rtc_device *rtc, struct rtc_task *task) } spin_unlock_irq(&rtc->irq_task_lock); - clear_bit(RTC_DEV_BUSY, &rtc->flags); + mutex_unlock(&rtc->char_lock); return retval; } diff --git a/trunk/drivers/rtc/rtc-dev.c b/trunk/drivers/rtc/rtc-dev.c index ae1bf177d625..814583bd2fe7 100644 --- a/trunk/drivers/rtc/rtc-dev.c +++ b/trunk/drivers/rtc/rtc-dev.c @@ -26,7 +26,10 @@ static int rtc_dev_open(struct inode *inode, struct file *file) struct rtc_device, char_dev); const struct rtc_class_ops *ops = rtc->ops; - if (test_and_set_bit(RTC_DEV_BUSY, &rtc->flags)) + /* We keep the lock as long as the device is in use + * and return immediately if busy + */ + if (!(mutex_trylock(&rtc->char_lock))) return -EBUSY; file->private_data = rtc; @@ -40,8 +43,8 @@ static int rtc_dev_open(struct inode *inode, struct file *file) return 0; } - /* something has gone wrong */ - clear_bit(RTC_DEV_BUSY, &rtc->flags); + /* something has gone wrong, release the lock */ + mutex_unlock(&rtc->char_lock); return err; } @@ -402,7 +405,7 @@ static int rtc_dev_release(struct inode *inode, struct file *file) if (rtc->ops->release) rtc->ops->release(rtc->dev.parent); - clear_bit(RTC_DEV_BUSY, &rtc->flags); + mutex_unlock(&rtc->char_lock); return 0; } @@ -437,6 +440,7 @@ void rtc_dev_prepare(struct rtc_device *rtc) rtc->dev.devt = MKDEV(MAJOR(rtc_devt), rtc->id); + mutex_init(&rtc->char_lock); #ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL INIT_WORK(&rtc->uie_task, rtc_uie_task); setup_timer(&rtc->uie_timer, rtc_uie_timer, (unsigned long)rtc); diff --git a/trunk/drivers/s390/cio/css.c b/trunk/drivers/s390/cio/css.c index 6db31089d2d7..838f7ac0dc32 100644 --- a/trunk/drivers/s390/cio/css.c +++ b/trunk/drivers/s390/cio/css.c @@ -483,7 +483,7 @@ static DECLARE_WORK(css_reprobe_work, reprobe_all); void css_schedule_reprobe(void) { need_reprobe = 1; - queue_work(slow_path_wq, &css_reprobe_work); + queue_work(ccw_device_work, &css_reprobe_work); } EXPORT_SYMBOL_GPL(css_schedule_reprobe); diff --git a/trunk/drivers/s390/cio/device_fsm.c b/trunk/drivers/s390/cio/device_fsm.c index bfad421cda66..8867443b8060 100644 --- a/trunk/drivers/s390/cio/device_fsm.c +++ b/trunk/drivers/s390/cio/device_fsm.c @@ -1034,7 +1034,7 @@ device_trigger_reprobe(struct subchannel *sch) if (sch->schib.pmcw.dev != cdev->private->dev_id.devno) { PREPARE_WORK(&cdev->private->kick_work, ccw_device_move_to_orphanage); - queue_work(slow_path_wq, &cdev->private->kick_work); + queue_work(ccw_device_work, &cdev->private->kick_work); } else ccw_device_start_id(cdev, 0); } diff --git a/trunk/drivers/s390/cio/device_id.c b/trunk/drivers/s390/cio/device_id.c index 2f6bf462425e..f232832f2b22 100644 --- a/trunk/drivers/s390/cio/device_id.c +++ b/trunk/drivers/s390/cio/device_id.c @@ -113,10 +113,19 @@ __ccw_device_sense_id_start(struct ccw_device *cdev) { struct subchannel *sch; struct ccw1 *ccw; + int ret; sch = to_subchannel(cdev->dev.parent); /* Setup sense channel program. */ ccw = cdev->private->iccws; + if (sch->schib.pmcw.pim != 0x80) { + /* more than one path installed. */ + ccw->cmd_code = CCW_CMD_SUSPEND_RECONN; + ccw->cda = 0; + ccw->count = 0; + ccw->flags = CCW_FLAG_SLI | CCW_FLAG_CC; + ccw++; + } ccw->cmd_code = CCW_CMD_SENSE_ID; ccw->cda = (__u32) __pa (&cdev->private->senseid); ccw->count = sizeof (struct senseid); @@ -124,9 +133,25 @@ __ccw_device_sense_id_start(struct ccw_device *cdev) /* Reset device status. */ memset(&cdev->private->irb, 0, sizeof(struct irb)); - cdev->private->flags.intretry = 0; - return cio_start(sch, ccw, LPM_ANYPATH); + /* Try on every path. */ + ret = -ENODEV; + while (cdev->private->imask != 0) { + if ((sch->opm & cdev->private->imask) != 0 && + cdev->private->iretry > 0) { + cdev->private->iretry--; + /* Reset internal retry indication. */ + cdev->private->flags.intretry = 0; + ret = cio_start (sch, cdev->private->iccws, + cdev->private->imask); + /* ret is 0, -EBUSY, -EACCES or -ENODEV */ + if (ret != -EACCES) + return ret; + } + cdev->private->imask >>= 1; + cdev->private->iretry = 5; + } + return ret; } void @@ -136,7 +161,8 @@ ccw_device_sense_id_start(struct ccw_device *cdev) memset (&cdev->private->senseid, 0, sizeof (struct senseid)); cdev->private->senseid.cu_type = 0xFFFF; - cdev->private->iretry = 3; + cdev->private->imask = 0x80; + cdev->private->iretry = 5; ret = __ccw_device_sense_id_start(cdev); if (ret && ret != -EBUSY) ccw_device_sense_id_done(cdev, ret); @@ -252,13 +278,14 @@ ccw_device_sense_id_irq(struct ccw_device *cdev, enum dev_event dev_event) ccw_device_sense_id_done(cdev, ret); break; case -EACCES: /* channel is not operational. */ + sch->lpm &= ~cdev->private->imask; + cdev->private->imask >>= 1; + cdev->private->iretry = 5; + /* fall through. */ case -EAGAIN: /* try again. */ - cdev->private->iretry--; - if (cdev->private->iretry > 0) { - ret = __ccw_device_sense_id_start(cdev); - if (ret == 0 || ret == -EBUSY) - break; - } + ret = __ccw_device_sense_id_start(cdev); + if (ret == 0 || ret == -EBUSY) + break; /* fall through. */ default: /* Sense ID failed. Try asking VM. */ if (MACHINE_IS_VM) { diff --git a/trunk/drivers/scsi/ide-scsi.c b/trunk/drivers/scsi/ide-scsi.c index 7a835a35f21d..8d0244c2e7d4 100644 --- a/trunk/drivers/scsi/ide-scsi.c +++ b/trunk/drivers/scsi/ide-scsi.c @@ -242,6 +242,16 @@ static void idescsi_output_buffers (ide_drive_t *drive, idescsi_pc_t *pc, unsign } } +static void hexdump(u8 *x, int len) +{ + int i; + + printk("[ "); + for (i = 0; i < len; i++) + printk("%x ", x[i]); + printk("]\n"); +} + static int idescsi_check_condition(ide_drive_t *drive, struct request *failed_command) { idescsi_scsi_t *scsi = drive_to_idescsi(drive); @@ -272,8 +282,7 @@ static int idescsi_check_condition(ide_drive_t *drive, struct request *failed_co pc->scsi_cmd = ((idescsi_pc_t *) failed_command->special)->scsi_cmd; if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) { printk ("ide-scsi: %s: queue cmd = ", drive->name); - print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16, 1, pc->c, - 6, 0); + hexdump(pc->c, 6); } rq->rq_disk = scsi->disk; return ide_do_drive_cmd(drive, rq, ide_preempt); @@ -328,8 +337,7 @@ static int idescsi_end_request (ide_drive_t *drive, int uptodate, int nrsecs) idescsi_pc_t *opc = (idescsi_pc_t *) rq->buffer; if (log) { printk ("ide-scsi: %s: wrap up check %lu, rst = ", drive->name, opc->scsi_cmd->serial_number); - print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16, 1, - pc->buffer, 16, 0); + hexdump(pc->buffer,16); } memcpy((void *) opc->scsi_cmd->sense_buffer, pc->buffer, SCSI_SENSE_BUFFERSIZE); kfree(pc->buffer); @@ -808,12 +816,10 @@ static int idescsi_queue (struct scsi_cmnd *cmd, if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) { printk ("ide-scsi: %s: que %lu, cmd = ", drive->name, cmd->serial_number); - print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16, 1, - cmd->cmnd, cmd->cmd_len, 0); + hexdump(cmd->cmnd, cmd->cmd_len); if (memcmp(pc->c, cmd->cmnd, cmd->cmd_len)) { printk ("ide-scsi: %s: que %lu, tsl = ", drive->name, cmd->serial_number); - print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16, 1, - pc->c, 12, 0); + hexdump(pc->c, 12); } } diff --git a/trunk/drivers/scsi/zorro7xx.c b/trunk/drivers/scsi/zorro7xx.c index 64d40a2d4d4d..ac67394c7373 100644 --- a/trunk/drivers/scsi/zorro7xx.c +++ b/trunk/drivers/scsi/zorro7xx.c @@ -13,10 +13,7 @@ #include #include #include - -#include #include - #include #include diff --git a/trunk/drivers/serial/Kconfig b/trunk/drivers/serial/Kconfig index d7e1996e2fec..ed438bc7e98d 100644 --- a/trunk/drivers/serial/Kconfig +++ b/trunk/drivers/serial/Kconfig @@ -600,7 +600,7 @@ config SERIAL_SA1100_CONSOLE config SERIAL_BFIN tristate "Blackfin serial port support" - depends on BLACKFIN + depends on BFIN select SERIAL_CORE select SERIAL_BFIN_UART0 if (BF531 || BF532 || BF533 || BF561) help diff --git a/trunk/drivers/serial/ip22zilog.c b/trunk/drivers/serial/ip22zilog.c index 9c95bc0398ad..f3257f708ef9 100644 --- a/trunk/drivers/serial/ip22zilog.c +++ b/trunk/drivers/serial/ip22zilog.c @@ -45,6 +45,8 @@ #include "ip22zilog.h" +void ip22_do_break(void); + /* * On IP22 we need to delay after register accesses but we do not need to * flush writes. @@ -79,9 +81,12 @@ struct uart_ip22zilog_port { #define IP22ZILOG_FLAG_REGS_HELD 0x00000040 #define IP22ZILOG_FLAG_TX_STOPPED 0x00000080 #define IP22ZILOG_FLAG_TX_ACTIVE 0x00000100 -#define IP22ZILOG_FLAG_RESET_DONE 0x00000200 - unsigned int tty_break; + unsigned int cflag; + + /* L1-A keyboard break state. */ + int kbd_id; + int l1_down; unsigned char parity_mask; unsigned char prev_status; @@ -245,26 +250,13 @@ static void ip22zilog_maybe_update_regs(struct uart_ip22zilog_port *up, } } -#define Rx_BRK 0x0100 /* BREAK event software flag. */ -#define Rx_SYS 0x0200 /* SysRq event software flag. */ - -static struct tty_struct *ip22zilog_receive_chars(struct uart_ip22zilog_port *up, - struct zilog_channel *channel) +static void ip22zilog_receive_chars(struct uart_ip22zilog_port *up, + struct zilog_channel *channel) { - struct tty_struct *tty; - unsigned char ch, flag; - unsigned int r1; - - tty = NULL; - if (up->port.info != NULL && - up->port.info->tty != NULL) - tty = up->port.info->tty; + struct tty_struct *tty = up->port.info->tty; /* XXX info==NULL? */ - for (;;) { - ch = readb(&channel->control); - ZSDELAY(); - if (!(ch & Rx_CH_AV)) - break; + while (1) { + unsigned char ch, r1, flag; r1 = read_zsreg(channel, R1); if (r1 & (PAR_ERR | Rx_OVR | CRC_ERR)) { @@ -273,26 +265,43 @@ static struct tty_struct *ip22zilog_receive_chars(struct uart_ip22zilog_port *up ZS_WSYNC(channel); } + ch = readb(&channel->control); + ZSDELAY(); + + /* This funny hack depends upon BRK_ABRT not interfering + * with the other bits we care about in R1. + */ + if (ch & BRK_ABRT) + r1 |= BRK_ABRT; + ch = readb(&channel->data); ZSDELAY(); ch &= up->parity_mask; - /* Handle the null char got when BREAK is removed. */ - if (!ch) - r1 |= up->tty_break; + if (ZS_IS_CONS(up) && (r1 & BRK_ABRT)) { + /* Wait for BREAK to deassert to avoid potentially + * confusing the PROM. + */ + while (1) { + ch = readb(&channel->control); + ZSDELAY(); + if (!(ch & BRK_ABRT)) + break; + } + ip22_do_break(); + return; + } /* A real serial line, record the character and status. */ flag = TTY_NORMAL; up->port.icount.rx++; - if (r1 & (PAR_ERR | Rx_OVR | CRC_ERR | Rx_SYS | Rx_BRK)) { - up->tty_break = 0; - - if (r1 & (Rx_SYS | Rx_BRK)) { - up->port.icount.brk++; - if (r1 & Rx_SYS) - continue; + if (r1 & (BRK_ABRT | PAR_ERR | Rx_OVR | CRC_ERR)) { + if (r1 & BRK_ABRT) { r1 &= ~(PAR_ERR | CRC_ERR); + up->port.icount.brk++; + if (uart_handle_break(&up->port)) + goto next_char; } else if (r1 & PAR_ERR) up->port.icount.parity++; @@ -301,21 +310,30 @@ static struct tty_struct *ip22zilog_receive_chars(struct uart_ip22zilog_port *up if (r1 & Rx_OVR) up->port.icount.overrun++; r1 &= up->port.read_status_mask; - if (r1 & Rx_BRK) + if (r1 & BRK_ABRT) flag = TTY_BREAK; else if (r1 & PAR_ERR) flag = TTY_PARITY; else if (r1 & CRC_ERR) flag = TTY_FRAME; } - if (uart_handle_sysrq_char(&up->port, ch)) - continue; + goto next_char; - if (tty) - uart_insert_char(&up->port, r1, Rx_OVR, ch, flag); + if (up->port.ignore_status_mask == 0xff || + (r1 & up->port.ignore_status_mask) == 0) + tty_insert_flip_char(tty, ch, flag); + + if (r1 & Rx_OVR) + tty_insert_flip_char(tty, 0, TTY_OVERRUN); + next_char: + ch = readb(&channel->control); + ZSDELAY(); + if (!(ch & Rx_CH_AV)) + break; } - return tty; + + tty_flip_buffer_push(tty); } static void ip22zilog_status_handle(struct uart_ip22zilog_port *up, @@ -330,15 +348,6 @@ static void ip22zilog_status_handle(struct uart_ip22zilog_port *up, ZSDELAY(); ZS_WSYNC(channel); - if (up->curregs[R15] & BRKIE) { - if ((status & BRK_ABRT) && !(up->prev_status & BRK_ABRT)) { - if (uart_handle_break(&up->port)) - up->tty_break = Rx_SYS; - else - up->tty_break = Rx_BRK; - } - } - if (ZS_WANTS_MODEM_STATUS(up)) { if (status & SYNC) up->port.icount.dsr++; @@ -347,10 +356,10 @@ static void ip22zilog_status_handle(struct uart_ip22zilog_port *up, * But it does not tell us which bit has changed, we have to keep * track of this ourselves. */ - if ((status ^ up->prev_status) ^ DCD) + if ((status & DCD) ^ up->prev_status) uart_handle_dcd_change(&up->port, (status & DCD)); - if ((status ^ up->prev_status) ^ CTS) + if ((status & CTS) ^ up->prev_status) uart_handle_cts_change(&up->port, (status & CTS)); @@ -438,21 +447,19 @@ static irqreturn_t ip22zilog_interrupt(int irq, void *dev_id) while (up) { struct zilog_channel *channel = ZILOG_CHANNEL_FROM_PORT(&up->port); - struct tty_struct *tty; unsigned char r3; spin_lock(&up->port.lock); r3 = read_zsreg(channel, R3); /* Channel A */ - tty = NULL; if (r3 & (CHAEXT | CHATxIP | CHARxIP)) { writeb(RES_H_IUS, &channel->control); ZSDELAY(); ZS_WSYNC(channel); if (r3 & CHARxIP) - tty = ip22zilog_receive_chars(up, channel); + ip22zilog_receive_chars(up, channel); if (r3 & CHAEXT) ip22zilog_status_handle(up, channel); if (r3 & CHATxIP) @@ -460,22 +467,18 @@ static irqreturn_t ip22zilog_interrupt(int irq, void *dev_id) } spin_unlock(&up->port.lock); - if (tty) - tty_flip_buffer_push(tty); - /* Channel B */ up = up->next; channel = ZILOG_CHANNEL_FROM_PORT(&up->port); spin_lock(&up->port.lock); - tty = NULL; if (r3 & (CHBEXT | CHBTxIP | CHBRxIP)) { writeb(RES_H_IUS, &channel->control); ZSDELAY(); ZS_WSYNC(channel); if (r3 & CHBRxIP) - tty = ip22zilog_receive_chars(up, channel); + ip22zilog_receive_chars(up, channel); if (r3 & CHBEXT) ip22zilog_status_handle(up, channel); if (r3 & CHBTxIP) @@ -483,9 +486,6 @@ static irqreturn_t ip22zilog_interrupt(int irq, void *dev_id) } spin_unlock(&up->port.lock); - if (tty) - tty_flip_buffer_push(tty); - up = up->next; } @@ -681,46 +681,11 @@ static void ip22zilog_break_ctl(struct uart_port *port, int break_state) spin_unlock_irqrestore(&port->lock, flags); } -static void __ip22zilog_reset(struct uart_ip22zilog_port *up) -{ - struct zilog_channel *channel; - int i; - - if (up->flags & IP22ZILOG_FLAG_RESET_DONE) - return; - - /* Let pending transmits finish. */ - channel = ZILOG_CHANNEL_FROM_PORT(&up->port); - for (i = 0; i < 1000; i++) { - unsigned char stat = read_zsreg(channel, R1); - if (stat & ALL_SNT) - break; - udelay(100); - } - - if (!ZS_IS_CHANNEL_A(up)) { - up++; - channel = ZILOG_CHANNEL_FROM_PORT(&up->port); - } - write_zsreg(channel, R9, FHWRES); - ZSDELAY_LONG(); - (void) read_zsreg(channel, R0); - - up->flags |= IP22ZILOG_FLAG_RESET_DONE; - up->next->flags |= IP22ZILOG_FLAG_RESET_DONE; -} - static void __ip22zilog_startup(struct uart_ip22zilog_port *up) { struct zilog_channel *channel; channel = ZILOG_CHANNEL_FROM_PORT(&up->port); - - __ip22zilog_reset(up); - - __load_zsregs(channel, up->curregs); - /* set master interrupt enable */ - write_zsreg(channel, R9, up->curregs[R9]); up->prev_status = readb(&channel->control); /* Enable receiver and transmitter. */ @@ -894,6 +859,8 @@ ip22zilog_set_termios(struct uart_port *port, struct ktermios *termios, else up->flags &= ~IP22ZILOG_FLAG_MODEM_STATUS; + up->cflag = termios->c_cflag; + ip22zilog_maybe_update_regs(up, ZILOG_CHANNEL_FROM_PORT(port)); uart_update_timeout(port, termios->c_cflag, baud); @@ -1025,29 +992,74 @@ ip22zilog_console_write(struct console *con, const char *s, unsigned int count) spin_unlock_irqrestore(&up->port.lock, flags); } +void +ip22serial_console_termios(struct console *con, char *options) +{ + int baud = 9600, bits = 8, cflag; + int parity = 'n'; + int flow = 'n'; + + if (options) + uart_parse_options(options, &baud, &parity, &bits, &flow); + + cflag = CREAD | HUPCL | CLOCAL; + + switch (baud) { + case 150: cflag |= B150; break; + case 300: cflag |= B300; break; + case 600: cflag |= B600; break; + case 1200: cflag |= B1200; break; + case 2400: cflag |= B2400; break; + case 4800: cflag |= B4800; break; + case 9600: cflag |= B9600; break; + case 19200: cflag |= B19200; break; + case 38400: cflag |= B38400; break; + default: baud = 9600; cflag |= B9600; break; + } + + con->cflag = cflag | CS8; /* 8N1 */ + + uart_update_timeout(&ip22zilog_port_table[con->index].port, cflag, baud); +} + static int __init ip22zilog_console_setup(struct console *con, char *options) { struct uart_ip22zilog_port *up = &ip22zilog_port_table[con->index]; unsigned long flags; - int baud = 9600, bits = 8; - int parity = 'n'; - int flow = 'n'; + int baud, brg; - up->flags |= IP22ZILOG_FLAG_IS_CONS; + printk("Console: ttyS%d (IP22-Zilog)\n", con->index); - printk(KERN_INFO "Console: ttyS%d (IP22-Zilog)\n", con->index); + /* Get firmware console settings. */ + ip22serial_console_termios(con, options); + + /* Firmware console speed is limited to 150-->38400 baud so + * this hackish cflag thing is OK. + */ + switch (con->cflag & CBAUD) { + case B150: baud = 150; break; + case B300: baud = 300; break; + case B600: baud = 600; break; + case B1200: baud = 1200; break; + case B2400: baud = 2400; break; + case B4800: baud = 4800; break; + default: case B9600: baud = 9600; break; + case B19200: baud = 19200; break; + case B38400: baud = 38400; break; + }; + + brg = BPS_TO_BRG(baud, ZS_CLOCK / ZS_CLOCK_DIVISOR); spin_lock_irqsave(&up->port.lock, flags); - up->curregs[R15] |= BRKIE; + up->curregs[R15] = BRKIE; + ip22zilog_convert_to_zs(up, con->cflag, 0, brg); __ip22zilog_startup(up); spin_unlock_irqrestore(&up->port.lock, flags); - if (options) - uart_parse_options(options, &baud, &parity, &bits, &flow); - return uart_set_options(&up->port, con, baud, parity, bits, flow); + return 0; } static struct uart_driver ip22zilog_reg; @@ -1128,10 +1140,25 @@ static void __init ip22zilog_prepare(void) up[(chip * 2) + 1].port.line = (chip * 2) + 1; up[(chip * 2) + 1].flags |= IP22ZILOG_FLAG_IS_CHANNEL_A; } +} + +static void __init ip22zilog_init_hw(void) +{ + int i; + + for (i = 0; i < NUM_CHANNELS; i++) { + struct uart_ip22zilog_port *up = &ip22zilog_port_table[i]; + struct zilog_channel *channel = ZILOG_CHANNEL_FROM_PORT(&up->port); + unsigned long flags; + int baud, brg; - for (channel = 0; channel < NUM_CHANNELS; channel++) { - struct uart_ip22zilog_port *up = &ip22zilog_port_table[channel]; - int brg; + spin_lock_irqsave(&up->port.lock, flags); + + if (ZS_IS_CHANNEL_A(up)) { + write_zsreg(channel, R9, FHWRES); + ZSDELAY_LONG(); + (void) read_zsreg(channel, R0); + } /* Normal serial TTY. */ up->parity_mask = 0xff; @@ -1142,10 +1169,16 @@ static void __init ip22zilog_prepare(void) up->curregs[R9] = NV | MIE; up->curregs[R10] = NRZ; up->curregs[R11] = TCBR | RCBR; - brg = BPS_TO_BRG(9600, ZS_CLOCK / ZS_CLOCK_DIVISOR); + baud = 9600; + brg = BPS_TO_BRG(baud, ZS_CLOCK / ZS_CLOCK_DIVISOR); up->curregs[R12] = (brg & 0xff); up->curregs[R13] = (brg >> 8) & 0xff; up->curregs[R14] = BRENAB; + __load_zsregs(channel, up->curregs); + /* set master interrupt enable */ + write_zsreg(channel, R9, up->curregs[R9]); + + spin_unlock_irqrestore(&up->port.lock, flags); } } @@ -1162,6 +1195,8 @@ static int __init ip22zilog_ports_init(void) panic("IP22-Zilog: Unable to register zs interrupt handler.\n"); } + ip22zilog_init_hw(); + ret = uart_register_driver(&ip22zilog_reg); if (ret == 0) { int i; diff --git a/trunk/drivers/spi/Kconfig b/trunk/drivers/spi/Kconfig index abf05048c638..a77ede598d34 100644 --- a/trunk/drivers/spi/Kconfig +++ b/trunk/drivers/spi/Kconfig @@ -61,7 +61,7 @@ config SPI_ATMEL config SPI_BFIN tristate "SPI controller driver for ADI Blackfin5xx" - depends on SPI_MASTER && BLACKFIN + depends on SPI_MASTER && BFIN help This is the SPI controller master driver for Blackfin 5xx processor. diff --git a/trunk/drivers/spi/atmel_spi.c b/trunk/drivers/spi/atmel_spi.c index ff6a14bf1280..0d342dcdd302 100644 --- a/trunk/drivers/spi/atmel_spi.c +++ b/trunk/drivers/spi/atmel_spi.c @@ -497,7 +497,7 @@ static int atmel_spi_setup(struct spi_device *spi) /* chipselect must have been muxed as GPIO (e.g. in board setup) */ npcs_pin = (unsigned int)spi->controller_data; if (!spi->controller_state) { - ret = gpio_request(npcs_pin, spi->dev.bus_id); + ret = gpio_request(npcs_pin, "spi_npcs"); if (ret) return ret; spi->controller_state = (void *)npcs_pin; diff --git a/trunk/drivers/spi/spi_s3c24xx_gpio.c b/trunk/drivers/spi/spi_s3c24xx_gpio.c index 109d82c1abc0..0fa25e2e80fe 100644 --- a/trunk/drivers/spi/spi_s3c24xx_gpio.c +++ b/trunk/drivers/spi/spi_s3c24xx_gpio.c @@ -96,7 +96,6 @@ static void s3c2410_spigpio_chipselect(struct spi_device *dev, int value) static int s3c2410_spigpio_probe(struct platform_device *dev) { - struct s3c2410_spigpio_info *info; struct spi_master *master; struct s3c2410_spigpio *sp; int ret; @@ -114,11 +113,10 @@ static int s3c2410_spigpio_probe(struct platform_device *dev) platform_set_drvdata(dev, sp); /* copy in the plkatform data */ - info = sp->info = dev->dev.platform_data; + sp->info = dev->dev.platform_data; /* setup spi bitbang adaptor */ sp->bitbang.master = spi_master_get(master); - sp->bitbang.master->bus_num = info->bus_num; sp->bitbang.chipselect = s3c2410_spigpio_chipselect; sp->bitbang.txrx_word[SPI_MODE_0] = s3c2410_spigpio_txrx_mode0; @@ -126,18 +124,13 @@ static int s3c2410_spigpio_probe(struct platform_device *dev) sp->bitbang.txrx_word[SPI_MODE_2] = s3c2410_spigpio_txrx_mode2; sp->bitbang.txrx_word[SPI_MODE_3] = s3c2410_spigpio_txrx_mode3; - /* set state of spi pins, always assume that the clock is - * available, but do check the MOSI and MISO. */ - s3c2410_gpio_setpin(info->pin_clk, 0); - s3c2410_gpio_cfgpin(info->pin_clk, S3C2410_GPIO_OUTPUT); + /* set state of spi pins */ + s3c2410_gpio_setpin(sp->info->pin_clk, 0); + s3c2410_gpio_setpin(sp->info->pin_mosi, 0); - if (info->pin_mosi < S3C2410_GPH10) { - s3c2410_gpio_setpin(info->pin_mosi, 0); - s3c2410_gpio_cfgpin(info->pin_mosi, S3C2410_GPIO_OUTPUT); - } - - if (info->pin_miso != S3C2410_GPA0 && info->pin_miso < S3C2410_GPH10) - s3c2410_gpio_cfgpin(info->pin_miso, S3C2410_GPIO_INPUT); + s3c2410_gpio_cfgpin(sp->info->pin_clk, S3C2410_GPIO_OUTPUT); + s3c2410_gpio_cfgpin(sp->info->pin_mosi, S3C2410_GPIO_OUTPUT); + s3c2410_gpio_cfgpin(sp->info->pin_miso, S3C2410_GPIO_INPUT); ret = spi_bitbang_start(&sp->bitbang); if (ret) diff --git a/trunk/drivers/usb/README b/trunk/drivers/usb/README index 284f46b3e1cc..3c8434128554 100644 --- a/trunk/drivers/usb/README +++ b/trunk/drivers/usb/README @@ -39,12 +39,12 @@ first subdirectory in the list below that it fits into. image/ - This is for still image drivers, like scanners or digital cameras. -../input/ - This is for any driver that uses the input subsystem, +input/ - This is for any driver that uses the input subsystem, like keyboard, mice, touchscreens, tablets, etc. -../media/ - This is for multimedia drivers, like video cameras, +media/ - This is for multimedia drivers, like video cameras, radios, and any other drivers that talk to the v4l subsystem. -../net/ - This is for network drivers. +net/ - This is for network drivers. serial/ - This is for USB to serial drivers. storage/ - This is for USB mass-storage drivers. class/ - This is for all USB device drivers that do not fit diff --git a/trunk/drivers/usb/core/driver.c b/trunk/drivers/usb/core/driver.c index c51f8e9312e0..8586817698ad 100644 --- a/trunk/drivers/usb/core/driver.c +++ b/trunk/drivers/usb/core/driver.c @@ -585,6 +585,9 @@ static int usb_uevent(struct device *dev, struct kobj_uevent_env *env) { struct usb_device *usb_dev; + if (!dev) + return -ENODEV; + /* driver is often null here; dev_dbg() would oops */ pr_debug ("usb %s: uevent\n", dev->bus_id); @@ -628,6 +631,14 @@ static int usb_uevent(struct device *dev, struct kobj_uevent_env *env) usb_dev->descriptor.bDeviceProtocol)) return -ENOMEM; + if (add_uevent_var(env, "BUSNUM=%03d", + usb_dev->bus->busnum)) + return -ENOMEM; + + if (add_uevent_var(env, "DEVNUM=%03d", + usb_dev->devnum)) + return -ENOMEM; + return 0; } diff --git a/trunk/drivers/usb/core/hcd.c b/trunk/drivers/usb/core/hcd.c index d5ed3fa9e304..fea8256a18d6 100644 --- a/trunk/drivers/usb/core/hcd.c +++ b/trunk/drivers/usb/core/hcd.c @@ -1311,8 +1311,8 @@ void usb_hcd_flush_endpoint(struct usb_device *udev, hcd = bus_to_hcd(udev->bus); /* No more submits can occur */ - spin_lock_irq(&hcd_urb_list_lock); rescan: + spin_lock_irq(&hcd_urb_list_lock); list_for_each_entry (urb, &ep->urb_list, urb_list) { int is_in; @@ -1345,7 +1345,6 @@ void usb_hcd_flush_endpoint(struct usb_device *udev, usb_put_urb (urb); /* list contents may have changed */ - spin_lock(&hcd_urb_list_lock); goto rescan; } spin_unlock_irq(&hcd_urb_list_lock); diff --git a/trunk/drivers/usb/core/hub.c b/trunk/drivers/usb/core/hub.c index 13b326a13377..036c3dea855e 100644 --- a/trunk/drivers/usb/core/hub.c +++ b/trunk/drivers/usb/core/hub.c @@ -335,7 +335,7 @@ static void kick_khubd(struct usb_hub *hub) to_usb_interface(hub->intfdev)->pm_usage_cnt = 1; spin_lock_irqsave(&hub_event_lock, flags); - if (!hub->disconnected && list_empty(&hub->event_list)) { + if (!hub->disconnected & list_empty(&hub->event_list)) { list_add_tail(&hub->event_list, &hub_event_list); wake_up(&khubd_wait); } diff --git a/trunk/drivers/usb/core/message.c b/trunk/drivers/usb/core/message.c index fcd40ecbeecc..316a746e0080 100644 --- a/trunk/drivers/usb/core/message.c +++ b/trunk/drivers/usb/core/message.c @@ -1172,6 +1172,7 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate) struct usb_host_interface *alt; int ret; int manual = 0; + int changed; if (dev->state == USB_STATE_SUSPENDED) return -EHOSTUNREACH; @@ -1211,7 +1212,8 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate) */ /* prevent submissions using previous endpoint settings */ - if (iface->cur_altsetting != alt && device_is_registered(&iface->dev)) + changed = (iface->cur_altsetting != alt); + if (changed && device_is_registered(&iface->dev)) usb_remove_sysfs_intf_files(iface); usb_disable_interface(dev, iface); @@ -1248,7 +1250,7 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate) * (Likewise, EP0 never "halts" on well designed devices.) */ usb_enable_interface(dev, iface); - if (device_is_registered(&iface->dev)) + if (changed && device_is_registered(&iface->dev)) usb_create_sysfs_intf_files(iface); return 0; @@ -1346,10 +1348,34 @@ static int usb_if_uevent(struct device *dev, struct kobj_uevent_env *env) struct usb_interface *intf; struct usb_host_interface *alt; + if (!dev) + return -ENODEV; + + /* driver is often null here; dev_dbg() would oops */ + pr_debug ("usb %s: uevent\n", dev->bus_id); + intf = to_usb_interface(dev); usb_dev = interface_to_usbdev(intf); alt = intf->cur_altsetting; +#ifdef CONFIG_USB_DEVICEFS + if (add_uevent_var(env, "DEVICE=/proc/bus/usb/%03d/%03d", + usb_dev->bus->busnum, usb_dev->devnum)) + return -ENOMEM; +#endif + + if (add_uevent_var(env, "PRODUCT=%x/%x/%x", + le16_to_cpu(usb_dev->descriptor.idVendor), + le16_to_cpu(usb_dev->descriptor.idProduct), + le16_to_cpu(usb_dev->descriptor.bcdDevice))) + return -ENOMEM; + + if (add_uevent_var(env, "TYPE=%d/%d/%d", + usb_dev->descriptor.bDeviceClass, + usb_dev->descriptor.bDeviceSubClass, + usb_dev->descriptor.bDeviceProtocol)) + return -ENOMEM; + if (add_uevent_var(env, "INTERFACE=%d/%d/%d", alt->desc.bInterfaceClass, alt->desc.bInterfaceSubClass, @@ -1615,6 +1641,12 @@ int usb_set_configuration(struct usb_device *dev, int configuration) intf->dev.bus_id, ret); continue; } + + /* The driver's probe method can call usb_set_interface(), + * which would mean the interface's sysfs files are already + * created. Just in case, we'll remove them first. + */ + usb_remove_sysfs_intf_files(intf); usb_create_sysfs_intf_files(intf); } diff --git a/trunk/drivers/usb/core/sysfs.c b/trunk/drivers/usb/core/sysfs.c index 32bd130b1eed..b04afd06e502 100644 --- a/trunk/drivers/usb/core/sysfs.c +++ b/trunk/drivers/usb/core/sysfs.c @@ -735,8 +735,6 @@ int usb_create_sysfs_intf_files(struct usb_interface *intf) struct usb_host_interface *alt = intf->cur_altsetting; int retval; - if (intf->sysfs_files_created) - return 0; retval = sysfs_create_group(&dev->kobj, &intf_attr_grp); if (retval) return retval; @@ -748,7 +746,6 @@ int usb_create_sysfs_intf_files(struct usb_interface *intf) if (intf->intf_assoc) retval = sysfs_create_group(&dev->kobj, &intf_assoc_attr_grp); usb_create_intf_ep_files(intf, udev); - intf->sysfs_files_created = 1; return 0; } @@ -756,11 +753,8 @@ void usb_remove_sysfs_intf_files(struct usb_interface *intf) { struct device *dev = &intf->dev; - if (!intf->sysfs_files_created) - return; usb_remove_intf_ep_files(intf); device_remove_file(dev, &dev_attr_interface); sysfs_remove_group(&dev->kobj, &intf_attr_grp); sysfs_remove_group(&intf->dev.kobj, &intf_assoc_attr_grp); - intf->sysfs_files_created = 0; } diff --git a/trunk/drivers/usb/core/usb.c b/trunk/drivers/usb/core/usb.c index 8f142370103d..c4a6f1095b8b 100644 --- a/trunk/drivers/usb/core/usb.c +++ b/trunk/drivers/usb/core/usb.c @@ -192,34 +192,9 @@ static void usb_release_dev(struct device *dev) kfree(udev); } -#ifdef CONFIG_HOTPLUG -static int usb_dev_uevent(struct device *dev, struct kobj_uevent_env *env) -{ - struct usb_device *usb_dev; - - usb_dev = to_usb_device(dev); - - if (add_uevent_var(env, "BUSNUM=%03d", usb_dev->bus->busnum)) - return -ENOMEM; - - if (add_uevent_var(env, "DEVNUM=%03d", usb_dev->devnum)) - return -ENOMEM; - - return 0; -} - -#else - -static int usb_dev_uevent(struct device *dev, struct kobj_uevent_env *env) -{ - return -ENODEV; -} -#endif /* CONFIG_HOTPLUG */ - struct device_type usb_device_type = { .name = "usb_device", .release = usb_release_dev, - .uevent = usb_dev_uevent, }; #ifdef CONFIG_PM diff --git a/trunk/drivers/usb/gadget/omap_udc.c b/trunk/drivers/usb/gadget/omap_udc.c index d377154658b5..87c4f50dfb61 100644 --- a/trunk/drivers/usb/gadget/omap_udc.c +++ b/trunk/drivers/usb/gadget/omap_udc.c @@ -1241,14 +1241,14 @@ static void pullup_enable(struct omap_udc *udc) udc->gadget.dev.parent->power.power_state = PMSG_ON; udc->gadget.dev.power.power_state = PMSG_ON; UDC_SYSCON1_REG |= UDC_PULLUP_EN; - if (!gadget_is_otg(&udc->gadget) && !cpu_is_omap15xx()) + if (!gadget_is_otg(udc->gadget) && !cpu_is_omap15xx()) OTG_CTRL_REG |= OTG_BSESSVLD; UDC_IRQ_EN_REG = UDC_DS_CHG_IE; } static void pullup_disable(struct omap_udc *udc) { - if (!gadget_is_otg(&udc->gadget) && !cpu_is_omap15xx()) + if (!gadget_is_otg(udc->gadget) && !cpu_is_omap15xx()) OTG_CTRL_REG &= ~OTG_BSESSVLD; UDC_IRQ_EN_REG = UDC_DS_CHG_IE; UDC_SYSCON1_REG &= ~UDC_PULLUP_EN; @@ -1386,7 +1386,7 @@ static void update_otg(struct omap_udc *udc) { u16 devstat; - if (!gadget_is_otg(&udc->gadget)) + if (!gadget_is_otg(udc->gadget)) return; if (OTG_CTRL_REG & OTG_ID) diff --git a/trunk/drivers/usb/gadget/s3c2410_udc.c b/trunk/drivers/usb/gadget/s3c2410_udc.c index 4ce050c3d13f..e3e90f8a75e7 100644 --- a/trunk/drivers/usb/gadget/s3c2410_udc.c +++ b/trunk/drivers/usb/gadget/s3c2410_udc.c @@ -52,10 +52,10 @@ #include #include +#include #include - -#include -#include +#include +#include #include @@ -1511,11 +1511,7 @@ static irqreturn_t s3c2410_udc_vbus_irq(int irq, void *_dev) unsigned int value; dprintk(DEBUG_NORMAL, "%s()\n", __func__); - - /* some cpus cannot read from an line configured to IRQ! */ - s3c2410_gpio_cfgpin(udc_info->vbus_pin, S3C2410_GPIO_INPUT); value = s3c2410_gpio_getpin(udc_info->vbus_pin); - s3c2410_gpio_cfgpin(udc_info->vbus_pin, S3C2410_GPIO_SFN2); if (udc_info->vbus_pin_inverted) value = !value; @@ -1876,9 +1872,9 @@ static int s3c2410_udc_probe(struct platform_device *pdev) if (udc_info && udc_info->vbus_pin > 0) { irq = s3c2410_gpio_getirq(udc_info->vbus_pin); retval = request_irq(irq, s3c2410_udc_vbus_irq, - IRQF_DISABLED | IRQF_TRIGGER_RISING - | IRQF_TRIGGER_FALLING | IRQF_SHARED, - gadget_name, udc); + IRQF_DISABLED | IRQF_TRIGGER_RISING + | IRQF_TRIGGER_FALLING, + gadget_name, udc); if (retval != 0) { dev_err(dev, "can't get vbus irq %i, err %d\n", diff --git a/trunk/drivers/usb/host/Kconfig b/trunk/drivers/usb/host/Kconfig index 49a91c5ee51b..177e78ed241b 100644 --- a/trunk/drivers/usb/host/Kconfig +++ b/trunk/drivers/usb/host/Kconfig @@ -156,7 +156,7 @@ config USB_OHCI_HCD_PCI config USB_OHCI_HCD_SSB bool "OHCI support for Broadcom SSB OHCI core" - depends on USB_OHCI_HCD && (SSB = y || SSB = USB_OHCI_HCD) && EXPERIMENTAL + depends on USB_OHCI_HCD && (SSB = y || SSB = CONFIG_USB_OHCI_HCD) && EXPERIMENTAL default n ---help--- Support for the Sonics Silicon Backplane (SSB) attached diff --git a/trunk/drivers/usb/host/ehci-hcd.c b/trunk/drivers/usb/host/ehci-hcd.c index 5f2d74ed5ad7..c1514442883e 100644 --- a/trunk/drivers/usb/host/ehci-hcd.c +++ b/trunk/drivers/usb/host/ehci-hcd.c @@ -575,15 +575,12 @@ static int ehci_run (struct usb_hcd *hcd) * from the companions to the EHCI controller. If any of the * companions are in the middle of a port reset at the time, it * could cause trouble. Write-locking ehci_cf_port_reset_rwsem - * guarantees that no resets are in progress. After we set CF, - * a short delay lets the hardware catch up; new resets shouldn't - * be started before the port switching actions could complete. + * guarantees that no resets are in progress. */ down_write(&ehci_cf_port_reset_rwsem); hcd->state = HC_STATE_RUNNING; ehci_writel(ehci, FLAG_CF, &ehci->regs->configured_flag); ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */ - msleep(5); up_write(&ehci_cf_port_reset_rwsem); temp = HC_VERSION(ehci_readl(ehci, &ehci->caps->hc_capbase)); diff --git a/trunk/drivers/usb/image/microtek.c b/trunk/drivers/usb/image/microtek.c index bc207e3c21f5..91e999c9f680 100644 --- a/trunk/drivers/usb/image/microtek.c +++ b/trunk/drivers/usb/image/microtek.c @@ -819,7 +819,7 @@ static int mts_usb_probe(struct usb_interface *intf, goto out_kfree2; new_desc->host->hostdata[0] = (unsigned long)new_desc; - if (scsi_add_host(new_desc->host, &dev->dev)) { + if (scsi_add_host(new_desc->host, NULL)) { err_retval = -EIO; goto out_host_put; } diff --git a/trunk/drivers/usb/misc/adutux.c b/trunk/drivers/usb/misc/adutux.c index 5a2c44e4c1f7..c567aa7a41ea 100644 --- a/trunk/drivers/usb/misc/adutux.c +++ b/trunk/drivers/usb/misc/adutux.c @@ -79,22 +79,12 @@ MODULE_DEVICE_TABLE(usb, device_table); #define COMMAND_TIMEOUT (2*HZ) /* 60 second timeout for a command */ -/* - * The locking scheme is a vanilla 3-lock: - * adu_device.buflock: A spinlock, covers what IRQs touch. - * adutux_mutex: A Static lock to cover open_count. It would also cover - * any globals, but we don't have them in 2.6. - * adu_device.mtx: A mutex to hold across sleepers like copy_from_user. - * It covers all of adu_device, except the open_count - * and what .buflock covers. - */ - /* Structure to hold all of our device specific stuff */ struct adu_device { - struct mutex mtx; + struct mutex mtx; /* locks this structure */ struct usb_device* udev; /* save off the usb device pointer */ struct usb_interface* interface; - unsigned int minor; /* the starting minor number for this device */ + unsigned char minor; /* the starting minor number for this device */ char serial_number[8]; int open_count; /* number of times this port has been opened */ @@ -117,11 +107,8 @@ struct adu_device { char* interrupt_out_buffer; struct usb_endpoint_descriptor* interrupt_out_endpoint; struct urb* interrupt_out_urb; - int out_urb_finished; }; -static DEFINE_MUTEX(adutux_mutex); - static struct usb_driver adu_driver; static void adu_debug_data(int level, const char *function, int size, @@ -145,31 +132,27 @@ static void adu_debug_data(int level, const char *function, int size, */ static void adu_abort_transfers(struct adu_device *dev) { - unsigned long flags; - dbg(2," %s : enter", __FUNCTION__); + if (dev == NULL) { + dbg(1," %s : dev is null", __FUNCTION__); + goto exit; + } + if (dev->udev == NULL) { dbg(1," %s : udev is null", __FUNCTION__); goto exit; } - /* shutdown transfer */ + dbg(2," %s : udev state %d", __FUNCTION__, dev->udev->state); + if (dev->udev->state == USB_STATE_NOTATTACHED) { + dbg(1," %s : udev is not attached", __FUNCTION__); + goto exit; + } - /* XXX Anchor these instead */ - spin_lock_irqsave(&dev->buflock, flags); - if (!dev->read_urb_finished) { - spin_unlock_irqrestore(&dev->buflock, flags); - usb_kill_urb(dev->interrupt_in_urb); - } else - spin_unlock_irqrestore(&dev->buflock, flags); - - spin_lock_irqsave(&dev->buflock, flags); - if (!dev->out_urb_finished) { - spin_unlock_irqrestore(&dev->buflock, flags); - usb_kill_urb(dev->interrupt_out_urb); - } else - spin_unlock_irqrestore(&dev->buflock, flags); + /* shutdown transfer */ + usb_unlink_urb(dev->interrupt_in_urb); + usb_unlink_urb(dev->interrupt_out_urb); exit: dbg(2," %s : leave", __FUNCTION__); @@ -179,6 +162,8 @@ static void adu_delete(struct adu_device *dev) { dbg(2, "%s enter", __FUNCTION__); + adu_abort_transfers(dev); + /* free data structures */ usb_free_urb(dev->interrupt_in_urb); usb_free_urb(dev->interrupt_out_urb); @@ -254,10 +239,7 @@ static void adu_interrupt_out_callback(struct urb *urb) goto exit; } - spin_lock(&dev->buflock); - dev->out_urb_finished = 1; - wake_up(&dev->write_wait); - spin_unlock(&dev->buflock); + wake_up_interruptible(&dev->write_wait); exit: adu_debug_data(5, __FUNCTION__, urb->actual_length, @@ -270,17 +252,12 @@ static int adu_open(struct inode *inode, struct file *file) struct adu_device *dev = NULL; struct usb_interface *interface; int subminor; - int retval; + int retval = 0; dbg(2,"%s : enter", __FUNCTION__); subminor = iminor(inode); - if ((retval = mutex_lock_interruptible(&adutux_mutex))) { - dbg(2, "%s : mutex lock failed", __FUNCTION__); - goto exit_no_lock; - } - interface = usb_find_interface(&adu_driver, subminor); if (!interface) { err("%s - error, can't find device for minor %d", @@ -290,54 +267,54 @@ static int adu_open(struct inode *inode, struct file *file) } dev = usb_get_intfdata(interface); - if (!dev || !dev->udev) { + if (!dev) { retval = -ENODEV; goto exit_no_device; } - /* check that nobody else is using the device */ - if (dev->open_count) { - retval = -EBUSY; + /* lock this device */ + if ((retval = mutex_lock_interruptible(&dev->mtx))) { + dbg(2, "%s : mutex lock failed", __FUNCTION__); goto exit_no_device; } + /* increment our usage count for the device */ ++dev->open_count; dbg(2,"%s : open count %d", __FUNCTION__, dev->open_count); /* save device in the file's private structure */ file->private_data = dev; - /* initialize in direction */ - dev->read_buffer_length = 0; - - /* fixup first read by having urb waiting for it */ - usb_fill_int_urb(dev->interrupt_in_urb,dev->udev, - usb_rcvintpipe(dev->udev, - dev->interrupt_in_endpoint->bEndpointAddress), - dev->interrupt_in_buffer, - le16_to_cpu(dev->interrupt_in_endpoint->wMaxPacketSize), - adu_interrupt_in_callback, dev, - dev->interrupt_in_endpoint->bInterval); - dev->read_urb_finished = 0; - if (usb_submit_urb(dev->interrupt_in_urb, GFP_KERNEL)) - dev->read_urb_finished = 1; - /* we ignore failure */ - /* end of fixup for first read */ + if (dev->open_count == 1) { + /* initialize in direction */ + dev->read_buffer_length = 0; - /* initialize out direction */ - dev->out_urb_finished = 1; - - retval = 0; + /* fixup first read by having urb waiting for it */ + usb_fill_int_urb(dev->interrupt_in_urb,dev->udev, + usb_rcvintpipe(dev->udev, + dev->interrupt_in_endpoint->bEndpointAddress), + dev->interrupt_in_buffer, + le16_to_cpu(dev->interrupt_in_endpoint->wMaxPacketSize), + adu_interrupt_in_callback, dev, + dev->interrupt_in_endpoint->bInterval); + /* dev->interrupt_in_urb->transfer_flags |= URB_ASYNC_UNLINK; */ + dev->read_urb_finished = 0; + retval = usb_submit_urb(dev->interrupt_in_urb, GFP_KERNEL); + if (retval) + --dev->open_count; + } + mutex_unlock(&dev->mtx); exit_no_device: - mutex_unlock(&adutux_mutex); -exit_no_lock: dbg(2,"%s : leave, return value %d ", __FUNCTION__, retval); + return retval; } -static void adu_release_internal(struct adu_device *dev) +static int adu_release_internal(struct adu_device *dev) { + int retval = 0; + dbg(2," %s : enter", __FUNCTION__); /* decrement our usage count for the device */ @@ -349,11 +326,12 @@ static void adu_release_internal(struct adu_device *dev) } dbg(2," %s : leave", __FUNCTION__); + return retval; } static int adu_release(struct inode *inode, struct file *file) { - struct adu_device *dev; + struct adu_device *dev = NULL; int retval = 0; dbg(2," %s : enter", __FUNCTION__); @@ -365,13 +343,15 @@ static int adu_release(struct inode *inode, struct file *file) } dev = file->private_data; + if (dev == NULL) { dbg(1," %s : object is NULL", __FUNCTION__); retval = -ENODEV; goto exit; } - mutex_lock(&adutux_mutex); /* not interruptible */ + /* lock our device */ + mutex_lock(&dev->mtx); /* not interruptible */ if (dev->open_count <= 0) { dbg(1," %s : device not opened", __FUNCTION__); @@ -379,15 +359,19 @@ static int adu_release(struct inode *inode, struct file *file) goto exit; } - adu_release_internal(dev); if (dev->udev == NULL) { /* the device was unplugged before the file was released */ - if (!dev->open_count) /* ... and we're the last user */ - adu_delete(dev); + mutex_unlock(&dev->mtx); + adu_delete(dev); + dev = NULL; + } else { + /* do the work */ + retval = adu_release_internal(dev); } exit: - mutex_unlock(&adutux_mutex); + if (dev) + mutex_unlock(&dev->mtx); dbg(2," %s : leave, return value %d", __FUNCTION__, retval); return retval; } @@ -409,12 +393,12 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count, dev = file->private_data; dbg(2," %s : dev=%p", __FUNCTION__, dev); - + /* lock this object */ if (mutex_lock_interruptible(&dev->mtx)) return -ERESTARTSYS; /* verify that the device wasn't unplugged */ - if (dev->udev == NULL) { + if (dev->udev == NULL || dev->minor == 0) { retval = -ENODEV; err("No device or device unplugged %d", retval); goto exit; @@ -468,7 +452,7 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count, should_submit = 1; } else { /* even the primary was empty - we may need to do IO */ - if (!dev->read_urb_finished) { + if (dev->interrupt_in_urb->status == -EINPROGRESS) { /* somebody is doing IO */ spin_unlock_irqrestore(&dev->buflock, flags); dbg(2," %s : submitted already", __FUNCTION__); @@ -476,7 +460,6 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count, /* we must initiate input */ dbg(2," %s : initiate input", __FUNCTION__); dev->read_urb_finished = 0; - spin_unlock_irqrestore(&dev->buflock, flags); usb_fill_int_urb(dev->interrupt_in_urb,dev->udev, usb_rcvintpipe(dev->udev, @@ -486,12 +469,15 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count, adu_interrupt_in_callback, dev, dev->interrupt_in_endpoint->bInterval); - retval = usb_submit_urb(dev->interrupt_in_urb, GFP_KERNEL); - if (retval) { - dev->read_urb_finished = 1; + retval = usb_submit_urb(dev->interrupt_in_urb, GFP_ATOMIC); + if (!retval) { + spin_unlock_irqrestore(&dev->buflock, flags); + dbg(2," %s : submitted OK", __FUNCTION__); + } else { if (retval == -ENOMEM) { retval = bytes_read ? bytes_read : -ENOMEM; } + spin_unlock_irqrestore(&dev->buflock, flags); dbg(2," %s : submit failed", __FUNCTION__); goto exit; } @@ -500,14 +486,10 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count, /* we wait for I/O to complete */ set_current_state(TASK_INTERRUPTIBLE); add_wait_queue(&dev->read_wait, &wait); - spin_lock_irqsave(&dev->buflock, flags); - if (!dev->read_urb_finished) { - spin_unlock_irqrestore(&dev->buflock, flags); + if (!dev->read_urb_finished) timeout = schedule_timeout(COMMAND_TIMEOUT); - } else { - spin_unlock_irqrestore(&dev->buflock, flags); + else set_current_state(TASK_RUNNING); - } remove_wait_queue(&dev->read_wait, &wait); if (timeout <= 0) { @@ -527,23 +509,19 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count, retval = bytes_read; /* if the primary buffer is empty then use it */ - spin_lock_irqsave(&dev->buflock, flags); - if (should_submit && dev->read_urb_finished) { - dev->read_urb_finished = 0; - spin_unlock_irqrestore(&dev->buflock, flags); + if (should_submit && !dev->interrupt_in_urb->status==-EINPROGRESS) { usb_fill_int_urb(dev->interrupt_in_urb,dev->udev, usb_rcvintpipe(dev->udev, dev->interrupt_in_endpoint->bEndpointAddress), - dev->interrupt_in_buffer, - le16_to_cpu(dev->interrupt_in_endpoint->wMaxPacketSize), - adu_interrupt_in_callback, - dev, - dev->interrupt_in_endpoint->bInterval); - if (usb_submit_urb(dev->interrupt_in_urb, GFP_KERNEL) != 0) - dev->read_urb_finished = 1; + dev->interrupt_in_buffer, + le16_to_cpu(dev->interrupt_in_endpoint->wMaxPacketSize), + adu_interrupt_in_callback, + dev, + dev->interrupt_in_endpoint->bInterval); + /* dev->interrupt_in_urb->transfer_flags |= URB_ASYNC_UNLINK; */ + dev->read_urb_finished = 0; + usb_submit_urb(dev->interrupt_in_urb, GFP_KERNEL); /* we ignore failure */ - } else { - spin_unlock_irqrestore(&dev->buflock, flags); } exit: @@ -557,24 +535,24 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count, static ssize_t adu_write(struct file *file, const __user char *buffer, size_t count, loff_t *ppos) { - DECLARE_WAITQUEUE(waita, current); struct adu_device *dev; size_t bytes_written = 0; size_t bytes_to_write; size_t buffer_size; - unsigned long flags; int retval; + int timeout = 0; dbg(2," %s : enter, count = %Zd", __FUNCTION__, count); dev = file->private_data; + /* lock this object */ retval = mutex_lock_interruptible(&dev->mtx); if (retval) goto exit_nolock; /* verify that the device wasn't unplugged */ - if (dev->udev == NULL) { + if (dev->udev == NULL || dev->minor == 0) { retval = -ENODEV; err("No device or device unplugged %d", retval); goto exit; @@ -586,37 +564,42 @@ static ssize_t adu_write(struct file *file, const __user char *buffer, goto exit; } + while (count > 0) { - add_wait_queue(&dev->write_wait, &waita); - set_current_state(TASK_INTERRUPTIBLE); - spin_lock_irqsave(&dev->buflock, flags); - if (!dev->out_urb_finished) { - spin_unlock_irqrestore(&dev->buflock, flags); + if (dev->interrupt_out_urb->status == -EINPROGRESS) { + timeout = COMMAND_TIMEOUT; - mutex_unlock(&dev->mtx); - if (signal_pending(current)) { + while (timeout > 0) { + if (signal_pending(current)) { dbg(1," %s : interrupted", __FUNCTION__); - set_current_state(TASK_RUNNING); retval = -EINTR; - goto exit_onqueue; - } - if (schedule_timeout(COMMAND_TIMEOUT) == 0) { - dbg(1, "%s - command timed out.", __FUNCTION__); - retval = -ETIMEDOUT; - goto exit_onqueue; + goto exit; } - remove_wait_queue(&dev->write_wait, &waita); + mutex_unlock(&dev->mtx); + timeout = interruptible_sleep_on_timeout(&dev->write_wait, timeout); retval = mutex_lock_interruptible(&dev->mtx); if (retval) { retval = bytes_written ? bytes_written : retval; goto exit_nolock; } + if (timeout > 0) { + break; + } + dbg(1," %s : interrupted timeout: %d", __FUNCTION__, timeout); + } + + + dbg(1," %s : final timeout: %d", __FUNCTION__, timeout); + + if (timeout == 0) { + dbg(1, "%s - command timed out.", __FUNCTION__); + retval = -ETIMEDOUT; + goto exit; + } + + dbg(4," %s : in progress, count = %Zd", __FUNCTION__, count); - dbg(4," %s : in progress, count = %Zd", __FUNCTION__, count); } else { - spin_unlock_irqrestore(&dev->buflock, flags); - set_current_state(TASK_RUNNING); - remove_wait_queue(&dev->write_wait, &waita); dbg(4," %s : sending, count = %Zd", __FUNCTION__, count); /* write the data into interrupt_out_buffer from userspace */ @@ -639,12 +622,11 @@ static ssize_t adu_write(struct file *file, const __user char *buffer, bytes_to_write, adu_interrupt_out_callback, dev, - dev->interrupt_out_endpoint->bInterval); + dev->interrupt_in_endpoint->bInterval); + /* dev->interrupt_in_urb->transfer_flags |= URB_ASYNC_UNLINK; */ dev->interrupt_out_urb->actual_length = bytes_to_write; - dev->out_urb_finished = 0; retval = usb_submit_urb(dev->interrupt_out_urb, GFP_KERNEL); if (retval < 0) { - dev->out_urb_finished = 1; err("Couldn't submit interrupt_out_urb %d", retval); goto exit; } @@ -655,17 +637,16 @@ static ssize_t adu_write(struct file *file, const __user char *buffer, bytes_written += bytes_to_write; } } - mutex_unlock(&dev->mtx); - return bytes_written; + + retval = bytes_written; exit: + /* unlock the device */ mutex_unlock(&dev->mtx); exit_nolock: + dbg(2," %s : leave, return value %d", __FUNCTION__, retval); - return retval; -exit_onqueue: - remove_wait_queue(&dev->write_wait, &waita); return retval; } @@ -850,22 +831,25 @@ static void adu_disconnect(struct usb_interface *interface) dbg(2," %s : enter", __FUNCTION__); dev = usb_get_intfdata(interface); + usb_set_intfdata(interface, NULL); - mutex_lock(&dev->mtx); /* not interruptible */ - dev->udev = NULL; /* poison */ minor = dev->minor; + + /* give back our minor */ usb_deregister_dev(interface, &adu_class); - mutex_unlock(&dev->mtx); + dev->minor = 0; - mutex_lock(&adutux_mutex); - usb_set_intfdata(interface, NULL); + mutex_lock(&dev->mtx); /* not interruptible */ /* if the device is not opened, then we clean up right now */ dbg(2," %s : open count %d", __FUNCTION__, dev->open_count); - if (!dev->open_count) + if (!dev->open_count) { + mutex_unlock(&dev->mtx); adu_delete(dev); - - mutex_unlock(&adutux_mutex); + } else { + dev->udev = NULL; + mutex_unlock(&dev->mtx); + } dev_info(&interface->dev, "ADU device adutux%d now disconnected\n", (minor - ADU_MINOR_BASE)); diff --git a/trunk/drivers/usb/misc/usbled.c b/trunk/drivers/usb/misc/usbled.c index 06cb71942dc7..49c5c5c4c431 100644 --- a/trunk/drivers/usb/misc/usbled.c +++ b/trunk/drivers/usb/misc/usbled.c @@ -144,14 +144,12 @@ static void led_disconnect(struct usb_interface *interface) struct usb_led *dev; dev = usb_get_intfdata (interface); + usb_set_intfdata (interface, NULL); device_remove_file(&interface->dev, &dev_attr_blue); device_remove_file(&interface->dev, &dev_attr_red); device_remove_file(&interface->dev, &dev_attr_green); - /* first remove the files, then set the pointer to NULL */ - usb_set_intfdata (interface, NULL); - usb_put_dev(dev->udev); kfree(dev); diff --git a/trunk/drivers/usb/serial/generic.c b/trunk/drivers/usb/serial/generic.c index d41531139c55..9eb4a65ee4d9 100644 --- a/trunk/drivers/usb/serial/generic.c +++ b/trunk/drivers/usb/serial/generic.c @@ -327,7 +327,6 @@ void usb_serial_generic_read_bulk_callback (struct urb *urb) struct usb_serial_port *port = (struct usb_serial_port *)urb->context; unsigned char *data = urb->transfer_buffer; int status = urb->status; - unsigned long flags; dbg("%s - port %d", __FUNCTION__, port->number); @@ -340,11 +339,11 @@ void usb_serial_generic_read_bulk_callback (struct urb *urb) usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); /* Throttle the device if requested by tty */ - spin_lock_irqsave(&port->lock, flags); + spin_lock(&port->lock); if (!(port->throttled = port->throttle_req)) /* Handle data and continue reading from device */ flush_and_resubmit_read_urb(port); - spin_unlock_irqrestore(&port->lock, flags); + spin_unlock(&port->lock); } EXPORT_SYMBOL_GPL(usb_serial_generic_read_bulk_callback); diff --git a/trunk/drivers/usb/serial/keyspan.c b/trunk/drivers/usb/serial/keyspan.c index feba9679ace8..1f7ab15df36d 100644 --- a/trunk/drivers/usb/serial/keyspan.c +++ b/trunk/drivers/usb/serial/keyspan.c @@ -1215,14 +1215,12 @@ static int keyspan_chars_in_buffer (struct usb_serial_port *port) static int keyspan_open (struct usb_serial_port *port, struct file *filp) { - struct keyspan_port_private *p_priv; - struct keyspan_serial_private *s_priv; - struct usb_serial *serial = port->serial; + struct keyspan_port_private *p_priv; + struct keyspan_serial_private *s_priv; + struct usb_serial *serial = port->serial; const struct keyspan_device_details *d_details; int i, err; - int baud_rate, device_port; struct urb *urb; - unsigned int cflag; s_priv = usb_get_serial_data(serial); p_priv = usb_get_serial_port_data(port); @@ -1265,30 +1263,6 @@ static int keyspan_open (struct usb_serial_port *port, struct file *filp) /* usb_settoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe), 0); */ } - /* get the terminal config for the setup message now so we don't - * need to send 2 of them */ - - cflag = port->tty->termios->c_cflag; - device_port = port->number - port->serial->minor; - - /* Baud rate calculation takes baud rate as an integer - so other rates can be generated if desired. */ - baud_rate = tty_get_baud_rate(port->tty); - /* If no match or invalid, leave as default */ - if (baud_rate >= 0 - && d_details->calculate_baud_rate(baud_rate, d_details->baudclk, - NULL, NULL, NULL, device_port) == KEYSPAN_BAUD_RATE_OK) { - p_priv->baud = baud_rate; - } - - /* set CTS/RTS handshake etc. */ - p_priv->cflag = cflag; - p_priv->flow_control = (cflag & CRTSCTS)? flow_cts: flow_none; - - keyspan_send_setup(port, 1); - //mdelay(100); - //keyspan_set_termios(port, NULL); - return (0); } diff --git a/trunk/drivers/usb/serial/mos7840.c b/trunk/drivers/usb/serial/mos7840.c index c29c91271133..a5ced7e08cbf 100644 --- a/trunk/drivers/usb/serial/mos7840.c +++ b/trunk/drivers/usb/serial/mos7840.c @@ -2711,7 +2711,7 @@ static int mos7840_startup(struct usb_serial *serial) status = mos7840_set_reg_sync(serial->port[0], ZLP_REG5, Data); if (status < 0) { dbg("Writing ZLP_REG5 failed status-0x%x\n", status); - goto error; + return -1; } else dbg("ZLP_REG5 Writing success status%d\n", status); diff --git a/trunk/drivers/usb/serial/pl2303.c b/trunk/drivers/usb/serial/pl2303.c index cf8add91de05..2cd3f1d4b687 100644 --- a/trunk/drivers/usb/serial/pl2303.c +++ b/trunk/drivers/usb/serial/pl2303.c @@ -86,7 +86,6 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(ALCOR_VENDOR_ID, ALCOR_PRODUCT_ID) }, { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_ID) }, { USB_DEVICE(WS002IN_VENDOR_ID, WS002IN_PRODUCT_ID) }, - { USB_DEVICE(COREGA_VENDOR_ID, COREGA_PRODUCT_ID) }, { } /* Terminating entry */ }; diff --git a/trunk/drivers/usb/serial/pl2303.h b/trunk/drivers/usb/serial/pl2303.h index d31f5d299989..ed603e3decd6 100644 --- a/trunk/drivers/usb/serial/pl2303.h +++ b/trunk/drivers/usb/serial/pl2303.h @@ -104,6 +104,3 @@ #define WS002IN_VENDOR_ID 0x11f6 #define WS002IN_PRODUCT_ID 0x2001 -/* Corega CG-USBRS232R Serial Adapter */ -#define COREGA_VENDOR_ID 0x07aa -#define COREGA_PRODUCT_ID 0x002a diff --git a/trunk/drivers/usb/serial/sierra.c b/trunk/drivers/usb/serial/sierra.c index 605ebccdcd51..833f6e1e3721 100644 --- a/trunk/drivers/usb/serial/sierra.c +++ b/trunk/drivers/usb/serial/sierra.c @@ -136,8 +136,6 @@ static struct usb_device_id id_table_3port [] = { { USB_DEVICE(0x0f30, 0x1b1d) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ - { USB_DEVICE(0x1199, 0x0220) }, /* Sierra Wireless MC5725 */ - { USB_DEVICE(0x1199, 0x0220) }, /* Sierra Wireless MC5725 */ { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U*/ diff --git a/trunk/drivers/usb/storage/scsiglue.c b/trunk/drivers/usb/storage/scsiglue.c index 836a34ae6ec6..1ba19eaa1970 100644 --- a/trunk/drivers/usb/storage/scsiglue.c +++ b/trunk/drivers/usb/storage/scsiglue.c @@ -177,10 +177,6 @@ static int slave_configure(struct scsi_device *sdev) * is an occasional series of retries that will all fail. */ sdev->retry_hwerror = 1; - /* USB disks should allow restart. Some drives spin down - * automatically, requiring a START-STOP UNIT command. */ - sdev->allow_restart = 1; - } else { /* Non-disk-type devices don't need to blacklist any pages diff --git a/trunk/drivers/usb/storage/unusual_devs.h b/trunk/drivers/usb/storage/unusual_devs.h index 2c27721bd259..22ab2380367d 100644 --- a/trunk/drivers/usb/storage/unusual_devs.h +++ b/trunk/drivers/usb/storage/unusual_devs.h @@ -342,11 +342,11 @@ UNUSUAL_DEV( 0x04b0, 0x040d, 0x0100, 0x0100, US_FL_FIX_CAPACITY), /* Reported by Graber and Mike Pagano */ -UNUSUAL_DEV( 0x04b0, 0x040f, 0x0100, 0x0200, - "NIKON", - "NIKON DSC D200", - US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_FIX_CAPACITY), +UNUSUAL_DEV( 0x04b0, 0x040f, 0x0200, 0x0200, + "NIKON", + "NIKON DSC D200", + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_FIX_CAPACITY), /* Reported by Emil Larsson */ UNUSUAL_DEV( 0x04b0, 0x0411, 0x0100, 0x0101, @@ -731,13 +731,6 @@ UNUSUAL_DEV( 0x0584, 0x0008, 0x0102, 0x0102, US_SC_SCSI, US_PR_ALAUDA, init_alauda, 0 ), #endif -/* Reported by RTE */ -UNUSUAL_DEV( 0x058f, 0x6387, 0x0141, 0x0141, - "JetFlash", - "TS1GJF2A/120", - US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_MAX_SECTORS_64 ), - /* Fabrizio Fellini */ UNUSUAL_DEV( 0x0595, 0x4343, 0x0000, 0x2210, "Fujifilm", diff --git a/trunk/drivers/video/Kconfig b/trunk/drivers/video/Kconfig index 5b3dbcfcda48..7d86e9eae915 100644 --- a/trunk/drivers/video/Kconfig +++ b/trunk/drivers/video/Kconfig @@ -641,17 +641,6 @@ config FB_VESA You will get a boot time penguin logo at no additional cost. Please read . If unsure, say Y. -config FB_EFI - bool "EFI-based Framebuffer Support" - depends on (FB = y) && X86 - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT - help - This is the EFI frame buffer device driver. If the firmware on - your platform is UEFI2.0, select Y to add support for - Graphics Output Protocol for early console messages to appear. - config FB_IMAC bool "Intel-based Macintosh Framebuffer Support" depends on (FB = y) && X86 && EFI diff --git a/trunk/drivers/video/Makefile b/trunk/drivers/video/Makefile index 83e02b3429b6..59d6c45a910d 100644 --- a/trunk/drivers/video/Makefile +++ b/trunk/drivers/video/Makefile @@ -118,7 +118,6 @@ obj-$(CONFIG_FB_OMAP) += omap/ obj-$(CONFIG_FB_UVESA) += uvesafb.o obj-$(CONFIG_FB_VESA) += vesafb.o obj-$(CONFIG_FB_IMAC) += imacfb.o -obj-$(CONFIG_FB_EFI) += efifb.o obj-$(CONFIG_FB_VGA16) += vga16fb.o obj-$(CONFIG_FB_OF) += offb.o obj-$(CONFIG_FB_BF54X_LQ043) += bf54x-lq043fb.o diff --git a/trunk/drivers/video/atmel_lcdfb.c b/trunk/drivers/video/atmel_lcdfb.c index 11a3a222dfc3..235b618b4117 100644 --- a/trunk/drivers/video/atmel_lcdfb.c +++ b/trunk/drivers/video/atmel_lcdfb.c @@ -268,10 +268,6 @@ static int atmel_lcdfb_set_par(struct fb_info *info) /* Turn off the LCD controller and the DMA controller */ lcdc_writel(sinfo, ATMEL_LCDC_PWRCON, sinfo->guard_time << ATMEL_LCDC_GUARDT_OFFSET); - /* Wait for the LCDC core to become idle */ - while (lcdc_readl(sinfo, ATMEL_LCDC_PWRCON) & ATMEL_LCDC_BUSY) - msleep(10); - lcdc_writel(sinfo, ATMEL_LCDC_DMACON, 0); if (info->var.bits_per_pixel == 1) diff --git a/trunk/drivers/video/aty/radeon_base.c b/trunk/drivers/video/aty/radeon_base.c index 62867cb63fef..1e32b3d13f2e 100644 --- a/trunk/drivers/video/aty/radeon_base.c +++ b/trunk/drivers/video/aty/radeon_base.c @@ -202,7 +202,6 @@ static struct pci_device_id radeonfb_pci_table[] = { CHIP_DEF(PCI_CHIP_RV380_3154, RV380, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), CHIP_DEF(PCI_CHIP_RV370_5B60, RV380, CHIP_HAS_CRTC2), CHIP_DEF(PCI_CHIP_RV370_5B62, RV380, CHIP_HAS_CRTC2), - CHIP_DEF(PCI_CHIP_RV370_5B63, RV380, CHIP_HAS_CRTC2), CHIP_DEF(PCI_CHIP_RV370_5B64, RV380, CHIP_HAS_CRTC2), CHIP_DEF(PCI_CHIP_RV370_5B65, RV380, CHIP_HAS_CRTC2), CHIP_DEF(PCI_CHIP_RV370_5460, RV380, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), diff --git a/trunk/drivers/video/console/Kconfig b/trunk/drivers/video/console/Kconfig index b87ed37ac0c1..267422f66255 100644 --- a/trunk/drivers/video/console/Kconfig +++ b/trunk/drivers/video/console/Kconfig @@ -6,7 +6,7 @@ menu "Console display driver support" config VGA_CONSOLE bool "VGA text console" if EMBEDDED || !X86 - depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC && !M68K && !PARISC && !FRV && !ARCH_VERSATILE && !SUPERH && !BLACKFIN + depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC && !M68K && !PARISC && !FRV && !ARCH_VERSATILE && !SUPERH && !BFIN default y help Saying Y here will allow you to use Linux in text mode through a diff --git a/trunk/drivers/video/efifb.c b/trunk/drivers/video/efifb.c deleted file mode 100644 index bd779ae44b1e..000000000000 --- a/trunk/drivers/video/efifb.c +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Framebuffer driver for EFI/UEFI based system - * - * (c) 2006 Edgar Hucek - * Original efi driver written by Gerd Knorr - * - */ - -#include -#include -#include -#include -#include -#include - -#include