···1717#include <linux/init.h>1818#include <linux/kernel.h>1919#include <linux/module.h>2020-#include <asm/sh_mobile_lcdc.h>2020+#include <video/sh_mobile_lcdc.h>2121#include <asm/migor.h>22222323/* LCD Module is a PH240320T according to board schematics. This module
···3333 struct ipr_data *p = get_irq_chip_data(irq);3434 unsigned long addr = get_ipr_desc(irq)->ipr_offsets[p->ipr_idx];3535 /* Set the priority in IPR to 0 */3636- ctrl_outw(ctrl_inw(addr) & (0xffff ^ (0xf << p->shift)), addr);3636+ __raw_writew(__raw_readw(addr) & (0xffff ^ (0xf << p->shift)), addr);3737}38383939static void enable_ipr_irq(unsigned int irq)···4141 struct ipr_data *p = get_irq_chip_data(irq);4242 unsigned long addr = get_ipr_desc(irq)->ipr_offsets[p->ipr_idx];4343 /* Set priority in IPR back to original value */4444- ctrl_outw(ctrl_inw(addr) | (p->priority << p->shift), addr);4444+ __raw_writew(__raw_readw(addr) | (p->priority << p->shift), addr);4545}46464747/*
+4-4
arch/sh/lib/io.c
···1414#include <linux/module.h>1515#include <linux/io.h>16161717-void __raw_readsl(unsigned long addr, void *datap, int len)1717+void __raw_readsl(const void __iomem *addr, void *datap, int len)1818{1919 u32 *data;20202121 for (data = datap; (len != 0) && (((u32)data & 0x1f) != 0); len--)2222- *data++ = ctrl_inl(addr);2222+ *data++ = __raw_readl(addr);23232424 if (likely(len >= (0x20 >> 2))) {2525 int tmp2, tmp3, tmp4, tmp5, tmp6;···5959 }60606161 for (; len != 0; len--)6262- *data++ = ctrl_inl(addr);6262+ *data++ = __raw_readl(addr);6363}6464EXPORT_SYMBOL(__raw_readsl);65656666-void __raw_writesl(unsigned long addr, const void *data, int len)6666+void __raw_writesl(void __iomem *addr, const void *data, int len)6767{6868 if (likely(len != 0)) {6969 int tmp1;
+33-12
drivers/serial/sh-sci.c
···33 *44 * SuperH on-chip serial module support. (SCI with no FIFO / with FIFO)55 *66- * Copyright (C) 2002 - 2006 Paul Mundt66+ * Copyright (C) 2002 - 2008 Paul Mundt77 * Modified to support SH7720 SCIF. Markus Brunner, Mark Jonas (Jul 2007).88 *99 * based off of the old drivers/char/sh-sci.c by:···4646#include <linux/cpufreq.h>4747#include <linux/clk.h>4848#include <linux/ctype.h>4949+#include <linux/err.h>49505051#ifdef CONFIG_SUPERH5152#include <asm/clock.h>···11331132 break;11341133 }1135113411361136-#if defined(CONFIG_CPU_SUBTYPE_SH5_101) || defined(CONFIG_CPU_SUBTYPE_SH5_103)11371137- if (port->mapbase == 0)11351135+ if (port->flags & UPF_IOREMAP && !port->membase) {11361136+#if defined(CONFIG_SUPERH64)11381137 port->mapbase = onchip_remap(SCIF_ADDR_SH5, 1024, "SCIF");11391139-11401140- port->membase = (void __iomem *)port->mapbase;11381138+ port->membase = (void __iomem *)port->mapbase;11391139+#else11401140+ port->membase = ioremap_nocache(port->mapbase, 0x40);11411141#endif11421142+11431143+ printk(KERN_ERR "sci: can't remap port#%d\n", port->line);11441144+ }11421145}1143114611441147static int sci_verify_port(struct uart_port *port, struct serial_struct *ser)···14281423static int __devinit sci_probe(struct platform_device *dev)14291424{14301425 struct plat_sci_port *p = dev->dev.platform_data;14311431- int i;14261426+ int i, ret = -EINVAL;1432142714331428 for (i = 0; p && p->flags != 0; p++, i++) {14341429 struct sci_port *sciport = &sci_ports[i];···1445144014461441 sciport->port.mapbase = p->mapbase;1447144214481448- /*14491449- * For the simple (and majority of) cases where we don't need14501450- * to do any remapping, just cast the cookie directly.14511451- */14521452- if (p->mapbase && !p->membase && !(p->flags & UPF_IOREMAP))14531453- p->membase = (void __iomem *)p->mapbase;14431443+ if (p->mapbase && !p->membase) {14441444+ if (p->flags & UPF_IOREMAP) {14451445+ p->membase = ioremap_nocache(p->mapbase, 0x40);14461446+ if (IS_ERR(p->membase)) {14471447+ ret = PTR_ERR(p->membase);14481448+ goto err_unreg;14491449+ }14501450+ } else {14511451+ /*14521452+ * For the simple (and majority of) cases14531453+ * where we don't need to do any remapping,14541454+ * just cast the cookie directly.14551455+ */14561456+ p->membase = (void __iomem *)p->mapbase;14571457+ }14581458+ }1454145914551460 sciport->port.membase = p->membase;14561461···14911476#endif1492147714931478 return 0;14791479+14801480+err_unreg:14811481+ for (i = i - 1; i >= 0; i--)14821482+ uart_remove_one_port(&sci_uart_driver, &sci_ports[i].port);14831483+14841484+ return ret;14941485}1495148614961487static int __devexit sci_remove(struct platform_device *dev)