aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sh/include/asm/mmu.h7
-rw-r--r--arch/sh/mm/uncached.c9
-rw-r--r--drivers/serial/sh-sci.c1
-rw-r--r--drivers/sh/intc.c31
-rw-r--r--include/linux/serial_sci.h4
5 files changed, 50 insertions, 2 deletions
diff --git a/arch/sh/include/asm/mmu.h b/arch/sh/include/asm/mmu.h
index 19fe84550b49..56e4418c19b9 100644
--- a/arch/sh/include/asm/mmu.h
+++ b/arch/sh/include/asm/mmu.h
@@ -66,6 +66,13 @@ int pmb_unmap(void __iomem *addr);
66 66
67#else 67#else
68 68
69static inline int
70pmb_bolt_mapping(unsigned long virt, phys_addr_t phys,
71 unsigned long size, pgprot_t prot)
72{
73 return -EINVAL;
74}
75
69static inline void __iomem * 76static inline void __iomem *
70pmb_remap_caller(phys_addr_t phys, unsigned long size, 77pmb_remap_caller(phys_addr_t phys, unsigned long size,
71 pgprot_t prot, void *caller) 78 pgprot_t prot, void *caller)
diff --git a/arch/sh/mm/uncached.c b/arch/sh/mm/uncached.c
index cf20a5c5136a..8a4eca551fc0 100644
--- a/arch/sh/mm/uncached.c
+++ b/arch/sh/mm/uncached.c
@@ -1,6 +1,8 @@
1#include <linux/init.h> 1#include <linux/init.h>
2#include <linux/module.h>
2#include <asm/sizes.h> 3#include <asm/sizes.h>
3#include <asm/page.h> 4#include <asm/page.h>
5#include <asm/addrspace.h>
4 6
5/* 7/*
6 * This is the offset of the uncached section from its cached alias. 8 * This is the offset of the uncached section from its cached alias.
@@ -15,15 +17,22 @@
15unsigned long cached_to_uncached = SZ_512M; 17unsigned long cached_to_uncached = SZ_512M;
16unsigned long uncached_size = SZ_512M; 18unsigned long uncached_size = SZ_512M;
17unsigned long uncached_start, uncached_end; 19unsigned long uncached_start, uncached_end;
20EXPORT_SYMBOL(uncached_start);
21EXPORT_SYMBOL(uncached_end);
18 22
19int virt_addr_uncached(unsigned long kaddr) 23int virt_addr_uncached(unsigned long kaddr)
20{ 24{
21 return (kaddr >= uncached_start) && (kaddr < uncached_end); 25 return (kaddr >= uncached_start) && (kaddr < uncached_end);
22} 26}
27EXPORT_SYMBOL(virt_addr_uncached);
23 28
24void __init uncached_init(void) 29void __init uncached_init(void)
25{ 30{
31#ifdef CONFIG_29BIT
32 uncached_start = P2SEG;
33#else
26 uncached_start = memory_end; 34 uncached_start = memory_end;
35#endif
27 uncached_end = uncached_start + uncached_size; 36 uncached_end = uncached_start + uncached_size;
28} 37}
29 38
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index 980f39449ee5..f7b9aff88f4a 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -50,7 +50,6 @@
50#include <linux/list.h> 50#include <linux/list.h>
51#include <linux/dmaengine.h> 51#include <linux/dmaengine.h>
52#include <linux/scatterlist.h> 52#include <linux/scatterlist.h>
53#include <linux/timer.h>
54 53
55#ifdef CONFIG_SUPERH 54#ifdef CONFIG_SUPERH
56#include <asm/sh_bios.h> 55#include <asm/sh_bios.h>
diff --git a/drivers/sh/intc.c b/drivers/sh/intc.c
index c2750391fd34..a3d8677af6a5 100644
--- a/drivers/sh/intc.c
+++ b/drivers/sh/intc.c
@@ -2,7 +2,7 @@
2 * Shared interrupt handling code for IPR and INTC2 types of IRQs. 2 * Shared interrupt handling code for IPR and INTC2 types of IRQs.
3 * 3 *
4 * Copyright (C) 2007, 2008 Magnus Damm 4 * Copyright (C) 2007, 2008 Magnus Damm
5 * Copyright (C) 2009 Paul Mundt 5 * Copyright (C) 2009, 2010 Paul Mundt
6 * 6 *
7 * Based on intc2.c and ipr.c 7 * Based on intc2.c and ipr.c
8 * 8 *
@@ -26,6 +26,7 @@
26#include <linux/list.h> 26#include <linux/list.h>
27#include <linux/topology.h> 27#include <linux/topology.h>
28#include <linux/bitmap.h> 28#include <linux/bitmap.h>
29#include <linux/cpumask.h>
29 30
30#define _INTC_MK(fn, mode, addr_e, addr_d, width, shift) \ 31#define _INTC_MK(fn, mode, addr_e, addr_d, width, shift) \
31 ((shift) | ((width) << 5) | ((fn) << 9) | ((mode) << 13) | \ 32 ((shift) | ((width) << 5) | ((fn) << 9) | ((mode) << 13) | \
@@ -234,6 +235,10 @@ static inline void _intc_enable(unsigned int irq, unsigned long handle)
234 unsigned int cpu; 235 unsigned int cpu;
235 236
236 for (cpu = 0; cpu < SMP_NR(d, _INTC_ADDR_E(handle)); cpu++) { 237 for (cpu = 0; cpu < SMP_NR(d, _INTC_ADDR_E(handle)); cpu++) {
238#ifdef CONFIG_SMP
239 if (!cpumask_test_cpu(cpu, irq_to_desc(irq)->affinity))
240 continue;
241#endif
237 addr = INTC_REG(d, _INTC_ADDR_E(handle), cpu); 242 addr = INTC_REG(d, _INTC_ADDR_E(handle), cpu);
238 intc_enable_fns[_INTC_MODE(handle)](addr, handle, intc_reg_fns\ 243 intc_enable_fns[_INTC_MODE(handle)](addr, handle, intc_reg_fns\
239 [_INTC_FN(handle)], irq); 244 [_INTC_FN(handle)], irq);
@@ -253,6 +258,10 @@ static void intc_disable(unsigned int irq)
253 unsigned int cpu; 258 unsigned int cpu;
254 259
255 for (cpu = 0; cpu < SMP_NR(d, _INTC_ADDR_D(handle)); cpu++) { 260 for (cpu = 0; cpu < SMP_NR(d, _INTC_ADDR_D(handle)); cpu++) {
261#ifdef CONFIG_SMP
262 if (!cpumask_test_cpu(cpu, irq_to_desc(irq)->affinity))
263 continue;
264#endif
256 addr = INTC_REG(d, _INTC_ADDR_D(handle), cpu); 265 addr = INTC_REG(d, _INTC_ADDR_D(handle), cpu);
257 intc_disable_fns[_INTC_MODE(handle)](addr, handle,intc_reg_fns\ 266 intc_disable_fns[_INTC_MODE(handle)](addr, handle,intc_reg_fns\
258 [_INTC_FN(handle)], irq); 267 [_INTC_FN(handle)], irq);
@@ -301,6 +310,23 @@ static int intc_set_wake(unsigned int irq, unsigned int on)
301 return 0; /* allow wakeup, but setup hardware in intc_suspend() */ 310 return 0; /* allow wakeup, but setup hardware in intc_suspend() */
302} 311}
303 312
313#ifdef CONFIG_SMP
314/*
315 * This is held with the irq desc lock held, so we don't require any
316 * additional locking here at the intc desc level. The affinity mask is
317 * later tested in the enable/disable paths.
318 */
319static int intc_set_affinity(unsigned int irq, const struct cpumask *cpumask)
320{
321 if (!cpumask_intersects(cpumask, cpu_online_mask))
322 return -1;
323
324 cpumask_copy(irq_to_desc(irq)->affinity, cpumask);
325
326 return 0;
327}
328#endif
329
304static void intc_mask_ack(unsigned int irq) 330static void intc_mask_ack(unsigned int irq)
305{ 331{
306 struct intc_desc_int *d = get_intc_desc(irq); 332 struct intc_desc_int *d = get_intc_desc(irq);
@@ -847,6 +873,9 @@ void __init register_intc_controller(struct intc_desc *desc)
847 d->chip.shutdown = intc_disable; 873 d->chip.shutdown = intc_disable;
848 d->chip.set_type = intc_set_sense; 874 d->chip.set_type = intc_set_sense;
849 d->chip.set_wake = intc_set_wake; 875 d->chip.set_wake = intc_set_wake;
876#ifdef CONFIG_SMP
877 d->chip.set_affinity = intc_set_affinity;
878#endif
850 879
851 if (hw->ack_regs) { 880 if (hw->ack_regs) {
852 for (i = 0; i < hw->nr_ack_regs; i++) 881 for (i = 0; i < hw->nr_ack_regs; i++)
diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h
index 1b177d29a7f0..193d4bfe42ff 100644
--- a/include/linux/serial_sci.h
+++ b/include/linux/serial_sci.h
@@ -2,7 +2,9 @@
2#define __LINUX_SERIAL_SCI_H 2#define __LINUX_SERIAL_SCI_H
3 3
4#include <linux/serial_core.h> 4#include <linux/serial_core.h>
5#ifdef CONFIG_SERIAL_SH_SCI_DMA
5#include <asm/dmaengine.h> 6#include <asm/dmaengine.h>
7#endif
6 8
7/* 9/*
8 * Generic header for SuperH SCI(F) (used by sh/sh64/h8300 and related parts) 10 * Generic header for SuperH SCI(F) (used by sh/sh64/h8300 and related parts)
@@ -30,8 +32,10 @@ struct plat_sci_port {
30 upf_t flags; /* UPF_* flags */ 32 upf_t flags; /* UPF_* flags */
31 char *clk; /* clock string */ 33 char *clk; /* clock string */
32 struct device *dma_dev; 34 struct device *dma_dev;
35#ifdef CONFIG_SERIAL_SH_SCI_DMA
33 enum sh_dmae_slave_chan_id dma_slave_tx; 36 enum sh_dmae_slave_chan_id dma_slave_tx;
34 enum sh_dmae_slave_chan_id dma_slave_rx; 37 enum sh_dmae_slave_chan_id dma_slave_rx;
38#endif
35}; 39};
36 40
37#endif /* __LINUX_SERIAL_SCI_H */ 41#endif /* __LINUX_SERIAL_SCI_H */