Merge commit 'origin/master' into next
This commit is contained in:
		
						commit
						e14eee56c2
					
				
							
								
								
									
										1
									
								
								CREDITS
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								CREDITS
									
									
									
									
									
								
							| @ -2166,7 +2166,6 @@ D: Initial implementation of VC's, pty's and select() | ||||
| 
 | ||||
| N: Pavel Machek | ||||
| E: pavel@ucw.cz | ||||
| E: pavel@suse.cz | ||||
| D: Softcursor for vga, hypertech cdrom support, vcsa bugfix, nbd | ||||
| D: sun4/330 port, capabilities for elf, speedup for rm on ext2, USB, | ||||
| D: work on suspend-to-ram/disk, killing duplicates from ioctl32 | ||||
|  | ||||
| @ -1,3 +1,46 @@ | ||||
| What:		/sys/bus/pci/drivers/.../bind | ||||
| Date:		December 2003 | ||||
| Contact:	linux-pci@vger.kernel.org | ||||
| Description: | ||||
| 		Writing a device location to this file will cause | ||||
| 		the driver to attempt to bind to the device found at | ||||
| 		this location.	This is useful for overriding default | ||||
| 		bindings.  The format for the location is: DDDD:BB:DD.F. | ||||
| 		That is Domain:Bus:Device.Function and is the same as | ||||
| 		found in /sys/bus/pci/devices/.  For example: | ||||
| 		# echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/bind | ||||
| 		(Note: kernels before 2.6.28 may require echo -n). | ||||
| 
 | ||||
| What:		/sys/bus/pci/drivers/.../unbind | ||||
| Date:		December 2003 | ||||
| Contact:	linux-pci@vger.kernel.org | ||||
| Description: | ||||
| 		Writing a device location to this file will cause the | ||||
| 		driver to attempt to unbind from the device found at | ||||
| 		this location.	This may be useful when overriding default | ||||
| 		bindings.  The format for the location is: DDDD:BB:DD.F. | ||||
| 		That is Domain:Bus:Device.Function and is the same as | ||||
| 		found in /sys/bus/pci/devices/. For example: | ||||
| 		# echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/unbind | ||||
| 		(Note: kernels before 2.6.28 may require echo -n). | ||||
| 
 | ||||
| What:		/sys/bus/pci/drivers/.../new_id | ||||
| Date:		December 2003 | ||||
| Contact:	linux-pci@vger.kernel.org | ||||
| Description: | ||||
| 		Writing a device ID to this file will attempt to | ||||
| 		dynamically add a new device ID to a PCI device driver. | ||||
| 		This may allow the driver to support more hardware than | ||||
| 		was included in the driver's static device ID support | ||||
| 		table at compile time.  The format for the device ID is: | ||||
| 		VVVV DDDD SVVV SDDD CCCC MMMM PPPP.  That is Vendor ID, | ||||
| 		Device ID, Subsystem Vendor ID, Subsystem Device ID, | ||||
| 		Class, Class Mask, and Private Driver Data.  The Vendor ID | ||||
| 		and Device ID fields are required, the rest are optional. | ||||
| 		Upon successfully adding an ID, the driver will probe | ||||
| 		for the device and attempt to bind to it.  For example: | ||||
| 		# echo "8086 10f5" > /sys/bus/pci/drivers/foo/new_id | ||||
| 
 | ||||
| What:		/sys/bus/pci/devices/.../vpd | ||||
| Date:		February 2008 | ||||
| Contact:	Ben Hutchings <bhutchings@solarflare.com> | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| What:		/sys/firmware/memmap/ | ||||
| Date:		June 2008 | ||||
| Contact:	Bernhard Walle <bwalle@suse.de> | ||||
| Contact:	Bernhard Walle <bernhard.walle@gmx.de> | ||||
| Description: | ||||
| 		On all platforms, the firmware provides a memory map which the | ||||
| 		kernel reads. The resources from that memory map are registered | ||||
|  | ||||
| @ -6,7 +6,7 @@ | ||||
| # To add a new book the only step required is to add the book to the
 | ||||
| # list of DOCBOOKS.
 | ||||
| 
 | ||||
| DOCBOOKS := z8530book.xml mcabook.xml \
 | ||||
| DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \
 | ||||
| 	    kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
 | ||||
| 	    procfs-guide.xml writing_usb_driver.xml networking.xml \
 | ||||
| 	    kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \
 | ||||
|  | ||||
							
								
								
									
										418
									
								
								Documentation/DocBook/device-drivers.tmpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										418
									
								
								Documentation/DocBook/device-drivers.tmpl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,418 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" | ||||
| 	"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []> | ||||
| 
 | ||||
| <book id="LinuxDriversAPI"> | ||||
|  <bookinfo> | ||||
|   <title>Linux Device Drivers</title> | ||||
| 
 | ||||
|   <legalnotice> | ||||
|    <para> | ||||
|      This documentation 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. | ||||
|    </para> | ||||
| 
 | ||||
|    <para> | ||||
|      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. | ||||
|    </para> | ||||
| 
 | ||||
|    <para> | ||||
|      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 | ||||
|    </para> | ||||
| 
 | ||||
|    <para> | ||||
|      For more details see the file COPYING in the source | ||||
|      distribution of Linux. | ||||
|    </para> | ||||
|   </legalnotice> | ||||
|  </bookinfo> | ||||
| 
 | ||||
| <toc></toc> | ||||
| 
 | ||||
|   <chapter id="Basics"> | ||||
|      <title>Driver Basics</title> | ||||
|      <sect1><title>Driver Entry and Exit points</title> | ||||
| !Iinclude/linux/init.h | ||||
|      </sect1> | ||||
| 
 | ||||
|      <sect1><title>Atomic and pointer manipulation</title> | ||||
| !Iarch/x86/include/asm/atomic_32.h | ||||
| !Iarch/x86/include/asm/unaligned.h | ||||
|      </sect1> | ||||
| 
 | ||||
|      <sect1><title>Delaying, scheduling, and timer routines</title> | ||||
| !Iinclude/linux/sched.h | ||||
| !Ekernel/sched.c | ||||
| !Ekernel/timer.c | ||||
|      </sect1> | ||||
|      <sect1><title>High-resolution timers</title> | ||||
| !Iinclude/linux/ktime.h | ||||
| !Iinclude/linux/hrtimer.h | ||||
| !Ekernel/hrtimer.c | ||||
|      </sect1> | ||||
|      <sect1><title>Workqueues and Kevents</title> | ||||
| !Ekernel/workqueue.c | ||||
|      </sect1> | ||||
|      <sect1><title>Internal Functions</title> | ||||
| !Ikernel/exit.c | ||||
| !Ikernel/signal.c | ||||
| !Iinclude/linux/kthread.h | ||||
| !Ekernel/kthread.c | ||||
|      </sect1> | ||||
| 
 | ||||
|      <sect1><title>Kernel objects manipulation</title> | ||||
| <!-- | ||||
| X!Iinclude/linux/kobject.h | ||||
| --> | ||||
| !Elib/kobject.c | ||||
|      </sect1> | ||||
| 
 | ||||
|      <sect1><title>Kernel utility functions</title> | ||||
| !Iinclude/linux/kernel.h | ||||
| !Ekernel/printk.c | ||||
| !Ekernel/panic.c | ||||
| !Ekernel/sys.c | ||||
| !Ekernel/rcupdate.c | ||||
|      </sect1> | ||||
| 
 | ||||
|      <sect1><title>Device Resource Management</title> | ||||
| !Edrivers/base/devres.c | ||||
|      </sect1> | ||||
| 
 | ||||
|   </chapter> | ||||
| 
 | ||||
|   <chapter id="devdrivers"> | ||||
|      <title>Device drivers infrastructure</title> | ||||
|      <sect1><title>Device Drivers Base</title> | ||||
| <!-- | ||||
| X!Iinclude/linux/device.h | ||||
| --> | ||||
| !Edrivers/base/driver.c | ||||
| !Edrivers/base/core.c | ||||
| !Edrivers/base/class.c | ||||
| !Edrivers/base/firmware_class.c | ||||
| !Edrivers/base/transport_class.c | ||||
| <!-- Cannot be included, because | ||||
|      attribute_container_add_class_device_adapter | ||||
|  and attribute_container_classdev_to_container | ||||
|      exceed allowed 44 characters maximum | ||||
| X!Edrivers/base/attribute_container.c | ||||
| --> | ||||
| !Edrivers/base/sys.c | ||||
| <!-- | ||||
| X!Edrivers/base/interface.c | ||||
| --> | ||||
| !Edrivers/base/platform.c | ||||
| !Edrivers/base/bus.c | ||||
|      </sect1> | ||||
|      <sect1><title>Device Drivers Power Management</title> | ||||
| !Edrivers/base/power/main.c | ||||
|      </sect1> | ||||
|      <sect1><title>Device Drivers ACPI Support</title> | ||||
| <!-- Internal functions only | ||||
| X!Edrivers/acpi/sleep/main.c | ||||
| X!Edrivers/acpi/sleep/wakeup.c | ||||
| X!Edrivers/acpi/motherboard.c | ||||
| X!Edrivers/acpi/bus.c | ||||
| --> | ||||
| !Edrivers/acpi/scan.c | ||||
| !Idrivers/acpi/scan.c | ||||
| <!-- No correct structured comments | ||||
| X!Edrivers/acpi/pci_bind.c | ||||
| --> | ||||
|      </sect1> | ||||
|      <sect1><title>Device drivers PnP support</title> | ||||
| !Idrivers/pnp/core.c | ||||
| <!-- No correct structured comments | ||||
| X!Edrivers/pnp/system.c | ||||
|  --> | ||||
| !Edrivers/pnp/card.c | ||||
| !Idrivers/pnp/driver.c | ||||
| !Edrivers/pnp/manager.c | ||||
| !Edrivers/pnp/support.c | ||||
|      </sect1> | ||||
|      <sect1><title>Userspace IO devices</title> | ||||
| !Edrivers/uio/uio.c | ||||
| !Iinclude/linux/uio_driver.h | ||||
|      </sect1> | ||||
|   </chapter> | ||||
| 
 | ||||
|   <chapter id="parportdev"> | ||||
|      <title>Parallel Port Devices</title> | ||||
| !Iinclude/linux/parport.h | ||||
| !Edrivers/parport/ieee1284.c | ||||
| !Edrivers/parport/share.c | ||||
| !Idrivers/parport/daisy.c | ||||
|   </chapter> | ||||
| 
 | ||||
|   <chapter id="message_devices"> | ||||
| 	<title>Message-based devices</title> | ||||
|      <sect1><title>Fusion message devices</title> | ||||
| !Edrivers/message/fusion/mptbase.c | ||||
| !Idrivers/message/fusion/mptbase.c | ||||
| !Edrivers/message/fusion/mptscsih.c | ||||
| !Idrivers/message/fusion/mptscsih.c | ||||
| !Idrivers/message/fusion/mptctl.c | ||||
| !Idrivers/message/fusion/mptspi.c | ||||
| !Idrivers/message/fusion/mptfc.c | ||||
| !Idrivers/message/fusion/mptlan.c | ||||
|      </sect1> | ||||
|      <sect1><title>I2O message devices</title> | ||||
| !Iinclude/linux/i2o.h | ||||
| !Idrivers/message/i2o/core.h | ||||
| !Edrivers/message/i2o/iop.c | ||||
| !Idrivers/message/i2o/iop.c | ||||
| !Idrivers/message/i2o/config-osm.c | ||||
| !Edrivers/message/i2o/exec-osm.c | ||||
| !Idrivers/message/i2o/exec-osm.c | ||||
| !Idrivers/message/i2o/bus-osm.c | ||||
| !Edrivers/message/i2o/device.c | ||||
| !Idrivers/message/i2o/device.c | ||||
| !Idrivers/message/i2o/driver.c | ||||
| !Idrivers/message/i2o/pci.c | ||||
| !Idrivers/message/i2o/i2o_block.c | ||||
| !Idrivers/message/i2o/i2o_scsi.c | ||||
| !Idrivers/message/i2o/i2o_proc.c | ||||
|      </sect1> | ||||
|   </chapter> | ||||
| 
 | ||||
|   <chapter id="snddev"> | ||||
|      <title>Sound Devices</title> | ||||
| !Iinclude/sound/core.h | ||||
| !Esound/sound_core.c | ||||
| !Iinclude/sound/pcm.h | ||||
| !Esound/core/pcm.c | ||||
| !Esound/core/device.c | ||||
| !Esound/core/info.c | ||||
| !Esound/core/rawmidi.c | ||||
| !Esound/core/sound.c | ||||
| !Esound/core/memory.c | ||||
| !Esound/core/pcm_memory.c | ||||
| !Esound/core/init.c | ||||
| !Esound/core/isadma.c | ||||
| !Esound/core/control.c | ||||
| !Esound/core/pcm_lib.c | ||||
| !Esound/core/hwdep.c | ||||
| !Esound/core/pcm_native.c | ||||
| !Esound/core/memalloc.c | ||||
| <!-- FIXME: Removed for now since no structured comments in source | ||||
| X!Isound/sound_firmware.c | ||||
| --> | ||||
|   </chapter> | ||||
| 
 | ||||
|   <chapter id="uart16x50"> | ||||
|      <title>16x50 UART Driver</title> | ||||
| !Iinclude/linux/serial_core.h | ||||
| !Edrivers/serial/serial_core.c | ||||
| !Edrivers/serial/8250.c | ||||
|   </chapter> | ||||
| 
 | ||||
|   <chapter id="fbdev"> | ||||
|      <title>Frame Buffer Library</title> | ||||
| 
 | ||||
|      <para> | ||||
|        The frame buffer drivers depend heavily on four data structures. | ||||
|        These structures are declared in include/linux/fb.h.  They are | ||||
|        fb_info, fb_var_screeninfo, fb_fix_screeninfo and fb_monospecs. | ||||
|        The last three can be made available to and from userland. | ||||
|      </para> | ||||
| 
 | ||||
|      <para> | ||||
|        fb_info defines the current state of a particular video card. | ||||
|        Inside fb_info, there exists a fb_ops structure which is a | ||||
|        collection of needed functions to make fbdev and fbcon work. | ||||
|        fb_info is only visible to the kernel. | ||||
|      </para> | ||||
| 
 | ||||
|      <para> | ||||
|        fb_var_screeninfo is used to describe the features of a video card | ||||
|        that are user defined.  With fb_var_screeninfo, things such as | ||||
|        depth and the resolution may be defined. | ||||
|      </para> | ||||
| 
 | ||||
|      <para> | ||||
|        The next structure is fb_fix_screeninfo. This defines the | ||||
|        properties of a card that are created when a mode is set and can't | ||||
|        be changed otherwise.  A good example of this is the start of the | ||||
|        frame buffer memory.  This "locks" the address of the frame buffer | ||||
|        memory, so that it cannot be changed or moved. | ||||
|      </para> | ||||
| 
 | ||||
|      <para> | ||||
|        The last structure is fb_monospecs. In the old API, there was | ||||
|        little importance for fb_monospecs. This allowed for forbidden things | ||||
|        such as setting a mode of 800x600 on a fix frequency monitor. With | ||||
|        the new API, fb_monospecs prevents such things, and if used | ||||
|        correctly, can prevent a monitor from being cooked.  fb_monospecs | ||||
|        will not be useful until kernels 2.5.x. | ||||
|      </para> | ||||
| 
 | ||||
|      <sect1><title>Frame Buffer Memory</title> | ||||
| !Edrivers/video/fbmem.c | ||||
|      </sect1> | ||||
| <!-- | ||||
|      <sect1><title>Frame Buffer Console</title> | ||||
| X!Edrivers/video/console/fbcon.c | ||||
|      </sect1> | ||||
| --> | ||||
|      <sect1><title>Frame Buffer Colormap</title> | ||||
| !Edrivers/video/fbcmap.c | ||||
|      </sect1> | ||||
| <!-- FIXME: | ||||
|   drivers/video/fbgen.c has no docs, which stuffs up the sgml.  Comment | ||||
|   out until somebody adds docs.  KAO | ||||
|      <sect1><title>Frame Buffer Generic Functions</title> | ||||
| X!Idrivers/video/fbgen.c | ||||
|      </sect1> | ||||
| KAO --> | ||||
|      <sect1><title>Frame Buffer Video Mode Database</title> | ||||
| !Idrivers/video/modedb.c | ||||
| !Edrivers/video/modedb.c | ||||
|      </sect1> | ||||
|      <sect1><title>Frame Buffer Macintosh Video Mode Database</title> | ||||
| !Edrivers/video/macmodes.c | ||||
|      </sect1> | ||||
|      <sect1><title>Frame Buffer Fonts</title> | ||||
|         <para> | ||||
|            Refer to the file drivers/video/console/fonts.c for more information. | ||||
|         </para> | ||||
| <!-- FIXME: Removed for now since no structured comments in source | ||||
| X!Idrivers/video/console/fonts.c | ||||
| --> | ||||
|      </sect1> | ||||
|   </chapter> | ||||
| 
 | ||||
|   <chapter id="input_subsystem"> | ||||
|      <title>Input Subsystem</title> | ||||
| !Iinclude/linux/input.h | ||||
| !Edrivers/input/input.c | ||||
| !Edrivers/input/ff-core.c | ||||
| !Edrivers/input/ff-memless.c | ||||
|   </chapter> | ||||
| 
 | ||||
|   <chapter id="spi"> | ||||
|       <title>Serial Peripheral Interface (SPI)</title> | ||||
|   <para> | ||||
| 	SPI is the "Serial Peripheral Interface", widely used with | ||||
| 	embedded systems because it is a simple and efficient | ||||
| 	interface:  basically a multiplexed shift register. | ||||
| 	Its three signal wires hold a clock (SCK, often in the range | ||||
| 	of 1-20 MHz), a "Master Out, Slave In" (MOSI) data line, and | ||||
| 	a "Master In, Slave Out" (MISO) data line. | ||||
| 	SPI is a full duplex protocol; for each bit shifted out the | ||||
| 	MOSI line (one per clock) another is shifted in on the MISO line. | ||||
| 	Those bits are assembled into words of various sizes on the | ||||
| 	way to and from system memory. | ||||
| 	An additional chipselect line is usually active-low (nCS); | ||||
| 	four signals are normally used for each peripheral, plus | ||||
| 	sometimes an interrupt. | ||||
|   </para> | ||||
|   <para> | ||||
| 	The SPI bus facilities listed here provide a generalized | ||||
| 	interface to declare SPI busses and devices, manage them | ||||
| 	according to the standard Linux driver model, and perform | ||||
| 	input/output operations. | ||||
| 	At this time, only "master" side interfaces are supported, | ||||
| 	where Linux talks to SPI peripherals and does not implement | ||||
| 	such a peripheral itself. | ||||
| 	(Interfaces to support implementing SPI slaves would | ||||
| 	necessarily look different.) | ||||
|   </para> | ||||
|   <para> | ||||
| 	The programming interface is structured around two kinds of driver, | ||||
| 	and two kinds of device. | ||||
| 	A "Controller Driver" abstracts the controller hardware, which may | ||||
| 	be as simple as a set of GPIO pins or as complex as a pair of FIFOs | ||||
| 	connected to dual DMA engines on the other side of the SPI shift | ||||
| 	register (maximizing throughput).  Such drivers bridge between | ||||
| 	whatever bus they sit on (often the platform bus) and SPI, and | ||||
| 	expose the SPI side of their device as a | ||||
| 	<structname>struct spi_master</structname>. | ||||
| 	SPI devices are children of that master, represented as a | ||||
| 	<structname>struct spi_device</structname> and manufactured from | ||||
| 	<structname>struct spi_board_info</structname> descriptors which | ||||
| 	are usually provided by board-specific initialization code. | ||||
| 	A <structname>struct spi_driver</structname> is called a | ||||
| 	"Protocol Driver", and is bound to a spi_device using normal | ||||
| 	driver model calls. | ||||
|   </para> | ||||
|   <para> | ||||
| 	The I/O model is a set of queued messages.  Protocol drivers | ||||
| 	submit one or more <structname>struct spi_message</structname> | ||||
| 	objects, which are processed and completed asynchronously. | ||||
| 	(There are synchronous wrappers, however.)  Messages are | ||||
| 	built from one or more <structname>struct spi_transfer</structname> | ||||
| 	objects, each of which wraps a full duplex SPI transfer. | ||||
| 	A variety of protocol tweaking options are needed, because | ||||
| 	different chips adopt very different policies for how they | ||||
| 	use the bits transferred with SPI. | ||||
|   </para> | ||||
| !Iinclude/linux/spi/spi.h | ||||
| !Fdrivers/spi/spi.c spi_register_board_info | ||||
| !Edrivers/spi/spi.c | ||||
|   </chapter> | ||||
| 
 | ||||
|   <chapter id="i2c"> | ||||
|      <title>I<superscript>2</superscript>C and SMBus Subsystem</title> | ||||
| 
 | ||||
|      <para> | ||||
| 	I<superscript>2</superscript>C (or without fancy typography, "I2C") | ||||
| 	is an acronym for the "Inter-IC" bus, a simple bus protocol which is | ||||
| 	widely used where low data rate communications suffice. | ||||
| 	Since it's also a licensed trademark, some vendors use another | ||||
| 	name (such as "Two-Wire Interface", TWI) for the same bus. | ||||
| 	I2C only needs two signals (SCL for clock, SDA for data), conserving | ||||
| 	board real estate and minimizing signal quality issues. | ||||
| 	Most I2C devices use seven bit addresses, and bus speeds of up | ||||
| 	to 400 kHz; there's a high speed extension (3.4 MHz) that's not yet | ||||
| 	found wide use. | ||||
| 	I2C is a multi-master bus; open drain signaling is used to | ||||
| 	arbitrate between masters, as well as to handshake and to | ||||
| 	synchronize clocks from slower clients. | ||||
|      </para> | ||||
| 
 | ||||
|      <para> | ||||
| 	The Linux I2C programming interfaces support only the master | ||||
| 	side of bus interactions, not the slave side. | ||||
| 	The programming interface is structured around two kinds of driver, | ||||
| 	and two kinds of device. | ||||
| 	An I2C "Adapter Driver" abstracts the controller hardware; it binds | ||||
| 	to a physical device (perhaps a PCI device or platform_device) and | ||||
| 	exposes a <structname>struct i2c_adapter</structname> representing | ||||
| 	each I2C bus segment it manages. | ||||
| 	On each I2C bus segment will be I2C devices represented by a | ||||
| 	<structname>struct i2c_client</structname>.  Those devices will | ||||
| 	be bound to a <structname>struct i2c_driver</structname>, | ||||
| 	which should follow the standard Linux driver model. | ||||
| 	(At this writing, a legacy model is more widely used.) | ||||
| 	There are functions to perform various I2C protocol operations; at | ||||
| 	this writing all such functions are usable only from task context. | ||||
|      </para> | ||||
| 
 | ||||
|      <para> | ||||
| 	The System Management Bus (SMBus) is a sibling protocol.  Most SMBus | ||||
| 	systems are also I2C conformant.  The electrical constraints are | ||||
| 	tighter for SMBus, and it standardizes particular protocol messages | ||||
| 	and idioms.  Controllers that support I2C can also support most | ||||
| 	SMBus operations, but SMBus controllers don't support all the protocol | ||||
| 	options that an I2C controller will. | ||||
| 	There are functions to perform various SMBus protocol operations, | ||||
| 	either using I2C primitives or by issuing SMBus commands to | ||||
| 	i2c_adapter devices which don't support those I2C operations. | ||||
|      </para> | ||||
| 
 | ||||
| !Iinclude/linux/i2c.h | ||||
| !Fdrivers/i2c/i2c-boardinfo.c i2c_register_board_info | ||||
| !Edrivers/i2c/i2c-core.c | ||||
|   </chapter> | ||||
| 
 | ||||
| </book> | ||||
| @ -38,58 +38,6 @@ | ||||
| 
 | ||||
| <toc></toc> | ||||
| 
 | ||||
|   <chapter id="Basics"> | ||||
|      <title>Driver Basics</title> | ||||
|      <sect1><title>Driver Entry and Exit points</title> | ||||
| !Iinclude/linux/init.h | ||||
|      </sect1> | ||||
| 
 | ||||
|      <sect1><title>Atomic and pointer manipulation</title> | ||||
| !Iarch/x86/include/asm/atomic_32.h | ||||
| !Iarch/x86/include/asm/unaligned.h | ||||
|      </sect1> | ||||
| 
 | ||||
|      <sect1><title>Delaying, scheduling, and timer routines</title> | ||||
| !Iinclude/linux/sched.h | ||||
| !Ekernel/sched.c | ||||
| !Ekernel/timer.c | ||||
|      </sect1> | ||||
|      <sect1><title>High-resolution timers</title> | ||||
| !Iinclude/linux/ktime.h | ||||
| !Iinclude/linux/hrtimer.h | ||||
| !Ekernel/hrtimer.c | ||||
|      </sect1> | ||||
|      <sect1><title>Workqueues and Kevents</title> | ||||
| !Ekernel/workqueue.c | ||||
|      </sect1> | ||||
|      <sect1><title>Internal Functions</title> | ||||
| !Ikernel/exit.c | ||||
| !Ikernel/signal.c | ||||
| !Iinclude/linux/kthread.h | ||||
| !Ekernel/kthread.c | ||||
|      </sect1> | ||||
| 
 | ||||
|      <sect1><title>Kernel objects manipulation</title> | ||||
| <!-- | ||||
| X!Iinclude/linux/kobject.h | ||||
| --> | ||||
| !Elib/kobject.c | ||||
|      </sect1> | ||||
| 
 | ||||
|      <sect1><title>Kernel utility functions</title> | ||||
| !Iinclude/linux/kernel.h | ||||
| !Ekernel/printk.c | ||||
| !Ekernel/panic.c | ||||
| !Ekernel/sys.c | ||||
| !Ekernel/rcupdate.c | ||||
|      </sect1> | ||||
| 
 | ||||
|      <sect1><title>Device Resource Management</title> | ||||
| !Edrivers/base/devres.c | ||||
|      </sect1> | ||||
| 
 | ||||
|   </chapter> | ||||
| 
 | ||||
|   <chapter id="adt"> | ||||
|      <title>Data Types</title> | ||||
|      <sect1><title>Doubly Linked Lists</title> | ||||
| @ -298,62 +246,6 @@ X!Earch/x86/kernel/mca_32.c | ||||
| !Ikernel/acct.c | ||||
|   </chapter> | ||||
| 
 | ||||
|   <chapter id="devdrivers"> | ||||
|      <title>Device drivers infrastructure</title> | ||||
|      <sect1><title>Device Drivers Base</title> | ||||
| <!-- | ||||
| X!Iinclude/linux/device.h | ||||
| --> | ||||
| !Edrivers/base/driver.c | ||||
| !Edrivers/base/core.c | ||||
| !Edrivers/base/class.c | ||||
| !Edrivers/base/firmware_class.c | ||||
| !Edrivers/base/transport_class.c | ||||
| <!-- Cannot be included, because | ||||
|      attribute_container_add_class_device_adapter | ||||
|  and attribute_container_classdev_to_container | ||||
|      exceed allowed 44 characters maximum | ||||
| X!Edrivers/base/attribute_container.c | ||||
| --> | ||||
| !Edrivers/base/sys.c | ||||
| <!-- | ||||
| X!Edrivers/base/interface.c | ||||
| --> | ||||
| !Edrivers/base/platform.c | ||||
| !Edrivers/base/bus.c | ||||
|      </sect1> | ||||
|      <sect1><title>Device Drivers Power Management</title> | ||||
| !Edrivers/base/power/main.c | ||||
|      </sect1> | ||||
|      <sect1><title>Device Drivers ACPI Support</title> | ||||
| <!-- Internal functions only | ||||
| X!Edrivers/acpi/sleep/main.c | ||||
| X!Edrivers/acpi/sleep/wakeup.c | ||||
| X!Edrivers/acpi/motherboard.c | ||||
| X!Edrivers/acpi/bus.c | ||||
| --> | ||||
| !Edrivers/acpi/scan.c | ||||
| !Idrivers/acpi/scan.c | ||||
| <!-- No correct structured comments | ||||
| X!Edrivers/acpi/pci_bind.c | ||||
| --> | ||||
|      </sect1> | ||||
|      <sect1><title>Device drivers PnP support</title> | ||||
| !Idrivers/pnp/core.c | ||||
| <!-- No correct structured comments | ||||
| X!Edrivers/pnp/system.c | ||||
|  --> | ||||
| !Edrivers/pnp/card.c | ||||
| !Idrivers/pnp/driver.c | ||||
| !Edrivers/pnp/manager.c | ||||
| !Edrivers/pnp/support.c | ||||
|      </sect1> | ||||
|      <sect1><title>Userspace IO devices</title> | ||||
| !Edrivers/uio/uio.c | ||||
| !Iinclude/linux/uio_driver.h | ||||
|      </sect1> | ||||
|   </chapter> | ||||
| 
 | ||||
|   <chapter id="blkdev"> | ||||
|      <title>Block Devices</title> | ||||
| !Eblock/blk-core.c | ||||
| @ -381,275 +273,6 @@ X!Edrivers/pnp/system.c | ||||
| !Edrivers/char/misc.c | ||||
|   </chapter> | ||||
| 
 | ||||
|   <chapter id="parportdev"> | ||||
|      <title>Parallel Port Devices</title> | ||||
| !Iinclude/linux/parport.h | ||||
| !Edrivers/parport/ieee1284.c | ||||
| !Edrivers/parport/share.c | ||||
| !Idrivers/parport/daisy.c | ||||
|   </chapter> | ||||
| 
 | ||||
|   <chapter id="message_devices"> | ||||
| 	<title>Message-based devices</title> | ||||
|      <sect1><title>Fusion message devices</title> | ||||
| !Edrivers/message/fusion/mptbase.c | ||||
| !Idrivers/message/fusion/mptbase.c | ||||
| !Edrivers/message/fusion/mptscsih.c | ||||
| !Idrivers/message/fusion/mptscsih.c | ||||
| !Idrivers/message/fusion/mptctl.c | ||||
| !Idrivers/message/fusion/mptspi.c | ||||
| !Idrivers/message/fusion/mptfc.c | ||||
| !Idrivers/message/fusion/mptlan.c | ||||
|      </sect1> | ||||
|      <sect1><title>I2O message devices</title> | ||||
| !Iinclude/linux/i2o.h | ||||
| !Idrivers/message/i2o/core.h | ||||
| !Edrivers/message/i2o/iop.c | ||||
| !Idrivers/message/i2o/iop.c | ||||
| !Idrivers/message/i2o/config-osm.c | ||||
| !Edrivers/message/i2o/exec-osm.c | ||||
| !Idrivers/message/i2o/exec-osm.c | ||||
| !Idrivers/message/i2o/bus-osm.c | ||||
| !Edrivers/message/i2o/device.c | ||||
| !Idrivers/message/i2o/device.c | ||||
| !Idrivers/message/i2o/driver.c | ||||
| !Idrivers/message/i2o/pci.c | ||||
| !Idrivers/message/i2o/i2o_block.c | ||||
| !Idrivers/message/i2o/i2o_scsi.c | ||||
| !Idrivers/message/i2o/i2o_proc.c | ||||
|      </sect1> | ||||
|   </chapter> | ||||
| 
 | ||||
|   <chapter id="snddev"> | ||||
|      <title>Sound Devices</title> | ||||
| !Iinclude/sound/core.h | ||||
| !Esound/sound_core.c | ||||
| !Iinclude/sound/pcm.h | ||||
| !Esound/core/pcm.c | ||||
| !Esound/core/device.c | ||||
| !Esound/core/info.c | ||||
| !Esound/core/rawmidi.c | ||||
| !Esound/core/sound.c | ||||
| !Esound/core/memory.c | ||||
| !Esound/core/pcm_memory.c | ||||
| !Esound/core/init.c | ||||
| !Esound/core/isadma.c | ||||
| !Esound/core/control.c | ||||
| !Esound/core/pcm_lib.c | ||||
| !Esound/core/hwdep.c | ||||
| !Esound/core/pcm_native.c | ||||
| !Esound/core/memalloc.c | ||||
| <!-- FIXME: Removed for now since no structured comments in source | ||||
| X!Isound/sound_firmware.c | ||||
| --> | ||||
|   </chapter> | ||||
| 
 | ||||
|   <chapter id="uart16x50"> | ||||
|      <title>16x50 UART Driver</title> | ||||
| !Iinclude/linux/serial_core.h | ||||
| !Edrivers/serial/serial_core.c | ||||
| !Edrivers/serial/8250.c | ||||
|   </chapter> | ||||
| 
 | ||||
|   <chapter id="fbdev"> | ||||
|      <title>Frame Buffer Library</title> | ||||
| 
 | ||||
|      <para> | ||||
|        The frame buffer drivers depend heavily on four data structures.   | ||||
|        These structures are declared in include/linux/fb.h.  They are  | ||||
|        fb_info, fb_var_screeninfo, fb_fix_screeninfo and fb_monospecs.  | ||||
|        The last three can be made available to and from userland.  | ||||
|      </para> | ||||
| 
 | ||||
|      <para> | ||||
|        fb_info defines the current state of a particular video card.  | ||||
|        Inside fb_info, there exists a fb_ops structure which is a  | ||||
|        collection of needed functions to make fbdev and fbcon work. | ||||
|        fb_info is only visible to the kernel. | ||||
|      </para> | ||||
| 
 | ||||
|      <para> | ||||
|        fb_var_screeninfo is used to describe the features of a video card  | ||||
|        that are user defined.  With fb_var_screeninfo, things such as | ||||
|        depth and the resolution may be defined. | ||||
|      </para> | ||||
| 
 | ||||
|      <para> | ||||
|        The next structure is fb_fix_screeninfo. This defines the  | ||||
|        properties of a card that are created when a mode is set and can't  | ||||
|        be changed otherwise.  A good example of this is the start of the  | ||||
|        frame buffer memory.  This "locks" the address of the frame buffer | ||||
|        memory, so that it cannot be changed or moved. | ||||
|      </para> | ||||
| 
 | ||||
|      <para> | ||||
|        The last structure is fb_monospecs. In the old API, there was  | ||||
|        little importance for fb_monospecs. This allowed for forbidden things  | ||||
|        such as setting a mode of 800x600 on a fix frequency monitor. With  | ||||
|        the new API, fb_monospecs prevents such things, and if used  | ||||
|        correctly, can prevent a monitor from being cooked.  fb_monospecs | ||||
|        will not be useful until kernels 2.5.x. | ||||
|      </para> | ||||
| 
 | ||||
|      <sect1><title>Frame Buffer Memory</title> | ||||
| !Edrivers/video/fbmem.c | ||||
|      </sect1> | ||||
| <!-- | ||||
|      <sect1><title>Frame Buffer Console</title> | ||||
| X!Edrivers/video/console/fbcon.c | ||||
|      </sect1> | ||||
| --> | ||||
|      <sect1><title>Frame Buffer Colormap</title> | ||||
| !Edrivers/video/fbcmap.c | ||||
|      </sect1> | ||||
| <!-- FIXME: | ||||
|   drivers/video/fbgen.c has no docs, which stuffs up the sgml.  Comment | ||||
|   out until somebody adds docs.  KAO | ||||
|      <sect1><title>Frame Buffer Generic Functions</title> | ||||
| X!Idrivers/video/fbgen.c | ||||
|      </sect1> | ||||
| KAO --> | ||||
|      <sect1><title>Frame Buffer Video Mode Database</title> | ||||
| !Idrivers/video/modedb.c | ||||
| !Edrivers/video/modedb.c | ||||
|      </sect1> | ||||
|      <sect1><title>Frame Buffer Macintosh Video Mode Database</title> | ||||
| !Edrivers/video/macmodes.c | ||||
|      </sect1> | ||||
|      <sect1><title>Frame Buffer Fonts</title> | ||||
|         <para> | ||||
|            Refer to the file drivers/video/console/fonts.c for more information. | ||||
|         </para> | ||||
| <!-- FIXME: Removed for now since no structured comments in source | ||||
| X!Idrivers/video/console/fonts.c | ||||
| --> | ||||
|      </sect1> | ||||
|   </chapter> | ||||
| 
 | ||||
|   <chapter id="input_subsystem"> | ||||
|      <title>Input Subsystem</title> | ||||
| !Iinclude/linux/input.h | ||||
| !Edrivers/input/input.c | ||||
| !Edrivers/input/ff-core.c | ||||
| !Edrivers/input/ff-memless.c | ||||
|   </chapter> | ||||
| 
 | ||||
|   <chapter id="spi"> | ||||
|       <title>Serial Peripheral Interface (SPI)</title> | ||||
|   <para> | ||||
| 	SPI is the "Serial Peripheral Interface", widely used with | ||||
| 	embedded systems because it is a simple and efficient | ||||
| 	interface:  basically a multiplexed shift register. | ||||
| 	Its three signal wires hold a clock (SCK, often in the range | ||||
| 	of 1-20 MHz), a "Master Out, Slave In" (MOSI) data line, and | ||||
| 	a "Master In, Slave Out" (MISO) data line. | ||||
| 	SPI is a full duplex protocol; for each bit shifted out the | ||||
| 	MOSI line (one per clock) another is shifted in on the MISO line. | ||||
| 	Those bits are assembled into words of various sizes on the | ||||
| 	way to and from system memory. | ||||
| 	An additional chipselect line is usually active-low (nCS); | ||||
| 	four signals are normally used for each peripheral, plus | ||||
| 	sometimes an interrupt. | ||||
|   </para> | ||||
|   <para> | ||||
| 	The SPI bus facilities listed here provide a generalized | ||||
| 	interface to declare SPI busses and devices, manage them | ||||
| 	according to the standard Linux driver model, and perform | ||||
| 	input/output operations. | ||||
| 	At this time, only "master" side interfaces are supported, | ||||
| 	where Linux talks to SPI peripherals and does not implement | ||||
| 	such a peripheral itself. | ||||
| 	(Interfaces to support implementing SPI slaves would | ||||
| 	necessarily look different.) | ||||
|   </para> | ||||
|   <para> | ||||
| 	The programming interface is structured around two kinds of driver, | ||||
| 	and two kinds of device. | ||||
| 	A "Controller Driver" abstracts the controller hardware, which may | ||||
| 	be as simple as a set of GPIO pins or as complex as a pair of FIFOs | ||||
| 	connected to dual DMA engines on the other side of the SPI shift | ||||
| 	register (maximizing throughput).  Such drivers bridge between | ||||
| 	whatever bus they sit on (often the platform bus) and SPI, and | ||||
| 	expose the SPI side of their device as a | ||||
| 	<structname>struct spi_master</structname>. | ||||
| 	SPI devices are children of that master, represented as a | ||||
| 	<structname>struct spi_device</structname> and manufactured from | ||||
| 	<structname>struct spi_board_info</structname> descriptors which | ||||
| 	are usually provided by board-specific initialization code. | ||||
| 	A <structname>struct spi_driver</structname> is called a | ||||
| 	"Protocol Driver", and is bound to a spi_device using normal | ||||
| 	driver model calls. | ||||
|   </para> | ||||
|   <para> | ||||
| 	The I/O model is a set of queued messages.  Protocol drivers | ||||
| 	submit one or more <structname>struct spi_message</structname> | ||||
| 	objects, which are processed and completed asynchronously. | ||||
| 	(There are synchronous wrappers, however.)  Messages are | ||||
| 	built from one or more <structname>struct spi_transfer</structname> | ||||
| 	objects, each of which wraps a full duplex SPI transfer. | ||||
| 	A variety of protocol tweaking options are needed, because | ||||
| 	different chips adopt very different policies for how they | ||||
| 	use the bits transferred with SPI. | ||||
|   </para> | ||||
| !Iinclude/linux/spi/spi.h | ||||
| !Fdrivers/spi/spi.c spi_register_board_info | ||||
| !Edrivers/spi/spi.c | ||||
|   </chapter> | ||||
| 
 | ||||
|   <chapter id="i2c"> | ||||
|      <title>I<superscript>2</superscript>C and SMBus Subsystem</title> | ||||
| 
 | ||||
|      <para> | ||||
| 	I<superscript>2</superscript>C (or without fancy typography, "I2C") | ||||
| 	is an acronym for the "Inter-IC" bus, a simple bus protocol which is | ||||
| 	widely used where low data rate communications suffice. | ||||
| 	Since it's also a licensed trademark, some vendors use another | ||||
| 	name (such as "Two-Wire Interface", TWI) for the same bus. | ||||
| 	I2C only needs two signals (SCL for clock, SDA for data), conserving | ||||
| 	board real estate and minimizing signal quality issues. | ||||
| 	Most I2C devices use seven bit addresses, and bus speeds of up | ||||
| 	to 400 kHz; there's a high speed extension (3.4 MHz) that's not yet | ||||
| 	found wide use. | ||||
| 	I2C is a multi-master bus; open drain signaling is used to | ||||
| 	arbitrate between masters, as well as to handshake and to | ||||
| 	synchronize clocks from slower clients. | ||||
|      </para> | ||||
| 
 | ||||
|      <para> | ||||
| 	The Linux I2C programming interfaces support only the master | ||||
| 	side of bus interactions, not the slave side. | ||||
| 	The programming interface is structured around two kinds of driver, | ||||
| 	and two kinds of device. | ||||
| 	An I2C "Adapter Driver" abstracts the controller hardware; it binds | ||||
| 	to a physical device (perhaps a PCI device or platform_device) and | ||||
| 	exposes a <structname>struct i2c_adapter</structname> representing | ||||
| 	each I2C bus segment it manages. | ||||
| 	On each I2C bus segment will be I2C devices represented by a | ||||
| 	<structname>struct i2c_client</structname>.  Those devices will | ||||
| 	be bound to a <structname>struct i2c_driver</structname>, | ||||
| 	which should follow the standard Linux driver model. | ||||
| 	(At this writing, a legacy model is more widely used.) | ||||
| 	There are functions to perform various I2C protocol operations; at | ||||
| 	this writing all such functions are usable only from task context. | ||||
|      </para> | ||||
| 
 | ||||
|      <para> | ||||
| 	The System Management Bus (SMBus) is a sibling protocol.  Most SMBus | ||||
| 	systems are also I2C conformant.  The electrical constraints are | ||||
| 	tighter for SMBus, and it standardizes particular protocol messages | ||||
| 	and idioms.  Controllers that support I2C can also support most | ||||
| 	SMBus operations, but SMBus controllers don't support all the protocol | ||||
| 	options that an I2C controller will. | ||||
| 	There are functions to perform various SMBus protocol operations, | ||||
| 	either using I2C primitives or by issuing SMBus commands to | ||||
| 	i2c_adapter devices which don't support those I2C operations. | ||||
|      </para> | ||||
| 
 | ||||
| !Iinclude/linux/i2c.h | ||||
| !Fdrivers/i2c/i2c-boardinfo.c i2c_register_board_info | ||||
| !Edrivers/i2c/i2c-core.c | ||||
|   </chapter> | ||||
| 
 | ||||
|   <chapter id="clk"> | ||||
|      <title>Clock Framework</title> | ||||
| 
 | ||||
|  | ||||
| @ -252,10 +252,8 @@ cgroup file system directories. | ||||
| When a task is moved from one cgroup to another, it gets a new | ||||
| css_set pointer - if there's an already existing css_set with the | ||||
| desired collection of cgroups then that group is reused, else a new | ||||
| css_set is allocated. Note that the current implementation uses a | ||||
| linear search to locate an appropriate existing css_set, so isn't | ||||
| very efficient. A future version will use a hash table for better | ||||
| performance. | ||||
| css_set is allocated. The appropriate existing css_set is located by | ||||
| looking into a hash table. | ||||
| 
 | ||||
| To allow access from a cgroup to the css_sets (and hence tasks) | ||||
| that comprise it, a set of cg_cgroup_link objects form a lattice; | ||||
|  | ||||
| @ -142,7 +142,7 @@ into the rest of the kernel, none in performance critical paths: | ||||
|  - in fork and exit, to attach and detach a task from its cpuset. | ||||
|  - in sched_setaffinity, to mask the requested CPUs by what's | ||||
|    allowed in that tasks cpuset. | ||||
|  - in sched.c migrate_all_tasks(), to keep migrating tasks within | ||||
|  - in sched.c migrate_live_tasks(), to keep migrating tasks within | ||||
|    the CPUs allowed by their cpuset, if possible. | ||||
|  - in the mbind and set_mempolicy system calls, to mask the requested | ||||
|    Memory Nodes by what's allowed in that tasks cpuset. | ||||
| @ -175,6 +175,10 @@ files describing that cpuset: | ||||
|  - mem_exclusive flag: is memory placement exclusive? | ||||
|  - mem_hardwall flag:  is memory allocation hardwalled | ||||
|  - memory_pressure: measure of how much paging pressure in cpuset | ||||
|  - memory_spread_page flag: if set, spread page cache evenly on allowed nodes | ||||
|  - memory_spread_slab flag: if set, spread slab cache evenly on allowed nodes | ||||
|  - sched_load_balance flag: if set, load balance within CPUs on that cpuset | ||||
|  - sched_relax_domain_level: the searching range when migrating tasks | ||||
| 
 | ||||
| In addition, the root cpuset only has the following file: | ||||
|  - memory_pressure_enabled flag: compute memory_pressure? | ||||
| @ -252,7 +256,7 @@ is causing. | ||||
| 
 | ||||
| This is useful both on tightly managed systems running a wide mix of | ||||
| submitted jobs, which may choose to terminate or re-prioritize jobs that | ||||
| are trying to use more memory than allowed on the nodes assigned them, | ||||
| are trying to use more memory than allowed on the nodes assigned to them, | ||||
| and with tightly coupled, long running, massively parallel scientific | ||||
| computing jobs that will dramatically fail to meet required performance | ||||
| goals if they start to use more memory than allowed to them. | ||||
| @ -378,7 +382,7 @@ as cpusets and sched_setaffinity. | ||||
| The algorithmic cost of load balancing and its impact on key shared | ||||
| kernel data structures such as the task list increases more than | ||||
| linearly with the number of CPUs being balanced.  So the scheduler | ||||
| has support to  partition the systems CPUs into a number of sched | ||||
| has support to partition the systems CPUs into a number of sched | ||||
| domains such that it only load balances within each sched domain. | ||||
| Each sched domain covers some subset of the CPUs in the system; | ||||
| no two sched domains overlap; some CPUs might not be in any sched | ||||
| @ -485,17 +489,22 @@ of CPUs allowed to a cpuset having 'sched_load_balance' enabled. | ||||
| The internal kernel cpuset to scheduler interface passes from the | ||||
| cpuset code to the scheduler code a partition of the load balanced | ||||
| CPUs in the system. This partition is a set of subsets (represented | ||||
| as an array of cpumask_t) of CPUs, pairwise disjoint, that cover all | ||||
| the CPUs that must be load balanced. | ||||
| as an array of struct cpumask) of CPUs, pairwise disjoint, that cover | ||||
| all the CPUs that must be load balanced. | ||||
| 
 | ||||
| Whenever the 'sched_load_balance' flag changes, or CPUs come or go | ||||
| from a cpuset with this flag enabled, or a cpuset with this flag | ||||
| enabled is removed, the cpuset code builds a new such partition and | ||||
| passes it to the scheduler sched domain setup code, to have the sched | ||||
| domains rebuilt as necessary. | ||||
| The cpuset code builds a new such partition and passes it to the | ||||
| scheduler sched domain setup code, to have the sched domains rebuilt | ||||
| as necessary, whenever: | ||||
|  - the 'sched_load_balance' flag of a cpuset with non-empty CPUs changes, | ||||
|  - or CPUs come or go from a cpuset with this flag enabled, | ||||
|  - or 'sched_relax_domain_level' value of a cpuset with non-empty CPUs | ||||
|    and with this flag enabled changes, | ||||
|  - or a cpuset with non-empty CPUs and with this flag enabled is removed, | ||||
|  - or a cpu is offlined/onlined. | ||||
| 
 | ||||
| This partition exactly defines what sched domains the scheduler should | ||||
| setup - one sched domain for each element (cpumask_t) in the partition. | ||||
| setup - one sched domain for each element (struct cpumask) in the | ||||
| partition. | ||||
| 
 | ||||
| The scheduler remembers the currently active sched domain partitions. | ||||
| When the scheduler routine partition_sched_domains() is invoked from | ||||
| @ -559,7 +568,7 @@ domain, the largest value among those is used.  Be careful, if one | ||||
| requests 0 and others are -1 then 0 is used. | ||||
| 
 | ||||
| Note that modifying this file will have both good and bad effects, | ||||
| and whether it is acceptable or not will be depend on your situation. | ||||
| and whether it is acceptable or not depends on your situation. | ||||
| Don't modify this file if you are not sure. | ||||
| 
 | ||||
| If your situation is: | ||||
| @ -600,19 +609,15 @@ to allocate a page of memory for that task. | ||||
| 
 | ||||
| If a cpuset has its 'cpus' modified, then each task in that cpuset | ||||
| will have its allowed CPU placement changed immediately.  Similarly, | ||||
| if a tasks pid is written to a cpusets 'tasks' file, in either its | ||||
| current cpuset or another cpuset, then its allowed CPU placement is | ||||
| changed immediately.  If such a task had been bound to some subset | ||||
| of its cpuset using the sched_setaffinity() call, the task will be | ||||
| allowed to run on any CPU allowed in its new cpuset, negating the | ||||
| affect of the prior sched_setaffinity() call. | ||||
| if a tasks pid is written to another cpusets 'tasks' file, then its | ||||
| allowed CPU placement is changed immediately.  If such a task had been | ||||
| bound to some subset of its cpuset using the sched_setaffinity() call, | ||||
| the task will be allowed to run on any CPU allowed in its new cpuset, | ||||
| negating the effect of the prior sched_setaffinity() call. | ||||
| 
 | ||||
| In summary, the memory placement of a task whose cpuset is changed is | ||||
| updated by the kernel, on the next allocation of a page for that task, | ||||
| but the processor placement is not updated, until that tasks pid is | ||||
| rewritten to the 'tasks' file of its cpuset.  This is done to avoid | ||||
| impacting the scheduler code in the kernel with a check for changes | ||||
| in a tasks processor placement. | ||||
| and the processor placement is updated immediately. | ||||
| 
 | ||||
| Normally, once a page is allocated (given a physical page | ||||
| of main memory) then that page stays on whatever node it | ||||
| @ -681,10 +686,14 @@ and then start a subshell 'sh' in that cpuset: | ||||
|   # The next line should display '/Charlie' | ||||
|   cat /proc/self/cpuset | ||||
| 
 | ||||
| In the future, a C library interface to cpusets will likely be | ||||
| available.  For now, the only way to query or modify cpusets is | ||||
| via the cpuset file system, using the various cd, mkdir, echo, cat, | ||||
| rmdir commands from the shell, or their equivalent from C. | ||||
| There are ways to query or modify cpusets: | ||||
|  - via the cpuset file system directly, using the various cd, mkdir, echo, | ||||
|    cat, rmdir commands from the shell, or their equivalent from C. | ||||
|  - via the C library libcpuset. | ||||
|  - via the C library libcgroup. | ||||
|    (http://sourceforge.net/proects/libcg/) | ||||
|  - via the python application cset. | ||||
|    (http://developer.novell.com/wiki/index.php/Cpuset) | ||||
| 
 | ||||
| The sched_setaffinity calls can also be done at the shell prompt using | ||||
| SGI's runon or Robert Love's taskset.  The mbind and set_mempolicy | ||||
| @ -756,7 +765,7 @@ mount -t cpuset X /dev/cpuset | ||||
| 
 | ||||
| is equivalent to | ||||
| 
 | ||||
| mount -t cgroup -ocpuset X /dev/cpuset | ||||
| mount -t cgroup -ocpuset,noprefix X /dev/cpuset | ||||
| echo "/sbin/cpuset_release_agent" > /dev/cpuset/release_agent | ||||
| 
 | ||||
| 2.2 Adding/removing cpus | ||||
|  | ||||
| @ -127,9 +127,11 @@ void unlock_device(struct device * dev); | ||||
| Attributes | ||||
| ~~~~~~~~~~ | ||||
| struct device_attribute { | ||||
|         struct attribute        attr; | ||||
|         ssize_t (*show)(struct device * dev, char * buf, size_t count, loff_t off); | ||||
|         ssize_t (*store)(struct device * dev, const char * buf, size_t count, loff_t off); | ||||
| 	struct attribute	attr; | ||||
| 	ssize_t (*show)(struct device *dev, struct device_attribute *attr, | ||||
| 			char *buf); | ||||
| 	ssize_t (*store)(struct device *dev, struct device_attribute *attr, | ||||
| 			 const char *buf, size_t count); | ||||
| }; | ||||
| 
 | ||||
| Attributes of devices can be exported via drivers using a simple | ||||
|  | ||||
| @ -1,205 +0,0 @@ | ||||
| This README escorted the skystar2-driver rewriting procedure. It describes the | ||||
| state of the new flexcop-driver set and some internals are written down here | ||||
| too. | ||||
| 
 | ||||
| This document hopefully describes things about the flexcop and its | ||||
| device-offsprings. Goal was to write an easy-to-write and easy-to-read set of | ||||
| drivers based on the skystar2.c and other information. | ||||
| 
 | ||||
| Remark: flexcop-pci.c was a copy of skystar2.c, but every line has been | ||||
| touched and rewritten. | ||||
| 
 | ||||
| History & News | ||||
| ============== | ||||
|   2005-04-01 - correct USB ISOC transfers (thanks to Vadim Catana) | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| General coding processing | ||||
| ========================= | ||||
| 
 | ||||
| We should proceed as follows (as long as no one complains): | ||||
| 
 | ||||
| 0) Think before start writing code! | ||||
| 
 | ||||
| 1) rewriting the skystar2.c with the help of the flexcop register descriptions | ||||
| and splitting up the files to a pci-bus-part and a flexcop-part. | ||||
| The new driver will be called b2c2-flexcop-pci.ko/b2c2-flexcop-usb.ko for the | ||||
| device-specific part and b2c2-flexcop.ko for the common flexcop-functions. | ||||
| 
 | ||||
| 2) Search for errors in the leftover of flexcop-pci.c (compare with pluto2.c | ||||
| and other pci drivers) | ||||
| 
 | ||||
| 3) make some beautification (see 'Improvements when rewriting (refactoring) is | ||||
| done') | ||||
| 
 | ||||
| 4) Testing the new driver and maybe substitute the skystar2.c with it, to reach | ||||
| a wider tester audience. | ||||
| 
 | ||||
| 5) creating an usb-bus-part using the already written flexcop code for the pci | ||||
| card. | ||||
| 
 | ||||
| Idea: create a kernel-object for the flexcop and export all important | ||||
| functions. This option saves kernel-memory, but maybe a lot of functions have | ||||
| to be exported to kernel namespace. | ||||
| 
 | ||||
| 
 | ||||
| Current situation | ||||
| ================= | ||||
| 
 | ||||
| 0) Done :) | ||||
| 1) Done (some minor issues left) | ||||
| 2) Done | ||||
| 3) Not ready yet, more information is necessary | ||||
| 4) next to be done (see the table below) | ||||
| 5) USB driver is working (yes, there are some minor issues) | ||||
| 
 | ||||
| What seems to be ready? | ||||
| ----------------------- | ||||
| 
 | ||||
| 1) Rewriting | ||||
| 1a) i2c is cut off from the flexcop-pci.c and seems to work | ||||
| 1b) moved tuner and demod stuff from flexcop-pci.c to flexcop-tuner-fe.c | ||||
| 1c) moved lnb and diseqc stuff from flexcop-pci.c to flexcop-tuner-fe.c | ||||
| 1e) eeprom (reading MAC address) | ||||
| 1d) sram (no dynamic sll size detection (commented out) (using default as JJ told me)) | ||||
| 1f) misc. register accesses for reading parameters (e.g. resetting, revision) | ||||
| 1g) pid/mac filter (flexcop-hw-filter.c) | ||||
| 1i) dvb-stuff initialization in flexcop.c (done) | ||||
| 1h) dma stuff (now just using the size-irq, instead of all-together, to be done) | ||||
| 1j) remove flexcop initialization from flexcop-pci.c completely (done) | ||||
| 1l) use a well working dma IRQ method (done, see 'Known bugs and problems and TODO') | ||||
| 1k) cleanup flexcop-files (remove unused EXPORT_SYMBOLs, make static from | ||||
| non-static where possible, moved code to proper places) | ||||
| 
 | ||||
| 2) Search for errors in the leftover of flexcop-pci.c (partially done) | ||||
| 5a) add MAC address reading | ||||
| 5c) feeding of ISOC data to the software demux (format of the isochronous data | ||||
| and speed optimization, no real error) (thanks to Vadim Catana) | ||||
| 
 | ||||
| What to do in the near future? | ||||
| -------------------------------------- | ||||
| (no special order here) | ||||
| 
 | ||||
| 5) USB driver | ||||
| 5b) optimize isoc-transfer (submitting/killing isoc URBs when transfer is starting) | ||||
| 
 | ||||
| Testing changes | ||||
| --------------- | ||||
| 
 | ||||
| O             = item is working | ||||
| P             = item is partially working | ||||
| X             = item is not working | ||||
| N             = item does not apply here | ||||
| <empty field> = item need to be examined | ||||
| 
 | ||||
|        | PCI                               | USB | ||||
| item   | mt352 | nxt2002 | stv0299 | mt312 | mt352 | nxt2002 | stv0299 | mt312 | ||||
| -------+-------+---------+---------+-------+-------+---------+---------+------- | ||||
| 1a)    | O     |         |         |       | N     | N       | N       | N | ||||
| 1b)    | O     |         |         |       |       |         | O       | | ||||
| 1c)    | N     | N       |         |       | N     | N       | O       | | ||||
| 1d)    |                 O                 |                 O | ||||
| 1e)    |                 O                 |                 O | ||||
| 1f)    |                                   P | ||||
| 1g)    |                                   O | ||||
| 1h)    |                 P                 | | ||||
| 1i)    |                 O                 |                 N | ||||
| 1j)    |                 O                 |                 N | ||||
| 1l)    |                 O                 |                 N | ||||
| 2)     |                 O                 |                 N | ||||
| 5a)    |                 N                 |                 O | ||||
| 5b)*   |                 N                 | | ||||
| 5c)    |                 N                 |                 O | ||||
| 
 | ||||
| * - not done yet | ||||
| 
 | ||||
| Known bugs and problems and TODO | ||||
| -------------------------------- | ||||
| 
 | ||||
| 1g/h/l) when pid filtering is enabled on the pci card | ||||
| 
 | ||||
| DMA usage currently: | ||||
|   The DMA is splitted in 2 equal-sized subbuffers. The Flexcop writes to first | ||||
|   address and triggers an IRQ when it's full and starts writing to the second | ||||
|   address. When the second address is full, the IRQ is triggered again, and | ||||
|   the flexcop writes to first address again, and so on. | ||||
|   The buffersize of each address is currently 640*188 bytes. | ||||
| 
 | ||||
|   Problem is, when using hw-pid-filtering and doing some low-bandwidth | ||||
|   operation (like scanning) the buffers won't be filled enough to trigger | ||||
|   the IRQ. That's why: | ||||
| 
 | ||||
|   When PID filtering is activated, the timer IRQ is used. Every 1.97 ms the IRQ | ||||
|   is triggered.  Is the current write address of DMA1 different to the one | ||||
|   during the last IRQ, then the data is passed to the demuxer. | ||||
| 
 | ||||
|   There is an additional DMA-IRQ-method: packet count IRQ. This isn't | ||||
|   implemented correctly yet. | ||||
| 
 | ||||
|   The solution is to disable HW PID filtering, but I don't know how the DVB | ||||
|   API software demux behaves on slow systems with 45MBit/s TS. | ||||
| 
 | ||||
| Solved bugs :) | ||||
| -------------- | ||||
| 1g) pid-filtering (somehow pid index 4 and 5 (EMM_PID and ECM_PID) aren't | ||||
| working) | ||||
| SOLUTION: also index 0 was affected, because net_translation is done for | ||||
| these indexes by default | ||||
| 
 | ||||
| 5b) isochronous transfer does only work in the first attempt (for the Sky2PC | ||||
| USB, Air2PC is working) SOLUTION: the flexcop was going asleep and never really | ||||
| woke up again (don't know if this need fixes, see | ||||
| flexcop-fe-tuner.c:flexcop_sleep) | ||||
| 
 | ||||
| NEWS: when the driver is loaded and unloaded and loaded again (w/o doing | ||||
| anything in the while the driver is loaded the first time), no transfers take | ||||
| place anymore. | ||||
| 
 | ||||
| Improvements when rewriting (refactoring) is done | ||||
| ================================================= | ||||
| 
 | ||||
| - split sleeping of the flexcop (misc_204.ACPI3_sig = 1;) from lnb_control | ||||
|   (enable sleeping for other demods than dvb-s) | ||||
| - add support for CableStar (stv0297 Microtune 203x/ALPS) (almost done, incompatibilities with the Nexus-CA) | ||||
| 
 | ||||
| Debugging | ||||
| --------- | ||||
| - add verbose debugging to skystar2.c (dump the reg_dw_data) and compare it | ||||
|   with this flexcop, this is important, because i2c is now using the | ||||
|   flexcop_ibi_value union from flexcop-reg.h (do you have a better idea for | ||||
|   that, please tell us so). | ||||
| 
 | ||||
| Everything which is identical in the following table, can be put into a common | ||||
| flexcop-module. | ||||
| 
 | ||||
| 		  PCI                  USB | ||||
| ------------------------------------------------------------------------------- | ||||
| Different: | ||||
| Register access:  accessing IO memory  USB control message | ||||
| I2C bus:          I2C bus of the FC    USB control message | ||||
| Data transfer:    DMA                  isochronous transfer | ||||
| EEPROM transfer:  through i2c bus      not clear yet | ||||
| 
 | ||||
| Identical: | ||||
| Streaming:                 accessing registers | ||||
| PID Filtering:             accessing registers | ||||
| Sram destinations:         accessing registers | ||||
| Tuner/Demod:                     I2C bus | ||||
| DVB-stuff:            can be written for common use | ||||
| 
 | ||||
| Acknowledgements (just for the rewriting part) | ||||
| ================ | ||||
| 
 | ||||
| Bjarne Steinsbo thought a lot in the first place of the pci part for this code | ||||
| sharing idea. | ||||
| 
 | ||||
| Andreas Oberritter for providing a recent PCI initialization template | ||||
| (pluto2.c). | ||||
| 
 | ||||
| Boleslaw Ciesielski for pointing out a problem with firmware loader. | ||||
| 
 | ||||
| Vadim Catana for correcting the USB transfer. | ||||
| 
 | ||||
| comments, critics and ideas to linux-dvb@linuxtv.org. | ||||
| @ -1,5 +1,5 @@ | ||||
| How to set up the Technisat devices | ||||
| =================================== | ||||
| How to set up the Technisat/B2C2 Flexcop devices | ||||
| ================================================ | ||||
| 
 | ||||
| 1) Find out what device you have | ||||
| ================================ | ||||
| @ -16,54 +16,60 @@ DVB: registering frontend 0 (Conexant CX24123/CX24109)... | ||||
| 
 | ||||
| If the Technisat is the only TV device in your box get rid of unnecessary modules and check this one: | ||||
| "Multimedia devices" => "Customise analog and hybrid tuner modules to build" | ||||
| In this directory uncheck every driver which is activated there. | ||||
| In this directory uncheck every driver which is activated there (except "Simple tuner support" for case 9 only). | ||||
| 
 | ||||
| Then please activate: | ||||
| 2a) Main module part: | ||||
| 
 | ||||
| a.)"Multimedia devices" => "DVB/ATSC adapters" => "Technisat/B2C2 FlexcopII(b) and FlexCopIII adapters" | ||||
| b.)"Multimedia devices" => "DVB/ATSC adapters" => "Technisat/B2C2 FlexcopII(b) and FlexCopIII adapters" => "Technisat/B2C2 Air/Sky/Cable2PC PCI" in case of a PCI card OR | ||||
| b.)"Multimedia devices" => "DVB/ATSC adapters" => "Technisat/B2C2 FlexcopII(b) and FlexCopIII adapters" => "Technisat/B2C2 Air/Sky/Cable2PC PCI" in case of a PCI card | ||||
| OR | ||||
| c.)"Multimedia devices" => "DVB/ATSC adapters" => "Technisat/B2C2 FlexcopII(b) and FlexCopIII adapters" => "Technisat/B2C2 Air/Sky/Cable2PC USB" in case of an USB 1.1 adapter | ||||
| d.)"Multimedia devices" => "DVB/ATSC adapters" => "Technisat/B2C2 FlexcopII(b) and FlexCopIII adapters" => "Enable debug for the B2C2 FlexCop drivers" | ||||
| Notice: d.) is helpful for troubleshooting | ||||
| 
 | ||||
| 2b) Frontend module part: | ||||
| 
 | ||||
| 1.) Revision 2.3: | ||||
| 1.) SkyStar DVB-S Revision 2.3: | ||||
| a.)"Multimedia devices" => "Customise DVB frontends" => "Customise the frontend modules to build" | ||||
| b.)"Multimedia devices" => "Customise DVB frontends" => "Zarlink VP310/MT312/ZL10313 based" | ||||
| 
 | ||||
| 2.) Revision 2.6: | ||||
| 2.) SkyStar DVB-S Revision 2.6: | ||||
| a.)"Multimedia devices" => "Customise DVB frontends" => "Customise the frontend modules to build" | ||||
| b.)"Multimedia devices" => "Customise DVB frontends" => "ST STV0299 based" | ||||
| 
 | ||||
| 3.) Revision 2.7: | ||||
| 3.) SkyStar DVB-S Revision 2.7: | ||||
| a.)"Multimedia devices" => "Customise DVB frontends" => "Customise the frontend modules to build" | ||||
| b.)"Multimedia devices" => "Customise DVB frontends" => "Samsung S5H1420 based" | ||||
| c.)"Multimedia devices" => "Customise DVB frontends" => "Integrant ITD1000 Zero IF tuner for DVB-S/DSS" | ||||
| d.)"Multimedia devices" => "Customise DVB frontends" => "ISL6421 SEC controller" | ||||
| 
 | ||||
| 4.) Revision 2.8: | ||||
| 4.) SkyStar DVB-S Revision 2.8: | ||||
| a.)"Multimedia devices" => "Customise DVB frontends" => "Customise the frontend modules to build" | ||||
| b.)"Multimedia devices" => "Customise DVB frontends" => "Conexant CX24113/CX24128 tuner for DVB-S/DSS" | ||||
| c.)"Multimedia devices" => "Customise DVB frontends" => "Conexant CX24123 based" | ||||
| d.)"Multimedia devices" => "Customise DVB frontends" => "ISL6421 SEC controller" | ||||
| 
 | ||||
| 5.) DVB-T card: | ||||
| 5.) AirStar DVB-T card: | ||||
| a.)"Multimedia devices" => "Customise DVB frontends" => "Customise the frontend modules to build" | ||||
| b.)"Multimedia devices" => "Customise DVB frontends" => "Zarlink MT352 based" | ||||
| 
 | ||||
| 6.) DVB-C card: | ||||
| 6.) CableStar DVB-C card: | ||||
| a.)"Multimedia devices" => "Customise DVB frontends" => "Customise the frontend modules to build" | ||||
| b.)"Multimedia devices" => "Customise DVB frontends" => "ST STV0297 based" | ||||
| 
 | ||||
| 7.) ATSC card 1st generation: | ||||
| 7.) AirStar ATSC card 1st generation: | ||||
| a.)"Multimedia devices" => "Customise DVB frontends" => "Customise the frontend modules to build" | ||||
| b.)"Multimedia devices" => "Customise DVB frontends" => "Broadcom BCM3510" | ||||
| 
 | ||||
| 8.) ATSC card 2nd generation: | ||||
| 8.) AirStar ATSC card 2nd generation: | ||||
| a.)"Multimedia devices" => "Customise DVB frontends" => "Customise the frontend modules to build" | ||||
| b.)"Multimedia devices" => "Customise DVB frontends" => "NxtWave Communications NXT2002/NXT2004 based" | ||||
| c.)"Multimedia devices" => "Customise DVB frontends" => "LG Electronics LGDT3302/LGDT3303 based" | ||||
| c.)"Multimedia devices" => "Customise DVB frontends" => "Generic I2C PLL based tuners" | ||||
| 
 | ||||
| Author: Uwe Bugla <uwe.bugla@gmx.de> December 2008 | ||||
| 9.) AirStar ATSC card 3rd generation: | ||||
| a.)"Multimedia devices" => "Customise DVB frontends" => "Customise the frontend modules to build" | ||||
| b.)"Multimedia devices" => "Customise DVB frontends" => "LG Electronics LGDT3302/LGDT3303 based" | ||||
| c.)"Multimedia devices" => "Customise analog and hybrid tuner modules to build" => "Simple tuner support" | ||||
| 
 | ||||
| Author: Uwe Bugla <uwe.bugla@gmx.de> February 2009 | ||||
|  | ||||
| @ -335,3 +335,12 @@ Why:	In 2.6.18 the Secmark concept was introduced to replace the "compat_net" | ||||
| 	Secmark, it is time to deprecate the older mechanism and start the | ||||
| 	process of removing the old code. | ||||
| Who:	Paul Moore <paul.moore@hp.com> | ||||
| --------------------------- | ||||
| 
 | ||||
| What:	sysfs ui for changing p4-clockmod parameters | ||||
| When:	September 2009 | ||||
| Why:	See commits 129f8ae9b1b5be94517da76009ea956e89104ce8 and | ||||
| 	e088e4c9cdb618675874becb91b2fd581ee707e6. | ||||
| 	Removal is subject to fixing any remaining bugs in ACPI which may | ||||
| 	cause the thermal throttling not to happen at the right time. | ||||
| Who:	Dave Jones <davej@redhat.com>, Matthew Garrett <mjg@redhat.com> | ||||
|  | ||||
| @ -22,7 +22,7 @@ Squashfs filesystem features versus Cramfs: | ||||
| 
 | ||||
| 				Squashfs		Cramfs | ||||
| 
 | ||||
| Max filesystem size:		2^64			16 MiB | ||||
| Max filesystem size:		2^64			256 MiB | ||||
| Max file size:			~ 2 TiB			16 MiB | ||||
| Max files:			unlimited		unlimited | ||||
| Max directories:		unlimited		unlimited | ||||
|  | ||||
| @ -2,8 +2,10 @@ | ||||
| sysfs - _The_ filesystem for exporting kernel objects.  | ||||
| 
 | ||||
| Patrick Mochel	<mochel@osdl.org> | ||||
| Mike Murphy <mamurph@cs.clemson.edu> | ||||
| 
 | ||||
| 10 January 2003 | ||||
| Revised:    22 February 2009 | ||||
| Original:   10 January 2003 | ||||
| 
 | ||||
| 
 | ||||
| What it is: | ||||
| @ -64,12 +66,13 @@ An attribute definition is simply: | ||||
| 
 | ||||
| struct attribute { | ||||
|         char                    * name; | ||||
|         struct module		*owner; | ||||
|         mode_t                  mode; | ||||
| }; | ||||
| 
 | ||||
| 
 | ||||
| int sysfs_create_file(struct kobject * kobj, struct attribute * attr); | ||||
| void sysfs_remove_file(struct kobject * kobj, struct attribute * attr); | ||||
| int sysfs_create_file(struct kobject * kobj, const struct attribute * attr); | ||||
| void sysfs_remove_file(struct kobject * kobj, const struct attribute * attr); | ||||
| 
 | ||||
| 
 | ||||
| A bare attribute contains no means to read or write the value of the | ||||
| @ -80,9 +83,11 @@ a specific object type. | ||||
| For example, the driver model defines struct device_attribute like: | ||||
| 
 | ||||
| struct device_attribute { | ||||
|         struct attribute        attr; | ||||
|         ssize_t (*show)(struct device * dev, char * buf); | ||||
|         ssize_t (*store)(struct device * dev, const char * buf); | ||||
| 	struct attribute	attr; | ||||
| 	ssize_t (*show)(struct device *dev, struct device_attribute *attr, | ||||
| 			char *buf); | ||||
| 	ssize_t (*store)(struct device *dev, struct device_attribute *attr, | ||||
| 			 const char *buf, size_t count); | ||||
| }; | ||||
| 
 | ||||
| int device_create_file(struct device *, struct device_attribute *); | ||||
| @ -90,12 +95,8 @@ void device_remove_file(struct device *, struct device_attribute *); | ||||
| 
 | ||||
| It also defines this helper for defining device attributes:  | ||||
| 
 | ||||
| #define DEVICE_ATTR(_name, _mode, _show, _store)      \ | ||||
| struct device_attribute dev_attr_##_name = {            \ | ||||
|         .attr = {.name  = __stringify(_name) , .mode   = _mode },      \ | ||||
|         .show   = _show,                                \ | ||||
|         .store  = _store,                               \ | ||||
| }; | ||||
| #define DEVICE_ATTR(_name, _mode, _show, _store) \ | ||||
| struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store) | ||||
| 
 | ||||
| For example, declaring | ||||
| 
 | ||||
| @ -107,9 +108,9 @@ static struct device_attribute dev_attr_foo = { | ||||
|        .attr	= { | ||||
| 		.name = "foo", | ||||
| 		.mode = S_IWUSR | S_IRUGO, | ||||
| 		.show = show_foo, | ||||
| 		.store = store_foo, | ||||
| 	}, | ||||
| 	.show = show_foo, | ||||
| 	.store = store_foo, | ||||
| }; | ||||
| 
 | ||||
| 
 | ||||
| @ -161,10 +162,12 @@ To read or write attributes, show() or store() methods must be | ||||
| specified when declaring the attribute. The method types should be as | ||||
| simple as those defined for device attributes: | ||||
| 
 | ||||
|         ssize_t (*show)(struct device * dev, char * buf); | ||||
|         ssize_t (*store)(struct device * dev, const char * buf); | ||||
| ssize_t (*show)(struct device * dev, struct device_attribute * attr, | ||||
|                 char * buf); | ||||
| ssize_t (*store)(struct device * dev, struct device_attribute * attr, | ||||
|                  const char * buf); | ||||
| 
 | ||||
| IOW, they should take only an object and a buffer as parameters.  | ||||
| IOW, they should take only an object, an attribute, and a buffer as parameters. | ||||
| 
 | ||||
| 
 | ||||
| sysfs allocates a buffer of size (PAGE_SIZE) and passes it to the | ||||
| @ -299,14 +302,16 @@ The following interface layers currently exist in sysfs: | ||||
| Structure: | ||||
| 
 | ||||
| struct device_attribute { | ||||
|         struct attribute        attr; | ||||
|         ssize_t (*show)(struct device * dev, char * buf); | ||||
|         ssize_t (*store)(struct device * dev, const char * buf); | ||||
| 	struct attribute	attr; | ||||
| 	ssize_t (*show)(struct device *dev, struct device_attribute *attr, | ||||
| 			char *buf); | ||||
| 	ssize_t (*store)(struct device *dev, struct device_attribute *attr, | ||||
| 			 const char *buf, size_t count); | ||||
| }; | ||||
| 
 | ||||
| Declaring: | ||||
| 
 | ||||
| DEVICE_ATTR(_name, _str, _mode, _show, _store); | ||||
| DEVICE_ATTR(_name, _mode, _show, _store); | ||||
| 
 | ||||
| Creation/Removal: | ||||
| 
 | ||||
| @ -342,7 +347,8 @@ Structure: | ||||
| struct driver_attribute { | ||||
|         struct attribute        attr; | ||||
|         ssize_t (*show)(struct device_driver *, char * buf); | ||||
|         ssize_t (*store)(struct device_driver *, const char * buf); | ||||
|         ssize_t (*store)(struct device_driver *, const char * buf, | ||||
|                          size_t count); | ||||
| }; | ||||
| 
 | ||||
| Declaring: | ||||
|  | ||||
							
								
								
									
										101
									
								
								Documentation/hwmon/hpfall.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										101
									
								
								Documentation/hwmon/hpfall.c
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,101 @@ | ||||
| /* Disk protection for HP machines.
 | ||||
|  * | ||||
|  * Copyright 2008 Eric Piel | ||||
|  * Copyright 2009 Pavel Machek <pavel@suse.cz> | ||||
|  * | ||||
|  * GPLv2. | ||||
|  */ | ||||
| 
 | ||||
| #include <stdio.h> | ||||
| #include <stdlib.h> | ||||
| #include <unistd.h> | ||||
| #include <fcntl.h> | ||||
| #include <sys/stat.h> | ||||
| #include <sys/types.h> | ||||
| #include <string.h> | ||||
| #include <stdint.h> | ||||
| #include <errno.h> | ||||
| #include <signal.h> | ||||
| 
 | ||||
| void write_int(char *path, int i) | ||||
| { | ||||
| 	char buf[1024]; | ||||
| 	int fd = open(path, O_RDWR); | ||||
| 	if (fd < 0) { | ||||
| 		perror("open"); | ||||
| 		exit(1); | ||||
| 	} | ||||
| 	sprintf(buf, "%d", i); | ||||
| 	if (write(fd, buf, strlen(buf)) != strlen(buf)) { | ||||
| 		perror("write"); | ||||
| 		exit(1); | ||||
| 	} | ||||
| 	close(fd); | ||||
| } | ||||
| 
 | ||||
| void set_led(int on) | ||||
| { | ||||
| 	write_int("/sys/class/leds/hp::hddprotect/brightness", on); | ||||
| } | ||||
| 
 | ||||
| void protect(int seconds) | ||||
| { | ||||
| 	write_int("/sys/block/sda/device/unload_heads", seconds*1000); | ||||
| } | ||||
| 
 | ||||
| int on_ac(void) | ||||
| { | ||||
| //	/sys/class/power_supply/AC0/online
 | ||||
| } | ||||
| 
 | ||||
| int lid_open(void) | ||||
| { | ||||
| //	/proc/acpi/button/lid/LID/state
 | ||||
| } | ||||
| 
 | ||||
| void ignore_me(void) | ||||
| { | ||||
| 	protect(0); | ||||
| 	set_led(0); | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| int main(int argc, char* argv[]) | ||||
| { | ||||
|        int fd, ret; | ||||
| 
 | ||||
|        fd = open("/dev/freefall", O_RDONLY); | ||||
|        if (fd < 0) { | ||||
|                perror("open"); | ||||
|                return EXIT_FAILURE; | ||||
|        } | ||||
| 
 | ||||
| 	signal(SIGALRM, ignore_me); | ||||
| 
 | ||||
|        for (;;) { | ||||
| 	       unsigned char count; | ||||
| 
 | ||||
|                ret = read(fd, &count, sizeof(count)); | ||||
| 	       alarm(0); | ||||
| 	       if ((ret == -1) && (errno == EINTR)) { | ||||
| 		       /* Alarm expired, time to unpark the heads */ | ||||
| 		       continue; | ||||
| 	       } | ||||
| 
 | ||||
|                if (ret != sizeof(count)) { | ||||
|                        perror("read"); | ||||
|                        break; | ||||
|                } | ||||
| 
 | ||||
| 	       protect(21); | ||||
| 	       set_led(1); | ||||
| 	       if (1 || on_ac() || lid_open()) { | ||||
| 		       alarm(2); | ||||
| 	       } else { | ||||
| 		       alarm(20); | ||||
| 	       } | ||||
|        } | ||||
| 
 | ||||
|        close(fd); | ||||
|        return EXIT_SUCCESS; | ||||
| } | ||||
| @ -33,6 +33,14 @@ rate - reports the sampling rate of the accelerometer device in HZ | ||||
| This driver also provides an absolute input class device, allowing | ||||
| the laptop to act as a pinball machine-esque joystick. | ||||
| 
 | ||||
| Another feature of the driver is misc device called "freefall" that | ||||
| acts similar to /dev/rtc and reacts on free-fall interrupts received | ||||
| from the device. It supports blocking operations, poll/select and | ||||
| fasync operation modes. You must read 1 bytes from the device.  The | ||||
| result is number of free-fall interrupts since the last successful | ||||
| read (or 255 if number of interrupts would not fit). | ||||
| 
 | ||||
| 
 | ||||
| Axes orientation | ||||
| ---------------- | ||||
| 
 | ||||
|  | ||||
| @ -114,7 +114,7 @@ In addition, the following text indicates that the option: | ||||
| Parameters denoted with BOOT are actually interpreted by the boot | ||||
| loader, and have no meaning to the kernel directly. | ||||
| Do not modify the syntax of boot loader parameters without extreme | ||||
| need or coordination with <Documentation/x86/i386/boot.txt>. | ||||
| need or coordination with <Documentation/x86/boot.txt>. | ||||
| 
 | ||||
| There are also arch-specific kernel-parameters not documented here. | ||||
| See for example <Documentation/x86/x86_64/boot-options.txt>. | ||||
| @ -134,7 +134,7 @@ and is between 256 and 4096 characters. It is defined in the file | ||||
| 
 | ||||
| 	acpi=		[HW,ACPI,X86-64,i386] | ||||
| 			Advanced Configuration and Power Interface | ||||
| 			Format: { force | off | ht | strict | noirq } | ||||
| 			Format: { force | off | ht | strict | noirq | rsdt } | ||||
| 			force -- enable ACPI if default was off | ||||
| 			off -- disable ACPI if default was on | ||||
| 			noirq -- do not use ACPI for IRQ routing | ||||
| @ -868,8 +868,10 @@ and is between 256 and 4096 characters. It is defined in the file | ||||
| 	icn=		[HW,ISDN] | ||||
| 			Format: <io>[,<membase>[,<icn_id>[,<icn_id2>]]] | ||||
| 
 | ||||
| 	ide=		[HW] (E)IDE subsystem | ||||
| 			Format: ide=nodma or ide=doubler | ||||
| 	ide-core.nodma=	[HW] (E)IDE subsystem | ||||
| 			Format: =0.0 to prevent dma on hda, =0.1 hdb =1.0 hdc | ||||
| 			.vlb_clock .pci_clock .noflush .noprobe .nowerr .cdrom | ||||
| 			.chs .ignore_cable are additional options | ||||
| 			See Documentation/ide/ide.txt. | ||||
| 
 | ||||
| 	idebus=		[HW] (E)IDE subsystem - VLB/PCI bus speed | ||||
| @ -2449,7 +2451,7 @@ and is between 256 and 4096 characters. It is defined in the file | ||||
| 			See Documentation/fb/modedb.txt. | ||||
| 
 | ||||
| 	vga=		[BOOT,X86-32] Select a particular video mode | ||||
| 			See Documentation/x86/i386/boot.txt and | ||||
| 			See Documentation/x86/boot.txt and | ||||
| 			Documentation/svga.txt. | ||||
| 			Use vga=ask for menu. | ||||
| 			This is actually a boot loader parameter; the value is | ||||
|  | ||||
							
								
								
									
										35
									
								
								Documentation/networking/ipv6.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								Documentation/networking/ipv6.txt
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,35 @@ | ||||
| 
 | ||||
| Options for the ipv6 module are supplied as parameters at load time. | ||||
| 
 | ||||
| Module options may be given as command line arguments to the insmod | ||||
| or modprobe command, but are usually specified in either the | ||||
| /etc/modules.conf or /etc/modprobe.conf configuration file, or in a | ||||
| distro-specific configuration file. | ||||
| 
 | ||||
| The available ipv6 module parameters are listed below.  If a parameter | ||||
| is not specified the default value is used. | ||||
| 
 | ||||
| The parameters are as follows: | ||||
| 
 | ||||
| disable | ||||
| 
 | ||||
| 	Specifies whether to load the IPv6 module, but disable all | ||||
| 	its functionality.  This might be used when another module | ||||
| 	has a dependency on the IPv6 module being loaded, but no | ||||
| 	IPv6 addresses or operations are desired. | ||||
| 
 | ||||
| 	The possible values and their effects are: | ||||
| 
 | ||||
| 	0 | ||||
| 		IPv6 is enabled. | ||||
| 
 | ||||
| 		This is the default value. | ||||
| 
 | ||||
| 	1 | ||||
| 		IPv6 is disabled. | ||||
| 
 | ||||
| 		No IPv6 addresses will be added to interfaces, and | ||||
| 		it will not be possible to open an IPv6 socket. | ||||
| 
 | ||||
| 		A reboot is required to enable IPv6. | ||||
| 
 | ||||
| @ -4,7 +4,7 @@ Introduction | ||||
| ============ | ||||
| 
 | ||||
| The Chelsio T3 ASIC based Adapters (S310, S320, S302, S304, Mezz cards, etc. | ||||
| series of products) supports iSCSI acceleration and iSCSI Direct Data Placement | ||||
| series of products) support iSCSI acceleration and iSCSI Direct Data Placement | ||||
| (DDP) where the hardware handles the expensive byte touching operations, such | ||||
| as CRC computation and verification, and direct DMA to the final host memory | ||||
| destination: | ||||
| @ -31,9 +31,9 @@ destination: | ||||
| 	  the TCP segments onto the wire. It handles TCP retransmission if | ||||
| 	  needed. | ||||
| 
 | ||||
| 	  On receving, S3 h/w recovers the iSCSI PDU by reassembling TCP | ||||
| 	  On receiving, S3 h/w recovers the iSCSI PDU by reassembling TCP | ||||
| 	  segments, separating the header and data, calculating and verifying | ||||
| 	  the digests, then forwards the header to the host. The payload data, | ||||
| 	  the digests, then forwarding the header to the host. The payload data, | ||||
| 	  if possible, will be directly placed into the pre-posted host DDP | ||||
| 	  buffer. Otherwise, the payload data will be sent to the host too. | ||||
| 
 | ||||
| @ -68,9 +68,8 @@ The following steps need to be taken to accelerates the open-iscsi initiator: | ||||
| 	sure the ip address is unique in the network. | ||||
| 
 | ||||
| 3. edit /etc/iscsi/iscsid.conf | ||||
|    The default setting for MaxRecvDataSegmentLength (131072) is too big, | ||||
|    replace "node.conn[0].iscsi.MaxRecvDataSegmentLength" to be a value no | ||||
|    bigger than 15360 (for example 8192): | ||||
|    The default setting for MaxRecvDataSegmentLength (131072) is too big; | ||||
|    replace with a value no bigger than 15360 (for example 8192): | ||||
| 
 | ||||
| 	node.conn[0].iscsi.MaxRecvDataSegmentLength = 8192 | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										17
									
								
								MAINTAINERS
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								MAINTAINERS
									
									
									
									
									
								
							| @ -692,6 +692,13 @@ M:	kernel@wantstofly.org | ||||
| L:	linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) | ||||
| S:	Maintained | ||||
| 
 | ||||
| ARM/NUVOTON W90X900 ARM ARCHITECTURE | ||||
| P:      Wan ZongShun | ||||
| M:      mcuos.com@gmail.com | ||||
| L:      linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) | ||||
| W:      http://www.mcuos.com | ||||
| S:      Maintained | ||||
| 
 | ||||
| ARPD SUPPORT | ||||
| P:	Jonathan Layes | ||||
| L:	netdev@vger.kernel.org | ||||
| @ -2001,7 +2008,7 @@ S:	Maintained | ||||
| 
 | ||||
| HIBERNATION (aka Software Suspend, aka swsusp) | ||||
| P:	Pavel Machek | ||||
| M:	pavel@suse.cz | ||||
| M:	pavel@ucw.cz | ||||
| P:	Rafael J. Wysocki | ||||
| M:	rjw@sisk.pl | ||||
| L:	linux-pm@lists.linux-foundation.org | ||||
| @ -2457,7 +2464,7 @@ S:	Maintained | ||||
| 
 | ||||
| ISDN SUBSYSTEM | ||||
| P:	Karsten Keil | ||||
| M:	kkeil@suse.de | ||||
| M:	isdn@linux-pingi.de | ||||
| L:	isdn4linux@listserv.isdn4linux.de (subscribers-only) | ||||
| W:	http://www.isdn4linux.de | ||||
| T:	git kernel.org:/pub/scm/linux/kernel/kkeil/isdn-2.6.git | ||||
| @ -3327,8 +3334,8 @@ P:	Jeremy Fitzhardinge | ||||
| M:	jeremy@xensource.com | ||||
| P:	Chris Wright | ||||
| M:	chrisw@sous-sol.org | ||||
| P:	Zachary Amsden | ||||
| M:	zach@vmware.com | ||||
| P:	Alok Kataria | ||||
| M:	akataria@vmware.com | ||||
| P:	Rusty Russell | ||||
| M:	rusty@rustcorp.com.au | ||||
| L:	virtualization@lists.osdl.org | ||||
| @ -4172,7 +4179,7 @@ SUSPEND TO RAM | ||||
| P:	Len Brown | ||||
| M:	len.brown@intel.com | ||||
| P:	Pavel Machek | ||||
| M:	pavel@suse.cz | ||||
| M:	pavel@ucw.cz | ||||
| P:	Rafael J. Wysocki | ||||
| M:	rjw@sisk.pl | ||||
| L:	linux-pm@lists.linux-foundation.org | ||||
|  | ||||
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							| @ -1,7 +1,7 @@ | ||||
| VERSION = 2 | ||||
| PATCHLEVEL = 6 | ||||
| SUBLEVEL = 29 | ||||
| EXTRAVERSION = -rc5 | ||||
| EXTRAVERSION = -rc7 | ||||
| NAME = Erotic Pickled Herring | ||||
| 
 | ||||
| # *DOCUMENTATION*
 | ||||
|  | ||||
							
								
								
									
										2
									
								
								README
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								README
									
									
									
									
									
								
							| @ -188,7 +188,7 @@ CONFIGURING the kernel: | ||||
| 			   values to random values. | ||||
| 
 | ||||
|    You can find more information on using the Linux kernel config tools | ||||
|    in Documentation/kbuild/make-configs.txt. | ||||
|    in Documentation/kbuild/kconfig.txt. | ||||
| 
 | ||||
| 	NOTES on "make config": | ||||
| 	- having unnecessary drivers will make the kernel bigger, and can | ||||
|  | ||||
| @ -608,7 +608,7 @@ CONFIG_WATCHDOG_NOWAYOUT=y | ||||
| # Watchdog Device Drivers | ||||
| # | ||||
| # CONFIG_SOFT_WATCHDOG is not set | ||||
| CONFIG_AT91SAM9_WATCHDOG=y | ||||
| CONFIG_AT91SAM9X_WATCHDOG=y | ||||
| 
 | ||||
| # | ||||
| # USB-based Watchdog Cards | ||||
|  | ||||
| @ -700,7 +700,7 @@ CONFIG_WATCHDOG_NOWAYOUT=y | ||||
| # Watchdog Device Drivers | ||||
| # | ||||
| # CONFIG_SOFT_WATCHDOG is not set | ||||
| CONFIG_AT91SAM9_WATCHDOG=y | ||||
| CONFIG_AT91SAM9X_WATCHDOG=y | ||||
| 
 | ||||
| # | ||||
| # USB-based Watchdog Cards | ||||
|  | ||||
| @ -710,7 +710,7 @@ CONFIG_WATCHDOG_NOWAYOUT=y | ||||
| # Watchdog Device Drivers | ||||
| # | ||||
| # CONFIG_SOFT_WATCHDOG is not set | ||||
| CONFIG_AT91SAM9_WATCHDOG=y | ||||
| CONFIG_AT91SAM9X_WATCHDOG=y | ||||
| 
 | ||||
| # | ||||
| # USB-based Watchdog Cards | ||||
|  | ||||
| @ -606,7 +606,7 @@ CONFIG_WATCHDOG_NOWAYOUT=y | ||||
| # Watchdog Device Drivers | ||||
| # | ||||
| # CONFIG_SOFT_WATCHDOG is not set | ||||
| CONFIG_AT91SAM9_WATCHDOG=y | ||||
| CONFIG_AT91SAM9X_WATCHDOG=y | ||||
| 
 | ||||
| # | ||||
| # Sonics Silicon Backplane | ||||
|  | ||||
| @ -727,7 +727,7 @@ CONFIG_WATCHDOG_NOWAYOUT=y | ||||
| # Watchdog Device Drivers | ||||
| # | ||||
| # CONFIG_SOFT_WATCHDOG is not set | ||||
| # CONFIG_AT91SAM9_WATCHDOG is not set | ||||
| # CONFIG_AT91SAM9X_WATCHDOG is not set | ||||
| 
 | ||||
| # | ||||
| # USB-based Watchdog Cards | ||||
|  | ||||
| @ -74,9 +74,9 @@ EXPORT_SYMBOL(elf_set_personality); | ||||
|  */ | ||||
| int arm_elf_read_implies_exec(const struct elf32_hdr *x, int executable_stack) | ||||
| { | ||||
| 	if (executable_stack != EXSTACK_ENABLE_X) | ||||
| 	if (executable_stack != EXSTACK_DISABLE_X) | ||||
| 		return 1; | ||||
| 	if (cpu_architecture() <= CPU_ARCH_ARMv6) | ||||
| 	if (cpu_architecture() < CPU_ARCH_ARMv6) | ||||
| 		return 1; | ||||
| 	return 0; | ||||
| } | ||||
|  | ||||
| @ -233,12 +233,13 @@ static void __init cacheid_init(void) | ||||
| 	unsigned int cachetype = read_cpuid_cachetype(); | ||||
| 	unsigned int arch = cpu_architecture(); | ||||
| 
 | ||||
| 	if (arch >= CPU_ARCH_ARMv7) { | ||||
| 		cacheid = CACHEID_VIPT_NONALIASING; | ||||
| 		if ((cachetype & (3 << 14)) == 1 << 14) | ||||
| 			cacheid |= CACHEID_ASID_TAGGED; | ||||
| 	} else if (arch >= CPU_ARCH_ARMv6) { | ||||
| 		if (cachetype & (1 << 23)) | ||||
| 	if (arch >= CPU_ARCH_ARMv6) { | ||||
| 		if ((cachetype & (7 << 29)) == 4 << 29) { | ||||
| 			/* ARMv7 register format */ | ||||
| 			cacheid = CACHEID_VIPT_NONALIASING; | ||||
| 			if ((cachetype & (3 << 14)) == 1 << 14) | ||||
| 				cacheid |= CACHEID_ASID_TAGGED; | ||||
| 		} else if (cachetype & (1 << 23)) | ||||
| 			cacheid = CACHEID_VIPT_ALIASING; | ||||
| 		else | ||||
| 			cacheid = CACHEID_VIPT_NONALIASING; | ||||
|  | ||||
| @ -697,7 +697,7 @@ static void __init at91_add_device_rtt(void) | ||||
|  *  Watchdog | ||||
|  * -------------------------------------------------------------------- */ | ||||
| 
 | ||||
| #if defined(CONFIG_AT91SAM9_WATCHDOG) || defined(CONFIG_AT91SAM9_WATCHDOG_MODULE) | ||||
| #if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE) | ||||
| static struct platform_device at91cap9_wdt_device = { | ||||
| 	.name		= "at91_wdt", | ||||
| 	.id		= -1, | ||||
|  | ||||
| @ -643,7 +643,7 @@ static void __init at91_add_device_rtt(void) | ||||
|  *  Watchdog | ||||
|  * -------------------------------------------------------------------- */ | ||||
| 
 | ||||
| #if defined(CONFIG_AT91SAM9_WATCHDOG) || defined(CONFIG_AT91SAM9_WATCHDOG_MODULE) | ||||
| #if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE) | ||||
| static struct platform_device at91sam9260_wdt_device = { | ||||
| 	.name		= "at91_wdt", | ||||
| 	.id		= -1, | ||||
|  | ||||
| @ -621,7 +621,7 @@ static void __init at91_add_device_rtt(void) | ||||
|  *  Watchdog | ||||
|  * -------------------------------------------------------------------- */ | ||||
| 
 | ||||
| #if defined(CONFIG_AT91SAM9_WATCHDOG) || defined(CONFIG_AT91SAM9_WATCHDOG_MODULE) | ||||
| #if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE) | ||||
| static struct platform_device at91sam9261_wdt_device = { | ||||
| 	.name		= "at91_wdt", | ||||
| 	.id		= -1, | ||||
|  | ||||
| @ -347,6 +347,111 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) | ||||
| void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {} | ||||
| #endif | ||||
| 
 | ||||
| /* --------------------------------------------------------------------
 | ||||
|  *  Compact Flash (PCMCIA or IDE) | ||||
|  * -------------------------------------------------------------------- */ | ||||
| 
 | ||||
| #if defined(CONFIG_AT91_CF) || defined(CONFIG_AT91_CF_MODULE) || \ | ||||
|     defined(CONFIG_BLK_DEV_IDE_AT91) || defined(CONFIG_BLK_DEV_IDE_AT91_MODULE) | ||||
| 
 | ||||
| static struct at91_cf_data cf0_data; | ||||
| 
 | ||||
| static struct resource cf0_resources[] = { | ||||
| 	[0] = { | ||||
| 		.start	= AT91_CHIPSELECT_4, | ||||
| 		.end	= AT91_CHIPSELECT_4 + SZ_256M - 1, | ||||
| 		.flags	= IORESOURCE_MEM | IORESOURCE_MEM_8AND16BIT, | ||||
| 	} | ||||
| }; | ||||
| 
 | ||||
| static struct platform_device cf0_device = { | ||||
| 	.id		= 0, | ||||
| 	.dev		= { | ||||
| 				.platform_data	= &cf0_data, | ||||
| 	}, | ||||
| 	.resource	= cf0_resources, | ||||
| 	.num_resources	= ARRAY_SIZE(cf0_resources), | ||||
| }; | ||||
| 
 | ||||
| static struct at91_cf_data cf1_data; | ||||
| 
 | ||||
| static struct resource cf1_resources[] = { | ||||
| 	[0] = { | ||||
| 		.start	= AT91_CHIPSELECT_5, | ||||
| 		.end	= AT91_CHIPSELECT_5 + SZ_256M - 1, | ||||
| 		.flags	= IORESOURCE_MEM | IORESOURCE_MEM_8AND16BIT, | ||||
| 	} | ||||
| }; | ||||
| 
 | ||||
| static struct platform_device cf1_device = { | ||||
| 	.id		= 1, | ||||
| 	.dev		= { | ||||
| 				.platform_data	= &cf1_data, | ||||
| 	}, | ||||
| 	.resource	= cf1_resources, | ||||
| 	.num_resources	= ARRAY_SIZE(cf1_resources), | ||||
| }; | ||||
| 
 | ||||
| void __init at91_add_device_cf(struct at91_cf_data *data) | ||||
| { | ||||
| 	unsigned long ebi0_csa; | ||||
| 	struct platform_device *pdev; | ||||
| 
 | ||||
| 	if (!data) | ||||
| 		return; | ||||
| 
 | ||||
| 	/*
 | ||||
| 	 * assign CS4 or CS5 to SMC with Compact Flash logic support, | ||||
| 	 * we assume SMC timings are configured by board code, | ||||
| 	 * except True IDE where timings are controlled by driver | ||||
| 	 */ | ||||
| 	ebi0_csa = at91_sys_read(AT91_MATRIX_EBI0CSA); | ||||
| 	switch (data->chipselect) { | ||||
| 	case 4: | ||||
| 		at91_set_A_periph(AT91_PIN_PD6, 0);  /* EBI0_NCS4/CFCS0 */ | ||||
| 		ebi0_csa |= AT91_MATRIX_EBI0_CS4A_SMC_CF1; | ||||
| 		cf0_data = *data; | ||||
| 		pdev = &cf0_device; | ||||
| 		break; | ||||
| 	case 5: | ||||
| 		at91_set_A_periph(AT91_PIN_PD7, 0);  /* EBI0_NCS5/CFCS1 */ | ||||
| 		ebi0_csa |= AT91_MATRIX_EBI0_CS5A_SMC_CF2; | ||||
| 		cf1_data = *data; | ||||
| 		pdev = &cf1_device; | ||||
| 		break; | ||||
| 	default: | ||||
| 		printk(KERN_ERR "AT91 CF: bad chip-select requested (%u)\n", | ||||
| 		       data->chipselect); | ||||
| 		return; | ||||
| 	} | ||||
| 	at91_sys_write(AT91_MATRIX_EBI0CSA, ebi0_csa); | ||||
| 
 | ||||
| 	if (data->det_pin) { | ||||
| 		at91_set_gpio_input(data->det_pin, 1); | ||||
| 		at91_set_deglitch(data->det_pin, 1); | ||||
| 	} | ||||
| 
 | ||||
| 	if (data->irq_pin) { | ||||
| 		at91_set_gpio_input(data->irq_pin, 1); | ||||
| 		at91_set_deglitch(data->irq_pin, 1); | ||||
| 	} | ||||
| 
 | ||||
| 	if (data->vcc_pin) | ||||
| 		/* initially off */ | ||||
| 		at91_set_gpio_output(data->vcc_pin, 0); | ||||
| 
 | ||||
| 	/* enable EBI controlled pins */ | ||||
| 	at91_set_A_periph(AT91_PIN_PD5, 1);  /* NWAIT */ | ||||
| 	at91_set_A_periph(AT91_PIN_PD8, 0);  /* CFCE1 */ | ||||
| 	at91_set_A_periph(AT91_PIN_PD9, 0);  /* CFCE2 */ | ||||
| 	at91_set_A_periph(AT91_PIN_PD14, 0); /* CFNRW */ | ||||
| 
 | ||||
| 	pdev->name = (data->flags & AT91_CF_TRUE_IDE) ? "at91_ide" : "at91_cf"; | ||||
| 	platform_device_register(pdev); | ||||
| } | ||||
| #else | ||||
| void __init at91_add_device_cf(struct at91_cf_data *data) {} | ||||
| #endif | ||||
| 
 | ||||
| /* --------------------------------------------------------------------
 | ||||
|  *  NAND / SmartMedia | ||||
| @ -854,7 +959,7 @@ static void __init at91_add_device_rtt(void) | ||||
|  *  Watchdog | ||||
|  * -------------------------------------------------------------------- */ | ||||
| 
 | ||||
| #if defined(CONFIG_AT91SAM9_WATCHDOG) || defined(CONFIG_AT91SAM9_WATCHDOG_MODULE) | ||||
| #if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE) | ||||
| static struct platform_device at91sam9263_wdt_device = { | ||||
| 	.name		= "at91_wdt", | ||||
| 	.id		= -1, | ||||
|  | ||||
| @ -609,7 +609,7 @@ static void __init at91_add_device_rtt(void) | ||||
|  *  Watchdog | ||||
|  * -------------------------------------------------------------------- */ | ||||
| 
 | ||||
| #if defined(CONFIG_AT91SAM9_WATCHDOG) || defined(CONFIG_AT91SAM9_WATCHDOG_MODULE) | ||||
| #if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE) | ||||
| static struct platform_device at91sam9rl_wdt_device = { | ||||
| 	.name		= "at91_wdt", | ||||
| 	.id		= -1, | ||||
|  | ||||
| @ -490,7 +490,8 @@ postcore_initcall(at91_gpio_debugfs_init); | ||||
| 
 | ||||
| /*--------------------------------------------------------------------------*/ | ||||
| 
 | ||||
| /* This lock class tells lockdep that GPIO irqs are in a different
 | ||||
| /*
 | ||||
|  * This lock class tells lockdep that GPIO irqs are in a different | ||||
|  * category than their parents, so it won't report false recursion. | ||||
|  */ | ||||
| static struct lock_class_key gpio_lock_class; | ||||
| @ -509,9 +510,6 @@ void __init at91_gpio_irq_setup(void) | ||||
| 		unsigned	id = this->id; | ||||
| 		unsigned	i; | ||||
| 
 | ||||
| 		/* enable PIO controller's clock */ | ||||
| 		clk_enable(this->clock); | ||||
| 
 | ||||
| 		__raw_writel(~0, this->regbase + PIO_IDR); | ||||
| 
 | ||||
| 		for (i = 0, pin = this->chipbase; i < 32; i++, pin++) { | ||||
| @ -556,7 +554,14 @@ void __init at91_gpio_init(struct at91_gpio_bank *data, int nr_banks) | ||||
| 		data->chipbase = PIN_BASE + i * 32; | ||||
| 		data->regbase = data->offset + (void __iomem *)AT91_VA_BASE_SYS; | ||||
| 
 | ||||
| 		/* AT91SAM9263_ID_PIOCDE groups PIOC, PIOD, PIOE */ | ||||
| 		/* enable PIO controller's clock */ | ||||
| 		clk_enable(data->clock); | ||||
| 
 | ||||
| 		/*
 | ||||
| 		 * Some processors share peripheral ID between multiple GPIO banks. | ||||
| 		 *  SAM9263 (PIOC, PIOD, PIOE) | ||||
| 		 *  CAP9 (PIOA, PIOB, PIOC, PIOD) | ||||
| 		 */ | ||||
| 		if (last && last->id == data->id) | ||||
| 			last->next = data; | ||||
| 	} | ||||
|  | ||||
| @ -56,6 +56,9 @@ struct at91_cf_data { | ||||
| 	u8	vcc_pin;		/* power switching */ | ||||
| 	u8	rst_pin;		/* card reset */ | ||||
| 	u8	chipselect;		/* EBI Chip Select number */ | ||||
| 	u8	flags; | ||||
| #define AT91_CF_TRUE_IDE	0x01 | ||||
| #define AT91_IDE_SWAP_A0_A2	0x02 | ||||
| }; | ||||
| extern void __init at91_add_device_cf(struct at91_cf_data *data); | ||||
| 
 | ||||
| @ -93,6 +96,7 @@ struct atmel_nand_data { | ||||
| 	u8		enable_pin;	/* chip enable */ | ||||
| 	u8		det_pin;	/* card detect */ | ||||
| 	u8		rdy_pin;	/* ready/busy */ | ||||
| 	u8              rdy_pin_active_low;     /* rdy_pin value is inverted */ | ||||
| 	u8		ale;		/* address line number connected to ALE */ | ||||
| 	u8		cle;		/* address line number connected to CLE */ | ||||
| 	u8		bus_width_16;	/* buswidth is 16 bit */ | ||||
|  | ||||
| @ -332,7 +332,6 @@ static int at91_pm_enter(suspend_state_t state) | ||||
| 			at91_sys_read(AT91_AIC_IPR) & at91_sys_read(AT91_AIC_IMR)); | ||||
| 
 | ||||
| error: | ||||
| 	sdram_selfrefresh_disable(); | ||||
| 	target_state = PM_SUSPEND_ON; | ||||
| 	at91_irq_resume(); | ||||
| 	at91_gpio_resume(); | ||||
|  | ||||
| @ -311,6 +311,9 @@ evm_u35_setup(struct i2c_client *client, int gpio, unsigned ngpio, void *c) | ||||
| 	gpio_request(gpio + 7, "nCF_SEL"); | ||||
| 	gpio_direction_output(gpio + 7, 1); | ||||
| 
 | ||||
| 	/* irlml6401 sustains over 3A, switches 5V in under 8 msec */ | ||||
| 	setup_usb(500, 8); | ||||
| 
 | ||||
| 	return 0; | ||||
| } | ||||
| 
 | ||||
| @ -417,9 +420,6 @@ static __init void davinci_evm_init(void) | ||||
| 	platform_add_devices(davinci_evm_devices, | ||||
| 			     ARRAY_SIZE(davinci_evm_devices)); | ||||
| 	evm_init_i2c(); | ||||
| 
 | ||||
| 	/* irlml6401 sustains over 3A, switches 5V in under 8 msec */ | ||||
| 	setup_usb(500, 8); | ||||
| } | ||||
| 
 | ||||
| static __init void davinci_evm_irq_init(void) | ||||
|  | ||||
| @ -230,6 +230,11 @@ static struct clk davinci_clks[] = { | ||||
| 		.rate = &commonrate, | ||||
| 		.lpsc = DAVINCI_LPSC_GPIO, | ||||
| 	}, | ||||
| 	{ | ||||
| 		.name = "usb", | ||||
| 		.rate = &commonrate, | ||||
| 		.lpsc = DAVINCI_LPSC_USB, | ||||
| 	}, | ||||
| 	{ | ||||
| 		.name = "AEMIFCLK", | ||||
| 		.rate = &commonrate, | ||||
|  | ||||
| @ -47,6 +47,7 @@ static struct musb_hdrc_platform_data usb_data = { | ||||
| #elif defined(CONFIG_USB_MUSB_HOST) | ||||
| 	.mode           = MUSB_HOST, | ||||
| #endif | ||||
| 	.clock		= "usb", | ||||
| 	.config		= &musb_config, | ||||
| }; | ||||
| 
 | ||||
|  | ||||
| @ -1,3 +0,0 @@ | ||||
| /*
 | ||||
|  * arch/arm/mach-ep93xx/include/mach/gesbc9312.h | ||||
|  */ | ||||
| @ -10,7 +10,6 @@ | ||||
| 
 | ||||
| #include "platform.h" | ||||
| 
 | ||||
| #include "gesbc9312.h" | ||||
| #include "ts72xx.h" | ||||
| 
 | ||||
| #endif | ||||
|  | ||||
| @ -42,7 +42,7 @@ void __init kirkwood_init_irq(void) | ||||
| 	writel(0, GPIO_EDGE_CAUSE(32)); | ||||
| 
 | ||||
| 	for (i = IRQ_KIRKWOOD_GPIO_START; i < NR_IRQS; i++) { | ||||
| 		set_irq_chip(i, &orion_gpio_irq_level_chip); | ||||
| 		set_irq_chip(i, &orion_gpio_irq_chip); | ||||
| 		set_irq_handler(i, handle_level_irq); | ||||
| 		irq_desc[i].status |= IRQ_LEVEL; | ||||
| 		set_irq_flags(i, IRQF_VALID); | ||||
|  | ||||
| @ -40,7 +40,7 @@ void __init mv78xx0_init_irq(void) | ||||
| 	writel(0, GPIO_EDGE_CAUSE(0)); | ||||
| 
 | ||||
| 	for (i = IRQ_MV78XX0_GPIO_START; i < NR_IRQS; i++) { | ||||
| 		set_irq_chip(i, &orion_gpio_irq_level_chip); | ||||
| 		set_irq_chip(i, &orion_gpio_irq_chip); | ||||
| 		set_irq_handler(i, handle_level_irq); | ||||
| 		irq_desc[i].status |= IRQ_LEVEL; | ||||
| 		set_irq_flags(i, IRQF_VALID); | ||||
|  | ||||
| @ -81,7 +81,7 @@ static inline void __init ldp_init_smc911x(void) | ||||
| 	} | ||||
| 
 | ||||
| 	ldp_smc911x_resources[0].start = cs_mem_base + 0x0; | ||||
| 	ldp_smc911x_resources[0].end   = cs_mem_base + 0xf; | ||||
| 	ldp_smc911x_resources[0].end   = cs_mem_base + 0xff; | ||||
| 	udelay(100); | ||||
| 
 | ||||
| 	eth_gpio = LDP_SMC911X_GPIO; | ||||
|  | ||||
| @ -565,7 +565,7 @@ u32 omap2_clksel_to_divisor(struct clk *clk, u32 field_val) | ||||
|  * | ||||
|  * Given a struct clk of a rate-selectable clksel clock, and a clock divisor, | ||||
|  * find the corresponding register field value.  The return register value is | ||||
|  * the value before left-shifting.  Returns 0xffffffff on error | ||||
|  * the value before left-shifting.  Returns ~0 on error | ||||
|  */ | ||||
| u32 omap2_divisor_to_clksel(struct clk *clk, u32 div) | ||||
| { | ||||
| @ -577,7 +577,7 @@ u32 omap2_divisor_to_clksel(struct clk *clk, u32 div) | ||||
| 
 | ||||
| 	clks = omap2_get_clksel_by_parent(clk, clk->parent); | ||||
| 	if (clks == NULL) | ||||
| 		return 0; | ||||
| 		return ~0; | ||||
| 
 | ||||
| 	for (clkr = clks->rates; clkr->div; clkr++) { | ||||
| 		if ((clkr->flags & cpu_mask) && (clkr->div == div)) | ||||
| @ -588,7 +588,7 @@ u32 omap2_divisor_to_clksel(struct clk *clk, u32 div) | ||||
| 		printk(KERN_ERR "clock: Could not find divisor %d for " | ||||
| 		       "clock %s parent %s\n", div, clk->name, | ||||
| 		       clk->parent->name); | ||||
| 		return 0; | ||||
| 		return ~0; | ||||
| 	} | ||||
| 
 | ||||
| 	return clkr->val; | ||||
| @ -708,7 +708,7 @@ static u32 omap2_clksel_get_src_field(void __iomem **src_addr, | ||||
| 		return 0; | ||||
| 
 | ||||
| 	for (clkr = clks->rates; clkr->div; clkr++) { | ||||
| 		if (clkr->flags & (cpu_mask | DEFAULT_RATE)) | ||||
| 		if (clkr->flags & cpu_mask && clkr->flags & DEFAULT_RATE) | ||||
| 			break; /* Found the default rate for this platform */ | ||||
| 	} | ||||
| 
 | ||||
| @ -746,7 +746,7 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent) | ||||
| 		return -EINVAL; | ||||
| 
 | ||||
| 	if (clk->usecount > 0) | ||||
| 		_omap2_clk_disable(clk); | ||||
| 		omap2_clk_disable(clk); | ||||
| 
 | ||||
| 	/* Set new source value (previous dividers if any in effect) */ | ||||
| 	reg_val = __raw_readl(src_addr) & ~field_mask; | ||||
| @ -759,11 +759,11 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent) | ||||
| 		wmb(); | ||||
| 	} | ||||
| 
 | ||||
| 	if (clk->usecount > 0) | ||||
| 		_omap2_clk_enable(clk); | ||||
| 
 | ||||
| 	clk->parent = new_parent; | ||||
| 
 | ||||
| 	if (clk->usecount > 0) | ||||
| 		omap2_clk_enable(clk); | ||||
| 
 | ||||
| 	/* CLKSEL clocks follow their parents' rates, divided by a divisor */ | ||||
| 	clk->rate = new_parent->rate; | ||||
| 
 | ||||
|  | ||||
| @ -44,7 +44,7 @@ void __init orion5x_init_irq(void) | ||||
| 	 * User can use set_type() if he wants to use edge types handlers. | ||||
| 	 */ | ||||
| 	for (i = IRQ_ORION5X_GPIO_START; i < NR_IRQS; i++) { | ||||
| 		set_irq_chip(i, &orion_gpio_irq_level_chip); | ||||
| 		set_irq_chip(i, &orion_gpio_irq_chip); | ||||
| 		set_irq_handler(i, handle_level_irq); | ||||
| 		irq_desc[i].status |= IRQ_LEVEL; | ||||
| 		set_irq_flags(i, IRQF_VALID); | ||||
|  | ||||
| @ -19,6 +19,7 @@ | ||||
| #include <linux/serial_8250.h> | ||||
| #include <linux/ata_platform.h> | ||||
| #include <linux/io.h> | ||||
| #include <linux/i2c.h> | ||||
| 
 | ||||
| #include <asm/elf.h> | ||||
| #include <asm/mach-types.h> | ||||
| @ -201,8 +202,13 @@ static struct platform_device *devs[] __initdata = { | ||||
| 	&pata_device, | ||||
| }; | ||||
| 
 | ||||
| static struct i2c_board_info i2c_rtc = { | ||||
| 	I2C_BOARD_INFO("pcf8583", 0x50) | ||||
| }; | ||||
| 
 | ||||
| static int __init rpc_init(void) | ||||
| { | ||||
| 	i2c_register_board_info(0, &i2c_rtc, 1); | ||||
| 	return platform_add_devices(devs, ARRAY_SIZE(devs)); | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -23,7 +23,8 @@ ENTRY(v6_early_abort) | ||||
| #ifdef CONFIG_CPU_32v6K | ||||
| 	clrex | ||||
| #else | ||||
| 	strex	r0, r1, [sp]			@ Clear the exclusive monitor
 | ||||
| 	sub	r1, sp, #4			@ Get unused stack location
 | ||||
| 	strex	r0, r1, [r1]			@ Clear the exclusive monitor
 | ||||
| #endif | ||||
| 	mrc	p15, 0, r1, c5, c0, 0		@ get FSR
 | ||||
| 	mrc	p15, 0, r0, c6, c0, 0		@ get FAR
 | ||||
|  | ||||
| @ -693,7 +693,8 @@ static void __init sanity_check_meminfo(void) | ||||
| 		 * Check whether this memory bank would entirely overlap | ||||
| 		 * the vmalloc area. | ||||
| 		 */ | ||||
| 		if (__va(bank->start) >= VMALLOC_MIN) { | ||||
| 		if (__va(bank->start) >= VMALLOC_MIN || | ||||
| 		    __va(bank->start) < PAGE_OFFSET) { | ||||
| 			printk(KERN_NOTICE "Ignoring RAM at %.8lx-%.8lx " | ||||
| 			       "(vmalloc region overlap).\n", | ||||
| 			       bank->start, bank->start + bank->size - 1); | ||||
|  | ||||
| @ -265,51 +265,36 @@ EXPORT_SYMBOL(orion_gpio_set_blink); | ||||
|  *        polarity    LEVEL          mask | ||||
|  * | ||||
|  ****************************************************************************/ | ||||
| static void gpio_irq_edge_ack(u32 irq) | ||||
| { | ||||
| 	int pin = irq_to_gpio(irq); | ||||
| 
 | ||||
| 	writel(~(1 << (pin & 31)), GPIO_EDGE_CAUSE(pin)); | ||||
| static void gpio_irq_ack(u32 irq) | ||||
| { | ||||
| 	int type = irq_desc[irq].status & IRQ_TYPE_SENSE_MASK; | ||||
| 	if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) { | ||||
| 		int pin = irq_to_gpio(irq); | ||||
| 		writel(~(1 << (pin & 31)), GPIO_EDGE_CAUSE(pin)); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| static void gpio_irq_edge_mask(u32 irq) | ||||
| static void gpio_irq_mask(u32 irq) | ||||
| { | ||||
| 	int pin = irq_to_gpio(irq); | ||||
| 	u32 u; | ||||
| 
 | ||||
| 	u = readl(GPIO_EDGE_MASK(pin)); | ||||
| 	int type = irq_desc[irq].status & IRQ_TYPE_SENSE_MASK; | ||||
| 	u32 reg = (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) ? | ||||
| 		GPIO_EDGE_MASK(pin) : GPIO_LEVEL_MASK(pin); | ||||
| 	u32 u = readl(reg); | ||||
| 	u &= ~(1 << (pin & 31)); | ||||
| 	writel(u, GPIO_EDGE_MASK(pin)); | ||||
| 	writel(u, reg); | ||||
| } | ||||
| 
 | ||||
| static void gpio_irq_edge_unmask(u32 irq) | ||||
| static void gpio_irq_unmask(u32 irq) | ||||
| { | ||||
| 	int pin = irq_to_gpio(irq); | ||||
| 	u32 u; | ||||
| 
 | ||||
| 	u = readl(GPIO_EDGE_MASK(pin)); | ||||
| 	int type = irq_desc[irq].status & IRQ_TYPE_SENSE_MASK; | ||||
| 	u32 reg = (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) ? | ||||
| 		GPIO_EDGE_MASK(pin) : GPIO_LEVEL_MASK(pin); | ||||
| 	u32 u = readl(reg); | ||||
| 	u |= 1 << (pin & 31); | ||||
| 	writel(u, GPIO_EDGE_MASK(pin)); | ||||
| } | ||||
| 
 | ||||
| static void gpio_irq_level_mask(u32 irq) | ||||
| { | ||||
| 	int pin = irq_to_gpio(irq); | ||||
| 	u32 u; | ||||
| 
 | ||||
| 	u = readl(GPIO_LEVEL_MASK(pin)); | ||||
| 	u &= ~(1 << (pin & 31)); | ||||
| 	writel(u, GPIO_LEVEL_MASK(pin)); | ||||
| } | ||||
| 
 | ||||
| static void gpio_irq_level_unmask(u32 irq) | ||||
| { | ||||
| 	int pin = irq_to_gpio(irq); | ||||
| 	u32 u; | ||||
| 
 | ||||
| 	u = readl(GPIO_LEVEL_MASK(pin)); | ||||
| 	u |= 1 << (pin & 31); | ||||
| 	writel(u, GPIO_LEVEL_MASK(pin)); | ||||
| 	writel(u, reg); | ||||
| } | ||||
| 
 | ||||
| static int gpio_irq_set_type(u32 irq, u32 type) | ||||
| @ -331,9 +316,9 @@ static int gpio_irq_set_type(u32 irq, u32 type) | ||||
| 	 * Set edge/level type. | ||||
| 	 */ | ||||
| 	if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) { | ||||
| 		desc->chip = &orion_gpio_irq_edge_chip; | ||||
| 		desc->handle_irq = handle_edge_irq; | ||||
| 	} else if (type & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) { | ||||
| 		desc->chip = &orion_gpio_irq_level_chip; | ||||
| 		desc->handle_irq = handle_level_irq; | ||||
| 	} else { | ||||
| 		printk(KERN_ERR "failed to set irq=%d (type=%d)\n", irq, type); | ||||
| 		return -EINVAL; | ||||
| @ -371,19 +356,11 @@ static int gpio_irq_set_type(u32 irq, u32 type) | ||||
| 	return 0; | ||||
| } | ||||
| 
 | ||||
| struct irq_chip orion_gpio_irq_edge_chip = { | ||||
| 	.name		= "orion_gpio_irq_edge", | ||||
| 	.ack		= gpio_irq_edge_ack, | ||||
| 	.mask		= gpio_irq_edge_mask, | ||||
| 	.unmask		= gpio_irq_edge_unmask, | ||||
| 	.set_type	= gpio_irq_set_type, | ||||
| }; | ||||
| 
 | ||||
| struct irq_chip orion_gpio_irq_level_chip = { | ||||
| 	.name		= "orion_gpio_irq_level", | ||||
| 	.mask		= gpio_irq_level_mask, | ||||
| 	.mask_ack	= gpio_irq_level_mask, | ||||
| 	.unmask		= gpio_irq_level_unmask, | ||||
| struct irq_chip orion_gpio_irq_chip = { | ||||
| 	.name		= "orion_gpio", | ||||
| 	.ack		= gpio_irq_ack, | ||||
| 	.mask		= gpio_irq_mask, | ||||
| 	.unmask		= gpio_irq_unmask, | ||||
| 	.set_type	= gpio_irq_set_type, | ||||
| }; | ||||
| 
 | ||||
|  | ||||
| @ -31,8 +31,7 @@ void orion_gpio_set_blink(unsigned pin, int blink); | ||||
| /*
 | ||||
|  * GPIO interrupt handling. | ||||
|  */ | ||||
| extern struct irq_chip orion_gpio_irq_edge_chip; | ||||
| extern struct irq_chip orion_gpio_irq_level_chip; | ||||
| extern struct irq_chip orion_gpio_irq_chip; | ||||
| void orion_gpio_irq_handler(int irqoff); | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -55,7 +55,7 @@ static void s3c_irq_eint_unmask(unsigned int irq) | ||||
| 	u32 mask; | ||||
| 
 | ||||
| 	mask = __raw_readl(S3C64XX_EINT0MASK); | ||||
| 	mask |= eint_irq_to_bit(irq); | ||||
| 	mask &= ~eint_irq_to_bit(irq); | ||||
| 	__raw_writel(mask, S3C64XX_EINT0MASK); | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -116,6 +116,7 @@ struct atmel_nand_data { | ||||
| 	int	enable_pin;	/* chip enable */ | ||||
| 	int	det_pin;	/* card detect */ | ||||
| 	int	rdy_pin;	/* ready/busy */ | ||||
| 	u8	rdy_pin_active_low;	/* rdy_pin value is inverted */ | ||||
| 	u8	ale;		/* address line number connected to ALE */ | ||||
| 	u8	cle;		/* address line number connected to CLE */ | ||||
| 	u8	bus_width_16;	/* buswidth is 16 bit */ | ||||
|  | ||||
| @ -1129,6 +1129,7 @@ endchoice | ||||
| 
 | ||||
| config PM_WAKEUP_BY_GPIO | ||||
| 	bool "Allow Wakeup from Standby by GPIO" | ||||
| 	depends on PM && !BF54x | ||||
| 
 | ||||
| config PM_WAKEUP_GPIO_NUMBER | ||||
| 	int "GPIO number" | ||||
| @ -1168,6 +1169,12 @@ config PM_BFIN_WAKE_GP | ||||
| 	default n | ||||
| 	help | ||||
| 	  Enable General-Purpose Wake-Up (Voltage Regulator Power-Up) | ||||
| 	  (all processors, except ADSP-BF549). This option sets | ||||
| 	  the general-purpose wake-up enable (GPWE) control bit to enable | ||||
| 	  wake-up upon detection of an active low signal on the /GPW (PH7) pin. | ||||
| 	  On ADSP-BF549 this option enables the the same functionality on the | ||||
| 	  /MRXON pin also PH7. | ||||
| 
 | ||||
| endmenu | ||||
| 
 | ||||
| menu "CPU Frequency scaling" | ||||
|  | ||||
| @ -21,12 +21,6 @@ config DEBUG_STACK_USAGE | ||||
| config HAVE_ARCH_KGDB | ||||
| 	def_bool y | ||||
| 
 | ||||
| config KGDB_TESTCASE | ||||
| 	tristate "KGDB: for test case in expect" | ||||
| 	default n | ||||
| 	help | ||||
| 	  This is a kgdb test case for automated testing. | ||||
| 
 | ||||
| config DEBUG_VERBOSE | ||||
| 	bool "Verbose fault messages" | ||||
| 	default y | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| # | ||||
| # Automatically generated make config: don't edit | ||||
| # Linux kernel version: 2.6.28-rc2 | ||||
| # Fri Jan  9 17:58:41 2009 | ||||
| # Linux kernel version: 2.6.28 | ||||
| # Fri Feb 20 10:01:44 2009 | ||||
| # | ||||
| # CONFIG_MMU is not set | ||||
| # CONFIG_FPU is not set | ||||
| @ -133,10 +133,15 @@ CONFIG_BF518=y | ||||
| # CONFIG_BF538 is not set | ||||
| # CONFIG_BF539 is not set | ||||
| # CONFIG_BF542 is not set | ||||
| # CONFIG_BF542M is not set | ||||
| # CONFIG_BF544 is not set | ||||
| # CONFIG_BF544M is not set | ||||
| # CONFIG_BF547 is not set | ||||
| # CONFIG_BF547M is not set | ||||
| # CONFIG_BF548 is not set | ||||
| # CONFIG_BF548M is not set | ||||
| # CONFIG_BF549 is not set | ||||
| # CONFIG_BF549M is not set | ||||
| # CONFIG_BF561 is not set | ||||
| CONFIG_BF_REV_MIN=0 | ||||
| CONFIG_BF_REV_MAX=2 | ||||
| @ -426,7 +431,17 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | ||||
| # CONFIG_TIPC is not set | ||||
| # CONFIG_ATM is not set | ||||
| # CONFIG_BRIDGE is not set | ||||
| # CONFIG_NET_DSA is not set | ||||
| CONFIG_NET_DSA=y | ||||
| # CONFIG_NET_DSA_TAG_DSA is not set | ||||
| # CONFIG_NET_DSA_TAG_EDSA is not set | ||||
| # CONFIG_NET_DSA_TAG_TRAILER is not set | ||||
| CONFIG_NET_DSA_TAG_STPID=y | ||||
| # CONFIG_NET_DSA_MV88E6XXX is not set | ||||
| # CONFIG_NET_DSA_MV88E6060 is not set | ||||
| # CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set | ||||
| # CONFIG_NET_DSA_MV88E6131 is not set | ||||
| # CONFIG_NET_DSA_MV88E6123_61_65 is not set | ||||
| CONFIG_NET_DSA_KSZ8893M=y | ||||
| # CONFIG_VLAN_8021Q is not set | ||||
| # CONFIG_DECNET is not set | ||||
| # CONFIG_LLC2 is not set | ||||
| @ -529,6 +544,8 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y | ||||
| # | ||||
| # Self-contained MTD device drivers | ||||
| # | ||||
| # CONFIG_MTD_DATAFLASH is not set | ||||
| # CONFIG_MTD_M25P80 is not set | ||||
| # CONFIG_MTD_SLRAM is not set | ||||
| # CONFIG_MTD_PHRAM is not set | ||||
| # CONFIG_MTD_MTDRAM is not set | ||||
| @ -561,7 +578,9 @@ CONFIG_BLK_DEV_RAM_SIZE=4096 | ||||
| # CONFIG_BLK_DEV_HD is not set | ||||
| CONFIG_MISC_DEVICES=y | ||||
| # CONFIG_EEPROM_93CX6 is not set | ||||
| # CONFIG_ICS932S401 is not set | ||||
| # CONFIG_ENCLOSURE_SERVICES is not set | ||||
| # CONFIG_C2PORT is not set | ||||
| CONFIG_HAVE_IDE=y | ||||
| # CONFIG_IDE is not set | ||||
| 
 | ||||
| @ -607,6 +626,7 @@ CONFIG_BFIN_RX_DESC_NUM=20 | ||||
| # CONFIG_SMC91X is not set | ||||
| # CONFIG_SMSC911X is not set | ||||
| # CONFIG_DM9000 is not set | ||||
| # CONFIG_ENC28J60 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 | ||||
| @ -764,7 +784,23 @@ CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100 | ||||
| # CONFIG_I2C_DEBUG_ALGO is not set | ||||
| # CONFIG_I2C_DEBUG_BUS is not set | ||||
| # CONFIG_I2C_DEBUG_CHIP is not set | ||||
| # CONFIG_SPI is not set | ||||
| CONFIG_SPI=y | ||||
| # CONFIG_SPI_DEBUG is not set | ||||
| CONFIG_SPI_MASTER=y | ||||
| 
 | ||||
| # | ||||
| # SPI Master Controller Drivers | ||||
| # | ||||
| CONFIG_SPI_BFIN=y | ||||
| # CONFIG_SPI_BFIN_LOCK is not set | ||||
| # CONFIG_SPI_BITBANG is not set | ||||
| 
 | ||||
| # | ||||
| # SPI Protocol Masters | ||||
| # | ||||
| # CONFIG_SPI_AT25 is not set | ||||
| # CONFIG_SPI_SPIDEV is not set | ||||
| # CONFIG_SPI_TLE62X0 is not set | ||||
| CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y | ||||
| # CONFIG_GPIOLIB is not set | ||||
| # CONFIG_W1 is not set | ||||
| @ -788,8 +824,10 @@ CONFIG_BFIN_WDT=y | ||||
| # CONFIG_MFD_SM501 is not set | ||||
| # CONFIG_HTC_PASIC3 is not set | ||||
| # CONFIG_MFD_TMIO is not set | ||||
| # CONFIG_PMIC_DA903X is not set | ||||
| # CONFIG_MFD_WM8400 is not set | ||||
| # CONFIG_MFD_WM8350_I2C is not set | ||||
| # CONFIG_REGULATOR is not set | ||||
| 
 | ||||
| # | ||||
| # Multimedia devices | ||||
| @ -861,10 +899,18 @@ CONFIG_RTC_INTF_DEV=y | ||||
| # CONFIG_RTC_DRV_M41T80 is not set | ||||
| # CONFIG_RTC_DRV_S35390A is not set | ||||
| # CONFIG_RTC_DRV_FM3130 is not set | ||||
| # CONFIG_RTC_DRV_RX8581 is not set | ||||
| 
 | ||||
| # | ||||
| # SPI RTC drivers | ||||
| # | ||||
| # CONFIG_RTC_DRV_M41T94 is not set | ||||
| # CONFIG_RTC_DRV_DS1305 is not set | ||||
| # CONFIG_RTC_DRV_DS1390 is not set | ||||
| # CONFIG_RTC_DRV_MAX6902 is not set | ||||
| # CONFIG_RTC_DRV_R9701 is not set | ||||
| # CONFIG_RTC_DRV_RS5C348 is not set | ||||
| # CONFIG_RTC_DRV_DS3234 is not set | ||||
| 
 | ||||
| # | ||||
| # Platform RTC drivers | ||||
| @ -1062,12 +1108,20 @@ CONFIG_DEBUG_INFO=y | ||||
| # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | ||||
| # CONFIG_FAULT_INJECTION is not set | ||||
| CONFIG_SYSCTL_SYSCALL_CHECK=y | ||||
| 
 | ||||
| # | ||||
| # Tracers | ||||
| # | ||||
| # CONFIG_SCHED_TRACER is not set | ||||
| # CONFIG_CONTEXT_SWITCH_TRACER is not set | ||||
| # CONFIG_BOOT_TRACER is not set | ||||
| # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | ||||
| # CONFIG_SAMPLES is not set | ||||
| CONFIG_HAVE_ARCH_KGDB=y | ||||
| # CONFIG_KGDB is not set | ||||
| # CONFIG_DEBUG_STACKOVERFLOW is not set | ||||
| # CONFIG_DEBUG_STACK_USAGE is not set | ||||
| # CONFIG_KGDB_TESTCASE is not set | ||||
| CONFIG_DEBUG_VERBOSE=y | ||||
| CONFIG_DEBUG_MMRS=y | ||||
| # CONFIG_DEBUG_HWERR is not set | ||||
| @ -1100,6 +1154,7 @@ CONFIG_CRYPTO=y | ||||
| # | ||||
| # CONFIG_CRYPTO_FIPS is not set | ||||
| # CONFIG_CRYPTO_MANAGER is not set | ||||
| # CONFIG_CRYPTO_MANAGER2 is not set | ||||
| # CONFIG_CRYPTO_GF128MUL is not set | ||||
| # CONFIG_CRYPTO_NULL is not set | ||||
| # CONFIG_CRYPTO_CRYPTD is not set | ||||
|  | ||||
| @ -327,8 +327,8 @@ CONFIG_BFIN_ICACHE=y | ||||
| CONFIG_BFIN_DCACHE=y | ||||
| # CONFIG_BFIN_DCACHE_BANKA is not set | ||||
| # CONFIG_BFIN_ICACHE_LOCK is not set | ||||
| # CONFIG_BFIN_WB is not set | ||||
| CONFIG_BFIN_WT=y | ||||
| CONFIG_BFIN_WB=y | ||||
| # CONFIG_BFIN_WT is not set | ||||
| # CONFIG_MPU is not set | ||||
| 
 | ||||
| # | ||||
|  | ||||
| @ -290,8 +290,8 @@ CONFIG_BFIN_ICACHE=y | ||||
| CONFIG_BFIN_DCACHE=y | ||||
| # CONFIG_BFIN_DCACHE_BANKA is not set | ||||
| # CONFIG_BFIN_ICACHE_LOCK is not set | ||||
| # CONFIG_BFIN_WB is not set | ||||
| CONFIG_BFIN_WT=y | ||||
| CONFIG_BFIN_WB=y | ||||
| # CONFIG_BFIN_WT is not set | ||||
| # CONFIG_MPU is not set | ||||
| 
 | ||||
| # | ||||
|  | ||||
| @ -290,8 +290,8 @@ CONFIG_BFIN_ICACHE=y | ||||
| CONFIG_BFIN_DCACHE=y | ||||
| # CONFIG_BFIN_DCACHE_BANKA is not set | ||||
| # CONFIG_BFIN_ICACHE_LOCK is not set | ||||
| # CONFIG_BFIN_WB is not set | ||||
| CONFIG_BFIN_WT=y | ||||
| CONFIG_BFIN_WB=y | ||||
| # CONFIG_BFIN_WT is not set | ||||
| # CONFIG_MPU is not set | ||||
| 
 | ||||
| # | ||||
|  | ||||
| @ -298,8 +298,8 @@ CONFIG_BFIN_ICACHE=y | ||||
| CONFIG_BFIN_DCACHE=y | ||||
| # CONFIG_BFIN_DCACHE_BANKA is not set | ||||
| # CONFIG_BFIN_ICACHE_LOCK is not set | ||||
| # CONFIG_BFIN_WB is not set | ||||
| CONFIG_BFIN_WT=y | ||||
| CONFIG_BFIN_WB=y | ||||
| # CONFIG_BFIN_WT is not set | ||||
| # CONFIG_MPU is not set | ||||
| 
 | ||||
| # | ||||
| @ -568,15 +568,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2 | ||||
| # CONFIG_MTD_DOC2000 is not set | ||||
| # CONFIG_MTD_DOC2001 is not set | ||||
| # CONFIG_MTD_DOC2001PLUS is not set | ||||
| CONFIG_MTD_NAND=m | ||||
| # CONFIG_MTD_NAND_VERIFY_WRITE is not set | ||||
| # CONFIG_MTD_NAND_ECC_SMC is not set | ||||
| # CONFIG_MTD_NAND_MUSEUM_IDS is not set | ||||
| # CONFIG_MTD_NAND_BFIN is not set | ||||
| CONFIG_MTD_NAND_IDS=m | ||||
| # CONFIG_MTD_NAND_DISKONCHIP is not set | ||||
| # CONFIG_MTD_NAND_NANDSIM is not set | ||||
| CONFIG_MTD_NAND_PLATFORM=m | ||||
| # CONFIG_MTD_NAND is not set | ||||
| # CONFIG_MTD_ONENAND is not set | ||||
| 
 | ||||
| # | ||||
|  | ||||
| @ -306,8 +306,8 @@ CONFIG_BFIN_ICACHE=y | ||||
| CONFIG_BFIN_DCACHE=y | ||||
| # CONFIG_BFIN_DCACHE_BANKA is not set | ||||
| # CONFIG_BFIN_ICACHE_LOCK is not set | ||||
| # CONFIG_BFIN_WB is not set | ||||
| CONFIG_BFIN_WT=y | ||||
| CONFIG_BFIN_WB=y | ||||
| # CONFIG_BFIN_WT is not set | ||||
| # CONFIG_MPU is not set | ||||
| 
 | ||||
| # | ||||
|  | ||||
| @ -361,8 +361,8 @@ CONFIG_BFIN_ICACHE=y | ||||
| CONFIG_BFIN_DCACHE=y | ||||
| # CONFIG_BFIN_DCACHE_BANKA is not set | ||||
| # CONFIG_BFIN_ICACHE_LOCK is not set | ||||
| # CONFIG_BFIN_WB is not set | ||||
| CONFIG_BFIN_WT=y | ||||
| CONFIG_BFIN_WB=y | ||||
| # CONFIG_BFIN_WT is not set | ||||
| # CONFIG_BFIN_L2_CACHEABLE is not set | ||||
| # CONFIG_MPU is not set | ||||
| 
 | ||||
| @ -680,7 +680,7 @@ CONFIG_SCSI=y | ||||
| CONFIG_SCSI_DMA=y | ||||
| # CONFIG_SCSI_TGT is not set | ||||
| # CONFIG_SCSI_NETLINK is not set | ||||
| CONFIG_SCSI_PROC_FS=y | ||||
| # CONFIG_SCSI_PROC_FS is not set | ||||
| 
 | ||||
| # | ||||
| # SCSI support type (disk, tape, CD-ROM) | ||||
|  | ||||
| @ -329,8 +329,8 @@ CONFIG_BFIN_ICACHE=y | ||||
| CONFIG_BFIN_DCACHE=y | ||||
| # CONFIG_BFIN_DCACHE_BANKA is not set | ||||
| # CONFIG_BFIN_ICACHE_LOCK is not set | ||||
| # CONFIG_BFIN_WB is not set | ||||
| CONFIG_BFIN_WT=y | ||||
| CONFIG_BFIN_WB=y | ||||
| # CONFIG_BFIN_WT is not set | ||||
| # CONFIG_BFIN_L2_CACHEABLE is not set | ||||
| # CONFIG_MPU is not set | ||||
| 
 | ||||
|  | ||||
| @ -288,8 +288,8 @@ CONFIG_BFIN_ICACHE=y | ||||
| CONFIG_BFIN_DCACHE=y | ||||
| # CONFIG_BFIN_DCACHE_BANKA is not set | ||||
| # CONFIG_BFIN_ICACHE_LOCK is not set | ||||
| # CONFIG_BFIN_WB is not set | ||||
| CONFIG_BFIN_WT=y | ||||
| CONFIG_BFIN_WB=y | ||||
| # CONFIG_BFIN_WT is not set | ||||
| # CONFIG_MPU is not set | ||||
| 
 | ||||
| # | ||||
|  | ||||
| @ -332,8 +332,8 @@ CONFIG_BFIN_ICACHE=y | ||||
| CONFIG_BFIN_DCACHE=y | ||||
| # CONFIG_BFIN_DCACHE_BANKA is not set | ||||
| # CONFIG_BFIN_ICACHE_LOCK is not set | ||||
| # CONFIG_BFIN_WB is not set | ||||
| CONFIG_BFIN_WT=y | ||||
| CONFIG_BFIN_WB=y | ||||
| # CONFIG_BFIN_WT is not set | ||||
| # CONFIG_MPU is not set | ||||
| 
 | ||||
| # | ||||
|  | ||||
| @ -336,8 +336,8 @@ CONFIG_BFIN_ICACHE=y | ||||
| CONFIG_BFIN_DCACHE=y | ||||
| # CONFIG_BFIN_DCACHE_BANKA is not set | ||||
| # CONFIG_BFIN_ICACHE_LOCK is not set | ||||
| # CONFIG_BFIN_WB is not set | ||||
| CONFIG_BFIN_WT=y | ||||
| CONFIG_BFIN_WB=y | ||||
| # CONFIG_BFIN_WT is not set | ||||
| CONFIG_L1_MAX_PIECE=16 | ||||
| # CONFIG_MPU is not set | ||||
| 
 | ||||
| @ -595,7 +595,7 @@ CONFIG_SCSI=y | ||||
| CONFIG_SCSI_DMA=y | ||||
| # CONFIG_SCSI_TGT is not set | ||||
| # CONFIG_SCSI_NETLINK is not set | ||||
| CONFIG_SCSI_PROC_FS=y | ||||
| # CONFIG_SCSI_PROC_FS is not set | ||||
| 
 | ||||
| # | ||||
| # SCSI support type (disk, tape, CD-ROM) | ||||
|  | ||||
| @ -612,7 +612,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||||
| CONFIG_SCSI=y | ||||
| # CONFIG_SCSI_TGT is not set | ||||
| # CONFIG_SCSI_NETLINK is not set | ||||
| CONFIG_SCSI_PROC_FS=y | ||||
| # CONFIG_SCSI_PROC_FS is not set | ||||
| 
 | ||||
| # | ||||
| # SCSI support type (disk, tape, CD-ROM) | ||||
|  | ||||
| @ -282,8 +282,8 @@ CONFIG_BFIN_ICACHE=y | ||||
| CONFIG_BFIN_DCACHE=y | ||||
| # CONFIG_BFIN_DCACHE_BANKA is not set | ||||
| # CONFIG_BFIN_ICACHE_LOCK is not set | ||||
| # CONFIG_BFIN_WB is not set | ||||
| CONFIG_BFIN_WT=y | ||||
| CONFIG_BFIN_WB=y | ||||
| # CONFIG_BFIN_WT is not set | ||||
| CONFIG_L1_MAX_PIECE=16 | ||||
| 
 | ||||
| # | ||||
|  | ||||
| @ -1,3 +1,4 @@ | ||||
| include include/asm-generic/Kbuild.asm | ||||
| 
 | ||||
| unifdef-y += bfin_sport.h | ||||
| unifdef-y += fixed_code.h | ||||
|  | ||||
| @ -1,30 +1,9 @@ | ||||
| /*
 | ||||
|  * File:         include/asm-blackfin/bfin_sport.h | ||||
|  * Based on: | ||||
|  * Author:       Roy Huang (roy.huang@analog.com) | ||||
|  * bfin_sport.h - userspace header for bfin sport driver | ||||
|  * | ||||
|  * Created:      Thu Aug. 24 2006 | ||||
|  * Description: | ||||
|  * Copyright 2004-2008 Analog Devices Inc. | ||||
|  * | ||||
|  * Modified: | ||||
|  *               Copyright 2004-2006 Analog Devices Inc. | ||||
|  * | ||||
|  * Bugs:         Enter bugs at http://blackfin.uclinux.org/
 | ||||
|  * | ||||
|  * 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, see the file COPYING, or write | ||||
|  * to the Free Software Foundation, Inc., | ||||
|  * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA | ||||
|  * Licensed under the GPL-2 or later. | ||||
|  */ | ||||
| 
 | ||||
| #ifndef __BFIN_SPORT_H__ | ||||
| @ -42,11 +21,10 @@ | ||||
| #define NORM_FORMAT	0x0 | ||||
| #define ALAW_FORMAT	0x2 | ||||
| #define ULAW_FORMAT	0x3 | ||||
| struct sport_register; | ||||
| 
 | ||||
| /* Function driver which use sport must initialize the structure */ | ||||
| struct sport_config { | ||||
| 	/*TDM (multichannels), I2S or other mode */ | ||||
| 	/* TDM (multichannels), I2S or other mode */ | ||||
| 	unsigned int mode:3; | ||||
| 
 | ||||
| 	/* if TDM mode is selected, channels must be set */ | ||||
| @ -72,12 +50,18 @@ struct sport_config { | ||||
| 	int serial_clk; | ||||
| 	int fsync_clk; | ||||
| 
 | ||||
| 	unsigned int data_format:2;	/*Normal, u-law or a-law */ | ||||
| 	unsigned int data_format:2;	/* Normal, u-law or a-law */ | ||||
| 
 | ||||
| 	int word_len;		/* How length of the word in bits, 3-32 bits */ | ||||
| 	int dma_enabled; | ||||
| }; | ||||
| 
 | ||||
| /* Userspace interface */ | ||||
| #define SPORT_IOC_MAGIC		'P' | ||||
| #define SPORT_IOC_CONFIG	_IOWR('P', 0x01, struct sport_config) | ||||
| 
 | ||||
| #ifdef __KERNEL__ | ||||
| 
 | ||||
| struct sport_register { | ||||
| 	unsigned short tcr1; | ||||
| 	unsigned short reserved0; | ||||
| @ -117,9 +101,6 @@ struct sport_register { | ||||
| 	unsigned long mrcs3; | ||||
| }; | ||||
| 
 | ||||
| #define SPORT_IOC_MAGIC		'P' | ||||
| #define SPORT_IOC_CONFIG	_IOWR('P', 0x01, struct sport_config) | ||||
| 
 | ||||
| struct sport_dev { | ||||
| 	struct cdev cdev;	/* Char device structure */ | ||||
| 
 | ||||
| @ -149,6 +130,8 @@ struct sport_dev { | ||||
| 	struct sport_config config; | ||||
| }; | ||||
| 
 | ||||
| #endif | ||||
| 
 | ||||
| #define SPORT_TCR1	0 | ||||
| #define	SPORT_TCR2	1 | ||||
| #define	SPORT_TCLKDIV	2 | ||||
| @ -169,4 +152,4 @@ struct sport_dev { | ||||
| #define SPORT_MRCS2	22 | ||||
| #define SPORT_MRCS3	23 | ||||
| 
 | ||||
| #endif				/*__BFIN_SPORT_H__*/ | ||||
| #endif | ||||
|  | ||||
| @ -35,9 +35,9 @@ | ||||
| #include <asm/atomic.h> | ||||
| #include <asm/traps.h> | ||||
| 
 | ||||
| #define IPIPE_ARCH_STRING     "1.8-00" | ||||
| #define IPIPE_ARCH_STRING     "1.9-00" | ||||
| #define IPIPE_MAJOR_NUMBER    1 | ||||
| #define IPIPE_MINOR_NUMBER    8 | ||||
| #define IPIPE_MINOR_NUMBER    9 | ||||
| #define IPIPE_PATCH_NUMBER    0 | ||||
| 
 | ||||
| #ifdef CONFIG_SMP | ||||
| @ -83,9 +83,9 @@ struct ipipe_sysinfo { | ||||
| 				"%2 = CYCLES2\n"		\ | ||||
| 				"CC = %2 == %0\n"		\ | ||||
| 				"if ! CC jump 1b\n"		\ | ||||
| 				: "=r" (((unsigned long *)&t)[1]),	\ | ||||
| 				  "=r" (((unsigned long *)&t)[0]),	\ | ||||
| 				  "=r" (__cy2)				\ | ||||
| 				: "=d,a" (((unsigned long *)&t)[1]),	\ | ||||
| 				  "=d,a" (((unsigned long *)&t)[0]),	\ | ||||
| 				  "=d,a" (__cy2)				\ | ||||
| 				: /*no input*/ : "CC");			\ | ||||
| 	t;								\ | ||||
| 	}) | ||||
| @ -118,35 +118,40 @@ void __ipipe_disable_irqdesc(struct ipipe_domain *ipd, | ||||
| 
 | ||||
| #define __ipipe_disable_irq(irq)	(irq_desc[irq].chip->mask(irq)) | ||||
| 
 | ||||
| #define __ipipe_lock_root()					\ | ||||
| 	set_bit(IPIPE_ROOTLOCK_FLAG, &ipipe_root_domain->flags) | ||||
| static inline int __ipipe_check_tickdev(const char *devname) | ||||
| { | ||||
| 	return 1; | ||||
| } | ||||
| 
 | ||||
| #define __ipipe_unlock_root()					\ | ||||
| 	clear_bit(IPIPE_ROOTLOCK_FLAG, &ipipe_root_domain->flags) | ||||
| static inline void __ipipe_lock_root(void) | ||||
| { | ||||
| 	set_bit(IPIPE_SYNCDEFER_FLAG, &ipipe_root_cpudom_var(status)); | ||||
| } | ||||
| 
 | ||||
| static inline void __ipipe_unlock_root(void) | ||||
| { | ||||
| 	clear_bit(IPIPE_SYNCDEFER_FLAG, &ipipe_root_cpudom_var(status)); | ||||
| } | ||||
| 
 | ||||
| void __ipipe_enable_pipeline(void); | ||||
| 
 | ||||
| #define __ipipe_hook_critical_ipi(ipd) do { } while (0) | ||||
| 
 | ||||
| #define __ipipe_sync_pipeline(syncmask)					\ | ||||
| 	do {								\ | ||||
| 		struct ipipe_domain *ipd = ipipe_current_domain;	\ | ||||
| 		if (likely(ipd != ipipe_root_domain || !test_bit(IPIPE_ROOTLOCK_FLAG, &ipd->flags))) \ | ||||
| 			__ipipe_sync_stage(syncmask);			\ | ||||
| 	} while (0) | ||||
| #define __ipipe_sync_pipeline  ___ipipe_sync_pipeline | ||||
| void ___ipipe_sync_pipeline(unsigned long syncmask); | ||||
| 
 | ||||
| void __ipipe_handle_irq(unsigned irq, struct pt_regs *regs); | ||||
| 
 | ||||
| int __ipipe_get_irq_priority(unsigned irq); | ||||
| 
 | ||||
| int __ipipe_get_irqthread_priority(unsigned irq); | ||||
| 
 | ||||
| void __ipipe_stall_root_raw(void); | ||||
| 
 | ||||
| void __ipipe_unstall_root_raw(void); | ||||
| 
 | ||||
| void __ipipe_serial_debug(const char *fmt, ...); | ||||
| 
 | ||||
| asmlinkage void __ipipe_call_irqtail(unsigned long addr); | ||||
| 
 | ||||
| DECLARE_PER_CPU(struct pt_regs, __ipipe_tick_regs); | ||||
| 
 | ||||
| extern unsigned long __ipipe_core_clock; | ||||
| @ -162,42 +167,25 @@ static inline unsigned long __ipipe_ffnz(unsigned long ul) | ||||
| 
 | ||||
| #define __ipipe_run_irqtail()  /* Must be a macro */			\ | ||||
| 	do {								\ | ||||
| 		asmlinkage void __ipipe_call_irqtail(void);		\ | ||||
| 		unsigned long __pending;				\ | ||||
| 		CSYNC();					\ | ||||
| 		CSYNC();						\ | ||||
| 		__pending = bfin_read_IPEND();				\ | ||||
| 		if (__pending & 0x8000) {				\ | ||||
| 			__pending &= ~0x8010;				\ | ||||
| 			if (__pending && (__pending & (__pending - 1)) == 0) \ | ||||
| 				__ipipe_call_irqtail();			\ | ||||
| 				__ipipe_call_irqtail(__ipipe_irq_tail_hook); \ | ||||
| 		}							\ | ||||
| 	} while (0) | ||||
| 
 | ||||
| #define __ipipe_run_isr(ipd, irq)					\ | ||||
| 	do {								\ | ||||
| 		if (ipd == ipipe_root_domain) {				\ | ||||
| 			/*						\
 | ||||
| 			 * Note: the I-pipe implements a threaded interrupt model on \ | ||||
| 			 * this arch for Linux external IRQs. The interrupt handler we \ | ||||
| 			 * call here only wakes up the associated IRQ thread. \ | ||||
| 			 */						\ | ||||
| 			if (ipipe_virtual_irq_p(irq)) {			\ | ||||
| 				/* No irqtail here; virtual interrupts have no effect \
 | ||||
| 				   on IPEND so there is no need for processing \ | ||||
| 				   deferral. */				\ | ||||
| 				local_irq_enable_nohead(ipd);		\ | ||||
| 			local_irq_enable_hw();				\ | ||||
| 			if (ipipe_virtual_irq_p(irq))			\ | ||||
| 				ipd->irqs[irq].handler(irq, ipd->irqs[irq].cookie); \ | ||||
| 				local_irq_disable_nohead(ipd);		\ | ||||
| 			} else						\ | ||||
| 				/*					\
 | ||||
| 				 * No need to run the irqtail here either; \ | ||||
| 				 * we can't be preempted by hw IRQs, so	\ | ||||
| 				 * non-Linux IRQs cannot stack over the short \ | ||||
| 				 * thread wakeup code. Which in turn means \ | ||||
| 				 * that no irqtail condition could be pending \ | ||||
| 				 * for domains above Linux in the pipeline. \ | ||||
| 				 */					\ | ||||
| 			else						\ | ||||
| 				ipd->irqs[irq].handler(irq, &__raw_get_cpu_var(__ipipe_tick_regs)); \ | ||||
| 			local_irq_disable_hw();				\ | ||||
| 		} else {						\ | ||||
| 			__clear_bit(IPIPE_SYNC_FLAG, &ipipe_cpudom_var(ipd, status)); \ | ||||
| 			local_irq_enable_nohead(ipd);			\ | ||||
| @ -217,42 +205,24 @@ void ipipe_init_irq_threads(void); | ||||
| 
 | ||||
| int ipipe_start_irq_thread(unsigned irq, struct irq_desc *desc); | ||||
| 
 | ||||
| #define IS_SYSIRQ(irq)		((irq) > IRQ_CORETMR && (irq) <= SYS_IRQS) | ||||
| #define IS_GPIOIRQ(irq)		((irq) >= GPIO_IRQ_BASE && (irq) < NR_IRQS) | ||||
| 
 | ||||
| #ifdef CONFIG_GENERIC_CLOCKEVENTS | ||||
| #define IRQ_SYSTMR		IRQ_CORETMR | ||||
| #define IRQ_PRIOTMR		IRQ_CORETMR | ||||
| #else | ||||
| #define IRQ_SYSTMR		IRQ_TIMER0 | ||||
| #define IRQ_PRIOTMR		CONFIG_IRQ_TIMER0 | ||||
| #endif | ||||
| 
 | ||||
| #if defined(CONFIG_BF531) || defined(CONFIG_BF532) || defined(CONFIG_BF533) | ||||
| #define PRIO_GPIODEMUX(irq)	CONFIG_PFA | ||||
| #elif defined(CONFIG_BF534) || defined(CONFIG_BF536) || defined(CONFIG_BF537) | ||||
| #define PRIO_GPIODEMUX(irq)	CONFIG_IRQ_PROG_INTA | ||||
| #elif defined(CONFIG_BF52x) | ||||
| #define PRIO_GPIODEMUX(irq)	((irq) == IRQ_PORTF_INTA ? CONFIG_IRQ_PORTF_INTA : \ | ||||
| 				 (irq) == IRQ_PORTG_INTA ? CONFIG_IRQ_PORTG_INTA : \ | ||||
| 				 (irq) == IRQ_PORTH_INTA ? CONFIG_IRQ_PORTH_INTA : \ | ||||
| 				 -1) | ||||
| #elif defined(CONFIG_BF561) | ||||
| #define PRIO_GPIODEMUX(irq)	((irq) == IRQ_PROG0_INTA ? CONFIG_IRQ_PROG0_INTA : \ | ||||
| 				 (irq) == IRQ_PROG1_INTA ? CONFIG_IRQ_PROG1_INTA : \ | ||||
| 				 (irq) == IRQ_PROG2_INTA ? CONFIG_IRQ_PROG2_INTA : \ | ||||
| 				 -1) | ||||
| #ifdef CONFIG_BF561 | ||||
| #define bfin_write_TIMER_DISABLE(val)	bfin_write_TMRS8_DISABLE(val) | ||||
| #define bfin_write_TIMER_ENABLE(val)	bfin_write_TMRS8_ENABLE(val) | ||||
| #define bfin_write_TIMER_STATUS(val)	bfin_write_TMRS8_STATUS(val) | ||||
| #define bfin_read_TIMER_STATUS()	bfin_read_TMRS8_STATUS() | ||||
| #elif defined(CONFIG_BF54x) | ||||
| #define PRIO_GPIODEMUX(irq)	((irq) == IRQ_PINT0 ? CONFIG_IRQ_PINT0 : \ | ||||
| 				 (irq) == IRQ_PINT1 ? CONFIG_IRQ_PINT1 : \ | ||||
| 				 (irq) == IRQ_PINT2 ? CONFIG_IRQ_PINT2 : \ | ||||
| 				 (irq) == IRQ_PINT3 ? CONFIG_IRQ_PINT3 : \ | ||||
| 				 -1) | ||||
| #define bfin_write_TIMER_DISABLE(val)	bfin_write_TIMER_DISABLE0(val) | ||||
| #define bfin_write_TIMER_ENABLE(val)	bfin_write_TIMER_ENABLE0(val) | ||||
| #define bfin_write_TIMER_STATUS(val)	bfin_write_TIMER_STATUS0(val) | ||||
| #define bfin_read_TIMER_STATUS(val)	bfin_read_TIMER_STATUS0(val) | ||||
| #else | ||||
| # error "no PRIO_GPIODEMUX() for this part" | ||||
| #endif | ||||
| 
 | ||||
| #define __ipipe_root_tick_p(regs)	((regs->ipend & 0x10) != 0) | ||||
| @ -275,4 +245,6 @@ int ipipe_start_irq_thread(unsigned irq, struct irq_desc *desc); | ||||
| 
 | ||||
| #endif /* !CONFIG_IPIPE */ | ||||
| 
 | ||||
| #define ipipe_update_tick_evtdev(evtdev)	do { } while (0) | ||||
| 
 | ||||
| #endif	/* !__ASM_BLACKFIN_IPIPE_H */ | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| /*   -*- linux-c -*-
 | ||||
|  *   include/asm-blackfin/_baseipipe.h | ||||
|  *   include/asm-blackfin/ipipe_base.h | ||||
|  * | ||||
|  *   Copyright (C) 2007 Philippe Gerum. | ||||
|  * | ||||
| @ -27,8 +27,9 @@ | ||||
| #define IPIPE_NR_XIRQS		NR_IRQS | ||||
| #define IPIPE_IRQ_ISHIFT	5	/* 2^5 for 32bits arch. */ | ||||
| 
 | ||||
| /* Blackfin-specific, global domain flags */ | ||||
| #define IPIPE_ROOTLOCK_FLAG	1	/* Lock pipeline for root */ | ||||
| /* Blackfin-specific, per-cpu pipeline status */ | ||||
| #define IPIPE_SYNCDEFER_FLAG	15 | ||||
| #define IPIPE_SYNCDEFER_MASK	(1L << IPIPE_SYNCDEFER_MASK) | ||||
| 
 | ||||
|  /* Blackfin traps -- i.e. exception vector numbers */ | ||||
| #define IPIPE_NR_FAULTS		52 /* We leave a gap after VEC_ILL_RES. */ | ||||
| @ -48,11 +49,6 @@ | ||||
| 
 | ||||
| #ifndef __ASSEMBLY__ | ||||
| 
 | ||||
| #include <linux/bitops.h> | ||||
| 
 | ||||
| extern int test_bit(int nr, const void *addr); | ||||
| 
 | ||||
| 
 | ||||
| extern unsigned long __ipipe_root_status; /* Alias to ipipe_root_cpudom_var(status) */ | ||||
| 
 | ||||
| static inline void __ipipe_stall_root(void) | ||||
|  | ||||
| @ -61,20 +61,38 @@ void __ipipe_restore_root(unsigned long flags); | ||||
| #define raw_irqs_disabled_flags(flags)	(!irqs_enabled_from_flags_hw(flags)) | ||||
| #define local_test_iflag_hw(x)		irqs_enabled_from_flags_hw(x) | ||||
| 
 | ||||
| #define local_save_flags(x)						\ | ||||
| 	do {								\ | ||||
| 		(x) = __ipipe_test_root() ? \ | ||||
| #define local_save_flags(x)					 \ | ||||
| 	do {							 \ | ||||
| 		(x) = __ipipe_test_root() ?			 \ | ||||
| 			__all_masked_irq_flags : bfin_irq_flags; \ | ||||
| 		barrier();					 \ | ||||
| 	} while (0) | ||||
| 
 | ||||
| #define local_irq_save(x)				\ | ||||
| 	do {						\ | ||||
| 		(x) = __ipipe_test_and_stall_root();	\ | ||||
| #define local_irq_save(x)					 \ | ||||
| 	do {						 	 \ | ||||
| 		(x) = __ipipe_test_and_stall_root() ?		 \ | ||||
| 			__all_masked_irq_flags : bfin_irq_flags; \ | ||||
| 		barrier();					 \ | ||||
| 	} while (0) | ||||
| 
 | ||||
| #define local_irq_restore(x)	__ipipe_restore_root(x) | ||||
| #define local_irq_disable()	__ipipe_stall_root() | ||||
| #define local_irq_enable()	__ipipe_unstall_root() | ||||
| static inline void local_irq_restore(unsigned long x) | ||||
| { | ||||
| 	barrier(); | ||||
| 	__ipipe_restore_root(x == __all_masked_irq_flags); | ||||
| } | ||||
| 
 | ||||
| #define local_irq_disable()			\ | ||||
| 	do {					\ | ||||
| 		__ipipe_stall_root();		\ | ||||
| 		barrier();			\ | ||||
| 	} while (0) | ||||
| 
 | ||||
| static inline void local_irq_enable(void) | ||||
| { | ||||
| 	barrier(); | ||||
| 	__ipipe_unstall_root(); | ||||
| } | ||||
| 
 | ||||
| #define irqs_disabled()		__ipipe_test_root() | ||||
| 
 | ||||
| #define local_save_flags_hw(x) \ | ||||
|  | ||||
| @ -122,6 +122,7 @@ static inline struct thread_info *current_thread_info(void) | ||||
| #define TIF_MEMDIE              4 | ||||
| #define TIF_RESTORE_SIGMASK	5	/* restore signal mask in do_signal() */ | ||||
| #define TIF_FREEZE              6       /* is freezing for suspend */ | ||||
| #define TIF_IRQ_SYNC            7       /* sync pipeline stage */ | ||||
| 
 | ||||
| /* as above, but as bit values */ | ||||
| #define _TIF_SYSCALL_TRACE	(1<<TIF_SYSCALL_TRACE) | ||||
| @ -130,6 +131,7 @@ static inline struct thread_info *current_thread_info(void) | ||||
| #define _TIF_POLLING_NRFLAG	(1<<TIF_POLLING_NRFLAG) | ||||
| #define _TIF_RESTORE_SIGMASK	(1<<TIF_RESTORE_SIGMASK) | ||||
| #define _TIF_FREEZE             (1<<TIF_FREEZE) | ||||
| #define _TIF_IRQ_SYNC           (1<<TIF_IRQ_SYNC) | ||||
| 
 | ||||
| #define _TIF_WORK_MASK		0x0000FFFE	/* work to do on interrupt/exception return */ | ||||
| 
 | ||||
|  | ||||
| @ -15,13 +15,15 @@ else | ||||
|     obj-y += time.o | ||||
| endif | ||||
| 
 | ||||
| CFLAGS_kgdb_test.o := -mlong-calls -O0 | ||||
| 
 | ||||
| obj-$(CONFIG_IPIPE)                  += ipipe.o | ||||
| obj-$(CONFIG_IPIPE_TRACE_MCOUNT)     += mcount.o | ||||
| obj-$(CONFIG_BFIN_GPTIMERS)          += gptimers.o | ||||
| obj-$(CONFIG_CPLB_INFO)              += cplbinfo.o | ||||
| obj-$(CONFIG_MODULES)                += module.o | ||||
| obj-$(CONFIG_KGDB)                   += kgdb.o | ||||
| obj-$(CONFIG_KGDB_TESTCASE)          += kgdb_test.o | ||||
| obj-$(CONFIG_KGDB_TESTS)             += kgdb_test.o | ||||
| obj-$(CONFIG_EARLY_PRINTK)           += early_printk.o | ||||
| 
 | ||||
| # the kgdb test puts code into L2 and without linker
 | ||||
| # relaxation, we need to force long calls to/from it
 | ||||
| CFLAGS_kgdb_test.o := -mlong-calls -O0 | ||||
|  | ||||
| @ -53,9 +53,13 @@ void __init generate_cplb_tables_cpu(unsigned int cpu) | ||||
| 
 | ||||
| 	i_d = i_i = 0; | ||||
| 
 | ||||
| #ifdef CONFIG_DEBUG_HUNT_FOR_ZERO | ||||
| 	/* Set up the zero page.  */ | ||||
| 	d_tbl[i_d].addr = 0; | ||||
| 	d_tbl[i_d++].data = SDRAM_OOPS | PAGE_SIZE_1KB; | ||||
| 	i_tbl[i_i].addr = 0; | ||||
| 	i_tbl[i_i++].data = SDRAM_OOPS | PAGE_SIZE_1KB; | ||||
| #endif | ||||
| 
 | ||||
| 	/* Cover kernel memory with 4M pages.  */ | ||||
| 	addr = 0; | ||||
|  | ||||
| @ -35,14 +35,8 @@ | ||||
| #include <asm/atomic.h> | ||||
| #include <asm/io.h> | ||||
| 
 | ||||
| static int create_irq_threads; | ||||
| 
 | ||||
| DEFINE_PER_CPU(struct pt_regs, __ipipe_tick_regs); | ||||
| 
 | ||||
| static DEFINE_PER_CPU(unsigned long, pending_irqthread_mask); | ||||
| 
 | ||||
| static DEFINE_PER_CPU(int [IVG13 + 1], pending_irq_count); | ||||
| 
 | ||||
| asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs); | ||||
| 
 | ||||
| static void __ipipe_no_irqtail(void); | ||||
| @ -93,6 +87,7 @@ void __ipipe_enable_pipeline(void) | ||||
|  */ | ||||
| void __ipipe_handle_irq(unsigned irq, struct pt_regs *regs) | ||||
| { | ||||
| 	struct ipipe_percpu_domain_data *p = ipipe_root_cpudom_ptr(); | ||||
| 	struct ipipe_domain *this_domain, *next_domain; | ||||
| 	struct list_head *head, *pos; | ||||
| 	int m_ack, s = -1; | ||||
| @ -104,7 +99,6 @@ void __ipipe_handle_irq(unsigned irq, struct pt_regs *regs) | ||||
| 	 * interrupt. | ||||
| 	 */ | ||||
| 	m_ack = (regs == NULL || irq == IRQ_SYSTMR || irq == IRQ_CORETMR); | ||||
| 
 | ||||
| 	this_domain = ipipe_current_domain; | ||||
| 
 | ||||
| 	if (unlikely(test_bit(IPIPE_STICKY_FLAG, &this_domain->irqs[irq].control))) | ||||
| @ -114,49 +108,28 @@ void __ipipe_handle_irq(unsigned irq, struct pt_regs *regs) | ||||
| 		next_domain = list_entry(head, struct ipipe_domain, p_link); | ||||
| 		if (likely(test_bit(IPIPE_WIRED_FLAG, &next_domain->irqs[irq].control))) { | ||||
| 			if (!m_ack && next_domain->irqs[irq].acknowledge != NULL) | ||||
| 				next_domain->irqs[irq].acknowledge(irq, irq_desc + irq); | ||||
| 			if (test_bit(IPIPE_ROOTLOCK_FLAG, &ipipe_root_domain->flags)) | ||||
| 				s = __test_and_set_bit(IPIPE_STALL_FLAG, | ||||
| 						       &ipipe_root_cpudom_var(status)); | ||||
| 				next_domain->irqs[irq].acknowledge(irq, irq_to_desc(irq)); | ||||
| 			if (test_bit(IPIPE_SYNCDEFER_FLAG, &p->status)) | ||||
| 				s = __test_and_set_bit(IPIPE_STALL_FLAG, &p->status); | ||||
| 			__ipipe_dispatch_wired(next_domain, irq); | ||||
| 				goto finalize; | ||||
| 			return; | ||||
| 			goto out; | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	/* Ack the interrupt. */ | ||||
| 
 | ||||
| 	pos = head; | ||||
| 
 | ||||
| 	while (pos != &__ipipe_pipeline) { | ||||
| 		next_domain = list_entry(pos, struct ipipe_domain, p_link); | ||||
| 		/*
 | ||||
| 		 * For each domain handling the incoming IRQ, mark it | ||||
| 		 * as pending in its log. | ||||
| 		 */ | ||||
| 		if (test_bit(IPIPE_HANDLE_FLAG, &next_domain->irqs[irq].control)) { | ||||
| 			/*
 | ||||
| 			 * Domains that handle this IRQ are polled for | ||||
| 			 * acknowledging it by decreasing priority | ||||
| 			 * order. The interrupt must be made pending | ||||
| 			 * _first_ in the domain's status flags before | ||||
| 			 * the PIC is unlocked. | ||||
| 			 */ | ||||
| 			__ipipe_set_irq_pending(next_domain, irq); | ||||
| 
 | ||||
| 			if (!m_ack && next_domain->irqs[irq].acknowledge != NULL) { | ||||
| 				next_domain->irqs[irq].acknowledge(irq, irq_desc + irq); | ||||
| 				next_domain->irqs[irq].acknowledge(irq, irq_to_desc(irq)); | ||||
| 				m_ack = 1; | ||||
| 			} | ||||
| 		} | ||||
| 
 | ||||
| 		/*
 | ||||
| 		 * If the domain does not want the IRQ to be passed | ||||
| 		 * down the interrupt pipe, exit the loop now. | ||||
| 		 */ | ||||
| 		if (!test_bit(IPIPE_PASS_FLAG, &next_domain->irqs[irq].control)) | ||||
| 			break; | ||||
| 
 | ||||
| 		pos = next_domain->p_link.next; | ||||
| 	} | ||||
| 
 | ||||
| @ -166,18 +139,24 @@ void __ipipe_handle_irq(unsigned irq, struct pt_regs *regs) | ||||
| 	 * immediately to the current domain if the interrupt has been | ||||
| 	 * marked as 'sticky'. This search does not go beyond the | ||||
| 	 * current domain in the pipeline. We also enforce the | ||||
| 	 * additional root stage lock (blackfin-specific). */ | ||||
| 	 * additional root stage lock (blackfin-specific). | ||||
| 	 */ | ||||
| 	if (test_bit(IPIPE_SYNCDEFER_FLAG, &p->status)) | ||||
| 		s = __test_and_set_bit(IPIPE_STALL_FLAG, &p->status); | ||||
| 
 | ||||
| 	if (test_bit(IPIPE_ROOTLOCK_FLAG, &ipipe_root_domain->flags)) | ||||
| 		s = __test_and_set_bit(IPIPE_STALL_FLAG, | ||||
| 				       &ipipe_root_cpudom_var(status)); | ||||
| finalize: | ||||
| 	/*
 | ||||
| 	 * If the interrupt preempted the head domain, then do not | ||||
| 	 * even try to walk the pipeline, unless an interrupt is | ||||
| 	 * pending for it. | ||||
| 	 */ | ||||
| 	if (test_bit(IPIPE_AHEAD_FLAG, &this_domain->flags) && | ||||
| 	    ipipe_head_cpudom_var(irqpend_himask) == 0) | ||||
| 		goto out; | ||||
| 
 | ||||
| 	__ipipe_walk_pipeline(head); | ||||
| 
 | ||||
| out: | ||||
| 	if (!s) | ||||
| 		__clear_bit(IPIPE_STALL_FLAG, | ||||
| 			    &ipipe_root_cpudom_var(status)); | ||||
| 		__clear_bit(IPIPE_STALL_FLAG, &p->status); | ||||
| } | ||||
| 
 | ||||
| int __ipipe_check_root(void) | ||||
| @ -187,7 +166,7 @@ int __ipipe_check_root(void) | ||||
| 
 | ||||
| void __ipipe_enable_irqdesc(struct ipipe_domain *ipd, unsigned irq) | ||||
| { | ||||
| 	struct irq_desc *desc = irq_desc + irq; | ||||
| 	struct irq_desc *desc = irq_to_desc(irq); | ||||
| 	int prio = desc->ic_prio; | ||||
| 
 | ||||
| 	desc->depth = 0; | ||||
| @ -199,7 +178,7 @@ EXPORT_SYMBOL(__ipipe_enable_irqdesc); | ||||
| 
 | ||||
| void __ipipe_disable_irqdesc(struct ipipe_domain *ipd, unsigned irq) | ||||
| { | ||||
| 	struct irq_desc *desc = irq_desc + irq; | ||||
| 	struct irq_desc *desc = irq_to_desc(irq); | ||||
| 	int prio = desc->ic_prio; | ||||
| 
 | ||||
| 	if (ipd != &ipipe_root && | ||||
| @ -236,15 +215,18 @@ int __ipipe_syscall_root(struct pt_regs *regs) | ||||
| { | ||||
| 	unsigned long flags; | ||||
| 
 | ||||
| 	/* We need to run the IRQ tail hook whenever we don't
 | ||||
| 	/*
 | ||||
| 	 * We need to run the IRQ tail hook whenever we don't | ||||
| 	 * propagate a syscall to higher domains, because we know that | ||||
| 	 * important operations might be pending there (e.g. Xenomai | ||||
| 	 * deferred rescheduling). */ | ||||
| 	 * deferred rescheduling). | ||||
| 	 */ | ||||
| 
 | ||||
| 	if (!__ipipe_syscall_watched_p(current, regs->orig_p0)) { | ||||
| 	if (regs->orig_p0 < NR_syscalls) { | ||||
| 		void (*hook)(void) = (void (*)(void))__ipipe_irq_tail_hook; | ||||
| 		hook(); | ||||
| 		return 0; | ||||
| 		if ((current->flags & PF_EVNOTIFY) == 0) | ||||
| 			return 0; | ||||
| 	} | ||||
| 
 | ||||
| 	/*
 | ||||
| @ -312,112 +294,46 @@ int ipipe_trigger_irq(unsigned irq) | ||||
| { | ||||
| 	unsigned long flags; | ||||
| 
 | ||||
| #ifdef CONFIG_IPIPE_DEBUG | ||||
| 	if (irq >= IPIPE_NR_IRQS || | ||||
| 	    (ipipe_virtual_irq_p(irq) | ||||
| 	     && !test_bit(irq - IPIPE_VIRQ_BASE, &__ipipe_virtual_irq_map))) | ||||
| 		return -EINVAL; | ||||
| #endif | ||||
| 
 | ||||
| 	local_irq_save_hw(flags); | ||||
| 
 | ||||
| 	__ipipe_handle_irq(irq, NULL); | ||||
| 
 | ||||
| 	local_irq_restore_hw(flags); | ||||
| 
 | ||||
| 	return 1; | ||||
| } | ||||
| 
 | ||||
| /* Move Linux IRQ to threads. */ | ||||
| 
 | ||||
| static int do_irqd(void *__desc) | ||||
| asmlinkage void __ipipe_sync_root(void) | ||||
| { | ||||
| 	struct irq_desc *desc = __desc; | ||||
| 	unsigned irq = desc - irq_desc; | ||||
| 	int thrprio = desc->thr_prio; | ||||
| 	int thrmask = 1 << thrprio; | ||||
| 	int cpu = smp_processor_id(); | ||||
| 	cpumask_t cpumask; | ||||
| 	unsigned long flags; | ||||
| 
 | ||||
| 	sigfillset(¤t->blocked); | ||||
| 	current->flags |= PF_NOFREEZE; | ||||
| 	cpumask = cpumask_of_cpu(cpu); | ||||
| 	set_cpus_allowed(current, cpumask); | ||||
| 	ipipe_setscheduler_root(current, SCHED_FIFO, 50 + thrprio); | ||||
| 	BUG_ON(irqs_disabled()); | ||||
| 
 | ||||
| 	while (!kthread_should_stop()) { | ||||
| 		local_irq_disable(); | ||||
| 		if (!(desc->status & IRQ_SCHEDULED)) { | ||||
| 			set_current_state(TASK_INTERRUPTIBLE); | ||||
| resched: | ||||
| 			local_irq_enable(); | ||||
| 			schedule(); | ||||
| 			local_irq_disable(); | ||||
| 		} | ||||
| 		__set_current_state(TASK_RUNNING); | ||||
| 		/*
 | ||||
| 		 * If higher priority interrupt servers are ready to | ||||
| 		 * run, reschedule immediately. We need this for the | ||||
| 		 * GPIO demux IRQ handler to unmask the interrupt line | ||||
| 		 * _last_, after all GPIO IRQs have run. | ||||
| 		 */ | ||||
| 		if (per_cpu(pending_irqthread_mask, cpu) & ~(thrmask|(thrmask-1))) | ||||
| 			goto resched; | ||||
| 		if (--per_cpu(pending_irq_count[thrprio], cpu) == 0) | ||||
| 			per_cpu(pending_irqthread_mask, cpu) &= ~thrmask; | ||||
| 		desc->status &= ~IRQ_SCHEDULED; | ||||
| 		desc->thr_handler(irq, &__raw_get_cpu_var(__ipipe_tick_regs)); | ||||
| 		local_irq_enable(); | ||||
| 	} | ||||
| 	__set_current_state(TASK_RUNNING); | ||||
| 	return 0; | ||||
| 	local_irq_save_hw(flags); | ||||
| 
 | ||||
| 	clear_thread_flag(TIF_IRQ_SYNC); | ||||
| 
 | ||||
| 	if (ipipe_root_cpudom_var(irqpend_himask) != 0) | ||||
| 		__ipipe_sync_pipeline(IPIPE_IRQMASK_ANY); | ||||
| 
 | ||||
| 	local_irq_restore_hw(flags); | ||||
| } | ||||
| 
 | ||||
| static void kick_irqd(unsigned irq, void *cookie) | ||||
| void ___ipipe_sync_pipeline(unsigned long syncmask) | ||||
| { | ||||
| 	struct irq_desc *desc = irq_desc + irq; | ||||
| 	int thrprio = desc->thr_prio; | ||||
| 	int thrmask = 1 << thrprio; | ||||
| 	int cpu = smp_processor_id(); | ||||
| 	struct ipipe_domain *ipd = ipipe_current_domain; | ||||
| 
 | ||||
| 	if (!(desc->status & IRQ_SCHEDULED)) { | ||||
| 		desc->status |= IRQ_SCHEDULED; | ||||
| 		per_cpu(pending_irqthread_mask, cpu) |= thrmask; | ||||
| 		++per_cpu(pending_irq_count[thrprio], cpu); | ||||
| 		wake_up_process(desc->thread); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| int ipipe_start_irq_thread(unsigned irq, struct irq_desc *desc) | ||||
| { | ||||
| 	if (desc->thread || !create_irq_threads) | ||||
| 		return 0; | ||||
| 
 | ||||
| 	desc->thread = kthread_create(do_irqd, desc, "IRQ %d", irq); | ||||
| 	if (desc->thread == NULL) { | ||||
| 		printk(KERN_ERR "irqd: could not create IRQ thread %d!\n", irq); | ||||
| 		return -ENOMEM; | ||||
| 	if (ipd == ipipe_root_domain) { | ||||
| 		if (test_bit(IPIPE_SYNCDEFER_FLAG, &ipipe_root_cpudom_var(status))) | ||||
| 			return; | ||||
| 	} | ||||
| 
 | ||||
| 	wake_up_process(desc->thread); | ||||
| 
 | ||||
| 	desc->thr_handler = ipipe_root_domain->irqs[irq].handler; | ||||
| 	ipipe_root_domain->irqs[irq].handler = &kick_irqd; | ||||
| 
 | ||||
| 	return 0; | ||||
| } | ||||
| 
 | ||||
| void __init ipipe_init_irq_threads(void) | ||||
| { | ||||
| 	unsigned irq; | ||||
| 	struct irq_desc *desc; | ||||
| 
 | ||||
| 	create_irq_threads = 1; | ||||
| 
 | ||||
| 	for (irq = 0; irq < NR_IRQS; irq++) { | ||||
| 		desc = irq_desc + irq; | ||||
| 		if (desc->action != NULL || | ||||
| 			(desc->status & IRQ_NOREQUEST) != 0) | ||||
| 			ipipe_start_irq_thread(irq, desc); | ||||
| 	} | ||||
| 	__ipipe_sync_stage(syncmask); | ||||
| } | ||||
| 
 | ||||
| EXPORT_SYMBOL(show_stack); | ||||
|  | ||||
| @ -144,11 +144,15 @@ asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs) | ||||
| #endif | ||||
| 	generic_handle_irq(irq); | ||||
| 
 | ||||
| #ifndef CONFIG_IPIPE	/* Useless and bugous over the I-pipe: IRQs are threaded. */ | ||||
| 	/* If we're the only interrupt running (ignoring IRQ15 which is for
 | ||||
| 	   syscalls), lower our priority to IRQ14 so that softirqs run at | ||||
| 	   that level.  If there's another, lower-level interrupt, irq_exit | ||||
| 	   will defer softirqs to that.  */ | ||||
| #ifndef CONFIG_IPIPE | ||||
| 	/*
 | ||||
| 	 * If we're the only interrupt running (ignoring IRQ15 which | ||||
| 	 * is for syscalls), lower our priority to IRQ14 so that | ||||
| 	 * softirqs run at that level.  If there's another, | ||||
| 	 * lower-level interrupt, irq_exit will defer softirqs to | ||||
| 	 * that. If the interrupt pipeline is enabled, we are already | ||||
| 	 * running at IRQ14 priority, so we don't need this code. | ||||
| 	 */ | ||||
| 	CSYNC(); | ||||
| 	pending = bfin_read_IPEND() & ~0x8000; | ||||
| 	other_ints = pending & (pending - 1); | ||||
|  | ||||
| @ -20,6 +20,7 @@ | ||||
| static char cmdline[256]; | ||||
| static unsigned long len; | ||||
| 
 | ||||
| #ifndef CONFIG_SMP | ||||
| static int num1 __attribute__((l1_data)); | ||||
| 
 | ||||
| void kgdb_l1_test(void) __attribute__((l1_text)); | ||||
| @ -32,6 +33,8 @@ void kgdb_l1_test(void) | ||||
| 	printk(KERN_ALERT "L1(after change) : data variable addr = 0x%p, data value is %d\n", &num1, num1); | ||||
| 	return ; | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| #if L2_LENGTH | ||||
| 
 | ||||
| static int num2 __attribute__((l2)); | ||||
| @ -59,10 +62,12 @@ int kgdb_test(char *name, int len, int count, int z) | ||||
| static int test_proc_output(char *buf) | ||||
| { | ||||
| 	kgdb_test("hello world!", 12, 0x55, 0x10); | ||||
| #ifndef CONFIG_SMP | ||||
| 	kgdb_l1_test(); | ||||
| 	#if L2_LENGTH | ||||
| #endif | ||||
| #if L2_LENGTH | ||||
| 	kgdb_l2_test(); | ||||
| 	#endif | ||||
| #endif | ||||
| 
 | ||||
| 	return 0; | ||||
| } | ||||
|  | ||||
| @ -45,6 +45,7 @@ | ||||
| #include <asm/asm-offsets.h> | ||||
| #include <asm/dma.h> | ||||
| #include <asm/fixed_code.h> | ||||
| #include <asm/cacheflush.h> | ||||
| #include <asm/mem_map.h> | ||||
| 
 | ||||
| #define TEXT_OFFSET 0 | ||||
| @ -240,7 +241,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | ||||
| 
 | ||||
| 			} else if (addr >= FIXED_CODE_START | ||||
| 			    && addr + sizeof(tmp) <= FIXED_CODE_END) { | ||||
| 				memcpy(&tmp, (const void *)(addr), sizeof(tmp)); | ||||
| 				copy_from_user_page(0, 0, 0, &tmp, (const void *)(addr), sizeof(tmp)); | ||||
| 				copied = sizeof(tmp); | ||||
| 
 | ||||
| 			} else | ||||
| @ -320,7 +321,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | ||||
| 
 | ||||
| 			} else if (addr >= FIXED_CODE_START | ||||
| 			    && addr + sizeof(data) <= FIXED_CODE_END) { | ||||
| 				memcpy((void *)(addr), &data, sizeof(data)); | ||||
| 				copy_to_user_page(0, 0, 0, (void *)(addr), &data, sizeof(data)); | ||||
| 				copied = sizeof(data); | ||||
| 
 | ||||
| 			} else | ||||
|  | ||||
| @ -889,6 +889,10 @@ void __init setup_arch(char **cmdline_p) | ||||
| 			       CPU, bfin_revid()); | ||||
| 	} | ||||
| 
 | ||||
| 	/* We can't run on BF548-0.1 due to ANOMALY 05000448 */ | ||||
| 	if (bfin_cpuid() == 0x27de && bfin_revid() == 1) | ||||
| 		panic("You can't run on this processor due to 05000448\n"); | ||||
| 
 | ||||
| 	printk(KERN_INFO "Blackfin Linux support by http://blackfin.uclinux.org/\n"); | ||||
| 
 | ||||
| 	printk(KERN_INFO "Processor Speed: %lu MHz core clock and %lu MHz System Clock\n", | ||||
| @ -1141,12 +1145,12 @@ static int show_cpuinfo(struct seq_file *m, void *v) | ||||
| 		icache_size = 0; | ||||
| 
 | ||||
| 	seq_printf(m, "cache size\t: %d KB(L1 icache) " | ||||
| 		"%d KB(L1 dcache-%s) %d KB(L2 cache)\n", | ||||
| 		"%d KB(L1 dcache%s) %d KB(L2 cache)\n", | ||||
| 		icache_size, dcache_size, | ||||
| #if defined CONFIG_BFIN_WB | ||||
| 		"wb" | ||||
| 		"-wb" | ||||
| #elif defined CONFIG_BFIN_WT | ||||
| 		"wt" | ||||
| 		"-wt" | ||||
| #endif | ||||
| 		"", 0); | ||||
| 
 | ||||
|  | ||||
| @ -134,7 +134,10 @@ irqreturn_t timer_interrupt(int irq, void *dummy) | ||||
| 
 | ||||
| 	write_seqlock(&xtime_lock); | ||||
| #if defined(CONFIG_TICK_SOURCE_SYSTMR0) && !defined(CONFIG_IPIPE) | ||||
| /* FIXME: Here TIMIL0 is not set when IPIPE enabled, why? */ | ||||
| 	/*
 | ||||
| 	 * TIMIL0 is latched in __ipipe_grab_irq() when the I-Pipe is | ||||
| 	 * enabled. | ||||
| 	 */ | ||||
| 	if (get_gptimer_status(0) & TIMER_STATUS_TIMIL0) { | ||||
| #endif | ||||
| 		do_timer(1); | ||||
|  | ||||
| @ -113,7 +113,6 @@ static struct platform_device bfin_mac_device = { | ||||
| 	.name = "bfin_mac", | ||||
| 	.dev.platform_data = &bfin_mii_bus, | ||||
| }; | ||||
| #endif | ||||
| 
 | ||||
| #if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) | ||||
| static struct dsa_platform_data ksz8893m_switch_data = { | ||||
| @ -132,6 +131,7 @@ static struct platform_device ksz8893m_switch_device = { | ||||
| 	.dev.platform_data = &ksz8893m_switch_data, | ||||
| }; | ||||
| #endif | ||||
| #endif | ||||
| 
 | ||||
| #if defined(CONFIG_MTD_M25P80) \ | ||||
| 	|| defined(CONFIG_MTD_M25P80_MODULE) | ||||
| @ -171,6 +171,7 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = { | ||||
| }; | ||||
| #endif | ||||
| 
 | ||||
| #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | ||||
| #if defined(CONFIG_NET_DSA_KSZ8893M) \ | ||||
| 	|| defined(CONFIG_NET_DSA_KSZ8893M_MODULE) | ||||
| /* SPI SWITCH CHIP */ | ||||
| @ -179,10 +180,11 @@ static struct bfin5xx_spi_chip spi_switch_info = { | ||||
| 	.bits_per_word = 8, | ||||
| }; | ||||
| #endif | ||||
| #endif | ||||
| 
 | ||||
| #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) | ||||
| static struct bfin5xx_spi_chip spi_mmc_chip_info = { | ||||
| 	.enable_dma = 1, | ||||
| #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | ||||
| static struct bfin5xx_spi_chip mmc_spi_chip_info = { | ||||
| 	.enable_dma = 0, | ||||
| 	.bits_per_word = 8, | ||||
| }; | ||||
| #endif | ||||
| @ -259,6 +261,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | ||||
| 	}, | ||||
| #endif | ||||
| 
 | ||||
| #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | ||||
| #if defined(CONFIG_NET_DSA_KSZ8893M) \ | ||||
| 	|| defined(CONFIG_NET_DSA_KSZ8893M_MODULE) | ||||
| 	{ | ||||
| @ -271,24 +274,15 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | ||||
| 		.mode = SPI_MODE_3, | ||||
| 	}, | ||||
| #endif | ||||
| #endif | ||||
| 
 | ||||
| #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) | ||||
| #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | ||||
| 	{ | ||||
| 		.modalias = "spi_mmc_dummy", | ||||
| 		.modalias = "mmc_spi", | ||||
| 		.max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */ | ||||
| 		.bus_num = 0, | ||||
| 		.chip_select = 0, | ||||
| 		.platform_data = NULL, | ||||
| 		.controller_data = &spi_mmc_chip_info, | ||||
| 		.mode = SPI_MODE_3, | ||||
| 	}, | ||||
| 	{ | ||||
| 		.modalias = "spi_mmc", | ||||
| 		.max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */ | ||||
| 		.bus_num = 0, | ||||
| 		.chip_select = CONFIG_SPI_MMC_CS_CHAN, | ||||
| 		.platform_data = NULL, | ||||
| 		.controller_data = &spi_mmc_chip_info, | ||||
| 		.chip_select = 5, | ||||
| 		.controller_data = &mmc_spi_chip_info, | ||||
| 		.mode = SPI_MODE_3, | ||||
| 	}, | ||||
| #endif | ||||
| @ -630,11 +624,10 @@ static struct platform_device *stamp_devices[] __initdata = { | ||||
| #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | ||||
| 	&bfin_mii_bus, | ||||
| 	&bfin_mac_device, | ||||
| #endif | ||||
| 
 | ||||
| #if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) | ||||
| 	&ksz8893m_switch_device, | ||||
| #endif | ||||
| #endif | ||||
| 
 | ||||
| #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||||
| 	&bfin_spi0_device, | ||||
|  | ||||
| @ -2,12 +2,12 @@ | ||||
|  * File: include/asm-blackfin/mach-bf518/anomaly.h | ||||
|  * Bugs: Enter bugs at http://blackfin.uclinux.org/
 | ||||
|  * | ||||
|  * Copyright (C) 2004-2008 Analog Devices Inc. | ||||
|  * Copyright (C) 2004-2009 Analog Devices Inc. | ||||
|  * Licensed under the GPL-2 or later. | ||||
|  */ | ||||
| 
 | ||||
| /* This file shoule be up to date with:
 | ||||
|  *  - ???? | ||||
|  *  - Revision B, 02/03/2009; ADSP-BF512/BF514/BF516/BF518 Blackfin Processor Anomaly List | ||||
|  */ | ||||
| 
 | ||||
| #ifndef _MACH_ANOMALY_H_ | ||||
| @ -19,6 +19,8 @@ | ||||
| #define ANOMALY_05000122 (1) | ||||
| /* False Hardware Error from an Access in the Shadow of a Conditional Branch */ | ||||
| #define ANOMALY_05000245 (1) | ||||
| /* Incorrect Timer Pulse Width in Single-Shot PWM_OUT Mode with External Clock */ | ||||
| #define ANOMALY_05000254 (1) | ||||
| /* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */ | ||||
| #define ANOMALY_05000265 (1) | ||||
| /* False Hardware Errors Caused by Fetches at the Boundary of Reserved Memory */ | ||||
| @ -53,6 +55,12 @@ | ||||
| #define ANOMALY_05000443 (1) | ||||
| /* Incorrect L1 Instruction Bank B Memory Map Location */ | ||||
| #define ANOMALY_05000444 (1) | ||||
| /* Incorrect Default Hysteresis Setting for RESET, NMI, and BMODE Signals */ | ||||
| #define ANOMALY_05000452 (1) | ||||
| /* PWM_TRIPB Signal Not Available on PG10 */ | ||||
| #define ANOMALY_05000453 (1) | ||||
| /* PPI_FS3 is Driven One Half Cycle Later Than PPI Data */ | ||||
| #define ANOMALY_05000455 (1) | ||||
| 
 | ||||
| /* Anomalies that don't exist on this proc */ | ||||
| #define ANOMALY_05000125 (0) | ||||
| @ -65,15 +73,20 @@ | ||||
| #define ANOMALY_05000263 (0) | ||||
| #define ANOMALY_05000266 (0) | ||||
| #define ANOMALY_05000273 (0) | ||||
| #define ANOMALY_05000278 (0) | ||||
| #define ANOMALY_05000285 (0) | ||||
| #define ANOMALY_05000305 (0) | ||||
| #define ANOMALY_05000307 (0) | ||||
| #define ANOMALY_05000311 (0) | ||||
| #define ANOMALY_05000312 (0) | ||||
| #define ANOMALY_05000323 (0) | ||||
| #define ANOMALY_05000353 (0) | ||||
| #define ANOMALY_05000363 (0) | ||||
| #define ANOMALY_05000380 (0) | ||||
| #define ANOMALY_05000386 (0) | ||||
| #define ANOMALY_05000412 (0) | ||||
| #define ANOMALY_05000432 (0) | ||||
| #define ANOMALY_05000447 (0) | ||||
| #define ANOMALY_05000448 (0) | ||||
| 
 | ||||
| #endif | ||||
|  | ||||
| @ -144,7 +144,7 @@ struct bfin_serial_res bfin_serial_resource[] = { | ||||
| 	 CH_UART0_TX, | ||||
| 	 CH_UART0_RX, | ||||
| #endif | ||||
| #ifdef CONFIG_BFIN_UART0_CTSRTS | ||||
| #ifdef CONFIG_SERIAL_BFIN_CTSRTS | ||||
| 	 CONFIG_UART0_CTS_PIN, | ||||
| 	 CONFIG_UART0_RTS_PIN, | ||||
| #endif | ||||
| @ -158,7 +158,7 @@ struct bfin_serial_res bfin_serial_resource[] = { | ||||
| 	 CH_UART1_TX, | ||||
| 	 CH_UART1_RX, | ||||
| #endif | ||||
| #ifdef CONFIG_BFIN_UART1_CTSRTS | ||||
| #ifdef CONFIG_SERIAL_BFIN_CTSRTS | ||||
| 	 CONFIG_UART1_CTS_PIN, | ||||
| 	 CONFIG_UART1_RTS_PIN, | ||||
| #endif | ||||
|  | ||||
| @ -487,9 +487,9 @@ static struct bfin5xx_spi_chip ad9960_spi_chip_info = { | ||||
| }; | ||||
| #endif | ||||
| 
 | ||||
| #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) | ||||
| static struct bfin5xx_spi_chip spi_mmc_chip_info = { | ||||
| 	.enable_dma = 1, | ||||
| #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | ||||
| static struct bfin5xx_spi_chip  mmc_spi_chip_info = { | ||||
| 	.enable_dma = 0, | ||||
| 	.bits_per_word = 8, | ||||
| }; | ||||
| #endif | ||||
| @ -585,23 +585,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | ||||
| 		.controller_data = &ad9960_spi_chip_info, | ||||
| 	}, | ||||
| #endif | ||||
| #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) | ||||
| #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | ||||
| 	{ | ||||
| 		.modalias = "spi_mmc_dummy", | ||||
| 		.max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */ | ||||
| 		.modalias = "mmc_spi", | ||||
| 		.max_speed_hz = 20000000,     /* max spi clock (SCK) speed in HZ */ | ||||
| 		.bus_num = 0, | ||||
| 		.chip_select = 0, | ||||
| 		.platform_data = NULL, | ||||
| 		.controller_data = &spi_mmc_chip_info, | ||||
| 		.mode = SPI_MODE_3, | ||||
| 	}, | ||||
| 	{ | ||||
| 		.modalias = "spi_mmc", | ||||
| 		.max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */ | ||||
| 		.bus_num = 0, | ||||
| 		.chip_select = CONFIG_SPI_MMC_CS_CHAN, | ||||
| 		.platform_data = NULL, | ||||
| 		.controller_data = &spi_mmc_chip_info, | ||||
| 		.chip_select = 5, | ||||
| 		.controller_data = &mmc_spi_chip_info, | ||||
| 		.mode = SPI_MODE_3, | ||||
| 	}, | ||||
| #endif | ||||
|  | ||||
| @ -256,9 +256,9 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = { | ||||
| }; | ||||
| #endif | ||||
| 
 | ||||
| #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) | ||||
| static struct bfin5xx_spi_chip spi_mmc_chip_info = { | ||||
| 	.enable_dma = 1, | ||||
| #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | ||||
| static struct bfin5xx_spi_chip mmc_spi_chip_info = { | ||||
| 	.enable_dma = 0, | ||||
| 	.bits_per_word = 8, | ||||
| }; | ||||
| #endif | ||||
| @ -366,23 +366,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | ||||
| 	}, | ||||
| #endif | ||||
| 
 | ||||
| #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) | ||||
| #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | ||||
| 	{ | ||||
| 		.modalias = "spi_mmc_dummy", | ||||
| 		.modalias = "mmc_spi", | ||||
| 		.max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */ | ||||
| 		.bus_num = 0, | ||||
| 		.chip_select = 0, | ||||
| 		.platform_data = NULL, | ||||
| 		.controller_data = &spi_mmc_chip_info, | ||||
| 		.mode = SPI_MODE_3, | ||||
| 	}, | ||||
| 	{ | ||||
| 		.modalias = "spi_mmc", | ||||
| 		.max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */ | ||||
| 		.bus_num = 0, | ||||
| 		.chip_select = CONFIG_SPI_MMC_CS_CHAN, | ||||
| 		.platform_data = NULL, | ||||
| 		.controller_data = &spi_mmc_chip_info, | ||||
| 		.chip_select = 5, | ||||
| 		.controller_data = &mmc_spi_chip_info, | ||||
| 		.mode = SPI_MODE_3, | ||||
| 	}, | ||||
| #endif | ||||
|  | ||||
| @ -2,7 +2,7 @@ | ||||
|  * File: include/asm-blackfin/mach-bf527/anomaly.h | ||||
|  * Bugs: Enter bugs at http://blackfin.uclinux.org/
 | ||||
|  * | ||||
|  * Copyright (C) 2004-2008 Analog Devices Inc. | ||||
|  * Copyright (C) 2004-2009 Analog Devices Inc. | ||||
|  * Licensed under the GPL-2 or later. | ||||
|  */ | ||||
| 
 | ||||
| @ -167,12 +167,16 @@ | ||||
| #define ANOMALY_05000263 (0) | ||||
| #define ANOMALY_05000266 (0) | ||||
| #define ANOMALY_05000273 (0) | ||||
| #define ANOMALY_05000278 (0) | ||||
| #define ANOMALY_05000285 (0) | ||||
| #define ANOMALY_05000305 (0) | ||||
| #define ANOMALY_05000307 (0) | ||||
| #define ANOMALY_05000311 (0) | ||||
| #define ANOMALY_05000312 (0) | ||||
| #define ANOMALY_05000323 (0) | ||||
| #define ANOMALY_05000363 (0) | ||||
| #define ANOMALY_05000412 (0) | ||||
| #define ANOMALY_05000447 (0) | ||||
| #define ANOMALY_05000448 (0) | ||||
| 
 | ||||
| #endif | ||||
|  | ||||
| @ -144,7 +144,7 @@ struct bfin_serial_res bfin_serial_resource[] = { | ||||
| 	 CH_UART0_TX, | ||||
| 	 CH_UART0_RX, | ||||
| #endif | ||||
| #ifdef CONFIG_BFIN_UART0_CTSRTS | ||||
| #ifdef CONFIG_SERIAL_BFIN_CTSRTS | ||||
| 	 CONFIG_UART0_CTS_PIN, | ||||
| 	 CONFIG_UART0_RTS_PIN, | ||||
| #endif | ||||
| @ -158,7 +158,7 @@ struct bfin_serial_res bfin_serial_resource[] = { | ||||
| 	 CH_UART1_TX, | ||||
| 	 CH_UART1_RX, | ||||
| #endif | ||||
| #ifdef CONFIG_BFIN_UART1_CTSRTS | ||||
| #ifdef CONFIG_SERIAL_BFIN_CTSRTS | ||||
| 	 CONFIG_UART1_CTS_PIN, | ||||
| 	 CONFIG_UART1_RTS_PIN, | ||||
| #endif | ||||
|  | ||||
| @ -38,9 +38,4 @@ config BFIN532_IP0X | ||||
| 	help | ||||
| 	  Core support for IP04/IP04 open hardware IP-PBX. | ||||
| 
 | ||||
| config GENERIC_BF533_BOARD | ||||
| 	bool "Generic" | ||||
| 	help | ||||
| 	  Generic or Custom board support. | ||||
| 
 | ||||
| endchoice | ||||
|  | ||||
| @ -2,7 +2,6 @@ | ||||
| # arch/blackfin/mach-bf533/boards/Makefile
 | ||||
| #
 | ||||
| 
 | ||||
| obj-$(CONFIG_GENERIC_BF533_BOARD)      += generic_board.o | ||||
| obj-$(CONFIG_BFIN533_STAMP)            += stamp.o | ||||
| obj-$(CONFIG_BFIN532_IP0X)             += ip0x.o | ||||
| obj-$(CONFIG_BFIN533_EZKIT)            += ezkit.o | ||||
|  | ||||
| @ -101,9 +101,9 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { | ||||
| }; | ||||
| #endif | ||||
| 
 | ||||
| #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) | ||||
| static struct bfin5xx_spi_chip spi_mmc_chip_info = { | ||||
| 	.enable_dma = 1, | ||||
| #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | ||||
| static struct bfin5xx_spi_chip mmc_spi_chip_info = { | ||||
| 	.enable_dma = 0, | ||||
| 	.bits_per_word = 8, | ||||
| }; | ||||
| #endif | ||||
| @ -129,23 +129,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | ||||
| 	}, | ||||
| #endif | ||||
| 
 | ||||
| #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) | ||||
| #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | ||||
| 	{ | ||||
| 		.modalias = "spi_mmc_dummy", | ||||
| 		.modalias = "mmc_spi", | ||||
| 		.max_speed_hz = 20000000,     /* max spi clock (SCK) speed in HZ */ | ||||
| 		.bus_num = 0, | ||||
| 		.chip_select = 0, | ||||
| 		.platform_data = NULL, | ||||
| 		.controller_data = &spi_mmc_chip_info, | ||||
| 		.mode = SPI_MODE_3, | ||||
| 	}, | ||||
| 	{ | ||||
| 		.modalias = "spi_mmc", | ||||
| 		.max_speed_hz = 20000000,     /* max spi clock (SCK) speed in HZ */ | ||||
| 		.bus_num = 0, | ||||
| 		.chip_select = CONFIG_SPI_MMC_CS_CHAN, | ||||
| 		.platform_data = NULL, | ||||
| 		.controller_data = &spi_mmc_chip_info, | ||||
| 		.chip_select = 5, | ||||
| 		.controller_data = &mmc_spi_chip_info, | ||||
| 		.mode = SPI_MODE_3, | ||||
| 	}, | ||||
| #endif | ||||
|  | ||||
| @ -96,9 +96,9 @@ static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | ||||
| }; | ||||
| #endif | ||||
| 
 | ||||
| #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) | ||||
| static struct bfin5xx_spi_chip spi_mmc_chip_info = { | ||||
| 	.enable_dma = 1, | ||||
| #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | ||||
| static struct bfin5xx_spi_chip mmc_spi_chip_info = { | ||||
| 	.enable_dma = 0, | ||||
| 	.bits_per_word = 8, | ||||
| }; | ||||
| #endif | ||||
| @ -138,23 +138,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | ||||
| 	}, | ||||
| #endif | ||||
| 
 | ||||
| #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) | ||||
| #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | ||||
| 	{ | ||||
| 		.modalias = "spi_mmc_dummy", | ||||
| 		.modalias = "mmc_spi", | ||||
| 		.max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */ | ||||
| 		.bus_num = 0, | ||||
| 		.chip_select = 0, | ||||
| 		.platform_data = NULL, | ||||
| 		.controller_data = &spi_mmc_chip_info, | ||||
| 		.mode = SPI_MODE_3, | ||||
| 	}, | ||||
| 	{ | ||||
| 		.modalias = "spi_mmc", | ||||
| 		.max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */ | ||||
| 		.bus_num = 0, | ||||
| 		.chip_select = CONFIG_SPI_MMC_CS_CHAN, | ||||
| 		.platform_data = NULL, | ||||
| 		.controller_data = &spi_mmc_chip_info, | ||||
| 		.chip_select = 5, | ||||
| 		.controller_data = &mmc_spi_chip_info, | ||||
| 		.mode = SPI_MODE_3, | ||||
| 	}, | ||||
| #endif | ||||
|  | ||||
| @ -1,126 +0,0 @@ | ||||
| /*
 | ||||
|  * File:         arch/blackfin/mach-bf533/generic_board.c | ||||
|  * Based on:     arch/blackfin/mach-bf533/ezkit.c | ||||
|  * Author:       Aidan Williams <aidan@nicta.com.au> | ||||
|  * | ||||
|  * Created:      2005 | ||||
|  * Description: | ||||
|  * | ||||
|  * Modified: | ||||
|  *               Copyright 2005 National ICT Australia (NICTA) | ||||
|  *               Copyright 2004-2006 Analog Devices Inc. | ||||
|  * | ||||
|  * Bugs:         Enter bugs at http://blackfin.uclinux.org/
 | ||||
|  * | ||||
|  * 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, see the file COPYING, or write | ||||
|  * to the Free Software Foundation, Inc., | ||||
|  * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA | ||||
|  */ | ||||
| 
 | ||||
| #include <linux/device.h> | ||||
| #include <linux/platform_device.h> | ||||
| #include <linux/irq.h> | ||||
| 
 | ||||
| /*
 | ||||
|  * Name the Board for the /proc/cpuinfo | ||||
|  */ | ||||
| const char bfin_board_name[] = "UNKNOWN BOARD"; | ||||
| 
 | ||||
| #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | ||||
| static struct platform_device rtc_device = { | ||||
| 	.name = "rtc-bfin", | ||||
| 	.id   = -1, | ||||
| }; | ||||
| #endif | ||||
| 
 | ||||
| /*
 | ||||
|  *  Driver needs to know address, irq and flag pin. | ||||
|  */ | ||||
| #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | ||||
| static struct resource smc91x_resources[] = { | ||||
| 	{ | ||||
| 		.start = 0x20300300, | ||||
| 		.end = 0x20300300 + 16, | ||||
| 		.flags = IORESOURCE_MEM, | ||||
| 	}, { | ||||
| 		.start = IRQ_PROG_INTB, | ||||
| 		.end = IRQ_PROG_INTB, | ||||
| 		.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||||
| 	}, { | ||||
| 		.start = IRQ_PF7, | ||||
| 		.end = IRQ_PF7, | ||||
| 		.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||||
| 	}, | ||||
| }; | ||||
| 
 | ||||
| static struct platform_device smc91x_device = { | ||||
| 	.name = "smc91x", | ||||
| 	.id = 0, | ||||
| 	.num_resources = ARRAY_SIZE(smc91x_resources), | ||||
| 	.resource = smc91x_resources, | ||||
| }; | ||||
| #endif | ||||
| 
 | ||||
| #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | ||||
| #ifdef CONFIG_BFIN_SIR0 | ||||
| static struct resource bfin_sir0_resources[] = { | ||||
| 	{ | ||||
| 		.start = 0xFFC00400, | ||||
| 		.end = 0xFFC004FF, | ||||
| 		.flags = IORESOURCE_MEM, | ||||
| 	}, | ||||
| 	{ | ||||
| 		.start = IRQ_UART0_RX, | ||||
| 		.end = IRQ_UART0_RX+1, | ||||
| 		.flags = IORESOURCE_IRQ, | ||||
| 	}, | ||||
| 	{ | ||||
| 		.start = CH_UART0_RX, | ||||
| 		.end = CH_UART0_RX+1, | ||||
| 		.flags = IORESOURCE_DMA, | ||||
| 	}, | ||||
| }; | ||||
| 
 | ||||
| static struct platform_device bfin_sir0_device = { | ||||
| 	.name = "bfin_sir", | ||||
| 	.id = 0, | ||||
| 	.num_resources = ARRAY_SIZE(bfin_sir0_resources), | ||||
| 	.resource = bfin_sir0_resources, | ||||
| }; | ||||
| #endif | ||||
| #endif | ||||
| 
 | ||||
| static struct platform_device *generic_board_devices[] __initdata = { | ||||
| #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | ||||
| 	&rtc_device, | ||||
| #endif | ||||
| 
 | ||||
| #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | ||||
| 	&smc91x_device, | ||||
| #endif | ||||
| 
 | ||||
| #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | ||||
| #ifdef CONFIG_BFIN_SIR0 | ||||
| 	&bfin_sir0_device, | ||||
| #endif | ||||
| #endif | ||||
| }; | ||||
| 
 | ||||
| static int __init generic_board_init(void) | ||||
| { | ||||
| 	printk(KERN_INFO "%s(): registering device resources\n", __func__); | ||||
| 	return platform_add_devices(generic_board_devices, ARRAY_SIZE(generic_board_devices)); | ||||
| } | ||||
| 
 | ||||
| arch_initcall(generic_board_init); | ||||
| @ -127,8 +127,8 @@ static struct platform_device dm9000_device2 = { | ||||
| #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||||
| /* all SPI peripherals info goes here */ | ||||
| 
 | ||||
| #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) | ||||
| static struct bfin5xx_spi_chip spi_mmc_chip_info = { | ||||
| #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | ||||
| static struct bfin5xx_spi_chip mmc_spi_chip_info = { | ||||
| /*
 | ||||
|  * CPOL (Clock Polarity) | ||||
|  *  0 - Active high SCK | ||||
| @ -152,14 +152,13 @@ static struct bfin5xx_spi_chip spi_mmc_chip_info = { | ||||
| /* Notice: for blackfin, the speed_hz is the value of register
 | ||||
|  * SPI_BAUD, not the real baudrate */ | ||||
| static struct spi_board_info bfin_spi_board_info[] __initdata = { | ||||
| #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) | ||||
| #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | ||||
| 	{ | ||||
| 		.modalias = "spi_mmc", | ||||
| 		.modalias = "mmc_spi", | ||||
| 		.max_speed_hz = 2, | ||||
| 		.bus_num = 1, | ||||
| 		.chip_select = CONFIG_SPI_MMC_CS_CHAN, | ||||
| 		.platform_data = NULL, | ||||
| 		.controller_data = &spi_mmc_chip_info, | ||||
| 		.chip_select = 5, | ||||
| 		.controller_data = &mmc_spi_chip_info, | ||||
| 	}, | ||||
| #endif | ||||
| }; | ||||
|  | ||||
| @ -2,7 +2,7 @@ | ||||
|  * File: include/asm-blackfin/mach-bf533/anomaly.h | ||||
|  * Bugs: Enter bugs at http://blackfin.uclinux.org/
 | ||||
|  * | ||||
|  * Copyright (C) 2004-2008 Analog Devices Inc. | ||||
|  * Copyright (C) 2004-2009 Analog Devices Inc. | ||||
|  * Licensed under the GPL-2 or later. | ||||
|  */ | ||||
| 
 | ||||
| @ -160,7 +160,7 @@ | ||||
| #define ANOMALY_05000301 (__SILICON_REVISION__ < 6) | ||||
| /* SSYNCs After Writes To DMA MMR Registers May Not Be Handled Correctly */ | ||||
| #define ANOMALY_05000302 (__SILICON_REVISION__ < 5) | ||||
| /* New Feature: Additional Hysteresis on SPORT Input Pins (Not Available On Older Silicon) */ | ||||
| /* SPORT_HYS Bit in PLL_CTL Register Is Not Functional */ | ||||
| #define ANOMALY_05000305 (__SILICON_REVISION__ < 5) | ||||
| /* New Feature: Additional PPI Frame Sync Sampling Options (Not Available On Older Silicon) */ | ||||
| #define ANOMALY_05000306 (__SILICON_REVISION__ < 5) | ||||
| @ -278,9 +278,12 @@ | ||||
| #define ANOMALY_05000266 (0) | ||||
| #define ANOMALY_05000323 (0) | ||||
| #define ANOMALY_05000353 (1) | ||||
| #define ANOMALY_05000380 (0) | ||||
| #define ANOMALY_05000386 (1) | ||||
| #define ANOMALY_05000412 (0) | ||||
| #define ANOMALY_05000432 (0) | ||||
| #define ANOMALY_05000435 (0) | ||||
| #define ANOMALY_05000447 (0) | ||||
| #define ANOMALY_05000448 (0) | ||||
| 
 | ||||
| #endif | ||||
|  | ||||
| @ -134,7 +134,7 @@ struct bfin_serial_res bfin_serial_resource[] = { | ||||
| 	CH_UART_TX, | ||||
| 	CH_UART_RX, | ||||
| #endif | ||||
| #ifdef CONFIG_BFIN_UART0_CTSRTS | ||||
| #ifdef CONFIG_SERIAL_BFIN_CTSRTS | ||||
| 	CONFIG_UART0_CTS_PIN, | ||||
| 	CONFIG_UART0_RTS_PIN, | ||||
| #endif | ||||
|  | ||||
| @ -33,9 +33,4 @@ config CAMSIG_MINOTAUR | ||||
| 	help | ||||
| 	  Board supply package for CSP Minotaur | ||||
| 
 | ||||
| config GENERIC_BF537_BOARD | ||||
| 	bool "Generic" | ||||
| 	help | ||||
| 	  Generic or Custom board support. | ||||
| 
 | ||||
| endchoice | ||||
|  | ||||
| @ -2,7 +2,6 @@ | ||||
| # arch/blackfin/mach-bf537/boards/Makefile
 | ||||
| #
 | ||||
| 
 | ||||
| obj-$(CONFIG_GENERIC_BF537_BOARD)      += generic_board.o | ||||
| obj-$(CONFIG_BFIN537_STAMP)            += stamp.o | ||||
| obj-$(CONFIG_BFIN537_BLUETECHNIX_CM)   += cm_bf537.o | ||||
| obj-$(CONFIG_BFIN537_BLUETECHNIX_TCM)  += tcm_bf537.o | ||||
|  | ||||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
		Reference in New Issue
	
	Block a user