From: Ralf Baechle Update for the AMD Alchemy SOCs, platforms based on those and drivers specific to the SOC and platforms. Signed-off-by: Andrew Morton --- 25-akpm/arch/mips/Kconfig | 25 25-akpm/arch/mips/au1000/common/au1xxx_irqmap.c | 1 25-akpm/arch/mips/au1000/common/cputable.c | 2 25-akpm/arch/mips/au1000/common/dbdma.c | 8 25-akpm/arch/mips/au1000/common/dma.c | 5 25-akpm/arch/mips/au1000/common/irq.c | 2 25-akpm/arch/mips/au1000/common/pci.c | 9 25-akpm/arch/mips/au1000/common/platform.c | 1 25-akpm/arch/mips/au1000/common/power.c | 2 25-akpm/arch/mips/au1000/common/sleeper.S | 1 25-akpm/arch/mips/au1000/common/time.c | 9 25-akpm/arch/mips/au1000/csb250/board_setup.c | 11 25-akpm/arch/mips/au1000/db1x00/mirage_ts.c | 6 25-akpm/arch/mips/au1000/hydrogen3/board_setup.c | 4 25-akpm/arch/mips/au1000/mtx-1/board_setup.c | 12 25-akpm/arch/mips/au1000/mtx-1/init.c | 23 25-akpm/arch/mips/au1000/mtx-1/irqmap.c | 12 25-akpm/arch/mips/au1000/pb1000/board_setup.c | 12 25-akpm/arch/mips/au1000/pb1000/irqmap.c | 2 25-akpm/arch/mips/au1000/pb1100/board_setup.c | 8 25-akpm/arch/mips/au1000/pb1500/board_setup.c | 8 25-akpm/arch/mips/au1000/pb1550/board_setup.c | 1 25-akpm/arch/mips/configs/db1000_defconfig | 40 25-akpm/arch/mips/configs/db1100_defconfig | 40 25-akpm/arch/mips/configs/db1500_defconfig | 45 25-akpm/arch/mips/configs/db1550_defconfig | 42 25-akpm/arch/mips/configs/pb1100_defconfig | 43 25-akpm/arch/mips/configs/pb1500_defconfig | 41 25-akpm/arch/mips/configs/pb1550_defconfig | 41 25-akpm/arch/mips/pci/fixup-au1000.c | 13 25-akpm/drivers/pcmcia/Kconfig | 4 25-akpm/drivers/pcmcia/Makefile | 11 25-akpm/drivers/pcmcia/au1000_db1x00.c | 288 ++ 25-akpm/drivers/pcmcia/au1000_generic.c | 942 +++----- 25-akpm/drivers/pcmcia/au1000_generic.h | 150 + 25-akpm/drivers/pcmcia/au1000_pb1x00.c | 43 25-akpm/drivers/pcmcia/au1000_xxs1500.c | 191 + 25-akpm/drivers/usb/host/ohci-au1xxx.c | 362 +++ 25-akpm/drivers/usb/host/ohci-hcd.c | 5 25-akpm/drivers/video/Kconfig | 36 25-akpm/drivers/video/Makefile | 1 25-akpm/drivers/video/au1100fb.c | 676 ++++++ 25-akpm/drivers/video/au1100fb.h | 381 +++ 25-akpm/include/asm-mips/mach-au1x00/au1000.h | 2 25-akpm/include/asm-mips/mach-au1x00/au1xxx_dbdma.h | 2 25-akpm/include/asm-mips/mach-au1x00/au1xxx_psc.h | 349 +++ 25-akpm/include/asm-mips/mach-db1x00/db1x00.h | 3 25-akpm/include/asm-mips/mach-pb1x00/pb1550.h | 12 25-akpm/include/linux/ac97_codec.h | 33 25-akpm/sound/Kconfig | 2 25-akpm/sound/Makefile | 2 25-akpm/sound/mips/Kconfig | 15 25-akpm/sound/mips/Makefile | 8 25-akpm/sound/mips/au1x00.c | 686 ++++++ 25-akpm/sound/oss/Kconfig | 8 25-akpm/sound/oss/Makefile | 2 25-akpm/sound/oss/ac97_codec.c | 1 25-akpm/sound/oss/au1000.c | 205 - 25-akpm/sound/oss/au1550_ac97.c | 2119 ++++++++++++++++++++ 59 files changed, 6166 insertions(+), 842 deletions(-) diff -puN arch/mips/au1000/common/au1xxx_irqmap.c~mips-amd-alchemy-update arch/mips/au1000/common/au1xxx_irqmap.c --- 25/arch/mips/au1000/common/au1xxx_irqmap.c~mips-amd-alchemy-update 2005-01-29 11:26:00.174721360 -0800 +++ 25-akpm/arch/mips/au1000/common/au1xxx_irqmap.c 2005-01-29 11:26:00.248710112 -0800 @@ -25,6 +25,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include #include #include diff -puN arch/mips/au1000/common/cputable.c~mips-amd-alchemy-update arch/mips/au1000/common/cputable.c --- 25/arch/mips/au1000/common/cputable.c~mips-amd-alchemy-update 2005-01-29 11:26:00.176721056 -0800 +++ 25-akpm/arch/mips/au1000/common/cputable.c 2005-01-29 11:26:00.248710112 -0800 @@ -11,8 +11,6 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ - -#include #include #include #include diff -puN arch/mips/au1000/common/dbdma.c~mips-amd-alchemy-update arch/mips/au1000/common/dbdma.c --- 25/arch/mips/au1000/common/dbdma.c~mips-amd-alchemy-update 2005-01-29 11:26:00.177720904 -0800 +++ 25-akpm/arch/mips/au1000/common/dbdma.c 2005-01-29 11:26:00.249709960 -0800 @@ -29,7 +29,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. * */ - +#include #include #include #include @@ -55,7 +55,7 @@ * functions. The drivers allocate the data buffers and assign them * to the descriptors. */ -static spinlock_t au1xxx_dbdma_spin_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(au1xxx_dbdma_spin_lock); /* I couldn't find a macro that did this...... */ @@ -370,7 +370,7 @@ au1xxx_dbdma_ring_alloc(u32 chanid, int * and if we try that first we are likely to not waste larger * slabs of memory. */ - desc_base = kmalloc(entries * sizeof(au1x_ddma_desc_t), GFP_KERNEL); + desc_base = (u32)kmalloc(entries * sizeof(au1x_ddma_desc_t), GFP_KERNEL); if (desc_base == 0) return 0; @@ -381,7 +381,7 @@ au1xxx_dbdma_ring_alloc(u32 chanid, int kfree((const void *)desc_base); i = entries * sizeof(au1x_ddma_desc_t); i += (sizeof(au1x_ddma_desc_t) - 1); - if ((desc_base = kmalloc(i, GFP_KERNEL)) == 0) + if ((desc_base = (u32)kmalloc(i, GFP_KERNEL)) == 0) return 0; desc_base = ALIGN_ADDR(desc_base, sizeof(au1x_ddma_desc_t)); diff -puN arch/mips/au1000/common/dma.c~mips-amd-alchemy-update arch/mips/au1000/common/dma.c --- 25/arch/mips/au1000/common/dma.c~mips-amd-alchemy-update 2005-01-29 11:26:00.179720600 -0800 +++ 25-akpm/arch/mips/au1000/common/dma.c 2005-01-29 11:26:00.249709960 -0800 @@ -7,6 +7,7 @@ * Copyright 2000 MontaVista Software Inc. * Author: MontaVista Software, Inc. * stevel@mvista.com or source@mvista.com + * Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org) * * 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 @@ -29,7 +30,7 @@ * 675 Mass Ave, Cambridge, MA 02139, USA. * */ - +#include #include #include #include @@ -61,7 +62,7 @@ */ -spinlock_t au1000_dma_spin_lock = SPIN_LOCK_UNLOCKED; +DEFINE_SPINLOCK(au1000_dma_spin_lock); struct dma_chan au1000_dma_table[NUM_AU1000_DMA_CHANNELS] = { {.dev_id = -1,}, diff -puN arch/mips/au1000/common/irq.c~mips-amd-alchemy-update arch/mips/au1000/common/irq.c --- 25/arch/mips/au1000/common/irq.c~mips-amd-alchemy-update 2005-01-29 11:26:00.180720448 -0800 +++ 25-akpm/arch/mips/au1000/common/irq.c 2005-01-29 11:26:00.250709808 -0800 @@ -86,7 +86,7 @@ void (*board_init_irq)(void); extern void counter0_irq(int irq, void *dev_id, struct pt_regs *regs); #endif -static spinlock_t irq_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(irq_lock); static unsigned int startup_irq(unsigned int irq_nr) diff -puN arch/mips/au1000/common/pci.c~mips-amd-alchemy-update arch/mips/au1000/common/pci.c --- 25/arch/mips/au1000/common/pci.c~mips-amd-alchemy-update 2005-01-29 11:26:00.182720144 -0800 +++ 25-akpm/arch/mips/au1000/common/pci.c 2005-01-29 11:26:00.250709808 -0800 @@ -78,10 +78,13 @@ static int __init au1x_pci_setup(void) #ifdef CONFIG_DMA_NONCOHERENT /* - * Set the NC bit in controller for pre-AC silicon + * Set the NC bit in controller for Au1500 pre-AC silicon */ - au_writel( 1<<16 | au_readl(Au1500_PCI_CFG), Au1500_PCI_CFG); - printk("Non-coherent PCI accesses enabled\n"); + u32 prid = read_c0_prid(); + if ( (prid & 0xFF000000) == 0x01000000 && prid < 0x01030202) { + au_writel( 1<<16 | au_readl(Au1500_PCI_CFG), Au1500_PCI_CFG); + printk("Non-coherent PCI accesses enabled\n"); + } #endif set_io_port_base(virt_io_addr); diff -puN arch/mips/au1000/common/platform.c~mips-amd-alchemy-update arch/mips/au1000/common/platform.c --- 25/arch/mips/au1000/common/platform.c~mips-amd-alchemy-update 2005-01-29 11:26:00.183719992 -0800 +++ 25-akpm/arch/mips/au1000/common/platform.c 2005-01-29 11:26:00.251709656 -0800 @@ -7,7 +7,6 @@ * License version 2. This program is licensed "as is" without any * warranty of any kind, whether express or implied. */ -#include #include #include #include diff -puN arch/mips/au1000/common/power.c~mips-amd-alchemy-update arch/mips/au1000/common/power.c --- 25/arch/mips/au1000/common/power.c~mips-amd-alchemy-update 2005-01-29 11:26:00.185719688 -0800 +++ 25-akpm/arch/mips/au1000/common/power.c 2005-01-29 11:26:00.251709656 -0800 @@ -66,7 +66,7 @@ extern void local_enable_irq(unsigned in #define ACPI_SLEEP 21 -static spinlock_t pm_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(pm_lock); /* We need to save/restore a bunch of core registers that are * either volatile or reset to some state across a processor sleep. diff -puN arch/mips/au1000/common/sleeper.S~mips-amd-alchemy-update arch/mips/au1000/common/sleeper.S --- 25/arch/mips/au1000/common/sleeper.S~mips-amd-alchemy-update 2005-01-29 11:26:00.186719536 -0800 +++ 25-akpm/arch/mips/au1000/common/sleeper.S 2005-01-29 11:26:00.252709504 -0800 @@ -9,7 +9,6 @@ * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ -#include #include #include #include diff -puN arch/mips/au1000/common/time.c~mips-amd-alchemy-update arch/mips/au1000/common/time.c --- 25/arch/mips/au1000/common/time.c~mips-amd-alchemy-update 2005-01-29 11:26:00.187719384 -0800 +++ 25-akpm/arch/mips/au1000/common/time.c 2005-01-29 11:26:00.252709504 -0800 @@ -69,7 +69,7 @@ extern void startup_match20_interrupt(vo static unsigned long last_pc0, last_match20; #endif -static spinlock_t time_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(time_lock); static inline void ack_r4ktimer(unsigned long newval) { @@ -304,8 +304,7 @@ unsigned long cal_r4koff(void) /* This is for machines which generate the exact clock. */ #define USECS_PER_JIFFY (1000000/HZ) -#define USECS_PER_JIFFY_FRAC (0x100000000*1000000/HZ&0xffffffff) - +#define USECS_PER_JIFFY_FRAC (0x100000000LL*1000000/HZ&0xffffffff) static unsigned long div64_32(unsigned long v1, unsigned long v2, unsigned long v3) @@ -407,10 +406,6 @@ void au1xxx_timer_setup(struct irqaction r4k_cur = (read_c0_count() + r4k_offset); write_c0_compare(r4k_cur); - /* no RTC on the pb1000 */ - xtime.tv_sec = 0; - //xtime.tv_usec = 0; - #ifdef CONFIG_PM /* * setup counter 0, since it keeps ticking after a diff -puN arch/mips/au1000/csb250/board_setup.c~mips-amd-alchemy-update arch/mips/au1000/csb250/board_setup.c --- 25/arch/mips/au1000/csb250/board_setup.c~mips-amd-alchemy-update 2005-01-29 11:26:00.189719080 -0800 +++ 25-akpm/arch/mips/au1000/csb250/board_setup.c 2005-01-29 11:26:00.253709352 -0800 @@ -45,16 +45,6 @@ #include #include -#ifdef CONFIG_USB_OHCI -// Enable the workaround for the OHCI DoneHead -// register corruption problem. -#define CONFIG_AU1000_OHCI_FIX -#endif - -#ifdef CONFIG_RTC -extern struct rtc_ops csb250_rtc_ops; -#endif - extern int (*board_pci_idsel)(unsigned int devsel, int assert); int csb250_pci_idsel(unsigned int devsel, int assert); @@ -203,7 +193,6 @@ void __init board_setup(void) au_writel(au_readl(SYS_POWERCTRL) | (0x3 << 5), SYS_POWERCTRL); #ifdef CONFIG_RTC - rtc_ops = &csb250_rtc_ops; // Enable the RTC if not already enabled if (!(au_readl(0xac000028) & 0x20)) { printk("enabling clock ...\n"); diff -puN arch/mips/au1000/db1x00/mirage_ts.c~mips-amd-alchemy-update arch/mips/au1000/db1x00/mirage_ts.c --- 25/arch/mips/au1000/db1x00/mirage_ts.c~mips-amd-alchemy-update 2005-01-29 11:26:00.190718928 -0800 +++ 25-akpm/arch/mips/au1000/db1x00/mirage_ts.c 2005-01-29 11:26:00.254709200 -0800 @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -147,10 +148,7 @@ static int ts_thread(void *id) ts = wm97xx_ts_get_handle(0); /* proceed only after everybody is ready */ - while ( ! wm97xx_ts_ready(ts) ) { - /* give a little time for initializations to complete */ - interruptible_sleep_on_timeout(&pendown_wait, HZ / 4); - } + wait_event_timeout(pendown_wait, wm97xx_ts_ready(ts), HZ/4); /* board-specific calibration */ wm97xx_ts_set_cal(ts, diff -puN arch/mips/au1000/hydrogen3/board_setup.c~mips-amd-alchemy-update arch/mips/au1000/hydrogen3/board_setup.c --- 25/arch/mips/au1000/hydrogen3/board_setup.c~mips-amd-alchemy-update 2005-01-29 11:26:00.191718776 -0800 +++ 25-akpm/arch/mips/au1000/hydrogen3/board_setup.c 2005-01-29 11:26:00.255709048 -0800 @@ -45,8 +45,6 @@ #include #include -extern struct rtc_ops no_rtc_ops; - void board_reset (void) { } @@ -55,8 +53,6 @@ void __init board_setup(void) { u32 pin_func; - rtc_ops = &no_rtc_ops; - #ifdef CONFIG_AU1X00_USB_DEVICE // 2nd USB port is USB device pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x8000); diff -puN arch/mips/au1000/mtx-1/board_setup.c~mips-amd-alchemy-update arch/mips/au1000/mtx-1/board_setup.c --- 25/arch/mips/au1000/mtx-1/board_setup.c~mips-amd-alchemy-update 2005-01-29 11:26:00.193718472 -0800 +++ 25-akpm/arch/mips/au1000/mtx-1/board_setup.c 2005-01-29 11:26:00.256708896 -0800 @@ -34,24 +34,24 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include -#include +#include -extern struct rtc_ops no_rtc_ops; +void board_reset (void) +{ + /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */ + au_writel(0x00000000, 0xAE00001C); +} void __init board_setup(void) { - rtc_ops = &no_rtc_ops; - #if defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE) #ifdef CONFIG_AU1X00_USB_DEVICE // 2nd USB port is USB device diff -puN arch/mips/au1000/mtx-1/init.c~mips-amd-alchemy-update arch/mips/au1000/mtx-1/init.c --- 25/arch/mips/au1000/mtx-1/init.c~mips-amd-alchemy-update 2005-01-29 11:26:00.194718320 -0800 +++ 25-akpm/arch/mips/au1000/mtx-1/init.c 2005-01-29 11:26:00.256708896 -0800 @@ -28,17 +28,15 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ - +#include +#include +#include #include #include #include #include #include #include -#include -#include -#include -#include int prom_argc; char **prom_argv, **prom_envp; @@ -50,25 +48,24 @@ const char *get_system_type(void) return "MTX-1"; } -int __init prom_init(int argc, char **argv, char **envp, int *prom_vec) +void __init prom_init(void) { unsigned char *memsize_str; unsigned long memsize; - prom_argc = argc; - prom_argv = argv; - prom_envp = envp; + prom_argc = fw_arg0; + prom_argv = (char **) fw_arg1; + prom_envp = (char **) fw_arg2; mips_machgroup = MACH_GROUP_ALCHEMY; mips_machtype = MACH_MTX1; /* set the platform # */ + prom_init_cmdline(); memsize_str = prom_getenv("memsize"); - if (!memsize_str) { + if (!memsize_str) memsize = 0x04000000; - } else { + else memsize = simple_strtol(memsize_str, NULL, 0); - } add_memory_region(0, memsize, BOOT_MEM_RAM); - return 0; } diff -puN arch/mips/au1000/mtx-1/irqmap.c~mips-amd-alchemy-update arch/mips/au1000/mtx-1/irqmap.c --- 25/arch/mips/au1000/mtx-1/irqmap.c~mips-amd-alchemy-update 2005-01-29 11:26:00.195718168 -0800 +++ 25-akpm/arch/mips/au1000/mtx-1/irqmap.c 2005-01-29 11:26:00.257708744 -0800 @@ -45,12 +45,14 @@ #include #include #include -#include +#include -/* Need to define this. -*/ au1xxx_irq_map_t au1xxx_irq_map[] = { - { 0. 0. 0} + { AU1500_GPIO_204, INTC_INT_HIGH_LEVEL, 0}, + { AU1500_GPIO_201, INTC_INT_LOW_LEVEL, 0 }, + { AU1500_GPIO_202, INTC_INT_LOW_LEVEL, 0 }, + { AU1500_GPIO_203, INTC_INT_LOW_LEVEL, 0 }, + { AU1500_GPIO_205, INTC_INT_LOW_LEVEL, 0 }, }; -int au1xxx_nr_irqs = 0; +int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t); diff -puN arch/mips/au1000/pb1000/board_setup.c~mips-amd-alchemy-update arch/mips/au1000/pb1000/board_setup.c --- 25/arch/mips/au1000/pb1000/board_setup.c~mips-amd-alchemy-update 2005-01-29 11:26:00.196718016 -0800 +++ 25-akpm/arch/mips/au1000/pb1000/board_setup.c 2005-01-29 11:26:00.258708592 -0800 @@ -37,16 +37,8 @@ #include #include #include -#include -#include - -#ifdef CONFIG_USB_OHCI -// Enable the workaround for the OHCI DoneHead -// register corruption problem. -#define CONFIG_AU1000_OHCI_FIX - ^^^^^^^^^^^^^^^^^^^^^^ - !!! I shall not define symbols starting with CONFIG_ !!! -#endif +#include +#include void board_reset (void) { diff -puN arch/mips/au1000/pb1000/irqmap.c~mips-amd-alchemy-update arch/mips/au1000/pb1000/irqmap.c --- 25/arch/mips/au1000/pb1000/irqmap.c~mips-amd-alchemy-update 2005-01-29 11:26:00.198717712 -0800 +++ 25-akpm/arch/mips/au1000/pb1000/irqmap.c 2005-01-29 11:26:00.258708592 -0800 @@ -45,7 +45,7 @@ #include #include #include -#include +#include au1xxx_irq_map_t au1xxx_irq_map[] = { { AU1000_GPIO_15, INTC_INT_LOW_LEVEL, 0 }, diff -puN arch/mips/au1000/pb1100/board_setup.c~mips-amd-alchemy-update arch/mips/au1000/pb1100/board_setup.c --- 25/arch/mips/au1000/pb1100/board_setup.c~mips-amd-alchemy-update 2005-01-29 11:26:00.199717560 -0800 +++ 25-akpm/arch/mips/au1000/pb1100/board_setup.c 2005-01-29 11:26:00.259708440 -0800 @@ -40,14 +40,6 @@ #include #include -#ifdef CONFIG_USB_OHCI -// Enable the workaround for the OHCI DoneHead -// register corruption problem. -#define CONFIG_AU1000_OHCI_FIX - ^^^^^^^^^^^^^^^^^^^^^^ - !!! I shall not define symbols starting with CONFIG_ !!! -#endif - void board_reset (void) { /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */ diff -puN arch/mips/au1000/pb1500/board_setup.c~mips-amd-alchemy-update arch/mips/au1000/pb1500/board_setup.c --- 25/arch/mips/au1000/pb1500/board_setup.c~mips-amd-alchemy-update 2005-01-29 11:26:00.200717408 -0800 +++ 25-akpm/arch/mips/au1000/pb1500/board_setup.c 2005-01-29 11:26:00.259708440 -0800 @@ -40,14 +40,6 @@ #include #include -#ifdef CONFIG_USB_OHCI -// Enable the workaround for the OHCI DoneHead -// register corruption problem. -#define CONFIG_AU1000_OHCI_FIX - ^^^^^^^^^^^^^^^^^^^^^^ - !!! I shall not define symbols starting with CONFIG_ !!! -#endif - void board_reset (void) { /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */ diff -puN arch/mips/au1000/pb1550/board_setup.c~mips-amd-alchemy-update arch/mips/au1000/pb1550/board_setup.c --- 25/arch/mips/au1000/pb1550/board_setup.c~mips-amd-alchemy-update 2005-01-29 11:26:00.202717104 -0800 +++ 25-akpm/arch/mips/au1000/pb1550/board_setup.c 2005-01-29 11:26:00.260708288 -0800 @@ -27,7 +27,6 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include diff -puN arch/mips/configs/db1000_defconfig~mips-amd-alchemy-update arch/mips/configs/db1000_defconfig --- 25/arch/mips/configs/db1000_defconfig~mips-amd-alchemy-update 2005-01-29 11:26:00.203716952 -0800 +++ 25-akpm/arch/mips/configs/db1000_defconfig 2005-01-29 11:26:00.282704944 -0800 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc2 -# Sun Nov 21 14:11:56 2004 +# Linux kernel version: 2.6.11-rc2 +# Wed Jan 26 02:49:01 2005 # CONFIG_MIPS=y # CONFIG_MIPS64 is not set @@ -101,11 +101,11 @@ CONFIG_MIPS_DB1000=y # CONFIG_SNI_RM200_PCI is not set # CONFIG_TOSHIBA_RBTX4927 is not set CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_HAVE_DEC_LOCK=y CONFIG_DMA_NONCOHERENT=y CONFIG_CPU_LITTLE_ENDIAN=y CONFIG_MIPS_L1_CACHE_SHIFT=5 -# CONFIG_FB is not set # # CPU selection @@ -132,7 +132,6 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y -# CONFIG_VTAG_ICACHE is not set CONFIG_64BIT_PHYS_ADDR=y # CONFIG_CPU_ADVANCED is not set CONFIG_CPU_HAS_LLSC=y @@ -151,7 +150,6 @@ CONFIG_MMU=y # CONFIG_PCCARD=m # CONFIG_PCMCIA_DEBUG is not set -# CONFIG_PCMCIA_OBSOLETE is not set CONFIG_PCMCIA=m # @@ -200,10 +198,12 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_INITRAMFS_SOURCE="" # CONFIG_LBD is not set CONFIG_CDROM_PKTCDVD=m @@ -217,6 +217,7 @@ CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +CONFIG_ATA_OVER_ETH=m # # ATA/ATAPI/MFM/RLL support @@ -293,8 +294,6 @@ CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_QUEUE is not set # CONFIG_IP_NF_IPTABLES is not set # CONFIG_IP_NF_ARPTABLES is not set -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set CONFIG_XFRM=y CONFIG_XFRM_USER=m @@ -426,6 +425,7 @@ CONFIG_SERIO=y # CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_LIBPS2 is not set CONFIG_SERIO_RAW=m # @@ -479,7 +479,6 @@ CONFIG_RTC=y # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # @@ -515,12 +514,14 @@ CONFIG_SYNCLINK_CS=m # # Graphics support # +# CONFIG_FB is not set # # Console display driver support # # CONFIG_VGA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound @@ -534,11 +535,25 @@ CONFIG_DUMMY_CONSOLE=y # CONFIG_USB_ARCH_HAS_OHCI is not set # +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -686,6 +701,11 @@ CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_UTF8 is not set # +# Profiling support +# +# CONFIG_PROFILING is not set + +# # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set @@ -728,6 +748,10 @@ CONFIG_CRYPTO_CRC32C=m # CONFIG_CRYPTO_TEST is not set # +# Hardware crypto devices +# + +# # Library routines # CONFIG_CRC_CCITT=m diff -puN arch/mips/configs/db1100_defconfig~mips-amd-alchemy-update arch/mips/configs/db1100_defconfig --- 25/arch/mips/configs/db1100_defconfig~mips-amd-alchemy-update 2005-01-29 11:26:00.204716800 -0800 +++ 25-akpm/arch/mips/configs/db1100_defconfig 2005-01-29 11:26:00.280705248 -0800 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc2 -# Sun Nov 21 14:11:56 2004 +# Linux kernel version: 2.6.11-rc2 +# Wed Jan 26 02:49:01 2005 # CONFIG_MIPS=y # CONFIG_MIPS64 is not set @@ -101,11 +101,11 @@ CONFIG_MIPS_DB1100=y # CONFIG_SNI_RM200_PCI is not set # CONFIG_TOSHIBA_RBTX4927 is not set CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_HAVE_DEC_LOCK=y CONFIG_DMA_NONCOHERENT=y CONFIG_CPU_LITTLE_ENDIAN=y CONFIG_MIPS_L1_CACHE_SHIFT=5 -# CONFIG_FB is not set # # CPU selection @@ -132,7 +132,6 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y -# CONFIG_VTAG_ICACHE is not set # CONFIG_64BIT_PHYS_ADDR is not set # CONFIG_CPU_ADVANCED is not set CONFIG_CPU_HAS_LLSC=y @@ -149,7 +148,6 @@ CONFIG_MMU=y # CONFIG_PCCARD=m # CONFIG_PCMCIA_DEBUG is not set -# CONFIG_PCMCIA_OBSOLETE is not set CONFIG_PCMCIA=m # @@ -198,10 +196,12 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_INITRAMFS_SOURCE="" # CONFIG_LBD is not set CONFIG_CDROM_PKTCDVD=m @@ -215,6 +215,7 @@ CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +CONFIG_ATA_OVER_ETH=m # # ATA/ATAPI/MFM/RLL support @@ -291,8 +292,6 @@ CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_QUEUE is not set # CONFIG_IP_NF_IPTABLES is not set # CONFIG_IP_NF_ARPTABLES is not set -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set CONFIG_XFRM=y CONFIG_XFRM_USER=m @@ -424,6 +423,7 @@ CONFIG_SERIO=y # CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set +CONFIG_SERIO_LIBPS2=m CONFIG_SERIO_RAW=m # @@ -474,7 +474,6 @@ CONFIG_RTC=y # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # @@ -510,12 +509,14 @@ CONFIG_SYNCLINK_CS=m # # Graphics support # +# CONFIG_FB is not set # # Console display driver support # # CONFIG_VGA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound @@ -529,11 +530,25 @@ CONFIG_DUMMY_CONSOLE=y # CONFIG_USB_ARCH_HAS_OHCI is not set # +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -681,6 +696,11 @@ CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_UTF8 is not set # +# Profiling support +# +# CONFIG_PROFILING is not set + +# # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set @@ -723,6 +743,10 @@ CONFIG_CRYPTO_CRC32C=m # CONFIG_CRYPTO_TEST is not set # +# Hardware crypto devices +# + +# # Library routines # CONFIG_CRC_CCITT=m diff -puN arch/mips/configs/db1500_defconfig~mips-amd-alchemy-update arch/mips/configs/db1500_defconfig --- 25/arch/mips/configs/db1500_defconfig~mips-amd-alchemy-update 2005-01-29 11:26:00.206716496 -0800 +++ 25-akpm/arch/mips/configs/db1500_defconfig 2005-01-29 11:26:00.283704792 -0800 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc2 -# Sun Nov 21 14:11:56 2004 +# Linux kernel version: 2.6.11-rc2 +# Wed Jan 26 02:49:01 2005 # CONFIG_MIPS=y # CONFIG_MIPS64 is not set @@ -101,12 +101,12 @@ CONFIG_MIPS_DB1500=y # CONFIG_SNI_RM200_PCI is not set # CONFIG_TOSHIBA_RBTX4927 is not set CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_HAVE_DEC_LOCK=y CONFIG_DMA_COHERENT=y CONFIG_MIPS_DISABLE_OBSOLETE_IDE=y CONFIG_CPU_LITTLE_ENDIAN=y CONFIG_MIPS_L1_CACHE_SHIFT=5 -# CONFIG_FB is not set # # CPU selection @@ -133,7 +133,6 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y -# CONFIG_VTAG_ICACHE is not set CONFIG_64BIT_PHYS_ADDR=y # CONFIG_CPU_ADVANCED is not set CONFIG_CPU_HAS_LLSC=y @@ -154,7 +153,6 @@ CONFIG_MMU=y # CONFIG_PCCARD=m # CONFIG_PCMCIA_DEBUG is not set -# CONFIG_PCMCIA_OBSOLETE is not set CONFIG_PCMCIA=m CONFIG_CARDBUS=y @@ -234,6 +232,7 @@ CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_XIP is not set # # Mapping drivers for chip access @@ -252,6 +251,7 @@ CONFIG_MTD_DB1X00_USER=y # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -282,12 +282,14 @@ CONFIG_MTD_DB1X00_USER=y # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_UB is not set # CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_INITRAMFS_SOURCE="" # CONFIG_LBD is not set CONFIG_CDROM_PKTCDVD=m @@ -301,6 +303,7 @@ CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +CONFIG_ATA_OVER_ETH=m # # ATA/ATAPI/MFM/RLL support @@ -402,8 +405,6 @@ CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_QUEUE is not set # CONFIG_IP_NF_IPTABLES is not set # CONFIG_IP_NF_ARPTABLES is not set -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set CONFIG_XFRM=y CONFIG_XFRM_USER=m @@ -557,6 +558,7 @@ CONFIG_SERIO=y CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set # CONFIG_SERIO_PCIPS2 is not set +# CONFIG_SERIO_LIBPS2 is not set CONFIG_SERIO_RAW=m # @@ -609,7 +611,6 @@ CONFIG_RTC=y # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # @@ -645,6 +646,8 @@ CONFIG_SYNCLINK_CS=m # # Graphics support # +# CONFIG_FB is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound @@ -705,6 +708,7 @@ CONFIG_USB_ARCH_HAS_OHCI=y # CONFIG_USB_EHCI_HCD is not set CONFIG_USB_OHCI_HCD=y # CONFIG_USB_UHCI_HCD is not set +# CONFIG_USB_SL811_HCD is not set # # USB Device Class drivers @@ -714,6 +718,10 @@ CONFIG_USB_OHCI_HCD=y # CONFIG_USB_MIDI is not set # CONFIG_USB_ACM is not set # CONFIG_USB_PRINTER is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# # CONFIG_USB_STORAGE is not set # @@ -769,7 +777,6 @@ CONFIG_USB_HIDINPUT=y # # CONFIG_USB_EMI62 is not set # CONFIG_USB_EMI26 is not set -# CONFIG_USB_TIGL is not set # CONFIG_USB_AUERSWALD is not set # CONFIG_USB_RIO500 is not set # CONFIG_USB_LEGOTOWER is not set @@ -778,6 +785,7 @@ CONFIG_USB_HIDINPUT=y # CONFIG_USB_CYTHERM is not set # CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set +# CONFIG_USB_IDMOUSE is not set # # USB ATM/DSL drivers @@ -789,6 +797,16 @@ CONFIG_USB_HIDINPUT=y # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -938,6 +956,11 @@ CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_UTF8 is not set # +# Profiling support +# +# CONFIG_PROFILING is not set + +# # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set @@ -980,6 +1003,10 @@ CONFIG_CRYPTO_CRC32C=m # CONFIG_CRYPTO_TEST is not set # +# Hardware crypto devices +# + +# # Library routines # CONFIG_CRC_CCITT=m diff -puN arch/mips/configs/db1550_defconfig~mips-amd-alchemy-update arch/mips/configs/db1550_defconfig --- 25/arch/mips/configs/db1550_defconfig~mips-amd-alchemy-update 2005-01-29 11:26:00.207716344 -0800 +++ 25-akpm/arch/mips/configs/db1550_defconfig 2005-01-29 11:26:00.285704488 -0800 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc2 -# Sun Nov 21 14:11:57 2004 +# Linux kernel version: 2.6.11-rc2 +# Wed Jan 26 02:49:02 2005 # CONFIG_MIPS=y # CONFIG_MIPS64 is not set @@ -101,12 +101,12 @@ CONFIG_MIPS_DB1550=y # CONFIG_SNI_RM200_PCI is not set # CONFIG_TOSHIBA_RBTX4927 is not set CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_HAVE_DEC_LOCK=y CONFIG_DMA_COHERENT=y CONFIG_MIPS_DISABLE_OBSOLETE_IDE=y CONFIG_CPU_LITTLE_ENDIAN=y CONFIG_MIPS_L1_CACHE_SHIFT=5 -# CONFIG_FB is not set # # CPU selection @@ -133,7 +133,6 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y -# CONFIG_VTAG_ICACHE is not set CONFIG_64BIT_PHYS_ADDR=y # CONFIG_CPU_ADVANCED is not set CONFIG_CPU_HAS_LLSC=y @@ -154,7 +153,6 @@ CONFIG_MMU=y # CONFIG_PCCARD=m # CONFIG_PCMCIA_DEBUG is not set -# CONFIG_PCMCIA_OBSOLETE is not set CONFIG_PCMCIA=m CONFIG_CARDBUS=y @@ -252,6 +250,7 @@ CONFIG_MTD_DB1550_USER=y # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -268,6 +267,7 @@ CONFIG_MTD_NAND=m CONFIG_MTD_NAND_IDS=m CONFIG_MTD_NAND_AU1550=m # CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_NANDSIM is not set # # Parallel port support @@ -286,11 +286,13 @@ CONFIG_MTD_NAND_AU1550=m # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_INITRAMFS_SOURCE="" # CONFIG_LBD is not set CONFIG_CDROM_PKTCDVD=m @@ -304,6 +306,7 @@ CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +CONFIG_ATA_OVER_ETH=m # # ATA/ATAPI/MFM/RLL support @@ -433,8 +436,6 @@ CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_QUEUE is not set # CONFIG_IP_NF_IPTABLES is not set # CONFIG_IP_NF_ARPTABLES is not set -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set CONFIG_XFRM=y CONFIG_XFRM_USER=m @@ -596,6 +597,7 @@ CONFIG_SERIO=y CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set # CONFIG_SERIO_PCIPS2 is not set +# CONFIG_SERIO_LIBPS2 is not set CONFIG_SERIO_RAW=m # @@ -649,7 +651,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # @@ -685,6 +686,8 @@ CONFIG_SYNCLINK_CS=m # # Graphics support # +# CONFIG_FB is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound @@ -699,11 +702,25 @@ CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y # +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -853,6 +870,11 @@ CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_UTF8 is not set # +# Profiling support +# +# CONFIG_PROFILING is not set + +# # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set @@ -895,6 +917,10 @@ CONFIG_CRYPTO_CRC32C=m # CONFIG_CRYPTO_TEST is not set # +# Hardware crypto devices +# + +# # Library routines # CONFIG_CRC_CCITT=m diff -puN arch/mips/configs/pb1100_defconfig~mips-amd-alchemy-update arch/mips/configs/pb1100_defconfig --- 25/arch/mips/configs/pb1100_defconfig~mips-amd-alchemy-update 2005-01-29 11:26:00.209716040 -0800 +++ 25-akpm/arch/mips/configs/pb1100_defconfig 2005-01-29 11:26:00.262707984 -0800 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc2 -# Sun Nov 21 14:12:05 2004 +# Linux kernel version: 2.6.11-rc2 +# Wed Jan 26 02:49:08 2005 # CONFIG_MIPS=y # CONFIG_MIPS64 is not set @@ -101,13 +101,13 @@ CONFIG_MIPS_PB1100=y # CONFIG_SNI_RM200_PCI is not set # CONFIG_TOSHIBA_RBTX4927 is not set CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_HAVE_DEC_LOCK=y CONFIG_DMA_NONCOHERENT=y CONFIG_CPU_LITTLE_ENDIAN=y CONFIG_SWAP_IO_SPACE=y -# CONFIG_AU1000_USB_DEVICE is not set +# CONFIG_AU1X00_USB_DEVICE is not set CONFIG_MIPS_L1_CACHE_SHIFT=5 -# CONFIG_FB is not set # # CPU selection @@ -134,7 +134,6 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y -# CONFIG_VTAG_ICACHE is not set # CONFIG_64BIT_PHYS_ADDR is not set # CONFIG_CPU_ADVANCED is not set CONFIG_CPU_HAS_LLSC=y @@ -153,7 +152,6 @@ CONFIG_MMU=y # CONFIG_PCCARD=m # CONFIG_PCMCIA_DEBUG is not set -# CONFIG_PCMCIA_OBSOLETE is not set CONFIG_PCMCIA=m # @@ -245,6 +243,7 @@ CONFIG_MTD_PB1500_USER=y # CONFIG_MTD_PHRAM is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLKMTD is not set +# CONFIG_MTD_BLOCK2MTD is not set # # Disk-On-Chip Device Drivers @@ -271,10 +270,12 @@ CONFIG_MTD_PB1500_USER=y # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_INITRAMFS_SOURCE="" # CONFIG_LBD is not set CONFIG_CDROM_PKTCDVD=m @@ -288,6 +289,7 @@ CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +CONFIG_ATA_OVER_ETH=m # # ATA/ATAPI/MFM/RLL support @@ -364,8 +366,6 @@ CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_QUEUE is not set # CONFIG_IP_NF_IPTABLES is not set # CONFIG_IP_NF_ARPTABLES is not set -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set CONFIG_XFRM=y CONFIG_XFRM_USER=m @@ -489,6 +489,7 @@ CONFIG_SERIO=y # CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_LIBPS2 is not set CONFIG_SERIO_RAW=m # @@ -539,7 +540,6 @@ CONFIG_RTC=y # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # @@ -575,12 +575,14 @@ CONFIG_SYNCLINK_CS=m # # Graphics support # +# CONFIG_FB is not set # # Console display driver support # # CONFIG_VGA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound @@ -594,11 +596,25 @@ CONFIG_DUMMY_CONSOLE=y # CONFIG_USB_ARCH_HAS_OHCI is not set # +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -748,6 +764,11 @@ CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_UTF8 is not set # +# Profiling support +# +# CONFIG_PROFILING is not set + +# # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set @@ -790,6 +811,10 @@ CONFIG_CRYPTO_CRC32C=m # CONFIG_CRYPTO_TEST is not set # +# Hardware crypto devices +# + +# # Library routines # CONFIG_CRC_CCITT=m diff -puN arch/mips/configs/pb1500_defconfig~mips-amd-alchemy-update arch/mips/configs/pb1500_defconfig --- 25/arch/mips/configs/pb1500_defconfig~mips-amd-alchemy-update 2005-01-29 11:26:00.210715888 -0800 +++ 25-akpm/arch/mips/configs/pb1500_defconfig 2005-01-29 11:26:00.318699472 -0800 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc2 -# Sun Nov 21 14:12:05 2004 +# Linux kernel version: 2.6.11-rc2 +# Wed Jan 26 02:49:09 2005 # CONFIG_MIPS=y # CONFIG_MIPS64 is not set @@ -101,12 +101,12 @@ CONFIG_MIPS_PB1500=y # CONFIG_SNI_RM200_PCI is not set # CONFIG_TOSHIBA_RBTX4927 is not set CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_HAVE_DEC_LOCK=y CONFIG_DMA_COHERENT=y CONFIG_CPU_LITTLE_ENDIAN=y # CONFIG_AU1X00_USB_DEVICE is not set CONFIG_MIPS_L1_CACHE_SHIFT=5 -# CONFIG_FB is not set # # CPU selection @@ -133,7 +133,6 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y -# CONFIG_VTAG_ICACHE is not set CONFIG_64BIT_PHYS_ADDR=y # CONFIG_CPU_ADVANCED is not set CONFIG_CPU_HAS_LLSC=y @@ -154,7 +153,6 @@ CONFIG_MMU=y # CONFIG_PCCARD=m # CONFIG_PCMCIA_DEBUG is not set -# CONFIG_PCMCIA_OBSOLETE is not set CONFIG_PCMCIA=m CONFIG_CARDBUS=y @@ -166,6 +164,7 @@ CONFIG_PD6729=m # CONFIG_I82092 is not set # CONFIG_TCIC is not set # CONFIG_PCMCIA_AU1X00 is not set +CONFIG_PCCARD_NONSTATIC=m # # PCI Hotplug Support @@ -212,11 +211,13 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_INITRAMFS_SOURCE="" # CONFIG_LBD is not set CONFIG_CDROM_PKTCDVD=m @@ -230,6 +231,7 @@ CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +CONFIG_ATA_OVER_ETH=m # # ATA/ATAPI/MFM/RLL support @@ -359,8 +361,6 @@ CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_QUEUE is not set # CONFIG_IP_NF_IPTABLES is not set # CONFIG_IP_NF_ARPTABLES is not set -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set CONFIG_XFRM=y CONFIG_XFRM_USER=m @@ -522,6 +522,7 @@ CONFIG_SERIO=y CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set # CONFIG_SERIO_PCIPS2 is not set +# CONFIG_SERIO_LIBPS2 is not set CONFIG_SERIO_RAW=m # @@ -575,7 +576,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # @@ -611,6 +611,8 @@ CONFIG_SYNCLINK_CS=m # # Graphics support # +# CONFIG_FB is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound @@ -625,11 +627,25 @@ CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y # +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -777,6 +793,11 @@ CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_UTF8 is not set # +# Profiling support +# +# CONFIG_PROFILING is not set + +# # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set @@ -819,6 +840,10 @@ CONFIG_CRYPTO_MICHAEL_MIC=y # CONFIG_CRYPTO_TEST is not set # +# Hardware crypto devices +# + +# # Library routines # CONFIG_CRC_CCITT=m diff -puN arch/mips/configs/pb1550_defconfig~mips-amd-alchemy-update arch/mips/configs/pb1550_defconfig --- 25/arch/mips/configs/pb1550_defconfig~mips-amd-alchemy-update 2005-01-29 11:26:00.211715736 -0800 +++ 25-akpm/arch/mips/configs/pb1550_defconfig 2005-01-29 11:26:00.317699624 -0800 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc2 -# Sun Nov 21 14:12:05 2004 +# Linux kernel version: 2.6.11-rc2 +# Wed Jan 26 02:49:09 2005 # CONFIG_MIPS=y # CONFIG_MIPS64 is not set @@ -101,12 +101,12 @@ CONFIG_MIPS_PB1550=y # CONFIG_SNI_RM200_PCI is not set # CONFIG_TOSHIBA_RBTX4927 is not set CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_HAVE_DEC_LOCK=y CONFIG_DMA_COHERENT=y CONFIG_MIPS_DISABLE_OBSOLETE_IDE=y CONFIG_CPU_LITTLE_ENDIAN=y CONFIG_MIPS_L1_CACHE_SHIFT=5 -# CONFIG_FB is not set # # CPU selection @@ -133,7 +133,6 @@ CONFIG_PAGE_SIZE_4KB=y # CONFIG_PAGE_SIZE_16KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y -# CONFIG_VTAG_ICACHE is not set CONFIG_64BIT_PHYS_ADDR=y # CONFIG_CPU_ADVANCED is not set CONFIG_CPU_HAS_LLSC=y @@ -154,7 +153,6 @@ CONFIG_MMU=y # CONFIG_PCCARD=m # CONFIG_PCMCIA_DEBUG is not set -# CONFIG_PCMCIA_OBSOLETE is not set CONFIG_PCMCIA=m CONFIG_CARDBUS=y @@ -166,6 +164,7 @@ CONFIG_PD6729=m # CONFIG_I82092 is not set # CONFIG_TCIC is not set # CONFIG_PCMCIA_AU1X00 is not set +CONFIG_PCCARD_NONSTATIC=m # # PCI Hotplug Support @@ -212,11 +211,13 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_INITRAMFS_SOURCE="" # CONFIG_LBD is not set CONFIG_CDROM_PKTCDVD=m @@ -230,6 +231,7 @@ CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +CONFIG_ATA_OVER_ETH=m # # ATA/ATAPI/MFM/RLL support @@ -359,8 +361,6 @@ CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_QUEUE is not set # CONFIG_IP_NF_IPTABLES is not set # CONFIG_IP_NF_ARPTABLES is not set -# CONFIG_IP_NF_COMPAT_IPCHAINS is not set -# CONFIG_IP_NF_COMPAT_IPFWADM is not set CONFIG_XFRM=y CONFIG_XFRM_USER=m @@ -514,6 +514,7 @@ CONFIG_SERIO=y CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set # CONFIG_SERIO_PCIPS2 is not set +# CONFIG_SERIO_LIBPS2 is not set CONFIG_SERIO_RAW=m # @@ -567,7 +568,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # @@ -603,6 +603,8 @@ CONFIG_SYNCLINK_CS=m # # Graphics support # +# CONFIG_FB is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound @@ -617,11 +619,25 @@ CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y # +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -769,6 +785,11 @@ CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_UTF8 is not set # +# Profiling support +# +# CONFIG_PROFILING is not set + +# # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set @@ -811,6 +832,10 @@ CONFIG_CRYPTO_CRC32C=m # CONFIG_CRYPTO_TEST is not set # +# Hardware crypto devices +# + +# # Library routines # CONFIG_CRC_CCITT=m diff -puN arch/mips/Kconfig~mips-amd-alchemy-update arch/mips/Kconfig --- 25/arch/mips/Kconfig~mips-amd-alchemy-update 2005-01-29 11:26:00.213715432 -0800 +++ 25-akpm/arch/mips/Kconfig 2005-01-29 11:26:00.320699168 -0800 @@ -513,31 +513,31 @@ config SOC_AU1X00 choice prompt "Au1X00 SOC Type" depends on SOC_AU1X00 - help - Say Y here to enable support for one of three AMD/Alchemy - SOCs. For additional documentation see www.amd.com. + help + Say Y here to enable support for one of three AMD/Alchemy + SOCs. For additional documentation see www.amd.com. config SOC_AU1000 - bool "SOC_AU1000" + bool "SOC_AU1000" config SOC_AU1100 - bool "SOC_AU1100" + bool "SOC_AU1100" config SOC_AU1500 - bool "SOC_AU1500" + bool "SOC_AU1500" config SOC_AU1550 - bool "SOC_AU1550" + bool "SOC_AU1550" endchoice choice - prompt "AMD/Alchemy Au1x00 board support" - depends on SOC_AU1X00 + prompt "AMD/Alchemy Au1x00 board support" + depends on SOC_AU1X00 help These are evaluation boards built by AMD/Alchemy to showcase their Au1X00 Internet Edge Processors. The SOC design is based on the MIPS32 architecture running at 266/400/500MHz - with many integrated peripherals. Further information can be - found at their website, . Say Y here if you - wish to build a kernel for this platform. + with many integrated peripherals. Further information can be + found at their website, . Say Y here if you + wish to build a kernel for this platform. config MIPS_PB1000 bool "PB1000 board" @@ -609,6 +609,7 @@ config MIPS_XXS1500 config MIPS_MTX1 bool "4G Systems MTX-1 board" depends on SOC_AU1500 + select HW_HAS_PCI select DMA_NONCOHERENT endchoice diff -puN arch/mips/pci/fixup-au1000.c~mips-amd-alchemy-update arch/mips/pci/fixup-au1000.c --- 25/arch/mips/pci/fixup-au1000.c~mips-amd-alchemy-update 2005-01-29 11:26:00.214715280 -0800 +++ 25-akpm/arch/mips/pci/fixup-au1000.c 2005-01-29 11:26:00.315699928 -0800 @@ -98,6 +98,19 @@ static char irq_tab_alchemy[][5] __initd }; #endif +#ifdef CONFIG_MIPS_MTX1 +static char irq_tab_alchemy[][5] __initdata = { + [0] = { -1, INTA, INTB, INTX, INTX}, /* IDSEL 00 - AdapterA-Slot0 (top) */ + [1] = { -1, INTB, INTA, INTX, INTX}, /* IDSEL 01 - AdapterA-Slot1 (bottom) */ + [2] = { -1, INTC, INTD, INTX, INTX}, /* IDSEL 02 - AdapterB-Slot0 (top) */ + [3] = { -1, INTD, INTC, INTX, INTX}, /* IDSEL 03 - AdapterB-Slot1 (bottom) */ + [4] = { -1, INTA, INTB, INTX, INTX}, /* IDSEL 04 - AdapterC-Slot0 (top) */ + [5] = { -1, INTB, INTA, INTX, INTX}, /* IDSEL 05 - AdapterC-Slot1 (bottom) */ + [6] = { -1, INTC, INTD, INTX, INTX}, /* IDSEL 06 - AdapterD-Slot0 (top) */ + [7] = { -1, INTD, INTC, INTX, INTX}, /* IDSEL 07 - AdapterD-Slot1 (bottom) */ +}; +#endif + int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) { return irq_tab_alchemy[slot][pin]; diff -puN /dev/null drivers/pcmcia/au1000_db1x00.c --- /dev/null 2003-09-15 06:40:47.000000000 -0700 +++ 25-akpm/drivers/pcmcia/au1000_db1x00.c 2005-01-29 11:26:00.263707832 -0800 @@ -0,0 +1,288 @@ +/* + * + * Alchemy Semi Db1x00 boards specific pcmcia routines. + * + * Copyright 2002 MontaVista Software Inc. + * Author: MontaVista Software, Inc. + * ppopov@mvista.com or source@mvista.com + * + * Copyright 2004 Pete Popov, updated the driver to 2.6. + * Followed the sa11xx API and largely copied many of the hardware + * independent functions. + * + * ######################################################################## + * + * This program is free software; you can distribute it and/or modify it + * under the terms of the GNU General Public License (Version 2) as + * published by the Free Software Foundation. + * + * This program is distributed in the hope 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 +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "au1000_generic.h" + +#if 0 +#define debug(x,args...) printk(KERN_DEBUG "%s: " x, __func__ , ##args) +#else +#define debug(x,args...) +#endif + +static BCSR * const bcsr = (BCSR *)BCSR_KSEG1_ADDR; + +struct au1000_pcmcia_socket au1000_pcmcia_socket[PCMCIA_NUM_SOCKS]; +extern int au1x00_pcmcia_socket_probe(struct device *, struct pcmcia_low_level *, int, int); + +static int db1x00_pcmcia_hw_init(struct au1000_pcmcia_socket *skt) +{ +#ifdef CONFIG_MIPS_DB1550 + skt->irq = skt->nr ? AU1000_GPIO_5 : AU1000_GPIO_3; +#else + skt->irq = skt->nr ? AU1000_GPIO_5 : AU1000_GPIO_2; +#endif + return 0; +} + +static void db1x00_pcmcia_shutdown(struct au1000_pcmcia_socket *skt) +{ + bcsr->pcmcia = 0; /* turn off power */ + au_sync_delay(2); +} + +static void +db1x00_pcmcia_socket_state(struct au1000_pcmcia_socket *skt, struct pcmcia_state *state) +{ + u32 inserted; + unsigned char vs; + + state->ready = 0; + state->vs_Xv = 0; + state->vs_3v = 0; + state->detect = 0; + + switch (skt->nr) { + case 0: + vs = bcsr->status & 0x3; + inserted = !(bcsr->status & (1<<4)); + break; + case 1: + vs = (bcsr->status & 0xC)>>2; + inserted = !(bcsr->status & (1<<5)); + break; + default:/* should never happen */ + return; + } + + if (inserted) + debug("db1x00 socket %d: inserted %d, vs %d pcmcia %x\n", + skt->nr, inserted, vs, bcsr->pcmcia); + + if (inserted) { + switch (vs) { + case 0: + case 2: + state->vs_3v=1; + break; + case 3: /* 5V */ + break; + default: + /* return without setting 'detect' */ + printk(KERN_ERR "db1x00 bad VS (%d)\n", + vs); + } + state->detect = 1; + state->ready = 1; + } + else { + /* if the card was previously inserted and then ejected, + * we should turn off power to it + */ + if ((skt->nr == 0) && (bcsr->pcmcia & BCSR_PCMCIA_PC0RST)) { + bcsr->pcmcia &= ~(BCSR_PCMCIA_PC0RST | + BCSR_PCMCIA_PC0DRVEN | + BCSR_PCMCIA_PC0VPP | + BCSR_PCMCIA_PC0VCC); + au_sync_delay(10); + } + else if ((skt->nr == 1) && bcsr->pcmcia & BCSR_PCMCIA_PC1RST) { + bcsr->pcmcia &= ~(BCSR_PCMCIA_PC1RST | + BCSR_PCMCIA_PC1DRVEN | + BCSR_PCMCIA_PC1VPP | + BCSR_PCMCIA_PC1VCC); + au_sync_delay(10); + } + } + + state->bvd1=1; + state->bvd2=1; + state->wrprot=0; +} + +static int +db1x00_pcmcia_configure_socket(struct au1000_pcmcia_socket *skt, struct socket_state_t *state) +{ + u16 pwr; + int sock = skt->nr; + + debug("config_skt %d Vcc %dV Vpp %dV, reset %d\n", + sock, state->Vcc, state->Vpp, + state->flags & SS_RESET); + + /* pcmcia reg was set to zero at init time. Be careful when + * initializing a socket not to wipe out the settings of the + * other socket. + */ + pwr = bcsr->pcmcia; + pwr &= ~(0xf << sock*8); /* clear voltage settings */ + + state->Vpp = 0; + switch(state->Vcc){ + case 0: /* Vcc 0 */ + pwr |= SET_VCC_VPP(0,0,sock); + break; + case 50: /* Vcc 5V */ + switch(state->Vpp) { + case 0: + pwr |= SET_VCC_VPP(2,0,sock); + break; + case 50: + pwr |= SET_VCC_VPP(2,1,sock); + break; + case 12: + pwr |= SET_VCC_VPP(2,2,sock); + break; + case 33: + default: + pwr |= SET_VCC_VPP(0,0,sock); + printk("%s: bad Vcc/Vpp (%d:%d)\n", + __FUNCTION__, + state->Vcc, + state->Vpp); + break; + } + break; + case 33: /* Vcc 3.3V */ + switch(state->Vpp) { + case 0: + pwr |= SET_VCC_VPP(1,0,sock); + break; + case 12: + pwr |= SET_VCC_VPP(1,2,sock); + break; + case 33: + pwr |= SET_VCC_VPP(1,1,sock); + break; + case 50: + default: + pwr |= SET_VCC_VPP(0,0,sock); + printk("%s: bad Vcc/Vpp (%d:%d)\n", + __FUNCTION__, + state->Vcc, + state->Vpp); + break; + } + break; + default: /* what's this ? */ + pwr |= SET_VCC_VPP(0,0,sock); + printk(KERN_ERR "%s: bad Vcc %d\n", + __FUNCTION__, state->Vcc); + break; + } + + bcsr->pcmcia = pwr; + au_sync_delay(300); + + if (sock == 0) { + if (!(state->flags & SS_RESET)) { + pwr |= BCSR_PCMCIA_PC0DRVEN; + bcsr->pcmcia = pwr; + au_sync_delay(300); + pwr |= BCSR_PCMCIA_PC0RST; + bcsr->pcmcia = pwr; + au_sync_delay(100); + } + else { + pwr &= ~(BCSR_PCMCIA_PC0RST | BCSR_PCMCIA_PC0DRVEN); + bcsr->pcmcia = pwr; + au_sync_delay(100); + } + } + else { + if (!(state->flags & SS_RESET)) { + pwr |= BCSR_PCMCIA_PC1DRVEN; + bcsr->pcmcia = pwr; + au_sync_delay(300); + pwr |= BCSR_PCMCIA_PC1RST; + bcsr->pcmcia = pwr; + au_sync_delay(100); + } + else { + pwr &= ~(BCSR_PCMCIA_PC1RST | BCSR_PCMCIA_PC1DRVEN); + bcsr->pcmcia = pwr; + au_sync_delay(100); + } + } + return 0; +} + +/* + * Enable card status IRQs on (re-)initialisation. This can + * be called at initialisation, power management event, or + * pcmcia event. + */ +void db1x00_socket_init(struct au1000_pcmcia_socket *skt) +{ + /* nothing to do for now */ +} + +/* + * Disable card status IRQs and PCMCIA bus on suspend. + */ +void db1x00_socket_suspend(struct au1000_pcmcia_socket *skt) +{ + /* nothing to do for now */ +} + +struct pcmcia_low_level db1x00_pcmcia_ops = { + .owner = THIS_MODULE, + + .hw_init = db1x00_pcmcia_hw_init, + .hw_shutdown = db1x00_pcmcia_shutdown, + + .socket_state = db1x00_pcmcia_socket_state, + .configure_socket = db1x00_pcmcia_configure_socket, + + .socket_init = db1x00_socket_init, + .socket_suspend = db1x00_socket_suspend +}; + +int __init au1x_board_init(struct device *dev) +{ + int ret = -ENODEV; + bcsr->pcmcia = 0; /* turn off power, if it's not already off */ + au_sync_delay(2); + ret = au1x00_pcmcia_socket_probe(dev, &db1x00_pcmcia_ops, 0, 2); + return ret; +} diff -puN drivers/pcmcia/au1000_generic.c~mips-amd-alchemy-update drivers/pcmcia/au1000_generic.c --- 25/drivers/pcmcia/au1000_generic.c~mips-amd-alchemy-update 2005-01-29 11:26:00.216714976 -0800 +++ 25-akpm/drivers/pcmcia/au1000_generic.c 2005-01-29 11:26:00.270706768 -0800 @@ -2,9 +2,13 @@ * * Alchemy Semi Au1000 pcmcia driver * - * Copyright 2001 MontaVista Software Inc. + * Copyright 2001-2003 MontaVista Software Inc. * Author: MontaVista Software, Inc. - * ppopov@mvista.com or source@mvista.com + * ppopov@embeddedalley.com or source@mvista.com + * + * Copyright 2004 Pete Popov, Embedded Alley Solutions, Inc. + * Updated the driver to 2.6. Followed the sa11xx API and largely + * copied many of the hardware independent functions. * * ######################################################################## * @@ -25,450 +29,255 @@ * * */ + #include #include #include #include -#include +#include #include #include -#include #include #include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include "cs_internal.h" +#include +#include +#include +#include #include #include #include -#include -#include - -#ifdef DEBUG -static int pc_debug; - -module_param(pc_debug, int, 0644); - -#define debug(lvl,fmt) do { \ - if (pc_debug > (lvl)) \ - printk(KERN_DEBUG fmt); \ -} while (0) -#else -#define debug(lvl,fmt) do { } while (0) -#endif +#include +#include "au1000_generic.h" MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Pete Popov, MontaVista Software "); +MODULE_AUTHOR("Pete Popov "); MODULE_DESCRIPTION("Linux PCMCIA Card Services: Au1x00 Socket Controller"); -#define MAP_SIZE 0x1000000 - -/* This structure maintains housekeeping state for each socket, such - * as the last known values of the card detect pins, or the Card Services - * callback value associated with the socket: - */ -static struct au1000_pcmcia_socket *pcmcia_socket; -static int socket_count; - - -/* Returned by the low-level PCMCIA interface: */ -static struct pcmcia_low_level *pcmcia_low_level; - -/* Event poll timer structure */ -static struct timer_list poll_timer; - - -/* Prototypes for routines which are used internally: */ - -static int au1000_pcmcia_driver_init(void); -static void au1000_pcmcia_driver_shutdown(void); -static void au1000_pcmcia_task_handler(void *data); -static void au1000_pcmcia_poll_event(unsigned long data); -static void au1000_pcmcia_interrupt(int irq, void *dev, struct pt_regs *regs); -static struct tq_struct au1000_pcmcia_task; - -#ifdef CONFIG_PROC_FS -static int au1000_pcmcia_proc_status(char *buf, char **start, - off_t pos, int count, int *eof, void *data); +#if 0 +#define debug(x,args...) printk(KERN_DEBUG "%s: " x, __func__ , ##args) +#else +#define debug(x,args...) #endif +#define MAP_SIZE 0x100000 +extern struct au1000_pcmcia_socket au1000_pcmcia_socket[]; +#define PCMCIA_SOCKET(x) (au1000_pcmcia_socket + (x)) +#define to_au1000_socket(x) container_of(x, struct au1000_pcmcia_socket, socket) -/* Prototypes for operations which are exported to the - * new-and-impr^H^H^H^H^H^H^H^H^H^H in-kernel PCMCIA core: +/* Some boards like to support CF cards as IDE root devices, so they + * grab pcmcia sockets directly. */ +u32 *pcmcia_base_vaddrs[2]; +extern const unsigned long mips_io_port_base; -static int au1000_pcmcia_init(u32 sock); -static int au1000_pcmcia_suspend(u32 sock); -static int au1000_pcmcia_register_callback(u32 sock, - void (*handler)(void *, u32), void *info); -static int au1000_pcmcia_inquire_socket(u32 sock, socket_cap_t *cap); -static int au1000_pcmcia_get_status(u32 sock, u_int *value); -static int au1000_pcmcia_get_socket(u32 sock, socket_state_t *state); -static int au1000_pcmcia_set_socket(u32 sock, socket_state_t *state); -static int au1000_pcmcia_get_io_map(u32 sock, struct pccard_io_map *io); -static int au1000_pcmcia_set_io_map(u32 sock, struct pccard_io_map *io); -static int au1000_pcmcia_get_mem_map(u32 sock, struct pccard_mem_map *mem); -static int au1000_pcmcia_set_mem_map(u32 sock, struct pccard_mem_map *mem); -#ifdef CONFIG_PROC_FS -static void au1000_pcmcia_proc_setup(u32 sock, struct proc_dir_entry *base); -#endif +DECLARE_MUTEX(pcmcia_sockets_lock); -static struct pccard_operations au1000_pcmcia_operations = { - au1000_pcmcia_init, - au1000_pcmcia_suspend, - au1000_pcmcia_register_callback, - au1000_pcmcia_inquire_socket, - au1000_pcmcia_get_status, - au1000_pcmcia_get_socket, - au1000_pcmcia_set_socket, - au1000_pcmcia_get_io_map, - au1000_pcmcia_set_io_map, - au1000_pcmcia_get_mem_map, - au1000_pcmcia_set_mem_map, -#ifdef CONFIG_PROC_FS - au1000_pcmcia_proc_setup -#endif +static int (*au1x00_pcmcia_hw_init[])(struct device *dev) = { + au1x_board_init, }; -static DEFINE_SPINLOCK(pcmcia_lock); - -static int __init au1000_pcmcia_driver_init(void) +static int +au1x00_pcmcia_skt_state(struct au1000_pcmcia_socket *skt) { - struct pcmcia_init pcmcia_init; struct pcmcia_state state; - unsigned int i; + unsigned int stat; - printk("\nAu1x00 PCMCIA\n"); + memset(&state, 0, sizeof(struct pcmcia_state)); -#ifndef CONFIG_64BIT_PHYS_ADDR - printk(KERN_ERR "Au1x00 PCMCIA 36 bit IO support not enabled\n"); - return -1; -#endif - -#if defined(CONFIG_MIPS_PB1000) || defined(CONFIG_MIPS_PB1100) || defined(CONFIG_MIPS_PB1500) - pcmcia_low_level=&pb1x00_pcmcia_ops; -#else -#error Unsupported AU1000 board. -#endif + skt->ops->socket_state(skt, &state); - pcmcia_init.handler=au1000_pcmcia_interrupt; - if((socket_count=pcmcia_low_level->init(&pcmcia_init))<0) { - printk(KERN_ERR "Unable to initialize PCMCIA service.\n"); - return -EIO; - } + stat = state.detect ? SS_DETECT : 0; + stat |= state.ready ? SS_READY : 0; + stat |= state.wrprot ? SS_WRPROT : 0; + stat |= state.vs_3v ? SS_3VCARD : 0; + stat |= state.vs_Xv ? SS_XVCARD : 0; + stat |= skt->cs_state.Vcc ? SS_POWERON : 0; - /* NOTE: the chip select must already be setup */ - - pcmcia_socket = - kmalloc(sizeof(struct au1000_pcmcia_socket) * socket_count, - GFP_KERNEL); - if (!pcmcia_socket) { - printk(KERN_ERR "Card Services can't get memory \n"); - return -1; + if (skt->cs_state.flags & SS_IOCARD) + stat |= state.bvd1 ? SS_STSCHG : 0; + else { + if (state.bvd1 == 0) + stat |= SS_BATDEAD; + else if (state.bvd2 == 0) + stat |= SS_BATWARN; } - memset(pcmcia_socket, 0, - sizeof(struct au1000_pcmcia_socket) * socket_count); - - /* - * Assuming max of 2 sockets, which the Au1000 supports. - * WARNING: the Pb1000 has two sockets, and both work, but you - * can't use them both at the same time due to glue logic conflicts. - */ - for(i=0; i < socket_count; i++) { + return stat; +} - if(pcmcia_low_level->socket_state(i, &state)<0){ - printk(KERN_ERR "Unable to get PCMCIA status\n"); - return -EIO; - } - pcmcia_socket[i].k_state=state; - pcmcia_socket[i].cs_state.csc_mask=SS_DETECT; - - if (i == 0) { - pcmcia_socket[i].virt_io = - (u32)ioremap((kio_addr_t)0xF00000000, 0x1000); - pcmcia_socket[i].phys_attr = (memaddr_t)0xF40000000; - pcmcia_socket[i].phys_mem = (memaddr_t)0xF80000000; - } - else { - pcmcia_socket[i].virt_io = - (u32)ioremap((kio_addr_t)0xF08000000, 0x1000); - pcmcia_socket[i].phys_attr = (memaddr_t)0xF48000000; - pcmcia_socket[i].phys_mem = (memaddr_t)0xF88000000; - } - } +/* + * au100_pcmcia_config_skt + * + * Convert PCMCIA socket state to our socket configure structure. + */ +static int +au1x00_pcmcia_config_skt(struct au1000_pcmcia_socket *skt, socket_state_t *state) +{ + int ret; - /* Only advertise as many sockets as we can detect: */ - if(register_ss_entry(socket_count, &au1000_pcmcia_operations)<0){ - printk(KERN_ERR "Unable to register socket service routine\n"); - return -ENXIO; + ret = skt->ops->configure_socket(skt, state); + if (ret == 0) { + skt->cs_state = *state; } - /* Start the event poll timer. - * It will reschedule by itself afterwards. - */ - au1000_pcmcia_poll_event(0); + if (ret < 0) + debug("unable to configure socket %d\n", skt->nr); - debug(1, "au1000: initialization complete\n"); - return 0; - -} /* au1000_pcmcia_driver_init() */ - -module_init(au1000_pcmcia_driver_init); - -static void __exit au1000_pcmcia_driver_shutdown(void) -{ - int i; - - del_timer_sync(&poll_timer); - unregister_ss_entry(&au1000_pcmcia_operations); - pcmcia_low_level->shutdown(); - flush_scheduled_tasks(); - for(i=0; i < socket_count; i++) { - if (pcmcia_socket[i].virt_io) - iounmap((void *)pcmcia_socket[i].virt_io); - } - debug(1, "au1000: shutdown complete\n"); + return ret; } -module_exit(au1000_pcmcia_driver_shutdown); +/* au1x00_pcmcia_sock_init() + * + * (Re-)Initialise the socket, turning on status interrupts + * and PCMCIA bus. This must wait for power to stabilise + * so that the card status signals report correctly. + * + * Returns: 0 + */ +static int au1x00_pcmcia_sock_init(struct pcmcia_socket *sock) +{ + struct au1000_pcmcia_socket *skt = to_au1000_socket(sock); -static int au1000_pcmcia_init(unsigned int sock) { return 0; } + debug("initializing socket %u\n", skt->nr); -static int au1000_pcmcia_suspend(unsigned int sock) -{ + skt->ops->socket_init(skt); return 0; } - -static inline unsigned -au1000_pcmcia_events(struct pcmcia_state *state, - struct pcmcia_state *prev_state, - unsigned int mask, unsigned int flags) +/* + * au1x00_pcmcia_suspend() + * + * Remove power on the socket, disable IRQs from the card. + * Turn off status interrupts, and disable the PCMCIA bus. + * + * Returns: 0 + */ +static int au1x00_pcmcia_suspend(struct pcmcia_socket *sock) { - unsigned int events=0; + struct au1000_pcmcia_socket *skt = to_au1000_socket(sock); + int ret; - if(state->detect!=prev_state->detect){ - debug(2, "%s(): card detect value %u\n", - __FUNCTION__, state->detect); - events |= mask&SS_DETECT; - } + debug("suspending socket %u\n", skt->nr); + ret = au1x00_pcmcia_config_skt(skt, &dead_socket); + if (ret == 0) + skt->ops->socket_suspend(skt); - if(state->ready!=prev_state->ready){ - debug(2, "%s(): card ready value %u\n", - __FUNCTION__, state->ready); - events |= mask&((flags&SS_IOCARD)?0:SS_READY); - } - - *prev_state=*state; - return events; - -} /* au1000_pcmcia_events() */ + return ret; +} +static DEFINE_SPINLOCK(status_lock); -/* - * Au1000_pcmcia_task_handler() - * Processes socket events. +/* + * au1x00_check_status() */ -static void au1000_pcmcia_task_handler(void *data) +static void au1x00_check_status(struct au1000_pcmcia_socket *skt) { - struct pcmcia_state state; - int i, events, irq_status; - - for(i=0; isocket_state(i, &state))<0) - printk(KERN_ERR "low-level PCMCIA error\n"); - - events = au1000_pcmcia_events(&state, - &pcmcia_socket[i].k_state, - pcmcia_socket[i].cs_state.csc_mask, - pcmcia_socket[i].cs_state.flags); - if(pcmcia_socket[i].handler!=NULL) { - pcmcia_socket[i].handler(pcmcia_socket[i].handler_info, - events); - } - } - -} /* au1000_pcmcia_task_handler() */ - -static struct tq_struct au1000_pcmcia_task = { - routine: au1000_pcmcia_task_handler -}; + unsigned int events; + debug("entering PCMCIA monitoring thread\n"); -static void au1000_pcmcia_poll_event(unsigned long dummy) -{ - poll_timer.function = au1000_pcmcia_poll_event; - poll_timer.expires = jiffies + AU1000_PCMCIA_POLL_PERIOD; - add_timer(&poll_timer); - schedule_task(&au1000_pcmcia_task); + do { + unsigned int status; + unsigned long flags; + + status = au1x00_pcmcia_skt_state(skt); + + spin_lock_irqsave(&status_lock, flags); + events = (status ^ skt->status) & skt->cs_state.csc_mask; + skt->status = status; + spin_unlock_irqrestore(&status_lock, flags); + + debug("events: %s%s%s%s%s%s\n", + events == 0 ? "" : "", + events & SS_DETECT ? "DETECT " : "", + events & SS_READY ? "READY " : "", + events & SS_BATDEAD ? "BATDEAD " : "", + events & SS_BATWARN ? "BATWARN " : "", + events & SS_STSCHG ? "STSCHG " : ""); + + if (events) + pcmcia_parse_events(&skt->socket, events); + } while (events); } - /* - * au1000_pcmcia_interrupt() - * The actual interrupt work is performed by au1000_pcmcia_task(), - * because the Card Services event handling code performs scheduling - * operations which cannot be executed from within an interrupt context. + * au1x00_pcmcia_poll_event() + * Let's poll for events in addition to IRQs since IRQ only is unreliable... */ -static void -au1000_pcmcia_interrupt(int irq, void *dev, struct pt_regs *regs) +static void au1x00_pcmcia_poll_event(unsigned long dummy) { - schedule_task(&au1000_pcmcia_task); -} + struct au1000_pcmcia_socket *skt = (struct au1000_pcmcia_socket *)dummy; + debug("polling for events\n"); + mod_timer(&skt->poll_timer, jiffies + AU1000_PCMCIA_POLL_PERIOD); -static int -au1000_pcmcia_register_callback(unsigned int sock, - void (*handler)(void *, unsigned int), void *info) -{ - if(handler==NULL){ - pcmcia_socket[sock].handler=NULL; - MOD_DEC_USE_COUNT; - } else { - MOD_INC_USE_COUNT; - pcmcia_socket[sock].handler=handler; - pcmcia_socket[sock].handler_info=info; - } - return 0; + au1x00_check_status(skt); } - -/* au1000_pcmcia_inquire_socket() - * - * From the sa1100 socket driver : - * - * Implements the inquire_socket() operation for the in-kernel PCMCIA - * service (formerly SS_InquireSocket in Card Services). We set - * SS_CAP_STATIC_MAP, which disables the memory resource database check. - * (Mapped memory is set up within the socket driver itself.) +/* au1x00_pcmcia_get_status() * - * In conjunction with the STATIC_MAP capability is a new field, - * `io_offset', recommended by David Hinds. Rather than go through - * the SetIOMap interface (which is not quite suited for communicating - * window locations up from the socket driver), we just pass up - * an offset which is applied to client-requested base I/O addresses - * in alloc_io_space(). + * From the sa11xx_core.c: + * Implements the get_status() operation for the in-kernel PCMCIA + * service (formerly SS_GetStatus in Card Services). Essentially just + * fills in bits in `status' according to internal driver state or + * the value of the voltage detect chipselect register. + * + * As a debugging note, during card startup, the PCMCIA core issues + * three set_socket() commands in a row the first with RESET deasserted, + * the second with RESET asserted, and the last with RESET deasserted + * again. Following the third set_socket(), a get_status() command will + * be issued. The kernel is looking for the SS_READY flag (see + * setup_socket(), reset_socket(), and unreset_socket() in cs.c). * - * Returns: 0 on success, -1 if no pin has been configured for `sock' + * Returns: 0 */ -static int au1000_pcmcia_inquire_socket(unsigned int sock, socket_cap_t *cap) +static int +au1x00_pcmcia_get_status(struct pcmcia_socket *sock, unsigned int *status) { - struct pcmcia_irq_info irq_info; - - if(sock > socket_count){ - printk(KERN_ERR "au1000: socket %u not configured\n", sock); - return -1; - } - - /* from the sa1100_generic driver: */ - - /* SS_CAP_PAGE_REGS: used by setup_cis_mem() in cistpl.c to set the - * force_low argument to validate_mem() in rsrc_mgr.c -- since in - * general, the mapped * addresses of the PCMCIA memory regions - * will not be within 0xffff, setting force_low would be - * undesirable. - * - * SS_CAP_STATIC_MAP: don't bother with the (user-configured) memory - * resource database; we instead pass up physical address ranges - * and allow other parts of Card Services to deal with remapping. - * - * SS_CAP_PCCARD: we can deal with 16-bit PCMCIA & CF cards, but - * not 32-bit CardBus devices. - */ - cap->features=(SS_CAP_PAGE_REGS | SS_CAP_STATIC_MAP | SS_CAP_PCCARD); - - irq_info.sock=sock; - irq_info.irq=-1; - - if(pcmcia_low_level->get_irq_info(&irq_info)<0){ - printk(KERN_ERR "Error obtaining IRQ info socket %u\n", sock); - return -1; - } + struct au1000_pcmcia_socket *skt = to_au1000_socket(sock); - cap->irq_mask=0; - cap->map_size=MAP_SIZE; - cap->pci_irq=irq_info.irq; - cap->io_offset=pcmcia_socket[sock].virt_io; + skt->status = au1x00_pcmcia_skt_state(skt); + *status = skt->status; return 0; +} -} /* au1000_pcmcia_inquire_socket() */ - - -static int -au1000_pcmcia_get_status(unsigned int sock, unsigned int *status) +/* au1x00_pcmcia_get_socket() + * Implements the get_socket() operation for the in-kernel PCMCIA + * service (formerly SS_GetSocket in Card Services). Not a very + * exciting routine. + * + * Returns: 0 + */ +static int +au1x00_pcmcia_get_socket(struct pcmcia_socket *sock, socket_state_t *state) { - struct pcmcia_state state; - - - if((pcmcia_low_level->socket_state(sock, &state))<0){ - printk(KERN_ERR "Unable to get PCMCIA status from kernel.\n"); - return -1; - } - - pcmcia_socket[sock].k_state = state; + struct au1000_pcmcia_socket *skt = to_au1000_socket(sock); - *status = state.detect?SS_DETECT:0; - - *status |= state.ready?SS_READY:0; - - *status |= pcmcia_socket[sock].cs_state.Vcc?SS_POWERON:0; - - if(pcmcia_socket[sock].cs_state.flags&SS_IOCARD) - *status |= state.bvd1?SS_STSCHG:0; - else { - if(state.bvd1==0) - *status |= SS_BATDEAD; - else if(state.bvd2 == 0) - *status |= SS_BATWARN; - } - - *status|=state.vs_3v?SS_3VCARD:0; - - *status|=state.vs_Xv?SS_XVCARD:0; - - debug(2, "\tstatus: %s%s%s%s%s%s%s%s\n", - (*status&SS_DETECT)?"DETECT ":"", - (*status&SS_READY)?"READY ":"", - (*status&SS_BATDEAD)?"BATDEAD ":"", - (*status&SS_BATWARN)?"BATWARN ":"", - (*status&SS_POWERON)?"POWERON ":"", - (*status&SS_STSCHG)?"STSCHG ":"", - (*status&SS_3VCARD)?"3VCARD ":"", - (*status&SS_XVCARD)?"XVCARD ":""); - - return 0; - -} /* au1000_pcmcia_get_status() */ - - -static int -au1000_pcmcia_get_socket(unsigned int sock, socket_state_t *state) -{ - *state = pcmcia_socket[sock].cs_state; - return 0; + debug("for sock %u\n", skt->nr); + *state = skt->cs_state; + return 0; } - -static int -au1000_pcmcia_set_socket(unsigned int sock, socket_state_t *state) +/* au1x00_pcmcia_set_socket() + * Implements the set_socket() operation for the in-kernel PCMCIA + * service (formerly SS_SetSocket in Card Services). We more or + * less punt all of this work and let the kernel handle the details + * of power configuration, reset, &c. We also record the value of + * `state' in order to regurgitate it to the PCMCIA core later. + * + * Returns: 0 + */ +static int +au1x00_pcmcia_set_socket(struct pcmcia_socket *sock, socket_state_t *state) { - struct pcmcia_configure configure; + struct au1000_pcmcia_socket *skt = to_au1000_socket(sock); + + debug("for sock %u\n", skt->nr); - debug(2, "\tmask: %s%s%s%s%s%s\n\tflags: %s%s%s%s%s%s\n" - "\tVcc %d Vpp %d irq %d\n", + debug("\tmask: %s%s%s%s%s%s\n\tflags: %s%s%s%s%s%s\n", (state->csc_mask==0)?"":"", (state->csc_mask&SS_DETECT)?"DETECT ":"", (state->csc_mask&SS_READY)?"READY ":"", @@ -480,217 +289,294 @@ au1000_pcmcia_set_socket(unsigned int so (state->flags&SS_IOCARD)?"IOCARD ":"", (state->flags&SS_RESET)?"RESET ":"", (state->flags&SS_SPKR_ENA)?"SPKR_ENA ":"", - (state->flags&SS_OUTPUT_ENA)?"OUTPUT_ENA ":"", + (state->flags&SS_OUTPUT_ENA)?"OUTPUT_ENA ":""); + debug("\tVcc %d Vpp %d irq %d\n", state->Vcc, state->Vpp, state->io_irq); - configure.sock=sock; - configure.vcc=state->Vcc; - configure.vpp=state->Vpp; - configure.output=(state->flags&SS_OUTPUT_ENA)?1:0; - configure.speaker=(state->flags&SS_SPKR_ENA)?1:0; - configure.reset=(state->flags&SS_RESET)?1:0; - - if(pcmcia_low_level->configure_socket(&configure)<0){ - printk(KERN_ERR "Unable to configure socket %u\n", sock); - return -1; - } - - pcmcia_socket[sock].cs_state = *state; - return 0; - -} /* au1000_pcmcia_set_socket() */ - - -static int -au1000_pcmcia_get_io_map(unsigned int sock, struct pccard_io_map *map) -{ - debug(1, "au1000_pcmcia_get_io_map: sock %d\n", sock); - if(map->map>=MAX_IO_WIN){ - printk(KERN_ERR "%s(): map (%d) out of range\n", - __FUNCTION__, map->map); - return -1; - } - *map=pcmcia_socket[sock].io_map[map->map]; - return 0; + return au1x00_pcmcia_config_skt(skt, state); } - int -au1000_pcmcia_set_io_map(unsigned int sock, struct pccard_io_map *map) +au1x00_pcmcia_set_io_map(struct pcmcia_socket *sock, struct pccard_io_map *map) { + struct au1000_pcmcia_socket *skt = to_au1000_socket(sock); unsigned int speed; - unsigned long start; if(map->map>=MAX_IO_WIN){ - printk(KERN_ERR "%s(): map (%d) out of range\n", - __FUNCTION__, map->map); + debug("map (%d) out of range\n", map->map); return -1; } if(map->flags&MAP_ACTIVE){ speed=(map->speed>0)?map->speed:AU1000_PCMCIA_IO_SPEED; - pcmcia_socket[sock].speed_io=speed; + skt->spd_io[map->map] = speed; } - start=map->start; - - if(map->stop==1) { - map->stop=PAGE_SIZE-1; - } - - map->start=pcmcia_socket[sock].virt_io; - map->stop=map->start+(map->stop-start); - pcmcia_socket[sock].io_map[map->map]=*map; - debug(3, "set_io_map %d start %x stop %x\n", - map->map, map->start, map->stop); + map->start=(ioaddr_t)(u32)skt->virt_io; + map->stop=map->start+MAP_SIZE; return 0; -} /* au1000_pcmcia_set_io_map() */ +} /* au1x00_pcmcia_set_io_map() */ static int -au1000_pcmcia_get_mem_map(unsigned int sock, struct pccard_mem_map *map) +au1x00_pcmcia_set_mem_map(struct pcmcia_socket *sock, struct pccard_mem_map *map) { + struct au1000_pcmcia_socket *skt = to_au1000_socket(sock); + unsigned short speed = map->speed; - if(map->map>=MAX_WIN) { - printk(KERN_ERR "%s(): map (%d) out of range\n", - __FUNCTION__, map->map); + if(map->map>=MAX_WIN){ + debug("map (%d) out of range\n", map->map); return -1; } - *map=pcmcia_socket[sock].mem_map[map->map]; + + if (map->flags & MAP_ATTRIB) { + skt->spd_attr[map->map] = speed; + skt->spd_mem[map->map] = 0; + } else { + skt->spd_attr[map->map] = 0; + skt->spd_mem[map->map] = speed; + } + + if (map->flags & MAP_ATTRIB) { + map->static_start = skt->phys_attr + map->card_start; + } + else { + map->static_start = skt->phys_mem + map->card_start; + } + + debug("set_mem_map %d start %08lx card_start %08x\n", + map->map, map->static_start, map->card_start); return 0; -} +} /* au1x00_pcmcia_set_mem_map() */ -static int -au1000_pcmcia_set_mem_map(unsigned int sock, struct pccard_mem_map *map) +static struct pccard_operations au1x00_pcmcia_operations = { + .init = au1x00_pcmcia_sock_init, + .suspend = au1x00_pcmcia_suspend, + .get_status = au1x00_pcmcia_get_status, + .get_socket = au1x00_pcmcia_get_socket, + .set_socket = au1x00_pcmcia_set_socket, + .set_io_map = au1x00_pcmcia_set_io_map, + .set_mem_map = au1x00_pcmcia_set_mem_map, +}; + +static const char *skt_names[] = { + "PCMCIA socket 0", + "PCMCIA socket 1", +}; + +struct skt_dev_info { + int nskt; +}; + +int au1x00_pcmcia_socket_probe(struct device *dev, struct pcmcia_low_level *ops, int first, int nr) { - unsigned int speed; - u_long flags; + struct skt_dev_info *sinfo; + int ret, i; - if(map->map>=MAX_WIN){ - printk(KERN_ERR "%s(): map (%d) out of range\n", - __FUNCTION__, map->map); - return -1; + sinfo = kmalloc(sizeof(struct skt_dev_info), GFP_KERNEL); + if (!sinfo) { + ret = -ENOMEM; + goto out; } - if(map->flags&MAP_ACTIVE){ - speed=(map->speed>0)?map->speed:AU1000_PCMCIA_MEM_SPEED; + memset(sinfo, 0, sizeof(struct skt_dev_info)); + sinfo->nskt = nr; - /* TBD */ - if(map->flags&MAP_ATTRIB){ - pcmcia_socket[sock].speed_attr=speed; - } - else { - pcmcia_socket[sock].speed_mem=speed; + /* + * Initialise the per-socket structure. + */ + for (i = 0; i < nr; i++) { + struct au1000_pcmcia_socket *skt = PCMCIA_SOCKET(i); + memset(skt, 0, sizeof(*skt)); + + skt->socket.ops = &au1x00_pcmcia_operations; + skt->socket.owner = ops->owner; + skt->socket.dev.dev = dev; + + init_timer(&skt->poll_timer); + skt->poll_timer.function = au1x00_pcmcia_poll_event; + skt->poll_timer.data = (unsigned long)skt; + skt->poll_timer.expires = jiffies + AU1000_PCMCIA_POLL_PERIOD; + + skt->nr = first + i; + skt->irq = 255; + skt->dev = dev; + skt->ops = ops; + + skt->res_skt.name = skt_names[skt->nr]; + skt->res_io.name = "io"; + skt->res_io.flags = IORESOURCE_MEM | IORESOURCE_BUSY; + skt->res_mem.name = "memory"; + skt->res_mem.flags = IORESOURCE_MEM; + skt->res_attr.name = "attribute"; + skt->res_attr.flags = IORESOURCE_MEM; + + /* + * PCMCIA client drivers use the inb/outb macros to access the + * IO registers. Since mips_io_port_base is added to the + * access address of the mips implementation of inb/outb, + * we need to subtract it here because we want to access the + * I/O or MEM address directly, without going through this + * "mips_io_port_base" mechanism. + */ + if (i == 0) { + skt->virt_io = (void *) + (ioremap((phys_t)AU1X_SOCK0_IO, 0x1000) - + (u32)mips_io_port_base); + skt->phys_attr = AU1X_SOCK0_PSEUDO_PHYS_ATTR; + skt->phys_mem = AU1X_SOCK0_PSEUDO_PHYS_MEM; } - } +#ifndef CONFIG_MIPS_XXS1500 + else { + skt->virt_io = (void *) + (ioremap((phys_t)AU1X_SOCK1_IO, 0x1000) - + (u32)mips_io_port_base); + skt->phys_attr = AU1X_SOCK1_PSEUDO_PHYS_ATTR; + skt->phys_mem = AU1X_SOCK1_PSEUDO_PHYS_MEM; + } +#endif + pcmcia_base_vaddrs[i] = (u32 *)skt->virt_io; + ret = ops->hw_init(skt); - spin_lock_irqsave(&pcmcia_lock, flags); - if (map->flags & MAP_ATTRIB) { - map->static_start = pcmcia_socket[sock].phys_attr + - map->card_start; - } - else { - map->static_start = pcmcia_socket[sock].phys_mem + - map->card_start; + skt->socket.features = SS_CAP_STATIC_MAP|SS_CAP_PCCARD; + skt->socket.irq_mask = 0; + skt->socket.map_size = MAP_SIZE; + skt->socket.pci_irq = skt->irq; + skt->socket.io_offset = (unsigned long)skt->virt_io; + + skt->status = au1x00_pcmcia_skt_state(skt); + + ret = pcmcia_register_socket(&skt->socket); + if (ret) + goto out_err; + + WARN_ON(skt->socket.sock != i); + + add_timer(&skt->poll_timer); } - pcmcia_socket[sock].mem_map[map->map]=*map; - spin_unlock_irqrestore(&pcmcia_lock, flags); - debug(3, "set_mem_map %d start %x card_start %x\n", - map->map, map->static_start, - map->card_start); + dev_set_drvdata(dev, sinfo); return 0; -} /* au1000_pcmcia_set_mem_map() */ + do { + struct au1000_pcmcia_socket *skt = PCMCIA_SOCKET(i); + + del_timer_sync(&skt->poll_timer); + pcmcia_unregister_socket(&skt->socket); +out_err: + flush_scheduled_work(); + ops->hw_shutdown(skt); + + i--; + } while (i > 0); + kfree(sinfo); +out: + return ret; +} + +int au1x00_drv_pcmcia_remove(struct device *dev) +{ + struct skt_dev_info *sinfo = dev_get_drvdata(dev); + int i; + + down(&pcmcia_sockets_lock); + dev_set_drvdata(dev, NULL); + for (i = 0; i < sinfo->nskt; i++) { + struct au1000_pcmcia_socket *skt = PCMCIA_SOCKET(i); + + del_timer_sync(&skt->poll_timer); + pcmcia_unregister_socket(&skt->socket); + flush_scheduled_work(); + skt->ops->hw_shutdown(skt); + au1x00_pcmcia_config_skt(skt, &dead_socket); + iounmap(skt->virt_io); + skt->virt_io = NULL; + } + + kfree(sinfo); + up(&pcmcia_sockets_lock); + return 0; +} -#if defined(CONFIG_PROC_FS) -static void -au1000_pcmcia_proc_setup(unsigned int sock, struct proc_dir_entry *base) +/* + * PCMCIA "Driver" API + */ + +static int au1x00_drv_pcmcia_probe(struct device *dev) { - struct proc_dir_entry *entry; + int i, ret = -ENODEV; - if((entry=create_proc_entry("status", 0, base))==NULL){ - printk(KERN_ERR "Unable to install \"status\" procfs entry\n"); - return; + down(&pcmcia_sockets_lock); + for (i=0; i < ARRAY_SIZE(au1x00_pcmcia_hw_init); i++) { + ret = au1x00_pcmcia_hw_init[i](dev); + if (ret == 0) + break; } + up(&pcmcia_sockets_lock); + return ret; +} - entry->read_proc=au1000_pcmcia_proc_status; - entry->data=(void *)sock; + +static int au1x00_drv_pcmcia_suspend(struct device *dev, u32 state, u32 level) +{ + int ret = 0; + if (level == SUSPEND_SAVE_STATE) + ret = pcmcia_socket_dev_suspend(dev, state); + return ret; } +static int au1x00_drv_pcmcia_resume(struct device *dev, u32 level) +{ + int ret = 0; + if (level == RESUME_RESTORE_STATE) + ret = pcmcia_socket_dev_resume(dev); + return ret; +} + + +static struct device_driver au1x00_pcmcia_driver = { + .probe = au1x00_drv_pcmcia_probe, + .remove = au1x00_drv_pcmcia_remove, + .name = "au1x00-pcmcia", + .bus = &platform_bus_type, + .suspend = au1x00_drv_pcmcia_suspend, + .resume = au1x00_drv_pcmcia_resume +}; + +static struct platform_device au1x00_device = { + .name = "au1x00-pcmcia", + .id = 0, +}; -/* au1000_pcmcia_proc_status() - * Implements the /proc/bus/pccard/??/status file. +/* au1x00_pcmcia_init() * - * Returns: the number of characters added to the buffer + * This routine performs low-level PCMCIA initialization and then + * registers this socket driver with Card Services. + * + * Returns: 0 on success, -ve error code on failure */ -static int -au1000_pcmcia_proc_status(char *buf, char **start, off_t pos, - int count, int *eof, void *data) +static int __init au1x00_pcmcia_init(void) { - char *p=buf; - unsigned int sock=(unsigned int)data; - - p+=sprintf(p, "k_flags : %s%s%s%s%s%s%s\n", - pcmcia_socket[sock].k_state.detect?"detect ":"", - pcmcia_socket[sock].k_state.ready?"ready ":"", - pcmcia_socket[sock].k_state.bvd1?"bvd1 ":"", - pcmcia_socket[sock].k_state.bvd2?"bvd2 ":"", - pcmcia_socket[sock].k_state.wrprot?"wrprot ":"", - pcmcia_socket[sock].k_state.vs_3v?"vs_3v ":"", - pcmcia_socket[sock].k_state.vs_Xv?"vs_Xv ":""); - - p+=sprintf(p, "status : %s%s%s%s%s%s%s%s%s\n", - pcmcia_socket[sock].k_state.detect?"SS_DETECT ":"", - pcmcia_socket[sock].k_state.ready?"SS_READY ":"", - pcmcia_socket[sock].cs_state.Vcc?"SS_POWERON ":"", - pcmcia_socket[sock].cs_state.flags&SS_IOCARD?\ - "SS_IOCARD ":"", - (pcmcia_socket[sock].cs_state.flags&SS_IOCARD && - pcmcia_socket[sock].k_state.bvd1)?"SS_STSCHG ":"", - ((pcmcia_socket[sock].cs_state.flags&SS_IOCARD)==0 && - (pcmcia_socket[sock].k_state.bvd1==0))?"SS_BATDEAD ":"", - ((pcmcia_socket[sock].cs_state.flags&SS_IOCARD)==0 && - (pcmcia_socket[sock].k_state.bvd2==0))?"SS_BATWARN ":"", - pcmcia_socket[sock].k_state.vs_3v?"SS_3VCARD ":"", - pcmcia_socket[sock].k_state.vs_Xv?"SS_XVCARD ":""); - - p+=sprintf(p, "mask : %s%s%s%s%s\n", - pcmcia_socket[sock].cs_state.csc_mask&SS_DETECT?\ - "SS_DETECT ":"", - pcmcia_socket[sock].cs_state.csc_mask&SS_READY?\ - "SS_READY ":"", - pcmcia_socket[sock].cs_state.csc_mask&SS_BATDEAD?\ - "SS_BATDEAD ":"", - pcmcia_socket[sock].cs_state.csc_mask&SS_BATWARN?\ - "SS_BATWARN ":"", - pcmcia_socket[sock].cs_state.csc_mask&SS_STSCHG?\ - "SS_STSCHG ":""); - - p+=sprintf(p, "cs_flags : %s%s%s%s%s\n", - pcmcia_socket[sock].cs_state.flags&SS_PWR_AUTO?\ - "SS_PWR_AUTO ":"", - pcmcia_socket[sock].cs_state.flags&SS_IOCARD?\ - "SS_IOCARD ":"", - pcmcia_socket[sock].cs_state.flags&SS_RESET?\ - "SS_RESET ":"", - pcmcia_socket[sock].cs_state.flags&SS_SPKR_ENA?\ - "SS_SPKR_ENA ":"", - pcmcia_socket[sock].cs_state.flags&SS_OUTPUT_ENA?\ - "SS_OUTPUT_ENA ":""); - - p+=sprintf(p, "Vcc : %d\n", pcmcia_socket[sock].cs_state.Vcc); - p+=sprintf(p, "Vpp : %d\n", pcmcia_socket[sock].cs_state.Vpp); - p+=sprintf(p, "irq : %d\n", pcmcia_socket[sock].cs_state.io_irq); - p+=sprintf(p, "I/O : %u\n", pcmcia_socket[sock].speed_io); - p+=sprintf(p, "attribute: %u\n", pcmcia_socket[sock].speed_attr); - p+=sprintf(p, "common : %u\n", pcmcia_socket[sock].speed_mem); - return p-buf; + int error = 0; + if ((error = driver_register(&au1x00_pcmcia_driver))) + return error; + platform_device_register(&au1x00_device); + return error; } +/* au1x00_pcmcia_exit() + * Invokes the low-level kernel service to free IRQs associated with this + * socket controller and reset GPIO edge detection. + */ +static void __exit au1x00_pcmcia_exit(void) +{ + driver_unregister(&au1x00_pcmcia_driver); + platform_device_unregister(&au1x00_device); +} -#endif /* defined(CONFIG_PROC_FS) */ +module_init(au1x00_pcmcia_init); +module_exit(au1x00_pcmcia_exit); diff -puN /dev/null drivers/pcmcia/au1000_generic.h --- /dev/null 2003-09-15 06:40:47.000000000 -0700 +++ 25-akpm/drivers/pcmcia/au1000_generic.h 2005-01-29 11:26:00.271706616 -0800 @@ -0,0 +1,150 @@ +/* + * Alchemy Semi Au1000 pcmcia driver include file + * + * Copyright 2001 MontaVista Software Inc. + * Author: MontaVista Software, Inc. + * ppopov@mvista.com or source@mvista.com + * + * This program is free software; you can distribute it and/or modify it + * under the terms of the GNU General Public License (Version 2) as + * published by the Free Software Foundation. + * + * This program is distributed in the hope 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. + */ +#ifndef __ASM_AU1000_PCMCIA_H +#define __ASM_AU1000_PCMCIA_H + +/* include the world */ +#include +#include +#include +#include +#include +#include +#include "cs_internal.h" + +#define AU1000_PCMCIA_POLL_PERIOD (2*HZ) +#define AU1000_PCMCIA_IO_SPEED (255) +#define AU1000_PCMCIA_MEM_SPEED (300) + +#define AU1X_SOCK0_IO 0xF00000000 +#define AU1X_SOCK0_PHYS_ATTR 0xF40000000 +#define AU1X_SOCK0_PHYS_MEM 0xF80000000 +/* pseudo 32 bit phys addresses, which get fixed up to the + * real 36 bit address in fixup_bigphys_addr() */ +#define AU1X_SOCK0_PSEUDO_PHYS_ATTR 0xF4000000 +#define AU1X_SOCK0_PSEUDO_PHYS_MEM 0xF8000000 + +/* pcmcia socket 1 needs external glue logic so the memory map + * differs from board to board. + */ +#if defined(CONFIG_MIPS_PB1000) || defined(CONFIG_MIPS_PB1100) || defined(CONFIG_MIPS_PB1500) || defined(CONFIG_MIPS_PB1550) +#define AU1X_SOCK1_IO 0xF08000000 +#define AU1X_SOCK1_PHYS_ATTR 0xF48000000 +#define AU1X_SOCK1_PHYS_MEM 0xF88000000 +#define AU1X_SOCK1_PSEUDO_PHYS_ATTR 0xF4800000 +#define AU1X_SOCK1_PSEUDO_PHYS_MEM 0xF8800000 +#elif defined(CONFIG_MIPS_DB1000) || defined(CONFIG_MIPS_DB1100) || defined(CONFIG_MIPS_DB1500) || defined(CONFIG_MIPS_DB1550) +#define AU1X_SOCK1_IO 0xF04000000 +#define AU1X_SOCK1_PHYS_ATTR 0xF44000000 +#define AU1X_SOCK1_PHYS_MEM 0xF84000000 +#define AU1X_SOCK1_PSEUDO_PHYS_ATTR 0xF4400000 +#define AU1X_SOCK1_PSEUDO_PHYS_MEM 0xF8400000 +#endif + +struct pcmcia_state { + unsigned detect: 1, + ready: 1, + wrprot: 1, + bvd1: 1, + bvd2: 1, + vs_3v: 1, + vs_Xv: 1; +}; + +struct pcmcia_configure { + unsigned sock: 8, + vcc: 8, + vpp: 8, + output: 1, + speaker: 1, + reset: 1; +}; + +struct pcmcia_irqs { + int sock; + int irq; + const char *str; +}; + + +struct au1000_pcmcia_socket { + struct pcmcia_socket socket; + + /* + * Info from low level handler + */ + struct device *dev; + unsigned int nr; + unsigned int irq; + + /* + * Core PCMCIA state + */ + struct pcmcia_low_level *ops; + + unsigned int status; + socket_state_t cs_state; + + unsigned short spd_io[MAX_IO_WIN]; + unsigned short spd_mem[MAX_WIN]; + unsigned short spd_attr[MAX_WIN]; + + struct resource res_skt; + struct resource res_io; + struct resource res_mem; + struct resource res_attr; + + void * virt_io; + ioaddr_t phys_io; + unsigned int phys_attr; + unsigned int phys_mem; + unsigned short speed_io, speed_attr, speed_mem; + + unsigned int irq_state; + + struct timer_list poll_timer; +}; + +struct pcmcia_low_level { + struct module *owner; + + int (*hw_init)(struct au1000_pcmcia_socket *); + void (*hw_shutdown)(struct au1000_pcmcia_socket *); + + void (*socket_state)(struct au1000_pcmcia_socket *, struct pcmcia_state *); + int (*configure_socket)(struct au1000_pcmcia_socket *, struct socket_state_t *); + + /* + * Enable card status IRQs on (re-)initialisation. This can + * be called at initialisation, power management event, or + * pcmcia event. + */ + void (*socket_init)(struct au1000_pcmcia_socket *); + + /* + * Disable card status IRQs and PCMCIA bus on suspend. + */ + void (*socket_suspend)(struct au1000_pcmcia_socket *); +}; + +extern int au1x_board_init(struct device *dev); + +#endif /* __ASM_AU1000_PCMCIA_H */ diff -puN drivers/pcmcia/au1000_pb1x00.c~mips-amd-alchemy-update drivers/pcmcia/au1000_pb1x00.c --- 25/drivers/pcmcia/au1000_pb1x00.c~mips-amd-alchemy-update 2005-01-29 11:26:00.217714824 -0800 +++ 25-akpm/drivers/pcmcia/au1000_pb1x00.c 2005-01-29 11:26:00.273706312 -0800 @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -55,7 +56,7 @@ #define PCMCIA_IRQ AU1000_GPIO_15 #elif defined (CONFIG_MIPS_PB1500) #include -#define PCMCIA_IRQ AU1000_GPIO_11 /* fixme */ +#define PCMCIA_IRQ AU1500_GPIO_203 #elif defined (CONFIG_MIPS_PB1100) #include #define PCMCIA_IRQ AU1000_GPIO_11 @@ -82,9 +83,9 @@ static int pb1x00_pcmcia_init(struct pcm #else /* fixme -- take care of the Pb1500 at some point */ u16 pcr; - pcr = au_readw(PB1100_MEM_PCMCIA) & ~0xf; /* turn off power */ - pcr &= ~(PB1100_PC_DEASSERT_RST | PB1100_PC_DRV_EN); - au_writew(pcr, PB1100_MEM_PCMCIA); + pcr = au_readw(PCMCIA_BOARD_REG) & ~0xf; /* turn off power */ + pcr &= ~(PC_DEASSERT_RST | PC_DRV_EN); + au_writew(pcr, PCMCIA_BOARD_REG); au_sync_delay(500); return PCMCIA_NUM_SOCKS; #endif @@ -102,9 +103,9 @@ static int pb1x00_pcmcia_shutdown(void) return 0; #else u16 pcr; - pcr = au_readw(PB1100_MEM_PCMCIA) & ~0xf; /* turn off power */ - pcr &= ~(PB1100_PC_DEASSERT_RST | PB1100_PC_DRV_EN); - au_writew(pcr, PB1100_MEM_PCMCIA); + pcr = au_readw(PCMCIA_BOARD_REG) & ~0xf; /* turn off power */ + pcr &= ~(PC_DEASSERT_RST | PC_DRV_EN); + au_writew(pcr, PCMCIA_BOARD_REG); au_sync_delay(2); return 0; #endif @@ -123,9 +124,14 @@ pb1x00_pcmcia_socket_state(unsigned sock vs0 = (vs0 >> 4) & 0x3; vs1 = (vs1 >> 12) & 0x3; #else - vs0 = (au_readw(PB1100_BOARD_STATUS) >> 4) & 0x3; + vs0 = (au_readw(BOARD_STATUS_REG) >> 4) & 0x3; +#ifdef CONFIG_MIPS_PB1500 + inserted0 = !((au_readl(GPIO2_PINSTATE) >> 1) & 0x1); /* gpio 201 */ +#else /* Pb1100 */ inserted0 = !((au_readl(SYS_PINSTATERD) >> 9) & 0x1); /* gpio 9 */ #endif + inserted1 = 0; +#endif state->ready = 0; state->vs_Xv = 0; @@ -145,7 +151,7 @@ pb1x00_pcmcia_socket_state(unsigned sock /* return without setting 'detect' */ printk(KERN_ERR "pb1x00 bad VS (%d)\n", vs0); - return; + return 0; } state->detect = 1; } @@ -163,7 +169,7 @@ pb1x00_pcmcia_socket_state(unsigned sock /* return without setting 'detect' */ printk(KERN_ERR "pb1x00 bad VS (%d)\n", vs1); - return; + return 0; } state->detect = 1; } @@ -324,7 +330,7 @@ pb1x00_pcmcia_configure_socket(const str #else - pcr = au_readw(PB1100_MEM_PCMCIA) & ~0xf; + pcr = au_readw(PCMCIA_BOARD_REG) & ~0xf; debug("Vcc %dV Vpp %dV, pcr %x, reset %d\n", configure->vcc, configure->vpp, pcr, configure->reset); @@ -383,26 +389,27 @@ pb1x00_pcmcia_configure_socket(const str break; } - au_writew(pcr, PB1100_MEM_PCMCIA); + au_writew(pcr, PCMCIA_BOARD_REG); au_sync_delay(300); if (!configure->reset) { - pcr |= PB1100_PC_DRV_EN; - au_writew(pcr, PB1100_MEM_PCMCIA); + pcr |= PC_DRV_EN; + au_writew(pcr, PCMCIA_BOARD_REG); au_sync_delay(100); - pcr |= PB1100_PC_DEASSERT_RST; - au_writew(pcr, PB1100_MEM_PCMCIA); + pcr |= PC_DEASSERT_RST; + au_writew(pcr, PCMCIA_BOARD_REG); au_sync_delay(100); } else { - pcr &= ~(PB1100_PC_DEASSERT_RST | PB1100_PC_DRV_EN); - au_writew(pcr, PB1100_MEM_PCMCIA); + pcr &= ~(PC_DEASSERT_RST | PC_DRV_EN); + au_writew(pcr, PCMCIA_BOARD_REG); au_sync_delay(100); } #endif return 0; } + struct pcmcia_low_level pb1x00_pcmcia_ops = { pb1x00_pcmcia_init, pb1x00_pcmcia_shutdown, diff -puN /dev/null drivers/pcmcia/au1000_xxs1500.c --- /dev/null 2003-09-15 06:40:47.000000000 -0700 +++ 25-akpm/drivers/pcmcia/au1000_xxs1500.c 2005-01-29 11:26:00.275706008 -0800 @@ -0,0 +1,191 @@ +/* + * + * MyCable board specific pcmcia routines. + * + * Copyright 2003 MontaVista Software Inc. + * Author: Pete Popov, MontaVista Software, Inc. + * ppopov@mvista.com or source@mvista.com + * + * ######################################################################## + * + * This program is free software; you can distribute it and/or modify it + * under the terms of the GNU General Public License (Version 2) as + * published by the Free Software Foundation. + * + * This program is distributed in the hope 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include "cs_internal.h" + +#include +#include +#include + +#include +#include +#include + +#if 0 +#define DEBUG(x,args...) printk(__FUNCTION__ ": " x,##args) +#else +#define DEBUG(x,args...) +#endif + +static int xxs1500_pcmcia_init(struct pcmcia_init *init) +{ + return PCMCIA_NUM_SOCKS; +} + +static int xxs1500_pcmcia_shutdown(void) +{ + /* turn off power */ + au_writel(au_readl(GPIO2_PINSTATE) | (1<<14)|(1<<30), + GPIO2_OUTPUT); + au_sync_delay(100); + + /* assert reset */ + au_writel(au_readl(GPIO2_PINSTATE) | (1<<4)|(1<<20), + GPIO2_OUTPUT); + au_sync_delay(100); + return 0; +} + + +static int +xxs1500_pcmcia_socket_state(unsigned sock, struct pcmcia_state *state) +{ + u32 inserted; u32 vs; + unsigned long gpio, gpio2; + + if(sock > PCMCIA_MAX_SOCK) return -1; + + gpio = au_readl(SYS_PINSTATERD); + gpio2 = au_readl(GPIO2_PINSTATE); + + vs = gpio2 & ((1<<8) | (1<<9)); + inserted = (!(gpio & 0x1) && !(gpio & 0x2)); + + state->ready = 0; + state->vs_Xv = 0; + state->vs_3v = 0; + state->detect = 0; + + if (inserted) { + switch (vs) { + case 0: + case 1: + case 2: + state->vs_3v=1; + break; + case 3: /* 5V */ + default: + /* return without setting 'detect' */ + printk(KERN_ERR "au1x00_cs: unsupported VS\n", + vs); + return; + } + state->detect = 1; + } + + if (state->detect) { + state->ready = 1; + } + + state->bvd1= gpio2 & (1<<10); + state->bvd2 = gpio2 & (1<<11); + state->wrprot=0; + return 1; +} + + +static int xxs1500_pcmcia_get_irq_info(struct pcmcia_irq_info *info) +{ + + if(info->sock > PCMCIA_MAX_SOCK) return -1; + info->irq = PCMCIA_IRQ; + return 0; +} + + +static int +xxs1500_pcmcia_configure_socket(const struct pcmcia_configure *configure) +{ + + if(configure->sock > PCMCIA_MAX_SOCK) return -1; + + DEBUG("Vcc %dV Vpp %dV, reset %d\n", + configure->vcc, configure->vpp, configure->reset); + + switch(configure->vcc){ + case 33: /* Vcc 3.3V */ + /* turn on power */ + DEBUG("turn on power\n"); + au_writel((au_readl(GPIO2_PINSTATE) & ~(1<<14))|(1<<30), + GPIO2_OUTPUT); + au_sync_delay(100); + break; + case 50: /* Vcc 5V */ + default: /* what's this ? */ + printk(KERN_ERR "au1x00_cs: unsupported VCC\n"); + case 0: /* Vcc 0 */ + /* turn off power */ + au_sync_delay(100); + au_writel(au_readl(GPIO2_PINSTATE) | (1<<14)|(1<<30), + GPIO2_OUTPUT); + break; + } + + if (!configure->reset) { + DEBUG("deassert reset\n"); + au_writel((au_readl(GPIO2_PINSTATE) & ~(1<<4))|(1<<20), + GPIO2_OUTPUT); + au_sync_delay(100); + au_writel((au_readl(GPIO2_PINSTATE) & ~(1<<5))|(1<<21), + GPIO2_OUTPUT); + } + else { + DEBUG("assert reset\n"); + au_writel(au_readl(GPIO2_PINSTATE) | (1<<4)|(1<<20), + GPIO2_OUTPUT); + } + au_sync_delay(100); + return 0; +} + +struct pcmcia_low_level xxs1500_pcmcia_ops = { + xxs1500_pcmcia_init, + xxs1500_pcmcia_shutdown, + xxs1500_pcmcia_socket_state, + xxs1500_pcmcia_get_irq_info, + xxs1500_pcmcia_configure_socket +}; diff -puN drivers/pcmcia/Kconfig~mips-amd-alchemy-update drivers/pcmcia/Kconfig --- 25/drivers/pcmcia/Kconfig~mips-amd-alchemy-update 2005-01-29 11:26:00.219714520 -0800 +++ 25-akpm/drivers/pcmcia/Kconfig 2005-01-29 11:26:00.275706008 -0800 @@ -134,6 +134,10 @@ config HD64465_PCMCIA tristate "HD64465 host bridge support" depends on HD64465 && PCMCIA +config PCMCIA_AU1X00 + tristate "Au1x00 pcmcia support" + depends on SOC_AU1X00 && PCMCIA + config PCMCIA_SA1100 tristate "SA1100 support" depends on ARM && ARCH_SA1100 && PCMCIA diff -puN drivers/pcmcia/Makefile~mips-amd-alchemy-update drivers/pcmcia/Makefile --- 25/drivers/pcmcia/Makefile~mips-amd-alchemy-update 2005-01-29 11:26:00.220714368 -0800 +++ 25-akpm/drivers/pcmcia/Makefile 2005-01-29 11:26:00.276705856 -0800 @@ -30,10 +30,21 @@ obj-$(CONFIG_PCMCIA_SA1111) += sa11xx_ obj-$(CONFIG_PCMCIA_PXA2XX) += pxa2xx_core.o pxa2xx_cs.o obj-$(CONFIG_M32R_PCC) += m32r_pcc.o obj-$(CONFIG_M32R_CFC) += m32r_cfc.o +obj-$(CONFIG_PCMCIA_AU1X00) += au1x00_ss.o sa11xx_core-y += soc_common.o sa11xx_base.o pxa2xx_core-y += soc_common.o pxa2xx_base.o +au1x00_ss-y += au1000_generic.o +au1x00_ss-$(CONFIG_MIPS_PB1000) += au1000_pb1x00.o +au1x00_ss-$(CONFIG_MIPS_PB1100) += au1000_pb1x00.o +au1x00_ss-$(CONFIG_MIPS_PB1500) += au1000_pb1x00.o +au1x00_ss-$(CONFIG_MIPS_DB1000) += au1000_db1x00.o +au1x00_ss-$(CONFIG_MIPS_DB1100) += au1000_db1x00.o +au1x00_ss-$(CONFIG_MIPS_DB1500) += au1000_db1x00.o +au1x00_ss-$(CONFIG_MIPS_DB1550) += au1000_db1x00.o +au1x00_ss-$(CONFIG_MIPS_XXS1500) += au1000_xxs1500.o + sa1111_cs-y += sa1111_generic.o sa1111_cs-$(CONFIG_ASSABET_NEPONSET) += sa1100_neponset.o sa1111_cs-$(CONFIG_SA1100_BADGE4) += sa1100_badge4.o diff -puN /dev/null drivers/usb/host/ohci-au1xxx.c --- /dev/null 2003-09-15 06:40:47.000000000 -0700 +++ 25-akpm/drivers/usb/host/ohci-au1xxx.c 2005-01-29 11:26:00.279705400 -0800 @@ -0,0 +1,362 @@ +/* + * OHCI HCD (Host Controller Driver) for USB. + * + * (C) Copyright 1999 Roman Weissgaerber + * (C) Copyright 2000-2002 David Brownell + * (C) Copyright 2002 Hewlett-Packard Company + * + * Bus Glue for AMD Alchemy Au1xxx + * + * Written by Christopher Hoover + * Based on fragments of previous driver by Rusell King et al. + * + * Modified for LH7A404 from ohci-sa1111.c + * by Durgesh Pattamatta + * Modified for AMD Alchemy Au1xxx + * by Matt Porter + * + * This file is licenced under the GPL. + */ + +#include + +#define USBH_ENABLE_BE (1<<0) +#define USBH_ENABLE_C (1<<1) +#define USBH_ENABLE_E (1<<2) +#define USBH_ENABLE_CE (1<<3) +#define USBH_ENABLE_RD (1<<4) + +#ifdef __LITTLE_ENDIAN +#define USBH_ENABLE_INIT (USBH_ENABLE_CE | USBH_ENABLE_E | USBH_ENABLE_C) +#elif __BIG_ENDIAN +#define USBH_ENABLE_INIT (USBH_ENABLE_CE | USBH_ENABLE_E | USBH_ENABLE_C | USBH_ENABLE_BE) +#else +#error not byte order defined +#endif + +extern int usb_disabled(void); + +/*-------------------------------------------------------------------------*/ + +static void au1xxx_start_hc(struct platform_device *dev) +{ + printk(KERN_DEBUG __FILE__ + ": starting Au1xxx OHCI USB Controller\n"); + + /* enable host controller */ + au_writel(USBH_ENABLE_CE, USB_HOST_CONFIG); + udelay(1000); + au_writel(USBH_ENABLE_INIT, USB_HOST_CONFIG); + udelay(1000); + + /* wait for reset complete (read register twice; see au1500 errata) */ + while (au_readl(USB_HOST_CONFIG), + !(au_readl(USB_HOST_CONFIG) & USBH_ENABLE_RD)) + udelay(1000); + + printk(KERN_DEBUG __FILE__ + ": Clock to USB host has been enabled \n"); +} + +static void au1xxx_stop_hc(struct platform_device *dev) +{ + printk(KERN_DEBUG __FILE__ + ": stopping Au1xxx OHCI USB Controller\n"); + + /* Disable clock */ + au_writel(readl((void *)USB_HOST_CONFIG) & ~USBH_ENABLE_CE, USB_HOST_CONFIG); +} + + +/*-------------------------------------------------------------------------*/ + + +static irqreturn_t usb_hcd_au1xxx_hcim_irq (int irq, void *__hcd, + struct pt_regs * r) +{ + struct usb_hcd *hcd = __hcd; + + return usb_hcd_irq(irq, hcd, r); +} + +/*-------------------------------------------------------------------------*/ + +void usb_hcd_au1xxx_remove (struct usb_hcd *, struct platform_device *); + +/* configure so an HC device and id are always provided */ +/* always called with process context; sleeping is OK */ + + +/** + * usb_hcd_au1xxx_probe - initialize Au1xxx-based HCDs + * Context: !in_interrupt() + * + * Allocates basic resources for this USB host controller, and + * then invokes the start() method for the HCD associated with it + * through the hotplug entry's driver_data. + * + */ +int usb_hcd_au1xxx_probe (const struct hc_driver *driver, + struct usb_hcd **hcd_out, + struct platform_device *dev) +{ + int retval; + struct usb_hcd *hcd = 0; + + unsigned int *addr = NULL; + + if (!request_mem_region(dev->resource[0].start, + dev->resource[0].end + - dev->resource[0].start + 1, hcd_name)) { + pr_debug("request_mem_region failed"); + return -EBUSY; + } + + au1xxx_start_hc(dev); + + addr = ioremap(dev->resource[0].start, + dev->resource[0].end + - dev->resource[0].start + 1); + if (!addr) { + pr_debug("ioremap failed"); + retval = -ENOMEM; + goto err1; + } + + if(dev->resource[1].flags != IORESOURCE_IRQ) { + pr_debug ("resource[1] is not IORESOURCE_IRQ"); + retval = -ENOMEM; + goto err1; + } + + hcd = usb_create_hcd(driver); + if (hcd == NULL) { + pr_debug ("usb_create_hcd failed"); + retval = -ENOMEM; + goto err1; + } + ohci_hcd_init(hcd_to_ohci(hcd)); + + hcd->irq = dev->resource[1].start; + hcd->regs = addr; + hcd->self.controller = &dev->dev; + + retval = hcd_buffer_create (hcd); + if (retval != 0) { + pr_debug ("pool alloc fail"); + goto err2; + } + + retval = request_irq (hcd->irq, usb_hcd_au1xxx_hcim_irq, SA_INTERRUPT, + hcd->driver->description, hcd); + if (retval != 0) { + pr_debug("request_irq failed"); + retval = -EBUSY; + goto err3; + } + + pr_debug ("%s (Au1xxx) at 0x%p, irq %d", + hcd->driver->description, hcd->regs, hcd->irq); + + hcd->self.bus_name = "au1xxx"; + + usb_register_bus (&hcd->self); + + if ((retval = driver->start (hcd)) < 0) + { + usb_hcd_au1xxx_remove(hcd, dev); + printk("bad driver->start\n"); + return retval; + } + + *hcd_out = hcd; + return 0; + + err3: + hcd_buffer_destroy (hcd); + err2: + usb_put_hcd(hcd); + err1: + au1xxx_stop_hc(dev); + release_mem_region(dev->resource[0].start, + dev->resource[0].end + - dev->resource[0].start + 1); + return retval; +} + + +/* may be called without controller electrically present */ +/* may be called with controller, bus, and devices active */ + +/** + * usb_hcd_au1xxx_remove - shutdown processing for Au1xxx-based HCDs + * @dev: USB Host Controller being removed + * Context: !in_interrupt() + * + * Reverses the effect of usb_hcd_au1xxx_probe(), first invoking + * the HCD's stop() method. It is always called from a thread + * context, normally "rmmod", "apmd", or something similar. + * + */ +void usb_hcd_au1xxx_remove (struct usb_hcd *hcd, struct platform_device *dev) +{ + pr_debug ("remove: %s, state %x", hcd->self.bus_name, hcd->state); + + if (in_interrupt ()) + BUG (); + + hcd->state = USB_STATE_QUIESCING; + + pr_debug ("%s: roothub graceful disconnect", hcd->self.bus_name); + usb_disconnect (&hcd->self.root_hub); + + hcd->driver->stop (hcd); + hcd->state = USB_STATE_HALT; + + free_irq (hcd->irq, hcd); + hcd_buffer_destroy (hcd); + + usb_deregister_bus (&hcd->self); + + au1xxx_stop_hc(dev); + release_mem_region(dev->resource[0].start, + dev->resource[0].end + - dev->resource[0].start + 1); +} + +/*-------------------------------------------------------------------------*/ + +static int __devinit +ohci_au1xxx_start (struct usb_hcd *hcd) +{ + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + int ret; + + ohci_dbg (ohci, "ohci_au1xxx_start, ohci:%p", ohci); + + if ((ret = ohci_init (ohci)) < 0) + return ret; + + if ((ret = ohci_run (ohci)) < 0) { + err ("can't start %s", hcd->self.bus_name); + ohci_stop (hcd); + return ret; + } + + return 0; +} + +/*-------------------------------------------------------------------------*/ + +static const struct hc_driver ohci_au1xxx_hc_driver = { + .description = hcd_name, + .product_desc = "Au1xxx OHCI", + .hcd_priv_size = sizeof(struct ohci_hcd), + + /* + * generic hardware linkage + */ + .irq = ohci_irq, + .flags = HCD_USB11, + + /* + * basic lifecycle operations + */ + .start = ohci_au1xxx_start, +#ifdef CONFIG_PM + /* suspend: ohci_au1xxx_suspend, -- tbd */ + /* resume: ohci_au1xxx_resume, -- tbd */ +#endif /*CONFIG_PM*/ + .stop = ohci_stop, + + /* + * managing i/o requests and associated device resources + */ + .urb_enqueue = ohci_urb_enqueue, + .urb_dequeue = ohci_urb_dequeue, + .endpoint_disable = ohci_endpoint_disable, + + /* + * scheduling support + */ + .get_frame_number = ohci_get_frame, + + /* + * root hub support + */ + .hub_status_data = ohci_hub_status_data, + .hub_control = ohci_hub_control, +}; + +/*-------------------------------------------------------------------------*/ + +static int ohci_hcd_au1xxx_drv_probe(struct device *dev) +{ + struct platform_device *pdev = to_platform_device(dev); + struct usb_hcd *hcd = NULL; + int ret; + + pr_debug ("In ohci_hcd_au1xxx_drv_probe"); + + if (usb_disabled()) + return -ENODEV; + + ret = usb_hcd_au1xxx_probe(&ohci_au1xxx_hc_driver, &hcd, pdev); + + if (ret == 0) + dev_set_drvdata(dev, hcd); + + return ret; +} + +static int ohci_hcd_au1xxx_drv_remove(struct device *dev) +{ + struct platform_device *pdev = to_platform_device(dev); + struct usb_hcd *hcd = dev_get_drvdata(dev); + + usb_hcd_au1xxx_remove(hcd, pdev); + dev_set_drvdata(dev, NULL); + return 0; +} + /*TBD*/ +/*static int ohci_hcd_au1xxx_drv_suspend(struct device *dev) +{ + struct platform_device *pdev = to_platform_device(dev); + struct usb_hcd *hcd = dev_get_drvdata(dev); + + return 0; +} +static int ohci_hcd_au1xxx_drv_resume(struct device *dev) +{ + struct platform_device *pdev = to_platform_device(dev); + struct usb_hcd *hcd = dev_get_drvdata(dev); + + return 0; +} +*/ + +static struct device_driver ohci_hcd_au1xxx_driver = { + .name = "au1xxx-ohci", + .bus = &platform_bus_type, + .probe = ohci_hcd_au1xxx_drv_probe, + .remove = ohci_hcd_au1xxx_drv_remove, + /*.suspend = ohci_hcd_au1xxx_drv_suspend, */ + /*.resume = ohci_hcd_au1xxx_drv_resume, */ +}; + +static int __init ohci_hcd_au1xxx_init (void) +{ + pr_debug (DRIVER_INFO " (Au1xxx)"); + pr_debug ("block sizes: ed %d td %d\n", + sizeof (struct ed), sizeof (struct td)); + + return driver_register(&ohci_hcd_au1xxx_driver); +} + +static void __exit ohci_hcd_au1xxx_cleanup (void) +{ + driver_unregister(&ohci_hcd_au1xxx_driver); +} + +module_init (ohci_hcd_au1xxx_init); +module_exit (ohci_hcd_au1xxx_cleanup); diff -puN drivers/usb/host/ohci-hcd.c~mips-amd-alchemy-update drivers/usb/host/ohci-hcd.c --- 25/drivers/usb/host/ohci-hcd.c~mips-amd-alchemy-update 2005-01-29 11:26:00.222714064 -0800 +++ 25-akpm/drivers/usb/host/ohci-hcd.c 2005-01-29 11:26:00.277705704 -0800 @@ -897,11 +897,16 @@ MODULE_LICENSE ("GPL"); #include "ohci-pxa27x.c" #endif +#ifdef CONFIG_SOC_AU1X00 +#include "ohci-au1xxx.c" +#endif + #if !(defined(CONFIG_PCI) \ || defined(CONFIG_SA1111) \ || defined(CONFIG_ARCH_OMAP) \ || defined (CONFIG_ARCH_LH7A404) \ || defined (CONFIG_PXA27x) \ + || defined (CONFIG_SOC_AU1X00) \ ) #error "missing bus glue for ohci-hcd" #endif diff -puN /dev/null drivers/video/au1100fb.c --- /dev/null 2003-09-15 06:40:47.000000000 -0700 +++ 25-akpm/drivers/video/au1100fb.c 2005-01-29 11:26:00.291703576 -0800 @@ -0,0 +1,676 @@ +/* + * BRIEF MODULE DESCRIPTION + * Au1100 LCD Driver. + * + * Copyright 2002 MontaVista Software + * Author: MontaVista Software, Inc. + * ppopov@mvista.com or source@mvista.com + * + * Copyright 2002 Alchemy Semiconductor + * Author: Alchemy Semiconductor + * + * Based on: + * linux/drivers/video/skeletonfb.c -- Skeleton for a frame buffer device + * Created 28 Dec 1997 by Geert Uytterhoeven + * + * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * 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., + * 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include "au1100fb.h" + +#include