From: <kr...@us...> - 2006-08-19 02:12:26
|
Revision: 281 Author: krisk84 Date: 2006-08-18 19:11:33 -0700 (Fri, 18 Aug 2006) ViewCVS: http://svn.sourceforge.net/astlinux/?rev=281&view=rev Log Message: ----------- initial gumstix support Modified Paths: -------------- trunk/target/device/Config.in trunk/target/device/net4801/Makefile.in Added Paths: ----------- trunk/target/device/Gumstix/ trunk/target/device/Gumstix/Config.in trunk/target/device/Gumstix/Makefile.in trunk/target/device/Gumstix/basix-connex/ trunk/target/device/Gumstix/basix-connex/busybox.config trunk/target/device/Gumstix/basix-connex/kernel-patches/ trunk/target/device/Gumstix/basix-connex/kernel-patches/add_input_randomness_export.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/arch-config.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/audio.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/bkpxa-pxa-ac97.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/bkpxa-pxa-cpu.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/bkpxa-pxa-cpufreq.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/board-init.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/bugfix-i2c-include.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/bugfix-mmc-clock.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/bugfix-mtd-onenand.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/bugfix-pxa-audio.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/bugfix-pxa-cpufreq.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/bugfix-pxa-serial-mctrl.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/bugfix-rndis.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/bugfix-serial-interrupt.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/bugfix-serial-register-status.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/compact-flash.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/cpufreq-better-freqs.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/cpufreq-ondemand-by-default.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/defconfig.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/disable-uncompress-message.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/ethernet-config.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/flash.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/header.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/kconfig-arch-cleanup.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/kernel-osx.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/kobject_get_path_export.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/mach-types-fix.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/mmc-card-detect.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/modular-init-bluetooth.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/modular-init-smc91x.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/modular-init-usb-gadget.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/proc-gpio.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/pxa-udc-gpio.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/pxa255-gpio-count-bugfix.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/pxa2xx_udc.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/rmk-2022-2-rtctime-sa110-pxa255-driver.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/serial-divisor.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/serial-ether-addr.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/series trunk/target/device/Gumstix/basix-connex/kernel-patches/smc-ether-addr.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/ucb1400-ac97-audio.patch trunk/target/device/Gumstix/basix-connex/kernel-patches/ucb1400-touchscreen.patch trunk/target/device/Gumstix/basix-connex/linux.config trunk/target/device/Gumstix/basix-connex/linux.mk trunk/target/device/Gumstix/basix-connex/uClibc.config trunk/target/device/Gumstix/etc-gumstix-release/ trunk/target/device/Gumstix/etc-gumstix-release/etc-gumstix-release.mk trunk/target/device/net4801/busybox.config trunk/target/device/net4801/kernel-patches/ trunk/target/device/net4801/kernel-patches/linux_natsemi.patch trunk/target/device/net4801/kernel-patches/linux_scx200-hr-timer.patch trunk/target/device/net4801/linux.config trunk/target/device/net4801/linux.mk Removed Paths: ------------- trunk/package/linux/linux_natsemi.patch trunk/package/linux/linux_scx200-hr-timer.patch trunk/target/device/net4801/linux-sc1100-wlan-2.6.16.12.config Deleted: trunk/package/linux/linux_natsemi.patch =================================================================== --- trunk/package/linux/linux_natsemi.patch 2006-08-19 01:30:20 UTC (rev 280) +++ trunk/package/linux/linux_natsemi.patch 2006-08-19 02:11:33 UTC (rev 281) @@ -1,299 +0,0 @@ -=================================================================== ---- linux-2.6.15.2.orig/drivers/net/natsemi.c 2006-01-31 06:25:07.000000000 +0000 -+++ linux-2.6.15.2/drivers/net/natsemi.c 2006-02-01 22:59:29.000000000 +0000 -@@ -3,6 +3,7 @@ - Written/copyright 1999-2001 by Donald Becker. - Portions copyright (c) 2001,2002 Sun Microsystems (th...@su...) - Portions copyright 2001,2002 Manfred Spraul (ma...@co...) -+ Portions copyright 2004 Harald Welte <la...@gn...> - - This software may be used and distributed according to the terms of - the GNU General Public License (GPL), incorporated herein by reference. -@@ -135,8 +136,6 @@ - - TODO: - * big endian support with CFG:BEM instead of cpu_to_le32 -- * support for an external PHY -- * NAPI - */ - - #include <linux/config.h> -@@ -160,6 +159,7 @@ - #include <linux/mii.h> - #include <linux/crc32.h> - #include <linux/bitops.h> -+#include <linux/prefetch.h> - #include <asm/processor.h> /* Processor type for cache alignment. */ - #include <asm/io.h> - #include <asm/irq.h> -@@ -183,8 +183,6 @@ - NETIF_MSG_TX_ERR) - static int debug = -1; - --/* Maximum events (Rx packets, etc.) to handle at each interrupt. */ --static int max_interrupt_work = 20; - static int mtu; - - /* Maximum number of multicast addresses to filter (vs. rx-all-multicast). -@@ -251,14 +249,11 @@ MODULE_AUTHOR("Donald Becker <becker@scy - MODULE_DESCRIPTION("National Semiconductor DP8381x series PCI Ethernet driver"); - MODULE_LICENSE("GPL"); - --module_param(max_interrupt_work, int, 0); - module_param(mtu, int, 0); - module_param(debug, int, 0); - module_param(rx_copybreak, int, 0); - module_param_array(options, int, NULL, 0); - module_param_array(full_duplex, int, NULL, 0); --MODULE_PARM_DESC(max_interrupt_work, -- "DP8381x maximum events handled per interrupt"); - MODULE_PARM_DESC(mtu, "DP8381x MTU (all boards)"); - MODULE_PARM_DESC(debug, "DP8381x default debug level"); - MODULE_PARM_DESC(rx_copybreak, -@@ -691,6 +686,8 @@ struct netdev_private { - /* Based on MTU+slack. */ - unsigned int rx_buf_sz; - int oom; -+ /* Interrupt status */ -+ u32 intr_status; - /* Do not touch the nic registers */ - int hands_off; - /* external phy that is used: only valid if dev->if_port != PORT_TP */ -@@ -748,7 +745,8 @@ static void init_registers(struct net_de - static int start_tx(struct sk_buff *skb, struct net_device *dev); - static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *regs); - static void netdev_error(struct net_device *dev, int intr_status); --static void netdev_rx(struct net_device *dev); -+static int natsemi_poll(struct net_device *dev, int *budget); -+static void netdev_rx(struct net_device *dev, int *work_done, int work_to_do); - static void netdev_tx_done(struct net_device *dev); - static int natsemi_change_mtu(struct net_device *dev, int new_mtu); - #ifdef CONFIG_NET_POLL_CONTROLLER -@@ -776,6 +774,18 @@ static inline void __iomem *ns_ioaddr(st - return (void __iomem *) dev->base_addr; - } - -+static inline void natsemi_irq_enable(struct net_device *dev) -+{ -+ writel(1, ns_ioaddr(dev) + IntrEnable); -+ readl(ns_ioaddr(dev) + IntrEnable); -+} -+ -+static inline void natsemi_irq_disable(struct net_device *dev) -+{ -+ writel(0, ns_ioaddr(dev) + IntrEnable); -+ readl(ns_ioaddr(dev) + IntrEnable); -+} -+ - static void move_int_phy(struct net_device *dev, int addr) - { - struct netdev_private *np = netdev_priv(dev); -@@ -879,6 +889,7 @@ static int __devinit natsemi_probe1 (str - spin_lock_init(&np->lock); - np->msg_enable = (debug >= 0) ? (1<<debug)-1 : NATSEMI_DEF_MSG; - np->hands_off = 0; -+ np->intr_status = 0; - - /* Initial port: - * - If the nic was configured to use an external phy and if find_mii -@@ -932,6 +943,9 @@ static int __devinit natsemi_probe1 (str - dev->do_ioctl = &netdev_ioctl; - dev->tx_timeout = &tx_timeout; - dev->watchdog_timeo = TX_TIMEOUT; -+ dev->poll = natsemi_poll; -+ dev->weight = 64; -+ - #ifdef CONFIG_NET_POLL_CONTROLLER - dev->poll_controller = &natsemi_poll_controller; - #endif -@@ -2158,68 +2172,92 @@ static void netdev_tx_done(struct net_de - } - } - --/* The interrupt handler does all of the Rx thread work and cleans up -- after the Tx thread. */ -+/* The interrupt handler doesn't actually handle interrupts itself, it -+ * schedules a NAPI poll if there is anything to do. */ - static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *rgs) - { - struct net_device *dev = dev_instance; - struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); -- int boguscnt = max_interrupt_work; -- unsigned int handled = 0; - - if (np->hands_off) - return IRQ_NONE; -- do { -- /* Reading automatically acknowledges all int sources. */ -- u32 intr_status = readl(ioaddr + IntrStatus); -+ -+ /* Reading automatically acknowledges. */ -+ np->intr_status = readl(ioaddr + IntrStatus); - -- if (netif_msg_intr(np)) -- printk(KERN_DEBUG -- "%s: Interrupt, status %#08x, mask %#08x.\n", -- dev->name, intr_status, -- readl(ioaddr + IntrMask)); -+ if (netif_msg_intr(np)) -+ printk(KERN_DEBUG -+ "%s: Interrupt, status %#08x, mask %#08x.\n", -+ dev->name, np->intr_status, -+ readl(ioaddr + IntrMask)); - -- if (intr_status == 0) -- break; -- handled = 1; -+ if (!np->intr_status) -+ return IRQ_NONE; - -- if (intr_status & -- (IntrRxDone | IntrRxIntr | RxStatusFIFOOver | -- IntrRxErr | IntrRxOverrun)) { -- netdev_rx(dev); -- } -+ prefetch(&np->rx_skbuff[np->cur_rx % RX_RING_SIZE]); -+ -+ if (netif_rx_schedule_prep(dev)) { -+ /* Disable interrupts and register for poll */ -+ natsemi_irq_disable(dev); -+ __netif_rx_schedule(dev); -+ } -+ return IRQ_HANDLED; -+} - -- if (intr_status & -- (IntrTxDone | IntrTxIntr | IntrTxIdle | IntrTxErr)) { -+/* This is the NAPI poll routine. As well as the standard RX handling -+ * it also handles all other interrupts that the chip might raise. -+ */ -+static int natsemi_poll(struct net_device *dev, int *budget) -+{ -+ struct netdev_private *np = netdev_priv(dev); -+ void __iomem * ioaddr = ns_ioaddr(dev); -+ -+ int work_to_do = min(*budget, dev->quota); -+ int work_done = 0; -+ -+ do { -+ if (np->intr_status & -+ (IntrTxDone | IntrTxIntr | IntrTxIdle | IntrTxErr)) { - spin_lock(&np->lock); - netdev_tx_done(dev); - spin_unlock(&np->lock); - } - - /* Abnormal error summary/uncommon events handlers. */ -- if (intr_status & IntrAbnormalSummary) -- netdev_error(dev, intr_status); -- -- if (--boguscnt < 0) { -- if (netif_msg_intr(np)) -- printk(KERN_WARNING -- "%s: Too much work at interrupt, " -- "status=%#08x.\n", -- dev->name, intr_status); -- break; -+ if (np->intr_status & IntrAbnormalSummary) -+ netdev_error(dev, np->intr_status); -+ -+ if (np->intr_status & -+ (IntrRxDone | IntrRxIntr | RxStatusFIFOOver | -+ IntrRxErr | IntrRxOverrun)) { -+ netdev_rx(dev, &work_done, work_to_do); - } -- } while (1); -+ -+ *budget -= work_done; -+ dev->quota -= work_done; - -- if (netif_msg_intr(np)) -- printk(KERN_DEBUG "%s: exiting interrupt.\n", dev->name); -+ if (work_done >= work_to_do) -+ return 1; -+ -+ np->intr_status = readl(ioaddr + IntrStatus); -+ } while (np->intr_status); - -- return IRQ_RETVAL(handled); -+ netif_rx_complete(dev); -+ -+ /* Reenable interrupts providing nothing is trying to shut -+ * the chip down. */ -+ spin_lock(&np->lock); -+ if (!np->hands_off && netif_running(dev)) -+ natsemi_irq_enable(dev); -+ spin_unlock(&np->lock); -+ -+ return 0; - } - - /* This routine is logically part of the interrupt handler, but separated - for clarity and better register allocation. */ --static void netdev_rx(struct net_device *dev) -+static void netdev_rx(struct net_device *dev, int *work_done, int work_to_do) - { - struct netdev_private *np = netdev_priv(dev); - int entry = np->cur_rx % RX_RING_SIZE; -@@ -2237,6 +2275,12 @@ static void netdev_rx(struct net_device - entry, desc_status); - if (--boguscnt < 0) - break; -+ -+ if (*work_done >= work_to_do) -+ break; -+ -+ (*work_done)++; -+ - pkt_len = (desc_status & DescSizeMask) - 4; - if ((desc_status&(DescMore|DescPktOK|DescRxLong)) != DescPktOK){ - if (desc_status & DescMore) { -@@ -2293,7 +2337,7 @@ static void netdev_rx(struct net_device - np->rx_skbuff[entry] = NULL; - } - skb->protocol = eth_type_trans(skb, dev); -- netif_rx(skb); -+ netif_receive_skb(skb); - dev->last_rx = jiffies; - np->stats.rx_packets++; - np->stats.rx_bytes += pkt_len; -@@ -3074,9 +3118,7 @@ static int netdev_close(struct net_devic - del_timer_sync(&np->timer); - disable_irq(dev->irq); - spin_lock_irq(&np->lock); -- /* Disable interrupts, and flush posted writes */ -- writel(0, ioaddr + IntrEnable); -- readl(ioaddr + IntrEnable); -+ natsemi_irq_disable(dev); - np->hands_off = 1; - spin_unlock_irq(&np->lock); - enable_irq(dev->irq); -@@ -3158,6 +3200,9 @@ static void __devexit natsemi_remove1 (s - * * netdev_timer: timer stopped by natsemi_suspend. - * * intr_handler: doesn't acquire the spinlock. suspend calls - * disable_irq() to enforce synchronization. -+ * * natsemi_poll: checks before reenabling interrupts. suspend -+ * sets hands_off, disables interrupts and then waits with -+ * netif_poll_disable(). - * - * Interrupts must be disabled, otherwise hands_off can cause irq storms. - */ -@@ -3183,6 +3228,8 @@ static int natsemi_suspend (struct pci_d - spin_unlock_irq(&np->lock); - enable_irq(dev->irq); - -+ netif_poll_disable(dev); -+ - /* Update the error counts. */ - __get_stats(dev); - -@@ -3235,6 +3282,7 @@ static int natsemi_resume (struct pci_de - mod_timer(&np->timer, jiffies + 1*HZ); - } - netif_device_attach(dev); -+ netif_poll_enable(dev); - out: - rtnl_unlock(); - return 0; - Deleted: trunk/package/linux/linux_scx200-hr-timer.patch =================================================================== --- trunk/package/linux/linux_scx200-hr-timer.patch 2006-08-19 01:30:20 UTC (rev 280) +++ trunk/package/linux/linux_scx200-hr-timer.patch 2006-08-19 02:11:33 UTC (rev 281) @@ -1,317 +0,0 @@ -diff -Naurp linux-2.6.12-rc6.orig/arch/i386/Kconfig linux-2.6.12-rc6/arch/i386/Kconfig ---- linux-2.6.12-rc6.orig/arch/i386/Kconfig 2005-06-07 14:56:02.000000000 +0100 -+++ linux-2.6.12-rc6/arch/i386/Kconfig 2005-06-07 16:43:19.000000000 +0100 -@@ -458,6 +458,17 @@ config HPET_EMULATE_RTC - bool "Provide RTC interrupt" - depends on HPET_TIMER && RTC=y - -+config SCx200HR_TIMER -+ bool "NatSemi SCx200 27MHz High-Resolution Timer Support" -+ help -+ Some of the AMD (formerly National Semiconductor) Geode -+ processors, notably the SC1100, suffer from a buggy time -+ stamp counter which causes them to lose time when the -+ processor is sleeping. Enable this option to use the -+ on-board 27Mz high-resolution timer to keep time instead. -+ depends on (SCx200) -+ default n -+ - config SMP - bool "Symmetric multi-processing support" - ---help--- -diff -Naurp linux-2.6.12-rc6.orig/arch/i386/kernel/scx200.c linux-2.6.12-rc6/arch/i386/kernel/scx200.c ---- linux-2.6.12-rc6.orig/arch/i386/kernel/scx200.c 2005-06-07 14:56:02.000000000 +0100 -+++ linux-2.6.12-rc6/arch/i386/kernel/scx200.c 2005-06-07 16:43:19.000000000 +0100 -@@ -27,6 +27,10 @@ long scx200_gpio_shadow[2]; - - unsigned scx200_cb_base = 0; - -+#ifdef CONFIG_SCx200HR_TIMER -+extern void __devinit scx200hr_timer_enable(void); -+#endif -+ - static struct pci_device_id scx200_tbl[] = { - { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SCx200_BRIDGE) }, - { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SC1100_BRIDGE) }, -@@ -83,6 +87,9 @@ static int __devinit scx200_probe(struct - printk(KERN_INFO NAME ": Configuration Block base 0x%x\n", scx200_cb_base); - } - -+#ifdef CONFIG_SCx200HR_TIMER -+ scx200hr_timer_enable(); -+#endif - return 0; - } - -diff -Naurp linux-2.6.12-rc6.orig/arch/i386/kernel/timers/Makefile linux-2.6.12-rc6/arch/i386/kernel/timers/Makefile ---- linux-2.6.12-rc6.orig/arch/i386/kernel/timers/Makefile 2004-03-11 18:21:13.000000000 +0000 -+++ linux-2.6.12-rc6/arch/i386/kernel/timers/Makefile 2005-06-07 16:43:19.000000000 +0100 -@@ -5,5 +5,6 @@ - obj-y := timer.o timer_none.o timer_tsc.o timer_pit.o common.o - - obj-$(CONFIG_X86_CYCLONE_TIMER) += timer_cyclone.o -+obj-$(CONFIG_SCx200HR_TIMER) += timer_scx200hr.o - obj-$(CONFIG_HPET_TIMER) += timer_hpet.o - obj-$(CONFIG_X86_PM_TIMER) += timer_pm.o -diff -Naurp linux-2.6.12-rc6.orig/arch/i386/kernel/timers/timer.c linux-2.6.12-rc6/arch/i386/kernel/timers/timer.c ---- linux-2.6.12-rc6.orig/arch/i386/kernel/timers/timer.c 2004-12-26 14:07:37.000000000 +0000 -+++ linux-2.6.12-rc6/arch/i386/kernel/timers/timer.c 2005-06-07 16:43:19.000000000 +0100 -@@ -13,6 +13,9 @@ - #endif - /* list of timers, ordered by preference, NULL terminated */ - static struct init_timer_opts* __initdata timers[] = { -+#ifdef CONFIG_SCx200HR_TIMER -+ &timer_scx200hr_init, -+#endif - #ifdef CONFIG_X86_CYCLONE_TIMER - &timer_cyclone_init, - #endif -diff -Naurp linux-2.6.12-rc6.orig/arch/i386/kernel/timers/timer_scx200hr.c linux-2.6.12-rc6/arch/i386/kernel/timers/timer_scx200hr.c ---- linux-2.6.12-rc6.orig/arch/i386/kernel/timers/timer_scx200hr.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.12-rc6/arch/i386/kernel/timers/timer_scx200hr.c 2005-06-07 16:43:19.000000000 +0100 -@@ -0,0 +1,220 @@ -+/* -+ * Copyright (C) 2005 Ted Phelps -+ * -+ * This is a clock driver for the Geode SCx200's 27MHz high-resolution -+ * timer as the system clock replacing its buggy time stamp counter. -+ * -+ * Based on parts of timer_hpet.c, timer_tsc.c and timer_pit.c. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of the -+ * License, or (at your option) any later version. -+ */ -+ -+#include <asm/timer.h> -+#include <linux/init.h> -+#include <linux/pci.h> -+#include <linux/seq_file.h> -+#include <linux/scx200.h> -+ -+#define NAME "scx200hr" -+ -+/* Read the clock */ -+#define SCx200HR_CLOCK() inl(scx200_cb_base + SCx200_TIMER_OFFSET) -+ -+/* High-resolution timer configuration address */ -+#define SCx200_TMCNFG_OFFSET (SCx200_TIMER_OFFSET + 5) -+ -+/* Set this bit to disable the 27 MHz input clock */ -+#define HR_TM27MPD (1 << 2) -+ -+/* Set this bit to update the count-up timer once per cycle of the -+ * 27MHz timer, clear it to update the timer once every 27 cycles -+ * (effectively producing a 1MHz counter) */ -+#define HR_TMCLKSEL (1 << 1) -+ -+/* Set this bit to enable the high-resolution timer interrupt */ -+#define HR_TMEN (1 << 0) -+ -+/* The frequency of the timer. Change this to 27000000 and set -+ * HR_TMCLKSEL in scx200hr_enable to run at the faster clock rate. At -+ * this point in time there is no point in doing so since times are -+ * recorded in usec except for the monotonic clock, which is only used -+ * by the hangcheck-timer. */ -+#define HR_FREQ 1000000 -+ -+/* The number of cycles of the high-resolution timer we expect to see -+ * in a single tick. Note that the result is <<8 for greater precision*/ -+#define HR_CYCLES_PER_TICK \ -+ (SH_DIV(HR_FREQ / 1000000 * TICK_NSEC, 1000, 8)) -+ -+/* The number of cycles of the high-resolution timer we expect to see -+ * in one microsecond, <<8 */ -+#define HR_CYCLES_PER_US ((HR_FREQ / 1000000) << 8) -+ -+ -+/* The value of the timer at the last interrupt */ -+static u32 clock_at_last_interrupt; -+ -+/* The number of high-resolution clock cycles beyond what we would -+ have expected that the last tick occurred, <<8 for greater precision */ -+static long clock_delay; -+ -+/* The total number of timer nanoseconds between the time the timer -+ * went live and the most recent tick. */ -+static unsigned long long total_ns; -+ -+/* A lock to guard access to the monotonic clock-related variables -+ * (total_ns and clocal_at_last_interrupt). Note that these are also -+ * protected by the xtime lock. */ -+static seqlock_t hr_lock = SEQLOCK_UNLOCKED; -+ -+/* Nonzero if the timer has been selected */ -+static int enable_scx200hr; -+ -+static int __init scx200hr_init(char *override) -+{ -+ /* Watch for a command-line clock= override */ -+ if (override[0] && strncmp(override, NAME, sizeof(NAME) - 1) != 0) { -+ return -ENODEV; -+ } -+ -+ /* Note that we should try to enable this timer once the -+ * configuration block address is known */ -+ printk(KERN_WARNING NAME ": timer not yet accessible; will probe later.\n"); -+ enable_scx200hr = 1; -+ return -EAGAIN; -+} -+ -+/* Called by the timer interrupt. The xtime_lock will be held. */ -+static void mark_offset_scx200hr(void) -+{ -+ u32 now, delta; -+ -+ /* Avoid races between the interrupt handler and monotonic_clock */ -+ write_seqlock(&hr_lock); -+ -+ /* Determine how many cycles have elapsed since the last interrupt */ -+ now = SCx200HR_CLOCK(); -+ delta = (now - clock_at_last_interrupt) << 8; -+ clock_at_last_interrupt = now; -+ -+ /* Update the total us count and remainder */ -+ total_ns += (delta * 1000) / HR_CYCLES_PER_US; -+ -+ /* The monotonic clock is safe now */ -+ write_sequnlock(&hr_lock); -+ -+ /* Adjust for interrupt handling delay */ -+ delta += clock_delay; -+ -+ /* The high-resolution timer is driven by a different crystal -+ * to the main CPU, so there's no guarantee that the 1KHz -+ * interrupt rate will coincide with the timer. This keeps -+ * the jiffies count in line with the high-resolution timer, -+ * which makes it possible for NTP to do its magic */ -+ if (delta < HR_CYCLES_PER_TICK) { -+#if 1 -+ /* Didn't go over 1000us: decrement jiffies to balance -+ * out increment in do_timer. This will cause some -+ * jitter if the frequency offset is large, as that -+ * adjustment will be applied about 1ms late. */ -+ jiffies_64--; -+ clock_delay = delta; -+#else /* !1 */ -+ clock_delay = 0; -+#endif /* 1 */ -+ } else if (delta < (HR_CYCLES_PER_TICK << 1) + (HR_CYCLES_PER_TICK >> 1)) { -+ clock_delay = delta - HR_CYCLES_PER_TICK; -+ } else { -+ jiffies_64 += delta / HR_CYCLES_PER_TICK - 2; -+ clock_delay = HR_CYCLES_PER_TICK + delta % HR_CYCLES_PER_TICK; -+ } -+} -+ -+/* Called by gettimeofday(). Returns the number of microseconds since -+ * the last interrupt. This is called with the xtime_lock held.*/ -+static unsigned long get_offset_scx200hr(void) -+{ -+ u32 delta; -+ -+ /* Get the time now and determine how many cycles have -+ * transpired since the interrupt, adjusting for timer -+ * interrupt jitter. */ -+ delta = ((SCx200HR_CLOCK() - clock_at_last_interrupt) << 8) + clock_delay; -+ -+ /* Convert from cycles<<8 to microseconds */ -+ return delta / HR_CYCLES_PER_US; -+} -+ -+/* Returns the number of nanoseconds since the init of the timer. */ -+static unsigned long long monotonic_clock_scx200hr(void) -+{ -+ u32 delta, seq; -+ unsigned long long ns; -+ -+ /* This function is *not* called with xtime_lock held, so we -+ * need to get the hr_lock to ensure we're not competing with -+ * mark_offset_scx200hr. */ -+ do { -+ seq = read_seqbegin(&hr_lock); -+ ns = total_ns; -+ delta = SCx200HR_CLOCK() - clock_at_last_interrupt; -+ } while (read_seqretry(&hr_lock, seq)); -+ -+ /* Convert cycles to microseconds and add. */ -+ return ns + delta * 1000 / HR_CYCLES_PER_US; -+} -+ -+/* scx200hr timer_opts struct */ -+struct timer_opts timer_scx200hr = { -+ .name = NAME, -+ .mark_offset = mark_offset_scx200hr, -+ .get_offset = get_offset_scx200hr, -+ .monotonic_clock = monotonic_clock_scx200hr, -+ .delay = NULL -+}; -+ -+/* And the init_timer struct */ -+struct init_timer_opts __devinitdata timer_scx200hr_init = { -+ .init = scx200hr_init, -+ .opts = &timer_scx200hr -+}; -+ -+ -+/* Switch from the original timer to the high-resolution timer */ -+void __devinit scx200hr_timer_enable(void) -+{ -+ /* Make sure the timer was requested and that the -+ * configuration block is present */ -+ if (!enable_scx200hr || !scx200_cb_present()) { -+ return; -+ } -+ -+ /* Reserve the timer region for ourselves */ -+ if (!request_region(scx200_cb_base + SCx200_TIMER_OFFSET, -+ SCx200_TIMER_SIZE, -+ "NatSemi SCx200 High-Resolution Timer")) { -+ printk(KERN_WARNING NAME ": unable to lock timer region\n"); -+ return; -+ } -+ -+ /* Configure the timer */ -+ outb(0, scx200_cb_base + SCx200_TMCNFG_OFFSET); -+ -+ /* Record the current value of the timer. */ -+ clock_at_last_interrupt = SCx200HR_CLOCK(); -+ -+ /* Get the current value of the monotonic clock */ -+ total_ns = cur_timer->monotonic_clock(); -+ -+ /* Switch from the original timer functions to ours, but keep -+ * the current delay function since loops_per_jiffy will have -+ * been computed using that */ -+ timer_scx200hr.delay = cur_timer->delay; -+ cur_timer = &timer_scx200hr; -+ -+ printk(KERN_INFO "switching to scx200 high-resolution timer (%lu cpt)\n", -+ HR_CYCLES_PER_TICK); -+} -diff -Naurp linux-2.6.12-rc6.orig/include/asm-i386/timer.h linux-2.6.12-rc6/include/asm-i386/timer.h ---- linux-2.6.12-rc6.orig/include/asm-i386/timer.h 2005-06-07 14:56:11.000000000 +0100 -+++ linux-2.6.12-rc6/include/asm-i386/timer.h 2005-06-07 16:43:19.000000000 +0100 -@@ -50,6 +50,9 @@ extern struct init_timer_opts timer_tsc_ - #ifdef CONFIG_X86_CYCLONE_TIMER - extern struct init_timer_opts timer_cyclone_init; - #endif -+#ifdef CONFIG_SCx200HR_TIMER -+extern struct init_timer_opts timer_scx200hr_init; -+#endif - - extern unsigned long calibrate_tsc(void); - extern void init_cpu_khz(void); -diff -Naurp linux-2.6.12-rc6.orig/include/linux/scx200.h linux-2.6.12-rc6/include/linux/scx200.h ---- linux-2.6.12-rc6.orig/include/linux/scx200.h 2005-06-07 14:56:11.000000000 +0100 -+++ linux-2.6.12-rc6/include/linux/scx200.h 2005-06-07 16:43:19.000000000 +0100 -@@ -32,7 +32,7 @@ extern unsigned scx200_cb_base; - - /* High Resolution Timer */ - #define SCx200_TIMER_OFFSET 0x08 --#define SCx200_TIMER_SIZE 0x05 -+#define SCx200_TIMER_SIZE 0x06 - - /* Clock Generators */ - #define SCx200_CLOCKGEN_OFFSET 0x10 Modified: trunk/target/device/Config.in =================================================================== --- trunk/target/device/Config.in 2006-08-19 01:30:20 UTC (rev 280) +++ trunk/target/device/Config.in 2006-08-19 02:11:33 UTC (rev 281) @@ -5,6 +5,7 @@ source "target/device/geni586/Config.in" source "target/device/via/Config.in" source "target/device/genx8664/Config.in" +source "target/device/Gumstix/Config.in" # This must be last # source "target/generic/Config.in" Added: trunk/target/device/Gumstix/Config.in =================================================================== --- trunk/target/device/Gumstix/Config.in (rev 0) +++ trunk/target/device/Gumstix/Config.in 2006-08-19 02:11:33 UTC (rev 281) @@ -0,0 +1,26 @@ +config BR2_TARGET_GUMSTIX_BASIXCONNEX + bool "Gumstix basix or connex" + depends on BR2_arm + default n + select BR2_PACKAGE_LINUX + select BR2_PACKAGE_ETC_GUMSTIX_RELEASE + help + The gumstix basix and connex + +config GUMSTIX_400MHZ + bool "400MHz?" + depends on BR2_TARGET_GUMSTIX_BASIXCONNEX + default y + help + Do you want to build for 400MHz? If not, then will use 200MHz + +config BR2_PACKAGE_LINUX + bool "linux" + depends on BR2_TARGET_GUMSTIX_BASIXCONNEX + default n + help + The Linux kernel. + +config BR2_PACKAGE_ETC_GUMSTIX_RELEASE + bool + depends on BR2_TARGET_GUMSTIX_BASIXCONNEX Added: trunk/target/device/Gumstix/Makefile.in =================================================================== --- trunk/target/device/Gumstix/Makefile.in (rev 0) +++ trunk/target/device/Gumstix/Makefile.in 2006-08-19 02:11:33 UTC (rev 281) @@ -0,0 +1,14 @@ +# Override the default uClibc configuration +ifeq ($(strip $(BR2_TARGET_GUMSTIX_BASIXCONNEX)),y) +UCLIBC_CONFIG_FILE:=target/device/Gumstix/basix-connex/uClibc.config +BR2_PACKAGE_BUSYBOX_CONFIG:=target/device/Gumstix/basix-connex/busybox.config + +ifeq ($(strip $(BR2_PACKAGE_LINUX)),y) +TARGETS+=linux +include target/device/Gumstix/basix-connex/linux.mk +endif + +include target/device/Gumstix/etc-gumstix-release/etc-gumstix-release.mk +TARGETS+=etc-gumstix-release + +endif Added: trunk/target/device/Gumstix/basix-connex/busybox.config =================================================================== --- trunk/target/device/Gumstix/basix-connex/busybox.config (rev 0) +++ trunk/target/device/Gumstix/basix-connex/busybox.config 2006-08-19 02:11:33 UTC (rev 281) @@ -0,0 +1,607 @@ +# +# Automatically generated make config: don't edit +# +HAVE_DOT_CONFIG=y + +# +# Busybox Settings +# + +# +# General Configuration +# +# CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +CONFIG_FEATURE_BUFFERS_GO_IN_BSS=y +CONFIG_FEATURE_VERBOSE_USAGE=y +# CONFIG_FEATURE_INSTALLER is not set +# CONFIG_LOCALE_SUPPORT is not set +# CONFIG_FEATURE_DEVFS is not set +CONFIG_FEATURE_DEVPTS=y +# CONFIG_FEATURE_CLEAN_UP is not set +CONFIG_FEATURE_SUID=y +# CONFIG_FEATURE_SUID_CONFIG is not set +# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set +# CONFIG_SELINUX is not set + +# +# Build Options +# +# CONFIG_STATIC is not set +# CONFIG_DISABLE_SHARED is not set +# CONFIG_BUILD_LIBBUSYBOX is not set +# CONFIG_FEATURE_FULL_LIBBUSYBOX is not set +# CONFIG_FEATURE_SHARED_BUSYBOX is not set +CONFIG_LFS=y +# USING_CROSS_COMPILER is not set +CROSS_COMPILER_PREFIX="" +EXTRA_CFLAGS_OPTIONS="-fPIC" +# CONFIG_BUILD_AT_ONCE is not set + +# +# Debugging Options +# +# CONFIG_DEBUG is not set +# CONFIG_NO_DEBUG_LIB is not set +# CONFIG_DMALLOC is not set +# CONFIG_EFENCE is not set +CONFIG_DEBUG_YANK_SUSv2=y + +# +# Installation Options +# +# CONFIG_INSTALL_NO_USR is not set +CONFIG_INSTALL_APPLET_SYMLINKS=y +# CONFIG_INSTALL_APPLET_HARDLINKS is not set +# CONFIG_INSTALL_APPLET_DONT is not set +PREFIX="./_install" + +# +# Busybox Library Tuning +# +CONFIG_MD5_SIZE_VS_SPEED=0 + +# +# Applets +# + +# +# Archival Utilities +# +# CONFIG_AR is not set +# CONFIG_FEATURE_AR_LONG_FILENAMES is not set +# CONFIG_BUNZIP2 is not set +# CONFIG_CPIO is not set +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set +CONFIG_GUNZIP=y +# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set +CONFIG_GZIP=y +# CONFIG_RPM2CPIO is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +# CONFIG_FEATURE_TAR_BZIP2 is not set +# CONFIG_FEATURE_TAR_LZMA is not set +# CONFIG_FEATURE_TAR_FROM is not set +CONFIG_FEATURE_TAR_GZIP=y +# CONFIG_FEATURE_TAR_COMPRESS is not set +# CONFIG_FEATURE_TAR_OLDGNU_COMPATABILITY is not set +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set +# CONFIG_UNCOMPRESS is not set +# CONFIG_UNLZMA is not set +# CONFIG_FEATURE_LZMA_FAST is not set +# CONFIG_UNZIP is not set + +# +# Common options for cpio and tar +# +# CONFIG_FEATURE_UNARCHIVE_TAPE is not set +# CONFIG_FEATURE_DEB_TAR_GZ is not set +# CONFIG_FEATURE_DEB_TAR_BZ2 is not set +# CONFIG_FEATURE_DEB_TAR_LZMA is not set + +# +# Coreutils +# +CONFIG_BASENAME=y +# CONFIG_CAL is not set +CONFIG_CAT=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +CONFIG_CHROOT=y +CONFIG_CMP=y +# CONFIG_COMM is not set +CONFIG_CP=y +CONFIG_CUT=y +CONFIG_DATE=y +CONFIG_FEATURE_DATE_ISOFMT=y +CONFIG_DD=y +CONFIG_DF=y +CONFIG_DIRNAME=y +# CONFIG_DOS2UNIX is not set +# CONFIG_UNIX2DOS is not set +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFALT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +# CONFIG_EXPR is not set +# CONFIG_EXPR_MATH_SUPPORT_64 is not set +CONFIG_FALSE=y +# CONFIG_FOLD is not set +CONFIG_HEAD=y +# CONFIG_FEATURE_FANCY_HEAD is not set +# CONFIG_HOSTID is not set +CONFIG_ID=y +# CONFIG_INSTALL is not set +CONFIG_LENGTH=y +CONFIG_LN=y +CONFIG_LOGNAME=y +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +# CONFIG_MKFIFO is not set +CONFIG_MKNOD=y +CONFIG_MV=y +# CONFIG_NICE is not set +# CONFIG_NOHUP is not set +# CONFIG_OD is not set +# CONFIG_PRINTENV is not set +# CONFIG_PRINTF is not set +CONFIG_PWD=y +CONFIG_REALPATH=y +CONFIG_RM=y +CONFIG_RMDIR=y +CONFIG_SEQ=y +# CONFIG_SHA1SUM is not set +CONFIG_SLEEP=y +# CONFIG_FEATURE_FANCY_SLEEP is not set +CONFIG_SORT=y +# CONFIG_FEATURE_SORT_BIG is not set +# CONFIG_STAT is not set +# CONFIG_FEATURE_STAT_FORMAT is not set +CONFIG_STTY=y +# CONFIG_SUM is not set +CONFIG_SYNC=y +CONFIG_TAIL=y +# CONFIG_FEATURE_FANCY_TAIL is not set +CONFIG_TEE=y +# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set +CONFIG_TEST=y +# CONFIG_FEATURE_TEST_64 is not set +CONFIG_TOUCH=y +# CONFIG_TR is not set +# CONFIG_FEATURE_TR_CLASSES is not set +# CONFIG_FEATURE_TR_EQUIV is not set +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +CONFIG_UNIQ=y +CONFIG_USLEEP=y +# CONFIG_UUDECODE is not set +# CONFIG_UUENCODE is not set +# CONFIG_WATCH is not set +# CONFIG_WC is not set +# CONFIG_WHO is not set +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options for cp and mv +# +CONFIG_FEATURE_PRESERVE_HARDLINKS=y + +# +# Common options for ls, more and telnet +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum +# +# CONFIG_FEATURE_MD5_SHA1_SUM_CHECK is not set + +# +# Console Utilities +# +# CONFIG_CHVT is not set +CONFIG_CLEAR=y +# CONFIG_DEALLOCVT is not set +# CONFIG_DUMPKMAP is not set +# CONFIG_LOADFONT is not set +# CONFIG_LOADKMAP is not set +# CONFIG_OPENVT is not set +CONFIG_RESET=y +CONFIG_SETCONSOLE=y +# CONFIG_SETKEYCODES is not set + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +# CONFIG_PIPE_PROGRESS is not set +CONFIG_READLINK=y +# CONFIG_FEATURE_READLINK_FOLLOW is not set +CONFIG_RUN_PARTS=y +CONFIG_START_STOP_DAEMON=y +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_AWK=y +# CONFIG_FEATURE_AWK_MATH is not set +# CONFIG_PATCH is not set +CONFIG_SED=y +CONFIG_VI=y +CONFIG_FEATURE_VI_COLON=y +# CONFIG_FEATURE_VI_YANKMARK is not set +CONFIG_FEATURE_VI_SEARCH=y +CONFIG_FEATURE_VI_USE_SIGNALS=y +# CONFIG_FEATURE_VI_DOT_CMD is not set +# CONFIG_FEATURE_VI_READONLY is not set +# CONFIG_FEATURE_VI_SETOPTS is not set +# CONFIG_FEATURE_VI_SET is not set +CONFIG_FEATURE_VI_WIN_RESIZE=y +# CONFIG_FEATURE_VI_OPTIMIZE_CURSOR is not set + +# +# Finding Utilities +# +CONFIG_FIND=y +# CONFIG_FEATURE_FIND_MTIME is not set +# CONFIG_FEATURE_FIND_MMIN is not set +# CONFIG_FEATURE_FIND_PERM is not set +CONFIG_FEATURE_FIND_TYPE=y +# CONFIG_FEATURE_FIND_XDEV is not set +# CONFIG_FEATURE_FIND_NEWER is not set +# CONFIG_FEATURE_FIND_INUM is not set +CONFIG_FEATURE_FIND_EXEC=y +CONFIG_GREP=y +# CONFIG_FEATURE_GREP_EGREP_ALIAS is not set +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set +CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y +# CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT is not set +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y + +# +# Init Utilities +# +CONFIG_INIT=y +CONFIG_FEATURE_USE_INITTAB=y +# CONFIG_FEATURE_INIT_SCTTY is not set +CONFIG_FEATURE_EXTRA_QUIET=y +# CONFIG_FEATURE_INIT_COREDUMPS is not set +# CONFIG_FEATURE_INITRD is not set +CONFIG_HALT=y +# CONFIG_MESG is not set + +# +# Login/Password Management Utilities +# +CONFIG_FEATURE_SHADOWPASSWDS=y +# CONFIG_USE_BB_SHADOW is not set +# CONFIG_USE_BB_PWD_GRP is not set +CONFIG_ADDGROUP=y +CONFIG_DELGROUP=y +CONFIG_ADDUSER=y +CONFIG_DELUSER=y +CONFIG_GETTY=y +# CONFIG_FEATURE_UTMP is not set +# CONFIG_FEATURE_WTMP is not set +CONFIG_LOGIN=y +# CONFIG_FEATURE_SECURETTY is not set +CONFIG_PASSWD=y +CONFIG_SU=y +# CONFIG_SULOGIN is not set +# CONFIG_VLOCK is not set + +# +# Linux Ext2 FS Progs +# +# CONFIG_CHATTR is not set +# CONFIG_E2FSCK is not set +# CONFIG_FSCK is not set +# CONFIG_LSATTR is not set +# CONFIG_MKE2FS is not set +# CONFIG_TUNE2FS is not set +# CONFIG_E2LABEL is not set +# CONFIG_FINDFS is not set + +# +# Linux Module Utilities +# +# CONFIG_INSMOD is not set +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set +# CONFIG_RMMOD is not set +# CONFIG_LSMOD is not set +# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set +# CONFIG_MODPROBE is not set +# CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS is not set +# CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set +# CONFIG_FEATURE_2_4_MODULES is not set +# CONFIG_FEATURE_2_6_MODULES is not set +# CONFIG_FEATURE_QUERY_MODULE_INTERFACE is not set + +# +# Linux System Utilities +# +CONFIG_DMESG=y +# CONFIG_FBSET is not set +# CONFIG_FEATURE_FBSET_FANCY is not set +# CONFIG_FEATURE_FBSET_READMODE is not set +# CONFIG_FDFLUSH is not set +# CONFIG_FDFORMAT is not set +CONFIG_FDISK=y +FDISK_SUPPORT_LARGE_DISKS=y +CONFIG_FEATURE_FDISK_WRITABLE=y +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +# CONFIG_FREERAMDISK is not set +# CONFIG_FSCK_MINIX is not set +# CONFIG_MKFS_MINIX is not set +# CONFIG_FEATURE_MINIX2 is not set +CONFIG_GETOPT=y +# CONFIG_HEXDUMP is not set +# CONFIG_HWCLOCK is not set +# CONFIG_FEATURE_HWCLOCK_LONGOPTIONS is not set +# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set +# CONFIG_IPCRM is not set +# CONFIG_IPCS is not set +# CONFIG_LOSETUP is not set +# CONFIG_MDEV is not set +# CONFIG_FEATURE_MDEV_CONF is not set +# CONFIG_MKSWAP is not set +CONFIG_MORE=y +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_MOUNT=y +# CONFIG_FEATURE_MOUNT_NFS is not set +CONFIG_PIVOT_ROOT=y +CONFIG_RDATE=y +# CONFIG_READPROFILE is not set +# CONFIG_SETARCH is not set +# CONFIG_SWAPONOFF is not set +# CONFIG_SWITCH_ROOT is not set +CONFIG_UMOUNT=y +# CONFIG_FEATURE_UMOUNT_ALL is not set + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set + +# +# Miscellaneous Utilities +# +# CONFIG_ADJTIMEX is not set +# CONFIG_BBCONFIG is not set +# CONFIG_CROND is not set +# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set +# CONFIG_CRONTAB is not set +# CONFIG_DC is not set +# CONFIG_DEVFSD is not set +# CONFIG_DEVFSD_MODLOAD is not set +# CONFIG_DEVFSD_FG_NP is not set +# CONFIG_DEVFSD_VERBOSE is not set +# CONFIG_EJECT is not set +# CONFIG_LAST is not set +# CONFIG_LESS is not set +# CONFIG_FEATURE_LESS_BRACKETS is not set +# CONFIG_FEATURE_LESS_FLAGS is not set +# CONFIG_FEATURE_LESS_FLAGCS is not set +# CONFIG_FEATURE_LESS_MARKS is not set +# CONFIG_FEATURE_LESS_REGEXP is not set +# CONFIG_HDPARM is not set +# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set +# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set +# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set +CONFIG_MAKEDEVS=y +# CONFIG_FEATURE_MAKEDEVS_LEAF is not set +CONFIG_FEATURE_MAKEDEVS_TABLE=y +# CONFIG_MOUNTPOINT is not set +# CONFIG_MT is not set +# CONFIG_RUNLEVEL is not set +# CONFIG_RX is not set +# CONFIG_STRINGS is not set +# CONFIG_SETSID is not set +# CONFIG_TIME is not set +CONFIG_WATCHDOG=y + +# +# Networking Utilities +# +# CONFIG_FEATURE_IPV6 is not set +# CONFIG_ARPING is not set +# CONFIG_DNSD is not set +# CONFIG_ETHER_WAKE is not set +# CONFIG_FAKEIDENTD is not set +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +CONFIG_HOSTNAME=y +# CONFIG_HTTPD is not set +# CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY is not set +# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set +# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set +# CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP is not set +# CONFIG_FEATURE_HTTPD_SETUID is not set +# CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES is not set +# CONFIG_FEATURE_HTTPD_CGI is not set +# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set +# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set +# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +# CONFIG_FEATURE_IFCONFIG_SLIP is not set +# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set +CONFIG_FEATURE_IFCONFIG_HW=y +# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set +CONFIG_IFUPDOWN=y +CONFIG_FEATURE_IFUPDOWN_IP=y +CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y +CONFIG_FEATURE_IFUPDOWN_IPV4=y +# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set +# CONFIG_FEATURE_IFUPDOWN_IPX is not set +# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set +# CONFIG_INETD is not set +# CONFIG_FEATURE_INETD_SUPPORT_BILTIN_ECHO is not set +# CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DISCARD is not set +# CONFIG_FEATURE_INETD_SUPPORT_BILTIN_TIME is not set +# CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DAYTIME is not set +# CONFIG_FEATURE_INETD_SUPPORT_BILTIN_CHARGEN is not set +# CONFIG_FEATURE_INETD_RPC is not set +CONFIG_IP=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +# CONFIG_FEATURE_IP_TUNNEL is not set +# CONFIG_IPCALC is not set +# CONFIG_FEATURE_IPCALC_FANCY is not set +# CONFIG_IPADDR is not set +# CONFIG_IPLINK is not set +# CONFIG_IPROUTE is not set +# CONFIG_IPTUNNEL is not set +CONFIG_NAMEIF=y +CONFIG_NC=y +# CONFIG_NC_GAPING_SECURITY_HOLE is not set +CONFIG_NETSTAT=y +# CONFIG_NSLOOKUP is not set +CONFIG_PING=y +CONFIG_FEATURE_FANCY_PING=y +# CONFIG_PING6 is not set +# CONFIG_FEATURE_FANCY_PING6 is not set +# CONFIG_ROUTE is not set +# CONFIG_TELNET is not set +# CONFIG_FEATURE_TELNET_TTYPE is not set +# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set +# CONFIG_TELNETD is not set +# CONFIG_FEATURE_TELNETD_INETD is not set +# CONFIG_TFTP is not set +# CONFIG_FEATURE_TFTP_GET is not set +# CONFIG_FEATURE_TFTP_PUT is not set +# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set +# CONFIG_FEATURE_TFTP_DEBUG is not set +CONFIG_TRACEROUTE=y +CONFIG_FEATURE_TRACEROUTE_VERBOSE=y +# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set +# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set +# CONFIG_VCONFIG is not set +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +# CONFIG_FEATURE_WGET_IP6_LITERAL is not set + +# +# udhcp Server/Client +# +# CONFIG_UDHCPD is not set +CONFIG_UDHCPC=y +# CONFIG_DUMPLEASES is not set +CONFIG_FEATURE_UDHCP_SYSLOG=y +# CONFIG_FEATURE_UDHCP_DEBUG is not set +CONFIG_FEATURE_UDHCP_LOG_LEVEL=5 +CONFIG_ZCIP=y + +# +# Process Utilities +# +# CONFIG_FREE is not set +# CONFIG_FUSER is not set +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_PIDOF=y +# CONFIG_FEATURE_PIDOF_SINGLE is not set +# CONFIG_FEATURE_PIDOF_OMIT is not set +CONFIG_PS=y +# CONFIG_FEATURE_PS_WIDE is not set +CONFIG_RENICE=y +# CONFIG_BB_SYSCTL is not set +# CONFIG_TOP is not set +# CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE is not set +CONFIG_UPTIME=y + +# +# Shells +# +CONFIG_FEATURE_SH_IS_ASH=y +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_LASH is not set +# CONFIG_FEATURE_SH_IS_MSH is not set +# CONFIG_FEATURE_SH_IS_NONE is not set +CONFIG_ASH=y + +# +# Ash Shell Options +# +CONFIG_ASH_JOB_CONTROL=y +# CONFIG_ASH_READ_NCHARS is not set +# CONFIG_ASH_READ_TIMEOUT is not set +CONFIG_ASH_ALIAS=y +CONFIG_ASH_MATH_SUPPORT=y +# CONFIG_ASH_MATH_SUPPORT_64 is not set +CONFIG_ASH_GETOPTS=y +# CONFIG_ASH_CMDCMD is not set +# CONFIG_ASH_BUILTIN_ECHO is not set +# CONFIG_ASH_MAIL is not set +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +# CONFIG_ASH_RANDOM_SUPPORT is not set +# CONFIG_ASH_EXPAND_PRMT is not set +# CONFIG_HUSH is not set +# CONFIG_LASH is not set +# CONFIG_MSH is not set + +# +# Bourne Shell Options +# +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE_SHELL is not set +CONFIG_FEATURE_COMMAND_EDITING=y +# CONFIG_FEATURE_COMMAND_EDITING_VI is not set +CONFIG_FEATURE_COMMAND_HISTORY=15 +# CONFIG_FEATURE_COMMAND_SAVEHISTORY is not set +CONFIG_FEATURE_COMMAND_TAB_COMPLETION=y +# CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set +# CONFIG_FEATURE_SH_FANCY_PROMPT is not set + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +CONFIG_FEATURE_ROTATE_LOGFILE=y +# CONFIG_FEATURE_REMOTE_LOG is not set +CONFIG_FEATURE_IPC_SYSLOG=y +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 +CONFIG_LOGREAD=y +CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y +CONFIG_KLOGD=y +CONFIG_LOGGER=y Added: trunk/target/device/Gumstix/basix-connex/kernel-patches/add_input_randomness_export.patch =================================================================== --- trunk/target/device/Gumstix/basix-connex/kernel-patches/add_input_randomness_export.patch (rev 0) +++ trunk/target/device/Gumstix/basix-connex/kernel-patches/add_input_randomness_export.patch 2006-08-19 02:11:33 UTC (rev 281) @@ -0,0 +1,13 @@ +Oddly, drivers/input/input.c seems to reference a symbol which is apparently in another module but not exported. +Index: linux-2.6.15gum/drivers/char/random.c +=================================================================== +--- linux-2.6.15gum.orig/drivers/char/random.c ++++ linux-2.6.15gum/drivers/char/random.c +@@ -646,6 +646,7 @@ extern void add_input_randomness(unsigne + add_timer_randomness(&input_timer_state, + (type << 4) ^ code ^ (code >> 4) ^ value); + } ++EXPORT_SYMBOL(add_input_randomness); + + void add_interrupt_randomness(int irq) + { Added: trunk/target/device/Gumstix/basix-connex/kernel-patches/arch-config.patch =================================================================== --- trunk/target/device/Gumstix/basix-connex/kernel-patches/arch-config.patch (rev 0) +++ trunk/target/device/Gumstix/basix-connex/kernel-patches/arch-config.patch 2006-08-19 02:11:33 UTC (rev 281) @@ -0,0 +1,55 @@ +Index: linux-2.6.17gum/arch/arm/mach-pxa/Kconfig +=================================================================== +--- linux-2.6.17gum.orig/arch/arm/mach-pxa/Kconfig ++++ linux-2.6.17gum/arch/arm/mach-pxa/Kconfig +@@ -5,6 +5,10 @@ menu "Intel PXA2xx Implementations" + choice + prompt "Select target board" + ++config ARCH_GUMSTIX ++ bool "Gumstix Platform" ++ depends on ARCH_PXA ++ + config ARCH_LUBBOCK + bool "Intel DBPXA250 Development Platform" + select PXA25x +@@ -99,6 +103,27 @@ config MACH_TOSA + bool "Enable Sharp SL-6000x (Tosa) Support" + depends PXA_SHARPSL_25x + ++choice ++ depends on ARCH_GUMSTIX ++ prompt "Gumstix Platform Version" ++ default ARCH_GUMSTIX_F ++ ++config ARCH_GUMSTIX_ORIG ++ bool "Original Gumstix" ++ select PXA25x ++ help ++ The original gumstix platform, including the gs-200x and gs-400x and the waysmall ++ systems using these boards. ++ ++config ARCH_GUMSTIX_F ++ bool "Gumstix-F" ++ select PXA25x ++ help ++ The updated Gumstix boards with 60-pin connector, including gs-200f, gs-400f and the ++ waysmall systems using these boards, including ws-200ax and ws-400ax. ++ ++endchoice ++ + config PXA25x + bool + help +Index: linux-2.6.17gum/arch/arm/mach-pxa/Makefile +=================================================================== +--- linux-2.6.17gum.orig/arch/arm/mach-pxa/Makefile ++++ linux-2.6.17gum/arch/arm/mach-pxa/Makefile +@@ -8,6 +8,7 @@ obj-$(CONFIG_PXA25x) += pxa25x.o + obj-$(CONFIG_PXA27x) += pxa27x.o + + # Specific board support ++obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o + obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o + obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o + obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o Added: trunk/target/device/Gumstix/basix-connex/kernel-patches/audio.patch =================================================================== --- trunk/target/device/Gumstix/basix-connex/kernel-patches/audio.patch (rev 0) +++ trunk/target/device/Gumstix/basix-connex/kernel-patches/audio.patch 2006-08-19 02:11:33 UTC (rev 281) @@ -0,0 +1,454 @@ +Index: linux-2.6.17gum/sound/oss/ac97_codec.c +=================================================================== +--- linux-2.6.17gum.orig/sound/oss/ac97_codec.c ++++ linux-2.6.17gum/sound/oss/ac97_codec.c +@@ -59,6 +59,9 @@ + + #define CODEC_ID_BUFSZ 14 + ++static int ucb1400_read_mixer(struct ac97_codec *codec, int oss_channel); ++static void ucb1400_write_mixer(struct ac97_codec *codec, int oss_channel, ++ unsigned int left, unsigned int right); + static int ac97_read_mixer(struct ac97_codec *codec, int oss_channel); + static void ac97_write_mixer(struct ac97_codec *codec, int oss_channel, + unsigned int left, unsigned int right); +@@ -85,6 +88,7 @@ static int cmedia_init(struct ac97_codec + static int cmedia_digital_control(struct ac97_codec *codec, int slots, int rate, int mode); + static int generic_digital_control(struct ac97_codec *codec, int slots, int rate, int mode); + static int ucb1400_init(struct ac97_codec *codec); ++static int ucb1400_control(struct ac97_codec *codec, int on); + + + /* +@@ -120,7 +124,7 @@ static struct ac97_ops crystal_digital_o + static struct ac97_ops ad1886_ops = { ad1886_init, eapd_control, NULL }; + static struct ac97_ops cmedia_ops = { NULL, eapd_control, NULL}; + static struct ac97_ops cmedia_digital_ops = { cmedia_init, eapd_control, cmedia_digital_control}; +-static struct ac97_ops ucb1400_ops = { ucb1400_init, eapd_control, NULL }; ++static struct ac97_ops ucb1400_ops = { ucb1400_init, ucb1400_control, NULL }; + + /* sorted by vendor/device id */ + static const struct { +@@ -309,6 +313,143 @@ static LIST_HEAD(codecs); + static LIST_HEAD(codec_drivers); + static DEFINE_MUTEX(codec_mutex); + ++// Values of UCB1400 register addresses ++#define AC97_UCB1400_FCR1 (0x6a) ++#define AC97_UCB1400_FCR2 (0x6c) ++// Masks for bits of interest in those registers ++#define AC97_UCB1400_BASS_BOOST_MASK (0xf << 11) ++#define AC97_UCB1400_TREB_BOOST_MASK (0x3 << 9) ++#define AC97_UCB1400_BOOST_MODE_MASK (0x3 << 7) ++// Calculate the boost mode from the register by extracting the bits, then shifting it down ++// Mode 0 == flat, 1 == minimum, 2 == minimum, 3 == maximum ++#define AC97_UCB1400_BOOST_MODE(x) (((x) & AC97_UCB1400_BOOST_MODE_MASK) >> 7) ++// Caculate the treble boost ++#define AC97_UCB1400_TREB_BOOST(x) (((x) & AC97_UCB1400_TREB_BOOST_MASK) >> 9) ++// Calculate the bass boost ++#define AC97_UCB1400_BASS_BOOST(x) (((x) & AC97_UCB1400_BASS_BOOST_MASK) >> 11) ++ ++// Use a conversion table to translate from the register values to dB values ++#define AC97_UCB1400_BASS_LOOKUP(x,l) ((l)[AC97_UCB1400_BASS_BOOST(x) | (AC97_UCB1400_BOOST_MODE(x) << 4)]) ++#define AC97_UCB1400_TREB_LOOKUP(x,l) ((l)[AC97_UCB1400_TREB_BOOST(x) | (AC97_UCB1400_BOOST_MODE(x) << 4)]) ++ ++// This lookup table is indexed by a 6 bit number: ++// Two high bits are the boost mode from teh register ++// Four low bits are from the BASS or TREB boost value in the register ++// The lookup value is the dB boost calculated from the UCB1400 spec sheet ++// The lookup values will be calculated and populated during ucb1400_init() ++static const u8 ac97_ucb1400_boost_lookup[] = { ++ [0] = 0, [1] = 0, [2] = 0, [3] = 0, ++ [4] = 0, [5] = 0, [6] = 0, [7] = 0, // flat 00 ++ [8] = 0, [9] = 0, [10] = 0, [11] = 0, ++ [12] = 0, [13] = 0, [14] = 0, [15] = 0, ++ ++ [16] = 0, [17] = 2, [18] = 4, [19] = 6, ++ [20] = 8, [21] = 10, [22] = 12, [23] = 14, // min 01 ++ [24] = 16, [25] = 18, [26] = 18, [27] = 18, ++ [28] = 18, [29] = 18, [30] = 18, [31] = 18, ++ ++ [32] = 0, [33] = 2, [34] = 4, [35] = 6, ++ [36] = 8, [37] = 10, [38] = 12, [39] = 14, // min 10 ++ [40] = 16, [41] = 18, [42] = 18, [43] = 18, ++ [44] = 18, [45] = 18, [46] = 18, [47] = 18, ++ ++ [48] = 0, [49] = 2, [50] = 4, [51] = 6, ++ [52] = 8, [53] = 10, [54] = 12, [55] = 14, // max 11 ++ [56] = 16, [57] = 18, [58] = 20, [59] = 22, ++ [60] = 24, [61] = 24, [62] = 24, [63] = 24 ++}; ++ ++static int ucb1400_read_mixer(struct ac97_codec *codec, int oss_channel) ++{ ++ u16 val; ++ ++ switch(oss_channel) ++ { ++ ++ case SOUND_MIXER_BASS: ++ // Convert from the 24-dB max BASS boost level to a %age ++ val = codec->codec_read(codec, AC97_UCB1400_FCR1); // Read the register ++ return (AC97_UCB1400_BASS_LOOKUP(val, ac97_ucb1400_boost_lookup)*100)/24; ++ ++ case SOUND_MIXER_TREBLE: ++ // Convert from the 6-dB max TREB boost level to a %age ++ val = codec->codec_read(codec, AC97_UCB1400_FCR1); // Read the register ++ return (AC97_UCB1400_TREB_LOOKUP(val, ac97_ucb1400_boost_lookup)*100)/6; ++ ++ case SOUND_MIXER_MIC: ++ val = codec->codec_read(codec, AC97_MIC_VOL); ++ return (val & AC97_MICBOOST ? 100 : 0); ++ ++ default: ++ return ac97_read_mixer(codec, oss_channel); ++ } ++} ++ ++#ifndef MAX ++#define MAX(a,b) (((a)>(b)) ? (a) : (b)) ++#endif ++ ++static void ucb1400_write_mixer(struct ac97_codec *codec, int oss_channel, ++ unsigned int left, unsigned int right) ++{ ++ u16 old_val,new_val; ++ u8 treb,bass; ++ ++ switch(oss_channel) ++ { ++ case SOUND_MIXER_BASS: ++ case SOUND_MIXER_TREBLE: ++ old_val = codec->codec_read(codec, AC97_UCB1400_FCR1); // Read the register ++ ++ // Determine which one changed, set old one to old value (or 0 if old mode was flat) ++ bass = (oss_channel==SOUND_MIXER_BASS) ? ++ (left*24)/100 : // Convert from %age to 0-24dB scale for bass ++ AC97_UCB1400_BASS_LOOKUP(old_val, ac97_ucb1400_boost_lookup); ++ treb = (oss_channel==SOUND_MIXER_TREBLE) ? ++ (left*6)/100 : // convert from %age to 0-6dB scale for bass ++ AC97_UCB1400_TREB_LOOKUP(old_val, ac97_ucb1400_boost_lookup); ++ ++ // Now convert both treble and bass to values for the register. ++ // If both are 0, then use mode flat ++ // If either is non-zero, then use mode min if bass <=18 ++ // Otherwise, use mode max ++ new_val = old_val & ~(AC97_UCB1400_BASS_BOOST_MASK | // First clear the bits ++ AC97_UCB1400_TREB_BOOST_MASK | // which is same as flat mode ++ AC97_UCB1400_BOOST_MODE_MASK); // with both boosts at 0 ++ if(bass > 18) ++ { ++ new_val |= (3 << 7); // Set boost mode to 0b11 which is "max" ++ } ++ else if(bass > 0 || treb > 0) ++ { ++ new_val |= (1 << 7); // Set boost mode to 0b01 which is "min" ++ } ++ else ++ { ++ // Set boost mode to 0b00 which is "flat" ++ } ++ ++ if(bass || treb) ++ { ++ // The value to stick in the register the boost in dB divided by 2 ++ // Dividing by 2 is the same as shifting right by 1 ++ // We fix overflows by anding with the mask ++ new_val |= ((bass >> 1) << 11) & AC97_UCB1400_BASS_BOOST_MASK; ++ new_val |= ((treb >> 1) << 9) & AC97_UCB1400_TREB_BOOST_MASK; ++ } ++ ++ // Ok, now poke the value back to the codec ++ codec->codec_write(codec, AC97_UCB1400_FCR1, new_val); ++ break; ++ ++ case SOUND_MIXER_MIC: ++ codec->codec_write(codec, AC97_MIC_VOL, (left >= 50 ? AC97_MICBOOST : 0)); ++ break; ++ ++ default: ac97_write_mixer(codec, oss_channel, left, right); ++ } ++} ++ + /* reads the given OSS mixer from the ac97 the caller must have insured that the ac97 knows + about that given mixer, and should be holding a spinlock for the card */ + static int ac97_read_mixer(struct ac97_codec *codec, int oss_channel) +@@ -526,6 +667,7 @@ static int ac97_recmask_io(struct ac97_c + #endif + + codec->codec_write(codec, AC97_RECORD_SELECT, val); ++ val = codec->codec_read(codec, AC97_RECORD_SELECT); + + return 0; + }; +@@ -634,6 +776,8 @@ int ac97_read_proc (char *page, char **s + { + int len = 0, cap, extid, val, id1, id2; + struct ac97_codec *codec; ++ u8 ac97_register_query_list[] = {0x02,0x0e,0x1a,0x1c,0x26,0x2a,0x2c,0x32,0x6a,0x6c,0x00}; ++ size_t i=0; + int is_ac97_20 = 0; + + if ((codec = data) == NULL) +@@ -702,6 +846,13 @@ int ac97_read_proc (char *page, char **s + codec->codec_read(codec, AC97_PCM_FRONT_DAC_RATE)); + } + ++ do ++ { ++ len += sprintf(page+len, "Reg. 0x%02x : 0x%04x\n", ++ ac97_register_query_list[i], ++ codec->codec_read(codec, ac97_register_query_list[i])); ++ i++; ++ } while(ac97_register_query_list[i]); + return len; + } + +@@ -1180,7 +1331,25 @@ static int ad1886_init(struct ac97_codec + } + + ++static int ucb1400_control(struct ac97_codec *codec, int on) ++{ ++ if(on) ++ { ++ codec->codec_write(codec, AC97_POWER_CONTROL, 0x0000); // turn everything on + ++ // Now we wait for everything to settle ++ udelay(100); ++ } ++ else ++ { ++ codec->codec_write(codec, AC97_POWER_CONTROL, ++ (1 << 11) | // PR3: Audio Vref power-down ++ (1 << 9) | // PR1: Audio DAC and output path power-down ++ (1 << 8) // PR0: Audio ADC and input path power-down ++ ); ++ } ++ return 0; ++} + + /* + * This is basically standard AC97. It should work as a default for +@@ -1336,10 +1505,55 @@ static int pt101_init(struct ac97_codec + + static int ucb1400_init(struct ac97_codec *codec) + { +- codec->codec_write(codec,AC97_EXTENDED_STATUS,1); +- //codec->codec_write(codec, 0x6a, 0x1ff7); +- codec->codec_write(codec, 0x6a, 0x0050); +- codec->codec_write(codec, 0x6c, 0x0030); ++ codec->supported_mixers = SOUND_MASK_VOLUME | // Specify what UCB1400 supports ++ SOUND_MASK_BASS | ++ SOUND_MASK_TREBLE | ++ SOUND_MASK_MIC | ++ SOUND_MASK_IGAIN; ++ ++ codec->stereo_mixers = SOUND_MASK_VOLUME | // Specify what UCB1400 supports ++ SOUND_MASK_LINE | ++ SOUND_MASK_IGAIN; ++ ++ codec->record_sources = SOUND_MASK_MIC | // Specify what UCB1400 supports ++ SOUND_MASK_LINE; ++ ++ codec->read_mixer = ucb1400_read_mixer; // The UCB1400 bass and treble implementations ++ codec->write_mixer = ucb1400_write_mixer; // need special code ++ ++ codec->codec_write(codec,AC97_EXTENDED_STATUS, 1); // Ensure that VRA is on ++ ++ ucb1400_control(codec, 1); // Turn on DAC/ADC paths first to prevent click ++ ++ codec->codec_write(codec, AC97_UCB1400_FCR1, ++ (0 << 11) | // 0 base boost ++ (0 << 9) | // 0 treble boost ++ (0 << 7) | // Mode = flat ++ (1 << 6) | // Headphones enable ++ (0 << 5) | // De-emphasis disabled ++ (1 << 4) | // DC filter enabled ++ (1 << 3) | // Hi-pass filter enabled ++ (0 << 2) | // disable interrupt signalling via GPIO_INT ++ (1 << 0) // clear ADC overflow status if set ++ ); ++ ++ codec->codec_write(codec, AC97_UCB1400_FCR2, ++ (0 << 15) | // must be 0 ++ (0 << 13) | // must be 0 ++ (1 << 12) | // ADC filter enabled ++ (0 << 10) | // must be 0 ++ (0 << 4) | // Smart low power mode on neither Codec nor PLL ++ (0 << 0) // must be 0 ++ ); ++ ++ codec->codec_write(codec, AC97_RECORD_SELECT, 0); // default source is MIC ++ ++ codec->codec_write(codec, AC97_MIC_VOL, (1 << 6)); // 20dB MIC boost ++ ++ codec->codec_write(codec, AC97_RECORD_GAIN, 0); // no master record gain ++ ++ codec->codec_write(codec, AC97_GENERAL_PURPOSE, 0); // no ADC to DAC loopback ++ + return 0; + } + +@@ -1368,30 +1582,9 @@ unsigned int ac97_set_dac_rate(struct ac + + if(rate != codec->codec_read(codec, AC97_PCM_FRONT_DAC_RATE)) + { +- /* Mute several registers */ +- mast_vol = codec->codec_read(codec,... [truncated message content] |