]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 15 Nov 2007 19:01:07 +0000 (11:01 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 15 Nov 2007 19:01:07 +0000 (11:01 -0800)
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  i2c/eeprom: Recognize VGN as a valid Sony Vaio name prefix
  i2c/eeprom: Hide Sony Vaio serial numbers
  i2c-pasemi: Fix NACK detection
  i2c-pasemi: Replace obsolete "driverfs" reference with "sysfs"
  i2c: Make i2c_check_addr static
  i2c-dev: Unbound new-style i2c clients aren't busy
  i2c-dev: "how does it work" comments

arch/avr32/Kconfig
arch/avr32/mach-at32ap/at32ap7000.c
arch/avr32/mach-at32ap/hsmc.c
arch/avr32/mach-at32ap/intc.c
drivers/net/skge.c
include/asm-avr32/sysreg.h
include/pcmcia/cs_types.h
kernel/exit.c
mm/slob.c

index bbecbd8469b59a449b6d525c1bc0725f81b7da29..4f402c92450496342bd0ea4a92bd2c09b4478b68 100644 (file)
@@ -19,9 +19,6 @@ config AVR32
          There is an AVR32 Linux project with a web page at
          http://avr32linux.org/.
 
-config UID16
-       bool
-
 config GENERIC_GPIO
        bool
        default y
index a9d9ec081e3d7b8c729dfff3100ca3f2bc5f2b45..7c4388f4f17ff697405455c39a0bd78641ae4ca9 100644 (file)
@@ -474,7 +474,7 @@ static struct resource at32ap700x_rtc0_resource[] = {
 static struct resource at32_wdt0_resource[] = {
        {
                .start  = 0xfff000b0,
-               .end    = 0xfff000bf,
+               .end    = 0xfff000cf,
                .flags  = IORESOURCE_MEM,
        },
 };
@@ -690,7 +690,7 @@ static struct resource atmel_usart0_resource[] = {
        IRQ(6),
 };
 DEFINE_DEV_DATA(atmel_usart, 0);
-DEV_CLK(usart, atmel_usart0, pba, 4);
+DEV_CLK(usart, atmel_usart0, pba, 3);
 
 static struct atmel_uart_data atmel_usart1_data = {
        .use_dma_tx     = 1,
index 704607fbcc696d2223241ff26103176daa254b46..fa427ed427874843ea523c30c2c69b46089914be 100644 (file)
@@ -7,7 +7,6 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#define DEBUG
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/init.h>
index dd5c009cf224838379af65d498c35ed7357afcf2..0b286cd53028a469441af1ad99b56f97a6c37287 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/irq.h>
 #include <linux/platform_device.h>
 
+#include <asm/intc.h>
 #include <asm/io.h>
 
 #include "intc.h"
@@ -136,7 +137,8 @@ fail:
        panic("Interrupt controller initialization failed!\n");
 }
 
-unsigned long intc_get_pending(int group)
+unsigned long intc_get_pending(unsigned int group)
 {
        return intc_readl(&intc0, INTREQ0 + 4 * group);
 }
+EXPORT_SYMBOL_GPL(intc_get_pending);
index b9961dc47606bb28b9528c8764e95e488ff1ca36..6d62250fba07944fab02a67dc9b93dc6fcdf36de 100644 (file)
@@ -2512,31 +2512,32 @@ static int skge_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
        return err;
 }
 
-/* Assign Ram Buffer allocation to queue */
-static void skge_ramset(struct skge_hw *hw, u16 q, u32 start, u32 space)
+static void skge_ramset(struct skge_hw *hw, u16 q, u32 start, size_t len)
 {
        u32 end;
 
-       /* convert from K bytes to qwords used for hw register */
-       start *= 1024/8;
-       space *= 1024/8;
-       end = start + space - 1;
+       start /= 8;
+       len /= 8;
+       end = start + len - 1;
 
        skge_write8(hw, RB_ADDR(q, RB_CTRL), RB_RST_CLR);
        skge_write32(hw, RB_ADDR(q, RB_START), start);
-       skge_write32(hw, RB_ADDR(q, RB_END), end);
        skge_write32(hw, RB_ADDR(q, RB_WP), start);
        skge_write32(hw, RB_ADDR(q, RB_RP), start);
+       skge_write32(hw, RB_ADDR(q, RB_END), end);
 
        if (q == Q_R1 || q == Q_R2) {
-               u32 tp = space - space/4;
-
                /* Set thresholds on receive queue's */
-               skge_write32(hw, RB_ADDR(q, RB_RX_UTPP), tp);
-               skge_write32(hw, RB_ADDR(q, RB_RX_LTPP), space/4);
-       } else if (hw->chip_id != CHIP_ID_GENESIS)
-               /* Genesis Tx Fifo is too small for normal store/forward */
+               skge_write32(hw, RB_ADDR(q, RB_RX_UTPP),
+                            start + (2*len)/3);
+               skge_write32(hw, RB_ADDR(q, RB_RX_LTPP),
+                            start + (len/3));
+       } else {
+               /* Enable store & forward on Tx queue's because
+                * Tx FIFO is only 4K on Genesis and 1K on Yukon
+                */
                skge_write8(hw, RB_ADDR(q, RB_CTRL), RB_ENA_STFWD);
+       }
 
        skge_write8(hw, RB_ADDR(q, RB_CTRL), RB_ENA_OP_MD);
 }
@@ -2564,7 +2565,7 @@ static int skge_up(struct net_device *dev)
        struct skge_port *skge = netdev_priv(dev);
        struct skge_hw *hw = skge->hw;
        int port = skge->port;
-       u32 ramaddr, ramsize, rxspace;
+       u32 chunk, ram_addr;
        size_t rx_size, tx_size;
        int err;
 
@@ -2619,15 +2620,14 @@ static int skge_up(struct net_device *dev)
        spin_unlock_bh(&hw->phy_lock);
 
        /* Configure RAMbuffers */
-       ramsize = (hw->ram_size - hw->ram_offset) / hw->ports;
-       ramaddr = hw->ram_offset + port * ramsize;
-       rxspace = 8 + (2*(ramsize - 16))/3;
-
-       skge_ramset(hw, rxqaddr[port], ramaddr, rxspace);
-       skge_ramset(hw, txqaddr[port], ramaddr + rxspace, ramsize - rxspace);
+       chunk = hw->ram_size / ((hw->ports + 1)*2);
+       ram_addr = hw->ram_offset + 2 * chunk * port;
 
+       skge_ramset(hw, rxqaddr[port], ram_addr, chunk);
        skge_qset(skge, rxqaddr[port], skge->rx_ring.to_clean);
+
        BUG_ON(skge->tx_ring.to_use != skge->tx_ring.to_clean);
+       skge_ramset(hw, txqaddr[port], ram_addr+chunk, chunk);
        skge_qset(skge, txqaddr[port], skge->tx_ring.to_use);
 
        /* Start receiver BMU */
@@ -3591,12 +3591,15 @@ static int skge_reset(struct skge_hw *hw)
        if (hw->chip_id == CHIP_ID_GENESIS) {
                if (t8 == 3) {
                        /* special case: 4 x 64k x 36, offset = 0x80000 */
-                       hw->ram_size = 1024;
-                       hw->ram_offset = 512;
+                       hw->ram_size = 0x100000;
+                       hw->ram_offset = 0x80000;
                } else
                        hw->ram_size = t8 * 512;
-       } else /* Yukon */
-               hw->ram_size = t8 ? t8 * 4 : 128;
+       }
+       else if (t8 == 0)
+               hw->ram_size = 0x20000;
+       else
+               hw->ram_size = t8 * 4096;
 
        hw->intr_mask = IS_HW_ERR;
 
index c02bc8304b137cd407d88498729bd4fb53acf69e..dd21182b60e0fd11fd6c873a67e3e694229fb340 100644 (file)
 #define SYSREG_IRP_SIZE                                6
 
 /* Bitfields in PCCR */
+#define SYSREG_PCCR_E_OFFSET                   0
+#define SYSREG_PCCR_E_SIZE                     1
 #define SYSREG_PCCR_R_OFFSET                   1
 #define SYSREG_PCCR_R_SIZE                     1
 #define SYSREG_PCCR_C_OFFSET                   2
index c1d1629fcd272a038bc359f81d9fa700eb4d8524..5f388035687de5004d11d42fbb436abb08fb325b 100644 (file)
@@ -21,7 +21,7 @@
 #include <sys/types.h>
 #endif
 
-#if defined(__arm__) || defined(__mips__)
+#if defined(__arm__) || defined(__mips__) || defined(__avr32__)
 /* This (ioaddr_t) is exposed to userspace & hence cannot be changed. */
 typedef u_int   ioaddr_t;
 #else
index f1aec27f1df00eaae4cbb9c3f99dde1b4e1c8520..cd0f1d4137a734abb393a5ebc5a8534b2b8f882a 100644 (file)
@@ -1386,8 +1386,7 @@ static int wait_task_stopped(struct task_struct *p, int delayed_group_leader,
                int why = (p->ptrace & PT_PTRACED) ? CLD_TRAPPED : CLD_STOPPED;
 
                exit_code = p->exit_code;
-               if (unlikely(!exit_code) ||
-                   unlikely(p->state & TASK_TRACED))
+               if (unlikely(!exit_code) || unlikely(p->exit_state))
                        goto bail_ref;
                return wait_noreap_copyout(p, pid, uid,
                                           why, (exit_code << 8) | 0x7f,
index 5bc2ceb692ec94925340e0b65ce4cb8695e2cee1..08a9bd91a1aaf517f1b17ff688fa9f612273f873 100644 (file)
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -321,7 +321,8 @@ static void *slob_alloc(size_t size, gfp_t gfp, int align, int node)
                /* Improve fragment distribution and reduce our average
                 * search time by starting our next search here. (see
                 * Knuth vol 1, sec 2.5, pg 449) */
-               if (free_slob_pages.next != prev->next)
+               if (prev != free_slob_pages.prev &&
+                               free_slob_pages.next != prev->next)
                        list_move_tail(&free_slob_pages, prev->next);
                break;
        }