Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 23 May 2007 01:15:14 +0000 (18:15 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 23 May 2007 01:15:14 +0000 (18:15 -0700)
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  i2c-s3c2410: Fix build warning
  i2c-tiny-usb: Fix truncated adapter name
  i2c: Legacy i2c drivers shouldn't issue uevents

60 files changed:
arch/ia64/kernel/process.c
arch/ia64/kernel/unwind.c
arch/ia64/pci/pci.c
arch/ia64/sn/kernel/setup.c
arch/powerpc/kernel/cputable.c
arch/powerpc/kernel/pmc.c
arch/powerpc/kernel/smp.c
arch/powerpc/kernel/vmlinux.lds.S
arch/powerpc/mm/mem.c
arch/sh/boards/landisk/gio.c
arch/sh/boards/landisk/setup.c
arch/sh/boards/renesas/r7780rp/Makefile
arch/sh/boards/snapgear/rtc.c
arch/sh/boards/superh/microdev/io.c
arch/sh/boards/superh/microdev/irq.c
arch/sh/boards/superh/microdev/setup.c
arch/sh/boards/unknown/setup.c
arch/sh/drivers/dma/dma-api.c
arch/sh/drivers/dma/dma-isa.c
arch/sh/drivers/dma/dmabrg.c
arch/sh/drivers/pci/ops-dreamcast.c
arch/sh/drivers/pci/pci-st40.c
arch/sh/drivers/pci/pci-st40.h
arch/sh/drivers/superhyway/ops-sh4-202.c
arch/sh/kernel/cf-enabler.c
arch/sh/kernel/cpu/clock.c
arch/sh/kernel/cpu/irq/maskreg.c
arch/sh/kernel/cpu/sh4/fpu.c
arch/sh/kernel/cpu/sh4/setup-sh7750.c
arch/sh/kernel/cpu/sh4a/clock-sh7722.c
arch/sh/kernel/kgdb_stub.c
arch/sh/kernel/process.c
arch/sh/kernel/syscalls.S
arch/sh/kernel/traps.c
arch/sh/math-emu/math.c
arch/sh/mm/copy_page.S
arch/sh/mm/fault.c
arch/sh/mm/init.c
arch/sh/mm/pmb.c
arch/sh/tools/mach-types
drivers/char/Kconfig
drivers/input/touchscreen/hp680_ts_input.c
drivers/media/dvb/bt8xx/dst.c
drivers/media/dvb/dvb-core/dvbdev.c
drivers/media/video/cafe_ccic-regs.h
drivers/media/video/cafe_ccic.c
drivers/media/video/em28xx/Kconfig
drivers/media/video/ivtv/Kconfig
drivers/media/video/ivtv/ivtv-driver.h
drivers/media/video/ivtv/ivtv-ioctl.c
drivers/media/video/ov7670.c
drivers/media/video/tuner-simple.c
fs/Kconfig.binfmt
include/asm-ia64/unistd.h
include/asm-sh/dreamcast/sysasic.h
include/asm-sh/kdebug.h
include/asm-sh/landisk/gio.h
include/asm-sh/landisk/iodata_landisk.h
include/asm-sh/unistd.h
include/linux/videodev2.h

index d1c3ed9943e52d8ccad85553e1d1008ae7dc3629..af73b8dfde282c0c91f84b3f8da062327d18a069 100644 (file)
@@ -763,6 +763,9 @@ get_wchan (struct task_struct *p)
        unsigned long ip;
        int count = 0;
 
+       if (!p || p == current || p->state == TASK_RUNNING)
+               return 0;
+
        /*
         * Note: p may not be a blocked task (it could be current or
         * another process running on some other CPU.  Rather than
@@ -773,6 +776,8 @@ get_wchan (struct task_struct *p)
         */
        unw_init_from_blocked_task(&info, p);
        do {
+               if (p->state == TASK_RUNNING)
+                       return 0;
                if (unw_unwind(&info) < 0)
                        return 0;
                unw_get_ip(&info, &ip);
index 7d3dd6cdafa4aeef31008c31bf62e45cab95da75..b0b08b5f3eca217ccecaced1d0188a66b98fd879 100644 (file)
@@ -1860,7 +1860,7 @@ int
 unw_unwind (struct unw_frame_info *info)
 {
        unsigned long prev_ip, prev_sp, prev_bsp;
-       unsigned long ip, pr, num_regs;
+       unsigned long ip, pr, num_regs, rp_loc, pfs_loc;
        STAT(unsigned long start, flags;)
        int retval;
 
@@ -1870,14 +1870,16 @@ unw_unwind (struct unw_frame_info *info)
        prev_sp = info->sp;
        prev_bsp = info->bsp;
 
-       /* restore the ip */
-       if (!info->rp_loc) {
+       /* validate the return IP pointer */
+       rp_loc = (unsigned long) info->rp_loc;
+       if ((rp_loc < info->regstk.limit) || (rp_loc > info->regstk.top)) {
                /* FIXME: should really be level 0 but it occurs too often. KAO */
                UNW_DPRINT(1, "unwind.%s: failed to locate return link (ip=0x%lx)!\n",
                           __FUNCTION__, info->ip);
                STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags));
                return -1;
        }
+       /* restore the ip */
        ip = info->ip = *info->rp_loc;
        if (ip < GATE_ADDR) {
                UNW_DPRINT(2, "unwind.%s: reached user-space (ip=0x%lx)\n", __FUNCTION__, ip);
@@ -1885,12 +1887,14 @@ unw_unwind (struct unw_frame_info *info)
                return -1;
        }
 
-       /* restore the cfm: */
-       if (!info->pfs_loc) {
+       /* validate the previous stack frame pointer */
+       pfs_loc = (unsigned long) info->pfs_loc;
+       if ((pfs_loc < info->regstk.limit) || (pfs_loc > info->regstk.top)) {
                UNW_DPRINT(0, "unwind.%s: failed to locate ar.pfs!\n", __FUNCTION__);
                STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags));
                return -1;
        }
+       /* restore the cfm: */
        info->cfm_loc = info->pfs_loc;
 
        /* restore the bsp: */
@@ -1992,13 +1996,16 @@ init_frame_info (struct unw_frame_info *info, struct task_struct *t,
        memset(info, 0, sizeof(*info));
 
        rbslimit = (unsigned long) t + IA64_RBS_OFFSET;
+       stklimit = (unsigned long) t + IA64_STK_OFFSET;
+
        rbstop   = sw->ar_bspstore;
-       if (rbstop - (unsigned long) t >= IA64_STK_OFFSET)
+       if (rbstop > stklimit || rbstop < rbslimit)
                rbstop = rbslimit;
 
-       stklimit = (unsigned long) t + IA64_STK_OFFSET;
        if (stktop <= rbstop)
                stktop = rbstop;
+       if (stktop > stklimit)
+               stktop = stklimit;
 
        info->regstk.limit = rbslimit;
        info->regstk.top   = rbstop;
index 3549f3b425929434fd334fd9630fc9e85ca25e68..73696b4a2eed42caafc4d7414f8ae38c6c3a6922 100644 (file)
@@ -354,10 +354,13 @@ pci_acpi_scan_root(struct acpi_device *device, int domain, int bus)
 
        acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_window,
                        &windows);
-       controller->window = kmalloc_node(sizeof(*controller->window) * windows,
-                       GFP_KERNEL, controller->node);
-       if (!controller->window)
-               goto out2;
+       if (windows) {
+               controller->window =
+                       kmalloc_node(sizeof(*controller->window) * windows,
+                                    GFP_KERNEL, controller->node);
+               if (!controller->window)
+                       goto out2;
+       }
 
        name = kmalloc(16, GFP_KERNEL);
        if (!name)
index a574fcd163ddd57776031bffe8d0a151dcfb3991..684b1c984a445e3ba5a818aef22cb8f6d8437979 100644 (file)
@@ -194,7 +194,7 @@ void __init early_sn_setup(void)
 }
 
 extern int platform_intr_list[];
-static int __initdata shub_1_1_found;
+static int __cpuinitdata shub_1_1_found;
 
 /*
  * sn_check_for_wars
index 6ef87fb90b8ecd663372f7bbd45109ccdc9d17c2..b2b5d664d32861f2c71b699e917dd70f07f412f3 100644 (file)
@@ -235,6 +235,7 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 8,
+               .pmc_type               = PPC_PMC_IBM,
                .cpu_setup              = __setup_cpu_ppc970,
                .cpu_restore            = __restore_cpu_ppc970,
                .oprofile_cpu_type      = "ppc64/970MP",
@@ -251,6 +252,7 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 8,
+               .pmc_type               = PPC_PMC_IBM,
                .cpu_setup              = __setup_cpu_ppc970MP,
                .cpu_restore            = __restore_cpu_ppc970,
                .oprofile_cpu_type      = "ppc64/970MP",
@@ -317,6 +319,7 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 6,
+               .pmc_type               = PPC_PMC_IBM,
                .oprofile_cpu_type      = "ppc64/power6",
                .oprofile_type          = PPC_OPROFILE_POWER4,
                .oprofile_mmcra_sihv    = POWER6_MMCRA_SIHV,
@@ -335,6 +338,7 @@ static struct cpu_spec cpu_specs[] = {
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
                .num_pmcs               = 6,
+               .pmc_type               = PPC_PMC_IBM,
                .oprofile_cpu_type      = "ppc64/power6",
                .oprofile_type          = PPC_OPROFILE_POWER4,
                .oprofile_mmcra_sihv    = POWER6_MMCRA_SIHV,
index 24d7b7c99bb9fa8db645e752635027b00f3fb23a..ea04e0ab3f2f192cf4355d27a31f46180aced233 100644 (file)
@@ -20,8 +20,8 @@
 #include <asm/cputable.h>
 #include <asm/pmc.h>
 
-#ifndef MMCR0_PMA0
-#define MMCR0_PMA0     0
+#ifndef MMCR0_PMAO
+#define MMCR0_PMAO     0
 #endif
 
 static void dummy_perf(struct pt_regs *regs)
@@ -30,7 +30,7 @@ static void dummy_perf(struct pt_regs *regs)
        mtpmr(PMRN_PMGC0, mfpmr(PMRN_PMGC0) & ~PMGC0_PMIE);
 #elif defined(CONFIG_PPC64) || defined(CONFIG_6xx)
        if (cur_cpu_spec->pmc_type == PPC_PMC_IBM)
-               mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~(MMCR0_PMXE|MMCR0_PMA0));
+               mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~(MMCR0_PMXE|MMCR0_PMAO));
 #else
        mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~MMCR0_PMXE);
 #endif
index 22f1ef1b3100ff8df55e8ab0f8256518b4c2987e..d577b71db37549433ca2f36aa6ad0bcea8cd3a5a 100644 (file)
@@ -201,13 +201,6 @@ int smp_call_function_map(void (*func) (void *info), void *info, int nonatomic,
        /* Can deadlock when called with interrupts disabled */
        WARN_ON(irqs_disabled());
 
-       /* remove 'self' from the map */
-       if (cpu_isset(smp_processor_id(), map))
-               cpu_clear(smp_processor_id(), map);
-
-       /* sanity check the map, remove any non-online processors. */
-       cpus_and(map, map, cpu_online_map);
-
        if (unlikely(smp_ops == NULL))
                return ret;
 
@@ -222,10 +215,17 @@ int smp_call_function_map(void (*func) (void *info), void *info, int nonatomic,
        /* Must grab online cpu count with preempt disabled, otherwise
         * it can change. */
        num_cpus = num_online_cpus() - 1;
-       if (!num_cpus || cpus_empty(map)) {
-               ret = 0;
-               goto out;
-       }
+       if (!num_cpus)
+               goto done;
+
+       /* remove 'self' from the map */
+       if (cpu_isset(smp_processor_id(), map))
+               cpu_clear(smp_processor_id(), map);
+
+       /* sanity check the map, remove any non-online processors. */
+       cpus_and(map, map, cpu_online_map);
+       if (cpus_empty(map))
+               goto done;
 
        call_data = &data;
        smp_wmb();
@@ -263,6 +263,7 @@ int smp_call_function_map(void (*func) (void *info), void *info, int nonatomic,
                }
        }
 
+ done:
        ret = 0;
 
  out:
@@ -282,16 +283,17 @@ EXPORT_SYMBOL(smp_call_function);
 int smp_call_function_single(int cpu, void (*func) (void *info), void *info, int nonatomic,
                        int wait)
 {
-       cpumask_t map=CPU_MASK_NONE;
+       cpumask_t map = CPU_MASK_NONE;
+       int ret = -EBUSY;
 
        if (!cpu_online(cpu))
                return -EINVAL;
 
-       if (cpu == smp_processor_id())
-               return -EBUSY;
-
        cpu_set(cpu, map);
-       return smp_call_function_map(func,info,nonatomic,wait,map);
+       if (cpu != get_cpu())
+               ret = smp_call_function_map(func,info,nonatomic,wait,map);
+       put_cpu();
+       return ret;
 }
 EXPORT_SYMBOL(smp_call_function_single);
 
index f7d7bf19e4fba48807885224f0239214f38666c5..21c39ff2dc39b41c52d0ea04fb66defab5786118 100644 (file)
@@ -34,7 +34,6 @@ SECTIONS
        /* Text and gots */
        .text : {
                _text = .;
-               *(.text.*)
                TEXT_TEXT
                SCHED_TEXT
                LOCK_TEXT
index 246eeea40ecec4ba0e5884fe114508bcab70dad9..0266a94d83b6e86fd9ec004c0e3987462329cfbe 100644 (file)
@@ -310,11 +310,12 @@ void __init paging_init(void)
 
 #ifdef CONFIG_HIGHMEM
        map_page(PKMAP_BASE, 0, 0);     /* XXX gross */
-       pkmap_page_table = pte_offset_kernel(pmd_offset(pgd_offset_k
-                       (PKMAP_BASE), PKMAP_BASE), PKMAP_BASE);
+       pkmap_page_table = pte_offset_kernel(pmd_offset(pud_offset(pgd_offset_k
+                       (PKMAP_BASE), PKMAP_BASE), PKMAP_BASE), PKMAP_BASE);
        map_page(KMAP_FIX_BEGIN, 0, 0); /* XXX gross */
-       kmap_pte = pte_offset_kernel(pmd_offset(pgd_offset_k
-                       (KMAP_FIX_BEGIN), KMAP_FIX_BEGIN), KMAP_FIX_BEGIN);
+       kmap_pte = pte_offset_kernel(pmd_offset(pud_offset(pgd_offset_k
+                       (KMAP_FIX_BEGIN), KMAP_FIX_BEGIN), KMAP_FIX_BEGIN),
+                        KMAP_FIX_BEGIN);
        kmap_prot = PAGE_KERNEL;
 #endif /* CONFIG_HIGHMEM */
 
index 50d38be62f01a879e410e10bda4d22c4ac9a7522..a37643d002b2bb09c8ee51a42d82fd6078d5209c 100644 (file)
@@ -69,7 +69,7 @@ static int gio_ioctl(struct inode *inode, struct file *filp,
        }
 
        switch (cmd) {
-       case GIODRV_IOCSGIOSETADDR:     /* addres set */
+       case GIODRV_IOCSGIOSETADDR:     /* address set */
                addr = data;
                break;
 
index 4058b4f50d44eda199717a64d09fc2e2169545ba..f953c74277695bed996d85e12e3888ba25f19592 100644 (file)
@@ -44,8 +44,14 @@ static struct platform_device cf_ide_device = {
        },
 };
 
+static struct platform_device rtc_device = {
+       .name           = "rs5c313",
+       .id             = -1,
+};
+
 static struct platform_device *landisk_devices[] __initdata = {
        &cf_ide_device,
+       &rtc_device,
 };
 
 static int __init landisk_devices_setup(void)
index 609e5d50dde83fdadd5e22d6413f85e14c38a8ef..b1d20afb4eb3b6d4f3de512e13b62cf40d51851a 100644 (file)
@@ -3,5 +3,8 @@
 #
 irqinit-y                      := irq-r7780rp.o
 irqinit-$(CONFIG_SH_R7785RP)   := irq-r7785rp.o
+obj-y                          := setup.o irq.o $(irqinit-y)
+
+ifneq ($(CONFIG_SH_R7785RP),y)
 obj-$(CONFIG_PUSH_SWITCH)      += psw.o
-obj-y                          := setup.o irq.o $(irqinit-y)
+endif
index 1659fdd6695a14fcf3ac687016f2bd1a6a3db3b7..edb3dd936cbbf5239eaadb923535cad80869c228 100644 (file)
@@ -108,7 +108,7 @@ static void ds1302_writebyte(unsigned int addr, unsigned int val)
 static void ds1302_reset(void)
 {
        unsigned long   flags;
-       /* Hardware dependant reset/init */
+       /* Hardware dependent reset/init */
        local_irq_save(flags);
        set_dirp(get_dirp() | RTC_RESET | RTC_IODATA | RTC_SCLK);
        set_dp(get_dp() & ~(RTC_RESET | RTC_IODATA | RTC_SCLK));
index 83419bf4c8344471e6a9e0590e700b12c3ae9fb9..b704e20d7e4dccf35ac9c5b3c614577840f5ec80 100644 (file)
@@ -198,12 +198,12 @@ void microdev_outb(unsigned char b, unsigned long port)
        /*
         *      There is a board feature with the current SH4-202 MicroDev in
         *      that the 2 byte enables (nBE0 and nBE1) are tied together (and
-        *      to the Chip Select Line (Ethernet_CS)). Due to this conectivity,
+        *      to the Chip Select Line (Ethernet_CS)). Due to this connectivity,
         *      it is not possible to safely perform 8-bit writes to the
         *      Ethernet registers, as 16-bits will be consumed from the Data
         *      lines (corrupting the other byte).  Hence, this function is
-        *      written to impliment 16-bit read/modify/write for all byte-wide
-        *      acceses.
+        *      written to implement 16-bit read/modify/write for all byte-wide
+        *      accesses.
         *
         *      Note: there is no problem with byte READS (even or odd).
         *
index 8c64baa30364719da119296f487daeb9d8298426..cc1cb04fa61832975ebfde104dc24e1066b2b6ca 100644 (file)
@@ -100,7 +100,7 @@ static void disable_microdev_irq(unsigned int irq)
 
        fpgaIrq = fpgaIrqTable[irq].fpgaIrq;
 
-       /* disable interupts on the FPGA INTC register */
+       /* disable interrupts on the FPGA INTC register */
        ctrl_outl(MICRODEV_FPGA_INTC_MASK(fpgaIrq), MICRODEV_FPGA_INTDSB_REG);
 }
 
@@ -125,7 +125,7 @@ static void enable_microdev_irq(unsigned int irq)
        priorities |= MICRODEV_FPGA_INTPRI_LEVEL(fpgaIrq, pri);
        ctrl_outl(priorities, priorityReg);
 
-       /* enable interupts on the FPGA INTC register */
+       /* enable interrupts on the FPGA INTC register */
        ctrl_outl(MICRODEV_FPGA_INTC_MASK(fpgaIrq), MICRODEV_FPGA_INTENB_REG);
 }
 
@@ -152,7 +152,7 @@ extern void __init init_microdev_irq(void)
 {
        int i;
 
-               /* disable interupts on the FPGA INTC register */
+               /* disable interrupts on the FPGA INTC register */
        ctrl_outl(~0ul, MICRODEV_FPGA_INTDSB_REG);
 
        for (i = 0; i < NUM_EXTERNAL_IRQS; i++)
index 031c814e6e76317aaca6cefb5c4362efa6965cac..6396cea1c89653b0e37805708d13382252b74e18 100644 (file)
@@ -349,7 +349,7 @@ static int __init smsc_superio_setup(void)
        SMSC_WRITE_INDEXED(0x00, 0xc7); /* GP47 = nIOWOP */
        SMSC_WRITE_INDEXED(0x08, 0xe8); /* GP20 = nIDE2_OE */
 
-               /* Exit the configuraton state */
+               /* Exit the configuration state */
        outb(SMSC_EXIT_CONFIG_KEY, SMSC_CONFIG_PORT_ADDR);
 
        return 0;
index 1c941370a2e32a8bc0ea9b55a200dd6907be9a42..bee4612de59b475a91148dbfe2e98a689d337995 100644 (file)
@@ -6,7 +6,7 @@
  * May be copied or modified under the terms of the GNU General Public
  * License.  See linux/COPYING for more information.
  *
- * Setup code for an unknown machine (internal peripherials only)
+ * Setup code for an unknown machine (internal peripherals only)
  *
  * This is the simplest of all boards, and serves only as a quick and dirty
  * method to start debugging a new board during bring-up until proper board
index e062067edd243fac0e2bdacd12ee3fdf1600fdfc..8057a27a1bc6bb760d81ce01ee800b7638ceebaf 100644 (file)
@@ -115,7 +115,7 @@ static int search_cap(const char **haystack, const char *needle)
 /**
  * request_dma_bycap - Allocate a DMA channel based on its capabilities
  * @dmac: List of DMA controllers to search
- * @caps: List of capabilites
+ * @caps: List of capabilities
  *
  * Search all channels of all DMA controllers to find a channel which
  * matches the requested capabilities. The result is the channel
index 05a74ffdb68d4a33bf3fdf3c615e91aaf9e4b648..5fb044b791c37ecf9342cdec533cf1d19462f1de 100644 (file)
@@ -28,7 +28,7 @@
  * NOTE: ops->xfer() is the preferred way of doing things. However, there
  * are some users of the ISA DMA API that exist in common code that we
  * don't necessarily want to go out of our way to break, so we still
- * allow for some compatability at that level. Any new code is strongly
+ * allow for some compatibility at that level. Any new code is strongly
  * advised to run far away from the ISA DMA API and use the SH DMA API
  * directly.
  */
index 9d0a29370f2177fef290e2598d8e3cd764c65c7c..5e22689c2fcfd57ced1bce69ee805334db7b483d 100644 (file)
@@ -33,7 +33,7 @@
  *     9      | HAC1/SSI1 | rec | half done    | DMABRGI2
  *
  * all can be enabled/disabled in the DMABRGCR register,
- * as well as checked if they occured.
+ * as well as checked if they occurred.
  *
  * DMABRGI0 services  USB  DMA  Address  errors,  but it still must be
  * enabled/acked in the DMABRGCR register.  USB-DMA complete indicator
index 381306cf54253e2e40f93e8954e9c1fea1abf7ec..e1284fc693611a266c5b4307f569bf81fa1ff0d7 100644 (file)
@@ -57,7 +57,7 @@ struct pci_channel board_pci_channels[] = {
  *
  * Also, we could very easily support both Type 0 and Type 1 configurations
  * here, but since it doesn't seem that there is any such implementation in
- * existance, we don't bother.
+ * existence, we don't bother.
  *
  * I suppose if someone actually gets around to ripping the chip out of
  * the BBA and hanging some more devices off of it, then this might be
index d67656a44b15eeea661c4bbcf2429dcebb4a4c42..543417ff8314c41d02d88498a86517af5113ac31 100644 (file)
@@ -292,7 +292,7 @@ int __init st40pci_init(unsigned memStart, unsigned memSize)
                            PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER |
                            PCI_COMMAND_IO);
 
-       /* Accesse to the 0xb0000000 -> 0xb6000000 area will go through to 0x10000000 -> 0x16000000
+       /* Access to the 0xb0000000 -> 0xb6000000 area will go through to 0x10000000 -> 0x16000000
         * on the PCI bus. This allows a nice 1-1 bus to phys mapping.
         */
 
@@ -315,7 +315,7 @@ int __init st40pci_init(unsigned memStart, unsigned memSize)
        ST40PCI_WRITE(CSR_MBAR0, 0);
        ST40PCI_WRITE(LSR0, 0x0fff0001);
 
-       /* ... and set up the initial incomming window to expose all of RAM */
+       /* ... and set up the initial incoming window to expose all of RAM */
        pci_set_rbar_region(7, memStart, memStart, memSize);
 
        /* Maximise timeout values */
@@ -473,7 +473,7 @@ static void pci_set_rbar_region(unsigned int region,     unsigned long localAddr
 
        mask = r2p2(regionSize) - 0x10000;
 
-       /* Diable the region (in case currently in use, should never happen) */
+       /* Disable the region (in case currently in use, should never happen) */
        ST40PCI_WRITE_INDEXED(RSR, region, 0);
 
        /* Start of local address space to publish */
index d729e0c2d5fee67f35491b8c2dfad181b3eaf7e9..cf0d35bd135cbc52dbbd9a4b115427ecb869d218 100644 (file)
@@ -4,7 +4,7 @@
  * May be copied or modified under the terms of the GNU General Public
  * License.  See linux/COPYING for more information.                            
  *
- * Defintions for the ST40 PCI hardware.
+ * Definitions for the ST40 PCI hardware.
  */
 
 #ifndef __PCI_ST40_H__
index a55c98a9052bd4303041adc267a2d1373e00a29b..3b14bf860db60703d06a6323ecb0ffc2fba3306d 100644 (file)
@@ -130,7 +130,7 @@ static int sh4202_read_vcr(unsigned long base, struct superhyway_vcr_info *vcr)
         * Some modules (PBR and ePBR for instance) also appear to have
         * VCRL/VCRH flipped in the documentation, but on the SH4-202
         * itself it appears that these are all consistently mapped with
-        * VCRH preceeding VCRL.
+        * VCRH preceding VCRL.
         *
         * Do not trust the documentation, for it is evil.
         */
index 0758d48147a05981c5c059e3099f082b3ad29f97..849a9e191391dee23ea1d4c48a85b7c541471513 100644 (file)
@@ -31,7 +31,7 @@
  */
 #if defined(CONFIG_CPU_SH4)
 /* SH4 can't access PCMCIA interface through P2 area.
- * we must remap it with appropreate attribute bit of the page set.
+ * we must remap it with appropriate attribute bit of the page set.
  * this part is based on Greg Banks' hd64465_ss.c implementation - Masahiro Abe */
 
 #if defined(CONFIG_CF_AREA6)
index 014f318f5a0515d648c745a14a04c196e6171ef6..63251549e9a8b2dfddf1308f6ce13374cf8f9942 100644 (file)
@@ -278,6 +278,11 @@ arch_init_clk_ops(struct clk_ops **ops, int type)
 {
 }
 
+void __init __attribute__ ((weak))
+arch_clk_init(void)
+{
+}
+
 static int show_clocks(char *buf, char **start, off_t off,
                       int len, int *eof, void *data)
 {
@@ -314,6 +319,8 @@ int __init clk_init(void)
                ret |= clk_register(clk);
        }
 
+       arch_clk_init();
+
        /* Kick the child clocks.. */
        propagate_rate(&master_clk);
        propagate_rate(&bus_clk);
index 492db31b3cab6278c848c85b2ae28706ffabbd8c..978992e367a5c84c8426575b3d7ce7a60725d92f 100644 (file)
@@ -38,7 +38,7 @@ static struct hw_interrupt_type maskreg_irq_type = {
        .end = end_maskreg_irq
 };
 
-/* actual implementatin */
+/* actual implementation */
 static unsigned int startup_maskreg_irq(unsigned int irq)
 {
        enable_maskreg_irq(irq);
index d61dd599169f97b0acb1f42fc9b19acc2dd26835..c5a4fc77fa06222fda379099b91b16548784c2a3 100644 (file)
@@ -138,7 +138,7 @@ restore_fpu(struct task_struct *tsk)
 /*
  * Load the FPU with signalling NANS.  This bit pattern we're using
  * has the property that no matter wether considered as single or as
- * double precission represents signaling NANS.  
+ * double precision represents signaling NANS.  
  */
 
 static void
index 6f8f458912c7c5759844f94023e5c896640303ba..03b14cf78ddf248bc87ef69c325fb266e4085d5d 100644 (file)
@@ -106,6 +106,7 @@ static struct ipr_data sh7750_ipr_map[] = {
        { 38, 2,  8, 7 }, /* DMAC DMAE */
 };
 
+#ifdef CONFIG_CPU_SUBTYPE_SH7751
 static struct ipr_data sh7751_ipr_map[] = {
        { 44, 2,  8, 7 }, /* DMAC DMTE4 */
        { 45, 2,  8, 7 }, /* DMAC DMTE5 */
@@ -117,6 +118,7 @@ static struct ipr_data sh7751_ipr_map[] = {
        /*{ 72, INTPRI00,  8, ? },*/ /* TMU3 TUNI */
        /*{ 76, INTPRI00, 12, ? },*/ /* TMU4 TUNI */
 };
+#endif
 
 static unsigned long ipr_offsets[] = {
        0xffd00004UL,   /* 0: IPRA */
index 29090035bc5bd0787986c498670d569aa2d2bdfc..51b386d454deaedd7f31b32410adbc6bedf857c7 100644 (file)
@@ -17,7 +17,6 @@
 #include <asm/clock.h>
 #include <asm/freq.h>
 
-#define SH7722_PLL_FREQ (32000000/8)
 #define N  (-1)
 #define NM (-2)
 #define ROUND_NEAREST 0
@@ -141,28 +140,36 @@ static void adjust_clocks(int originate, int *l, unsigned long v[],
 */
 static int divisors2[] = { 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24, 32, 40 };
 
+static void master_clk_recalc(struct clk *clk)
+{
+       unsigned frqcr = ctrl_inl(FRQCR);
+
+       clk->rate = CONFIG_SH_PCLK_FREQ * (((frqcr >> 24) & 0x1f) + 1);
+}
+
 static void master_clk_init(struct clk *clk)
 {
-       clk_set_rate(clk, clk_get_rate(clk));
+       clk->parent = NULL;
+       clk->flags |= CLK_RATE_PROPAGATES;
+       clk->rate = CONFIG_SH_PCLK_FREQ;
+       master_clk_recalc(clk);
 }
 
-static void master_clk_recalc(struct clk *clk)
+
+static void module_clk_recalc(struct clk *clk)
 {
        unsigned long frqcr = ctrl_inl(FRQCR);
 
-       clk->rate = CONFIG_SH_PCLK_FREQ * (1 + (frqcr >> 24 & 0xF));
+       clk->rate = clk->parent->rate / (((frqcr >> 24) & 0x1f) + 1);
 }
 
 static int master_clk_setrate(struct clk *clk, unsigned long rate, int id)
 {
-       int div = rate / SH7722_PLL_FREQ;
+       int div = rate / clk->rate;
        int master_divs[] = { 2, 3, 4, 6, 8, 16 };
        int index;
        unsigned long frqcr;
 
-       if (rate < SH7722_PLL_FREQ * 2)
-               return -EINVAL;
-
        for (index = 1; index < ARRAY_SIZE(master_divs); index++)
                if (div >= master_divs[index - 1] && div < master_divs[index])
                        break;
@@ -185,6 +192,10 @@ static struct clk_ops sh7722_master_clk_ops = {
        .set_rate = master_clk_setrate,
 };
 
+static struct clk_ops sh7722_module_clk_ops = {
+       .recalc = module_clk_recalc,
+};
+
 struct frqcr_context {
        unsigned mask;
        unsigned shift;
@@ -489,7 +500,7 @@ static void sh7722_siu_recalc(struct clk *clk)
 
        if (siu < 0)
                return /* siu */ ;
-       BUG_ON(siu > 1);
+       BUG_ON(siu > 2);
        r = ctrl_inl(sh7722_siu_regs[siu]);
        clk->rate = clk->parent->rate * 2 / divisors2[r & 0xF];
 }
@@ -571,7 +582,7 @@ static struct clk *sh7722_clocks[] = {
  */
 struct clk_ops *onchip_ops[] = {
        &sh7722_master_clk_ops,
-       &sh7722_frqcr_clk_ops,
+       &sh7722_module_clk_ops,
        &sh7722_frqcr_clk_ops,
        &sh7722_frqcr_clk_ops,
 };
@@ -583,7 +594,7 @@ arch_init_clk_ops(struct clk_ops **ops, int type)
        *ops = onchip_ops[type];
 }
 
-int __init sh7722_clock_init(void)
+int __init arch_clk_init(void)
 {
        struct clk *master;
        int i;
@@ -597,4 +608,3 @@ int __init sh7722_clock_init(void)
        clk_put(master);
        return 0;
 }
-arch_initcall(sh7722_clock_init);
index a5323364cbca7c7c884d9c407ce02d7c777d9511..edd1ec214e6d61a7c1367e85253955822e2fe64f 100644 (file)
@@ -2,7 +2,7 @@
  * May be copied or modified under the terms of the GNU General Public
  * License.  See linux/COPYING for more information.
  *
- * Containes extracts from code by Glenn Engel, Jim Kingdon,
+ * Contains extracts from code by Glenn Engel, Jim Kingdon,
  * David Grothe <dave@gcom.com>, Tigran Aivazian <tigran@sco.com>,
  * Amit S. Kale <akale@veritas.com>,  William Gatliff <bgat@open-widgets.com>,
  * Ben Lee, Steve Chamberlain and Benoit Miller <fulg@iname.com>.
@@ -85,7 +85,7 @@
  *
  * Responses can be run-length encoded to save space.  A '*' means that
  * the next character is an ASCII encoding giving a repeat count which
- * stands for that many repititions of the character preceding the '*'.
+ * stands for that many repetitions of the character preceding the '*'.
  * The encoding is n+29, yielding a printable character where n >=3
  * (which is where RLE starts to win).  Don't use an n > 126.
  *
index 6b4f5748d0be682a2b6334ca7d6f5ccc406be271..a11e2aa73cbc0888aeafb1bb74193d98a4293ad3 100644 (file)
@@ -26,8 +26,6 @@
 static int hlt_counter;
 int ubc_usercnt = 0;
 
-#define HARD_IDLE_TIMEOUT (HZ / 3)
-
 void (*pm_idle)(void);
 void (*pm_power_off)(void);
 EXPORT_SYMBOL(pm_power_off);
@@ -44,16 +42,39 @@ void enable_hlt(void)
 }
 EXPORT_SYMBOL(enable_hlt);
 
+static int __init nohlt_setup(char *__unused)
+{
+       hlt_counter = 1;
+       return 1;
+}
+__setup("nohlt", nohlt_setup);
+
+static int __init hlt_setup(char *__unused)
+{
+       hlt_counter = 0;
+       return 1;
+}
+__setup("hlt", hlt_setup);
+
 void default_idle(void)
 {
-       if (!hlt_counter)
-               cpu_sleep();
-       else
-               cpu_relax();
+       if (!hlt_counter) {
+               clear_thread_flag(TIF_POLLING_NRFLAG);
+               smp_mb__after_clear_bit();
+               set_bl_bit();
+               while (!need_resched())
+                       cpu_sleep();
+               clear_bl_bit();
+               set_thread_flag(TIF_POLLING_NRFLAG);
+       } else
+               while (!need_resched())
+                       cpu_relax();
 }
 
 void cpu_idle(void)
 {
+       set_thread_flag(TIF_POLLING_NRFLAG);
+
        /* endless idle loop with no priority at all */
        while (1) {
                void (*idle)(void) = pm_idle;
index 4357d1a6358f61ba39a2ab7094fdfd968daec8aa..7db1c2dc5992a14896345fcc0dddab3e72647431 100644 (file)
@@ -355,3 +355,6 @@ ENTRY(sys_call_table)
        .long sys_getcpu
        .long sys_epoll_pwait
        .long sys_utimensat             /* 320 */
+       .long sys_signalfd
+       .long sys_timerfd
+       .long sys_eventfd
index 3a197649cd83c6c57227156fbcdd6d06e86ef7a2..5b75cb6f8f9baad9aec571397e3cc2dd5d7b1ab0 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/bug.h>
 #include <linux/debug_locks.h>
 #include <linux/kdebug.h>
+#include <linux/kexec.h>
 #include <linux/limits.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
@@ -101,6 +102,16 @@ void die(const char * str, struct pt_regs * regs, long err)
 
        bust_spinlocks(0);
        spin_unlock_irq(&die_lock);
+
+       if (kexec_should_crash(current))
+               crash_kexec(regs);
+
+       if (in_interrupt())
+               panic("Fatal exception in interrupt");
+
+       if (panic_on_oops)
+               panic("Fatal exception");
+
        do_exit(SIGSEGV);
 }
 
@@ -513,7 +524,7 @@ static int handle_unaligned_access(u16 instruction, struct pt_regs *regs)
  *       misaligned data access
  *       access to >= 0x80000000 is user mode
  * Unfortuntaly we can't distinguish between instruction address error
- * and data address errors caused by read acceses.
+ * and data address errors caused by read accesses.
  */
 asmlinkage void do_address_error(struct pt_regs *regs,
                                 unsigned long writeaccess,
index 1efbac15ff4e4d370ab3c9fa651a7ae093c09163..a38e1eed9e77ea0f66a62ae7cfa8db241b97a6ab 100644 (file)
@@ -148,7 +148,7 @@ fmac(struct sh_fpu_soft_struct *fregs, struct pt_regs *regs, int m, int n)
        return 0;
 }
 
-// to process fmov's extention (odd n for DR access XD).
+// to process fmov's extension (odd n for DR access XD).
 #define FMOV_EXT(x) if(x&1) x+=16-1
 
 static int
index 397c94c97315d9909e8788feadd3767b2b7b8584..ae039f2da16271c75e3013b97fa8a523a3b97621 100644 (file)
@@ -129,6 +129,7 @@ ENTRY(__copy_user_page)
        rts
         nop
 #endif
+       .align 2
 .Lpsz: .long   PAGE_SIZE
 /*
  * __kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n);
index 9207da67ff8a669841170bc73b600f9782d3037d..c878faa4ae4689d701cd42ffbdf897a087aba259 100644 (file)
 #include <linux/mm.h>
 #include <linux/hardirq.h>
 #include <linux/kprobes.h>
-#include <linux/kdebug.h>
 #include <asm/system.h>
 #include <asm/mmu_context.h>
 #include <asm/tlbflush.h>
 #include <asm/kgdb.h>
 
-#ifdef CONFIG_KPROBES
-ATOMIC_NOTIFIER_HEAD(notify_page_fault_chain);
-
-/* Hook to register for page fault notifications */
-int register_page_fault_notifier(struct notifier_block *nb)
-{
-       return atomic_notifier_chain_register(&notify_page_fault_chain, nb);
-}
-
-int unregister_page_fault_notifier(struct notifier_block *nb)
-{
-       return atomic_notifier_chain_unregister(&notify_page_fault_chain, nb);
-}
-
-static inline int notify_page_fault(enum die_val val, struct pt_regs *regs,
-                                   int trap, int sig)
-{
-       struct die_args args = {
-               .regs = regs,
-               .trapnr = trap,
-       };
-       return atomic_notifier_call_chain(&notify_page_fault_chain, val, &args);
-}
-#else
-static inline int notify_page_fault(enum die_val val, struct pt_regs *regs,
-                                   int trap, int sig)
-{
-       return NOTIFY_DONE;
-}
-#endif
-
 /*
  * This routine handles page faults.  It determines the address,
  * and the problem, and then passes it off to one of the appropriate
@@ -69,11 +37,6 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
        siginfo_t info;
 
        trace_hardirqs_on();
-
-       if (notify_page_fault(DIE_PAGE_FAULT, regs,
-                             writeaccess, SIGSEGV) == NOTIFY_STOP)
-               return;
-
        local_irq_enable();
 
 #ifdef CONFIG_SH_KGDB
@@ -285,7 +248,7 @@ asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs,
        pte_t *pte;
        pte_t entry;
        struct mm_struct *mm = current->mm;
-       spinlock_t *ptl;
+       spinlock_t *ptl = NULL;
        int ret = 1;
 
 #ifdef CONFIG_SH_KGDB
index 8fe223a890ed4aaedf8947493f947041e4bed535..e0e644ff3204c38a114a03e16842ba87a36cdff9 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/init.h>
 #include <linux/bootmem.h>
 #include <linux/proc_fs.h>
+#include <linux/pagemap.h>
 #include <linux/percpu.h>
 #include <linux/io.h>
 #include <asm/mmu_context.h>
@@ -112,7 +113,7 @@ static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot)
  * As a performance optimization, other platforms preserve the fixmap mapping
  * across a context switch, we don't presently do this, but this could be done
  * in a similar fashion as to the wired TLB interface that sh64 uses (by way
- * of the memorry mapped UTLB configuration) -- this unfortunately forces us to
+ * of the memory mapped UTLB configuration) -- this unfortunately forces us to
  * give up a TLB entry for each mapping we want to preserve. While this may be
  * viable for a small number of fixmaps, it's not particularly useful for
  * everything and needs to be carefully evaluated. (ie, we may want this for
index 02aae06527dc496620e2d4cc338d171b13e96e6a..b6a5a338145bf438037f40adfb3142a876a00e1c 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Privileged Space Mapping Buffer (PMB) Support.
  *
- * Copyright (C) 2005, 2006 Paul Mundt
+ * Copyright (C) 2005, 2006, 2007 Paul Mundt
  *
  * P1/P2 Section mapping definitions from map32.h, which was:
  *
@@ -68,6 +68,32 @@ static inline unsigned long mk_pmb_data(unsigned int entry)
        return mk_pmb_entry(entry) | PMB_DATA;
 }
 
+static DEFINE_SPINLOCK(pmb_list_lock);
+static struct pmb_entry *pmb_list;
+
+static inline void pmb_list_add(struct pmb_entry *pmbe)
+{
+       struct pmb_entry **p, *tmp;
+
+       p = &pmb_list;
+       while ((tmp = *p) != NULL)
+               p = &tmp->next;
+
+       pmbe->next = tmp;
+       *p = pmbe;
+}
+
+static inline void pmb_list_del(struct pmb_entry *pmbe)
+{
+       struct pmb_entry **p, *tmp;
+
+       for (p = &pmb_list; (tmp = *p); p = &tmp->next)
+               if (tmp == pmbe) {
+                       *p = tmp->next;
+                       return;
+               }
+}
+
 struct pmb_entry *pmb_alloc(unsigned long vpn, unsigned long ppn,
                            unsigned long flags)
 {
@@ -81,11 +107,19 @@ struct pmb_entry *pmb_alloc(unsigned long vpn, unsigned long ppn,
        pmbe->ppn       = ppn;
        pmbe->flags     = flags;
 
+       spin_lock_irq(&pmb_list_lock);
+       pmb_list_add(pmbe);
+       spin_unlock_irq(&pmb_list_lock);
+
        return pmbe;
 }
 
 void pmb_free(struct pmb_entry *pmbe)
 {
+       spin_lock_irq(&pmb_list_lock);
+       pmb_list_del(pmbe);
+       spin_unlock_irq(&pmb_list_lock);
+
        kmem_cache_free(pmb_cache, pmbe);
 }
 
@@ -167,31 +201,6 @@ void clear_pmb_entry(struct pmb_entry *pmbe)
        clear_bit(entry, &pmb_map);
 }
 
-static DEFINE_SPINLOCK(pmb_list_lock);
-static struct pmb_entry *pmb_list;
-
-static inline void pmb_list_add(struct pmb_entry *pmbe)
-{
-       struct pmb_entry **p, *tmp;
-
-       p = &pmb_list;
-       while ((tmp = *p) != NULL)
-               p = &tmp->next;
-
-       pmbe->next = tmp;
-       *p = pmbe;
-}
-
-static inline void pmb_list_del(struct pmb_entry *pmbe)
-{
-       struct pmb_entry **p, *tmp;
-
-       for (p = &pmb_list; (tmp = *p); p = &tmp->next)
-               if (tmp == pmbe) {
-                       *p = tmp->next;
-                       return;
-               }
-}
 
 static struct {
        unsigned long size;
@@ -283,25 +292,14 @@ void pmb_unmap(unsigned long addr)
        } while (pmbe);
 }
 
-static void pmb_cache_ctor(void *pmb, struct kmem_cache *cachep, unsigned long flags)
+static void pmb_cache_ctor(void *pmb, struct kmem_cache *cachep,
+                          unsigned long flags)
 {
        struct pmb_entry *pmbe = pmb;
 
        memset(pmb, 0, sizeof(struct pmb_entry));
 
-       spin_lock_irq(&pmb_list_lock);
-
        pmbe->entry = PMB_NO_ENTRY;
-       pmb_list_add(pmbe);
-
-       spin_unlock_irq(&pmb_list_lock);
-}
-
-static void pmb_cache_dtor(void *pmb, struct kmem_cache *cachep, unsigned long flags)
-{
-       spin_lock_irq(&pmb_list_lock);
-       pmb_list_del(pmb);
-       spin_unlock_irq(&pmb_list_lock);
 }
 
 static int __init pmb_init(void)
@@ -312,8 +310,7 @@ static int __init pmb_init(void)
        BUG_ON(unlikely(nr_entries >= NR_PMB_ENTRIES));
 
        pmb_cache = kmem_cache_create("pmb", sizeof(struct pmb_entry), 0,
-                                     SLAB_PANIC, pmb_cache_ctor,
-                                     pmb_cache_dtor);
+                                     SLAB_PANIC, pmb_cache_ctor, NULL);
 
        jump_to_P2();
 
index 554f801db67bdf7280b5def5021ce0b6d8d79158..fb40f188aff93e6c81af6b8ea4c32882e8b13102 100644 (file)
@@ -7,8 +7,11 @@
 #
 SE                     SH_SOLUTION_ENGINE
 7751SE                 SH_7751_SOLUTION_ENGINE         
+7722SE                 SH_7722_SOLUTION_ENGINE         
 7300SE                 SH_7300_SOLUTION_ENGINE
 7343SE                 SH_7343_SOLUTION_ENGINE
+7206SE                 SH_7206_SOLUTION_ENGINE
+7619SE                 SH_7619_SOLUTION_ENGINE
 7780SE                 SH_7780_SOLUTION_ENGINE
 73180SE                        SH_73180_SOLUTION_ENGINE
 7751SYSTEMH            SH_7751_SYSTEMH
@@ -31,5 +34,3 @@ R7785RP                       SH_R7785RP
 TITAN                  SH_TITAN
 SHMIN                  SH_SHMIN
 7710VOIPGW             SH_7710VOIPGW
-7206SE                 SH_7206_SOLUTION_ENGINE
-7619SE                 SH_7619_SOLUTION_ENGINE
index abcafac647382a7144519542f1ea2ec9b576b332..ef683ebd367caf7b4b4045857525301ef2e25285 100644 (file)
@@ -815,7 +815,7 @@ config SGI_IP27_RTC
 
 config GEN_RTC
        tristate "Generic /dev/rtc emulation"
-       depends on RTC!=y && !IA64 && !ARM && !M32R && !SPARC && !FRV && !S390
+       depends on RTC!=y && !IA64 && !ARM && !M32R && !SPARC && !FRV && !S390 && !SUPERH
        ---help---
          If you say Y here and create a character special file /dev/rtc with
          major number 10 and minor number 135 using mknod ("man mknod"), you
index 61c15024c2a0e0ef87738239028500338cd185cd..1a15475aedfcc269d5bbfc033c15db3025a3dd5b 100644 (file)
@@ -1,7 +1,6 @@
 #include <linux/input.h>
 #include <linux/module.h>
 #include <linux/init.h>
-
 #include <linux/interrupt.h>
 #include <asm/io.h>
 #include <asm/delay.h>
 #define        PHDR    0xa400012e
 #define SCPDR  0xa4000136
 
-static void do_softint(void *data);
+static void do_softint(struct work_struct *work);
 
 static struct input_dev *hp680_ts_dev;
-static DECLARE_WORK(work, do_softint);
+static DECLARE_DELAYED_WORK(work, do_softint);
 
-static void do_softint(void *data)
+static void do_softint(struct work_struct *work)
 {
        int absx = 0, absy = 0;
        u8 scpdr;
index 0393a3d19920607e68189386def7e5f0ba707082..e908e3cf1e506fe554bdf18b01c7a48b1686535d 100644 (file)
@@ -1721,9 +1721,6 @@ static void dst_release(struct dvb_frontend *fe)
                symbol_put(dst_ca_attach);
 #endif
        }
-#ifdef CONFIG_DVB_CORE_ATTACH
-       symbol_put(dst_attach);
-#endif
        kfree(state);
 }
 
index e23d8a0ea1d330d215d3f7e15abc1f62a0aa1e6b..a9fa3337dd81d653e20ae80c3acdb7235f2a37ab 100644 (file)
@@ -200,7 +200,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
 {
        struct dvb_device *dvbdev;
        struct file_operations *dvbdevfops;
-
+       struct class_device *clsdev;
        int id;
 
        mutex_lock(&dvbdev_register_lock);
@@ -242,8 +242,15 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
 
        mutex_unlock(&dvbdev_register_lock);
 
-       class_device_create(dvb_class, NULL, MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)),
-                           adap->device, "dvb%d.%s%d", adap->num, dnames[type], id);
+       clsdev = class_device_create(dvb_class, NULL, MKDEV(DVB_MAJOR,
+                                    nums2minor(adap->num, type, id)),
+                                    adap->device, "dvb%d.%s%d", adap->num,
+                                    dnames[type], id);
+       if (IS_ERR(clsdev)) {
+               printk(KERN_ERR "%s: failed to create device dvb%d.%s%d (%ld)\n",
+                      __FUNCTION__, adap->num, dnames[type], id, PTR_ERR(clsdev));
+               return PTR_ERR(clsdev);
+       }
 
        dprintk("DVB: register adapter%d/%s%d @ minor: %i (0x%02x)\n",
                adap->num, dnames[type], id, nums2minor(adap->num, type, id),
@@ -431,7 +438,7 @@ static void __exit exit_dvbdev(void)
        unregister_chrdev_region(MKDEV(DVB_MAJOR, 0), MAX_DVB_MINORS);
 }
 
-module_init(init_dvbdev);
+subsys_initcall(init_dvbdev);
 module_exit(exit_dvbdev);
 
 MODULE_DESCRIPTION("DVB Core Driver");
index b2c22a0d6643b49758deeb881d17abd15ef9fdac..8e2a87cdc791b1fa3018d9ee2fd0fef9f7283941 100644 (file)
 #define REG_GL_IMASK   0x300c  /* Interrupt mask register */
 #define   GIMSK_CCIC_EN          0x00000004    /* CCIC Interrupt enable */
 
+#define REG_GL_FCR     0x3038  /* GPIO functional control register */
+#define          GFCR_GPIO_ON    0x08          /* Camera GPIO enabled */
+#define REG_GL_GPIOR   0x315c  /* GPIO register */
+#define   GGPIO_OUT            0x80000 /* GPIO output */
+#define   GGPIO_VAL            0x00008 /* Output pin value */
+
 #define REG_LEN                REG_GL_IMASK + 4
 
 
index 96254dbaf6252f78de803f0b8e234ccc96830251..c08f650df42337df25a517eb7538e7a29c9a8a8d 100644 (file)
@@ -774,6 +774,12 @@ static void cafe_ctlr_power_up(struct cafe_camera *cam)
 
        spin_lock_irqsave(&cam->dev_lock, flags);
        cafe_reg_clear_bit(cam, REG_CTRL1, C1_PWRDWN);
+       /*
+        * Part one of the sensor dance: turn the global
+        * GPIO signal on.
+        */
+       cafe_reg_write(cam, REG_GL_FCR, GFCR_GPIO_ON);
+       cafe_reg_write(cam, REG_GL_GPIOR, GGPIO_OUT|GGPIO_VAL);
        /*
         * Put the sensor into operational mode (assumes OLPC-style
         * wiring).  Control 0 is reset - set to 1 to operate.
@@ -784,6 +790,7 @@ static void cafe_ctlr_power_up(struct cafe_camera *cam)
        cafe_reg_write(cam, REG_GPR, GPR_C1EN|GPR_C0EN|GPR_C0);
 //     mdelay(1); /* Enough? */
        spin_unlock_irqrestore(&cam->dev_lock, flags);
+       msleep(5); /* Just to be sure */
 }
 
 static void cafe_ctlr_power_down(struct cafe_camera *cam)
@@ -792,6 +799,8 @@ static void cafe_ctlr_power_down(struct cafe_camera *cam)
 
        spin_lock_irqsave(&cam->dev_lock, flags);
        cafe_reg_write(cam, REG_GPR, GPR_C1EN|GPR_C0EN|GPR_C1);
+       cafe_reg_write(cam, REG_GL_FCR, GFCR_GPIO_ON);
+       cafe_reg_write(cam, REG_GL_GPIOR, GGPIO_OUT);
        cafe_reg_set_bit(cam, REG_CTRL1, C1_PWRDWN);
        spin_unlock_irqrestore(&cam->dev_lock, flags);
 }
@@ -851,6 +860,7 @@ static int cafe_cam_init(struct cafe_camera *cam)
        ret = 0;
        cam->state = S_IDLE;
   out:
+       cafe_ctlr_power_down(cam);
        mutex_unlock(&cam->s_mutex);
        return ret;
 }
@@ -2103,10 +2113,16 @@ static int cafe_pci_probe(struct pci_dev *pdev,
        ret = request_irq(pdev->irq, cafe_irq, IRQF_SHARED, "cafe-ccic", cam);
        if (ret)
                goto out_iounmap;
+       /*
+        * Initialize the controller and leave it powered up.  It will
+        * stay that way until the sensor driver shows up.
+        */
        cafe_ctlr_init(cam);
        cafe_ctlr_power_up(cam);
        /*
-        * Set up I2C/SMBUS communications
+        * Set up I2C/SMBUS communications.  We have to drop the mutex here
+        * because the sensor could attach in this call chain, leading to
+        * unsightly deadlocks.
         */
        mutex_unlock(&cam->s_mutex);  /* attach can deadlock */
        ret = cafe_smbus_setup(cam);
index 2c450bd05af5c24edf8fdda2a5d981dd1d06f2b9..5b6a4037160245e848119eda244cd64b9b58f20e 100644 (file)
@@ -1,7 +1,6 @@
 config VIDEO_EM28XX
        tristate "Empia EM2800/2820/2840 USB video capture support"
-       depends on VIDEO_V4L1 && I2C && PCI
-       select VIDEO_BUF
+       depends on VIDEO_V4L1 && I2C
        select VIDEO_TUNER
        select VIDEO_TVEEPROM
        select VIDEO_IR
index 0cc98a0e249671cf4337862fcdc33f6bd4aed759..1aaeaa02f158ec0efdcb32df39d3f0ad269a4fea 100644 (file)
@@ -1,6 +1,6 @@
 config VIDEO_IVTV
        tristate "Conexant cx23416/cx23415 MPEG encoder/decoder support"
-       depends on VIDEO_V4L1 && VIDEO_V4L2 && USB && I2C && EXPERIMENTAL && PCI
+       depends on VIDEO_V4L1 && VIDEO_V4L2 && PCI && I2C && EXPERIMENTAL
        select FW_LOADER
        select VIDEO_TUNER
        select VIDEO_TVEEPROM
index 9a412d6c6d06c6ec308bb1c3f7876baae6725f6c..552f04511eadf9ff11373d7640163c1cde0a9d64 100644 (file)
 
 #include <media/ivtv.h>
 
-#ifdef CONFIG_LIRC_I2C
-#  error "This driver is not compatible with the LIRC I2C kernel configuration option."
-#endif /* CONFIG_LIRC_I2C */
-
-#ifndef CONFIG_PCI
-#  error "This driver requires kernel PCI support."
-#endif /* CONFIG_PCI */
-
 #define IVTV_ENCODER_OFFSET    0x00000000
 #define IVTV_ENCODER_SIZE      0x00800000      /* Last half isn't needed 0x01000000 */
 
index 794a6a02f82f16fc6b82719246fde6d0773b767e..1989ec1cb973614e02d3ebc0d052a47feb7787e6 100644 (file)
@@ -362,8 +362,6 @@ static int ivtv_get_fmt(struct ivtv *itv, int streamtype, struct v4l2_format *fm
        case V4L2_BUF_TYPE_VIDEO_OUTPUT:
                if (!(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT))
                        return -EINVAL;
-               fmt->fmt.pix.left = itv->main_rect.left;
-               fmt->fmt.pix.top = itv->main_rect.top;
                fmt->fmt.pix.width = itv->main_rect.width;
                fmt->fmt.pix.height = itv->main_rect.height;
                fmt->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
@@ -402,8 +400,6 @@ static int ivtv_get_fmt(struct ivtv *itv, int streamtype, struct v4l2_format *fm
                break;
 
        case V4L2_BUF_TYPE_VIDEO_CAPTURE:
-               fmt->fmt.pix.left = 0;
-               fmt->fmt.pix.top = 0;
                fmt->fmt.pix.width = itv->params.width;
                fmt->fmt.pix.height = itv->params.height;
                fmt->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
@@ -498,15 +494,13 @@ static int ivtv_try_or_set_fmt(struct ivtv *itv, int streamtype,
                if (!(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT))
                        return -EINVAL;
                field = fmt->fmt.pix.field;
-               r.top = fmt->fmt.pix.top;
-               r.left = fmt->fmt.pix.left;
+               r.top = 0;
+               r.left = 0;
                r.width = fmt->fmt.pix.width;
                r.height = fmt->fmt.pix.height;
                ivtv_get_fmt(itv, streamtype, fmt);
                if (itv->output_mode != OUT_UDMA_YUV) {
                        /* TODO: would setting the rect also be valid for this mode? */
-                       fmt->fmt.pix.top = r.top;
-                       fmt->fmt.pix.left = r.left;
                        fmt->fmt.pix.width = r.width;
                        fmt->fmt.pix.height = r.height;
                }
@@ -1141,8 +1135,6 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void
                fb->fmt.pixelformat = itv->osd_pixelformat;
                fb->fmt.width = itv->osd_rect.width;
                fb->fmt.height = itv->osd_rect.height;
-               fb->fmt.left = itv->osd_rect.left;
-               fb->fmt.top = itv->osd_rect.top;
                fb->base = (void *)itv->osd_video_pbase;
                if (itv->osd_global_alpha_state)
                        fb->flags |= V4L2_FBUF_FLAG_GLOBAL_ALPHA;
index 03bc369a9e49a70ebeccaea96eadc15921587017..3ceb8a6249ddf137bed3a58a168a0918ad4095ee 100644 (file)
@@ -720,11 +720,21 @@ static int ov7670_s_fmt(struct i2c_client *c, struct v4l2_format *fmt)
        struct ov7670_format_struct *ovfmt;
        struct ov7670_win_size *wsize;
        struct ov7670_info *info = i2c_get_clientdata(c);
-       unsigned char com7;
+       unsigned char com7, clkrc;
 
        ret = ov7670_try_fmt(c, fmt, &ovfmt, &wsize);
        if (ret)
                return ret;
+       /*
+        * HACK: if we're running rgb565 we need to grab then rewrite
+        * CLKRC.  If we're *not*, however, then rewriting clkrc hoses
+        * the colors.
+        */
+       if (fmt->fmt.pix.pixelformat == V4L2_PIX_FMT_RGB565) {
+               ret = ov7670_read(c, REG_CLKRC, &clkrc);
+               if (ret)
+                       return ret;
+       }
        /*
         * COM7 is a pain in the ass, it doesn't like to be read then
         * quickly written afterward.  But we have everything we need
@@ -744,7 +754,10 @@ static int ov7670_s_fmt(struct i2c_client *c, struct v4l2_format *fmt)
        if (wsize->regs)
                ret = ov7670_write_array(c, wsize->regs);
        info->fmt = ovfmt;
-       return 0;
+
+       if (fmt->fmt.pix.pixelformat == V4L2_PIX_FMT_RGB565 && ret == 0)
+               ret = ov7670_write(c, REG_CLKRC, clkrc);
+       return ret;
 }
 
 /*
@@ -1267,7 +1280,9 @@ static int ov7670_attach(struct i2c_adapter *adapter)
        ret = ov7670_detect(client);
        if (ret)
                goto out_free_info;
-       i2c_attach_client(client);
+       ret = i2c_attach_client(client);
+       if (ret)
+               goto out_free_info;
        return 0;
 
   out_free_info:
index 1b9b0742f753f53c181391b24eceac1b88d6e3c9..c40b92ce1fadefcd0c46db8ece473ee3581d3a33 100644 (file)
@@ -205,9 +205,13 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq)
                /* 0x01 -> ??? no change ??? */
                /* 0x02 -> PAL BDGHI / SECAM L */
                /* 0x04 -> ??? PAL others / SECAM others ??? */
-               cb &= ~0x02;
-               if (t->std & V4L2_STD_SECAM)
-                       cb |= 0x02;
+               cb &= ~0x03;
+               if (t->std & V4L2_STD_SECAM_L) //also valid for V4L2_STD_SECAM
+                       cb |= PHILIPS_MF_SET_PAL_L;
+               else if (t->std & V4L2_STD_SECAM_LC)
+                       cb |= PHILIPS_MF_SET_PAL_L2;
+               else /* V4L2_STD_B|V4L2_STD_GH */
+                       cb |= PHILIPS_MF_SET_BG;
                break;
 
        case TUNER_TEMIC_4046FM5:
index 74c64409ddbc57ecfd0fbcdfe668d001907fdc24..d4fc6095466daa2b20337d66ffaaaeb12cc4d208 100644 (file)
@@ -38,7 +38,7 @@ config BINFMT_ELF_FDPIC
 
 config BINFMT_FLAT
        tristate "Kernel support for flat binaries"
-       depends on !MMU || SUPERH
+       depends on !MMU
        help
          Support uClinux FLAT format binaries.
 
index d7781a2ddefec086fa085f1f9902e50cd69bbb77..441c9e0017762b0133c8a2e017e62596b2b8e11a 100644 (file)
 
 #define NR_syscalls                    286 /* length of syscall table */
 
+/*
+ * The following defines stop scripts/checksyscalls.sh from complaining about
+ * unimplemented system calls.  Glibc provides for each of these by using
+ * more modern equivalent system calls.
+ */
+#define __IGNORE_fork          /* clone() */
+#define __IGNORE_time          /* gettimeofday() */
+#define __IGNORE_alarm         /* setitimer(ITIMER_REAL, ... */
+#define __IGNORE_pause         /* rt_sigprocmask(), rt_sigsuspend() */
+#define __IGNORE_utime         /* utimes() */
+#define __IGNORE_getpgrp       /* getpgid() */
+#define __IGNORE_vfork         /* clone() */
+
 #define __ARCH_WANT_SYS_RT_SIGACTION
 #define __ARCH_WANT_SYS_RT_SIGSUSPEND
 
index 7874e3dac736b1aaa07218752f8e180090725364..f33426608a87e36a45bc061fc4f6b3a41214081d 100644 (file)
@@ -23,7 +23,7 @@
    takes.
 */
 
-#define HW_EVENT_IRQ_BASE  OFFCHIP_IRQ_BASE /* 48 */
+#define HW_EVENT_IRQ_BASE  48
 
 /* IRQ 13 */
 #define HW_EVENT_VSYNC     (HW_EVENT_IRQ_BASE +  5) /* VSync */
index 16578b7c9da12cf3ac7a2100ebaeea7e287fce73..382cfc7deb732b233170b3e1ec69edb6d14abb17 100644 (file)
@@ -6,10 +6,6 @@
 /* Grossly misnamed. */
 enum die_val {
        DIE_TRAP,
-       DIE_PAGE_FAULT,
 };
 
-int register_page_fault_notifier(struct notifier_block *nb);
-int unregister_page_fault_notifier(struct notifier_block *nb);
-
 #endif /* __ASM_SH_KDEBUG_H */
index 3fce4c451a4691503ac654db991a242d13710fdb..35d7368b718ad110a8702557add4b86081a23395 100644 (file)
 #define GIODRV_IOCGGIODATA4   _IOR(GIODRV_IOC_MAGIC,  6, unsigned long *)
 #define GIODRV_IOCSGIOSETADDR _IOW(GIODRV_IOC_MAGIC,  7, unsigned long *)
 #define GIODRV_IOCHARDRESET   _IO(GIODRV_IOC_MAGIC, 8) /* debugging tool */
-
-#define GIODRV_IOCSGIO_LED    _IOW(GIODRV_IOC_MAGIC,  9, unsigned long *)
-#define GIODRV_IOCGGIO_LED    _IOR(GIODRV_IOC_MAGIC,  10, unsigned long *)
-#define GIODRV_IOCSGIO_BUZZER _IOW(GIODRV_IOC_MAGIC,  11, unsigned long *)
-#define GIODRV_IOCGGIO_LANDISK _IOR(GIODRV_IOC_MAGIC,  14, unsigned long *)
-#define GIODRV_IOCGGIO_BTN _IOR(GIODRV_IOC_MAGIC,  22, unsigned long *)
-#define GIODRV_IOCSGIO_BTNPID _IOW(GIODRV_IOC_MAGIC,  23, unsigned long *)
-#define GIODRV_IOCGGIO_BTNPID _IOR(GIODRV_IOC_MAGIC,  24, unsigned long *)
-
 #define GIODRV_IOC_MAXNR 8
+
 #define GIO_READ 0x00000000
 #define GIO_WRITE 0x00000001
 
index c74d3c73f37720da02f764d29419669c70ef6fca..6fb04ab38b9f2283ebd672f10f51f4a0ab5cc613 100644 (file)
 /* 2003.10.31 I-O DATA NSD NWG add.    for shutdown port clear */
 #define PA_PWRINT_CLR  0xb0000006      /* Shutdown Interrupt clear Register */
 
-#define PA_LCD_CLRDSP  0x00            /* LCD Clear Display Offset */
-#define PA_LCD_RTNHOME 0x00            /* LCD Return Home Offset */
-#define PA_LCD_ENTMODE 0x00            /* LCD Entry Mode Offset */
-#define PA_LCD_DSPCTL  0x00            /* LCD Display ON/OFF Control Offset */
-#define PA_LCD_FUNC    0x00            /* LCD Function Set Offset */
-#define PA_LCD_CGRAM   0x00            /* LCD Set CGRAM Address Offset */
-#define PA_LCD_DDRAM   0x00            /* LCD Set DDRAM Address Offset */
-#define PA_LCD_RDFLAG  0x01            /* LCD Read Busy Flag Offset */
-#define PA_LCD_WTDATA  0x02            /* LCD Write Datat to RAM Offset */
-#define PA_LCD_RDDATA  0x03            /* LCD Read Data from RAM Offset */
 #define PA_PIDE_OFFSET 0x40            /* CF IDE Offset */
 #define PA_SIDE_OFFSET 0x40            /* HDD IDE Offset */
 
 #define IRQ_BUTTON     12              /* USL-5P Button IRQ */
 #define IRQ_FAULT      13              /* USL-5P Fault  IRQ */
 
-#define SHUTDOWN_BTN_MAJOR     99      /* Shutdown button device major no. */
-
-#define SHUTDOWN_LOOP_CNT      5       /* Shutdown button Detection loop */
-#define SHUTDOWN_DELAY         200     /* Shutdown button delay value(ms) */
-
-
-/* added by kogiidena */
-/*
- *  landisk_ledparam
- *
- * led  ------10 -6543210 -6543210 -6543210
- *     |000000..|0.......|0.......|U.......|
- *     |  HARD  |fastblik| blink  |   on   |
- *
- *   led0: power       U:update flag
- *   led1: error
- *   led2: usb1
- *   led3: usb2
- *   led4: usb3
- *   led5: usb4
- *   led6: usb5
- *
- */
-extern int landisk_ledparam;    /* from setup.c */
-extern int landisk_buzzerparam; /* from setup.c */
-extern int landisk_arch;        /* from setup.c */
-
 #define __IO_PREFIX landisk
 #include <asm/io_generic.h>
 
index af71e379a5eea94097e029e44e555ab5b3c4cd40..77bcb09d6ac8be2125494d2011951b1a96112949 100644 (file)
 #define __NR_getcpu            318
 #define __NR_epoll_pwait       319
 #define __NR_utimensat         320
+#define __NR_signalfd          321
+#define __NR_timerfd           322
+#define __NR_eventfd           323
 
-#define NR_syscalls 321
+#define NR_syscalls 324
 
 #ifdef __KERNEL__
 
index a25c2afa67e100cb2c5f9736c186ea7ae262a95c..e7560389079ceb0980b057eb9290c5429a746b3d 100644 (file)
@@ -267,8 +267,6 @@ struct v4l2_pix_format
        __u32                   sizeimage;
        enum v4l2_colorspace    colorspace;
        __u32                   priv;           /* private data, depends on pixelformat */
-       __u32                   left;   /* only valid if V4L2_CAP_VIDEO_OUTPUT_POS is set */
-       __u32                   top;    /* only valid if V4L2_CAP_VIDEO_OUTPUT_POS is set */
 };
 
 /*      Pixel format         FOURCC                        depth  Description  */