## Automatically generated incremental diff ## From: linux-2.5.63-bk6 ## To: linux-2.5.63-bk7 ## Robot: $Id: make-incremental-diff,v 1.11 2002/02/20 02:59:33 hpa Exp $ diff -urN linux-2.5.63-bk6/Makefile linux-2.5.63-bk7/Makefile --- linux-2.5.63-bk6/Makefile Mon Mar 31 12:20:04 2003 +++ linux-2.5.63-bk7/Makefile Mon Mar 31 12:20:09 2003 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 5 SUBLEVEL = 63 -EXTRAVERSION = bk6 +EXTRAVERSION = bk7 # *DOCUMENTATION* # To see a list of typical targets execute "make help" diff -urN linux-2.5.63-bk6/arch/arm/mach-pxa/irq.c linux-2.5.63-bk7/arch/arm/mach-pxa/irq.c --- linux-2.5.63-bk6/arch/arm/mach-pxa/irq.c Mon Mar 31 12:20:04 2003 +++ linux-2.5.63-bk7/arch/arm/mach-pxa/irq.c Mon Mar 31 12:20:09 2003 @@ -86,7 +86,7 @@ } /* - * GPIO IRQs must be acknoledged. This is for GPIO 0 and 1. + * GPIO IRQs must be acknowledged. This is for GPIO 0 and 1. */ static void pxa_ack_low_gpio(unsigned int irq) diff -urN linux-2.5.63-bk6/arch/arm/mach-sa1100/irq.c linux-2.5.63-bk7/arch/arm/mach-sa1100/irq.c --- linux-2.5.63-bk6/arch/arm/mach-sa1100/irq.c Mon Feb 24 11:05:47 2003 +++ linux-2.5.63-bk7/arch/arm/mach-sa1100/irq.c Mon Mar 31 12:20:09 2003 @@ -68,7 +68,7 @@ } /* - * GPIO IRQs must be acknoledged. This is for IRQs from 0 to 10. + * GPIO IRQs must be acknowledged. This is for IRQs from 0 to 10. */ static void sa1100_low_gpio_ack(unsigned int irq) { diff -urN linux-2.5.63-bk6/arch/cris/kernel/kgdb.c linux-2.5.63-bk7/arch/cris/kernel/kgdb.c --- linux-2.5.63-bk6/arch/cris/kernel/kgdb.c Mon Mar 31 12:20:04 2003 +++ linux-2.5.63-bk7/arch/cris/kernel/kgdb.c Mon Mar 31 12:20:09 2003 @@ -152,7 +152,7 @@ * (IPL too high, disabled, ...) * * - The gdb stub is currently not reentrant, i.e. errors that happen therein - * (e.g. accesing invalid memory) may not be caught correctly. This could + * (e.g. accessing invalid memory) may not be caught correctly. This could * be removed in future by introducing a stack of struct registers. * */ diff -urN linux-2.5.63-bk6/arch/i386/mach-voyager/voyager_smp.c linux-2.5.63-bk7/arch/i386/mach-voyager/voyager_smp.c --- linux-2.5.63-bk6/arch/i386/mach-voyager/voyager_smp.c Mon Mar 31 12:20:05 2003 +++ linux-2.5.63-bk7/arch/i386/mach-voyager/voyager_smp.c Mon Mar 31 12:20:09 2003 @@ -1473,7 +1473,7 @@ outb((__u8)cpuset, VIC_CPI_Registers[VIC_CPI_LEVEL0]); } -/* Acknowlege receipt of CPI in the QIC, clear in QIC hardware and +/* Acknowledge receipt of CPI in the QIC, clear in QIC hardware and * set the cache line to shared by reading it. * * DON'T make this inline otherwise the cache line read will be diff -urN linux-2.5.63-bk6/arch/ia64/sn/io/l1.c linux-2.5.63-bk7/arch/ia64/sn/io/l1.c --- linux-2.5.63-bk6/arch/ia64/sn/io/l1.c Mon Feb 24 11:05:44 2003 +++ linux-2.5.63-bk7/arch/ia64/sn/io/l1.c Mon Mar 31 12:20:09 2003 @@ -2602,7 +2602,7 @@ { sc_cq_t *q; /* receive queue */ int before_wrap, /* packet may be split into two different */ - after_wrap; /* pieces to acommodate queue wraparound */ + after_wrap; /* pieces to accommodate queue wraparound */ /* pull message off the receive queue */ q = subch->iqp; diff -urN linux-2.5.63-bk6/arch/sparc/Kconfig linux-2.5.63-bk7/arch/sparc/Kconfig --- linux-2.5.63-bk6/arch/sparc/Kconfig Mon Feb 24 11:05:04 2003 +++ linux-2.5.63-bk7/arch/sparc/Kconfig Mon Mar 31 12:20:09 2003 @@ -148,7 +148,7 @@ config MCA bool help - EISA is not supported. + MCA is not supported. Say N config PCMCIA diff -urN linux-2.5.63-bk6/arch/sparc/mm/iommu.c linux-2.5.63-bk7/arch/sparc/mm/iommu.c --- linux-2.5.63-bk6/arch/sparc/mm/iommu.c Mon Feb 24 11:06:01 2003 +++ linux-2.5.63-bk7/arch/sparc/mm/iommu.c Mon Mar 31 12:20:09 2003 @@ -112,7 +112,7 @@ for (i = 6; i < 9; i++) if ((1 << (i + PAGE_SHIFT)) == ptsize) break; - tmp = __get_free_pages(GFP_DMA, i); + tmp = __get_free_pages(GFP_KERNEL, i); if (!tmp) { prom_printf("Could not allocate iopte of size 0x%08x\n", ptsize); prom_halt(); diff -urN linux-2.5.63-bk6/arch/sparc64/Kconfig linux-2.5.63-bk7/arch/sparc64/Kconfig --- linux-2.5.63-bk6/arch/sparc64/Kconfig Mon Feb 24 11:05:42 2003 +++ linux-2.5.63-bk7/arch/sparc64/Kconfig Mon Mar 31 12:20:09 2003 @@ -150,18 +150,6 @@ If in doubt, say N. -config CPU_FREQ_PROC_INTF - tristate "/proc/cpufreq interface (DEPRECATED)" - depends on CPU_FREQ && PROC_FS - help - This enables the /proc/cpufreq interface for controlling - CPUFreq. Please note that it is recommended to use the sysfs - interface instead (which is built automatically). - - For details, take a look at linux/Documentation/cpufreq. - - If in doubt, say N. - config CPU_FREQ_TABLE tristate default y @@ -177,6 +165,8 @@ If in doubt, say N. +source "drivers/cpufreq/Kconfig" + # Identify this as a Sparc64 build config SPARC64 bool diff -urN linux-2.5.63-bk6/arch/sparc64/defconfig linux-2.5.63-bk7/arch/sparc64/defconfig --- linux-2.5.63-bk6/arch/sparc64/defconfig Mon Feb 24 11:05:15 2003 +++ linux-2.5.63-bk7/arch/sparc64/defconfig Mon Mar 31 12:20:09 2003 @@ -15,12 +15,6 @@ CONFIG_SYSVIPC=y # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y -# CONFIG_LOG_BUF_SHIFT_17 is not set -# CONFIG_LOG_BUF_SHIFT_16 is not set -CONFIG_LOG_BUF_SHIFT_15=y -# CONFIG_LOG_BUF_SHIFT_14 is not set -# CONFIG_LOG_BUF_SHIFT_13 is not set -# CONFIG_LOG_BUF_SHIFT_12 is not set CONFIG_LOG_BUF_SHIFT=15 # @@ -30,6 +24,7 @@ CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_FORCE_UNLOAD=y CONFIG_OBSOLETE_MODPARM=y +# CONFIG_MODVERSIONS is not set CONFIG_KMOD=y # @@ -45,6 +40,7 @@ CONFIG_NR_CPUS=4 CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_PROC_INTF=y +CONFIG_CPU_FREQ_TABLE=y CONFIG_US3_FREQ=m CONFIG_SPARC64=y CONFIG_HOTPLUG=y @@ -89,15 +85,52 @@ # # Graphics support # -# CONFIG_FB is not set +CONFIG_FB=y +# CONFIG_FB_CLGEN is not set +# CONFIG_FB_PM2 is not set +# CONFIG_FB_CYBER2000 is not set +# CONFIG_FB_IMSTT is not set +# CONFIG_FB_BW2 is not set +# CONFIG_FB_CG3 is not set +CONFIG_FB_CG6=y +# CONFIG_FB_RIVA is not set +# CONFIG_FB_MATROX is not set +# CONFIG_FB_RADEON is not set +# CONFIG_FB_ATY128 is not set +# CONFIG_FB_ATY is not set +# CONFIG_FB_SIS is not set +# CONFIG_FB_NEOMAGIC is not set +# CONFIG_FB_3DFX is not set +# CONFIG_FB_VOODOO1 is not set +# CONFIG_FB_TRIDENT is not set +# CONFIG_FB_PM3 is not set +CONFIG_FB_SBUS=y +CONFIG_FB_FFB=y +# CONFIG_FB_TCX is not set +# CONFIG_FB_CG14 is not set +# CONFIG_FB_P9100 is not set +# CONFIG_FB_LEO is not set +# CONFIG_FB_PCI is not set +# CONFIG_FB_VIRTUAL is not set # # Console display driver support # # CONFIG_VGA_CONSOLE is not set # CONFIG_MDA_CONSOLE is not set -CONFIG_PROM_CONSOLE=y +# CONFIG_PROM_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_PCI_CONSOLE=y +# CONFIG_FBCON_ADVANCED is not set +CONFIG_FONT_SUN8x16=y +# CONFIG_FONT_SUN12x22 is not set +CONFIG_FONTS=y +# CONFIG_FONT_8x8 is not set +# CONFIG_FONT_8x16 is not set +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set # # Serial drivers @@ -110,7 +143,7 @@ CONFIG_SERIAL_SUNCORE=y CONFIG_SERIAL_SUNZILOG=y CONFIG_SERIAL_SUNSU=y -# CONFIG_SERIAL_SUNSAB is not set +CONFIG_SERIAL_SUNSAB=m CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y @@ -190,7 +223,7 @@ CONFIG_BLK_DEV_ALI15X3=y # CONFIG_WDC_ALI15X3 is not set # CONFIG_BLK_DEV_AMD74XX is not set -CONFIG_BLK_DEV_CMD64X=y +# CONFIG_BLK_DEV_CMD64X is not set # CONFIG_BLK_DEV_TRIFLEX is not set # CONFIG_BLK_DEV_CY82C693 is not set # CONFIG_BLK_DEV_CS5520 is not set @@ -198,7 +231,7 @@ # CONFIG_BLK_DEV_HPT366 is not set # CONFIG_BLK_DEV_SC1200 is not set # CONFIG_BLK_DEV_PIIX is not set -CONFIG_BLK_DEV_NS87415=y +# CONFIG_BLK_DEV_NS87415 is not set # CONFIG_BLK_DEV_OPTI621 is not set # CONFIG_BLK_DEV_PDC202XX_OLD is not set # CONFIG_BLK_DEV_PDC202XX_NEW is not set @@ -221,9 +254,9 @@ # CONFIG_BLK_DEV_SD=y CONFIG_SD_EXTRA_DEVS=40 -CONFIG_CHR_DEV_ST=y +CONFIG_CHR_DEV_ST=m CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=y +CONFIG_BLK_DEV_SR=m CONFIG_BLK_DEV_SR_VENDOR=y CONFIG_SR_EXTRA_DEVS=2 CONFIG_CHR_DEV_SG=m @@ -320,11 +353,12 @@ CONFIG_INET_ESP=y CONFIG_XFRM_USER=m CONFIG_IPV6=m +CONFIG_IPV6_PRIVACY=y # # SCTP Configuration (EXPERIMENTAL) # -CONFIG_IPV6_SCTP__=y +CONFIG_IPV6_SCTP__=m CONFIG_IP_SCTP=m # CONFIG_SCTP_ADLER32 is not set # CONFIG_SCTP_DBG_MSG is not set @@ -395,6 +429,7 @@ # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y +# CONFIG_MII is not set CONFIG_SUNLANCE=y CONFIG_HAPPYMEAL=y CONFIG_SUNBMAC=m @@ -402,6 +437,7 @@ CONFIG_SUNGEM=y CONFIG_NET_VENDOR_3COM=y CONFIG_VORTEX=m +CONFIG_TYPHOON=m # # Tulip family network device support @@ -419,9 +455,11 @@ CONFIG_PCNET32=m # CONFIG_AMD8111_ETH is not set CONFIG_ADAPTEC_STARFIRE=m +CONFIG_ADAPTEC_STARFIRE_NAPI=y CONFIG_B44=m CONFIG_DGRS=m CONFIG_EEPRO100=m +# CONFIG_EEPRO100_PIO is not set CONFIG_E100=m CONFIG_FEALNX=m CONFIG_NATSEMI=m @@ -940,6 +978,7 @@ CONFIG_BT_HCIUART=m CONFIG_BT_HCIUART_H4=y CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIUART_BCSP_TXCRC=y CONFIG_BT_HCIVHCI=m # diff -urN linux-2.5.63-bk6/arch/sparc64/kernel/Makefile linux-2.5.63-bk7/arch/sparc64/kernel/Makefile --- linux-2.5.63-bk6/arch/sparc64/kernel/Makefile Mon Feb 24 11:05:11 2003 +++ linux-2.5.63-bk7/arch/sparc64/kernel/Makefile Mon Mar 31 12:20:09 2003 @@ -3,7 +3,7 @@ # EXTRA_AFLAGS := -ansi -CFLAGS += -Werror +EXTRA_CFLAGS := -Werror EXTRA_TARGETS := head.o init_task.o diff -urN linux-2.5.63-bk6/arch/sparc64/kernel/sparc64_ksyms.c linux-2.5.63-bk7/arch/sparc64/kernel/sparc64_ksyms.c --- linux-2.5.63-bk6/arch/sparc64/kernel/sparc64_ksyms.c Mon Feb 24 11:05:40 2003 +++ linux-2.5.63-bk7/arch/sparc64/kernel/sparc64_ksyms.c Mon Mar 31 12:20:09 2003 @@ -114,6 +114,8 @@ extern unsigned long phys_base; extern unsigned long pfn_base; +extern unsigned int sys_call_table[]; + /* used by various drivers */ #ifdef CONFIG_SMP #ifndef CONFIG_DEBUG_SPINLOCK @@ -374,3 +376,6 @@ /* for ns8703 */ EXPORT_SYMBOL(ns87303_lock); + +/* for solaris compat module */ +EXPORT_SYMBOL_GPL(sys_call_table); diff -urN linux-2.5.63-bk6/arch/sparc64/kernel/us3_cpufreq.c linux-2.5.63-bk7/arch/sparc64/kernel/us3_cpufreq.c --- linux-2.5.63-bk6/arch/sparc64/kernel/us3_cpufreq.c Mon Feb 24 11:05:05 2003 +++ linux-2.5.63-bk7/arch/sparc64/kernel/us3_cpufreq.c Mon Mar 31 12:20:09 2003 @@ -186,12 +186,16 @@ set_cpus_allowed(current, cpus_allowed); } -static int us3freq_setpolicy(struct cpufreq_policy *policy) +static int us3freq_target(struct cpufreq_policy *policy, + unsigned int target_freq, + unsigned int relation) { unsigned int new_index = 0; - if (cpufreq_frequency_table_setpolicy(policy, + if (cpufreq_frequency_table_target(policy, &us3_freq_table[policy->cpu].table[0], + target_freq, + relation, &new_index)) return -EINVAL; @@ -224,6 +228,7 @@ policy->policy = CPUFREQ_POLICY_PERFORMANCE; policy->cpuinfo.transition_latency = 0; + policy->cur = clock_tick; return cpufreq_frequency_table_cpuinfo(policy, table); } @@ -268,7 +273,7 @@ (NR_CPUS * sizeof(struct us3_freq_percpu_info))); driver->verify = us3freq_verify; - driver->setpolicy = us3freq_setpolicy; + driver->target = us3freq_target; driver->init = us3freq_cpu_init; driver->exit = us3freq_cpu_exit; strcpy(driver->name, "UltraSPARC-III"); diff -urN linux-2.5.63-bk6/arch/sparc64/lib/Makefile linux-2.5.63-bk7/arch/sparc64/lib/Makefile --- linux-2.5.63-bk6/arch/sparc64/lib/Makefile Mon Feb 24 11:05:06 2003 +++ linux-2.5.63-bk7/arch/sparc64/lib/Makefile Mon Mar 31 12:20:09 2003 @@ -3,7 +3,7 @@ # EXTRA_AFLAGS := -ansi -CFLAGS += -Werror +EXTRA_CFLAGS := -Werror L_TARGET = lib.a obj-y := PeeCeeI.o blockops.o debuglocks.o strlen.o strncmp.o \ diff -urN linux-2.5.63-bk6/arch/sparc64/mm/Makefile linux-2.5.63-bk7/arch/sparc64/mm/Makefile --- linux-2.5.63-bk6/arch/sparc64/mm/Makefile Mon Feb 24 11:05:39 2003 +++ linux-2.5.63-bk7/arch/sparc64/mm/Makefile Mon Mar 31 12:20:09 2003 @@ -3,7 +3,7 @@ # EXTRA_AFLAGS := -ansi -CFLAGS += -Werror +EXTRA_CFLAGS := -Werror obj-y := ultra.o fault.o init.o generic.o extable.o diff -urN linux-2.5.63-bk6/arch/sparc64/prom/Makefile linux-2.5.63-bk7/arch/sparc64/prom/Makefile --- linux-2.5.63-bk6/arch/sparc64/prom/Makefile Mon Feb 24 11:05:40 2003 +++ linux-2.5.63-bk7/arch/sparc64/prom/Makefile Mon Mar 31 12:20:09 2003 @@ -4,7 +4,7 @@ # EXTRA_AFLAGS := -ansi -CFLAGS += -Werror +EXTRA_CFLAGS := -Werror L_TARGET = lib.a obj-y := bootstr.o devops.o init.o memory.o misc.o \ diff -urN linux-2.5.63-bk6/arch/sparc64/solaris/entry64.S linux-2.5.63-bk7/arch/sparc64/solaris/entry64.S --- linux-2.5.63-bk6/arch/sparc64/solaris/entry64.S Mon Feb 24 11:05:04 2003 +++ linux-2.5.63-bk7/arch/sparc64/solaris/entry64.S Mon Mar 31 12:20:09 2003 @@ -16,6 +16,7 @@ #include #include #include +#include #include "conv.h" diff -urN linux-2.5.63-bk6/drivers/atm/fore200e.c linux-2.5.63-bk7/drivers/atm/fore200e.c --- linux-2.5.63-bk6/drivers/atm/fore200e.c Mon Feb 24 11:06:02 2003 +++ linux-2.5.63-bk7/drivers/atm/fore200e.c Mon Mar 31 12:20:09 2003 @@ -1132,8 +1132,7 @@ return; } - do_gettimeofday(&vcc->timestamp); - skb->stamp = vcc->timestamp; + do_gettimeofday(&skb->stamp); #ifdef FORE200E_52BYTE_AAL0_SDU if (cell_header) { diff -urN linux-2.5.63-bk6/drivers/atm/suni.c linux-2.5.63-bk7/drivers/atm/suni.c --- linux-2.5.63-bk6/drivers/atm/suni.c Mon Feb 24 11:05:40 2003 +++ linux-2.5.63-bk7/drivers/atm/suni.c Mon Mar 31 12:20:09 2003 @@ -233,8 +233,6 @@ if (!(PRIV(dev) = kmalloc(sizeof(struct suni_priv),GFP_KERNEL))) return -ENOMEM; - MOD_INC_USE_COUNT; - PRIV(dev)->dev = dev; spin_lock_irqsave(&sunis_lock,flags); first = !sunis; @@ -280,7 +278,6 @@ spin_unlock_irqrestore(&sunis_lock,flags); kfree(PRIV(dev)); - MOD_DEC_USE_COUNT; return 0; } @@ -293,7 +290,7 @@ }; -int __init suni_init(struct atm_dev *dev) +int suni_init(struct atm_dev *dev) { unsigned char mri; diff -urN linux-2.5.63-bk6/drivers/base/base.h linux-2.5.63-bk7/drivers/base/base.h --- linux-2.5.63-bk6/drivers/base/base.h Mon Feb 24 11:05:16 2003 +++ linux-2.5.63-bk7/drivers/base/base.h Mon Mar 31 12:20:09 2003 @@ -1,6 +1,7 @@ #undef DEBUG extern struct semaphore device_sem; +extern struct semaphore devclass_sem; extern int bus_add_device(struct device * dev); extern void bus_remove_device(struct device * dev); diff -urN linux-2.5.63-bk6/drivers/base/class.c linux-2.5.63-bk7/drivers/base/class.c --- linux-2.5.63-bk6/drivers/base/class.c Mon Feb 24 11:06:01 2003 +++ linux-2.5.63-bk7/drivers/base/class.c Mon Mar 31 12:20:09 2003 @@ -13,6 +13,8 @@ #define to_class_attr(_attr) container_of(_attr,struct devclass_attribute,attr) #define to_class(obj) container_of(obj,struct device_class,subsys.kset.kobj) +DECLARE_MUTEX(devclass_sem); + static ssize_t devclass_attr_show(struct kobject * kobj, struct attribute * attr, char * buf) { @@ -163,29 +165,34 @@ struct device_class * cls; int error = 0; + down(&devclass_sem); if (dev->driver) { cls = get_devclass(dev->driver->devclass); - if (cls) { - down_write(&cls->subsys.rwsem); - pr_debug("device class %s: adding device %s\n", - cls->name,dev->name); - if (cls->add_device) - error = cls->add_device(dev); - if (!error) { - enum_device(cls,dev); - interface_add_dev(dev); - } - - list_add_tail(&dev->class_list,&cls->devices.list); - - /* notify userspace (call /sbin/hotplug) */ - class_hotplug (dev, "add"); - - up_write(&cls->subsys.rwsem); - if (error) - put_devclass(cls); + + if (!cls) + goto Done; + + pr_debug("device class %s: adding device %s\n", + cls->name,dev->name); + if (cls->add_device) + error = cls->add_device(dev); + if (error) { + put_devclass(cls); + goto Done; } + + down_write(&cls->subsys.rwsem); + enum_device(cls,dev); + list_add_tail(&dev->class_list,&cls->devices.list); + /* notify userspace (call /sbin/hotplug) */ + class_hotplug (dev, "add"); + + up_write(&cls->subsys.rwsem); + + interface_add_dev(dev); } + Done: + up(&devclass_sem); return error; } @@ -193,26 +200,33 @@ { struct device_class * cls; + down(&devclass_sem); if (dev->driver) { cls = dev->driver->devclass; - if (cls) { - down_write(&cls->subsys.rwsem); - pr_debug("device class %s: removing device %s\n", - cls->name,dev->name); - interface_remove_dev(dev); - unenum_device(cls,dev); - - list_del(&dev->class_list); - - /* notify userspace (call /sbin/hotplug) */ - class_hotplug (dev, "remove"); - - if (cls->remove_device) - cls->remove_device(dev); - up_write(&cls->subsys.rwsem); - put_devclass(cls); - } + if (!cls) + goto Done; + + interface_remove_dev(dev); + + down_write(&cls->subsys.rwsem); + pr_debug("device class %s: removing device %s\n", + cls->name,dev->name); + + unenum_device(cls,dev); + + list_del(&dev->class_list); + + /* notify userspace (call /sbin/hotplug) */ + class_hotplug (dev, "remove"); + + up_write(&cls->subsys.rwsem); + + if (cls->remove_device) + cls->remove_device(dev); + put_devclass(cls); } + Done: + up(&devclass_sem); } struct device_class * get_devclass(struct device_class * cls) diff -urN linux-2.5.63-bk6/drivers/base/core.c linux-2.5.63-bk7/drivers/base/core.c --- linux-2.5.63-bk6/drivers/base/core.c Mon Feb 24 11:05:06 2003 +++ linux-2.5.63-bk7/drivers/base/core.c Mon Mar 31 12:20:09 2003 @@ -143,7 +143,6 @@ INIT_LIST_HEAD(&dev->driver_list); INIT_LIST_HEAD(&dev->bus_list); INIT_LIST_HEAD(&dev->class_list); - INIT_LIST_HEAD(&dev->intf_list); } /** diff -urN linux-2.5.63-bk6/drivers/base/intf.c linux-2.5.63-bk7/drivers/base/intf.c --- linux-2.5.63-bk6/drivers/base/intf.c Mon Feb 24 11:05:41 2003 +++ linux-2.5.63-bk7/drivers/base/intf.c Mon Mar 31 12:20:09 2003 @@ -12,80 +12,31 @@ #define to_intf(node) container_of(node,struct device_interface,kset.kobj.entry) -#define to_data(e) container_of(e,struct intf_data,kobj.entry) +#define to_dev(d) container_of(d,struct device,class_list) /** * intf_dev_link - create sysfs symlink for interface. - * @data: interface data descriptor. + * @intf: interface. + * @dev: device. * * Create a symlink 'phys' in the interface's directory to */ -static int intf_dev_link(struct intf_data * data) +static int intf_dev_link(struct device_interface * intf, struct device * dev) { - char name[16]; - snprintf(name,16,"%d",data->intf_num); - return sysfs_create_link(&data->intf->kset.kobj,&data->dev->kobj,name); + return sysfs_create_link(&intf->kset.kobj,&dev->kobj,dev->bus_id); } /** * intf_dev_unlink - remove symlink for interface. - * @intf: interface data descriptor. - * - */ - -static void intf_dev_unlink(struct intf_data * data) -{ - char name[16]; - snprintf(name,16,"%d",data->intf_num); - sysfs_remove_link(&data->intf->kset.kobj,name); -} - - -/** - * interface_add_data - attach data descriptor - * @data: interface data descriptor. - * - * This attaches the per-instance interface object to the - * interface (by registering its kobject) and the device - * itself (by inserting it into the device's list). - * - * Note that there is no explicit protection done in this - * function. This should be called from the interface's - * add_device() method, which is called under the protection - * of the class's rwsem. - */ - -int interface_add_data(struct intf_data * data) -{ - struct device_interface * intf = data->intf; - - if (intf) { - data->intf_num = intf->devnum++; - data->kobj.kset = &intf->kset; - kobject_register(&data->kobj); - - list_add_tail(&data->dev_entry,&data->dev->intf_list); - return intf_dev_link(data); - } - return -EINVAL; -} - - -/** - * interface_remove_data - detach data descriptor. - * @data: interface data descriptor. + * @intf: interface. + * @dev: device. * - * This detaches the per-instance data descriptor by removing - * it from the device's list and unregistering the kobject from - * the subsystem. */ -void interface_remove_data(struct intf_data * data) +static void intf_dev_unlink(struct device_interface * intf, struct device * dev) { - intf_dev_unlink(data); - list_del_init(&data->dev_entry); - kobject_unregister(&data->kobj); + sysfs_remove_link(&intf->kset.kobj,dev->bus_id); } @@ -103,33 +54,28 @@ { int error = 0; - if (intf->add_device) - error = intf->add_device(dev); + if (intf->add_device) { + if (!(error = intf->add_device(dev))) + intf_dev_link(intf,dev); + } pr_debug(" -> %s (%d)\n",dev->bus_id,error); return error; } /** * del - detach device from interface. - * @data: interface data descriptor. - * - * Another simple helper. Remove the data descriptor from - * the device and the interface, then call the interface's - * remove_device() method. + * @intf: interface. + * @dev: device. */ -static void del(struct intf_data * data) +static void del(struct device_interface * intf, struct device * dev) { - struct device_interface * intf = data->intf; - pr_debug(" -> %s ",intf->name); - interface_remove_data(data); if (intf->remove_device) - intf->remove_device(data); + intf->remove_device(dev); + intf_dev_unlink(intf,dev); } -#define to_dev(entry) container_of(entry,struct device,class_list) - /** * add_intf - add class's devices to interface. @@ -145,10 +91,8 @@ struct device_class * cls = intf->devclass; struct list_head * entry; - down_write(&cls->subsys.rwsem); list_for_each(entry,&cls->devices.list) add(intf,to_dev(entry)); - up_write(&cls->subsys.rwsem); } /** @@ -164,6 +108,7 @@ { struct device_class * cls = get_devclass(intf->devclass); + down(&devclass_sem); if (cls) { pr_debug("register interface '%s' with class '%s'\n", intf->name,cls->name); @@ -173,6 +118,7 @@ kset_register(&intf->kset); add_intf(intf); } + up(&devclass_sem); return 0; } @@ -188,14 +134,13 @@ static void del_intf(struct device_interface * intf) { + struct device_class * cls = intf->devclass; struct list_head * entry; - down_write(&intf->devclass->subsys.rwsem); - list_for_each(entry,&intf->kset.list) { - struct intf_data * data = to_data(entry); - del(data); + list_for_each(entry,&cls->devices.list) { + struct device * dev = to_dev(entry); + del(intf,dev); } - up_write(&intf->devclass->subsys.rwsem); } /** @@ -210,6 +155,8 @@ void interface_unregister(struct device_interface * intf) { struct device_class * cls = intf->devclass; + + down(&devclass_sem); if (cls) { pr_debug("unregistering interface '%s' from class '%s'\n", intf->name,cls->name); @@ -217,6 +164,7 @@ kset_unregister(&intf->kset); put_devclass(cls); } + up(&devclass_sem); } @@ -255,20 +203,21 @@ * This is another helper for the class driver core, and called * when the device is being removed from the class. * - * We iterate over the list of interface data descriptors attached - * to the device, and call del() [above] for each. Again, the - * class's rwsem is assumed to be held during this. + * We iterate over the list of the class's devices and call del() + * [above] for each. Again, the class's rwsem is _not_ held, but + * the devclass_sem is (see class.c). */ void interface_remove_dev(struct device * dev) { struct list_head * entry, * next; + struct device_class * cls = dev->driver->devclass; pr_debug("interfaces: removing device %s\n",dev->name); - list_for_each_safe(entry,next,&dev->intf_list) { - struct intf_data * intf_data = to_data(entry); - del(intf_data); + list_for_each_safe(entry,next,&cls->subsys.kset.list) { + struct device_interface * intf = to_intf(entry); + del(intf,dev); } } diff -urN linux-2.5.63-bk6/drivers/cdrom/cdrom.c linux-2.5.63-bk7/drivers/cdrom/cdrom.c --- linux-2.5.63-bk6/drivers/cdrom/cdrom.c Mon Mar 31 12:20:05 2003 +++ linux-2.5.63-bk7/drivers/cdrom/cdrom.c Mon Mar 31 12:20:09 2003 @@ -173,7 +173,7 @@ -- Fixed the CDROMREADxxx ioctls. -- CDROMPLAYTRKIND uses the GPCMD_PLAY_AUDIO_MSF command - too few drives supported it. We lose the index part, however. - -- Small modifications to accomodate opens of /dev/hdc1, required + -- Small modifications to accommodate opens of /dev/hdc1, required for ide-cd to handle multisession discs. -- Export cdrom_mode_sense and cdrom_mode_select. -- init_cdrom_command() for setting up a cgc command. diff -urN linux-2.5.63-bk6/drivers/char/cd1865.h linux-2.5.63-bk7/drivers/char/cd1865.h --- linux-2.5.63-bk6/drivers/char/cd1865.h Mon Feb 24 11:05:34 2003 +++ linux-2.5.63-bk7/drivers/char/cd1865.h Mon Mar 31 12:20:09 2003 @@ -54,9 +54,9 @@ #define CD186x_RCSR 0x7a /* Receiver Character Status Register */ #define CD186x_TDR 0x7b /* Transmit Data Register */ #define CD186x_EOIR 0x7f /* End of Interrupt Register */ -#define CD186x_MRAR 0x75 /* Modem Request Acknowlege register */ -#define CD186x_TRAR 0x76 /* Transmit Request Acknowlege register */ -#define CD186x_RRAR 0x77 /* Receive Request Acknowlege register */ +#define CD186x_MRAR 0x75 /* Modem Request Acknowledge register */ +#define CD186x_TRAR 0x76 /* Transmit Request Acknowledge register */ +#define CD186x_RRAR 0x77 /* Receive Request Acknowledge register */ #define CD186x_SRCR 0x66 /* Service Request Configuration register */ /* Channel Registers */ diff -urN linux-2.5.63-bk6/drivers/char/drm/i810_drm.h linux-2.5.63-bk7/drivers/char/drm/i810_drm.h --- linux-2.5.63-bk6/drivers/char/drm/i810_drm.h Mon Feb 24 11:05:04 2003 +++ linux-2.5.63-bk7/drivers/char/drm/i810_drm.h Mon Mar 31 12:20:09 2003 @@ -38,7 +38,7 @@ * - zbuffer linear offset and pitch -- also invarient * - drawing origin in back and depth buffers. * - * Keep the depth/back buffer state here to acommodate private buffers + * Keep the depth/back buffer state here to accommodate private buffers * in the future. */ #define I810_DESTREG_DI0 0 /* CMD_OP_DESTBUFFER_INFO (2 dwords) */ diff -urN linux-2.5.63-bk6/drivers/char/drm/i830_drm.h linux-2.5.63-bk7/drivers/char/drm/i830_drm.h --- linux-2.5.63-bk6/drivers/char/drm/i830_drm.h Mon Feb 24 11:05:16 2003 +++ linux-2.5.63-bk7/drivers/char/drm/i830_drm.h Mon Mar 31 12:20:09 2003 @@ -68,7 +68,7 @@ * - zbuffer linear offset and pitch -- also invarient * - drawing origin in back and depth buffers. * - * Keep the depth/back buffer state here to acommodate private buffers + * Keep the depth/back buffer state here to accommodate private buffers * in the future. */ diff -urN linux-2.5.63-bk6/drivers/char/tty_io.c linux-2.5.63-bk7/drivers/char/tty_io.c --- linux-2.5.63-bk6/drivers/char/tty_io.c Mon Feb 24 11:05:34 2003 +++ linux-2.5.63-bk7/drivers/char/tty_io.c Mon Mar 31 12:20:09 2003 @@ -1944,27 +1944,25 @@ schedule_delayed_work(&tty->flip.work, 1); return; } + + spin_lock_irqsave(&tty->read_lock, flags); if (tty->flip.buf_num) { cp = tty->flip.char_buf + TTY_FLIPBUF_SIZE; fp = tty->flip.flag_buf + TTY_FLIPBUF_SIZE; tty->flip.buf_num = 0; - - local_irq_save(flags); // FIXME: is this safe? tty->flip.char_buf_ptr = tty->flip.char_buf; tty->flip.flag_buf_ptr = tty->flip.flag_buf; } else { cp = tty->flip.char_buf; fp = tty->flip.flag_buf; tty->flip.buf_num = 1; - - local_irq_save(flags); // FIXME: is this safe? tty->flip.char_buf_ptr = tty->flip.char_buf + TTY_FLIPBUF_SIZE; tty->flip.flag_buf_ptr = tty->flip.flag_buf + TTY_FLIPBUF_SIZE; } count = tty->flip.count; tty->flip.count = 0; - local_irq_restore(flags); // FIXME: is this safe? - + spin_unlock_irqrestore(&tty->read_lock, flags); + tty->ldisc.receive_buf(tty, cp, fp, count); } diff -urN linux-2.5.63-bk6/drivers/net/fc/iph5526.c linux-2.5.63-bk7/drivers/net/fc/iph5526.c --- linux-2.5.63-bk6/drivers/net/fc/iph5526.c Mon Mar 31 12:20:05 2003 +++ linux-2.5.63-bk7/drivers/net/fc/iph5526.c Mon Mar 31 12:20:11 2003 @@ -3175,38 +3175,6 @@ LEAVE("rx_net_mfs_packet"); } -unsigned short fc_type_trans(struct sk_buff *skb, struct net_device *dev) -{ -struct fch_hdr *fch=(struct fch_hdr *)skb->data; -struct fcllc *fcllc; - skb->mac.raw = skb->data; - fcllc = (struct fcllc *)(skb->data + sizeof(struct fch_hdr) + 2); - skb_pull(skb,sizeof(struct fch_hdr) + 2); - - if(*fch->daddr & 1) { - if(!memcmp(fch->daddr,dev->broadcast,FC_ALEN)) - skb->pkt_type = PACKET_BROADCAST; - else - skb->pkt_type = PACKET_MULTICAST; - } - else if(dev->flags & IFF_PROMISC) { - if(memcmp(fch->daddr, dev->dev_addr, FC_ALEN)) - skb->pkt_type=PACKET_OTHERHOST; - } - - /* Strip the SNAP header from ARP packets since we don't - * pass them through to the 802.2/SNAP layers. - */ - - if (fcllc->dsap == EXTENDED_SAP && - (fcllc->ethertype == ntohs(ETH_P_IP) || - fcllc->ethertype == ntohs(ETH_P_ARP))) { - skb_pull(skb, sizeof(struct fcllc)); - return fcllc->ethertype; - } - return ntohs(ETH_P_802_2); -} - static int tx_exchange(struct fc_info *fi, char *data, u_int len, u_int r_ctl, u_int type, u_int d_id, u_int mtu, int int_required, u_short tx_ox_id, u_int frame_class) { u_char df_ctl; diff -urN linux-2.5.63-bk6/drivers/net/sk98lin/skge.c linux-2.5.63-bk7/drivers/net/sk98lin/skge.c --- linux-2.5.63-bk6/drivers/net/sk98lin/skge.c Mon Feb 24 11:05:10 2003 +++ linux-2.5.63-bk7/drivers/net/sk98lin/skge.c Mon Mar 31 12:20:12 2003 @@ -3627,7 +3627,7 @@ * Description: * This routine writes a 16 bit value to the pci configuration * space. The flag PciConfigUp indicates whether the config space - * is accesible or must be set up first. + * is accessible or must be set up first. * * Returns: * 0 - indicate everything worked ok. @@ -3650,7 +3650,7 @@ * Description: * This routine writes a 8 bit value to the pci configuration * space. The flag PciConfigUp indicates whether the config space - * is accesible or must be set up first. + * is accessible or must be set up first. * * Returns: * 0 - indicate everything worked ok. diff -urN linux-2.5.63-bk6/drivers/net/sk98lin/ski2c.c linux-2.5.63-bk7/drivers/net/sk98lin/ski2c.c --- linux-2.5.63-bk6/drivers/net/sk98lin/ski2c.c Mon Mar 31 12:20:06 2003 +++ linux-2.5.63-bk7/drivers/net/sk98lin/ski2c.c Mon Mar 31 12:20:12 2003 @@ -444,7 +444,7 @@ /* * Receive an ACK. * - * returns 0 If acknoledged + * returns 0 If acknowledged * 1 in case of an error */ int SkI2cRcvAck( diff -urN linux-2.5.63-bk6/drivers/net/sunhme.c linux-2.5.63-bk7/drivers/net/sunhme.c --- linux-2.5.63-bk6/drivers/net/sunhme.c Mon Mar 31 12:20:06 2003 +++ linux-2.5.63-bk7/drivers/net/sunhme.c Mon Mar 31 12:20:12 2003 @@ -520,7 +520,7 @@ ASD(("happy_meal_tcvr_write: reg=0x%02x value=%04x\n", reg, value)); /* Welcome to Sun Microsystems, can I take your order please? */ - if (!hp->happy_flags & HFLAG_FENABLE) + if (!(hp->happy_flags & HFLAG_FENABLE)) return happy_meal_bb_write(hp, tregs, reg, value); /* Would you like fries with that? */ diff -urN linux-2.5.63-bk6/drivers/s390/block/dasd_eckd.c linux-2.5.63-bk7/drivers/s390/block/dasd_eckd.c --- linux-2.5.63-bk6/drivers/s390/block/dasd_eckd.c Mon Mar 31 12:20:06 2003 +++ linux-2.5.63-bk7/drivers/s390/block/dasd_eckd.c Mon Mar 31 12:20:14 2003 @@ -19,7 +19,7 @@ * 10/04/00 changed RW-CCWS to R/W Key and Data * 10/10/00 reverted last change according to ESS exploitation * 10/10/00 now dequeuing init_cqr before freeing *ouch* - * 26/10/00 fixed ITPM20144ASC (problems when accesing a device formatted by VIF) + * 26/10/00 fixed ITPM20144ASC (problems when accessing a device formatted by VIF) * 01/23/01 fixed kmalloc statement in dump_sense to be GFP_ATOMIC * fixed partition handling and HDIO_GETGEO * 2002/01/04 Created 2.4-2.5 compatibility mode diff -urN linux-2.5.63-bk6/drivers/scsi/pcmcia/nsp_cs.h linux-2.5.63-bk7/drivers/scsi/pcmcia/nsp_cs.h --- linux-2.5.63-bk6/drivers/scsi/pcmcia/nsp_cs.h Mon Mar 31 12:20:06 2003 +++ linux-2.5.63-bk7/drivers/scsi/pcmcia/nsp_cs.h Mon Mar 31 12:20:15 2003 @@ -183,7 +183,7 @@ #define S_ATN 0x80 /**/ #define S_SELECT 0x40 /**/ #define S_REQUEST 0x20 /* Request line from SCSI bus*/ -#define S_ACK 0x10 /* Acknowlege line from SCSI bus*/ +#define S_ACK 0x10 /* Acknowledge line from SCSI bus*/ #define S_BUSY 0x08 /* Busy line from SCSI bus*/ #define S_CD 0x04 /* Command/Data line from SCSI bus*/ #define S_IO 0x02 /* Input/Output line from SCSI bus*/ diff -urN linux-2.5.63-bk6/drivers/video/Kconfig linux-2.5.63-bk7/drivers/video/Kconfig --- linux-2.5.63-bk6/drivers/video/Kconfig Mon Feb 24 11:05:05 2003 +++ linux-2.5.63-bk7/drivers/video/Kconfig Mon Mar 31 12:20:15 2003 @@ -376,19 +376,19 @@ bool "Sun3 framebuffer support" depends on FB && (SUN3 || SUN3X) -config FB_BWTWO +config FB_BW2 bool "BWtwo support" depends on FB && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) help This is the frame buffer device driver for the BWtwo frame buffer. -config FB_CGTHREE +config FB_CG3 bool "CGthree support" depends on FB && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) help This is the frame buffer device driver for the CGthree frame buffer. -config FB_CGSIX +config FB_CG6 bool "CGsix (GX,TurboGX) support" depends on FB && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) help @@ -809,30 +809,30 @@ help Say Y if you want support for SBUS or UPA based frame buffer device. -config FB_CREATOR - bool "Creator/Creator3D support" +config FB_FFB + bool "Creator/Creator3D/Elite3D support" depends on FB_SBUS && SPARC64 help - This is the frame buffer device driver for the Creator and Creator3D - graphics boards. + This is the frame buffer device driver for the Creator, Creator3D, + and Elite3D graphics boards. config FB_TCX bool "TCX (SS4/SS5 only) support" - depends on FB_SBUS && SPARC32 + depends on FB_SBUS help This is the frame buffer device driver for the TCX 24/8bit frame buffer. -config FB_CGFOURTEEN +config FB_CG14 bool "CGfourteen (SX) support" - depends on FB_SBUS && SPARC32 + depends on FB_SBUS help This is the frame buffer device driver for the CGfourteen frame buffer on Desktop SPARCsystems with the SX graphics option. config FB_P9100 bool "P9100 (Sparcbook 3 only) support" - depends on FB_SBUS && SPARC32 + depends on FB_SBUS help This is the frame buffer device driver for the P9100 card supported on Sparcbook 3 machines. diff -urN linux-2.5.63-bk6/drivers/video/Makefile linux-2.5.63-bk7/drivers/video/Makefile --- linux-2.5.63-bk6/drivers/video/Makefile Mon Feb 24 11:05:08 2003 +++ linux-2.5.63-bk7/drivers/video/Makefile Mon Mar 31 12:20:15 2003 @@ -48,14 +48,6 @@ obj-$(CONFIG_FB_VIRGE) += virgefb.o obj-$(CONFIG_FB_G364) += g364fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_FM2) += fm2fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_CREATOR) += creatorfb.o sbusfb.o -obj-$(CONFIG_FB_CGSIX) += cgsixfb.o sbusfb.o -obj-$(CONFIG_FB_BWTWO) += bwtwofb.o sbusfb.o -obj-$(CONFIG_FB_CGTHREE) += cgthreefb.o sbusfb.o -obj-$(CONFIG_FB_TCX) += tcxfb.o sbusfb.o -obj-$(CONFIG_FB_CGFOURTEEN) += cgfourteenfb.o sbusfb.o -obj-$(CONFIG_FB_P9100) += p9100fb.o sbusfb.o -obj-$(CONFIG_FB_LEO) += leofb.o sbusfb.o obj-$(CONFIG_FB_STI) += stifb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_PMAG_BA) += pmag-ba-fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_PMAGB_B) += pmagb-b-fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o @@ -78,6 +70,22 @@ obj-$(CONFIG_FB_PVR2) += pvr2fb.o obj-$(CONFIG_FB_VOODOO1) += sstfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +# One by one these are being converted over to the new APIs +#obj-$(CONFIG_FB_LEO) += leofb.o sbusfb.o + +obj-$(CONFIG_FB_FFB) += ffb.o sbuslib.o cfbimgblt.o cfbcopyarea.o +obj-$(CONFIG_FB_CG6) += cg6.o sbuslib.o cfbimgblt.o cfbcopyarea.o +obj-$(CONFIG_FB_CG3) += cg3.o sbuslib.o cfbimgblt.o cfbcopyarea.o \ + cfbfillrect.o +obj-$(CONFIG_FB_BW2) += bw2.o sbuslib.o cfbimgblt.o cfbcopyarea.o \ + cfbfillrect.o +obj-$(CONFIG_FB_CG14) += cg14.o sbuslib.o cfbimgblt.o cfbcopyarea.o \ + cfbfillrect.o +obj-$(CONFIG_FB_P9100) += p9100.o sbuslib.o cfbimgblt.o cfbcopyarea.o \ + cfbfillrect.o +obj-$(CONFIG_FB_TCX) += tcx.o sbuslib.o cfbimgblt.o cfbcopyarea.o \ + cfbfillrect.o + # Files generated that shall be removed upon make clean clean-files := promcon_tbl.c diff -urN linux-2.5.63-bk6/drivers/video/bw2.c linux-2.5.63-bk7/drivers/video/bw2.c --- linux-2.5.63-bk6/drivers/video/bw2.c Wed Dec 31 16:00:00 1969 +++ linux-2.5.63-bk7/drivers/video/bw2.c Mon Mar 31 12:20:15 2003 @@ -0,0 +1,448 @@ +/* bw2.c: BWTWO frame buffer driver + * + * Copyright (C) 2003 David S. Miller (davem@redhat.com) + * Copyright (C) 1996,1998 Jakub Jelinek (jj@ultra.linux.cz) + * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) + * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) + * + * Driver layout based loosely on tgafb.c, see that file for credits. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#ifdef CONFIG_SPARC32 +#include +#endif + +#include "sbuslib.h" + +/* + * Local functions. + */ + +static int bw2_check_var(struct fb_var_screeninfo *, struct fb_info *); +static int bw2_set_par(struct fb_info *); +static int bw2_blank(int, struct fb_info *); + +static int bw2_mmap(struct fb_info *, struct file *, struct vm_area_struct *); + +/* + * Frame buffer operations + */ + +static struct fb_ops bw2_ops = { + .owner = THIS_MODULE, + .fb_check_var = bw2_check_var, + .fb_set_par = bw2_set_par, + .fb_blank = bw2_blank, + .fb_fillrect = cfb_fillrect, + .fb_copyarea = cfb_copyarea, + .fb_imageblit = cfb_imageblit, + .fb_mmap = bw2_mmap, + .fb_cursor = soft_cursor, +}; + +/* OBio addresses for the bwtwo registers */ +#define BWTWO_REGISTER_OFFSET 0x400000 + +struct bt_regs { + volatile u32 addr; + volatile u32 color_map; + volatile u32 control; + volatile u32 cursor; +}; + +struct bw2_regs { + struct bt_regs cmap; + volatile u8 control; + volatile u8 status; + volatile u8 cursor_start; + volatile u8 cursor_end; + volatile u8 h_blank_start; + volatile u8 h_blank_end; + volatile u8 h_sync_start; + volatile u8 h_sync_end; + volatile u8 comp_sync_end; + volatile u8 v_blank_start_high; + volatile u8 v_blank_start_low; + volatile u8 v_blank_end; + volatile u8 v_sync_start; + volatile u8 v_sync_end; + volatile u8 xfer_holdoff_start; + volatile u8 xfer_holdoff_end; +}; + +/* Status Register Constants */ +#define BWTWO_SR_RES_MASK 0x70 +#define BWTWO_SR_1600_1280 0x50 +#define BWTWO_SR_1152_900_76_A 0x40 +#define BWTWO_SR_1152_900_76_B 0x60 +#define BWTWO_SR_ID_MASK 0x0f +#define BWTWO_SR_ID_MONO 0x02 +#define BWTWO_SR_ID_MONO_ECL 0x03 +#define BWTWO_SR_ID_MSYNC 0x04 +#define BWTWO_SR_ID_NOCONN 0x0a + +/* Control Register Constants */ +#define BWTWO_CTL_ENABLE_INTS 0x80 +#define BWTWO_CTL_ENABLE_VIDEO 0x40 +#define BWTWO_CTL_ENABLE_TIMING 0x20 +#define BWTWO_CTL_ENABLE_CURCMP 0x10 +#define BWTWO_CTL_XTAL_MASK 0x0C +#define BWTWO_CTL_DIVISOR_MASK 0x03 + +/* Status Register Constants */ +#define BWTWO_STAT_PENDING_INT 0x80 +#define BWTWO_STAT_MSENSE_MASK 0x70 +#define BWTWO_STAT_ID_MASK 0x0f + +struct bw2_par { + spinlock_t lock; + struct bw2_regs *regs; + + u32 flags; +#define BW2_FLAG_BLANKED 0x00000001 + + unsigned long physbase; + unsigned long fbsize; + + struct sbus_dev *sdev; + struct list_head list; +}; + +/** + * bw2_check_var - Optional function. Validates a var passed in. + * @var: frame buffer variable screen structure + * @info: frame buffer structure that represents a single frame buffer + */ +static int bw2_check_var(struct fb_var_screeninfo *var, struct fb_info *info) +{ + if (var->bits_per_pixel != 8) + return -EINVAL; + + if (var->xres_virtual != var->xres || var->yres_virtual != var->yres) + return -EINVAL; + if (var->nonstd) + return -EINVAL; + if ((var->vmode & FB_VMODE_MASK) != FB_VMODE_NONINTERLACED) + return -EINVAL; + + if (var->xres != info->var.xres || var->yres != info->var.yres) + return -EINVAL; + + return 0; +} + +/** + * bw2_set_par - Optional function. Alters the hardware state. + * @info: frame buffer structure that represents a single frame buffer + */ +static int +bw2_set_par(struct fb_info *info) +{ + return 0; +} + +/** + * bw2_blank - Optional function. Blanks the display. + * @blank_mode: the blank mode we want. + * @info: frame buffer structure that represents a single frame buffer + */ +static int +bw2_blank(int blank, struct fb_info *info) +{ + struct bw2_par *par = (struct bw2_par *) info->par; + struct bw2_regs *regs = par->regs; + unsigned long flags; + u8 val; + + spin_lock_irqsave(&par->lock, flags); + + switch (blank) { + case 0: /* Unblanking */ + val = sbus_readb(®s->control); + val |= BWTWO_CTL_ENABLE_VIDEO; + sbus_writeb(val, ®s->control); + par->flags &= ~BW2_FLAG_BLANKED; + break; + + case 1: /* Normal blanking */ + case 2: /* VESA blank (vsync off) */ + case 3: /* VESA blank (hsync off) */ + case 4: /* Poweroff */ + val = sbus_readb(®s->control); + val &= ~BWTWO_CTL_ENABLE_VIDEO; + sbus_writeb(val, ®s->control); + par->flags |= BW2_FLAG_BLANKED; + break; + } + + spin_unlock_irqrestore(&par->lock, flags); + + return 0; +} + +static struct sbus_mmap_map bw2_mmap_map[] = { + { 0, 0, SBUS_MMAP_FBSIZE(1) }, + { 0, 0, 0 } +}; + +static int bw2_mmap(struct fb_info *info, struct file *file, struct vm_area_struct *vma) +{ + struct bw2_par *par = (struct bw2_par *)info->par; + + return sbusfb_mmap_helper(bw2_mmap_map, + par->physbase, par->fbsize, + (par->sdev ? + par->sdev->reg_addrs[0].which_io : + 0), + vma); +} + +/* + * Initialisation + */ + +static void +bw2_init_fix(struct fb_info *info, int linebytes) +{ + strncpy(info->fix.id, "bwtwo", sizeof(info->fix.id) - 1); + info->fix.id[sizeof(info->fix.id)-1] = 0; + + info->fix.type = FB_TYPE_PACKED_PIXELS; + info->fix.visual = FB_VISUAL_MONO01; + + info->fix.line_length = linebytes; + + info->fix.accel = FB_ACCEL_SUN_BWTWO; +} + +static u8 bw2regs_1600[] __initdata = { + 0x14, 0x8b, 0x15, 0x28, 0x16, 0x03, 0x17, 0x13, + 0x18, 0x7b, 0x19, 0x05, 0x1a, 0x34, 0x1b, 0x2e, + 0x1c, 0x00, 0x1d, 0x0a, 0x1e, 0xff, 0x1f, 0x01, + 0x10, 0x21, 0 +}; + +static u8 bw2regs_ecl[] __initdata = { + 0x14, 0x65, 0x15, 0x1e, 0x16, 0x04, 0x17, 0x0c, + 0x18, 0x5e, 0x19, 0x03, 0x1a, 0xa7, 0x1b, 0x23, + 0x1c, 0x00, 0x1d, 0x08, 0x1e, 0xff, 0x1f, 0x01, + 0x10, 0x20, 0 +}; + +static u8 bw2regs_analog[] __initdata = { + 0x14, 0xbb, 0x15, 0x2b, 0x16, 0x03, 0x17, 0x13, + 0x18, 0xb0, 0x19, 0x03, 0x1a, 0xa6, 0x1b, 0x22, + 0x1c, 0x01, 0x1d, 0x05, 0x1e, 0xff, 0x1f, 0x01, + 0x10, 0x20, 0 +}; + +static u8 bw2regs_76hz[] __initdata = { + 0x14, 0xb7, 0x15, 0x27, 0x16, 0x03, 0x17, 0x0f, + 0x18, 0xae, 0x19, 0x03, 0x1a, 0xae, 0x1b, 0x2a, + 0x1c, 0x01, 0x1d, 0x09, 0x1e, 0xff, 0x1f, 0x01, + 0x10, 0x24, 0 +}; + +static u8 bw2regs_66hz[] __initdata = { + 0x14, 0xbb, 0x15, 0x2b, 0x16, 0x04, 0x17, 0x14, + 0x18, 0xae, 0x19, 0x03, 0x1a, 0xa8, 0x1b, 0x24, + 0x1c, 0x01, 0x1d, 0x05, 0x1e, 0xff, 0x1f, 0x01, + 0x10, 0x20, 0 +}; + +static void bw2_do_default_mode(struct bw2_par *par, struct fb_info *info, + int *linebytes) +{ + u8 status, mon; + u8 *p; + + status = sbus_readb(&par->regs->status); + mon = status & BWTWO_SR_RES_MASK; + switch (status & BWTWO_SR_ID_MASK) { + case BWTWO_SR_ID_MONO_ECL: + if (mon == BWTWO_SR_1600_1280) { + p = bw2regs_1600; + info->var.xres = info->var.xres_virtual = 1600; + info->var.yres = info->var.yres_virtual = 1280; + *linebytes = 1600 / 8; + } else + p = bw2regs_ecl; + break; + + case BWTWO_SR_ID_MONO: + p = bw2regs_analog; + break; + + case BWTWO_SR_ID_MSYNC: + if (mon == BWTWO_SR_1152_900_76_A || + mon == BWTWO_SR_1152_900_76_B) + p = bw2regs_76hz; + else + p = bw2regs_66hz; + break; + + case BWTWO_SR_ID_NOCONN: + return; + + default: + prom_printf("bw2: can't handle SR %02x\n", + status); + prom_halt(); + } + for ( ; *p; p += 2) { + u8 *regp = &((u8 *)par->regs)[p[0]]; + sbus_writeb(p[1], regp); + } +} + +struct all_info { + struct fb_info info; + struct bw2_par par; + struct list_head list; +}; +static LIST_HEAD(bw2_list); + +static void bw2_init_one(struct sbus_dev *sdev) +{ + struct all_info *all; + struct resource *resp; +#ifdef CONFIG_SUN4 + struct resource res; +#endif + int linebytes; + + all = kmalloc(sizeof(*all), GFP_KERNEL); + if (!all) { + printk(KERN_ERR "bw2: Cannot allocate memory.\n"); + return; + } + memset(all, 0, sizeof(*all)); + + INIT_LIST_HEAD(&all->list); + + spin_lock_init(&all->par.lock); + all->par.sdev = sdev; + +#ifdef CONFIG_SUN4 + if (!sdev) { + all->par.physbase = sun4_bwtwo_physaddr; + res.start = sun4_bwtwo_physaddr; + res.end = res.start + BWTWO_REGISTER_OFFSET + sizeof(struct bw2_regs) - 1; + res.flags = IORESOURCE_IO; + resp = &res; + all->info.var.xres = all->info.var.xres_virtual = 1152; + all->info.var.yres = all->info.var.yres_virtual = 900; + all->info.bits_per_pixel = 1; + linebytes = 1152 / 8; + } else +#else + { + if (!sdev) + BUG(); + all->par.physbase = sdev->reg_addrs[0].phys_addr; + resp = &sdev->resource[0]; + sbusfb_fill_var(&all->info.var, (sdev ? sdev->prom_node : 0), 1); + linebytes = prom_getintdefault(sdev->prom_node, "linebytes", + all->info.var.xres); + } +#endif + + all->par.regs = (struct bw2_regs *) + sbus_ioremap(resp, BWTWO_REGISTER_OFFSET, + sizeof(struct bw2_regs), "bw2 regs"); + + if (sdev && !prom_getbool(sdev->prom_node, "width")) + bw2_do_default_mode(&all->par, &all->info, &linebytes); + + all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres); + + all->info.node = NODEV; + all->info.flags = FBINFO_FLAG_DEFAULT; + all->info.fbops = &bw2_ops; +#if defined(CONFIG_SPARC32) + if (sdev) + all->info.screen_base = (char *) + prom_getintdefault(sdev->prom_node, "address", 0); +#endif + if (!all->info.screen_base) + all->info.screen_base = (char *) + sbus_ioremap(resp, 0, all->par.fbsize, "bw2 ram"); + all->info.currcon = -1; + all->info.par = &all->par; + + bw2_blank(0, &all->info); + + bw2_set_par(&all->info); + bw2_init_fix(&all->info, linebytes); + + if (register_framebuffer(&all->info) < 0) { + printk(KERN_ERR "bw2: Could not register framebuffer.\n"); + kfree(all); + return; + } + + list_add(&all->list, &bw2_list); + + printk("bw2: bwtwo at %lx:%lx\n", + (long) (sdev ? sdev->reg_addrs[0].which_io : 0), + (long) all->par.physbase); +} + +int __init bw2_init(void) +{ + struct sbus_bus *sbus; + struct sbus_dev *sdev; + +#ifdef CONFIG_SUN4 + bw2_init_one(NULL); +#endif + for_all_sbusdev(sdev, sbus) { + if (!strcmp(sdev->prom_name, "bwtwo")) + bw2_init_one(sdev); + } + + return 0; +} + +void __exit bw2_exit(void) +{ + struct list_head *pos, *tmp; + + list_for_each_safe(pos, tmp, &bw2_list) { + struct all_info *all = list_entry(pos, typeof(*all), list); + + unregister_framebuffer(&all->info); + kfree(all); + } +} + +int __init +bw2_setup(char *arg) +{ + /* No cmdline options yet... */ + return 0; +} + +#ifdef MODULE +module_init(bw2_init); +module_exit(bw2_exit); +#endif + +MODULE_DESCRIPTION("framebuffer driver for BWTWO chipsets"); +MODULE_AUTHOR("David S. Miller "); +MODULE_LICENSE("GPL"); diff -urN linux-2.5.63-bk6/drivers/video/bwtwofb.c linux-2.5.63-bk7/drivers/video/bwtwofb.c --- linux-2.5.63-bk6/drivers/video/bwtwofb.c Mon Feb 24 11:05:04 2003 +++ linux-2.5.63-bk7/drivers/video/bwtwofb.c Wed Dec 31 16:00:00 1969 @@ -1,269 +0,0 @@ -/* $Id: bwtwofb.c,v 1.15 2001/09/19 00:04:33 davem Exp $ - * bwtwofb.c: BWtwo frame buffer driver - * - * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) - * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) - * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) - * Copyright (C) 1998 Pavel Machek (pavel@ucw.cz) - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include