Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Dec 2009 20:55:40 +0000 (12:55 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Dec 2009 20:55:40 +0000 (12:55 -0800)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
  edac, pci: remove pesky debug printk
  amd64_edac: restrict PCI config space access
  amd64_edac: fix forcing module load/unload
  amd64_edac: make driver loading more robust
  amd64_edac: fix driver instance freeing
  amd64_edac: fix K8 chip select reporting

21 files changed:
arch/sh/boards/mach-ecovec24/setup.c
arch/sh/include/asm/dma.h
arch/sh/include/cpu-sh4/cpu/dma-sh4a.h
arch/sh/kernel/cpu/sh4a/setup-sh7724.c
arch/sh/kernel/cpu/sh4a/setup-sh7785.c
arch/sh/kernel/idle.c
arch/sh/mm/cache.c
drivers/i2c/busses/i2c-bfin-twi.c
drivers/i2c/busses/i2c-omap.c
drivers/serial/sh-sci.c
drivers/serial/sh-sci.h
drivers/watchdog/adx_wdt.c
drivers/watchdog/at32ap700x_wdt.c
drivers/watchdog/davinci_wdt.c
drivers/watchdog/iTCO_wdt.c
drivers/watchdog/mpcore_wdt.c
drivers/watchdog/mv64x60_wdt.c
drivers/watchdog/omap_wdt.c
drivers/watchdog/pnx4008_wdt.c
drivers/watchdog/s3c2410_wdt.c
drivers/watchdog/txx9wdt.c

index 194aaca..6a8861b 100644 (file)
@@ -128,8 +128,6 @@ static struct platform_device nor_flash_device = {
 
 /* SH Eth */
 #define SH_ETH_ADDR    (0xA4600000)
-#define SH_ETH_MAHR    (SH_ETH_ADDR + 0x1C0)
-#define SH_ETH_MALR    (SH_ETH_ADDR + 0x1C8)
 static struct resource sh_eth_resources[] = {
        [0] = {
                .start = SH_ETH_ADDR,
@@ -509,6 +507,7 @@ static struct platform_device sdhi1_device = {
 
 #else
 
+/* MMC SPI */
 static int mmc_spi_get_ro(struct device *dev)
 {
        return gpio_get_value(GPIO_PTY6);
@@ -542,6 +541,7 @@ static struct spi_board_info spi_bus[] = {
        },
 };
 
+/* MSIOF0 */
 static struct sh_msiof_spi_info msiof0_data = {
        .num_chipselect = 1,
 };
index 04ad0e1..07373a0 100644 (file)
 #include <asm-generic/dma.h>
 
 #ifdef CONFIG_NR_DMA_CHANNELS
-#  define MAX_DMA_CHANNELS   (CONFIG_NR_DMA_CHANNELS)
+#  define MAX_DMA_CHANNELS     (CONFIG_NR_DMA_CHANNELS)
+#elif defined(CONFIG_NR_ONCHIP_DMA_CHANNELS)
+#  define MAX_DMA_CHANNELS     (CONFIG_NR_ONCHIP_DMA_CHANNELS)
 #else
-#  define MAX_DMA_CHANNELS   (CONFIG_NR_ONCHIP_DMA_CHANNELS)
+#  define MAX_DMA_CHANNELS     0
 #endif
 
 /*
index f0886bc..c4ed660 100644 (file)
 #elif defined(CONFIG_CPU_SUBTYPE_SH7723) || \
       defined(CONFIG_CPU_SUBTYPE_SH7724)
 #define DMTE0_IRQ      48      /* DMAC0A*/
-#define DMTE4_IRQ      40      /* DMAC0B */
-#define DMTE6_IRQ      42
-#define DMTE8_IRQ      76      /* DMAC1A */
-#define DMTE9_IRQ      77
+#define DMTE4_IRQ      76      /* DMAC0B */
+#define DMTE6_IRQ      40
+#define DMTE8_IRQ      42      /* DMAC1A */
+#define DMTE9_IRQ      43
 #define DMTE10_IRQ     72      /* DMAC1B */
 #define DMTE11_IRQ     73
 #define DMAE0_IRQ      78      /* DMA Error IRQ*/
index a52f351..d32f96c 100644 (file)
 #include <linux/notifier.h>
 #include <asm/suspend.h>
 #include <asm/clock.h>
+#include <asm/dma-sh.h>
 #include <asm/mmzone.h>
 #include <cpu/sh7724.h>
 
+/* DMA */
+static struct sh_dmae_pdata dma_platform_data = {
+       .mode = SHDMA_DMAOR1,
+};
+
+static struct platform_device dma_device = {
+       .name   = "sh-dma-engine",
+       .id             = -1,
+       .dev    = {
+               .platform_data  = &dma_platform_data,
+       },
+};
+
 /* Serial */
 static struct plat_sci_port scif0_platform_data = {
        .mapbase        = 0xffe00000,
@@ -649,6 +663,7 @@ static struct platform_device *sh7724_devices[] __initdata = {
        &tmu3_device,
        &tmu4_device,
        &tmu5_device,
+       &dma_device,
        &rtc_device,
        &iic0_device,
        &iic1_device,
index ef26ebd..f685b9b 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/io.h>
 #include <linux/mm.h>
 #include <linux/sh_timer.h>
+#include <asm/dma-sh.h>
 #include <asm/mmzone.h>
 
 static struct plat_sci_port scif0_platform_data = {
@@ -294,6 +295,18 @@ static struct platform_device tmu5_device = {
        .num_resources  = ARRAY_SIZE(tmu5_resources),
 };
 
+static struct sh_dmae_pdata dma_platform_data = {
+       .mode = (SHDMA_MIX_IRQ | SHDMA_DMAOR1),
+};
+
+static struct platform_device dma_device = {
+       .name           = "sh-dma-engine",
+       .id             = -1,
+       .dev            = {
+               .platform_data  = &dma_platform_data,
+       },
+};
+
 static struct platform_device *sh7785_devices[] __initdata = {
        &scif0_device,
        &scif1_device,
@@ -307,6 +320,7 @@ static struct platform_device *sh7785_devices[] __initdata = {
        &tmu3_device,
        &tmu4_device,
        &tmu5_device,
+       &dma_device,
 };
 
 static int __init sh7785_devices_setup(void)
index aaff003..6b3d706 100644 (file)
@@ -62,6 +62,7 @@ void default_idle(void)
                clear_thread_flag(TIF_POLLING_NRFLAG);
                smp_mb__after_clear_bit();
 
+               set_bl_bit();
                if (!need_resched()) {
                        local_irq_enable();
                        cpu_sleep();
@@ -69,6 +70,7 @@ void default_idle(void)
                        local_irq_enable();
 
                set_thread_flag(TIF_POLLING_NRFLAG);
+               clear_bl_bit();
        } else
                poll_idle();
 }
index e9415d3..b8607fa 100644 (file)
@@ -133,12 +133,8 @@ void __update_cache(struct vm_area_struct *vma,
        page = pfn_to_page(pfn);
        if (pfn_valid(pfn)) {
                int dirty = test_and_clear_bit(PG_dcache_dirty, &page->flags);
-               if (dirty) {
-                       unsigned long addr = (unsigned long)page_address(page);
-
-                       if (pages_do_alias(addr, address & PAGE_MASK))
-                               __flush_purge_region((void *)addr, PAGE_SIZE);
-               }
+               if (dirty)
+                       __flush_purge_region(page_address(page), PAGE_SIZE);
        }
 }
 
index b309ac2..fe3fb56 100644 (file)
@@ -693,13 +693,13 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev)
        }
 
        /* Set TWI internal clock as 10MHz */
-       write_CONTROL(iface, ((get_sclk() / 1024 / 1024 + 5) / 10) & 0x7F);
+       write_CONTROL(iface, ((get_sclk() / 1000 / 1000 + 5) / 10) & 0x7F);
 
        /*
         * We will not end up with a CLKDIV=0 because no one will specify
-        * 20kHz SCL or less in Kconfig now. (5 * 1024 / 20 = 0x100)
+        * 20kHz SCL or less in Kconfig now. (5 * 1000 / 20 = 250)
         */
-       clkhilow = 5 * 1024 / CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ;
+       clkhilow = ((10 * 1000 / CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ) + 1) / 2;
 
        /* Set Twi interface clock as specified */
        write_CLKDIV(iface, (clkhilow << 8) | clkhilow);
index 75bf3ad..0037e31 100644 (file)
@@ -247,7 +247,13 @@ static void omap_i2c_unidle(struct omap_i2c_dev *dev)
                omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, OMAP_I2C_CON_EN);
        }
        dev->idle = 0;
-       omap_i2c_write_reg(dev, OMAP_I2C_IE_REG, dev->iestate);
+
+       /*
+        * Don't write to this register if the IE state is 0 as it can
+        * cause deadlock.
+        */
+       if (dev->iestate)
+               omap_i2c_write_reg(dev, OMAP_I2C_IE_REG, dev->iestate);
 }
 
 static void omap_i2c_idle(struct omap_i2c_dev *dev)
@@ -280,6 +286,11 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)
        unsigned long internal_clk = 0;
 
        if (dev->rev >= OMAP_I2C_REV_2) {
+               /* Disable I2C controller before soft reset */
+               omap_i2c_write_reg(dev, OMAP_I2C_CON_REG,
+                       omap_i2c_read_reg(dev, OMAP_I2C_CON_REG) &
+                               ~(OMAP_I2C_CON_EN));
+
                omap_i2c_write_reg(dev, OMAP_I2C_SYSC_REG, SYSC_SOFTRESET_MASK);
                /* For some reason we need to set the EN bit before the
                 * reset done bit gets set. */
index 68c7f6c..37f0de9 100644 (file)
@@ -222,9 +222,9 @@ static inline void sci_init_pins(struct uart_port *port, unsigned int cflag)
                   Set SCP6MD1,0 = {01} (output)  */
                __raw_writew((data & 0x0fcf) | 0x1000, SCPCR);
 
-               data = ctrl_inb(SCPDR);
+               data = __raw_readb(SCPDR);
                /* Set /RTS2 (bit6) = 0 */
-               ctrl_outb(data & 0xbf, SCPDR);
+               __raw_writeb(data & 0xbf, SCPDR);
        }
 }
 #elif defined(CONFIG_CPU_SUBTYPE_SH7722)
@@ -897,11 +897,21 @@ static void sci_shutdown(struct uart_port *port)
 static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
                            struct ktermios *old)
 {
-       unsigned int status, baud, smr_val;
+       unsigned int status, baud, smr_val, max_baud;
        int t = -1;
 
-       baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
-       if (likely(baud))
+       /*
+        * earlyprintk comes here early on with port->uartclk set to zero.
+        * the clock framework is not up and running at this point so here
+        * we assume that 115200 is the maximum baud rate. please note that
+        * the baud rate is not programmed during earlyprintk - it is assumed
+        * that the previous boot loader has enabled required clocks and
+        * setup the baud rate generator hardware for us already.
+        */
+       max_baud = port->uartclk ? port->uartclk / 16 : 115200;
+
+       baud = uart_get_baud_rate(port, termios, old, 0, max_baud);
+       if (likely(baud && port->uartclk))
                t = SCBRR_VALUE(baud, port->uartclk);
 
        do {
index a32094e..0efcded 100644 (file)
@@ -517,20 +517,20 @@ static const struct __attribute__((packed)) {
 static inline int sci_rxd_in(struct uart_port *port)
 {
        if (port->mapbase == 0xfffffe80)
-               return ctrl_inb(SCPDR)&0x01 ? 1 : 0; /* SCI */
+               return __raw_readb(SCPDR)&0x01 ? 1 : 0; /* SCI */
        if (port->mapbase == 0xa4000150)
-               return ctrl_inb(SCPDR)&0x10 ? 1 : 0; /* SCIF */
+               return __raw_readb(SCPDR)&0x10 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xa4000140)
-               return ctrl_inb(SCPDR)&0x04 ? 1 : 0; /* IRDA */
+               return __raw_readb(SCPDR)&0x04 ? 1 : 0; /* IRDA */
        return 1;
 }
 #elif defined(CONFIG_CPU_SUBTYPE_SH7705)
 static inline int sci_rxd_in(struct uart_port *port)
 {
        if (port->mapbase == SCIF0)
-               return ctrl_inb(SCPDR)&0x04 ? 1 : 0; /* IRDA */
+               return __raw_readb(SCPDR)&0x04 ? 1 : 0; /* IRDA */
        if (port->mapbase == SCIF2)
-               return ctrl_inb(SCPDR)&0x10 ? 1 : 0; /* SCIF */
+               return __raw_readb(SCPDR)&0x10 ? 1 : 0; /* SCIF */
        return 1;
 }
 #elif defined(CONFIG_CPU_SUBTYPE_SH7710) || defined(CONFIG_CPU_SUBTYPE_SH7712)
@@ -557,68 +557,68 @@ static inline int sci_rxd_in(struct uart_port *port)
 static inline int sci_rxd_in(struct uart_port *port)
 {
        if (port->mapbase == 0xffe00000)
-               return ctrl_inb(SCSPTR1)&0x01 ? 1 : 0; /* SCI */
+               return __raw_readb(SCSPTR1)&0x01 ? 1 : 0; /* SCI */
        if (port->mapbase == 0xffe80000)
-               return ctrl_inw(SCSPTR2)&0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR2)&0x0001 ? 1 : 0; /* SCIF */
        return 1;
 }
 #elif defined(CONFIG_CPU_SUBTYPE_SH4_202)
 static inline int sci_rxd_in(struct uart_port *port)
 {
        if (port->mapbase == 0xffe80000)
-               return ctrl_inw(SCSPTR2)&0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR2)&0x0001 ? 1 : 0; /* SCIF */
        return 1;
 }
 #elif defined(CONFIG_CPU_SUBTYPE_SH7757)
 static inline int sci_rxd_in(struct uart_port *port)
 {
        if (port->mapbase == 0xfe4b0000)
-               return ctrl_inw(SCSPTR0) & 0x0001 ? 1 : 0;
+               return __raw_readw(SCSPTR0) & 0x0001 ? 1 : 0;
        if (port->mapbase == 0xfe4c0000)
-               return ctrl_inw(SCSPTR1) & 0x0001 ? 1 : 0;
+               return __raw_readw(SCSPTR1) & 0x0001 ? 1 : 0;
        if (port->mapbase == 0xfe4d0000)
-               return ctrl_inw(SCSPTR2) & 0x0001 ? 1 : 0;
+               return __raw_readw(SCSPTR2) & 0x0001 ? 1 : 0;
 }
 #elif defined(CONFIG_CPU_SUBTYPE_SH7760)
 static inline int sci_rxd_in(struct uart_port *port)
 {
        if (port->mapbase == 0xfe600000)
-               return ctrl_inw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xfe610000)
-               return ctrl_inw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xfe620000)
-               return ctrl_inw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */
        return 1;
 }
 #elif defined(CONFIG_CPU_SUBTYPE_SH7343)
 static inline int sci_rxd_in(struct uart_port *port)
 {
        if (port->mapbase == 0xffe00000)
-               return ctrl_inw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xffe10000)
-               return ctrl_inw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xffe20000)
-               return ctrl_inw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xffe30000)
-               return ctrl_inw(SCSPTR3) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR3) & 0x0001 ? 1 : 0; /* SCIF */
        return 1;
 }
 #elif defined(CONFIG_CPU_SUBTYPE_SH7366)
 static inline int sci_rxd_in(struct uart_port *port)
 {
        if (port->mapbase == 0xffe00000)
-               return ctrl_inb(SCPDR0) & 0x0001 ? 1 : 0; /* SCIF0 */
+               return __raw_readb(SCPDR0) & 0x0001 ? 1 : 0; /* SCIF0 */
        return 1;
 }
 #elif defined(CONFIG_CPU_SUBTYPE_SH7722)
 static inline int sci_rxd_in(struct uart_port *port)
 {
        if (port->mapbase == 0xffe00000)
-               return ctrl_inb(PSDR) & 0x02 ? 1 : 0; /* SCIF0 */
+               return __raw_readb(PSDR) & 0x02 ? 1 : 0; /* SCIF0 */
        if (port->mapbase == 0xffe10000)
-               return ctrl_inb(PADR) & 0x40 ? 1 : 0; /* SCIF1 */
+               return __raw_readb(PADR) & 0x40 ? 1 : 0; /* SCIF1 */
        if (port->mapbase == 0xffe20000)
-               return ctrl_inb(PWDR) & 0x04 ? 1 : 0; /* SCIF2 */
+               return __raw_readb(PWDR) & 0x04 ? 1 : 0; /* SCIF2 */
 
        return 1;
 }
@@ -626,17 +626,17 @@ static inline int sci_rxd_in(struct uart_port *port)
 static inline int sci_rxd_in(struct uart_port *port)
 {
         if (port->mapbase == 0xffe00000)
-                return ctrl_inb(SCSPTR0) & 0x0008 ? 1 : 0; /* SCIF0 */
+                return __raw_readb(SCSPTR0) & 0x0008 ? 1 : 0; /* SCIF0 */
         if (port->mapbase == 0xffe10000)
-                return ctrl_inb(SCSPTR1) & 0x0020 ? 1 : 0; /* SCIF1 */
+                return __raw_readb(SCSPTR1) & 0x0020 ? 1 : 0; /* SCIF1 */
         if (port->mapbase == 0xffe20000)
-                return ctrl_inb(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF2 */
+                return __raw_readb(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF2 */
         if (port->mapbase == 0xa4e30000)
-                return ctrl_inb(SCSPTR3) & 0x0001 ? 1 : 0; /* SCIF3 */
+                return __raw_readb(SCSPTR3) & 0x0001 ? 1 : 0; /* SCIF3 */
         if (port->mapbase == 0xa4e40000)
-                return ctrl_inb(SCSPTR4) & 0x0001 ? 1 : 0; /* SCIF4 */
+                return __raw_readb(SCSPTR4) & 0x0001 ? 1 : 0; /* SCIF4 */
         if (port->mapbase == 0xa4e50000)
-                return ctrl_inb(SCSPTR5) & 0x0008 ? 1 : 0; /* SCIF5 */
+                return __raw_readb(SCSPTR5) & 0x0008 ? 1 : 0; /* SCIF5 */
         return 1;
 }
 #elif defined(CONFIG_CPU_SUBTYPE_SH7724)
@@ -645,9 +645,9 @@ static inline int sci_rxd_in(struct uart_port *port)
 static inline int sci_rxd_in(struct uart_port *port)
 {
        if (port->type == PORT_SCIF)
-               return ctrl_inw((port->mapbase + SCFSR))  & SCIF_BRK ? 1 : 0;
+               return __raw_readw((port->mapbase + SCFSR))  & SCIF_BRK ? 1 : 0;
        if (port->type == PORT_SCIFA)
-               return ctrl_inw((port->mapbase + SCASSR)) & SCIF_BRK ? 1 : 0;
+               return __raw_readw((port->mapbase + SCASSR)) & SCIF_BRK ? 1 : 0;
        return 1;
 }
 #elif defined(CONFIG_CPU_SUBTYPE_SH5_101) || defined(CONFIG_CPU_SUBTYPE_SH5_103)
@@ -665,11 +665,11 @@ static inline int sci_rxd_in(struct uart_port *port)
 static inline int sci_rxd_in(struct uart_port *port)
 {
        if (port->mapbase == 0xffe00000)
-               return ctrl_inw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xffe08000)
-               return ctrl_inw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xffe10000)
-               return ctrl_inw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF/IRDA */
+               return __raw_readw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF/IRDA */
 
        return 1;
 }
@@ -677,20 +677,20 @@ static inline int sci_rxd_in(struct uart_port *port)
 static inline int sci_rxd_in(struct uart_port *port)
 {
        if (port->mapbase == 0xff923000)
-               return ctrl_inw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xff924000)
-               return ctrl_inw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xff925000)
-               return ctrl_inw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */
        return 1;
 }
 #elif defined(CONFIG_CPU_SUBTYPE_SH7780)
 static inline int sci_rxd_in(struct uart_port *port)
 {
        if (port->mapbase == 0xffe00000)
-               return ctrl_inw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xffe10000)
-               return ctrl_inw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
        return 1;
 }
 #elif defined(CONFIG_CPU_SUBTYPE_SH7785) || \
@@ -698,17 +698,17 @@ static inline int sci_rxd_in(struct uart_port *port)
 static inline int sci_rxd_in(struct uart_port *port)
 {
        if (port->mapbase == 0xffea0000)
-               return ctrl_inw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xffeb0000)
-               return ctrl_inw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xffec0000)
-               return ctrl_inw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xffed0000)
-               return ctrl_inw(SCSPTR3) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR3) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xffee0000)
-               return ctrl_inw(SCSPTR4) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR4) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xffef0000)
-               return ctrl_inw(SCSPTR5) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR5) & 0x0001 ? 1 : 0; /* SCIF */
        return 1;
 }
 #elif defined(CONFIG_CPU_SUBTYPE_SH7201) || \
@@ -718,22 +718,22 @@ static inline int sci_rxd_in(struct uart_port *port)
 static inline int sci_rxd_in(struct uart_port *port)
 {
        if (port->mapbase == 0xfffe8000)
-               return ctrl_inw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xfffe8800)
-               return ctrl_inw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xfffe9000)
-               return ctrl_inw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xfffe9800)
-               return ctrl_inw(SCSPTR3) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR3) & 0x0001 ? 1 : 0; /* SCIF */
 #if defined(CONFIG_CPU_SUBTYPE_SH7201)
        if (port->mapbase == 0xfffeA000)
-               return ctrl_inw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xfffeA800)
-               return ctrl_inw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xfffeB000)
-               return ctrl_inw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xfffeB800)
-               return ctrl_inw(SCSPTR3) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR3) & 0x0001 ? 1 : 0; /* SCIF */
 #endif
        return 1;
 }
@@ -741,24 +741,24 @@ static inline int sci_rxd_in(struct uart_port *port)
 static inline int sci_rxd_in(struct uart_port *port)
 {
        if (port->mapbase == 0xf8400000)
-               return ctrl_inw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xf8410000)
-               return ctrl_inw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xf8420000)
-               return ctrl_inw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */
        return 1;
 }
 #elif defined(CONFIG_CPU_SUBTYPE_SHX3)
 static inline int sci_rxd_in(struct uart_port *port)
 {
        if (port->mapbase == 0xffc30000)
-               return ctrl_inw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xffc40000)
-               return ctrl_inw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xffc50000)
-               return ctrl_inw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR2) & 0x0001 ? 1 : 0; /* SCIF */
        if (port->mapbase == 0xffc60000)
-               return ctrl_inw(SCSPTR3) & 0x0001 ? 1 : 0; /* SCIF */
+               return __raw_readw(SCSPTR3) & 0x0001 ? 1 : 0; /* SCIF */
        return 1;
 }
 #endif
index 9c65944..9d7d155 100644 (file)
@@ -242,14 +242,14 @@ static int __devinit adx_wdt_probe(struct platform_device *pdev)
        }
 
        res = devm_request_mem_region(&pdev->dev, res->start,
-                       res->end - res->start + 1, res->name);
+                       resource_size(res), res->name);
        if (!res) {
                dev_err(&pdev->dev, "cannot request I/O memory region\n");
                return -ENXIO;
        }
 
        wdt->base = devm_ioremap_nocache(&pdev->dev, res->start,
-                       res->end - res->start + 1);
+                       resource_size(res));
        if (!wdt->base) {
                dev_err(&pdev->dev, "cannot remap I/O memory region\n");
                return -ENXIO;
index e8ae638..0378479 100644 (file)
@@ -326,7 +326,7 @@ static int __init at32_wdt_probe(struct platform_device *pdev)
                return -ENOMEM;
        }
 
-       wdt->regs = ioremap(regs->start, regs->end - regs->start + 1);
+       wdt->regs = ioremap(regs->start, resource_size(regs));
        if (!wdt->regs) {
                ret = -ENOMEM;
                dev_dbg(&pdev->dev, "could not map I/O memory\n");
index 9d7520f..887136d 100644 (file)
@@ -221,7 +221,7 @@ static int __devinit davinci_wdt_probe(struct platform_device *pdev)
                return -ENOENT;
        }
 
-       size = res->end - res->start + 1;
+       size = resource_size(res);
        wdt_mem = request_mem_region(res->start, size, pdev->name);
 
        if (wdt_mem == NULL) {
index e44fbb3..c8a3bec 100644 (file)
@@ -30,6 +30,7 @@
  *     document number 316972-004, 316973-012: 82801I (ICH9)
  *     document number 319973-002, 319974-002: 82801J (ICH10)
  *     document number 322169-001, 322170-001: 5 Series, 3400 Series (PCH)
+ *     document number 320066-003, 320257-008: EP80597 (IICH)
  */
 
 /*
@@ -100,6 +101,7 @@ enum iTCO_chipsets {
        TCO_PCH,        /* PCH Desktop Full Featured */
        TCO_PCHM,       /* PCH Mobile Full Featured */
        TCO_PCHMSFF,    /* PCH Mobile SFF Full Featured */
+       TCO_EP80579,    /* EP80579 */
 };
 
 static struct {
@@ -143,6 +145,7 @@ static struct {
        {"PCH Desktop Full Featured", 2},
        {"PCH Mobile Full Featured", 2},
        {"PCH Mobile SFF Full Featured", 2},
+       {"EP80579", 2},
        {NULL, 0}
 };
 
@@ -214,6 +217,7 @@ static struct pci_device_id iTCO_wdt_pci_tbl[] = {
        { ITCO_PCI_DEVICE(0x3b00,                               TCO_PCH)},
        { ITCO_PCI_DEVICE(0x3b01,                               TCO_PCHM)},
        { ITCO_PCI_DEVICE(0x3b0d,                               TCO_PCHMSFF)},
+       { ITCO_PCI_DEVICE(0x5031,                               TCO_EP80579)},
        { 0, },                 /* End of list */
 };
 MODULE_DEVICE_TABLE(pci, iTCO_wdt_pci_tbl);
index 83fa34b..a2dc07c 100644 (file)
@@ -350,7 +350,7 @@ static int __devinit mpcore_wdt_probe(struct platform_device *dev)
                ret = -ENXIO;
                goto err_free;
        }
-       wdt->base = ioremap(res->start, res->end - res->start + 1);
+       wdt->base = ioremap(res->start, resource_size(res));
        if (!wdt->base) {
                ret = -ENOMEM;
                goto err_free;
index acf589d..a51dbe4 100644 (file)
@@ -275,7 +275,7 @@ static int __devinit mv64x60_wdt_probe(struct platform_device *dev)
        if (!r)
                return -ENODEV;
 
-       mv64x60_wdt_regs = ioremap(r->start, r->end - r->start + 1);
+       mv64x60_wdt_regs = ioremap(r->start, resource_size(r));
        if (mv64x60_wdt_regs == NULL)
                return -ENOMEM;
 
index 429ea99..c6aaf28 100644 (file)
@@ -277,8 +277,7 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev)
                goto err_busy;
        }
 
-       mem = request_mem_region(res->start, res->end - res->start + 1,
-                                pdev->name);
+       mem = request_mem_region(res->start, resource_size(res), pdev->name);
        if (!mem) {
                ret = -EBUSY;
                goto err_busy;
@@ -306,7 +305,7 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev)
                goto err_clk;
        }
 
-       wdev->base = ioremap(res->start, res->end - res->start + 1);
+       wdev->base = ioremap(res->start, resource_size(res));
        if (!wdev->base) {
                ret = -ENOMEM;
                goto err_ioremap;
@@ -358,7 +357,7 @@ err_clk:
        kfree(wdev);
 
 err_kzalloc:
-       release_mem_region(res->start, res->end - res->start + 1);
+       release_mem_region(res->start, resource_size(res));
 
 err_busy:
 err_get_resource:
@@ -383,7 +382,7 @@ static int __devexit omap_wdt_remove(struct platform_device *pdev)
                return -ENOENT;
 
        misc_deregister(&(wdev->omap_wdt_miscdev));
-       release_mem_region(res->start, res->end - res->start + 1);
+       release_mem_region(res->start, resource_size(res));
        platform_set_drvdata(pdev, NULL);
 
        clk_put(wdev->ick);
index 4d227b1..430a584 100644 (file)
@@ -264,7 +264,7 @@ static int __devinit pnx4008_wdt_probe(struct platform_device *pdev)
                return -ENOENT;
        }
 
-       size = res->end - res->start + 1;
+       size = resource_size(res);
        wdt_mem = request_mem_region(res->start, size, pdev->name);
 
        if (wdt_mem == NULL) {
index 85b93e1..8760a26 100644 (file)
@@ -421,7 +421,7 @@ static int __devinit s3c2410wdt_probe(struct platform_device *pdev)
                return -ENOENT;
        }
 
-       size = (res->end - res->start) + 1;
+       size = resource_size(res);
        wdt_mem = request_mem_region(res->start, size, pdev->name);
        if (wdt_mem == NULL) {
                dev_err(dev, "failed to get memory region\n");
index 6adab77..d635566 100644 (file)
@@ -214,12 +214,10 @@ static int __init txx9wdt_probe(struct platform_device *dev)
        res = platform_get_resource(dev, IORESOURCE_MEM, 0);
        if (!res)
                goto exit_busy;
-       if (!devm_request_mem_region(&dev->dev,
-                                    res->start, res->end - res->start + 1,
+       if (!devm_request_mem_region(&dev->dev, res->start, resource_size(res),
                                     "txx9wdt"))
                goto exit_busy;
-       txx9wdt_reg = devm_ioremap(&dev->dev,
-                                  res->start, res->end - res->start + 1);
+       txx9wdt_reg = devm_ioremap(&dev->dev, res->start, resource_size(res));
        if (!txx9wdt_reg)
                goto exit_busy;