diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2001-03-12 01:41:47 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2001-03-12 01:41:47 +0000 |
commit | 5bf5f1e30c8cfc21a1396ed136420f29d01970c6 (patch) | |
tree | 76ca5e96392a45ca6751116b4e66a46afbc23dc7 | |
parent | 37541f7211fcefcd88059a5274700d84ceca7a99 (diff) |
Dead files which for some reason still exist in our tree.
-rw-r--r-- | arch/ppc/coffboot/main.c | 215 | ||||
-rw-r--r-- | arch/ppc/configs/gemini_defconfig | 484 | ||||
-rw-r--r-- | arch/ppc/kernel/gemini_pci.c | 103 | ||||
-rw-r--r-- | arch/ppc/kernel/gemini_prom.S | 96 | ||||
-rw-r--r-- | arch/ppc/kernel/gemini_setup.c | 562 | ||||
-rw-r--r-- | arch/ppc/mbxboot/vmlinux.lds | 152 | ||||
-rw-r--r-- | drivers/acpi/hardware/hwcpu32.c | 711 | ||||
-rw-r--r-- | drivers/acpi/hardware/hwxface.c | 595 | ||||
-rw-r--r-- | drivers/acpi/ksyms.c | 91 | ||||
-rw-r--r-- | include/asm-ppc/gemini.h | 168 | ||||
-rw-r--r-- | include/asm-ppc/gemini_serial.h | 41 |
11 files changed, 0 insertions, 3218 deletions
diff --git a/arch/ppc/coffboot/main.c b/arch/ppc/coffboot/main.c deleted file mode 100644 index e6049b4a2..000000000 --- a/arch/ppc/coffboot/main.c +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright (C) Paul Mackerras 1997. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#include "nonstdio.h" -#include "rs6000.h" -#include "zlib.h" -#include <asm/bootinfo.h> -#include <asm/processor.h> -#define __KERNEL__ -#include <asm/page.h> - -extern void *finddevice(const char *); -extern int getprop(void *, const char *, void *, int); -void gunzip(void *, int, unsigned char *, int *); - -#define get_16be(x) (*(unsigned short *)(x)) -#define get_32be(x) (*(unsigned *)(x)) - -#define RAM_START 0xc0000000 -#define PROG_START RAM_START -#define RAM_END (RAM_START + 0x800000) /* only 8M mapped with BATs */ - -#define RAM_FREE (RAM_START + 0x540000) /* after image of coffboot */ - -char *avail_ram; -char *end_avail; - -coffboot(int a1, int a2, void *prom) -{ - void *options; - unsigned loadbase; - struct external_filehdr *eh; - struct external_scnhdr *sp; - struct external_scnhdr *isect, *rsect; - int ns, oh, i; - unsigned sa, len; - void *dst; - unsigned char *im; - unsigned initrd_start, initrd_size; - - printf("coffboot starting\n"); - options = finddevice("/options"); - if (options == (void *) -1) - exit(); - if (getprop(options, "load-base", &loadbase, sizeof(loadbase)) - != sizeof(loadbase)) { - printf("error getting load-base\n"); - exit(); - } - setup_bats(RAM_START); - - loadbase += RAM_START; - eh = (struct external_filehdr *) loadbase; - ns = get_16be(eh->f_nscns); - oh = get_16be(eh->f_opthdr); - - sp = (struct external_scnhdr *) (loadbase + sizeof(struct external_filehdr) + oh); - isect = rsect = NULL; - for (i = 0; i < ns; ++i, ++sp) { - if (strcmp(sp->s_name, "image") == 0) - isect = sp; - else if (strcmp(sp->s_name, "initrd") == 0) - rsect = sp; - } - if (isect == NULL) { - printf("image section not found\n"); - exit(); - } - - if (rsect != NULL && (initrd_size = get_32be(rsect->s_size)) != 0) { - initrd_start = (RAM_END - initrd_size) & ~0xFFF; - a1 = initrd_start; - a2 = initrd_size; - printf("initial ramdisk at %x (%u bytes)\n", - initrd_start, initrd_size); - memcpy((char *) initrd_start, - (char *) (loadbase + get_32be(rsect->s_scnptr)), - initrd_size); - end_avail = (char *) initrd_start; - } else { - end_avail = (char *) RAM_END; - } - - im = (unsigned char *)(loadbase + get_32be(isect->s_scnptr)); - len = get_32be(isect->s_size); - dst = (void *) PROG_START; - - if (im[0] == 0x1f && im[1] == 0x8b) { - void *cp = (void *) RAM_FREE; - avail_ram = (void *) (RAM_FREE + ((len + 7) & -8)); - memcpy(cp, im, len); - printf("gunzipping... "); - gunzip(dst, 0x400000, cp, &len); - printf("done\n"); - - } else { - memmove(dst, im, len); - } - - flush_cache(dst, len); - - sa = (unsigned long)dst; - printf("start address = 0x%x\n", sa); - -#if 0 - pause(); -#endif - { - struct bi_record *rec; - - rec = (struct bi_record *)_ALIGN((unsigned long)dst+len+(1<<20)-1,(1<<20)); - - rec->tag = BI_FIRST; - rec->size = sizeof(struct bi_record); - rec = (struct bi_record *)((unsigned long)rec + rec->size); - - rec->tag = BI_BOOTLOADER_ID; - sprintf( (char *)rec->data, "coffboot"); - rec->size = sizeof(struct bi_record) + strlen("coffboot") + 1; - rec = (struct bi_record *)((unsigned long)rec + rec->size); - - rec->tag = BI_MACHTYPE; - rec->data[0] = _MACH_Pmac; - rec->data[1] = 1; - rec->size = sizeof(struct bi_record) + sizeof(unsigned long); - rec = (struct bi_record *)((unsigned long)rec + rec->size); - - rec->tag = BI_LAST; - rec->size = sizeof(struct bi_record); - rec = (struct bi_record *)((unsigned long)rec + rec->size); - } - - (*(void (*)())sa)(a1, a2, prom); - - printf("returned?\n"); - - pause(); -} - -void *zalloc(void *x, unsigned items, unsigned size) -{ - void *p = avail_ram; - - size *= items; - size = (size + 7) & -8; - avail_ram += size; - if (avail_ram > end_avail) { - printf("oops... out of memory\n"); - pause(); - } - return p; -} - -void zfree(void *x, void *addr, unsigned nb) -{ -} - -#define HEAD_CRC 2 -#define EXTRA_FIELD 4 -#define ORIG_NAME 8 -#define COMMENT 0x10 -#define RESERVED 0xe0 - -#define DEFLATED 8 - -void gunzip(void *dst, int dstlen, unsigned char *src, int *lenp) -{ - z_stream s; - int r, i, flags; - - /* skip header */ - i = 10; - flags = src[3]; - if (src[2] != DEFLATED || (flags & RESERVED) != 0) { - printf("bad gzipped data\n"); - exit(); - } - if ((flags & EXTRA_FIELD) != 0) - i = 12 + src[10] + (src[11] << 8); - if ((flags & ORIG_NAME) != 0) - while (src[i++] != 0) - ; - if ((flags & COMMENT) != 0) - while (src[i++] != 0) - ; - if ((flags & HEAD_CRC) != 0) - i += 2; - if (i >= *lenp) { - printf("gunzip: ran out of data in header\n"); - exit(); - } - s.zalloc = zalloc; - s.zfree = zfree; - r = inflateInit2(&s, -MAX_WBITS); - if (r != Z_OK) { - printf("inflateInit2 returned %d\n", r); - exit(); - } - s.next_in = src + i; - s.avail_in = *lenp - i; - s.next_out = dst; - s.avail_out = dstlen; - r = inflate(&s, Z_FINISH); - if (r != Z_OK && r != Z_STREAM_END) { - printf("inflate returned %d\n", r); - exit(); - } - *lenp = s.next_out - (unsigned char *) dst; - inflateEnd(&s); -} diff --git a/arch/ppc/configs/gemini_defconfig b/arch/ppc/configs/gemini_defconfig deleted file mode 100644 index 44147f58c..000000000 --- a/arch/ppc/configs/gemini_defconfig +++ /dev/null @@ -1,484 +0,0 @@ -# -# Automatically generated make config: don't edit -# -# CONFIG_UID16 is not set - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y - -# -# Loadable module support -# -CONFIG_MODULES=y -# CONFIG_MODVERSIONS is not set -CONFIG_KMOD=y - -# -# Platform support -# -CONFIG_PPC=y -CONFIG_6xx=y -# CONFIG_4xx is not set -# CONFIG_POWER3 is not set -# CONFIG_POWER4 is not set -# CONFIG_8260 is not set -# CONFIG_8xx is not set -# CONFIG_ALL_PPC is not set -CONFIG_GEMINI=y -# CONFIG_EST8260 is not set -# CONFIG_APUS is not set -# CONFIG_SMP is not set -CONFIG_ALTIVEC=y -CONFIG_MACH_SPECIFIC=y - -# -# General setup -# -# CONFIG_HIGHMEM is not set -# CONFIG_MOL is not set -# CONFIG_ISA is not set -# CONFIG_SBUS is not set -CONFIG_PCI=y -CONFIG_NET=y -CONFIG_SYSCTL=y -CONFIG_SYSVIPC=y -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_KCORE_ELF=y -CONFIG_BINFMT_ELF=y -CONFIG_KERNEL_ELF=y -# CONFIG_BINFMT_MISC is not set -# CONFIG_PCI_NAMES is not set -# CONFIG_HOTPLUG is not set -# CONFIG_PCMCIA is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set -# CONFIG_VGA_CONSOLE is not set -# CONFIG_FB is not set -# CONFIG_PPC_RTC is not set -# CONFIG_PROC_DEVICETREE is not set -# CONFIG_BOOTX_TEXT is not set -# CONFIG_MOTOROLA_HOTSWAP is not set - -# -# Memory Technology Devices (MTD) -# -# CONFIG_MTD is not set - -# -# Plug and Play configuration -# -# CONFIG_PNP is not set -# CONFIG_ISAPNP is not set - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_DEV_XD is not set -# CONFIG_PARIDE is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_BLK_DEV_INITRD is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set -# CONFIG_BLK_DEV_MD is not set -# CONFIG_MD_LINEAR is not set -# CONFIG_MD_RAID0 is not set -# CONFIG_MD_RAID1 is not set -# CONFIG_MD_RAID5 is not set -# CONFIG_BLK_DEV_LVM is not set -# CONFIG_LVM_PROC_FS is not set - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set -CONFIG_NETLINK=y -# CONFIG_RTNETLINK is not set -# CONFIG_NETLINK_DEV is not set -# CONFIG_NETFILTER is not set -# CONFIG_FILTER is not set -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -# CONFIG_IP_PNP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_INET_ECN is not set -CONFIG_SYN_COOKIES=y -# CONFIG_IPV6 is not set -# CONFIG_KHTTPD is not set -# CONFIG_ATM is not set - -# -# -# -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_LLC is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# ATA/IDE/MFM/RLL support -# -# CONFIG_IDE is not set -# CONFIG_BLK_DEV_IDE_MODES is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI support -# -CONFIG_SCSI=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -CONFIG_SD_EXTRA_DEVS=40 -# CONFIG_CHR_DEV_ST is not set -CONFIG_BLK_DEV_SR=y -CONFIG_BLK_DEV_SR_VENDOR=y -CONFIG_SR_EXTRA_DEVS=2 -# CONFIG_CHR_DEV_SG is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_DEBUG_QUEUES is not set -# CONFIG_SCSI_MULTI_LUN is not set -CONFIG_SCSI_CONSTANTS=y -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI low-level drivers -# -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_7000FASST is not set -# CONFIG_SCSI_ACARD is not set -# CONFIG_SCSI_AHA152X is not set -# CONFIG_SCSI_AHA1542 is not set -# CONFIG_SCSI_AHA1740 is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_ADVANSYS is not set -# CONFIG_SCSI_IN2000 is not set -# CONFIG_SCSI_AM53C974 is not set -# CONFIG_SCSI_MEGARAID is not set -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_CPQFCTS is not set -# CONFIG_SCSI_DMX3191D is not set -# CONFIG_SCSI_DTC3280 is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_EATA_DMA is not set -# CONFIG_SCSI_EATA_PIO is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_GENERIC_NCR5380 is not set -# CONFIG_SCSI_INITIO is not set -# CONFIG_SCSI_INIA100 is not set -# CONFIG_SCSI_NCR53C406A is not set -# CONFIG_SCSI_NCR53C7xx is not set -CONFIG_SCSI_NCR53C8XX=y -# CONFIG_SCSI_SYM53C8XX is not set -CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8 -CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32 -CONFIG_SCSI_NCR53C8XX_SYNC=20 -# CONFIG_SCSI_NCR53C8XX_PROFILE is not set -# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set -# CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set -# CONFIG_SCSI_PAS16 is not set -# CONFIG_SCSI_PCI2000 is not set -# CONFIG_SCSI_PCI2220I is not set -# CONFIG_SCSI_PSI240I is not set -# CONFIG_SCSI_QLOGIC_FAS is not set -# CONFIG_SCSI_QLOGIC_ISP is not set -# CONFIG_SCSI_QLOGIC_FC is not set -# CONFIG_SCSI_QLOGIC_1280 is not set -# CONFIG_SCSI_SIM710 is not set -# CONFIG_SCSI_SYM53C416 is not set -# CONFIG_SCSI_DC390T is not set -# CONFIG_SCSI_T128 is not set -# CONFIG_SCSI_U14_34F is not set -# CONFIG_SCSI_DEBUG is not set -# CONFIG_SCSI_MESH is not set -# CONFIG_SCSI_MAC53C94 is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set -# CONFIG_ETHERTAP is not set -# CONFIG_NET_SB1000 is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -# CONFIG_MACE is not set -# CONFIG_BMAC is not set -# CONFIG_GMAC is not set -CONFIG_NCR885E=y -# CONFIG_OAKNET is not set -# CONFIG_NET_VENDOR_3COM is not set -# CONFIG_LANCE is not set -# CONFIG_NET_VENDOR_SMC is not set -# CONFIG_NET_VENDOR_RACAL is not set -# CONFIG_AT1700 is not set -# CONFIG_DEPCA is not set -# CONFIG_HP100 is not set -# CONFIG_NET_ISA is not set -# CONFIG_NET_PCI is not set -# CONFIG_NET_POCKET is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_SK98LIN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set -# CONFIG_NET_FC is not set -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support -# -# CONFIG_IRDA is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Old CD-ROM drivers (not SCSI, not IDE) -# -# CONFIG_CD_NO_IDESCSI is not set - -# -# Console drivers -# - -# -# Frame-buffer support -# -# CONFIG_FB is not set - -# -# Input core support -# -# CONFIG_INPUT is not set - -# -# Macintosh device drivers -# - -# -# Character devices -# -# CONFIG_VT is not set -CONFIG_SERIAL=y -CONFIG_SERIAL_CONSOLE=y -# CONFIG_SERIAL_EXTENDED is not set -# CONFIG_SERIAL_NONSTANDARD is not set -CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# Mice -# -# CONFIG_BUSMOUSE is not set -# CONFIG_MOUSE is not set - -# -# Joysticks -# -# CONFIG_JOYSTICK is not set - -# -# Input core support is needed for joysticks -# -# CONFIG_QIC02_TAPE is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_INTEL_RNG is not set -# CONFIG_NVRAM is not set -# CONFIG_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set -# CONFIG_DRM is not set - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# File systems -# -# CONFIG_QUOTA is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_ADFS_FS is not set -# CONFIG_ADFS_FS_RW is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_FAT_FS is not set -# CONFIG_MSDOS_FS is not set -# CONFIG_UMSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_RAMFS is not set -CONFIG_ISO9660_FS=y -# CONFIG_JOLIET is not set -# CONFIG_MINIX_FS is not set -# CONFIG_NTFS_FS is not set -# CONFIG_NTFS_RW is not set -# CONFIG_HPFS_FS is not set -CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVFS_MOUNT is not set -# CONFIG_DEVFS_DEBUG is not set -CONFIG_DEVPTS_FS=y -# CONFIG_QNX4FS_FS is not set -# CONFIG_QNX4FS_RW is not set -# CONFIG_ROMFS_FS is not set -CONFIG_EXT2_FS=y -# CONFIG_SYSV_FS is not set -# CONFIG_SYSV_FS_WRITE is not set -# CONFIG_UDF_FS is not set -# CONFIG_UDF_RW is not set -# CONFIG_UFS_FS is not set -# CONFIG_UFS_FS_WRITE is not set - -# -# Network File Systems -# -# CONFIG_CODA_FS is not set -CONFIG_NFS_FS=y -# CONFIG_NFS_V3 is not set -# CONFIG_ROOT_NFS is not set -# CONFIG_NFSD is not set -# CONFIG_NFSD_V3 is not set -CONFIG_SUNRPC=y -CONFIG_LOCKD=y -# CONFIG_SMB_FS is not set -# CONFIG_NCP_FS is not set -# CONFIG_NCPFS_PACKET_SIGNING is not set -# CONFIG_NCPFS_IOCTL_LOCKING is not set -# CONFIG_NCPFS_STRONG is not set -# CONFIG_NCPFS_NFS_NS is not set -# CONFIG_NCPFS_OS2_NS is not set -# CONFIG_NCPFS_SMALLDOS is not set -# CONFIG_NCPFS_MOUNT_SUBDIR is not set -# CONFIG_NCPFS_NDS_DOMAINS is not set -# CONFIG_NCPFS_NLS is not set -# CONFIG_NCPFS_EXTRAS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -# CONFIG_NLS is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -# CONFIG_USB is not set - -# -# Kernel hacking -# -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_KGDB is not set -# CONFIG_XMON is not set diff --git a/arch/ppc/kernel/gemini_pci.c b/arch/ppc/kernel/gemini_pci.c deleted file mode 100644 index 1ac83d1c8..000000000 --- a/arch/ppc/kernel/gemini_pci.c +++ /dev/null @@ -1,103 +0,0 @@ -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/pci.h> -#include <linux/malloc.h> - -#include <asm/machdep.h> -#include <asm/gemini.h> -#include <asm/byteorder.h> -#include <asm/io.h> -#include <asm/uaccess.h> - -#include "pci.h" - -#define pci_config_addr(bus,dev,offset) \ - (0x80000000 | (bus<<16) | (dev<<8) | offset) - - -int -gemini_pcibios_read_config_byte(unsigned char bus, unsigned char dev, - unsigned char offset, unsigned char *val) -{ - unsigned long reg; - reg = grackle_read( pci_config_addr( bus, dev, (offset & ~(0x3)))); - *val = ((reg >> ((offset & 0x3) << 3)) & 0xff); - return PCIBIOS_SUCCESSFUL; -} - -int -gemini_pcibios_read_config_word(unsigned char bus, unsigned char dev, - unsigned char offset, unsigned short *val) -{ - unsigned long reg; - reg = grackle_read( pci_config_addr( bus, dev, (offset & ~(0x3)))); - *val = ((reg >> ((offset & 0x3) << 3)) & 0xffff); - return PCIBIOS_SUCCESSFUL; -} - -int -gemini_pcibios_read_config_dword(unsigned char bus, unsigned char dev, - unsigned char offset, unsigned int *val) -{ - *val = grackle_read( pci_config_addr( bus, dev, (offset & ~(0x3)))); - return PCIBIOS_SUCCESSFUL; -} - -int -gemini_pcibios_write_config_byte(unsigned char bus, unsigned char dev, - unsigned char offset, unsigned char val) -{ - unsigned long reg; - int shifts = offset & 0x3; - - reg = grackle_read( pci_config_addr( bus, dev, (offset & ~(0x3)))); - reg = (reg & ~(0xff << (shifts << 3))) | (val << (shifts << 3)); - grackle_write( pci_config_addr( bus, dev, (offset & ~(0x3))), reg ); - return PCIBIOS_SUCCESSFUL; -} - -int -gemini_pcibios_write_config_word(unsigned char bus, unsigned char dev, - unsigned char offset, unsigned short val) -{ - unsigned long reg; - int shifts = offset & 0x3; - - reg = grackle_read( pci_config_addr( bus, dev, (offset & ~(0x3)))); - reg = (reg & ~(0xffff << (shifts << 3))) | (val << (shifts << 3)); - grackle_write( pci_config_addr( bus, dev, (offset & ~(0x3))), reg ); - return PCIBIOS_SUCCESSFUL; -} - -int -gemini_pcibios_write_config_dword(unsigned char bus, unsigned char dev, - unsigned char offset, unsigned int val) -{ - grackle_write( pci_config_addr( bus, dev, (offset & ~(0x3))), val ); - return PCIBIOS_SUCCESSFUL; -} - -void __init gemini_pcibios_fixup(void) -{ - int i; - struct pci_dev *dev; - - pci_for_each_dev(dev) { - for(i = 0; i < 6; i++) { - if (dev->resource[i].flags & IORESOURCE_IO) { - dev->resource[i].start |= (0xfe << 24); - dev->resource[i].end |= (0xfe << 24); - } - } - } -} - -decl_config_access_method(gemini); - -/* The "bootloader" for Synergy boards does none of this for us, so we need to - lay it all out ourselves... --Dan */ -void __init gemini_setup_pci_ptrs(void) -{ - set_config_access_method(gemini); - ppc_md.pcibios_fixup = gemini_pcibios_fixup; -} diff --git a/arch/ppc/kernel/gemini_prom.S b/arch/ppc/kernel/gemini_prom.S deleted file mode 100644 index 0904bb0eb..000000000 --- a/arch/ppc/kernel/gemini_prom.S +++ /dev/null @@ -1,96 +0,0 @@ -/* - * arch/ppc/kernel/gemini_prom.S - * - * Not really prom support code (yet), but sort of anti-prom code. The current - * bootloader does a number of things it shouldn't and doesn't do things that it - * should. The stuff in here is mainly a hodge-podge collection of setup code - * to get the board up and running. - * ---Dan - */ - -#include "ppc_asm.tmpl" -#include "ppc_defs.h" -#include <linux/config.h> -#include <asm/processor.h> -#include <asm/page.h> -#include <asm/gemini.h> - -#define HID0_ABE (1<<3) - -/* - * On 750's the MMU is on when Linux is booted, so we need to clear out the - * bootloader's BAT settings, make sure we're in supervisor state (gotcha!), - * and turn off the MMU. - * - */ - -_GLOBAL(prom_init) -_GLOBAL(gemini_prom_init) -#ifdef CONFIG_SMP - /* Since the MMU's on, get stuff in rom space that we'll need */ - lis r4,GEMINI_CPUSTAT@h - ori r4,r4,GEMINI_CPUSTAT@l - lbz r5,0(r4) - andi. r5,r5,3 - mr r24,r5 /* cpu # used later on */ -#endif - mfmsr r4 - li r3,MSR_PR /* ensure supervisor! */ - ori r3,r3,MSR_IR|MSR_DR - andc r4,r4,r3 - mtmsr r4 -#if 0 - /* zero out the bats now that the MMU is off */ -prom_no_mmu: - li r3,0 - mtspr IBAT0U,r3 - mtspr IBAT0L,r3 - mtspr IBAT1U,r3 - mtspr IBAT1L,r3 - mtspr IBAT2U,r3 - mtspr IBAT2L,r3 - mtspr IBAT3U,r3 - mtspr IBAT3L,r3 - - mtspr DBAT0U,r3 - mtspr DBAT0L,r3 - mtspr DBAT1U,r3 - mtspr DBAT1L,r3 - mtspr DBAT2U,r3 - mtspr DBAT2L,r3 - mtspr DBAT3U,r3 - mtspr DBAT3L,r3 -#endif - - /* the bootloader (as far as I'm currently aware) doesn't mess with page - tables, but since we're already here, might as well zap these, too */ - li r4,0 - mtspr SDR1,r4 - - li r4,16 - mtctr r4 - li r3,0 - li r4,0 -3: mtsrin r3,r4 - addi r3,r3,1 - bdnz 3b - -#ifdef CONFIG_SMP - /* The 750 book (and Mot/IBM support) says that this will "assist" snooping - when in SMP. Not sure yet whether this should stay or leave... */ - mfspr r4,HID0 - ori r4,r4,HID0_ABE - mtspr HID0,r4 - sync -#endif /* CONFIG_SMP */ - blr - -/* apparently, SMon doesn't pay attention to HID0[SRST]. Disable the MMU and - branch to 0xfff00100 */ -_GLOBAL(_gemini_reboot) - lis r5,GEMINI_BOOT_INIT@h - ori r5,r5,GEMINI_BOOT_INIT@l - li r6,MSR_IP - mtspr SRR0,r5 - mtspr SRR1,r6 - rfi diff --git a/arch/ppc/kernel/gemini_setup.c b/arch/ppc/kernel/gemini_setup.c deleted file mode 100644 index a01ff9eca..000000000 --- a/arch/ppc/kernel/gemini_setup.c +++ /dev/null @@ -1,562 +0,0 @@ -/* - * linux/arch/ppc/kernel/setup.c - * - * Copyright (C) 1995 Linus Torvalds - * Adapted from 'alpha' version by Gary Thomas - * Modified by Cort Dougan (cort@cs.nmt.edu) - * Synergy Microsystems board support by Dan Cox (dan@synergymicro.com) - * - */ - -#include <linux/config.h> -#include <linux/stddef.h> -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/errno.h> -#include <linux/reboot.h> -#include <linux/pci.h> -#include <linux/time.h> -#include <linux/kdev_t.h> -#include <linux/types.h> -#include <linux/major.h> -#include <linux/blk.h> -#include <linux/console.h> -#include <linux/openpic.h> - -#include <asm/system.h> -#include <asm/pgtable.h> -#include <asm/page.h> -#include <asm/dma.h> -#include <asm/io.h> -#include <asm/m48t35.h> -#include <asm/gemini.h> - -#include <asm/time.h> -#include "local_irq.h" -#include "open_pic.h" - -void gemini_setup_pci_ptrs(void); -static int gemini_get_clock_speed(void); -extern void gemini_pcibios_fixup(void); - -static char *gemini_board_families[] = { - "VGM", "VSS", "KGM", "VGR", "VCM", "VCS", "KCM", "VCR" -}; -static int gemini_board_count = sizeof(gemini_board_families) / - sizeof(gemini_board_families[0]); - -static unsigned int cpu_7xx[16] = { - 0, 15, 14, 0, 0, 13, 5, 9, 6, 11, 8, 10, 16, 12, 7, 0 -}; -static unsigned int cpu_6xx[16] = { - 0, 0, 14, 0, 0, 13, 5, 9, 6, 11, 8, 10, 0, 12, 7, 0 -}; - -int chrp_get_irq(struct pt_regs *); -void chrp_post_irq(struct pt_regs* regs, int); - -static inline unsigned long _get_HID1(void) -{ - unsigned long val; - - __asm__ __volatile__("mfspr %0,1009" : "=r" (val)); - return val; -} - -int -gemini_get_cpuinfo(char *buffer) -{ - int len; - unsigned char reg, rev; - char *family; - unsigned int type; - - reg = readb(GEMINI_FEAT); - family = gemini_board_families[((reg>>4) & 0xf)]; - if (((reg>>4) & 0xf) > gemini_board_count) - printk(KERN_ERR "cpuinfo(): unable to determine board family\n"); - - reg = readb(GEMINI_BREV); - type = (reg>>4) & 0xf; - rev = reg & 0xf; - - reg = readb(GEMINI_BECO); - - len = sprintf( buffer, "machine\t\t: Gemini %s%d, rev %c, eco %d\n", - family, type, (rev + 'A'), (reg & 0xf)); - - len = sprintf(buffer, "board\t\t: Gemini %s", family); - if (type > 9) - len += sprintf(buffer+len, "%c", (type - 10) + 'A'); - else - len += sprintf(buffer+len, "%d", type); - - len += sprintf(buffer+len, ", rev %c, eco %d\n", - (rev + 'A'), (reg & 0xf)); - - len += sprintf(buffer+len, "clock\t\t: %dMhz\n", - gemini_get_clock_speed()); - - return len; -} - -static u_char gemini_openpic_initsenses[] = { - 1, - 1, - 1, - 1, - 0, - 0, - 1, /* remainder are level-triggered */ -}; - -#define GEMINI_MPIC_ADDR (0xfcfc0000) -#define GEMINI_MPIC_PCI_CFG (0x80005800) - -void __init gemini_openpic_init(void) -{ - - OpenPIC = (volatile struct OpenPIC *) - grackle_read(0x80005800 + 0x10); -#if 0 - grackle_write(GEMINI_MPIC_PCI_CFG + PCI_BASE_ADDRESS_0, - GEMINI_MPIC_ADDR); - grackle_write(GEMINI_MPIC_PCI_CFG + PCI_COMMAND, PCI_COMMAND_MEMORY); - - OpenPIC = (volatile struct OpenPIC *) GEMINI_MPIC_ADDR; -#endif - OpenPIC_InitSenses = gemini_openpic_initsenses; - OpenPIC_NumInitSenses = sizeof( gemini_openpic_initsenses ); - - ioremap( GEMINI_MPIC_ADDR, sizeof( struct OpenPIC )); -} - - -extern unsigned long loops_per_sec; -extern int root_mountflags; -extern char cmd_line[]; - -void -gemini_heartbeat(void) -{ - static unsigned long led = GEMINI_LEDBASE+(4*8); - static char direction = 8; - *(char *)led = 0; - if ( (led + direction) > (GEMINI_LEDBASE+(7*8)) || - (led + direction) < (GEMINI_LEDBASE+(4*8)) ) - direction *= -1; - led += direction; - *(char *)led = 0xff; - ppc_md.heartbeat_count = ppc_md.heartbeat_reset; -} - -void __init gemini_setup_arch(void) -{ - extern char cmd_line[]; - - - loops_per_sec = 50000000; - -#ifdef CONFIG_BLK_DEV_INITRD - /* bootable off CDROM */ - if (initrd_start) - ROOT_DEV = MKDEV(SCSI_CDROM_MAJOR, 0); - else -#endif - ROOT_DEV = to_kdev_t(0x0801); - - /* nothing but serial consoles... */ - sprintf(cmd_line, "%s console=ttyS0", cmd_line); - - printk("Boot arguments: %s\n", cmd_line); - - ppc_md.heartbeat = gemini_heartbeat; - ppc_md.heartbeat_reset = HZ/8; - ppc_md.heartbeat_count = 1; - - /* take special pains to map the MPIC, since it isn't mapped yet */ - gemini_openpic_init(); - /* start the L2 */ - gemini_init_l2(); -} - - -int -gemini_get_clock_speed(void) -{ - unsigned long hid1, pvr = _get_PVR(); - int clock; - - hid1 = (_get_HID1() >> 28) & 0xf; - if (PVR_VER(pvr) == 8 || - PVR_VER(pvr) == 12) - hid1 = cpu_7xx[hid1]; - else - hid1 = cpu_6xx[hid1]; - - switch((readb(GEMINI_BSTAT) & 0xc) >> 2) { - - case 0: - default: - clock = (hid1*100)/3; - break; - - case 1: - clock = (hid1*125)/3; - break; - - case 2: - clock = (hid1*50); - break; - } - - return clock; -} - -#define L2CR_PIPE_LATEWR (0x01800000) /* late-write SRAM */ -#define L2CR_L2CTL (0x00100000) /* RAM control */ -#define L2CR_INST_DISABLE (0x00400000) /* disable for insn's */ -#define L2CR_L2I (0x00200000) /* global invalidate */ -#define L2CR_L2E (0x80000000) /* enable */ -#define L2CR_L2WT (0x00080000) /* write-through */ - -void __init gemini_init_l2(void) -{ - unsigned char reg, brev, fam, creg; - unsigned long cache; - unsigned long pvr = _get_PVR(); - - reg = readb(GEMINI_L2CFG); - brev = readb(GEMINI_BREV); - fam = readb(GEMINI_FEAT); - - switch(PVR_VER(pvr)) { - - case 8: - if (reg & 0xc0) - cache = (((reg >> 6) & 0x3) << 28); - else - cache = 0x3 << 28; - -#ifdef CONFIG_SMP - /* Pre-3.0 processor revs had snooping errata. Leave - their L2's disabled with SMP. -- Dan */ - if (PVR_CFG(pvr) < 3) { - printk("Pre-3.0 750; L2 left disabled!\n"); - return; - } -#endif /* CONFIG_SMP */ - - /* Special case: VGM5-B's came before L2 ratios were set on - the board. Processor speed shouldn't be too high, so - set L2 ratio to 1:1.5. */ - if ((brev == 0x51) && ((fam & 0xa0) >> 4) == 0) - reg |= 1; - - /* determine best cache ratio based upon what the board - tells us (which sometimes _may_ not be true) and - the processor speed. */ - else { - if (gemini_get_clock_speed() > 250) - reg = 2; - } - break; - case 12: - { - static unsigned long l2_size_val = 0; - - if (!l2_size_val) - l2_size_val = _get_L2CR(); - cache = l2_size_val; - break; - } - case 4: - case 9: - creg = readb(GEMINI_CPUSTAT); - if (((creg & 0xc) >> 2) != 1) - printk("Dual-604 boards don't support the use of L2\n"); - else - writeb(1, GEMINI_L2CFG); - return; - default: - printk("Unknown processor; L2 left disabled\n"); - return; - } - - cache |= ((1<<reg) << 25); - cache |= (L2CR_PIPE_LATEWR|L2CR_L2CTL|L2CR_INST_DISABLE); - _set_L2CR(0); - _set_L2CR(cache | L2CR_L2I | L2CR_L2E); - -} - -void -gemini_restart(char *cmd) -{ - __cli(); - /* make a clean restart, not via the MPIC */ - _gemini_reboot(); - for(;;); -} - -void -gemini_power_off(void) -{ - for(;;); -} - -void -gemini_halt(void) -{ - gemini_restart(NULL); -} - -void __init gemini_init_IRQ(void) -{ - int i; - - /* gemini has no 8259 */ - open_pic_irq_offset = 0; - for( i=0; i < NR_IRQS; i++ ) - irq_desc[i].handler = &open_pic; - openpic_init(1); -#ifdef CONFIG_SMP - request_irq(OPENPIC_VEC_IPI, openpic_ipi_action, - 0, "IPI0", 0); - request_irq(OPENPIC_VEC_IPI+1, openpic_ipi_action, - 0, "IPI1 (invalidate TLB)", 0); - request_irq(OPENPIC_VEC_IPI+2, openpic_ipi_action, - 0, "IPI2 (stop CPU)", 0); - request_irq(OPENPIC_VEC_IPI+3, openpic_ipi_action, - 0, "IPI3 (reschedule)", 0); -#endif /* CONFIG_SMP */ -} - -#define gemini_rtc_read(x) (readb(GEMINI_RTC+(x))) -#define gemini_rtc_write(val,x) (writeb((val),(GEMINI_RTC+(x)))) - -/* ensure that the RTC is up and running */ -long __init gemini_time_init(void) -{ - unsigned char reg; - - reg = gemini_rtc_read(M48T35_RTC_CONTROL); - - if ( reg & M48T35_RTC_STOPPED ) { - printk(KERN_INFO "M48T35 real-time-clock was stopped. Now starting...\n"); - gemini_rtc_write((reg & ~(M48T35_RTC_STOPPED)), M48T35_RTC_CONTROL); - gemini_rtc_write((reg | M48T35_RTC_SET), M48T35_RTC_CONTROL); - } - return 0; -} - -#undef DEBUG_RTC - -unsigned long -gemini_get_rtc_time(void) -{ - unsigned int year, mon, day, hour, min, sec; - unsigned char reg; - - reg = gemini_rtc_read(M48T35_RTC_CONTROL); - gemini_rtc_write((reg|M48T35_RTC_READ), M48T35_RTC_CONTROL); -#ifdef DEBUG_RTC - printk("get rtc: reg = %x\n", reg); -#endif - - do { - sec = gemini_rtc_read(M48T35_RTC_SECONDS); - min = gemini_rtc_read(M48T35_RTC_MINUTES); - hour = gemini_rtc_read(M48T35_RTC_HOURS); - day = gemini_rtc_read(M48T35_RTC_DOM); - mon = gemini_rtc_read(M48T35_RTC_MONTH); - year = gemini_rtc_read(M48T35_RTC_YEAR); - } while( sec != gemini_rtc_read(M48T35_RTC_SECONDS)); -#ifdef DEBUG_RTC - printk("get rtc: sec=%x, min=%x, hour=%x, day=%x, mon=%x, year=%x\n", - sec, min, hour, day, mon, year); -#endif - - gemini_rtc_write(reg, M48T35_RTC_CONTROL); - - BCD_TO_BIN(sec); - BCD_TO_BIN(min); - BCD_TO_BIN(hour); - BCD_TO_BIN(day); - BCD_TO_BIN(mon); - BCD_TO_BIN(year); - - if ((year += 1900) < 1970) - year += 100; -#ifdef DEBUG_RTC - printk("get rtc: sec=%x, min=%x, hour=%x, day=%x, mon=%x, year=%x\n", - sec, min, hour, day, mon, year); -#endif - - return mktime( year, mon, day, hour, min, sec ); -} - - -int -gemini_set_rtc_time( unsigned long now ) -{ - unsigned char reg; - struct rtc_time tm; - - to_tm( now, &tm ); - - reg = gemini_rtc_read(M48T35_RTC_CONTROL); -#if DEBUG_RTC - printk("set rtc: reg = %x\n", reg); -#endif - - gemini_rtc_write((reg|M48T35_RTC_SET), M48T35_RTC_CONTROL); -#if DEBUG_RTC - printk("set rtc: tm vals - sec=%x, min=%x, hour=%x, mon=%x, mday=%x, year=%x\n", - tm.tm_sec, tm.tm_min, tm.tm_hour, tm.tm_mon, tm.tm_mday, tm.tm_year); -#endif - - tm.tm_year -= 1900; - BIN_TO_BCD(tm.tm_sec); - BIN_TO_BCD(tm.tm_min); - BIN_TO_BCD(tm.tm_hour); - BIN_TO_BCD(tm.tm_mon); - BIN_TO_BCD(tm.tm_mday); - BIN_TO_BCD(tm.tm_year); -#ifdef DEBUG_RTC - printk("set rtc: tm vals - sec=%x, min=%x, hour=%x, mon=%x, mday=%x, year=%x\n", - tm.tm_sec, tm.tm_min, tm.tm_hour, tm.tm_mon, tm.tm_mday, tm.tm_year); -#endif - - gemini_rtc_write(tm.tm_sec, M48T35_RTC_SECONDS); - gemini_rtc_write(tm.tm_min, M48T35_RTC_MINUTES); - gemini_rtc_write(tm.tm_hour, M48T35_RTC_HOURS); - gemini_rtc_write(tm.tm_mday, M48T35_RTC_DOM); - gemini_rtc_write(tm.tm_mon, M48T35_RTC_MONTH); - gemini_rtc_write(tm.tm_year, M48T35_RTC_YEAR); - - /* done writing */ - gemini_rtc_write(reg, M48T35_RTC_CONTROL); - - if ((time_state == TIME_ERROR) || (time_state == TIME_BAD)) - time_state = TIME_OK; - - return 0; -} - -/* use the RTC to determine the decrementer count */ -void __init gemini_calibrate_decr(void) -{ - int freq, divisor; - unsigned char reg; - - /* determine processor bus speed */ - reg = readb(GEMINI_BSTAT); - - switch(((reg & 0x0c)>>2)&0x3) { - case 0: - default: - freq = 66; - break; - case 1: - freq = 83; - break; - case 2: - freq = 100; - break; - } - - freq *= 1000000; - divisor = 4; - decrementer_count = freq / HZ / divisor; - count_period_num = divisor; - count_period_den = freq / 1000000; -} - -int gemini_get_irq( struct pt_regs *regs ) -{ - int irq; - - irq = openpic_irq( smp_processor_id() ); - if (irq == OPENPIC_VEC_SPURIOUS) - /* - * Spurious interrupts should never be - * acknowledged - */ - irq = -1; - /* - * I would like to openpic_eoi here but there seem to be timing problems - * between the openpic ack and the openpic eoi. - * -- Cort - */ - return irq; -} - -void gemini_post_irq(struct pt_regs* regs, int irq) -{ - /* - * If it's an i8259 irq then we've already done the - * openpic irq. So we just check to make sure the controller - * is an openpic and if it is then eoi - * - * We do it this way since our irq_desc[irq].handler can change - * with RTL and no longer be open_pic -- Cort - */ - if ( irq >= open_pic_irq_offset) - openpic_eoi( smp_processor_id() ); -} - - -void __init gemini_init(unsigned long r3, unsigned long r4, unsigned long r5, - unsigned long r6, unsigned long r7) -{ - int i; - int chrp_get_irq( struct pt_regs * ); - - for(i = 0; i < GEMINI_LEDS; i++) - gemini_led_off(i); - - gemini_setup_pci_ptrs(); - - ISA_DMA_THRESHOLD = 0; - DMA_MODE_READ = 0; - DMA_MODE_WRITE = 0; - -#ifdef CONFIG_BLK_DEV_INITRD - if ( r4 ) - { - initrd_start = r4 + KERNELBASE; - initrd_end = r5 + KERNELBASE; - } -#endif - - ppc_md.setup_arch = gemini_setup_arch; - ppc_md.setup_residual = NULL; - ppc_md.get_cpuinfo = gemini_get_cpuinfo; - ppc_md.irq_cannonicalize = NULL; - ppc_md.init_IRQ = gemini_init_IRQ; - ppc_md.get_irq = gemini_get_irq; - ppc_md.post_irq = gemini_post_irq; - ppc_md.init = NULL; - - ppc_md.restart = gemini_restart; - ppc_md.power_off = gemini_power_off; - ppc_md.halt = gemini_halt; - - ppc_md.time_init = gemini_time_init; - ppc_md.set_rtc_time = gemini_set_rtc_time; - ppc_md.get_rtc_time = gemini_get_rtc_time; - ppc_md.calibrate_decr = gemini_calibrate_decr; - - /* no keyboard/mouse/video stuff yet.. */ - ppc_md.kbd_setkeycode = NULL; - ppc_md.kbd_getkeycode = NULL; - ppc_md.kbd_translate = NULL; - ppc_md.kbd_unexpected_up = NULL; - ppc_md.kbd_leds = NULL; - ppc_md.kbd_init_hw = NULL; -#ifdef CONFIG_MAGIC_SYSRQ - ppc_md.ppc_kbd_sysrq_xlate = NULL; -#endif - ppc_md.pcibios_fixup_bus = gemini_pcibios_fixup; -} diff --git a/arch/ppc/mbxboot/vmlinux.lds b/arch/ppc/mbxboot/vmlinux.lds deleted file mode 100644 index 2bf2c87b3..000000000 --- a/arch/ppc/mbxboot/vmlinux.lds +++ /dev/null @@ -1,152 +0,0 @@ -OUTPUT_ARCH(powerpc) -SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/local/powerpc-any-elf/lib); -/* Do we need any of these for elf? - __DYNAMIC = 0; */ -SECTIONS -{ - /* Read-only sections, merged into text segment: */ - . = + SIZEOF_HEADERS; - .interp : { *(.interp) } - .hash : { *(.hash) } - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } - .rel.text : { *(.rel.text) } - .rela.text : { *(.rela.text) } - .rel.data : { *(.rel.data) } - .rela.data : { *(.rela.data) } - .rel.rodata : { *(.rel.rodata) } - .rela.rodata : { *(.rela.rodata) } - .rel.got : { *(.rel.got) } - .rela.got : { *(.rela.got) } - .rel.ctors : { *(.rel.ctors) } - .rela.ctors : { *(.rela.ctors) } - .rel.dtors : { *(.rel.dtors) } - .rela.dtors : { *(.rela.dtors) } - .rel.bss : { *(.rel.bss) } - .rela.bss : { *(.rela.bss) } - .rel.plt : { *(.rel.plt) } - .rela.plt : { *(.rela.plt) } -/* .init : { *(.init) } =0*/ - .plt : { *(.plt) } - .text : - { - *(.text) - *(.fixup) - *(.got1) - } - _etext = .; - PROVIDE (etext = .); - .rodata : - { - *(.rodata) - *(.rodata1) - } - .fini : { *(.fini) } =0 - .ctors : { *(.ctors) } - .dtors : { *(.dtors) } - /* Read-write section, merged into data segment: */ - . = (. + 0x0FFF) & 0xFFFFF000; - .data : - { - *(.data) - *(.data1) - *(.sdata) - *(.sdata2) - *(.got.plt) *(.got) - *(.dynamic) - CONSTRUCTORS - } - _edata = .; - PROVIDE (edata = .); - - .fixup : { *(.fixup) } - __start___ex_table = .; - __ex_table : { *(__ex_table) } - __stop___ex_table = .; - - . = ALIGN(32); - .data.cacheline_aligned : { *(.data.cacheline_aligned) } - - . = ALIGN(4096); - __init_begin = .; - .text.init : { *(.text.init) } - .data.init : { - *(.data.init); - __vtop_table_begin = .; - *(.vtop_fixup); - __vtop_table_end = .; - __ptov_table_begin = .; - *(.ptov_fixup); - __ptov_table_end = .; - } - . = ALIGN(16); - __setup_start = .; - .setup.init : { *(.setup.init) } - __setup_end = .; - __initcall_start = .; - .initcall.init : { *(.initcall.init) } - __initcall_end = .; - . = ALIGN(4096); - __init_end = .; - - . = ALIGN(4096); - __pmac_begin = .; - .text.pmac : { *(.text.pmac) } - .data.pmac : { *(.data.pmac) } - . = ALIGN(4096); - __pmac_end = .; - - . = ALIGN(4096); - __prep_begin = .; - .text.prep : { *(.text.prep) } - .data.prep : { *(.data.prep) } - . = ALIGN(4096); - __prep_end = .; - - . = ALIGN(4096); - __apus_begin = .; - .text.apus : { *(.text.apus) } - .data.apus : { *(.data.apus) } - . = ALIGN(4096); - __apus_end = .; - - . = ALIGN(4096); - __apus_begin = .; - .text.apus : { *(.text.apus) } - .data.apus : { *(.data.apus) } - . = ALIGN(4096); - __apus_end = .; - - . = ALIGN(4096); - __openfirmware_begin = .; - .text.openfirmware : { *(.text.openfirmware) } - .data.openfirmware : { *(.data.openfirmware) } - . = ALIGN(4096); - __openfirmware_end = .; - - __bss_start = .; - .bss : - { - *(.sbss) *(.scommon) - *(.dynbss) - *(.bss) - *(COMMON) - } - _end = . ; - PROVIDE (end = .); - - /* - * For loader only: Put the zImage after everything else - */ - _gzstart = . ; - .gzimage : { *(.gzimage) } - _gzend = . ; - - /* - * For loader only: Put the initrd after zImage - */ - _rdstart = . ; - .rdimage : { *(.rdimage) } - _rdend = . ; - -} diff --git a/drivers/acpi/hardware/hwcpu32.c b/drivers/acpi/hardware/hwcpu32.c deleted file mode 100644 index fde6d1c07..000000000 --- a/drivers/acpi/hardware/hwcpu32.c +++ /dev/null @@ -1,711 +0,0 @@ -/****************************************************************************** - * - * Name: hwcpu32.c - CPU support for IA32 (Throttling, Cx_states) - * $Revision: 39 $ - * - *****************************************************************************/ - -/* - * Copyright (C) 2000 R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "acpi.h" -#include "acnamesp.h" -#include "achware.h" - -#define _COMPONENT HARDWARE - MODULE_NAME ("Hwcpu32") - - -#define BIT_4 0x10 /* TBD: [investigate] is this correct? */ - - -/**************************************************************************** - * - * FUNCTION: Acpi_hw_enter_c1 - * - * PARAMETERS: Pblk_address - Address of the processor control block - * Pm_timer_ticks - Number of PM timer ticks elapsed while asleep - * - * RETURN: Function status. - * - * DESCRIPTION: Set C1 state on IA32 processor (halt) - * - ****************************************************************************/ - -ACPI_STATUS -acpi_hw_enter_c1( - ACPI_IO_ADDRESS pblk_address, - u32 *pm_timer_ticks) -{ - u32 timer = 0; - - - if (!pm_timer_ticks) { - /* - * Enter C1: - * --------- - */ - enable(); - halt(); - *pm_timer_ticks = ACPI_UINT32_MAX; - } - else { - timer = acpi_hw_pmt_ticks (); - - /* - * Enter C1: - * --------- - */ - enable (); - halt (); - - /* - * Compute Time in C1: - * ------------------- - */ - timer = acpi_hw_pmt_ticks () - timer; - - *pm_timer_ticks = timer; - } - - return (AE_OK); -} - - -/**************************************************************************** - * - * FUNCTION: Acpi_hw_enter_c2 - * - * PARAMETERS: Pblk_address - Address of the processor control block - * Pm_timer_ticks - Number of PM timer ticks elapsed while asleep - * - * RETURN: <none> - * - * DESCRIPTION: Set C2 state on IA32 processor - * - ****************************************************************************/ - -ACPI_STATUS -acpi_hw_enter_c2( - ACPI_IO_ADDRESS pblk_address, - u32 *pm_timer_ticks) -{ - u32 timer = 0; - - - if (!pblk_address || !pm_timer_ticks) { - return (AE_BAD_PARAMETER); - } - - /* - * Disable interrupts before all C2/C3 transitions. - */ - disable (); - - timer = acpi_hw_pmt_ticks (); - - /* - * Enter C2: - * --------- - * Read from the P_LVL2 (P_BLK+4) register to invoke a C2 transition. - */ - acpi_os_in8 ((ACPI_IO_ADDRESS) (pblk_address + 4)); - - /* - * Perform Dummy Op: - * ----------------- - * We have to do something useless after reading LVL2 because chipsets - * cannot guarantee that STPCLK# gets asserted in time to freeze execution. - */ - acpi_hw_register_read (ACPI_MTX_DO_NOT_LOCK, PM2_CONTROL); - - /* - * Compute Time in C2: - * ------------------- - */ - timer = acpi_hw_pmt_ticks () - timer; - - *pm_timer_ticks = timer; - - /* - * Re-enable interrupts after coming out of C2/C3. - */ - enable (); - - return (AE_OK); -} - - -/**************************************************************************** - * - * FUNCTION: Acpi_hw_enter_c3 - * - * PARAMETERS: Pblk_address - Address of the processor control block - * Pm_timer_ticks - Number of PM timer ticks elapsed while asleep - * - * RETURN: Status of function - * - * DESCRIPTION: Set C3 state on IA32 processor (UP only, cache coherency via - * disabling bus mastering) - * - ****************************************************************************/ - -ACPI_STATUS -acpi_hw_enter_c3( - ACPI_IO_ADDRESS pblk_address, - u32 *pm_timer_ticks) -{ - u32 timer = 0; - u32 bus_master_status = 0; - - - if (!pblk_address || !pm_timer_ticks) { - return (AE_BAD_PARAMETER); - } - - /* - * Check the BM_STS bit, if it is set, do not enter C3 - * but clear the bit (with a write) and exit, telling - * the calling module that we spent zero time in C3. - * If bus mastering continues, this action should - * eventually cause a demotion to C2 - */ - if (1 == (bus_master_status = - acpi_hw_register_bit_access (ACPI_READ, ACPI_MTX_LOCK, BM_STS))) - { - /* - * Clear the BM_STS bit by setting it. - */ - acpi_hw_register_bit_access (ACPI_WRITE, ACPI_MTX_LOCK, BM_STS, 1); - *pm_timer_ticks = 0; - return (AE_OK); - } - - /* - * Disable interrupts before all C2/C3 transitions. - */ - disable(); - - /* - * Disable Bus Mastering: - * ---------------------- - * Set the PM2_CNT.ARB_DIS bit (bit #0), preserving all other bits. - */ - acpi_hw_register_bit_access(ACPI_WRITE, ACPI_MTX_LOCK, ARB_DIS, 1); - - /* - * Get the timer base before entering C state - */ - timer = acpi_hw_pmt_ticks (); - - /* - * Enter C3: - * --------- - * Read from the P_LVL3 (P_BLK+5) register to invoke a C3 transition. - */ - acpi_os_in8 ((ACPI_IO_ADDRESS)(pblk_address + 5)); - - /* - * Perform Dummy Op: - * ----------------- - * We have to do something useless after reading LVL3 because chipsets - * cannot guarantee that STPCLK# gets asserted in time to freeze execution. - */ - acpi_hw_register_read (ACPI_MTX_DO_NOT_LOCK, PM2_CONTROL); - /* - * Immediately compute the time in the C state - */ - timer = acpi_hw_pmt_ticks() - timer; - - /* - * Re-Enable Bus Mastering: - * ------------------------ - * Clear the PM2_CNT.ARB_DIS bit (bit #0), preserving all other bits. - */ - acpi_hw_register_bit_access(ACPI_WRITE, ACPI_MTX_LOCK, ARB_DIS, 0); - - /* TBD: [Unhandled]: Support 24-bit timers (this algorithm assumes 32-bit) */ - - *pm_timer_ticks = timer; - - /* - * Re-enable interrupts after coming out of C2/C3. - */ - enable(); - - return (AE_OK); -} - - -/**************************************************************************** - * - * FUNCTION: Acpi_hw_enter_cx - * - * PARAMETERS: Processor_handle - handle of the processor - * - * RETURN: Status of function - * - * DESCRIPTION: Invoke the currently active processor Cx handler to put this - * processor to sleep. - * - ****************************************************************************/ - -ACPI_STATUS -acpi_hw_enter_cx ( - ACPI_IO_ADDRESS pblk_address, - u32 *pm_timer_ticks) -{ - - if (!acpi_hw_cx_handlers[acpi_hw_active_cx_state]) { - return (AE_SUPPORT); - } - - return (acpi_hw_cx_handlers[acpi_hw_active_cx_state] (pblk_address, pm_timer_ticks)); -} - - -/**************************************************************************** - * - * FUNCTION: Acpi_hw_set_cx - * - * PARAMETERS: State - value (1-3) of the Cx state to 'make active' - * - * RETURN: Function status. - * - * DESCRIPTION: Sets the state to use during calls to Acpi_hw_enter_cx(). - * - ****************************************************************************/ - -ACPI_STATUS -acpi_hw_set_cx ( - u32 cx_state) -{ - /* - * Supported State? - * ---------------- - */ - if ((cx_state < 1) || (cx_state > 3)) { - return (AE_BAD_PARAMETER); - } - - if (!acpi_hw_cx_handlers[cx_state]) { - return (AE_SUPPORT); - } - - /* - * New Cx State? - * ------------- - * We only care when moving from one state to another... - */ - if (acpi_hw_active_cx_state == cx_state) { - return (AE_OK); - } - - /* - * Prepare to Use New State: - * ------------------------- - * If the new Cx_state is C3, the BM_RLD bit must be set to allow - * the generation of a bus master requets to cause the processor - * in the C3 state to transition to the C0 state. - */ - switch (cx_state) - { - case 3: - acpi_hw_register_bit_access (ACPI_WRITE, ACPI_MTX_LOCK, BM_RLD, 1); - break; - } - - /* - * Clean up from Old State: - * ------------------------ - * If the old Cx_state was C3, the BM_RLD bit is reset. When the - * bit is reset, the generation of a bus master request does not - * effect any processor in the C3 state. - */ - switch (acpi_hw_active_cx_state) - { - case 3: - acpi_hw_register_bit_access (ACPI_WRITE, ACPI_MTX_LOCK, BM_RLD, 0); - break; - } - - /* - * Enable: - * ------- - */ - acpi_hw_active_cx_state = cx_state; - - return (AE_OK); -} - - -/**************************************************************************** - * - * FUNCTION: Acpi_hw_get_cx_info - * - * PARAMETERS: Cx_states - Information (latencies) on all Cx states - * - * RETURN: Status of function - * - * DESCRIPTION: This function is called both to initialize Cx handling - * and retrieve the current Cx information (latency values). - * - ****************************************************************************/ - -ACPI_STATUS -acpi_hw_get_cx_info ( - u32 cx_states[]) -{ - u8 SMP_system = FALSE; - - - if (!cx_states) { - return(AE_BAD_PARAMETER); - } - - /* - * TBD: [Unhandled] need to init SMP_system using info from the MAPIC - * table. - */ - - /* - * Set Defaults: - * ------------- - * C0 and C1 support is implied (but what about that PROC_C1 register - * in the FADT?!?!). Set C2/C3 to max. latency (not supported until - * proven otherwise). - */ - cx_states[0] = 0; - cx_states[1] = 0; - cx_states[2] = MAX_CX_STATE_LATENCY; - cx_states[3] = MAX_CX_STATE_LATENCY; - - /* - * C2 Supported? - * ------------- - * We're only supporting C2 when the latency is <= 100 microseconds, - * and on SMP systems when P_LVL2_UP (which indicates C2 only on UP) - * is not set. - */ - if (acpi_gbl_FADT->plvl2_lat <= 100) { - if (!SMP_system) { - acpi_hw_cx_handlers[2] = acpi_hw_enter_c2; - cx_states[2] = acpi_gbl_FADT->plvl2_lat; - } - - else if (!acpi_gbl_FADT->plvl2_up) { - acpi_hw_cx_handlers[2] = acpi_hw_enter_c2; - cx_states[2] = acpi_gbl_FADT->plvl2_lat; - } - } - - /* - * C3 Supported? - * ------------- - * We're only supporting C3 on UP systems when the latency is - * <= 1000 microseconds and that include the ability to disable - * Bus Mastering while in C3 (ARB_DIS) but allows Bus Mastering - * requests to wake the system from C3 (BM_RLD). Note his method - * of maintaining cache coherency (disabling of bus mastering) - * cannot be used on SMP systems, and flushing caches (e.g. WBINVD) - * is simply too costly (at this time). - */ - if (acpi_gbl_FADT->plvl3_lat <= 1000) { - if (!SMP_system && (acpi_gbl_FADT->Xpm2_cnt_blk.address && - acpi_gbl_FADT->pm2_cnt_len)) - { - acpi_hw_cx_handlers[3] = acpi_hw_enter_c3; - cx_states[3] = acpi_gbl_FADT->plvl3_lat; - } - } - - return(AE_OK); -} - - -/**************************************************************************** - * - * FUNCTION: Acpi_hw_get_cx_handler - * - * PARAMETERS: State - the Cx state - * Handler - pointer to location for the returned handler - * - * RETURN: Status of function - * - * DESCRIPTION: This function is called to get an installed Cx state handler. - * - ****************************************************************************/ - -ACPI_STATUS -acpi_hw_get_cx_handler ( - u32 cx_state, - ACPI_C_STATE_HANDLER *handler) -{ - - if ((cx_state == 0) || (cx_state >= MAX_CX_STATES) || !handler) { - return(AE_BAD_PARAMETER); - } - - *handler = acpi_hw_cx_handlers[cx_state]; - - return(AE_OK); -} - - -/**************************************************************************** - * - * FUNCTION: Acpi_hw_set_cx_handler - * - * PARAMETERS: Cx_state - the Cx state - * Handler - new Cx state handler - * - * RETURN: Status of function - * - * DESCRIPTION: This function is called to install a new Cx state handler. - * - ****************************************************************************/ - -ACPI_STATUS -acpi_hw_set_cx_handler ( - u32 cx_state, - ACPI_C_STATE_HANDLER handler) -{ - - if ((cx_state == 0) || (cx_state >= MAX_CX_STATES) || !handler) { - return(AE_BAD_PARAMETER); - } - - acpi_hw_cx_handlers[cx_state] = handler; - - return(AE_OK); -} - - -/************************************************************************** - * - * FUNCTION: Acpi_hw_local_pow - * - * PARAMETERS: x,y operands - * - * RETURN: result - * - * DESCRIPTION: Compute x ^ y - * - *************************************************************************/ - -NATIVE_UINT -acpi_hw_local_pow ( - NATIVE_UINT x, - NATIVE_UINT y) -{ - NATIVE_UINT i; - NATIVE_UINT result = 1; - - - for (i = 0; i < y; i++) { - result = result * x; - } - - return (result); -} - - -/************************************************************************** - * - * FUNCTION: Acpi_hw_enable_throttling - * - * PARAMETERS: Pblk_address - Address of Pcnt (Processor Control) - * register - * - * RETURN: none - * - * DESCRIPTION: Enable throttling by setting the THT_EN bit. - * - *************************************************************************/ - -void -acpi_hw_enable_throttling ( - ACPI_IO_ADDRESS pblk_address) -{ - u32 pblk_value; - - - pblk_value = acpi_os_in32 (pblk_address); - pblk_value = pblk_value | BIT_4; - acpi_os_out32 (pblk_address, pblk_value); - - return; -} - - -/************************************************************************** - * - * FUNCTION: Acpi_hw_disable_throttling - * - * PARAMETERS: Pblk_address - Address of Pcnt (Processor Control) - * register - * - * RETURN: none - * - * DESCRIPTION:Disable throttling by clearing the THT_EN bit - * - *************************************************************************/ - -void -acpi_hw_disable_throttling ( - ACPI_IO_ADDRESS pblk_address) -{ - u32 pblk_value; - - - pblk_value = acpi_os_in32 (pblk_address); - pblk_value = pblk_value & (~(u32)BIT_4); - acpi_os_out32 (pblk_address, pblk_value); - - return; -} - - -/************************************************************************** - * - * FUNCTION: Acpi_hw_get_duty_cycle - * - * PARAMETERS: Duty_offset Pcnt register duty cycle field offset - * Pblk_address Pcnt register address in chipset - * Num_throttle_states # of CPU throttle states this system - * supports - * - * RETURN: none - * - * DESCRIPTION: Get the duty cycle from the chipset - * - *************************************************************************/ - -u32 -acpi_hw_get_duty_cycle ( - u8 duty_offset, - ACPI_IO_ADDRESS pblk_address, - u32 num_throttle_states) -{ - NATIVE_UINT index; - u32 duty32_value; - u32 pcnt_mask_off_duty_field; - - - /* - * Use Num_throttle_states - 1 as mask [ex. 8 - 1 = 7 (Fh)] - * and then shift it into the right position - */ - pcnt_mask_off_duty_field = num_throttle_states - 1; - - /* - * Read in the current value from the port - */ - duty32_value = acpi_os_in32 ((ACPI_IO_ADDRESS) pblk_address); - - /* - * Shift the the value to LSB - */ - for (index = 0; index < (NATIVE_UINT) duty_offset; index++) { - duty32_value = duty32_value >> 1; - } - - /* - * Get the duty field only - */ - duty32_value = duty32_value & pcnt_mask_off_duty_field; - - return ((u32) duty32_value); -} - - -/************************************************************************** - * - * FUNCTION: Acpi_hw_program_duty_cycle - * - * PARAMETERS: Duty_offset Pcnt register duty cycle field offset - * Duty_cycle duty cycle to program into chipset - * Pblk_address Pcnt register address in chipset - * Num_throttle_states # of CPU throttle states this system - * supports - * - * RETURN: none - * - * DESCRIPTION: Program chipset with specified duty cycle by bit-shifting the - * duty cycle bits to the appropriate offset, reading the duty - * cycle register, OR-ing in the duty cycle, and writing it to - * the Pcnt register. - * - *************************************************************************/ - -void -acpi_hw_program_duty_cycle ( - u8 duty_offset, - u32 duty_cycle, - ACPI_IO_ADDRESS pblk_address, - u32 num_throttle_states) -{ - NATIVE_UINT index; - u32 duty32_value; - u32 pcnt_mask_off_duty_field; - u32 port_value; - - - /* - * valid Duty_cycle passed - */ - duty32_value = duty_cycle; - - /* - * use Num_throttle_states - 1 as mask [ex. 8 - 1 = 7 (Fh)] - * and then shift it into the right position - */ - pcnt_mask_off_duty_field = num_throttle_states - 1; - - /* - * Shift the mask - */ - for (index = 0; index < (NATIVE_UINT) duty_offset; index++) { - pcnt_mask_off_duty_field = pcnt_mask_off_duty_field << 1; - duty32_value = duty32_value << 1; - } - - /* - * Read in the current value from the port - */ - port_value = acpi_os_in32 ((ACPI_IO_ADDRESS) pblk_address); - - /* - * Mask off the duty field so we don't OR in junk! - */ - port_value = port_value & (~pcnt_mask_off_duty_field); - - /* - * OR in the bits we want to write out to the port - */ - port_value = (port_value | duty32_value) & (~(u32)BIT_4); - - /* - * write it to the port - */ - acpi_os_out32 ((ACPI_IO_ADDRESS) pblk_address, port_value); - - return; -} - - diff --git a/drivers/acpi/hardware/hwxface.c b/drivers/acpi/hardware/hwxface.c deleted file mode 100644 index 156c946e7..000000000 --- a/drivers/acpi/hardware/hwxface.c +++ /dev/null @@ -1,595 +0,0 @@ - -/****************************************************************************** - * - * Name: hwxface.c - Hardware access external interfaces - * $Revision: 36 $ - * - *****************************************************************************/ - -/* - * Copyright (C) 2000 R. Byron Moore - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "acpi.h" -#include "acnamesp.h" -#include "achware.h" - -#define _COMPONENT HARDWARE - MODULE_NAME ("hwxface") - - -/****************************************************************************** - * - * Hardware globals - * - ******************************************************************************/ - - -ACPI_C_STATE_HANDLER acpi_hw_cx_handlers[MAX_CX_STATES] = - {NULL, acpi_hw_enter_c1, NULL, NULL}; - -u32 acpi_hw_active_cx_state = 1; - - -/**************************************************************************** - * - * FUNCTION: Acpi_get_processor_throttling_info - * - * PARAMETERS: Processor_handle - handle for the cpu to get info about - * User_buffer - caller supplied buffer - * - * RETURN: Status of function - * - * DESCRIPTION: Get throttling capabilities for the processor, this routine - * builds the data directly into the callers buffer - * - ****************************************************************************/ - -ACPI_STATUS -acpi_get_processor_throttling_info ( - ACPI_HANDLE processor_handle, - ACPI_BUFFER *user_buffer) -{ - NATIVE_UINT percent_step; - NATIVE_UINT next_percent; - NATIVE_UINT num_throttle_states; - NATIVE_UINT buffer_space_needed; - NATIVE_UINT i; - u8 duty_width; - ACPI_NAMESPACE_NODE *cpu_node; - ACPI_OPERAND_OBJECT *cpu_obj; - ACPI_CPU_THROTTLING_STATE *state_ptr; - - - /* - * Have to at least have a buffer to return info in - */ - if (!user_buffer) { - return(AE_BAD_PARAMETER); - } - - /* - * Convert and validate the device handle - */ - - cpu_node = acpi_ns_convert_handle_to_entry (processor_handle); - if (!cpu_node) { - return (AE_BAD_PARAMETER); - } - - /* - * Check for an existing internal object - */ - - cpu_obj = acpi_ns_get_attached_object ((ACPI_HANDLE) cpu_node); - if (!cpu_obj) { - return (AE_NOT_FOUND); - } - - /* - * (Duty Width on IA-64 is zero) - */ - duty_width = acpi_gbl_FADT->duty_width; - - /* - * P0 must always have a P_BLK all others may be null - * in either case, we can't throttle a processor that has no P_BLK - * - * Also if no Duty width, one state and it is 100% - * - */ - if (!cpu_obj->processor.length || !duty_width || - (ACPI_UINT16_MAX < cpu_obj->processor.address)) - { - /* - * Acpi_even though we can't throttle, we still have one state (100%) - */ - num_throttle_states = 1; - } - - else { - num_throttle_states = (int) acpi_hw_local_pow (2,duty_width); - } - - buffer_space_needed = num_throttle_states * sizeof (ACPI_CPU_THROTTLING_STATE); - - if ((user_buffer->length < buffer_space_needed) || !user_buffer->pointer) { - user_buffer->length = buffer_space_needed; - return (AE_BUFFER_OVERFLOW); - } - - user_buffer->length = buffer_space_needed; - state_ptr = (ACPI_CPU_THROTTLING_STATE *) user_buffer->pointer; - percent_step = 1000 / num_throttle_states; - - /* - * Build each entry in the buffer. Note that we're using the value - * 1000 and dividing each state by 10 to better avoid round-off - * accumulation. Also note that the throttling STATES are ordered - * sequentially from 100% (state 0) on down (e.g. 87.5% = state 1), - * which is exactly opposite from duty cycle values (12.5% = state 1). - */ - for (i = 0, next_percent = 1000; i < num_throttle_states; i++) { - state_ptr[i].state_number = i; - state_ptr[i].percent_of_clock = next_percent / 10; - next_percent -= percent_step; - } - - return(AE_OK); -} - - -/**************************************************************************** - * - * FUNCTION: Acpi_get_processor_throttling_state - * - * PARAMETERS: Processor_handle - handle for the cpu to throttle - * Throttle_state - throttling state to enter - * - * RETURN: Status of function - * - * DESCRIPTION: Get current hardware throttling state - * - ****************************************************************************/ - -ACPI_STATUS -acpi_get_processor_throttling_state ( - ACPI_HANDLE processor_handle, - u32 *throttle_state) -{ - ACPI_NAMESPACE_NODE *cpu_node; - ACPI_OPERAND_OBJECT *cpu_obj; - u32 num_throttle_states; - u32 duty_cycle; - u8 duty_offset; - u8 duty_width; - - - /* Convert and validate the device handle */ - - cpu_node = acpi_ns_convert_handle_to_entry (processor_handle); - if (!cpu_node || !throttle_state) { - return (AE_BAD_PARAMETER); - } - - /* Check for an existing internal object */ - - cpu_obj = acpi_ns_get_attached_object ((ACPI_HANDLE) cpu_node); - if (!cpu_obj) { - return (AE_NOT_FOUND); - } - - /* - * No Duty fields in IA64 tables - */ - duty_offset = acpi_gbl_FADT->duty_offset; - duty_width = acpi_gbl_FADT->duty_width; - - /* - * Must have a valid P_BLK P0 must have a P_BLK all others may be null - * in either case, we can't thottle a processor that has no P_BLK - * that means we are in the only supported state (0 - 100%) - * - * also, if Duty_width is zero there are no additional states - */ - if (!cpu_obj->processor.length || !duty_width || - (ACPI_UINT16_MAX < cpu_obj->processor.address)) - { - *throttle_state = 0; - return(AE_OK); - } - - num_throttle_states = (u32) acpi_hw_local_pow (2,duty_width); - - /* - * Get the current duty cycle value. - */ - duty_cycle = acpi_hw_get_duty_cycle (duty_offset, - cpu_obj->processor.address, - num_throttle_states); - - /* - * Convert duty cycle to throttling state (invert). - */ - if (duty_cycle == 0) { - *throttle_state = 0; - } - - else { - *throttle_state = num_throttle_states - duty_cycle; - } - - return(AE_OK); -} - - -/**************************************************************************** - * - * FUNCTION: Acpi_set_processor_throttling_state - * - * PARAMETERS: Processor_handle - handle for the cpu to throttle - * Throttle_state - throttling state to enter - * - * RETURN: Status of function - * - * DESCRIPTION: Set hardware into requested throttling state, the handle - * passed in must have a valid P_BLK - * - ****************************************************************************/ - -ACPI_STATUS -acpi_set_processor_throttling_state ( - ACPI_HANDLE processor_handle, - u32 throttle_state) -{ - ACPI_NAMESPACE_NODE *cpu_node; - ACPI_OPERAND_OBJECT *cpu_obj; - u32 num_throttle_states = 0; - u8 duty_offset; - u8 duty_width; - u32 duty_cycle = 0; - - - /* Convert and validate the device handle */ - - cpu_node = acpi_ns_convert_handle_to_entry (processor_handle); - if (!cpu_node) { - return (AE_BAD_PARAMETER); - } - - /* Check for an existing internal object */ - - cpu_obj = acpi_ns_get_attached_object ((ACPI_HANDLE) cpu_node); - if (!cpu_obj) { - return (AE_NOT_FOUND); - } - - /* - * No Duty fields in IA64 tables - */ - duty_offset = acpi_gbl_FADT->duty_offset; - duty_width = acpi_gbl_FADT->duty_width; - - /* - * Must have a valid P_BLK P0 must have a P_BLK all others may be null - * in either case, we can't thottle a processor that has no P_BLK - * that means we are in the only supported state (0 - 100%) - * - * also, if Duty_width is zero there are no additional states - */ - if (!cpu_obj->processor.length || !duty_width || - (ACPI_UINT16_MAX < cpu_obj->processor.address)) - { - /* - * If caller wants to set the state to the only state we handle - * we're done. - */ - if (throttle_state == 0) { - return (AE_OK); - } - - /* - * Can't set this state - */ - return (AE_SUPPORT); - } - - num_throttle_states = (u32) acpi_hw_local_pow (2,duty_width); - - /* - * Convert throttling state to duty cycle (invert). - */ - if (throttle_state > 0) { - duty_cycle = num_throttle_states - throttle_state; - } - - /* - * Turn off throttling (don't muck with the h/w while throttling). - */ - acpi_hw_disable_throttling (cpu_obj->processor.address); - - /* - * Program the throttling state. - */ - acpi_hw_program_duty_cycle (duty_offset, duty_cycle, - cpu_obj->processor.address, num_throttle_states); - - /* - * Only enable throttling for non-zero states (0 - 100%) - */ - if (throttle_state) { - acpi_hw_enable_throttling (cpu_obj->processor.address); - } - - return(AE_OK); -} - - -/**************************************************************************** - * - * FUNCTION: Acpi_get_processor_cx_info - * - * PARAMETERS: Processor_handle - handle for the cpu return info about - * User_buffer - caller supplied buffer - * - * RETURN: Status of function - * - * DESCRIPTION: Get Cx state latencies, this routine - * builds the data directly into the callers buffer - * - * - ****************************************************************************/ - -ACPI_STATUS -acpi_get_processor_cx_info ( - ACPI_HANDLE processor_handle, - ACPI_BUFFER *user_buffer) -{ - ACPI_STATUS status = AE_OK; - u32 cx_state_latencies[4] = {0, 0, 0, 0}; - NATIVE_UINT buffer_space_needed = 0; - ACPI_CX_STATE *state_ptr = NULL; - NATIVE_UINT i = 0; - - - /* - * Have to at least have a buffer to return info in - */ - if (!user_buffer) { - return (AE_BAD_PARAMETER); - } - - status = acpi_hw_get_cx_info (cx_state_latencies); - if (ACPI_FAILURE (status)) { - return (status); - } - - buffer_space_needed = 4 * sizeof (ACPI_CX_STATE); - - if ((user_buffer->length < buffer_space_needed) || !user_buffer->pointer) { - user_buffer->length = buffer_space_needed; - return (AE_BUFFER_OVERFLOW); - } - - user_buffer->length = buffer_space_needed; - - state_ptr = (ACPI_CX_STATE *) user_buffer->pointer; - - for (i = 0; i < 4; i++) { - state_ptr[i].state_number = i; - state_ptr[i].latency = cx_state_latencies[i]; - } - - return (AE_OK); -} - - -/**************************************************************************** - * - * FUNCTION: Acpi_set_processor_sleep_state - * - * PARAMETERS: Processor_handle - handle for the cpu return info about - * Cx_state - the Cx sleeping state (C1-C3) to make - * 'active' - * - * RETURN: Status of function - * - * DESCRIPTION: Sets which Cx state will be used during calls to - * Acpi_processor_sleep () - * - ****************************************************************************/ - -ACPI_STATUS -acpi_set_processor_sleep_state ( - ACPI_HANDLE processor_handle, - u32 cx_state) -{ - ACPI_STATUS status; - - - status = acpi_hw_set_cx (cx_state); - - return (status); -} - - -/**************************************************************************** - * - * FUNCTION: Acpi_processor_sleep - * - * PARAMETERS: Processor_handle - handle for the cpu to put to sleep (Cx) - * Time_sleeping - time (in microseconds) elapsed while - * sleeping - * - * RETURN: Status of function - * - * DESCRIPTION: Puts the processor into the currently active sleep state (Cx) - * - ****************************************************************************/ - -ACPI_STATUS -acpi_processor_sleep ( - ACPI_HANDLE processor_handle, - u32 *pm_timer_ticks) -{ - ACPI_NAMESPACE_NODE *cpu_node = NULL; - ACPI_OPERAND_OBJECT *cpu_obj = NULL; - ACPI_IO_ADDRESS address = 0; - - - /* - * Convert Processor_handle to Pblk_addres... - */ - - /* Convert and validate the device handle */ - - cpu_node = acpi_ns_convert_handle_to_entry (processor_handle); - if (!cpu_node) { - return (AE_BAD_PARAMETER); - } - - /* Check for an existing internal object */ - - cpu_obj = acpi_ns_get_attached_object ((ACPI_HANDLE) cpu_node); - if (!cpu_obj) { - return (AE_NOT_FOUND); - } - - /* Get the processor register block (P_BLK) address */ - - address = cpu_obj->processor.address; - if (!cpu_obj->processor.length) { - /* Ensure a NULL addresss (note that P_BLK isn't required for C1) */ - - address = 0; - } - - /* - * Enter the currently active Cx sleep state. - */ - return (acpi_hw_enter_cx (address, pm_timer_ticks)); -} - - -/****************************************************************************** - * - * FUNCTION: Acpi_get_timer - * - * PARAMETERS: none - * - * RETURN: Current value of the ACPI PMT (timer) - * - * DESCRIPTION: Obtains current value of ACPI PMT - * - ******************************************************************************/ - -ACPI_STATUS -acpi_get_timer ( - u32 *out_ticks) -{ - - if (!out_ticks) { - return (AE_BAD_PARAMETER); - } - - *out_ticks = acpi_hw_pmt_ticks (); - - return (AE_OK); -} - - -/****************************************************************************** - * - * FUNCTION: Acpi_set_firmware_waking_vector - * - * PARAMETERS: Physical_address - Physical address of ACPI real mode - * entry point. - * - * RETURN: AE_OK or AE_ERROR - * - * DESCRIPTION: Access function for d_firmware_waking_vector field in FACS - * - ******************************************************************************/ - -ACPI_STATUS -acpi_set_firmware_waking_vector ( - ACPI_PHYSICAL_ADDRESS physical_address) -{ - - - /* Make sure that we have an FACS */ - - if (!acpi_gbl_FACS) { - return (AE_NO_ACPI_TABLES); - } - - /* Set the vector */ - - if (acpi_gbl_FACS->vector_width == 32) { - * (u32 *) acpi_gbl_FACS->firmware_waking_vector = (u32) physical_address; - } - else { - *acpi_gbl_FACS->firmware_waking_vector = physical_address; - } - - return (AE_OK); -} - - -/****************************************************************************** - * - * FUNCTION: Acpi_get_firmware_waking_vector - * - * PARAMETERS: *Physical_address - Output buffer where contents of - * the Firmware_waking_vector field of - * the FACS will be stored. - * - * RETURN: Status - * - * DESCRIPTION: Access function for d_firmware_waking_vector field in FACS - * - ******************************************************************************/ - -ACPI_STATUS -acpi_get_firmware_waking_vector ( - ACPI_PHYSICAL_ADDRESS *physical_address) -{ - - - if (!physical_address) { - return (AE_BAD_PARAMETER); - } - - /* Make sure that we have an FACS */ - - if (!acpi_gbl_FACS) { - return (AE_NO_ACPI_TABLES); - } - - /* Get the vector */ - - if (acpi_gbl_FACS->vector_width == 32) { - *physical_address = * (u32 *) acpi_gbl_FACS->firmware_waking_vector; - } - else { - *physical_address = *acpi_gbl_FACS->firmware_waking_vector; - } - - return (AE_OK); -} - - diff --git a/drivers/acpi/ksyms.c b/drivers/acpi/ksyms.c deleted file mode 100644 index 13f4fe0e7..000000000 --- a/drivers/acpi/ksyms.c +++ /dev/null @@ -1,91 +0,0 @@ -/* - * ksyms.c - ACPI exported symbols - * - * Copyright (C) 2000 Andrew Grover - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include <linux/module.h> -#include <linux/init.h> -#include <linux/kernel.h> -#include <linux/types.h> -#include <linux/acpi.h> -#include "acpi.h" -#include "acdebug.h" - -extern int acpi_in_debugger; - -#define _COMPONENT OS_DEPENDENT - MODULE_NAME ("symbols") - -#ifdef ENABLE_DEBUGGER -EXPORT_SYMBOL(acpi_in_debugger); -EXPORT_SYMBOL(acpi_db_user_commands); -#endif - -EXPORT_SYMBOL(acpi_os_free); -EXPORT_SYMBOL(acpi_os_breakpoint); -EXPORT_SYMBOL(acpi_os_printf); -EXPORT_SYMBOL(acpi_os_callocate); -EXPORT_SYMBOL(acpi_os_sleep); -EXPORT_SYMBOL(acpi_os_sleep_usec); -EXPORT_SYMBOL(acpi_os_in8); -EXPORT_SYMBOL(acpi_os_out8); -EXPORT_SYMBOL(acpi_os_queue_for_execution); - -EXPORT_SYMBOL(acpi_dbg_layer); -EXPORT_SYMBOL(acpi_dbg_level); -EXPORT_SYMBOL(function_exit); -EXPORT_SYMBOL(function_trace); -EXPORT_SYMBOL(function_status_exit); -EXPORT_SYMBOL(function_value_exit); -EXPORT_SYMBOL(debug_print_raw); -EXPORT_SYMBOL(debug_print_prefix); - -EXPORT_SYMBOL(acpi_cm_strncmp); -EXPORT_SYMBOL(acpi_cm_memcpy); -EXPORT_SYMBOL(acpi_cm_memset); - -EXPORT_SYMBOL(acpi_get_handle); -EXPORT_SYMBOL(acpi_get_parent); -EXPORT_SYMBOL(acpi_get_type); -EXPORT_SYMBOL(acpi_get_name); -EXPORT_SYMBOL(acpi_get_object_info); -EXPORT_SYMBOL(acpi_get_next_object); -EXPORT_SYMBOL(acpi_evaluate_object); - -EXPORT_SYMBOL(acpi_install_notify_handler); -EXPORT_SYMBOL(acpi_remove_notify_handler); -EXPORT_SYMBOL(acpi_install_gpe_handler); -EXPORT_SYMBOL(acpi_remove_gpe_handler); -EXPORT_SYMBOL(acpi_install_address_space_handler); -EXPORT_SYMBOL(acpi_remove_address_space_handler); - -EXPORT_SYMBOL(acpi_get_current_resources); -EXPORT_SYMBOL(acpi_get_possible_resources); -EXPORT_SYMBOL(acpi_set_current_resources); - -EXPORT_SYMBOL(acpi_enable_event); -EXPORT_SYMBOL(acpi_disable_event); -EXPORT_SYMBOL(acpi_clear_event); - -EXPORT_SYMBOL(acpi_get_processor_throttling_info); -EXPORT_SYMBOL(acpi_get_processor_throttling_state); -EXPORT_SYMBOL(acpi_set_processor_throttling_state); - -EXPORT_SYMBOL(acpi_get_processor_cx_info); -EXPORT_SYMBOL(acpi_set_processor_sleep_state); -EXPORT_SYMBOL(acpi_processor_sleep); diff --git a/include/asm-ppc/gemini.h b/include/asm-ppc/gemini.h deleted file mode 100644 index ebd01c9b6..000000000 --- a/include/asm-ppc/gemini.h +++ /dev/null @@ -1,168 +0,0 @@ -/* - * include/asm-ppc/gemini.h - * - * - * Onboard registers and descriptions for Synergy Microsystems' - * "Gemini" boards. - * - */ -#ifdef __KERNEL__ -#ifndef __PPC_GEMINI_H -#define __PPC_GEMINI_H - -/* Registers */ - -#define GEMINI_SERIAL_B (0xffeffb00) -#define GEMINI_SERIAL_A (0xffeffb08) -#define GEMINI_USWITCH (0xffeffd00) -#define GEMINI_BREV (0xffeffe00) -#define GEMINI_BECO (0xffeffe08) -#define GEMINI_FEAT (0xffeffe10) -#define GEMINI_BSTAT (0xffeffe18) -#define GEMINI_CPUSTAT (0xffeffe20) -#define GEMINI_L2CFG (0xffeffe30) -#define GEMINI_MEMCFG (0xffeffe38) -#define GEMINI_FLROM (0xffeffe40) -#define GEMINI_P0PCI (0xffeffe48) -#define GEMINI_FLWIN (0xffeffe50) -#define GEMINI_P0INTMASK (0xffeffe60) -#define GEMINI_P0INTAP (0xffeffe68) -#define GEMINI_PCIERR (0xffeffe70) -#define GEMINI_LEDBASE (0xffeffe80) -#define GEMINI_RTC (0xffe9fff8) -#define GEMINI_LEDS 8 -#define GEMINI_SWITCHES 8 - - -/* Flash ROM bit definitions */ -#define GEMINI_FLS_WEN (1<<0) -#define GEMINI_FLS_JMP (1<<6) -#define GEMINI_FLS_BOOT (1<<7) - -/* Memory bit definitions */ -#define GEMINI_MEM_TYPE_MASK 0xc0 -#define GEMINI_MEM_SIZE_MASK 0x38 -#define GEMINI_MEM_BANK_MASK 0x07 - -/* L2 cache bit definitions */ -#define GEMINI_L2_SIZE_MASK 0xc0 -#define GEMINI_L2_RATIO_MASK 0x03 - -/* Timebase register bit definitons */ -#define GEMINI_TIMEB0_EN (1<<0) -#define GEMINI_TIMEB1_EN (1<<1) -#define GEMINI_TIMEB2_EN (1<<2) -#define GEMINI_TIMEB3_EN (1<<3) - -/* CPU status bit definitions */ -#define GEMINI_CPU_ID_MASK 0x03 -#define GEMINI_CPU_COUNT_MASK 0x0c -#define GEMINI_CPU0_HALTED (1<<4) -#define GEMINI_CPU1_HALTED (1<<5) -#define GEMINI_CPU2_HALTED (1<<6) -#define GEMINI_CPU3_HALTED (1<<7) - -/* Board status bit definitions */ -#define GEMINI_BRD_FAIL (1<<0) /* FAIL led is lit */ -#define GEMINI_BRD_BUS_MASK 0x0c /* PowerPC bus speed */ - -/* Board family/feature bit descriptions */ -#define GEMINI_FEAT_HAS_FLASH (1<<0) -#define GEMINI_FEAT_HAS_ETH (1<<1) -#define GEMINI_FEAT_HAS_SCSI (1<<2) -#define GEMINI_FEAT_HAS_P0 (1<<3) -#define GEMINI_FEAT_FAM_MASK 0xf0 - -/* Mod/ECO bit definitions */ -#define GEMINI_ECO_LEVEL_MASK 0x0f -#define GEMINI_MOD_MASK 0xf0 - -/* Type/revision bit definitions */ -#define GEMINI_REV_MASK 0x0f -#define GEMINI_TYPE_MASK 0xf0 - -/* User switch definitions */ -#define GEMINI_SWITCH_VERBOSE 1 /* adds "debug" to boot cmd line */ -#define GEMINI_SWITCH_SINGLE_USER 7 /* boots into "single-user" mode */ - -#define SGS_RTC_CONTROL 0 -#define SGS_RTC_SECONDS 1 -#define SGS_RTC_MINUTES 2 -#define SGS_RTC_HOURS 3 -#define SGS_RTC_DAY 4 -#define SGS_RTC_DAY_OF_MONTH 5 -#define SGS_RTC_MONTH 6 -#define SGS_RTC_YEAR 7 - -#define SGS_RTC_SET 0x80 -#define SGS_RTC_IS_STOPPED 0x80 - -#define GRACKLE_CONFIG_ADDR_ADDR (0xfec00000) -#define GRACKLE_CONFIG_DATA_ADDR (0xfee00000) - -#define GEMINI_BOOT_INIT (0xfff00100) - -#ifndef __ASSEMBLY__ - -static inline void grackle_write( unsigned long addr, unsigned long data ) -{ - __asm__ __volatile__( - " stwbrx %1, 0, %0\n \ - sync\n \ - stwbrx %3, 0, %2\n \ - sync " - : /* no output */ - : "r" (GRACKLE_CONFIG_ADDR_ADDR), "r" (addr), - "r" (GRACKLE_CONFIG_DATA_ADDR), "r" (data)); -} - -static inline unsigned long grackle_read( unsigned long addr ) -{ - unsigned long val; - - __asm__ __volatile__( - " stwbrx %1, 0, %2\n \ - sync\n \ - lwbrx %0, 0, %3\n \ - sync " - : "=r" (val) - : "r" (addr), "r" (GRACKLE_CONFIG_ADDR_ADDR), - "r" (GRACKLE_CONFIG_DATA_ADDR)); - - return val; -} - -static inline void gemini_led_on( int led ) -{ - if (led >= 0 && led < GEMINI_LEDS) - *(unsigned char *)(GEMINI_LEDBASE + (led<<3)) = 1; -} - -static inline void gemini_led_off(int led) -{ - if (led >= 0 && led < GEMINI_LEDS) - *(unsigned char *)(GEMINI_LEDBASE + (led<<3)) = 0; -} - -static inline int gemini_led_val(int led) -{ - int val = 0; - if (led >= 0 && led < GEMINI_LEDS) - val = *(unsigned char *)(GEMINI_LEDBASE + (led<<3)); - return (val & 0x1); -} - -/* returns processor id from the board */ -static inline int gemini_processor(void) -{ - unsigned char cpu = *(unsigned char *)(GEMINI_CPUSTAT); - return (int) ((cpu == 0) ? 4 : (cpu & GEMINI_CPU_ID_MASK)); -} - - -extern void _gemini_reboot(void); -extern void gemini_prom_init(void); -extern void gemini_init_l2(void); -#endif /* __ASSEMBLY__ */ -#endif -#endif /* __KERNEL__ */ diff --git a/include/asm-ppc/gemini_serial.h b/include/asm-ppc/gemini_serial.h deleted file mode 100644 index e4e08467e..000000000 --- a/include/asm-ppc/gemini_serial.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifdef __KERNEL__ -#ifndef __ASMPPC_GEMINI_SERIAL_H -#define __ASMPPC_GEMINI_SERIAL_H - -#include <linux/config.h> -#include <asm/gemini.h> - -#ifdef CONFIG_SERIAL_MANY_PORTS -#define RS_TABLE_SIZE 64 -#else -#define RS_TABLE_SIZE 4 -#endif - -/* Rate for the 24.576 Mhz clock for the onboard serial chip */ -#define BASE_BAUD (24576000 / 16) - -#ifdef CONFIG_SERIAL_DETECT_IRQ -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ) -#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_AUTO_IRQ) -#else -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST) -#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF) -#endif - -#define STD_SERIAL_PORT_DEFNS \ - { 0, BASE_BAUD, GEMINI_SERIAL_A, 15, STD_COM_FLAGS }, /* ttyS0 */ \ - { 0, BASE_BAUD, GEMINI_SERIAL_B, 14, STD_COM_FLAGS }, /* ttyS1 */ \ - -#ifdef CONFIG_GEMINI_PU32 -#define PU32_SERIAL_PORT_DEFNS \ - { 0, BASE_BAUD, NULL, 0, STD_COM_FLAGS }, -#else -#define PU32_SERIAL_PORT_DEFNS -#endif - -#define SERIAL_PORT_DFNS \ - STD_SERIAL_PORT_DEFNS \ - PU32_SERIAL_PORT_DEFNS - -#endif -#endif /* __KERNEL__ */ |