diff options
| author | James Simmons <jsimmons@kozmo.(none)> | 2003-03-27 21:30:17 -0800 |
|---|---|---|
| committer | James Simmons <jsimmons@kozmo.(none)> | 2003-03-27 21:30:17 -0800 |
| commit | 2d0abad7f356128f73cb4f11c57221a08bf3daa4 (patch) | |
| tree | 38a68a62dc4aed73afe4db67d7474ac736205241 /include | |
| parent | 80d0fb70c7c053db2a9a0dcfdaeb8b56c959a188 (diff) | |
| parent | edad54dce95e2ebc3ff0be0d8a99334789a6bf5a (diff) | |
Merge kozmo.(none):/usr/src/linus-2.5
into kozmo.(none):/usr/src/fbdev-2.5
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-i386/ide.h | 19 | ||||
| -rw-r--r-- | include/asm-i386/uaccess.h | 4 | ||||
| -rw-r--r-- | include/asm-ppc/keylargo.h | 117 | ||||
| -rw-r--r-- | include/asm-ppc/macio_asic.h | 80 | ||||
| -rw-r--r-- | include/asm-ppc/pgtable.h | 23 | ||||
| -rw-r--r-- | include/asm-ppc/pmac_feature.h | 77 | ||||
| -rw-r--r-- | include/asm-ppc/uninorth.h | 2 | ||||
| -rw-r--r-- | include/asm-s390/bitops.h | 12 | ||||
| -rw-r--r-- | include/linux/raid/md_k.h | 1 | ||||
| -rw-r--r-- | include/pcmcia/driver_ops.h | 75 | ||||
| -rw-r--r-- | include/pcmcia/ds.h | 10 |
11 files changed, 291 insertions, 129 deletions
diff --git a/include/asm-i386/ide.h b/include/asm-i386/ide.h index 45b830d0c74c..a19c4fd49a71 100644 --- a/include/asm-i386/ide.h +++ b/include/asm-i386/ide.h @@ -26,6 +26,9 @@ static __inline__ int ide_default_irq(unsigned long base) { switch (base) { +#ifdef CONFIG_X86_PC9800 + case 0x640: return 9; +#endif case 0x1f0: return 14; case 0x170: return 15; case 0x1e8: return 11; @@ -40,12 +43,17 @@ static __inline__ int ide_default_irq(unsigned long base) static __inline__ unsigned long ide_default_io_base(int index) { switch (index) { +#ifdef CONFIG_X86_PC9800 + case 0: + case 1: return 0x640; +#else case 0: return 0x1f0; case 1: return 0x170; case 2: return 0x1e8; case 3: return 0x168; case 4: return 0x1e0; case 5: return 0x160; +#endif default: return 0; } @@ -56,13 +64,24 @@ static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_por { unsigned long reg = data_port; int i; +#ifdef CONFIG_X86_PC9800 + unsigned long increment = data_port == 0x640 ? 2 : 1; +#endif for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { hw->io_ports[i] = reg; +#ifdef CONFIG_X86_PC9800 + reg += increment; +#else reg += 1; +#endif } if (ctrl_port) { hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port; +#ifdef CONFIG_X86_PC9800 + } else if (data_port == 0x640) { + hw->io_ports[IDE_CONTROL_OFFSET] = 0x74c; +#endif } else { hw->io_ports[IDE_CONTROL_OFFSET] = hw->io_ports[IDE_DATA_OFFSET] + 0x206; } diff --git a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h index 88e3c782275f..7d767256ac4c 100644 --- a/include/asm-i386/uaccess.h +++ b/include/asm-i386/uaccess.h @@ -510,9 +510,9 @@ long __strncpy_from_user(char *dst, const char *src, long count); * * Context: User context only. This function may sleep. * - * Get the size of a NULL-terminated string in user space. + * Get the size of a NUL-terminated string in user space. * - * Returns the size of the string INCLUDING the terminating NULL. + * Returns the size of the string INCLUDING the terminating NUL. * On exception, returns 0. * * If there is a limit on the length of a valid string, you may wish to diff --git a/include/asm-ppc/keylargo.h b/include/asm-ppc/keylargo.h index 044337d31d3d..383b00df2c6b 100644 --- a/include/asm-ppc/keylargo.h +++ b/include/asm-ppc/keylargo.h @@ -10,12 +10,13 @@ #define KL_PANGEA_REV 0x100 /* offset from base for feature control registers */ -#define KEYLARGO_MBCR 0x34 /* Media bay control/status */ +#define KEYLARGO_MBCR 0x34 /* KL Only, Media bay control/status */ #define KEYLARGO_FCR0 0x38 #define KEYLARGO_FCR1 0x3c #define KEYLARGO_FCR2 0x40 #define KEYLARGO_FCR3 0x44 #define KEYLARGO_FCR4 0x48 +#define KEYLARGO_FCR5 0x4c /* Pangea only */ /* GPIO registers */ #define KEYLARGO_GPIO_LEVELS0 0x50 @@ -85,76 +86,111 @@ #define KL_MBCR_MB1_DEV_RESET 0x02000000 #define KL_MBCR_MB1_ENABLE 0x01000000 -#define KL0_SCC_B_INTF_ENABLE 0x00000001 +#define KL0_SCC_B_INTF_ENABLE 0x00000001 /* (KL Only) */ #define KL0_SCC_A_INTF_ENABLE 0x00000002 #define KL0_SCC_SLOWPCLK 0x00000004 #define KL0_SCC_RESET 0x00000008 #define KL0_SCCA_ENABLE 0x00000010 #define KL0_SCCB_ENABLE 0x00000020 #define KL0_SCC_CELL_ENABLE 0x00000040 -#define KL0_IRDA_HIGH_BAND 0x00000100 -#define KL0_IRDA_SOURCE2_SEL 0x00000200 -#define KL0_IRDA_SOURCE1_SEL 0x00000400 -#define KL0_IRDA_RESET 0x00000800 -#define KL0_IRDA_DEFAULT1 0x00001000 -#define KL0_IRDA_DEFAULT0 0x00002000 -#define KL0_IRDA_FAST_CONNECT 0x00004000 -#define KL0_IRDA_ENABLE 0x00008000 -#define KL0_IRDA_CLK32_ENABLE 0x00010000 -#define KL0_IRDA_CLK19_ENABLE 0x00020000 +#define KL0_IRDA_HIGH_BAND 0x00000100 /* (KL Only) */ +#define KL0_IRDA_SOURCE2_SEL 0x00000200 /* (KL Only) */ +#define KL0_IRDA_SOURCE1_SEL 0x00000400 /* (KL Only) */ +#define KL0_PG_USB0_PMI_ENABLE 0x00000400 /* (Pangea/Intrepid Only) */ +#define KL0_IRDA_RESET 0x00000800 /* (KL Only) */ +#define KL0_PG_USB0_REF_SUSPEND_SEL 0x00000800 /* (Pangea/Intrepid Only) */ +#define KL0_IRDA_DEFAULT1 0x00001000 /* (KL Only) */ +#define KL0_PG_USB0_REF_SUSPEND 0x00001000 /* (Pangea/Intrepid Only) */ +#define KL0_IRDA_DEFAULT0 0x00002000 /* (KL Only) */ +#define KL0_PG_USB0_PAD_SUSPEND 0x00002000 /* (Pangea/Intrepid Only) */ +#define KL0_IRDA_FAST_CONNECT 0x00004000 /* (KL Only) */ +#define KL0_PG_USB1_PMI_ENABLE 0x00004000 /* (Pangea/Intrepid Only) */ +#define KL0_IRDA_ENABLE 0x00008000 /* (KL Only) */ +#define KL0_PG_USB1_REF_SUSPEND_SEL 0x00008000 /* (Pangea/Intrepid Only) */ +#define KL0_IRDA_CLK32_ENABLE 0x00010000 /* (KL Only) */ +#define KL0_PG_USB1_REF_SUSPEND 0x00010000 /* (Pangea/Intrepid Only) */ +#define KL0_IRDA_CLK19_ENABLE 0x00020000 /* (KL Only) */ +#define KL0_PG_USB1_PAD_SUSPEND 0x00020000 /* (Pangea/Intrepid Only) */ #define KL0_USB0_PAD_SUSPEND0 0x00040000 #define KL0_USB0_PAD_SUSPEND1 0x00080000 #define KL0_USB0_CELL_ENABLE 0x00100000 #define KL0_USB1_PAD_SUSPEND0 0x00400000 #define KL0_USB1_PAD_SUSPEND1 0x00800000 #define KL0_USB1_CELL_ENABLE 0x01000000 -#define KL0_USB_REF_SUSPEND 0x10000000 +#define KL0_USB_REF_SUSPEND 0x10000000 /* (KL Only) */ #define KL0_SERIAL_ENABLE (KL0_SCC_B_INTF_ENABLE | \ KL0_SCC_SLOWPCLK | \ KL0_SCC_CELL_ENABLE | KL0_SCCA_ENABLE) -#define KL1_AUDIO_SEL_22MCLK 0x00000002 -#define KL1_AUDIO_CLK_ENABLE_BIT 0x00000008 -#define KL1_AUDIO_CLK_OUT_ENABLE 0x00000020 /* Burgundy only ? */ -#define KL1_AUDIO_CELL_ENABLE 0x00000040 -#define KL1_AUDIO_CHOOSE 0x00000080 /* Burgundy only ? */ +#define KL1_USB2_PMI_ENABLE 0x00000001 /* Intrepid only */ +#define KL1_AUDIO_SEL_22MCLK 0x00000002 /* KL/Pangea only */ +#define KL1_USB2_REF_SUSPEND_SEL 0x00000002 /* Intrepid only */ +#define KL1_USB2_REF_SUSPEND 0x00000004 /* Intrepid only */ +#define KL1_AUDIO_CLK_ENABLE_BIT 0x00000008 /* KL/Pangea only */ +#define KL1_USB2_PAD_SUSPEND_SEL 0x00000008 /* Intrepid only */ +#define KL1_USB2_PAD_SUSPEND0 0x00000010 /* Intrepid only */ +#define KL1_AUDIO_CLK_OUT_ENABLE 0x00000020 /* KL/Pangea only */ +#define KL1_USB2_PAD_SUSPEND1 0x00000020 /* Intrepid only */ +#define KL1_AUDIO_CELL_ENABLE 0x00000040 /* KL/Pangea only */ +#define KL1_USB2_CELL_ENABLE 0x00000040 /* Intrepid only */ +#define KL1_AUDIO_CHOOSE 0x00000080 /* KL/Pangea only */ +#define KL1_I2S0_CHOOSE 0x00000200 /* KL Only */ #define KL1_I2S0_CELL_ENABLE 0x00000400 #define KL1_I2S0_CLK_ENABLE_BIT 0x00001000 #define KL1_I2S0_ENABLE 0x00002000 #define KL1_I2S1_CELL_ENABLE 0x00020000 #define KL1_I2S1_CLK_ENABLE_BIT 0x00080000 #define KL1_I2S1_ENABLE 0x00100000 -#define KL1_EIDE0_ENABLE 0x00800000 -#define KL1_EIDE0_RESET_N 0x01000000 -#define KL1_EIDE1_ENABLE 0x04000000 -#define KL1_EIDE1_RESET_N 0x08000000 -#define KL1_UIDE_ENABLE 0x20000000 -#define KL1_UIDE_RESET_N 0x40000000 +#define KL1_EIDE0_ENABLE 0x00800000 /* KL/Intrepid Only */ +#define KL1_EIDE0_RESET_N 0x01000000 /* KL/Intrepid Only */ +#define KL1_EIDE1_ENABLE 0x04000000 /* KL Only */ +#define KL1_EIDE1_RESET_N 0x08000000 /* KL Only */ +#define KL1_UIDE_ENABLE 0x20000000 /* KL/Pangea Only */ +#define KL1_UIDE_RESET_N 0x40000000 /* KL/Pangea Only */ #define KL2_IOBUS_ENABLE 0x00000002 -#define KL2_SLEEP_STATE_BIT 0x00000100 +#define KL2_SLEEP_STATE_BIT 0x00000100 /* KL Only */ +#define KL2_PG_STOP_ALL_CLOCKS 0x00000100 /* Pangea Only */ #define KL2_MPIC_ENABLE 0x00020000 -#define KL2_ALT_DATA_OUT 0x02000000 +#define KL2_CARDSLOT_RESET 0x00040000 /* Pangea/Intrepid Only */ +#define KL2_ALT_DATA_OUT 0x02000000 /* KL Only ??? */ #define KL2_MEM_IS_BIG 0x04000000 #define KL2_CARDSEL_16 0x08000000 -#define KL3_SHUTDOWN_PLL_TOTAL 0x00000001 -#define KL3_SHUTDOWN_PLLKW6 0x00000002 -#define KL3_SHUTDOWN_PLLKW4 0x00000004 -#define KL3_SHUTDOWN_PLLKW35 0x00000008 -#define KL3_SHUTDOWN_PLLKW12 0x00000010 -#define KL3_PLL_RESET 0x00000020 -#define KL3_SHUTDOWN_PLL2X 0x00000080 -#define KL3_CLK66_ENABLE 0x00000100 +#define KL3_SHUTDOWN_PLL_TOTAL 0x00000001 /* KL/Pangea only */ +#define KL3_SHUTDOWN_PLLKW6 0x00000002 /* KL/Pangea only */ +#define KL3_IT_SHUTDOWN_PLL3 0x00000002 /* Intrepid only */ +#define KL3_SHUTDOWN_PLLKW4 0x00000004 /* KL/Pangea only */ +#define KL3_IT_SHUTDOWN_PLL2 0x00000004 /* Intrepid only */ +#define KL3_SHUTDOWN_PLLKW35 0x00000008 /* KL/Pangea only */ +#define KL3_IT_SHUTDOWN_PLL1 0x00000008 /* Intrepid only */ +#define KL3_SHUTDOWN_PLLKW12 0x00000010 /* KL Only */ +#define KL3_IT_ENABLE_PLL3_SHUTDOWN 0x00000010 /* Intrepid only */ +#define KL3_PLL_RESET 0x00000020 /* KL/Pangea only */ +#define KL3_IT_ENABLE_PLL2_SHUTDOWN 0x00000020 /* Intrepid only */ +#define KL3_IT_ENABLE_PLL1_SHUTDOWN 0x00000010 /* Intrepid only */ +#define KL3_SHUTDOWN_PLL2X 0x00000080 /* KL Only */ +#define KL3_CLK66_ENABLE 0x00000100 /* KL Only */ #define KL3_CLK49_ENABLE 0x00000200 #define KL3_CLK45_ENABLE 0x00000400 -#define KL3_CLK31_ENABLE 0x00000800 +#define KL3_CLK31_ENABLE 0x00000800 /* KL/Pangea only */ #define KL3_TIMER_CLK18_ENABLE 0x00001000 #define KL3_I2S1_CLK18_ENABLE 0x00002000 #define KL3_I2S0_CLK18_ENABLE 0x00004000 -#define KL3_VIA_CLK16_ENABLE 0x00008000 -#define KL3_STOPPING33_ENABLED 0x00080000 +#define KL3_VIA_CLK16_ENABLE 0x00008000 /* KL/Pangea only */ +#define KL3_IT_VIA_CLK32_ENABLE 0x00008000 /* Intrepid only */ +#define KL3_STOPPING33_ENABLED 0x00080000 /* KL Only */ +#define KL3_PG_PLL_ENABLE_TEST 0x00080000 /* Pangea Only */ + +/* Intrepid USB bus 2, port 0,1 */ +#define KL3_IT_PORT_WAKEUP_ENABLE(p) (0x00080000 << ((p)<<3)) +#define KL3_IT_PORT_RESUME_WAKE_EN(p) (0x00040000 << ((p)<<3)) +#define KL3_IT_PORT_CONNECT_WAKE_EN(p) (0x00020000 << ((p)<<3)) +#define KL3_IT_PORT_DISCONNECT_WAKE_EN(p) (0x00010000 << ((p)<<3)) +#define KL3_IT_PORT_RESUME_STAT(p) (0x00300000 << ((p)<<3)) +#define KL3_IT_PORT_CONNECT_STAT(p) (0x00200000 << ((p)<<3)) +#define KL3_IT_PORT_DISCONNECT_STAT(p) (0x00100000 << ((p)<<3)) /* Port 0,1 : bus 0, port 2,3 : bus 1 */ #define KL4_PORT_WAKEUP_ENABLE(p) (0x00000008 << ((p)<<3)) @@ -165,3 +201,10 @@ #define KL4_PORT_CONNECT_STAT(p) (0x00000020 << ((p)<<3)) #define KL4_PORT_DISCONNECT_STAT(p) (0x00000010 << ((p)<<3)) +/* Pangea and Intrepid only */ +#define KL5_VIA_USE_CLK31 0x000000001 /* Pangea Only */ +#define KL5_SCC_USE_CLK31 0x000000002 /* Pangea Only */ +#define KL5_PWM_CLK32_EN 0x000000004 +#define KL5_CLK3_68_EN 0x000000010 +#define KL5_CLK32_EN 0x000000020 + diff --git a/include/asm-ppc/macio_asic.h b/include/asm-ppc/macio_asic.h new file mode 100644 index 000000000000..58d15c5b6c69 --- /dev/null +++ b/include/asm-ppc/macio_asic.h @@ -0,0 +1,80 @@ +#ifndef __MACIO_ASIC_H__ +#define __MACIO_ASIC_H__ + +#include <linux/device.h> + +extern struct bus_type macio_bus_type; + +/* MacIO device driver is defined later */ +struct macio_driver; +struct macio_chip; + +#define MACIO_DEV_COUNT_RESOURCE 8 +#define MACIO_DEV_COUNT_IRQS 8 + +/* + * the macio_bus structure is used to describe a "virtual" bus + * within a MacIO ASIC. It's typically provided by a macio_pci_asic + * PCI device, but could be provided differently as well (nubus + * machines using a fake OF tree). + */ +struct macio_bus +{ + struct macio_chip *chip; /* macio_chip (private use) */ + struct pci_dev *pdev; /* PCI device hosting this bus */ + struct list_head devices; /* list of devices on this bus */ +}; + +/* + * the macio_dev structure is used to describe a device + * within an Apple MacIO ASIC. + */ +struct macio_dev +{ + struct macio_bus *bus; /* virtual bus this device is on */ + + struct device_node *node; /* OF node */ + struct macio_driver *driver; /* which driver allocated this device */ + void *driver_data; /* placeholder for driver specific stuffs */ + struct resource resources[MACIO_DEV_COUNT_RESOURCE]; /* I/O */ + int irqs[MACIO_DEV_COUNT_IRQS]; + + struct device dev; /* Generic device interface */ +}; +#define to_macio_device(d) container_of(d, struct macio_dev, dev) + +/* + * Struct used for matching a device + */ +struct macio_match +{ + char *name; + char *type; + char *compatible; +}; +#define MACIO_ANY_MATCH ((char *)-1L) + +/* + * A driver for a mac-io chip based device + */ +struct macio_driver +{ + struct list_head node; + char *name; + struct macio_match *match_table; + + int (*probe)(struct macio_dev* dev, const struct macio_match *match); + int (*remove)(struct macio_dev* dev); + + int (*suspend)(struct macio_dev* dev, u32 state, u32 level); + int (*resume)(struct macio_dev* dev, u32 level); + int (*shutdown)(struct macio_dev* dev); + + struct device_driver driver; +}; +#define to_macio_driver(drv) container_of(drv,struct macio_driver, driver) + +extern int macio_register_driver(struct macio_driver *); +extern void macio_unregister_driver(struct macio_driver *); + +#endif /* __MACIO_ASIC_H__ */ diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h index 4c3742d28256..c08041618042 100644 --- a/include/asm-ppc/pgtable.h +++ b/include/asm-ppc/pgtable.h @@ -152,6 +152,7 @@ extern unsigned long ioremap_bot, ioremap_base; /* Definitions for 40x embedded chips. */ #define _PAGE_GUARDED 0x001 /* G: page is guarded from prefetch */ +#define _PAGE_FILE 0x001 /* when !present: nonlinear file mapping */ #define _PAGE_PRESENT 0x002 /* software: PTE contains a translation */ #define _PAGE_NO_CACHE 0x004 /* I: caching is inhibited */ #define _PAGE_WRITETHRU 0x008 /* W: caching is write-through */ @@ -172,6 +173,7 @@ extern unsigned long ioremap_bot, ioremap_base; #elif defined(CONFIG_8xx) /* Definitions for 8xx embedded chips. */ #define _PAGE_PRESENT 0x0001 /* Page is valid */ +#define _PAGE_FILE 0x0002 /* when !present: nonlinear file mapping */ #define _PAGE_NO_CACHE 0x0002 /* I: cache inhibit */ #define _PAGE_SHARED 0x0004 /* No ASID (context) compare */ @@ -210,6 +212,7 @@ extern unsigned long ioremap_bot, ioremap_base; /* Definitions for 60x, 740/750, etc. */ #define _PAGE_PRESENT 0x001 /* software: pte contains a translation */ #define _PAGE_HASHPTE 0x002 /* hash_page has made an HPTE for this pte */ +#define _PAGE_FILE 0x004 /* when !present: nonlinear file mapping */ #define _PAGE_USER 0x004 /* usermode access allowed */ #define _PAGE_GUARDED 0x008 /* G: prohibit speculative access */ #define _PAGE_COHERENT 0x010 /* M: enforce memory coherence (SMP systems) */ @@ -378,6 +381,7 @@ static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } static inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_EXEC; } static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } +static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; } static inline void pte_cache(pte_t pte) { pte_val(pte) &= ~_PAGE_NO_CACHE; } @@ -523,14 +527,19 @@ extern void add_hash_page(unsigned context, unsigned long va, /* * Encode and decode a swap entry. * Note that the bits we use in a PTE for representing a swap entry - * must not include the _PAGE_PRESENT bit, or the _PAGE_HASHPTE bit - * (if used). -- paulus + * must not include the _PAGE_PRESENT bit, the _PAGE_FILE bit, or the + *_PAGE_HASHPTE bit (if used). -- paulus */ -#define __swp_type(entry) ((entry).val & 0x3f) -#define __swp_offset(entry) ((entry).val >> 6) -#define __swp_entry(type, offset) ((swp_entry_t) { (type) | ((offset) << 6) }) -#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) >> 2 }) -#define __swp_entry_to_pte(x) ((pte_t) { (x).val << 2 }) +#define __swp_type(entry) ((entry).val & 0x1f) +#define __swp_offset(entry) ((entry).val >> 5) +#define __swp_entry(type, offset) ((swp_entry_t) { (type) | ((offset) << 5) }) +#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) >> 3 }) +#define __swp_entry_to_pte(x) ((pte_t) { (x).val << 3 }) + +/* Encode and decode a nonlinear file mapping entry */ +#define PTE_FILE_MAX_BITS 29 +#define pte_to_pgoff(pte) (pte_val(pte) >> 3) +#define pgoff_to_pte(off) ((pte_t) { ((off) << 3) | _PAGE_FILE }) /* CONFIG_APUS */ /* For virtual address to physical address conversion */ diff --git a/include/asm-ppc/pmac_feature.h b/include/asm-ppc/pmac_feature.h index 712aea7aeef3..eace23e7d6ca 100644 --- a/include/asm-ppc/pmac_feature.h +++ b/include/asm-ppc/pmac_feature.h @@ -31,10 +31,16 @@ #ifndef __PPC_ASM_PMAC_FEATURE_H #define __PPC_ASM_PMAC_FEATURE_H +#include <asm/macio_asic.h> + /* * Known Mac motherboard models * * Please, report any error here to benh@kernel.crashing.org, thanks ! + * + * Note that I don't fully maintain this list for Core99 & MacRISC2 + * and I'm considering removing all NewWorld entries from it and + * entirely rely on the model string. */ /* PowerSurge are the first generation of PCI Pmacs. This include @@ -85,10 +91,16 @@ #define PMAC_TYPE_QUICKSILVER 0x45 /* QuickSilver G4s */ #define PMAC_TYPE_PISMO 0x46 /* Pismo PowerBook */ #define PMAC_TYPE_TITANIUM 0x47 /* Titanium PowerBook */ -#define PMAC_TYPE_TITANIUM2 0x48 /* Titanium II PowerBook */ -#define PMAC_TYPE_TITANIUM3 0x49 /* Titanium III PowerBook (with L3) */ +#define PMAC_TYPE_TITANIUM2 0x48 /* Titanium II PowerBook (no L3, M6) */ +#define PMAC_TYPE_TITANIUM3 0x49 /* Titanium III PowerBook (with L3 & M7) */ +#define PMAC_TYPE_TITANIUM4 0x50 /* Titanium IV PowerBook (with L3 & M9) */ +#define PMAC_TYPE_EMAC 0x50 /* eMac */ #define PMAC_TYPE_UNKNOWN_CORE99 0x5f +/* MacRisc2 with UniNorth 2.0 */ +#define PMAC_TYPE_RACKMAC 0x80 /* XServe */ +#define PMAC_TYPE_WINDTUNNEL 0x81 + /* MacRISC2 machines based on the Pangea chipset */ #define PMAC_TYPE_PANGEA_IMAC 0x100 /* Flower Power iMac */ @@ -96,12 +108,18 @@ #define PMAC_TYPE_FLAT_PANEL_IMAC 0x102 /* Flat panel iMac */ #define PMAC_TYPE_UNKNOWN_PANGEA 0x10f +/* MacRISC2 machines based on the Intrepid chipset + */ +#define PMAC_TYPE_UNKNOWN_INTREPID 0x11f /* Generic */ + /* * Motherboard flags */ #define PMAC_MB_CAN_SLEEP 0x00000001 #define PMAC_MB_HAS_FW_POWER 0x00000002 +#define PMAC_MB_OLD_CORE99 0x00000004 +#define PMAC_MB_MOBILE 0x00000008 /* * Feature calls supported on pmac @@ -251,5 +269,60 @@ extern void pmac_feature_init(void); #define PMAC_FTR_DEF(x) ((_MACH_Pmac << 16) | (x)) + +/* + * The part below is for use by macio_asic.c only, do not rely + * on the data structures or constants below in a normal driver + * + */ + +#define MAX_MACIO_CHIPS 2 + +enum { + macio_unknown = 0, + macio_grand_central, + macio_ohare, + macio_ohareII, + macio_heathrow, + macio_gatwick, + macio_paddington, + macio_keylargo, + macio_pangea, + macio_intrepid, +}; + +struct macio_chip +{ + struct device_node *of_node; + int type; + const char *name; + int rev; + volatile u32 *base; + unsigned long flags; + + /* For use by macio_asic PCI driver */ + struct macio_bus lbus; +}; + +extern struct macio_chip macio_chips[MAX_MACIO_CHIPS]; + +#define MACIO_FLAG_SCCA_ON 0x00000001 +#define MACIO_FLAG_SCCB_ON 0x00000002 +#define MACIO_FLAG_SCC_LOCKED 0x00000004 +#define MACIO_FLAG_AIRPORT_ON 0x00000010 +#define MACIO_FLAG_FW_SUPPORTED 0x00000020 + +extern struct macio_chip* macio_find(struct device_node* child, int type); + +#define MACIO_FCR32(macio, r) ((macio)->base + ((r) >> 2)) +#define MACIO_FCR8(macio, r) (((volatile u8*)((macio)->base)) + (r)) + +#define MACIO_IN32(r) (in_le32(MACIO_FCR32(macio,r))) +#define MACIO_OUT32(r,v) (out_le32(MACIO_FCR32(macio,r), (v))) +#define MACIO_BIS(r,v) (MACIO_OUT32((r), MACIO_IN32(r) | (v))) +#define MACIO_BIC(r,v) (MACIO_OUT32((r), MACIO_IN32(r) & ~(v))) +#define MACIO_IN8(r) (in_8(MACIO_FCR8(macio,r))) +#define MACIO_OUT8(r,v) (out_8(MACIO_FCR8(macio,r), (v))) + #endif /* __PPC_ASM_PMAC_FEATURE_H */ #endif /* __KERNEL__ */ diff --git a/include/asm-ppc/uninorth.h b/include/asm-ppc/uninorth.h index b8e30135ea41..1d18c7983cd3 100644 --- a/include/asm-ppc/uninorth.h +++ b/include/asm-ppc/uninorth.h @@ -28,6 +28,7 @@ #define UNI_N_CFG_GART_INVAL 0x00000001 #define UNI_N_CFG_GART_ENABLE 0x00000100 #define UNI_N_CFG_GART_2xRESET 0x00010000 +#define UNI_N_CFG_GART_DISSBADET 0x00020000 /* My understanding of UniNorth AGP as of UniNorth rev 1.0x, * revision 1.5 (x4 AGP) may need further changes. @@ -94,6 +95,7 @@ #define UNI_N_CLOCK_CNTL_PCI 0x00000001 /* PCI2 clock control */ #define UNI_N_CLOCK_CNTL_GMAC 0x00000002 /* GMAC clock control */ #define UNI_N_CLOCK_CNTL_FW 0x00000004 /* FireWire clock control */ +#define UNI_N_CLOCK_CNTL_ATA100 0x00000010 /* ATA-100 clock control (U2) */ /* Power Management control */ #define UNI_N_POWER_MGT 0x0030 diff --git a/include/asm-s390/bitops.h b/include/asm-s390/bitops.h index c0ffd0a5501b..e680985331bd 100644 --- a/include/asm-s390/bitops.h +++ b/include/asm-s390/bitops.h @@ -51,7 +51,7 @@ extern const char _sb_findmap[]; #ifdef CONFIG_SMP /* - * SMP save set_bit routine based on compare and swap (CS) + * SMP safe set_bit routine based on compare and swap (CS) */ static inline void set_bit_cs(int nr, volatile unsigned long *ptr) { @@ -76,7 +76,7 @@ static inline void set_bit_cs(int nr, volatile unsigned long *ptr) } /* - * SMP save clear_bit routine based on compare and swap (CS) + * SMP safe clear_bit routine based on compare and swap (CS) */ static inline void clear_bit_cs(int nr, volatile unsigned long *ptr) { @@ -101,7 +101,7 @@ static inline void clear_bit_cs(int nr, volatile unsigned long *ptr) } /* - * SMP save change_bit routine based on compare and swap (CS) + * SMP safe change_bit routine based on compare and swap (CS) */ static inline void change_bit_cs(int nr, volatile unsigned long *ptr) { @@ -126,7 +126,7 @@ static inline void change_bit_cs(int nr, volatile unsigned long *ptr) } /* - * SMP save test_and_set_bit routine based on compare and swap (CS) + * SMP safe test_and_set_bit routine based on compare and swap (CS) */ static inline int test_and_set_bit_cs(int nr, volatile unsigned long *ptr) @@ -153,7 +153,7 @@ test_and_set_bit_cs(int nr, volatile unsigned long *ptr) } /* - * SMP save test_and_clear_bit routine based on compare and swap (CS) + * SMP safe test_and_clear_bit routine based on compare and swap (CS) */ static inline int test_and_clear_bit_cs(int nr, volatile unsigned long *ptr) @@ -180,7 +180,7 @@ test_and_clear_bit_cs(int nr, volatile unsigned long *ptr) } /* - * SMP save test_and_change_bit routine based on compare and swap (CS) + * SMP safe test_and_change_bit routine based on compare and swap (CS) */ static inline int test_and_change_bit_cs(int nr, volatile unsigned long *ptr) diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index 02bdf9db2ae2..c9716b27c04e 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h @@ -254,6 +254,7 @@ struct mddev_s struct mdk_personality_s { char *name; + struct module *owner; int (*make_request)(request_queue_t *q, struct bio *bio); int (*run)(mddev_t *mddev); int (*stop)(mddev_t *mddev); diff --git a/include/pcmcia/driver_ops.h b/include/pcmcia/driver_ops.h index 7aae5e1de4c3..eb094dd03fca 100644 --- a/include/pcmcia/driver_ops.h +++ b/include/pcmcia/driver_ops.h @@ -1,73 +1,2 @@ -/* - * driver_ops.h 1.15 2000/06/12 21:55:40 - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License - * at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" - * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - * the License for the specific language governing rights and - * limitations under the License. - * - * The initial developer of the original code is David A. Hinds - * <dahinds@users.sourceforge.net>. Portions created by David A. Hinds - * are Copyright (C) 1999 David A. Hinds. All Rights Reserved. - * - * Alternatively, the contents of this file may be used under the - * terms of the GNU General Public License version 2 (the "GPL"), in which - * case the provisions of the GPL are applicable instead of the - * above. If you wish to allow the use of your version of this file - * only under the terms of the GPL and not to allow others to use - * your version of this file under the MPL, indicate your decision by - * deleting the provisions above and replace them with the notice and - * other provisions required by the GPL. If you do not delete the - * provisions above, a recipient may use your version of this file - * under either the MPL or the GPL. - */ - -#ifndef _LINUX_DRIVER_OPS_H -#define _LINUX_DRIVER_OPS_H - -#ifndef DEV_NAME_LEN -#define DEV_NAME_LEN 32 -#endif - -#ifdef __KERNEL__ - -typedef struct dev_node_t { - char dev_name[DEV_NAME_LEN]; - u_short major, minor; - struct dev_node_t *next; -} dev_node_t; - -typedef struct dev_locator_t { - enum { LOC_ISA, LOC_PCI } bus; - union { - struct { - u_short io_base_1, io_base_2; - u_long mem_base; - u_char irq, dma; - } isa; - struct { - u_char bus; - u_char devfn; - } pci; - } b; -} dev_locator_t; - -typedef struct driver_operations { - char *name; - dev_node_t *(*attach) (dev_locator_t *loc); - void (*suspend) (dev_node_t *dev); - void (*resume) (dev_node_t *dev); - void (*detach) (dev_node_t *dev); -} driver_operations; - -int register_driver(struct driver_operations *ops); -void unregister_driver(struct driver_operations *ops); - -#endif /* __KERNEL__ */ - -#endif /* _LINUX_DRIVER_OPS_H */ +/* now empty */ +#warning please remove the reference to this file diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h index 5d51a7ebaa9e..dd4700b8aea5 100644 --- a/include/pcmcia/ds.h +++ b/include/pcmcia/ds.h @@ -30,9 +30,9 @@ #ifndef _LINUX_DS_H #define _LINUX_DS_H -#include <pcmcia/driver_ops.h> #include <pcmcia/bulkmem.h> #include <linux/device.h> +#include <pcmcia/cs_types.h> typedef struct tuple_parse_t { tuple_t tuple; @@ -108,6 +108,12 @@ typedef union ds_ioctl_arg_t { #ifdef __KERNEL__ +typedef struct dev_node_t { + char dev_name[DEV_NAME_LEN]; + u_short major, minor; + struct dev_node_t *next; +} dev_node_t; + typedef struct dev_link_t { dev_node_t *dev; u_int state, open; @@ -144,7 +150,7 @@ int unregister_pccard_driver(dev_info_t *dev_info); extern struct bus_type pcmcia_bus_type; struct pcmcia_driver { - int use_count, status; + int use_count; dev_link_t *(*attach)(void); void (*detach)(dev_link_t *); struct module *owner; |
