diff -urN -X diffexcl -I BK Id linux-2.4.11/arch/ppc/8xx_io/Config.in linuxppc_2_4/arch/ppc/8xx_io/Config.in --- linux-2.4.11/arch/ppc/8xx_io/Config.in Mon Sep 24 09:31:16 2001 +++ linuxppc_2_4/arch/ppc/8xx_io/Config.in Mon Sep 24 08:44:31 2001 @@ -33,7 +33,4 @@ bool 'CPU6 Silicon Errata (860 Pre Rev. C)' CONFIG_8xx_CPU6 bool 'I2C/SPI Microcode Patch' CONFIG_UCODE_PATCH -if [ "$CONFIG_IDE" = "y" ]; then - bool 'MPC8xx direct IDE support on PCMCIA port' CONFIG_BLK_DEV_MPC8xx_IDE -fi endmenu diff -urN -X diffexcl -I BK Id linux-2.4.11/arch/ppc/boot/common/misc-simple.c linuxppc_2_4/arch/ppc/boot/common/misc-simple.c --- linux-2.4.11/arch/ppc/boot/common/misc-simple.c Mon Sep 24 09:31:16 2001 +++ linuxppc_2_4/arch/ppc/boot/common/misc-simple.c Thu Sep 27 17:56:21 2001 @@ -45,6 +45,15 @@ char *cmd_line = cmd_buf; unsigned long initrd_start = 0, initrd_end = 0; + +/* These values must be variables. If not, the compiler optimizer + * will remove some code, causing the size of the code to vary + * when these values are zero. This is bad because we first + * compile with these zero to determine the size and offsets + * in an image, than compile again with these set to the proper + * discovered value. + */ +unsigned int initrd_offset, initrd_size; char *zimage_start; int zimage_size; @@ -69,7 +78,8 @@ * were relocated to. */ puts("loaded at: "); puthex(load_addr); - puts(" "); puthex((unsigned long)(load_addr + (4*num_words))); puts("\n"); + puts(" "); puthex((unsigned long)(load_addr + (4*num_words))); + puts("\n"); if ( (unsigned long)load_addr != (unsigned long)&start ) { puts("relocated to: "); puthex((unsigned long)&start); @@ -82,45 +92,38 @@ the size of the elf header which we strip -- Cort */ zimage_start = (char *)(load_addr - 0x10000 + ZIMAGE_OFFSET); zimage_size = ZIMAGE_SIZE; + initrd_offset = INITRD_OFFSET; + initrd_size = INITRD_SIZE; - if ( INITRD_OFFSET ) - initrd_start = load_addr - 0x10000 + INITRD_OFFSET; + if ( initrd_offset ) + initrd_start = load_addr - 0x10000 + initrd_offset; else initrd_start = 0; - initrd_end = INITRD_SIZE + initrd_start; + initrd_end = initrd_size + initrd_start; - /* - * Find a place to stick the zimage and initrd and - * relocate them if we have to. -- Cort - */ + /* Relocate the zImage */ avail_ram = (char *)PAGE_ALIGN((unsigned long)_end); puts("zimage at: "); puthex((unsigned long)zimage_start); - puts(" "); puthex((unsigned long)(zimage_size+zimage_start)); puts("\n"); - if ( (unsigned long)zimage_start <= 0x00800000 ) - { - memcpy( (void *)avail_ram, (void *)zimage_start, zimage_size ); - zimage_start = (char *)avail_ram; - puts("relocated to: "); puthex((unsigned long)zimage_start); - puts(" "); - puthex((unsigned long)zimage_size+(unsigned long)zimage_start); - puts("\n"); + puts(" "); puthex((unsigned long)(zimage_size+zimage_start)); + puts("\n"); + memcpy( (void *)avail_ram, (void *)zimage_start, zimage_size ); + zimage_start = (char *)avail_ram; + puts("relocated to: "); puthex((unsigned long)zimage_start); + puts(" "); + puthex((unsigned long)zimage_size+(unsigned long)zimage_start); + puts("\n"); - /* relocate initrd */ - if ( initrd_start ) - { - puts("initrd at: "); puthex(initrd_start); - puts(" "); puthex(initrd_end); puts("\n"); - avail_ram = (char *)PAGE_ALIGN( - (unsigned long)zimage_size+(unsigned long)zimage_start); - memcpy ((void *)avail_ram, (void *)initrd_start, INITRD_SIZE ); - initrd_start = (unsigned long)avail_ram; - initrd_end = initrd_start + INITRD_SIZE; - puts("relocated to: "); puthex(initrd_start); - puts(" "); puthex(initrd_end); puts("\n"); - } - } else if ( initrd_start ) { + if ( initrd_start ) { puts("initrd at: "); puthex(initrd_start); puts(" "); puthex(initrd_end); puts("\n"); + /* relocate initrd */ + avail_ram = (char *)PAGE_ALIGN((unsigned long)zimage_size + + (unsigned long)zimage_start); + memcpy( (void *)avail_ram, (void *)initrd_start, initrd_size ); + initrd_start = (unsigned long)avail_ram; + initrd_end = initrd_start + initrd_size; + puts("relocated to: "); puthex(initrd_start); + puts(" "); puthex(initrd_end); puts("\n"); } avail_ram = (char *)0x00400000; @@ -161,11 +164,9 @@ puts("\n"); /* mappings on early boot can only handle 16M */ - if ( (int)(cmd_line[0]) > (16<<20)) + if ( (u32)(cmd_line) > (16<<20)) puts("cmd_line located > 16M\n"); - if ( initrd_start > (16<<20)) - puts("initrd_start located > 16M\n"); - + puts("Uncompressing Linux..."); gunzip(0, 0x400000, zimage_start, &zimage_size); diff -urN -X diffexcl -I BK Id linux-2.4.11/arch/ppc/boot/common/ns16550.c linuxppc_2_4/arch/ppc/boot/common/ns16550.c --- linux-2.4.11/arch/ppc/boot/common/ns16550.c Mon Sep 24 09:31:16 2001 +++ linuxppc_2_4/arch/ppc/boot/common/ns16550.c Wed Oct 10 17:48:18 2001 @@ -10,6 +10,9 @@ #include #include +/* Default serial baud rate */ +#define SERIAL_BAUD 9600 + extern void outb(int port, unsigned char val); extern unsigned char inb(int port); extern unsigned long ISA_io; @@ -46,13 +49,20 @@ outb(com_port + (UART_IER << shift), 0x00); /* Access baud rate */ outb(com_port + (UART_LCR << shift), 0x80); -#ifdef CONFIG_SERIAL_CONSOLE_NONSTD - /* Input clock. */ - outb(com_port + (UART_DLL << shift), - (BASE_BAUD / CONFIG_SERIAL_CONSOLE_BAUD)); - outb(com_port + (UART_DLM << shift), - (BASE_BAUD / CONFIG_SERIAL_CONSOLE_BAUD) >> 8); -#endif + /* + * Test if serial port is unconfigured. + * We assume that no-one uses less than 110 baud or + * less than 7 bits per character these days. + * -- paulus. + */ + if (inb(com_port + (UART_DLM << shift)) > 4 + || (inb(com_port + (UART_LCR << shift)) & 2) == 0) { + /* Input clock. */ + outb(com_port + (UART_DLL << shift), + (BASE_BAUD / SERIAL_BAUD)); + outb(com_port + (UART_DLM << shift), + (BASE_BAUD / SERIAL_BAUD) >> 8); + } /* 8 data, 1 stop, no parity */ outb(com_port + (UART_LCR << shift), 0x03); /* RTS/DTR */ diff -urN -X diffexcl -I BK Id linux-2.4.11/arch/ppc/boot/pmac/Makefile linuxppc_2_4/arch/ppc/boot/pmac/Makefile --- linux-2.4.11/arch/ppc/boot/pmac/Makefile Mon Sep 24 09:31:16 2001 +++ linuxppc_2_4/arch/ppc/boot/pmac/Makefile Sat Sep 29 11:00:14 2001 @@ -48,9 +48,9 @@ cp ../images/vmlinux.coff $(TFTPIMAGE) cp ../images/vmlinux.elf-pmac $(TFTPIMAGE).elf -znetboot.initrd: vmlinux.coff.initrd vmlinux.initrd.elf-pmac - cp ../images/vmlinux.coff.initrd $(TFTPIMAGE) - cp ../images/vmlinux.elf-pmac.initrd $(TFTPIMAGE).elf +znetboot.initrd: vmlinux.initrd.coff vmlinux.initrd.elf-pmac + cp ../images/vmlinux.initrd.coff $(TFTPIMAGE) + cp ../images/vmlinux.initrd.elf-pmac $(TFTPIMAGE).elf #floppy: zImage # mount -t hfs /dev/fd0 /mnt @@ -61,7 +61,7 @@ $(OBJCOPY) $(OBJCOPY_ARGS) --add-section=image=../images/vmlinux.gz \ dummy.o ../images/$@ -miboot.image.initrd: miboot.image ../images/ramdisk.image.gz +miboot.initrd.image: miboot.image ../images/ramdisk.image.gz $(OBJCOPY) $(OBJCOPY_ARGS) --add-section=initrd=../images/ramdisk.image.gz \ ../images/miboot.image ../images/$@ @@ -83,11 +83,11 @@ rm -f coffboot ln -sf vmlinux.coff ../images/zImage.pmac -vmlinux.coff.initrd: coffboot.initrd $(HACKCOFF) +vmlinux.initrd.coff: coffboot.initrd $(HACKCOFF) $(OBJCOPY) $(OBJCOPY_ARGS) coffboot.initrd ../images/$@ $(HACKCOFF) ../images/$@ rm -f coffboot.initrd - ln -sf vmlinux.coff.initrd ../images/zImage.initrd.pmac + ln -sf vmlinux.initrd.coff ../images/zImage.initrd.pmac vmlinux.elf-pmac: $(CHRPOBJS) $(LIBS) ../common/no_initrd.o $(MKNOTE) ../images/vmlinux.gz $(LD) $(CHRP_LD_ARGS) -o ../images/$@ $(CHRPOBJS) ../common/no_initrd.o $(LIBS) @@ -110,6 +110,6 @@ zImage: vmlinux.coff vmlinux.elf-pmac miboot.image -zImage.initrd: vmlinux.coff.initrd vmlinux.initrd.elf-pmac miboot.image.initrd +zImage.initrd: vmlinux.initrd.coff vmlinux.initrd.elf-pmac miboot.initrd.image include $(TOPDIR)/Rules.make diff -urN -X diffexcl -I BK Id linux-2.4.11/arch/ppc/boot/prep/misc.c linuxppc_2_4/arch/ppc/boot/prep/misc.c --- linux-2.4.11/arch/ppc/boot/prep/misc.c Mon Sep 24 09:31:16 2001 +++ linuxppc_2_4/arch/ppc/boot/prep/misc.c Thu Sep 27 17:56:21 2001 @@ -47,6 +47,15 @@ RESIDUAL hold_resid_buf; RESIDUAL *hold_residual = &hold_resid_buf; unsigned long initrd_start = 0, initrd_end = 0; + +/* These values must be variables. If not, the compiler optimizer + * will remove some code, causing the size of the code to vary + * when these values are zero. This is bad because we first + * compile with these zero to determine the size and offsets + * in an image, than compile again with these set to the proper + * discovered value. + */ +unsigned int initrd_offset, initrd_size; char *zimage_start; int zimage_size; @@ -302,12 +311,14 @@ size of the elf header which we strip -- Cort */ zimage_start = (char *)(load_addr - 0x10000 + ZIMAGE_OFFSET); zimage_size = ZIMAGE_SIZE; + initrd_offset = INITRD_OFFSET; + initrd_size = INITRD_SIZE; - if ( INITRD_OFFSET ) - initrd_start = load_addr - 0x10000 + INITRD_OFFSET; + if ( initrd_offset ) + initrd_start = load_addr - 0x10000 + initrd_offset; else initrd_start = 0; - initrd_end = INITRD_SIZE + initrd_start; + initrd_end = initrd_size + initrd_start; /* * Find a place to stick the zimage and initrd and @@ -332,9 +343,9 @@ puts(" "); puthex(initrd_end); puts("\n"); avail_ram = (char *)PAGE_ALIGN( (unsigned long)zimage_size+(unsigned long)zimage_start); - memcpy ((void *)avail_ram, (void *)initrd_start, INITRD_SIZE ); + memcpy ((void *)avail_ram, (void *)initrd_start, initrd_size ); initrd_start = (unsigned long)avail_ram; - initrd_end = initrd_start + INITRD_SIZE; + initrd_end = initrd_start + initrd_size; puts("relocated to: "); puthex(initrd_start); puts(" "); puthex(initrd_end); puts("\n"); } diff -urN -X diffexcl -I BK Id linux-2.4.11/arch/ppc/config.in linuxppc_2_4/arch/ppc/config.in --- linux-2.4.11/arch/ppc/config.in Mon Sep 24 09:31:16 2001 +++ linuxppc_2_4/arch/ppc/config.in Thu Sep 20 20:21:16 2001 @@ -95,10 +95,6 @@ Synergy-Gemini CONFIG_GEMINI" CHRP/PowerMac/PReP fi -if [ "$CONFIG_PPC64BRIDGE" != "y" ]; then - bool 'Workarounds for PPC601 bugs' CONFIG_PPC601_SYNC_FIX -fi - if [ "$CONFIG_POWER3" = "n" -a "$CONFIG_POWER4" = "n" -a \ "$CONFIG_6xx" = "n" ]; then define_bool CONFIG_ALL_PPC n @@ -186,6 +182,7 @@ fi if [ "$CONFIG_ALL_PPC" = "y" ]; then + bool 'Workarounds for PPC601 bugs' CONFIG_PPC601_SYNC_FIX bool 'Support for Open Firmware device tree in /proc' CONFIG_PROC_DEVICETREE bool 'Support for RTAS (RunTime Abstraction Services) in /proc' CONFIG_PPC_RTAS bool 'Support for early boot text console (BootX or OpenFirmware only)' CONFIG_BOOTX_TEXT diff -urN -X diffexcl -I BK Id linux-2.4.11/arch/ppc/configs/common_defconfig linuxppc_2_4/arch/ppc/configs/common_defconfig --- linux-2.4.11/arch/ppc/configs/common_defconfig Mon Sep 24 09:31:16 2001 +++ linuxppc_2_4/arch/ppc/configs/common_defconfig Wed Oct 10 17:48:18 2001 @@ -32,7 +32,6 @@ CONFIG_ALL_PPC=y # CONFIG_APUS is not set # CONFIG_GEMINI is not set -CONFIG_PPC601_SYNC_FIX=y # CONFIG_SMP is not set CONFIG_ALTIVEC=y CONFIG_TAU=y @@ -69,6 +68,7 @@ # # CONFIG_PARPORT is not set CONFIG_PPC_RTC=y +CONFIG_PPC601_SYNC_FIX=y CONFIG_PROC_DEVICETREE=y CONFIG_PPC_RTAS=y CONFIG_BOOTX_TEXT=y @@ -112,6 +112,7 @@ # CONFIG_MD_RAID0 is not set # CONFIG_MD_RAID1 is not set # CONFIG_MD_RAID5 is not set +# CONFIG_MD_MULTIPATH is not set # CONFIG_BLK_DEV_LVM is not set # @@ -272,6 +273,9 @@ # CONFIG_IDEDMA_IVB is not set # CONFIG_DMA_NONPCI is not set CONFIG_BLK_DEV_IDE_MODES=y +# CONFIG_BLK_DEV_ATARAID is not set +# CONFIG_BLK_DEV_ATARAID_PDC is not set +# CONFIG_BLK_DEV_ATARAID_HPT is not set # # SCSI support @@ -315,7 +319,8 @@ # CONFIG_AIC7XXX_OLD_TCQ_ON_BY_DEFAULT is not set CONFIG_AIC7XXX_OLD_CMDS_PER_DEVICE=8 CONFIG_AIC7XXX_OLD_PROC_STATS=y -CONFIG_SCSI_ADVANSYS=y +# CONFIG_SCSI_DPT_I2O is not set +CONFIG_SCSI_ADVANSYS=m # CONFIG_SCSI_IN2000 is not set # CONFIG_SCSI_AM53C974 is not set # CONFIG_SCSI_MEGARAID is not set @@ -389,12 +394,10 @@ # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y -# CONFIG_ARM_AM79C961A is not set CONFIG_MACE=y # CONFIG_MACE_AAUI_PORT is not set CONFIG_BMAC=y CONFIG_GMAC=y -# CONFIG_NCR885E is not set # CONFIG_OAKNET is not set # CONFIG_SUNLANCE is not set # CONFIG_HAPPYMEAL is not set @@ -436,15 +439,16 @@ # CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set # CONFIG_WINBOND_840 is not set +# CONFIG_LAN_SAA9730 is not set # CONFIG_NET_POCKET is not set # # Ethernet (1000 Mbit) # # CONFIG_ACENIC is not set -# CONFIG_ACENIC_OMIT_TIGON_I is not set # CONFIG_DL2K is not set # CONFIG_MYRI_SBUS is not set +# CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set # CONFIG_SK98LIN is not set @@ -464,7 +468,18 @@ # # Wireless LAN (non-hamradio) # -# CONFIG_NET_RADIO is not set +CONFIG_NET_RADIO=y +# CONFIG_STRIP is not set +# CONFIG_WAVELAN is not set +# CONFIG_ARLAN is not set +# CONFIG_AIRONET4500 is not set +# CONFIG_AIRONET4500_NONCS is not set +# CONFIG_AIRONET4500_PROC is not set +# CONFIG_AIRO is not set +CONFIG_HERMES=m +CONFIG_APPLE_AIRPORT=m +# CONFIG_PLX_HERMES is not set +CONFIG_NET_WIRELESS=y # # Token Ring devices @@ -521,9 +536,6 @@ CONFIG_FB_IMSTT=y # CONFIG_FB_S3TRIO is not set # CONFIG_FB_VGA16 is not set -# CONFIG_FB_PVR2 is not set -# CONFIG_FB_PVR2_DEBUG is not set -# CONFIG_FB_E1355 is not set CONFIG_FB_MATROX=y CONFIG_FB_MATROX_MILLENIUM=y CONFIG_FB_MATROX_MYSTIQUE=y @@ -533,9 +545,12 @@ CONFIG_FB_ATY=y CONFIG_FB_ATY_GX=y CONFIG_FB_ATY_CT=y +# CONFIG_FB_ATY_CT_VAIO_LCD is not set +CONFIG_FB_RADEON=y CONFIG_FB_ATY128=y -CONFIG_FB_3DFX=y # CONFIG_FB_SIS is not set +CONFIG_FB_3DFX=y +# CONFIG_FB_VOODOO1 is not set # CONFIG_FB_VIRTUAL is not set # CONFIG_FBCON_ADVANCED is not set CONFIG_FBCON_CFB8=y @@ -611,11 +626,37 @@ # # Joysticks # -# CONFIG_JOYSTICK is not set +# CONFIG_INPUT_GAMEPORT is not set +# CONFIG_INPUT_NS558 is not set +# CONFIG_INPUT_LIGHTNING is not set +# CONFIG_INPUT_PCIGAME is not set +# CONFIG_INPUT_CS461X is not set +# CONFIG_INPUT_EMU10K1 is not set +# CONFIG_INPUT_SERIO is not set +# CONFIG_INPUT_SERPORT is not set # -# Input core support is needed for joysticks +# Joysticks # +# CONFIG_INPUT_ANALOG is not set +# CONFIG_INPUT_A3D is not set +# CONFIG_INPUT_ADI is not set +# CONFIG_INPUT_COBRA is not set +# CONFIG_INPUT_GF2K is not set +# CONFIG_INPUT_GRIP is not set +# CONFIG_INPUT_INTERACT is not set +# CONFIG_INPUT_TMDC is not set +# CONFIG_INPUT_SIDEWINDER is not set +# CONFIG_INPUT_IFORCE_USB is not set +# CONFIG_INPUT_IFORCE_232 is not set +# CONFIG_INPUT_WARRIOR is not set +# CONFIG_INPUT_MAGELLAN is not set +# CONFIG_INPUT_SPACEORB is not set +# CONFIG_INPUT_SPACEBALL is not set +# CONFIG_INPUT_STINGER is not set +# CONFIG_INPUT_DB9 is not set +# CONFIG_INPUT_GAMECON is not set +# CONFIG_INPUT_TURBOGRAFX is not set # CONFIG_QIC02_TAPE is not set # @@ -661,6 +702,7 @@ CONFIG_VFAT_FS=m # CONFIG_EFS_FS is not set # CONFIG_JFFS_FS is not set +# CONFIG_JFFS2_FS is not set # CONFIG_CRAMFS is not set CONFIG_TMPFS=y # CONFIG_RAMFS is not set @@ -824,7 +866,7 @@ # CONFIG_USB_BLUETOOTH is not set # CONFIG_USB_STORAGE is not set CONFIG_USB_ACM=m -# CONFIG_USB_PRINTER is not set +CONFIG_USB_PRINTER=m # # USB Human Interface Devices (HID) @@ -837,8 +879,9 @@ # # CONFIG_USB_DC2XX is not set # CONFIG_USB_MDC800 is not set -# CONFIG_USB_SCANNER is not set +CONFIG_USB_SCANNER=m # CONFIG_USB_MICROTEK is not set +# CONFIG_USB_HPUSBSCSI is not set # # USB Multimedia devices @@ -853,10 +896,11 @@ # # USB Network adaptors # -# CONFIG_USB_PLUSB is not set # CONFIG_USB_PEGASUS is not set # CONFIG_USB_CATC is not set -# CONFIG_USB_NET1080 is not set +# CONFIG_USB_CDCETHER is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_USBNET is not set # # USB port drivers @@ -874,12 +918,14 @@ # CONFIG_USB_SERIAL_EMPEG is not set # CONFIG_USB_SERIAL_FTDI_SIO is not set CONFIG_USB_SERIAL_VISOR=m +# CONFIG_USB_SERIAL_IR is not set # CONFIG_USB_SERIAL_EDGEPORT is not set # CONFIG_USB_SERIAL_KEYSPAN_PDA is not set # CONFIG_USB_SERIAL_KEYSPAN is not set # CONFIG_USB_SERIAL_MCT_U232 is not set # CONFIG_USB_SERIAL_PL2303 is not set # CONFIG_USB_SERIAL_CYBERJACK is not set +# CONFIG_USB_SERIAL_XIRCOM is not set # CONFIG_USB_SERIAL_OMNINET is not set # diff -urN -X diffexcl -I BK Id linux-2.4.11/arch/ppc/defconfig linuxppc_2_4/arch/ppc/defconfig --- linux-2.4.11/arch/ppc/defconfig Mon Sep 24 09:31:16 2001 +++ linuxppc_2_4/arch/ppc/defconfig Wed Oct 10 17:48:18 2001 @@ -32,7 +32,6 @@ CONFIG_ALL_PPC=y # CONFIG_APUS is not set # CONFIG_GEMINI is not set -CONFIG_PPC601_SYNC_FIX=y # CONFIG_SMP is not set CONFIG_ALTIVEC=y CONFIG_TAU=y @@ -69,6 +68,7 @@ # # CONFIG_PARPORT is not set CONFIG_PPC_RTC=y +CONFIG_PPC601_SYNC_FIX=y CONFIG_PROC_DEVICETREE=y CONFIG_PPC_RTAS=y CONFIG_BOOTX_TEXT=y @@ -112,6 +112,7 @@ # CONFIG_MD_RAID0 is not set # CONFIG_MD_RAID1 is not set # CONFIG_MD_RAID5 is not set +# CONFIG_MD_MULTIPATH is not set # CONFIG_BLK_DEV_LVM is not set # @@ -272,6 +273,9 @@ # CONFIG_IDEDMA_IVB is not set # CONFIG_DMA_NONPCI is not set CONFIG_BLK_DEV_IDE_MODES=y +# CONFIG_BLK_DEV_ATARAID is not set +# CONFIG_BLK_DEV_ATARAID_PDC is not set +# CONFIG_BLK_DEV_ATARAID_HPT is not set # # SCSI support @@ -315,7 +319,8 @@ # CONFIG_AIC7XXX_OLD_TCQ_ON_BY_DEFAULT is not set CONFIG_AIC7XXX_OLD_CMDS_PER_DEVICE=8 CONFIG_AIC7XXX_OLD_PROC_STATS=y -# CONFIG_SCSI_ADVANSYS is not set +# CONFIG_SCSI_DPT_I2O is not set +CONFIG_SCSI_ADVANSYS=m # CONFIG_SCSI_IN2000 is not set # CONFIG_SCSI_AM53C974 is not set # CONFIG_SCSI_MEGARAID is not set @@ -333,7 +338,7 @@ # CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_NCR53C406A is not set # CONFIG_SCSI_NCR53C7xx is not set -# CONFIG_SCSI_NCR53C8XX is not set +CONFIG_SCSI_NCR53C8XX=y CONFIG_SCSI_SYM53C8XX=y CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8 CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32 @@ -389,12 +394,10 @@ # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y -# CONFIG_ARM_AM79C961A is not set CONFIG_MACE=y # CONFIG_MACE_AAUI_PORT is not set CONFIG_BMAC=y CONFIG_GMAC=y -# CONFIG_NCR885E is not set # CONFIG_OAKNET is not set # CONFIG_SUNLANCE is not set # CONFIG_HAPPYMEAL is not set @@ -436,15 +439,16 @@ # CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set # CONFIG_WINBOND_840 is not set +# CONFIG_LAN_SAA9730 is not set # CONFIG_NET_POCKET is not set # # Ethernet (1000 Mbit) # # CONFIG_ACENIC is not set -# CONFIG_ACENIC_OMIT_TIGON_I is not set # CONFIG_DL2K is not set # CONFIG_MYRI_SBUS is not set +# CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set # CONFIG_SK98LIN is not set @@ -464,7 +468,18 @@ # # Wireless LAN (non-hamradio) # -# CONFIG_NET_RADIO is not set +CONFIG_NET_RADIO=y +# CONFIG_STRIP is not set +# CONFIG_WAVELAN is not set +# CONFIG_ARLAN is not set +# CONFIG_AIRONET4500 is not set +# CONFIG_AIRONET4500_NONCS is not set +# CONFIG_AIRONET4500_PROC is not set +# CONFIG_AIRO is not set +CONFIG_HERMES=m +CONFIG_APPLE_AIRPORT=m +# CONFIG_PLX_HERMES is not set +CONFIG_NET_WIRELESS=y # # Token Ring devices @@ -521,9 +536,6 @@ CONFIG_FB_IMSTT=y # CONFIG_FB_S3TRIO is not set # CONFIG_FB_VGA16 is not set -# CONFIG_FB_PVR2 is not set -# CONFIG_FB_PVR2_DEBUG is not set -# CONFIG_FB_E1355 is not set CONFIG_FB_MATROX=y CONFIG_FB_MATROX_MILLENIUM=y CONFIG_FB_MATROX_MYSTIQUE=y @@ -533,9 +545,12 @@ CONFIG_FB_ATY=y CONFIG_FB_ATY_GX=y CONFIG_FB_ATY_CT=y +# CONFIG_FB_ATY_CT_VAIO_LCD is not set +CONFIG_FB_RADEON=y CONFIG_FB_ATY128=y -CONFIG_FB_3DFX=y # CONFIG_FB_SIS is not set +CONFIG_FB_3DFX=y +# CONFIG_FB_VOODOO1 is not set # CONFIG_FB_VIRTUAL is not set # CONFIG_FBCON_ADVANCED is not set CONFIG_FBCON_CFB8=y @@ -611,11 +626,37 @@ # # Joysticks # -# CONFIG_JOYSTICK is not set +# CONFIG_INPUT_GAMEPORT is not set +# CONFIG_INPUT_NS558 is not set +# CONFIG_INPUT_LIGHTNING is not set +# CONFIG_INPUT_PCIGAME is not set +# CONFIG_INPUT_CS461X is not set +# CONFIG_INPUT_EMU10K1 is not set +# CONFIG_INPUT_SERIO is not set +# CONFIG_INPUT_SERPORT is not set # -# Input core support is needed for joysticks +# Joysticks # +# CONFIG_INPUT_ANALOG is not set +# CONFIG_INPUT_A3D is not set +# CONFIG_INPUT_ADI is not set +# CONFIG_INPUT_COBRA is not set +# CONFIG_INPUT_GF2K is not set +# CONFIG_INPUT_GRIP is not set +# CONFIG_INPUT_INTERACT is not set +# CONFIG_INPUT_TMDC is not set +# CONFIG_INPUT_SIDEWINDER is not set +# CONFIG_INPUT_IFORCE_USB is not set +# CONFIG_INPUT_IFORCE_232 is not set +# CONFIG_INPUT_WARRIOR is not set +# CONFIG_INPUT_MAGELLAN is not set +# CONFIG_INPUT_SPACEORB is not set +# CONFIG_INPUT_SPACEBALL is not set +# CONFIG_INPUT_STINGER is not set +# CONFIG_INPUT_DB9 is not set +# CONFIG_INPUT_GAMECON is not set +# CONFIG_INPUT_TURBOGRAFX is not set # CONFIG_QIC02_TAPE is not set # @@ -661,6 +702,7 @@ CONFIG_VFAT_FS=m # CONFIG_EFS_FS is not set # CONFIG_JFFS_FS is not set +# CONFIG_JFFS2_FS is not set # CONFIG_CRAMFS is not set CONFIG_TMPFS=y # CONFIG_RAMFS is not set @@ -824,7 +866,7 @@ # CONFIG_USB_BLUETOOTH is not set # CONFIG_USB_STORAGE is not set CONFIG_USB_ACM=m -# CONFIG_USB_PRINTER is not set +CONFIG_USB_PRINTER=m # # USB Human Interface Devices (HID) @@ -837,8 +879,9 @@ # # CONFIG_USB_DC2XX is not set # CONFIG_USB_MDC800 is not set -# CONFIG_USB_SCANNER is not set +CONFIG_USB_SCANNER=m # CONFIG_USB_MICROTEK is not set +# CONFIG_USB_HPUSBSCSI is not set # # USB Multimedia devices @@ -853,10 +896,11 @@ # # USB Network adaptors # -# CONFIG_USB_PLUSB is not set # CONFIG_USB_PEGASUS is not set # CONFIG_USB_CATC is not set -# CONFIG_USB_NET1080 is not set +# CONFIG_USB_CDCETHER is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_USBNET is not set # # USB port drivers @@ -874,12 +918,14 @@ # CONFIG_USB_SERIAL_EMPEG is not set # CONFIG_USB_SERIAL_FTDI_SIO is not set CONFIG_USB_SERIAL_VISOR=m +# CONFIG_USB_SERIAL_IR is not set # CONFIG_USB_SERIAL_EDGEPORT is not set # CONFIG_USB_SERIAL_KEYSPAN_PDA is not set # CONFIG_USB_SERIAL_KEYSPAN is not set # CONFIG_USB_SERIAL_MCT_U232 is not set # CONFIG_USB_SERIAL_PL2303 is not set # CONFIG_USB_SERIAL_CYBERJACK is not set +# CONFIG_USB_SERIAL_XIRCOM is not set # CONFIG_USB_SERIAL_OMNINET is not set # diff -urN -X diffexcl -I BK Id linux-2.4.11/arch/ppc/kernel/gemini_setup.c linuxppc_2_4/arch/ppc/kernel/gemini_setup.c --- linux-2.4.11/arch/ppc/kernel/gemini_setup.c Mon Sep 24 09:31:16 2001 +++ linuxppc_2_4/arch/ppc/kernel/gemini_setup.c Thu Sep 27 17:56:21 2001 @@ -150,6 +150,9 @@ void gemini_heartbeat(void) { + /* We only want to do this on 1 CPU */ + if ( smp_processor_id() ) + return; static unsigned long led = GEMINI_LEDBASE+(4*8); static char direction = 8; *(char *)led = 0; diff -urN -X diffexcl -I BK Id linux-2.4.11/arch/ppc/kernel/head_8xx.S linuxppc_2_4/arch/ppc/kernel/head_8xx.S --- linux-2.4.11/arch/ppc/kernel/head_8xx.S Mon Sep 24 09:31:16 2001 +++ linuxppc_2_4/arch/ppc/kernel/head_8xx.S Tue Sep 18 21:50:40 2001 @@ -352,16 +352,21 @@ mtspr MD_TWC, r21 /* Load pte table base address */ mfspr r21, MD_TWC /* ....and get the pte address */ lwz r20, 0(r21) /* Get the pte */ -#if 0 + ori r20, r20, _PAGE_ACCESSED stw r20, 0(r21) -#endif - /* Set four subpage valid bits (24, 25, 26, and 27). - * Clear bit 28 (which should be in the PTE, but we do this anyway). + /* The Linux PTE won't go exactly into the MMU TLB. + * Software indicator bits 21, 22 and 28 must be clear. + * Software indicator bits 24, 25, 26, and 27 must be + * set. All other Linux PTE bits control the behavior + * of the MMU. */ + li r21, 0x0600 + andc r20, r20, r21 /* Clear 21, 22 */ li r21, 0x00f0 - rlwimi r20, r21, 0, 24, 28 + rlwimi r20, r21, 0, 24, 28 /* Set 24-27, clear 28 */ + #ifdef CONFIG_8xx_CPU6 li r3, 0x2d80 stw r3, 12(r0) @@ -441,21 +446,21 @@ #endif mtspr MD_TWC, r21 - /* Set PP0 to PP1 (== _PAGE_USER) & ~_PAGE_RW */ - rlwimi r20, r20, 32-1, 21, 21 - rlwinm r21, r20, 4, 21, 21 - andc r20, r20, r21 + mfspr r21, MD_TWC /* get the pte address again */ + ori r20, r20, _PAGE_ACCESSED + stw r20, 0(r21) - /* Set four subpage valid bits (24, 25, 26, and 27). - * Clear bit 28 (which should be in the PTE, but we do this anyway). + /* The Linux PTE won't go exactly into the MMU TLB. + * Software indicator bits 21, 22 and 28 must be clear. + * Software indicator bits 24, 25, 26, and 27 must be + * set. All other Linux PTE bits control the behavior + * of the MMU. */ -#if 0 - ori r20, r20, 0x00f0 -#else + li r21, 0x0600 + andc r20, r20, r21 /* Clear 21, 22 */ li r21, 0x00f0 - rlwimi r20, r21, 0, 24, 28 + rlwimi r20, r21, 0, 24, 28 /* Set 24-27, clear 28 */ -#endif #ifdef CONFIG_8xx_CPU6 li r3, 0x3d80 stw r3, 12(r0) @@ -549,15 +554,21 @@ /* Update 'changed', among others. */ - ori r20, r20, _PAGE_DIRTY|_PAGE_ACCESSED + ori r20, r20, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE mfspr r21, MD_TWC /* Get pte address again */ stw r20, 0(r21) /* and update pte in table */ - /* Set four subpage valid bits (24, 25, 26, and 27). - * Clear bit 28 (which should be in the PTE, but we do this anyway). + /* The Linux PTE won't go exactly into the MMU TLB. + * Software indicator bits 21, 22 and 28 must be clear. + * Software indicator bits 24, 25, 26, and 27 must be + * set. All other Linux PTE bits control the behavior + * of the MMU. */ + li r21, 0x0600 + andc r20, r20, r21 /* Clear 21, 22 */ li r21, 0x00f0 - rlwimi r20, r21, 0, 24, 28 + rlwimi r20, r21, 0, 24, 28 /* Set 24-27, clear 28 */ + #ifdef CONFIG_8xx_CPU6 li r3, 0x3d80 stw r3, 12(r0) diff -urN -X diffexcl -I BK Id linux-2.4.11/arch/ppc/kernel/open_pic.c linuxppc_2_4/arch/ppc/kernel/open_pic.c --- linux-2.4.11/arch/ppc/kernel/open_pic.c Mon Sep 24 09:31:16 2001 +++ linuxppc_2_4/arch/ppc/kernel/open_pic.c Thu Sep 27 17:56:21 2001 @@ -517,8 +517,10 @@ void openpic_init_processor(u_int cpumask) { + /* physmask won't work at this point since smp_num_cpus + * isn't valid yet. */ openpic_write(&OpenPIC->Global.Processor_Initialization, - physmask(cpumask)); + cpumask); } static spinlock_t openpic_setup_lock = SPIN_LOCK_UNLOCKED; diff -urN -X diffexcl -I BK Id linux-2.4.11/arch/ppc/kernel/prep_pci.c linuxppc_2_4/arch/ppc/kernel/prep_pci.c --- linux-2.4.11/arch/ppc/kernel/prep_pci.c Mon Sep 24 09:31:17 2001 +++ linuxppc_2_4/arch/ppc/kernel/prep_pci.c Sun Oct 7 16:33:22 2001 @@ -33,15 +33,15 @@ /* Which PCI interrupt line does a given device [slot] use? */ /* Note: This really should be two dimensional based in slot/pin used */ -unsigned char *Motherboard_map; +static unsigned char *Motherboard_map; unsigned char *Motherboard_map_name; /* How is the 82378 PIRQ mapping setup? */ -unsigned char *Motherboard_routes; +static unsigned char *Motherboard_routes; -void (*Motherboard_non0)(struct pci_dev *); +static void (*Motherboard_non0)(struct pci_dev *); -void Powerplus_Map_Non0(struct pci_dev *); +static void Powerplus_Map_Non0(struct pci_dev *); /* Used for Motorola to store system config register */ static unsigned long *ProcInfo; @@ -474,16 +474,17 @@ 0, /* Slot 21 - */ 2, /* Slot 22 - */ }; + static char ibm6015_pci_IRQ_routes[] __prepdata = { 0, /* Line 0 - unused */ 13, /* Line 1 */ - 10, /* Line 2 */ + 15, /* Line 2 */ 15, /* Line 3 */ 15, /* Line 4 */ }; -/* IBM Nobis and 850 */ +/* IBM Nobis and Thinkpad 850 */ static char Nobis_pci_IRQ_map[23] __prepdata ={ 0, /* Slot 0 - unused */ 0, /* Slot 1 - unused */ @@ -564,7 +565,7 @@ * are routed to OpenPIC inputs 5-8. These values are offset by * 16 in the table to reflect the Linux kernel interrupt value. */ -struct powerplus_irq_list Powerplus_pci_IRQ_list = +struct powerplus_irq_list Powerplus_pci_IRQ_list __prepdata = { {25, 26, 27, 28}, {21, 22, 23, 24} @@ -577,7 +578,7 @@ * are routed to OpenPIC inputs 12-15. These values are offset by * 16 in the table to reflect the Linux kernel interrupt value. */ -struct powerplus_irq_list Mesquite_pci_IRQ_list = +struct powerplus_irq_list Mesquite_pci_IRQ_list __prepdata = { {24, 25, 26, 27}, {28, 29, 30, 31} @@ -587,7 +588,7 @@ * This table represents the standard PCI swizzle defined in the * PCI bus specification. */ -static unsigned char prep_pci_intpins[4][4] = +static unsigned char prep_pci_intpins[4][4] __prepdata = { { 1, 2, 3, 4}, /* Buses 0, 4, 8, ... */ { 2, 3, 4, 1}, /* Buses 1, 5, 9, ... */ @@ -600,8 +601,6 @@ * other than hard-coded as well... IRQ's are individually mappable * to either edge or level. */ -#define CAROLINA_IRQ_EDGE_MASK_LO 0x00 /* IRQ's 0-7 */ -#define CAROLINA_IRQ_EDGE_MASK_HI 0xA4 /* IRQ's 8-15 [10,13,15] */ /* * 8259 edge/level control definitions @@ -694,7 +693,8 @@ int MotMPIC; int mot_multi; -int __init raven_init(void) +int __init +raven_init(void) { unsigned int devid; unsigned int pci_membase; @@ -776,7 +776,7 @@ void (*map_non0_bus)(struct pci_dev *); /* For boards with more than bus 0 devices. */ struct powerplus_irq_list *pci_irq_list; /* List of PCI MPIC inputs */ unsigned char secondary_bridge_devfn; /* devfn of secondary bus transparent bridge */ -} mot_info[] = { +} mot_info[] __prepdata = { {0x300, 0x00, 0x00, "MVME 2400", Genesis2_pci_IRQ_map, Raven_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0xFF}, {0x010, 0x00, 0x00, "Genesis", Genesis_pci_IRQ_map, Genesis_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0x00}, {0x020, 0x00, 0x00, "Powerstack (Series E)", Comet_pci_IRQ_map, Comet_pci_IRQ_routes, NULL, NULL, 0x00}, @@ -805,7 +805,8 @@ {0x000, 0x00, 0x00, "", NULL, NULL, NULL, NULL, 0x00} }; -void ibm_prep_init(void) +void __init +ibm_prep_init(void) { u32 addr; #ifdef CONFIG_PREP_RESIDUAL @@ -828,13 +829,12 @@ #ifdef CONFIG_PREP_RESIDUAL mpic = residual_find_device(-1, NULL, SystemPeripheral, ProgrammableInterruptController, MPIC, 0); - if (mpic != NULL) { + if (mpic != NULL) printk("mpic = %p\n", mpic); - } #endif } -void +static void __init ibm43p_pci_map_non0(struct pci_dev *dev) { unsigned char intpin; @@ -850,7 +850,8 @@ pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); } -void __init prep_route_pci_interrupts(void) +void __init +prep_route_pci_interrupts(void) { unsigned char *ibc_pirq = (unsigned char *)0x80800860; unsigned char *ibc_pcicon = (unsigned char *)0x80800840; @@ -913,68 +914,65 @@ /* AJF adjust level/edge control according to routes */ irq_mode = 0; for (i = 1; i <= 4; i++) - { irq_mode |= ( 1 << Motherboard_routes[i] ); - } outb( irq_mode & 0xff, 0x4d0 ); outb( (irq_mode >> 8) & 0xff, 0x4d1 ); } - } else if ( _prep_type == _PREP_IBM ) - { - unsigned char pl_id; - /* - * my carolina is 0xf0 - * 6015 has 0xfc - * -- Cort - */ - printk("IBM ID: %08x\n", inb(0x0852)); - switch(inb(0x0852)) - { + } else if ( _prep_type == _PREP_IBM ) { + unsigned char planar_id = inb(0x0852); + unsigned char irq_edge_mask_lo, irq_edge_mask_hi; + + printk("IBM ID: %08x\n", planar_id); + switch(planar_id) { case 0xff: - Motherboard_map_name = "IBM 850/860 Portable"; + Motherboard_map_name = "IBM Thinkpad 850/860"; Motherboard_map = Nobis_pci_IRQ_map; Motherboard_routes = Nobis_pci_IRQ_routes; + irq_edge_mask_lo = 0x00; /* irq's 0-7 all edge-triggered */ + irq_edge_mask_hi = 0xA0; /* irq's 13, 15 level-triggered */ break; case 0xfc: - Motherboard_map_name = "IBM 6015"; + Motherboard_map_name = "IBM 6015/7020 (Sandalfoot/Sandalbow)"; Motherboard_map = ibm6015_pci_IRQ_map; Motherboard_routes = ibm6015_pci_IRQ_routes; + irq_edge_mask_lo = 0x00; /* irq's 0-7 all edge-triggered */ + irq_edge_mask_hi = 0xA0; /* irq's 13, 15 level-triggered */ break; case 0xd5: - Motherboard_map_name = "IBM 43p/140"; + Motherboard_map_name = "IBM 43P-140 (Tiger1)"; Motherboard_map = ibm43p_pci_IRQ_map; Motherboard_routes = ibm43p_pci_IRQ_routes; Motherboard_non0 = ibm43p_pci_map_non0; + irq_edge_mask_lo = 0x00; /* irq's 0-7 all edge-triggered */ + irq_edge_mask_hi = 0xA0; /* irq's 13, 15 level-triggered */ break; default: - Motherboard_map_name = "IBM 8xx (Carolina)"; + printk(KERN_ERR "Unknown IBM motherboard! Defaulting to Carolina.\n"); + case 0xf0: /* PowerSeries 830/850 */ + case 0xf1: /* PowerSeries 830/850 */ + case 0xf2: /* PowerSeries 830/850 */ + case 0xf4: /* 7248-43P */ + case 0xf5: /* 7248-43P */ + case 0xf6: /* 7248-43P */ + case 0xf7: /* 7248-43P (missing from Carolina Tech Spec) */ + Motherboard_map_name = "IBM PS830/PS850/7248 (Carolina)"; Motherboard_map = ibm8xx_pci_IRQ_map; Motherboard_routes = ibm8xx_pci_IRQ_routes; + irq_edge_mask_lo = 0x00; /* irq's 0-7 all edge-triggered */ + irq_edge_mask_hi = 0xA4; /* irq's 10, 13, 15 level-triggered */ break; } - /*printk("Changing IRQ mode\n");*/ - pl_id=inb(0x04d0); - /*printk("Low mask is %#0x\n", pl_id);*/ - outb(pl_id|CAROLINA_IRQ_EDGE_MASK_LO, 0x04d0); - - pl_id=inb(0x04d1); - /*printk("Hi mask is %#0x\n", pl_id);*/ - outb(pl_id|CAROLINA_IRQ_EDGE_MASK_HI, 0x04d1); - pl_id=inb(0x04d1); - /*printk("Hi mask now %#0x\n", pl_id);*/ - } - else - { + outb(inb(0x04d0)|irq_edge_mask_lo, 0x04d0); /* primary 8259 */ + outb(inb(0x04d1)|irq_edge_mask_hi, 0x04d1); /* cascaded 8259 */ + } else { printk("No known machine pci routing!\n"); return; } /* Set up mapping from slots */ for (i = 1; i <= 4; i++) - { ibc_pirq[i-1] = Motherboard_routes[i]; - } /* Enable PCI interrupts */ *ibc_pcicon |= 0x20; } @@ -1039,14 +1037,14 @@ pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); - }else{ + } else { /* Enable LEGIRQ for PCI INT -> 8259 IRQ routing */ pci_write_config_dword(dev, 0x40, 0x10ff08a1); } } } -void +static void __init Powerplus_Map_Non0(struct pci_dev *dev) { struct pci_bus *pbus; /* Parent bus structure pointer */ @@ -1092,23 +1090,19 @@ * Otherwise, assume it's a PMC site and get the interrupt line * value from the interrupt routing table. */ - if (mot_info[mot_entry].secondary_bridge_devfn) - { + if (mot_info[mot_entry].secondary_bridge_devfn) { pbus = dev->bus; while (pbus->primary != 0) pbus = pbus->parent; - if ((pbus->self)->devfn != 0xA0) - { + if ((pbus->self)->devfn != 0xA0) { if ((pbus->self)->devfn == mot_info[mot_entry].secondary_bridge_devfn) intline = mot_info[mot_entry].pci_irq_list->secondary[intpin]; - else - { + else { if ((char *)(mot_info[mot_entry].map) == (char *)Mesquite_pci_IRQ_map) intline = mot_info[mot_entry].map[((pbus->self)->devfn)/8] + 16; - else - { + else { int i; for (i=0;i<3;i++) intpin = (prep_pci_intpins[devnum % 4][intpin]) - 1; @@ -1137,13 +1131,10 @@ if (OpenPIC_Addr) { /* PCI interrupts are controlled by the OpenPIC */ pci_for_each_dev(dev) { - if (dev->bus->number == 0) - { + if (dev->bus->number == 0) { dev->irq = openpic_to_irq(Motherboard_map[PCI_SLOT(dev->devfn)]); pcibios_write_config_byte(dev->bus->number, dev->devfn, PCI_INTERRUPT_LINE, dev->irq); - } - else - { + } else { if (Motherboard_non0 != NULL) Motherboard_non0(dev); } @@ -1164,26 +1155,26 @@ unsigned char d = PCI_SLOT(dev->devfn); dev->irq = Motherboard_routes[Motherboard_map[d]]; - for ( i = 0 ; i <= 5 ; i++ ) - { + for ( i = 0 ; i <= 5 ; i++ ) { /* * Relocate PCI I/O resources if necessary so the * standard 256MB BAT covers them. */ if ( (pci_resource_flags(dev, i) & IORESOURCE_IO) && - (dev->resource[i].start > 0x10000000) ) - { - printk("Relocating PCI address %lx -> %lx\n", - dev->resource[i].start, - (dev->resource[i].start & 0x00FFFFFF) - | 0x01000000); - dev->resource[i].start = - (dev->resource[i].start & 0x00FFFFFF) | 0x01000000; + (dev->resource[i].start > 0x10000000)) { + printk("Relocating PCI address %lx -> %lx\n", + dev->resource[i].start, + (dev->resource[i].start & + 0x00FFFFFF)| 0x01000000); + dev->resource[i].start = + (dev->resource[i].start & 0x00FFFFFF) + | 0x01000000; pci_write_config_dword(dev, - PCI_BASE_ADDRESS_0+(i*0x4), - dev->resource[i].start ); - dev->resource[i].end = - (dev->resource[i].end & 0x00FFFFFF) | 0x01000000; + PCI_BASE_ADDRESS_0 + (i*0x4), + dev->resource[i].start); + dev->resource[i].end = + (dev->resource[i].end & 0x00FFFFFF) + | 0x01000000; } } #if 0 @@ -1223,7 +1214,8 @@ hose->first_busno = 0; hose->last_busno = 0xff; hose->pci_mem_offset = PREP_ISA_MEM_BASE; - hose->io_base_virt = (void *)PREP_ISA_IO_BASE; + hose->io_base_phys = PREP_ISA_IO_BASE; + hose->io_base_virt = (void *)0x80000000; /* see prep_map_io() */ prep_init_resource(&hose->io_resource, 0, 0x0fffffff, IORESOURCE_IO); prep_init_resource(&hose->mem_resources[0], 0xc0000000, 0xfeffffff, IORESOURCE_MEM); @@ -1241,25 +1233,17 @@ pkt = PnP_find_large_vendor_packet( res->DevicePnPHeap+hostbridge->AllocatedOffset, 3, 0); - if(pkt) - { + if(pkt) { #define p pkt->L4_Pack.L4_Data.L4_PPCPack setup_indirect_pci(hose, ld_le32((unsigned *) (p.PPCData)), ld_le32((unsigned *) (p.PPCData+8))); - } - else - { + } else setup_indirect_pci(hose, 0x80000cf8, 0x80000cfc); - } - } - else + } else #endif /* CONFIG_PREP_RESIDUAL */ - { hose->ops = &prep_pci_ops; - } } ppc_md.pcibios_fixup = prep_pcibios_fixup; } - diff -urN -X diffexcl -I BK Id linux-2.4.11/arch/ppc/kernel/prep_setup.c linuxppc_2_4/arch/ppc/kernel/prep_setup.c --- linux-2.4.11/arch/ppc/kernel/prep_setup.c Mon Sep 24 09:31:17 2001 +++ linuxppc_2_4/arch/ppc/kernel/prep_setup.c Mon Sep 17 08:54:36 2001 @@ -840,8 +840,8 @@ */ void __init prep_map_io(void) { - io_block_mapping(0x80000000, 0x80000000, 0x10000000, _PAGE_IO); - io_block_mapping(0xf0000000, 0xc0000000, 0x08000000, _PAGE_IO); + io_block_mapping(0x80000000, PREP_ISA_IO_BASE, 0x10000000, _PAGE_IO); + io_block_mapping(0xf0000000, PREP_ISA_MEM_BASE, 0x08000000, _PAGE_IO); } void __init diff -urN -X diffexcl -I BK Id linux-2.4.11/arch/ppc/kernel/smp.c linuxppc_2_4/arch/ppc/kernel/smp.c --- linux-2.4.11/arch/ppc/kernel/smp.c Mon Sep 24 09:31:17 2001 +++ linuxppc_2_4/arch/ppc/kernel/smp.c Tue Oct 2 13:27:38 2001 @@ -283,6 +283,7 @@ printk("Entering SMP Mode...\n"); smp_num_cpus = 1; smp_store_cpu_info(0); + cpu_online_map = 1UL; /* * assume for now that the first cpu booted is diff -urN -X diffexcl -I BK Id linux-2.4.11/drivers/char/keyboard.c linuxppc_2_4/drivers/char/keyboard.c --- linux-2.4.11/drivers/char/keyboard.c Mon Sep 24 09:31:21 2001 +++ linuxppc_2_4/drivers/char/keyboard.c Wed Sep 19 22:49:01 2001 @@ -319,7 +319,7 @@ compute_shiftstate(); kbd->slockstate = 0; /* play it safe */ #else - keysym = U(plain_map[keycode]); + keysym = U(key_maps[0][keycode]); type = KTYP(keysym); if (type == KT_SHIFT) (*key_handler[type])(keysym & 0xff, up_flag); @@ -750,7 +750,7 @@ k = i*BITS_PER_LONG; for(j=0; j #include -#ifdef CONFIG_MAC_SERIAL -#define SERIAL_DEV_OFFSET 2 +#if defined(CONFIG_MAC_SERIAL) +#define SERIAL_DEV_OFFSET ((_machine == _MACH_prep || _machine == _MACH_chrp) ? 0 : 2) #else #define SERIAL_DEV_OFFSET 0 #endif @@ -5372,6 +5372,14 @@ #endif show_serial_version(); +#if defined(CONFIG_ALL_PPC) && !defined(MODULE) + /* early PowerMacs would machine check */ + if (_machine == _MACH_Pmac) { + printk(KERN_INFO "serial.c: nothing to do on PowerMacs.\n"); + return 0; + } +#endif + /* Initialize the tty_driver structure */ memset(&serial_driver, 0, sizeof(struct tty_driver)); @@ -5386,6 +5394,7 @@ #endif serial_driver.major = TTY_MAJOR; serial_driver.minor_start = 64 + SERIAL_DEV_OFFSET; + serial_driver.name_base = SERIAL_DEV_OFFSET; serial_driver.num = NR_PORTS; serial_driver.type = TTY_DRIVER_TYPE_SERIAL; serial_driver.subtype = SERIAL_TYPE_NORMAL; diff -urN -X diffexcl -I BK Id linux-2.4.11/drivers/char/tty_io.c linuxppc_2_4/drivers/char/tty_io.c --- linux-2.4.11/drivers/char/tty_io.c Mon Sep 24 09:31:22 2001 +++ linuxppc_2_4/drivers/char/tty_io.c Mon Sep 24 08:44:32 2001 @@ -2192,6 +2192,11 @@ #ifdef CONFIG_SERIAL_CONSOLE #if (defined(CONFIG_8xx) || defined(CONFIG_8260)) console_8xx_init(); +#elif defined(CONFIG_MAC_SERIAL) && defined(CONFIG_SERIAL) + if (_machine == _MACH_Pmac) + mac_scc_console_init(); + else + serial_console_init(); #elif defined(CONFIG_MAC_SERIAL) mac_scc_console_init(); #elif defined(CONFIG_PARISC) diff -urN -X diffexcl -I BK Id linux-2.4.11/drivers/ide/ide-features.c linuxppc_2_4/drivers/ide/ide-features.c --- linux-2.4.11/drivers/ide/ide-features.c Thu Feb 22 14:25:06 2001 +++ linuxppc_2_4/drivers/ide/ide-features.c Sat Feb 10 18:41:59 2001 @@ -287,7 +287,11 @@ #if defined(CONFIG_BLK_DEV_IDEDMA) && !defined(CONFIG_DMA_NONPCI) byte unit = (drive->select.b.unit & 0x01); - outb(inb(hwif->dma_base+2) & ~(1<<(5+unit)), hwif->dma_base+2); + /* Some interfaces would like to use this routine, but don"t have this + * kind of DMA engine. --BenH. + */ + if (hwif->dma_base) + outb(inb(hwif->dma_base+2) & ~(1<<(5+unit)), hwif->dma_base+2); #endif /* (CONFIG_BLK_DEV_IDEDMA) && !(CONFIG_DMA_NONPCI) */ /* @@ -356,10 +360,15 @@ drive->id->dma_1word &= ~0x0F00; #if defined(CONFIG_BLK_DEV_IDEDMA) && !defined(CONFIG_DMA_NONPCI) - if (speed > XFER_PIO_4) { - outb(inb(hwif->dma_base+2)|(1<<(5+unit)), hwif->dma_base+2); - } else { - outb(inb(hwif->dma_base+2) & ~(1<<(5+unit)), hwif->dma_base+2); + /* Some interfaces would like to use this routine, but don"t have this + * kind of DMA engine. --BenH. + */ + if (hwif->dma_base) { + if (speed > XFER_PIO_4) { + outb(inb(hwif->dma_base+2)|(1<<(5+unit)), hwif->dma_base+2); + } else { + outb(inb(hwif->dma_base+2) & ~(1<<(5+unit)), hwif->dma_base+2); + } } #endif /* (CONFIG_BLK_DEV_IDEDMA) && !(CONFIG_DMA_NONPCI) */ diff -urN -X diffexcl -I BK Id linux-2.4.11/drivers/macintosh/macserial.c linuxppc_2_4/drivers/macintosh/macserial.c --- linux-2.4.11/drivers/macintosh/macserial.c Mon Sep 24 09:31:24 2001 +++ linuxppc_2_4/drivers/macintosh/macserial.c Wed Oct 10 17:48:20 2001 @@ -2730,6 +2730,7 @@ module_init(macserial_init); module_exit(macserial_cleanup); +MODULE_LICENSE("GPL"); #if 0 /* diff -urN -X diffexcl -I BK Id linux-2.4.11/drivers/macintosh/nvram.c linuxppc_2_4/drivers/macintosh/nvram.c --- linux-2.4.11/drivers/macintosh/nvram.c Mon Sep 24 09:31:24 2001 +++ linuxppc_2_4/drivers/macintosh/nvram.c Wed Oct 10 17:48:20 2001 @@ -124,3 +124,4 @@ module_init(nvram_init); module_exit(nvram_cleanup); +MODULE_LICENSE("GPL"); diff -urN -X diffexcl -I BK Id linux-2.4.11/drivers/macintosh/rtc.c linuxppc_2_4/drivers/macintosh/rtc.c --- linux-2.4.11/drivers/macintosh/rtc.c Mon Sep 24 09:31:24 2001 +++ linuxppc_2_4/drivers/macintosh/rtc.c Wed Oct 10 17:48:20 2001 @@ -146,3 +146,4 @@ module_init(rtc_init); module_exit(rtc_exit); +MODULE_LICENSE("GPL"); diff -urN -X diffexcl -I BK Id linux-2.4.11/drivers/net/ne2k-pci.c linuxppc_2_4/drivers/net/ne2k-pci.c --- linux-2.4.11/drivers/net/ne2k-pci.c Wed Oct 10 12:39:00 2001 +++ linuxppc_2_4/drivers/net/ne2k-pci.c Tue Oct 2 09:52:02 2001 @@ -69,8 +69,6 @@ #if defined(__powerpc__) #define inl_le(addr) le32_to_cpu(inl(addr)) #define inw_le(addr) le16_to_cpu(inw(addr)) -#define insl insl_ns -#define outsl outsl_ns #endif #define PFX DRV_NAME ": " diff -urN -X diffexcl -I BK Id linux-2.4.11/drivers/net/pcnet32.c linuxppc_2_4/drivers/net/pcnet32.c --- linux-2.4.11/drivers/net/pcnet32.c Wed Oct 10 12:39:02 2001 +++ linuxppc_2_4/drivers/net/pcnet32.c Tue Oct 2 09:52:02 2001 @@ -649,6 +649,13 @@ #if defined(__i386__) printk(KERN_WARNING "%s: Probably a Compaq, using the PROM address of", dev->name); memcpy(dev->dev_addr, promaddr, 6); +#elif defined(__powerpc__) + if (!is_valid_ether_addr(dev->dev_addr) + && is_valid_ether_addr(promaddr)) { + printk("\n" KERN_WARNING "%s: using PROM address:", + dev->name); + memcpy(dev->dev_addr, promaddr, 6); + } #endif } } diff -urN -X diffexcl -I BK Id linux-2.4.11/drivers/sound/dmasound/Makefile linuxppc_2_4/drivers/sound/dmasound/Makefile --- linux-2.4.11/drivers/sound/dmasound/Makefile Sat Dec 30 09:07:23 2000 +++ linuxppc_2_4/drivers/sound/dmasound/Makefile Sun Feb 25 15:59:59 2001 @@ -7,15 +7,21 @@ # # Note 2! The CFLAGS definitions are now in the main makefile... +O_TARGET = dmasound.o + export-objs := dmasound_core.o -obj-$(CONFIG_DMASOUND_ATARI) += dmasound_core.o dmasound_atari.o -obj-$(CONFIG_DMASOUND_AWACS) += dmasound_core.o dmasound_awacs.o -obj-$(CONFIG_DMASOUND_PAULA) += dmasound_core.o dmasound_paula.o -obj-$(CONFIG_DMASOUND_Q40) += dmasound_core.o dmasound_q40.o - -ifeq ($(CONFIG_DMASOUND),y) - O_TARGET = dmasound.o -endif +list-multi := dmasound_pmac.o + +dmasound_pmac-objs := dmasound_awacs.o + +obj-$(CONFIG_DMASOUND) += dmasound_core.o +obj-$(CONFIG_DMASOUND_ATARI) += dmasound_atari.o +obj-$(CONFIG_DMASOUND_AWACS) += dmasound_pmac.o +obj-$(CONFIG_DMASOUND_PAULA) += dmasound_paula.o +obj-$(CONFIG_DMASOUND_Q40) += dmasound_q40.o include $(TOPDIR)/Rules.make + +dmasound_pmac.o: $(dmasound_pmac-objs) + $(LD) $(EXTRA_LDFLAGS) -r -o $@ $(dmasound_pmac-objs) diff -urN -X diffexcl -I BK Id linux-2.4.11/drivers/sound/dmasound/dmasound.h linuxppc_2_4/drivers/sound/dmasound/dmasound.h --- linux-2.4.11/drivers/sound/dmasound/dmasound.h Fri Aug 17 08:28:57 2001 +++ linuxppc_2_4/drivers/sound/dmasound/dmasound.h Fri Aug 17 05:37:32 2001 @@ -29,6 +29,9 @@ #define SND_DEV_SNDPROC 9 /* /dev/sndproc for programmable devices */ #define SND_DEV_PSS SND_DEV_SNDPROC +#define DMASOUND_CORE_REVISION 1 +#define DMASOUND_CORE_EDITION 1 + #define DSP_DEFAULT_SPEED 8000 #define ON 1 @@ -120,12 +123,13 @@ void (*record)(void); /* optional */ void (*mixer_init)(void); /* optional */ int (*mixer_ioctl)(u_int, u_long); /* optional */ - void (*write_sq_setup)(void); /* optional */ - void (*read_sq_setup)(void); /* optional */ + int (*write_sq_setup)(void); /* optional */ + int (*read_sq_setup)(void); /* optional */ void (*sq_open)(void); /* optional */ int (*state_info)(char *); /* optional */ void (*abort_read)(void); /* optional */ int min_dsp_speed; + int version; } MACHINE; diff -urN -X diffexcl -I BK Id linux-2.4.11/drivers/sound/dmasound/dmasound_atari.c linuxppc_2_4/drivers/sound/dmasound/dmasound_atari.c --- linux-2.4.11/drivers/sound/dmasound/dmasound_atari.c Mon Sep 24 09:31:28 2001 +++ linuxppc_2_4/drivers/sound/dmasound/dmasound_atari.c Tue Sep 11 18:24:14 2001 @@ -1438,9 +1438,10 @@ return AtaMixerIoctl(cmd, arg); } -static void AtaWriteSqSetup(void) +static int AtaWriteSqSetup(void) { write_sq_ignore_int = 0; + return 0; } static void AtaSqOpen(void) diff -urN -X diffexcl -I BK Id linux-2.4.11/drivers/sound/dmasound/dmasound_awacs.c linuxppc_2_4/drivers/sound/dmasound/dmasound_awacs.c --- linux-2.4.11/drivers/sound/dmasound/dmasound_awacs.c Mon Sep 24 09:31:28 2001 +++ linuxppc_2_4/drivers/sound/dmasound/dmasound_awacs.c Tue Sep 11 18:24:14 2001 @@ -4,7 +4,14 @@ * * PowerMac `AWACS' and `Burgundy' DMA Sound Driver * - * See linux/drivers/sound/dmasound/dmasound_core.c for copyright and credits + * See linux/drivers/sound/dmasound/dmasound_core.c for copyright and + * history prior to 2001/01/26. + * + * 26/01/2001 ed 0.1 Iain Sandoe + * - added version info. + * - moved dbdma command buffer allocation to PMacXXXSqSetup() + * - fixed up beep dbdma cmd buffers + * */ @@ -18,6 +25,7 @@ #include #include #include +#include #ifdef CONFIG_ADB_CUDA #include #endif @@ -36,6 +44,8 @@ #include "awacs_defs.h" #include "dmasound.h" +#define DMASOUND_AWACS_REVISION 0 +#define DMASOUND_AWACS_EDITION 1 /* * Interrupt numbers and addresses, obtained from the device tree. @@ -54,15 +64,18 @@ int awacs_device_id = 0; int awacs_has_iic = 0; #define AWACS_BURGUNDY 100 /* fake revision # for burgundy */ +#define AWACS_DACA 80 /* fake revision # for daca (ibook)? */ /* * Space for the DBDMA command blocks. */ static void *awacs_tx_cmd_space; static volatile struct dbdma_cmd *awacs_tx_cmds; +static int number_of_tx_cmd_buffers = 0; static void *awacs_rx_cmd_space; static volatile struct dbdma_cmd *awacs_rx_cmds; +static int number_of_rx_cmd_buffers = 0; /* * Cached values of AWACS registers (we can't read them). @@ -121,6 +134,7 @@ static int beep_playing = 0; static int awacs_beep_state = 0; static short *beep_buf; +static void *beep_dbdma_cmd_space; static volatile struct dbdma_cmd *beep_dbdma_cmd; static void (*orig_mksound)(unsigned int, unsigned int); static int is_pbook_3400; @@ -246,8 +260,8 @@ static int PMacMixerIoctl(u_int cmd, u_long arg); -static void PMacWriteSqSetup(void); -static void PMacReadSqSetup(void); +static int PMacWriteSqSetup(void); +static int PMacReadSqSetup(void); static void PMacAbortRead(void); @@ -850,12 +864,16 @@ free_irq(awacs_irq, 0); free_irq(awacs_tx_irq, 0); free_irq(awacs_rx_irq, 0); - kfree(awacs_tx_cmd_space); + if (awacs_tx_cmd_space) + kfree(awacs_tx_cmd_space); if (awacs_rx_cmd_space) kfree(awacs_rx_cmd_space); - if (beep_buf) + if (beep_dbdma_cmd_space) + kfree(beep_dbdma_cmd_space); + if (beep_buf) { kfree(beep_buf); - kd_mksound = orig_mksound; + kd_mksound = orig_mksound; + } #ifdef CONFIG_PMAC_PBOOK pmu_unregister_sleep_notifier(&awacs_sleep_notifier); #endif @@ -1017,6 +1035,8 @@ if (awacs_beep_state) { /* sound takes precedence over beeps */ out_le32(&awacs_txdma->control, (RUN|PAUSE|FLUSH|WAKE) << 16); + while (in_le32(&awacs_txdma->status) & RUN) + udelay(1); out_le32(&awacs->control, (in_le32(&awacs->control) & ~0x1f00) | (awacs_rate_index << 8)); @@ -1043,6 +1063,7 @@ out_le16(&cp->command, OUTPUT_MORE + INTR_ALWAYS); if (write_sq.active == 0) out_le32(&awacs_txdma->cmdptr, virt_to_bus(cp)); + (void)in_le32(&awacs_txdma->status); out_le32(&awacs_txdma->control, ((RUN|WAKE) << 16) + (RUN|WAKE)); ++write_sq.active; } @@ -1099,7 +1120,6 @@ static void pmac_awacs_rx_intr(int irq, void *devid, struct pt_regs *regs) { - /* For some reason on my PowerBook G3, I get one interrupt * when the interrupt vector is installed (like something is * pending). This happens before the dbdma is initialize by @@ -1167,7 +1187,7 @@ static void awacs_write(int val) { - if (awacs_revision >= AWACS_BURGUNDY) + if (awacs_revision >= AWACS_DACA) return; while (in_le32(&awacs->codec_ctrl) & MASK_NEWECMD) ; /* XXX should have timeout */ @@ -1182,6 +1202,8 @@ if (beep_playing) { st_le16(&beep_dbdma_cmd->command, DBDMA_STOP); out_le32(&awacs_txdma->control, (RUN|PAUSE|FLUSH|WAKE) << 16); + while (in_le32(&awacs_txdma->status) & RUN) + udelay(1); out_le32(&awacs->control, (in_le32(&awacs->control) & ~0x1f00) | (awacs_rate_index << 8)); @@ -1207,6 +1229,8 @@ static int beep_nsamples_cache; static int beep_volume_cache; + if (beep_buf == NULL) + return; for (i = 0; i < 8 && awacs_freqs[i] >= BEEP_SRATE; ++i) if (awacs_freqs_ok[i]) beep_speed = i; @@ -1264,11 +1288,14 @@ save_flags(flags); cli(); if (beep_playing) { /* i.e. haven't been terminated already */ out_le32(&awacs_txdma->control, (RUN|WAKE|FLUSH|PAUSE) << 16); + while (in_le32(&awacs_txdma->status) & RUN) + udelay(1); out_le32(&awacs->control, (in_le32(&awacs->control) & ~0x1f00) | (beep_speed << 8)); out_le32(&awacs->byteswap, 0); out_le32(&awacs_txdma->cmdptr, virt_to_bus(beep_dbdma_cmd)); + (void)in_le32(&awacs_txdma->status); out_le32(&awacs_txdma->control, RUN | (RUN << 16)); } restore_flags(flags); @@ -1558,13 +1585,13 @@ static void awacs_enable_amp(int spkr_vol) { +#ifdef CONFIG_ADB_CUDA struct adb_request req; awacs_spkr_vol = spkr_vol; if (sys_ctrler != SYS_CTRLER_CUDA) return; -#ifdef CONFIG_ADB_CUDA /* turn on headphones */ cuda_request(&req, NULL, 5, CUDA_PACKET, CUDA_GET_SET_IIC, 0x8a, 4, 0); @@ -1871,11 +1898,53 @@ } -static void PMacWriteSqSetup(void) +/* Write/Read sq setup functions: + Check to see if we have enough (or any) dbdma cmd buffers for the + user's fragment settings. If not, allocate some. If this fails we will + point at the beep buffer - as an emergency provision - to stop dma tromping + on some random bit of memory (if someone lets it go anyway). + The command buffers are then set up to point to the fragment buffers + (allocated elsewhere). We need n+1 commands the last of which holds + a NOP + loop to start. +*/ + +static int PMacWriteSqSetup(void) { int i; volatile struct dbdma_cmd *cp; + /* stop the controller from doing any output - if it isn't already. + it _should_ be before this is called anyway */ + + out_le32(&awacs_txdma->control, (RUN|PAUSE|FLUSH|WAKE) << 16); + while (in_le32(&awacs_txdma->status) & RUN) + udelay(1); + + if ((write_sq.numBufs+1) > number_of_tx_cmd_buffers) { + if (awacs_tx_cmd_space) + kfree(awacs_tx_cmd_space); + number_of_tx_cmd_buffers = 0; + + /* we need nbufs + 1 (for the loop) and we should request + 1 again + because the DBDMA_ALIGN might pull the start up by up to + sizeof(struct dbdma_cmd) - 4 (assuming kmalloc aligns 32 bits). + */ + + awacs_tx_cmd_space = kmalloc + ((write_sq.numBufs + 1 + 1) * sizeof(struct dbdma_cmd), + GFP_KERNEL); + if (awacs_tx_cmd_space == NULL) { + /* don't leave it dangling - nasty but better than a random address */ + out_le32(&awacs_txdma->cmdptr, virt_to_bus(beep_dbdma_cmd)); + printk(KERN_ERR + "dmasound_pmac: can't allocate dbdma cmd buffers, driver disabled\n"); + return -ENOMEM; + } + awacs_tx_cmds = (volatile struct dbdma_cmd *) + DBDMA_ALIGN(awacs_tx_cmd_space); + number_of_tx_cmd_buffers = write_sq.numBufs + 1; + } + cp = awacs_tx_cmds; memset((void *)cp, 0, (write_sq.numBufs+1) * sizeof(struct dbdma_cmd)); for (i = 0; i < write_sq.numBufs; ++i, ++cp) { @@ -1883,15 +1952,47 @@ } st_le16(&cp->command, DBDMA_NOP + BR_ALWAYS); st_le32(&cp->cmd_dep, virt_to_bus(awacs_tx_cmds)); - out_le32(&awacs_txdma->control, (RUN|PAUSE|FLUSH|WAKE) << 16); + /* point the controller at the command stack - ready to go */ out_le32(&awacs_txdma->cmdptr, virt_to_bus(awacs_tx_cmds)); + return 0; } -static void PMacReadSqSetup(void) +static int PMacReadSqSetup(void) { int i; volatile struct dbdma_cmd *cp; + /* stop the controller from doing any input - if it isn't already. + it _should_ be before this is called anyway */ + + out_le32(&awacs_rxdma->control, (RUN|PAUSE|FLUSH|WAKE) << 16); + while (in_le32(&awacs_rxdma->status) & RUN) + udelay(1); + + if( (read_sq.numBufs+1) > number_of_rx_cmd_buffers ) { + if (awacs_rx_cmd_space) + kfree(awacs_rx_cmd_space); + number_of_rx_cmd_buffers = 0; + + /* we need nbufs + 1 (for the loop) and we should request + 1 again + because the DBDMA_ALIGN might pull the start up by up to + sizeof(struct dbdma_cmd) - 4 (assuming kmalloc aligns 32 bits). + */ + + awacs_rx_cmd_space = kmalloc + ((read_sq.numBufs + 1 + 1) * sizeof(struct dbdma_cmd), + GFP_KERNEL); + if (awacs_rx_cmd_space == NULL) { + /* don't leave it dangling - nasty but better than a random address */ + out_le32(&awacs_rxdma->cmdptr, virt_to_bus(beep_dbdma_cmd)); + printk(KERN_ERR + "dmasound_pmac: can't allocate dbdma cmd buffers, driver disabled\n"); + return -ENOMEM; + } + awacs_rx_cmds = (volatile struct dbdma_cmd *) + DBDMA_ALIGN(awacs_rx_cmd_space); + number_of_rx_cmd_buffers = read_sq.numBufs+1 ; + } cp = awacs_rx_cmds; memset((void *)cp, 0, (read_sq.numBufs+1) * sizeof(struct dbdma_cmd)); @@ -1907,14 +2008,9 @@ */ st_le16(&cp->command, DBDMA_NOP + BR_ALWAYS); st_le32(&cp->cmd_dep, virt_to_bus(awacs_rx_cmds)); - - /* Don't start until the first read is done. - * This will also abort any operations in progress if the DMA - * happens to be running (and it shouldn't). - */ - out_le32(&awacs_rxdma->control, (RUN|PAUSE|FLUSH|WAKE) << 16); + /* point the controller at the command stack - ready to go */ out_le32(&awacs_rxdma->cmdptr, virt_to_bus(awacs_rx_cmds)); - + return 0; } static void PMacAbortRead(void) @@ -1937,7 +2033,7 @@ static MACHINE machPMac = { name: awacs_name, - name2: "AWACS", + name2: "Built-in Sound", open: PMacOpen, release: PMacRelease, dma_alloc: PMacAlloc, @@ -1956,7 +2052,8 @@ write_sq_setup: PMacWriteSqSetup, read_sq_setup: PMacReadSqSetup, abort_read: PMacAbortRead, - min_dsp_speed: 8000 + min_dsp_speed: 8000, + version: ((DMASOUND_AWACS_REVISION<<8) + DMASOUND_AWACS_EDITION) }; @@ -1966,6 +2063,7 @@ int __init dmasound_awacs_init(void) { struct device_node *np; + int vol; if (_machine != _MACH_Pmac) return -ENODEV; @@ -1974,203 +2072,218 @@ awacs_revision = 0; np = find_devices("awacs"); if (np == 0) { + unsigned int *prop, l, i; + /* * powermac G3 models have a node called "davbus" * with a child called "sound". */ struct device_node *sound; np = find_devices("davbus"); + /* + * if we didn't find a davbus device, try 'i2s-a' since + * this seems to be what iBooks have + */ + if (np == NULL) { + np = find_devices("i2s-a"); + } + if (np == NULL) + return -ENODEV; sound = find_devices("sound"); - if (sound != 0 && sound->parent == np) { - unsigned int *prop, l, i; - prop = (unsigned int *) - get_property(sound, "sub-frame", 0); - if (prop != 0 && *prop >= 0 && *prop < 16) - awacs_subframe = *prop; - if (device_is_compatible(sound, "burgundy")) - awacs_revision = AWACS_BURGUNDY; - /* This should be verified on older screamers */ - if (device_is_compatible(sound, "screamer")) - awacs_is_screamer = 1; - prop = (unsigned int *)get_property(sound, "device-id", 0); - if (prop != 0) - awacs_device_id = *prop; - awacs_has_iic = (find_devices("perch") != NULL); - - /* look for a property saying what sample rates - are available */ - for (i = 0; i < 8; ++i) - awacs_freqs_ok[i] = 0; + while (sound != 0 && sound->parent != np) + sound = sound->next; + if (sound == 0) + return -ENODEV; + prop = (unsigned int *) get_property(sound, "sub-frame", 0); + if (prop != 0 && *prop >= 0 && *prop < 16) + awacs_subframe = *prop; + if (device_is_compatible(sound, "burgundy")) + awacs_revision = AWACS_BURGUNDY; + if (device_is_compatible(sound, "daca")) + awacs_revision = AWACS_DACA; + /* This should be verified on older screamers */ + if (device_is_compatible(sound, "screamer")) + awacs_is_screamer = 1; + prop = (unsigned int *)get_property(sound, "device-id", 0); + if (prop != 0) + awacs_device_id = *prop; + awacs_has_iic = (find_devices("perch") != NULL); + + /* look for a property saying what sample rates + are available */ + for (i = 0; i < 8; ++i) + awacs_freqs_ok[i] = 0; + prop = (unsigned int *)get_property(sound, "sample-rates", &l); + if (prop == 0) prop = (unsigned int *) get_property - (sound, "sample-rates", &l); - if (prop == 0) - prop = (unsigned int *) get_property - (sound, "output-frame-rates", &l); - if (prop != 0) { - for (l /= sizeof(int); l > 0; --l) { - /* sometimes the rate is in the - high-order 16 bits (?) */ - unsigned int r = *prop++; - if (r >= 0x10000) - r >>= 16; - for (i = 0; i < 8; ++i) { - if (r == awacs_freqs[i]) { - awacs_freqs_ok[i] = 1; - break; - } + (sound, "output-frame-rates", &l); + if (prop != 0) { + for (l /= sizeof(int); l > 0; --l) { + /* sometimes the rate is in the + high-order 16 bits (?) */ + unsigned int r = *prop++; + if (r >= 0x10000) + r >>= 16; + for (i = 0; i < 8; ++i) { + if (r == awacs_freqs[i]) { + awacs_freqs_ok[i] = 1; + break; } } - } else { - /* assume just 44.1k is OK */ - awacs_freqs_ok[0] = 1; } + } else { + /* assume just 44.1k is OK */ + awacs_freqs_ok[0] = 1; } } - if (np != NULL && np->n_addrs >= 3 && np->n_intrs >= 3) { - int vol; - dmasound.mach = machPMac; - - awacs = (volatile struct awacs_regs *) - ioremap(np->addrs[0].address, 0x80); - awacs_txdma = (volatile struct dbdma_regs *) - ioremap(np->addrs[1].address, 0x100); - awacs_rxdma = (volatile struct dbdma_regs *) - ioremap(np->addrs[2].address, 0x100); - - awacs_irq = np->intrs[0].line; - awacs_tx_irq = np->intrs[1].line; - awacs_rx_irq = np->intrs[2].line; - - awacs_tx_cmd_space = kmalloc((write_sq.numBufs + 4) * sizeof(struct dbdma_cmd), - GFP_KERNEL); - if (awacs_tx_cmd_space == NULL) { - printk(KERN_ERR "DMA sound driver: Not enough buffer memory, driver disabled!\n"); - return -ENOMEM; - } - awacs_node = np; -#ifdef CONFIG_PMAC_PBOOK - if (machine_is_compatible("PowerBook1,1") - || machine_is_compatible("AAPL,PowerBook1998")) { - pmu_suspend(); - feature_set(np, FEATURE_Sound_CLK_enable); - feature_set(np, FEATURE_Sound_power); - /* Shorter delay will not work */ - mdelay(1000); - pmu_resume(); - } -#endif - awacs_tx_cmds = (volatile struct dbdma_cmd *) - DBDMA_ALIGN(awacs_tx_cmd_space); + if (np->n_addrs < 3 || np->n_intrs < 3) { + printk(KERN_ERR "AWACS: can't use %s (%d addrs, %d intrs)\n", + np->full_name, np->n_addrs, np->n_intrs); + return -ENODEV; + } + dmasound.mach = machPMac; - awacs_rx_cmd_space = kmalloc((read_sq.numBufs + 4) * sizeof(struct dbdma_cmd), - GFP_KERNEL); - if (awacs_rx_cmd_space == NULL) { - printk("DMA sound driver: No memory for input"); - } - awacs_rx_cmds = (volatile struct dbdma_cmd *) - DBDMA_ALIGN(awacs_rx_cmd_space); + awacs = (volatile struct awacs_regs *) + ioremap(np->addrs[0].address, 0x80); + awacs_txdma = (volatile struct dbdma_regs *) + ioremap(np->addrs[1].address, 0x100); + awacs_rxdma = (volatile struct dbdma_regs *) + ioremap(np->addrs[2].address, 0x100); + + awacs_irq = np->intrs[0].line; + awacs_tx_irq = np->intrs[1].line; + awacs_rx_irq = np->intrs[2].line; + awacs_node = np; +#ifdef CONFIG_PMAC_PBOOK + if (machine_is_compatible("PowerBook1,1") + || machine_is_compatible("AAPL,PowerBook1998")) { + feature_set(np, FEATURE_Sound_CLK_enable); + feature_set(np, FEATURE_Sound_power); + /* Shorter delay will not work */ + mdelay(1000); + } +#endif - awacs_reg[0] = MASK_MUX_CD; - /* FIXME: Only machines with external SRS module need MASK_PAROUT */ - awacs_reg[1] = MASK_LOOPTHRU; - if (awacs_has_iic || awacs_device_id == 0x5 || /*awacs_device_id == 0x8 - || */awacs_device_id == 0xb) - awacs_reg[1] |= MASK_PAROUT; - /* get default volume from nvram */ - vol = (~nvram_read_byte(0x1308) & 7) << 1; - awacs_reg[2] = vol + (vol << 6); - awacs_reg[4] = vol + (vol << 6); - awacs_reg[5] = 0; - awacs_reg[6] = 0; - awacs_reg[7] = 0; - out_le32(&awacs->control, 0x11); - awacs_write(awacs_reg[0] + MASK_ADDR0); - awacs_write(awacs_reg[1] + MASK_ADDR1); - awacs_write(awacs_reg[2] + MASK_ADDR2); - awacs_write(awacs_reg[4] + MASK_ADDR4); - if (awacs_is_screamer) { - awacs_write(awacs_reg[5] + MASK_ADDR5); - awacs_write(awacs_reg[6] + MASK_ADDR6); - awacs_write(awacs_reg[7] + MASK_ADDR7); + awacs_reg[0] = MASK_MUX_CD; + /* FIXME: Only machines with external SRS module need MASK_PAROUT */ + awacs_reg[1] = MASK_LOOPTHRU; + if (awacs_has_iic || awacs_device_id == 0x5 + || /*awacs_device_id == 0x8 ||*/ awacs_device_id == 0xb) + awacs_reg[1] |= MASK_PAROUT; + /* get default volume from nvram */ + vol = (~nvram_read_byte(0x1308) & 7) << 1; + awacs_reg[2] = vol + (vol << 6); + awacs_reg[4] = vol + (vol << 6); + awacs_reg[5] = 0; + awacs_reg[6] = 0; + awacs_reg[7] = 0; + out_le32(&awacs->control, 0x11); + awacs_write(awacs_reg[0] + MASK_ADDR0); + awacs_write(awacs_reg[1] + MASK_ADDR1); + awacs_write(awacs_reg[2] + MASK_ADDR2); + awacs_write(awacs_reg[4] + MASK_ADDR4); + if (awacs_is_screamer) { + awacs_write(awacs_reg[5] + MASK_ADDR5); + awacs_write(awacs_reg[6] + MASK_ADDR6); + awacs_write(awacs_reg[7] + MASK_ADDR7); + } + + /* Initialize recent versions of the awacs */ + if (awacs_revision == 0) { + awacs_revision = (in_le32(&awacs->codec_stat) >> 12) & 0xf; + if (awacs_revision == 3) { + mdelay(100); + awacs_write(0x6000); + mdelay(2); + awacs_write(awacs_reg[1] + MASK_ADDR1); + awacs_enable_amp(100 * 0x101); } + } + if (awacs_revision >= AWACS_BURGUNDY) + awacs_burgundy_init(); - /* Initialize recent versions of the awacs */ - if (awacs_revision == 0) { - awacs_revision = - (in_le32(&awacs->codec_stat) >> 12) & 0xf; - if (awacs_revision == 3) { - mdelay(100); - awacs_write(0x6000); - mdelay(2); - awacs_write(awacs_reg[1] + MASK_ADDR1); - awacs_enable_amp(100 * 0x101); - } - } - if (awacs_revision >= AWACS_BURGUNDY) - awacs_burgundy_init(); + /* Reset dbdma channels */ + out_le32(&awacs_txdma->control, (RUN|PAUSE|FLUSH|WAKE|DEAD) << 16); + while (in_le32(&awacs_txdma->status) & RUN) + udelay(1); + out_le32(&awacs_rxdma->control, (RUN|PAUSE|FLUSH|WAKE|DEAD) << 16); + while (in_le32(&awacs_rxdma->status) & RUN) + udelay(1); + + /* Initialize beep stuff */ + /* need to ask for two buffers to cater for potential pull-up + by DBDMA_ALIGN + */ + beep_dbdma_cmd_space = kmalloc((1 + 1) * sizeof(struct dbdma_cmd), + GFP_KERNEL); + if (beep_dbdma_cmd_space == NULL) { + printk(KERN_ERR "dmasound_pmac: no beep dbdma cmd space\n") ; + return -ENOMEM; + } + beep_dbdma_cmd = (volatile struct dbdma_cmd *) + DBDMA_ALIGN(beep_dbdma_cmd_space); + beep_buf = (short *) kmalloc(BEEP_BUFLEN * 4, GFP_KERNEL); + if (beep_buf == NULL) { + printk(KERN_ERR "dmasound_pmac: no memory for beep buffer\n"); + kfree(beep_dbdma_cmd_space); + return -ENOMEM; + } + /* OK, we should be safe to claim the mksound vector now */ + orig_mksound = kd_mksound; + kd_mksound = awacs_mksound; - /* Initialize beep stuff */ - beep_dbdma_cmd = awacs_tx_cmds + (write_sq.numBufs + 1); - orig_mksound = kd_mksound; - kd_mksound = awacs_mksound; - beep_buf = (short *) kmalloc(BEEP_BUFLEN * 4, GFP_KERNEL); - if (beep_buf == NULL) - printk(KERN_WARNING "dmasound: no memory for " - "beep buffer\n"); #ifdef CONFIG_PMAC_PBOOK - pmu_register_sleep_notifier(&awacs_sleep_notifier); + pmu_register_sleep_notifier(&awacs_sleep_notifier); #endif /* CONFIG_PMAC_PBOOK */ - /* Powerbooks have odd ways of enabling inputs such as - an expansion-bay CD or sound from an internal modem - or a PC-card modem. */ - if (machine_is_compatible("AAPL,3400/2400") - || machine_is_compatible("AAPL,3500")) { - is_pbook_3400 = 1; - /* - * Enable CD and PC-card sound inputs. - * This is done by reading from address - * f301a000, + 0x10 to enable the expansion-bay - * CD sound input, + 0x80 to enable the PC-card - * sound input. The 0x100 enables the SCSI bus - * terminator power. - */ - latch_base = (unsigned char *) ioremap - (0xf301a000, 0x1000); - in_8(latch_base + 0x190); - } else if (machine_is_compatible("PowerBook1,1") - || machine_is_compatible("AAPL,PowerBook1998")) { - struct device_node* mio; - macio_base = 0; - is_pbook_G3 = 1; - for (mio = np->parent; mio; mio = mio->parent) { - if (strcmp(mio->name, "mac-io") == 0 - && mio->n_addrs > 0) { - macio_base = (unsigned char *) ioremap - (mio->addrs[0].address, 0x40); - break; - } + /* Powerbooks have odd ways of enabling inputs such as + an expansion-bay CD or sound from an internal modem + or a PC-card modem. */ + if (machine_is_compatible("AAPL,3400/2400") + || machine_is_compatible("AAPL,3500")) { + is_pbook_3400 = 1; + /* + * Enable CD and PC-card sound inputs. + * This is done by reading from address + * f301a000, + 0x10 to enable the expansion-bay + * CD sound input, + 0x80 to enable the PC-card + * sound input. The 0x100 enables the SCSI bus + * terminator power. + */ + latch_base = (unsigned char *) ioremap (0xf301a000, 0x1000); + in_8(latch_base + 0x190); + + } else if (machine_is_compatible("PowerBook1,1") + || machine_is_compatible("AAPL,PowerBook1998")) { + struct device_node* mio; + macio_base = 0; + is_pbook_G3 = 1; + for (mio = np->parent; mio; mio = mio->parent) { + if (strcmp(mio->name, "mac-io") == 0 + && mio->n_addrs > 0) { + macio_base = (unsigned char *) ioremap + (mio->addrs[0].address, 0x40); + break; } - /* - * Enable CD sound input. - * The relevant bits for writing to this byte are 0x8f. - * I haven't found out what the 0x80 bit does. - * For the 0xf bits, writing 3 or 7 enables the CD - * input, any other value disables it. Values - * 1, 3, 5, 7 enable the microphone. Values 0, 2, - * 4, 6, 8 - f enable the input from the modem. - */ - if (macio_base) - out_8(macio_base + 0x37, 3); - } - sprintf(awacs_name, "PowerMac (AWACS rev %d) ", - awacs_revision); - return dmasound_init(); + } + /* + * Enable CD sound input. + * The relevant bits for writing to this byte are 0x8f. + * I haven't found out what the 0x80 bit does. + * For the 0xf bits, writing 3 or 7 enables the CD + * input, any other value disables it. Values + * 1, 3, 5, 7 enable the microphone. Values 0, 2, + * 4, 6, 8 - f enable the input from the modem. + * -- paulus. + */ + if (macio_base) + out_8(macio_base + 0x37, 3); } - return -ENODEV; + sprintf(awacs_name, "PowerMac (AWACS rev %d) ", awacs_revision); + return dmasound_init(); } static void __exit dmasound_awacs_cleanup(void) diff -urN -X diffexcl -I BK Id linux-2.4.11/drivers/sound/dmasound/dmasound_core.c linuxppc_2_4/drivers/sound/dmasound/dmasound_core.c --- linux-2.4.11/drivers/sound/dmasound/dmasound_core.c Fri Aug 17 08:28:58 2001 +++ linuxppc_2_4/drivers/sound/dmasound/dmasound_core.c Mon Aug 13 10:40:58 2001 @@ -103,6 +103,13 @@ * 2000/3/25 Geert Uytterhoeven: * - Integration of dmasound_q40 * - Small clean ups + * + * 2001/01/26 [rev 1.0] Iain Sandoe + * - make /dev/sndstat show revision & edition information. + * - since dmasound.mach.sq_setup() can fail on pmac its type + * has been changed to int and the returns are checked. + * [1.1] - stop missing translations from being called. + * */ @@ -117,7 +124,6 @@ #include "dmasound.h" - /* * Declarations */ @@ -470,7 +476,12 @@ default: return 0; } - return ct_func(userPtr, userCount, frame, frameUsed, frameLeft); + /* if the user has requested a non-existent translation don't try + to call it but just return 0 bytes moved + */ + if (ct_func) + return ct_func(userPtr, userCount, frame, frameUsed, frameLeft); + return 0; } @@ -596,10 +607,10 @@ } } -static void sq_setup(struct sound_queue *sq, int max_count, int max_active, - int block_size) +static int sq_setup(struct sound_queue *sq, int max_count, int max_active, + int block_size) { - void (*setup_func)(void); + int (*setup_func)(void); sq->max_count = max_count; sq->max_active = max_active; @@ -617,7 +628,8 @@ setup_func = dmasound.mach.read_sq_setup; } if (setup_func) - setup_func(); + return setup_func(); + return 0; } static inline void sq_play(void) @@ -807,7 +819,8 @@ return rc; } - sq_setup(sq, numbufs, numbufs, bufsize); + if ((rc = sq_setup(sq, numbufs, numbufs, bufsize))) + return rc; sq->open_mode = file->f_mode; } return rc; @@ -926,7 +939,7 @@ static int sq_ioctl(struct inode *inode, struct file *file, u_int cmd, u_long arg) { - int val; + int val, result; u_long fmt; int data; int size, nbufs; @@ -1003,7 +1016,9 @@ size = write_sq.bufSize; } else size = write_sq.bufSize; - sq_setup(&write_sq, write_sq.numBufs, nbufs, size); + result = sq_setup(&write_sq, write_sq.numBufs, nbufs, size); + if (result) + return result; return IOCTL_OUT(arg,write_sq.bufSize | write_sq.numBufs << 16); case SNDCTL_DSP_GETOSPACE: info.fragments = write_sq.max_active - write_sq.count; @@ -1071,9 +1086,11 @@ * /dev/sndstat */ +#define STAT_BUFF_LEN 512 + static struct { int busy; - char buf[512]; /* state.buf should not overflow! */ + char buf[STAT_BUFF_LEN]; /* state.buf should not overflow! */ int len, ptr; } state; @@ -1089,7 +1106,13 @@ state.ptr = 0; state.busy = 1; - len += sprintf(buffer+len, "%sDMA sound driver:\n", dmasound.mach.name); + len += sprintf(buffer+len, "%sDMA sound driver rev %03d :\n", + dmasound.mach.name, (DMASOUND_CORE_REVISION<<4) + + ((dmasound.mach.version>>8) & 0x0f)); + len += sprintf(buffer+len, + "Core driver edition %02d.%02d : %s driver edition %02d.%02d\n", + DMASOUND_CORE_REVISION, DMASOUND_CORE_EDITION, dmasound.mach.name2, + (dmasound.mach.version >> 8), (dmasound.mach.version & 0xff)) ; len += sprintf(buffer+len, "\tsound.format = 0x%x", dmasound.soft.format); @@ -1135,6 +1158,9 @@ write_sq.count, write_sq.rear_size); len += sprintf(buffer+len, "\tsq.active = %d sq.syncing = %d\n", write_sq.active, write_sq.syncing); + if (len >= STAT_BUFF_LEN) + printk(KERN_ERR "dmasound_core: stat buffer overflowed!\n") +; state.len = len; return 0; } @@ -1227,6 +1253,7 @@ if (irq_installed) { sound_silence(); dmasound.mach.irqcleanup(); + irq_installed = 0; } write_sq_release_buffers(); diff -urN -X diffexcl -I BK Id linux-2.4.11/drivers/usb/usb-ohci.h linuxppc_2_4/drivers/usb/usb-ohci.h --- linux-2.4.11/drivers/usb/usb-ohci.h Fri Aug 17 08:29:01 2001 +++ linuxppc_2_4/drivers/usb/usb-ohci.h Mon Aug 20 14:38:42 2001 @@ -58,7 +58,7 @@ dma_addr_t dma; __u32 unused[3]; -} __attribute((aligned(16))); +} __attribute((aligned(32))); typedef struct ed ed_t; @@ -567,7 +567,7 @@ return -ENOMEM; ohci->dev_cache = pci_pool_create ("ohci_dev", ohci->ohci_dev, sizeof (struct ohci_device), - 16 /* byte alignment */, + 32 /* byte alignment */, 0 /* no page-crossing issues */, GFP_KERNEL | OHCI_MEM_FLAGS); if (!ohci->dev_cache) diff -urN -X diffexcl -I BK Id linux-2.4.11/drivers/video/aty/atyfb_base.c linuxppc_2_4/drivers/video/aty/atyfb_base.c --- linux-2.4.11/drivers/video/aty/atyfb_base.c Mon Sep 24 09:31:32 2001 +++ linuxppc_2_4/drivers/video/aty/atyfb_base.c Fri Sep 14 21:07:01 2001 @@ -88,6 +88,9 @@ #include #include #endif +#ifdef CONFIG_BOOTX_TEXT +#include +#endif #ifdef CONFIG_NVRAM #include #endif @@ -819,6 +822,13 @@ display_info.disp_reg_address = info->ati_regbase_phys; } #endif /* CONFIG_FB_COMPAT_XPMAC */ +#ifdef CONFIG_BOOTX_TEXT + btext_update_display(info->frame_buffer_phys, + (((par->crtc.h_tot_disp>>16) & 0xff)+1)*8, + ((par->crtc.v_tot_disp>>16) & 0x7ff)+1, + par->crtc.bpp, + par->crtc.vxres*par->crtc.bpp/8); +#endif /* CONFIG_BOOTX_TEXT */ } static int atyfb_decode_var(const struct fb_var_screeninfo *var, diff -urN -X diffexcl -I BK Id linux-2.4.11/drivers/video/aty128.h linuxppc_2_4/drivers/video/aty128.h --- linux-2.4.11/drivers/video/aty128.h Mon Sep 18 03:48:04 2000 +++ linuxppc_2_4/drivers/video/aty128.h Sun Jan 7 08:21:43 2001 @@ -267,7 +267,6 @@ #define DAC_MASK 0xFF000000 #define DAC_BLANKING 0x00000004 #define DAC_RANGE_CNTL 0x00000003 -#define DAC_RANGE_CNTL 0x00000003 #define DAC_PALETTE_ACCESS_CNTL 0x00000020 #define DAC_PDWN 0x00008000 diff -urN -X diffexcl -I BK Id linux-2.4.11/drivers/video/aty128fb.c linuxppc_2_4/drivers/video/aty128fb.c --- linux-2.4.11/drivers/video/aty128fb.c Wed Jul 4 14:33:38 2001 +++ linuxppc_2_4/drivers/video/aty128fb.c Thu Aug 16 21:18:15 2001 @@ -67,6 +67,9 @@ #ifdef CONFIG_FB_COMPAT_XPMAC #include #endif +#ifdef CONFIG_BOOTX_TEXT +#include +#endif /* CONFIG_BOOTX_TEXT */ #include