© Copyright 2002 Apple Computer, Inc. All rights reserved.

IMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc. (“Apple”) in consideration of your agreement to the following terms, and your use, installation, modification or redistribution of this Apple software constitutes acceptance of these terms.  If you do not agree with these terms, please do not use, install, modify or redistribute this Apple software.

In consideration of your agreement to abide by the following terms, and subject to these terms, Apple grants you a personal, non-exclusive license, under Apple’s copyrights in this original Apple software (the “Apple Software”), to use, reproduce, modify and redistribute the Apple Software, with or without modifications, in source and/or binary forms; provided that if you redistribute the Apple Software in its entirety and without modifications, you must retain this notice and the following text and disclaimers in all such redistributions of the Apple Software.  Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to endorse or promote products derived from the Apple Software without specific prior written permission from Apple.  Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by Apple herein, including but not limited to any patent rights that may be infringed by your derivative works or by other works in which the Apple Software may be incorporated.

The Apple Software is provided by Apple on an "AS IS" basis.  APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. 

IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

HISTORY:
Apple16X50Serial-1	(1.0.0d1)
•	Initial port based on NeXT drvISASerialPort driver

Apple16X50Serial-2	(1.0.0d1)
•	Significant code restructuring
•	Changed instance variable naming convention to "fInstanceVariable"
•	Added Apple16X50PCCard class to match on PCCard serial cards

Apple16X50Serial-3	(1.0.0d1)
•	Significant development on Apple16X50PCCard
•	Changed instance variable naming convention back to "InstanceVariable"
•	Renamed "Apple16X50.h" to "Apple16X50Serial.h"
•	Renamed "Sample Code Disclaimer.rtf" to "ReadMe.rtf"
•	Removed "English.lproj/InfoPlist.strings"

Apple16X50Serial-4	(1.0.0d4)
•	Cleaned up and improved debug messages
•	Rewrote dequeueData
•	Initialized MasterClock instance variable to reasonable default
•	Added #error into master header so that potential users are forced to see the disclaimer

Apple16X50Serial-5	(1.0.0d5)
•	Fixed a few serious bugs; driver seems to be basically working now

Apple16X50Serial-6	(1.0.0d6)
•	Additional hang and panic fixes.
•	Cleaned up probing and starting UARTs in BusInterface class
	replaced initUART() and publishUART() with probeUART() and startUARTs()

Apple16X50Serial-7	(1.0.0d7)
•	Fixed a few unterminating loops in the read path
•	Added lots of diagnostic information for PCCard modems
•	Added Copy Phase to install PCCard kext inside of main kext
•	Added build styles "DEBUG", "ASSERT", and "DEBUG & ASSERT" to simplify building with these options

Apple16X50Serial-8	(1.0.0a8)
•	Changed TTY node name scheme to be deterministic and thus NetworkPrefs friendly.  The TTY Base Name is now "pccard-" or "pci-" followed by either "serial" or "modem", as appropriate.  The TTY Suffix is the PCI Device number, or PCCard Socket number, followed by a lower case letter indicating which port on the card.  If there is only one port on the card, then the letter is eliminated from the suffix.  This produces names such as "pccard-modem" in the Network Prefs panel.
•	Cleaned up some of the debug messages, preparing for wider release
•	Added RELEASE() macro to safely release objects and null the reference.
•	Upgraded from "Development" status to "Alpha" status (the build stage in the version number)

Apple16X50Serial-9	(1.0.0a9)
•	Fixed minor PB setting that was causing the PCCard subkext to be installed twice (once in Plugins, and once in Resources).
•	Removed the "Country Codes" logging from the PCCard driver, as it was generating too much info for some cards.
•	Added support for 16C750 & 16X950 with 128 byte FIFOs.
•	Increased the "chunk" size in enqueueData/dequeueData to 2KB

Apple16X50Serial-10	(1.0.0b10)
•	Moved this ReadMe file from Resources to the top of Source to make it more visible
•	Removed unnecessary finalize() and terminate() methods
•	Added master clock frequency determination method
•	Introduced a new file "Apple16X50UARTTypes.cpp" that will eventually contain all the chip variant detection code
•	Many changes to the terminate sequence so that sleep/wake and card eject while busy work correctly
•	Upgraded from "Alpha" status to "Beta" status (the build stage in the version number)

Apple16X50Serial-10.1	(1.0.0fc1)
•	Disabled PCI card support for this branch of the driver
•	Upgraded from "Beta" status to "Final Candidate" status (the build stage in the version number)

Apple16X50Serial-10.2	(1.0.0fc2)
•	Cleaned up one case each of IORegistry corruption (object over-release()) in the PCI and PCCard subclasses
•	Cleaned up some OSString leaks
•	Update PCI classes to use RELEASE() macro

Apple16X50Serial-10.3	(1.0.0fc3)
•	Disabled automatic MasterClock detection on PCCard bus interface because it was causing a hang with Seiko Air H PCCard cellular modems

Apple16X50Serial-10.4	(1.0.0fc4)
•	Fixed a problem where connecting, disconnecting, connecting a PPP connection (or changing network locations) caused memory corruption which lead to random kernel panics.

Apple16X50Serial-10.5	(1.0.5)
•	Updated CFBundleVersion to 1.0.5

TO DO:
•	Any comment containing "XXX" indicates code that needs cleaning up prior to release, or debug-only code.
•	Need to improve MasterClock calibration logic - it doesn't work with all UARTs and I'm not sure why yet.
•	Need to add FIFO depth and trigger level checks - the only way to know for sure is to loop bytes into the RxFIFO and watch as the trigger levels get hit, and then when the FIFO overflows.
•	Need to improve chipset variant detection logic - it is pretty loose now.  
•	The plan is to move all the UART detection and validation logic into static functions in Apple16X50UARTTypes.cpp.  These functions will be called once at probe() time for one channel, rather than for each.  The results will be stashed away in properties in the BusInterface object.  Instantiated UART objects will default to those values, or call the static detection functions if those properties are absent.   This will provide reasonable & efficient default behavior, but will allow device-specific subclasses to wire known settings and avoid the cost of detection.  Also, this will prevent the tests being run every time the machine wakes up.