diff options
-rw-r--r-- | arch/sh/boards/mach-ecovec24/setup.c | 4 | ||||
-rw-r--r-- | arch/sh/include/asm/dma.h | 6 | ||||
-rw-r--r-- | arch/sh/include/cpu-sh4/cpu/dma-sh4a.h | 8 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 15 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7785.c | 14 | ||||
-rw-r--r-- | arch/sh/kernel/idle.c | 2 | ||||
-rw-r--r-- | arch/sh/mm/cache.c | 8 |
7 files changed, 43 insertions, 14 deletions
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 194aaca22d47..6a8861b39f05 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c | |||
@@ -128,8 +128,6 @@ static struct platform_device nor_flash_device = { | |||
128 | 128 | ||
129 | /* SH Eth */ | 129 | /* SH Eth */ |
130 | #define SH_ETH_ADDR (0xA4600000) | 130 | #define SH_ETH_ADDR (0xA4600000) |
131 | #define SH_ETH_MAHR (SH_ETH_ADDR + 0x1C0) | ||
132 | #define SH_ETH_MALR (SH_ETH_ADDR + 0x1C8) | ||
133 | static struct resource sh_eth_resources[] = { | 131 | static struct resource sh_eth_resources[] = { |
134 | [0] = { | 132 | [0] = { |
135 | .start = SH_ETH_ADDR, | 133 | .start = SH_ETH_ADDR, |
@@ -509,6 +507,7 @@ static struct platform_device sdhi1_device = { | |||
509 | 507 | ||
510 | #else | 508 | #else |
511 | 509 | ||
510 | /* MMC SPI */ | ||
512 | static int mmc_spi_get_ro(struct device *dev) | 511 | static int mmc_spi_get_ro(struct device *dev) |
513 | { | 512 | { |
514 | return gpio_get_value(GPIO_PTY6); | 513 | return gpio_get_value(GPIO_PTY6); |
@@ -542,6 +541,7 @@ static struct spi_board_info spi_bus[] = { | |||
542 | }, | 541 | }, |
543 | }; | 542 | }; |
544 | 543 | ||
544 | /* MSIOF0 */ | ||
545 | static struct sh_msiof_spi_info msiof0_data = { | 545 | static struct sh_msiof_spi_info msiof0_data = { |
546 | .num_chipselect = 1, | 546 | .num_chipselect = 1, |
547 | }; | 547 | }; |
diff --git a/arch/sh/include/asm/dma.h b/arch/sh/include/asm/dma.h index 04ad0e1e637e..07373a074090 100644 --- a/arch/sh/include/asm/dma.h +++ b/arch/sh/include/asm/dma.h | |||
@@ -19,9 +19,11 @@ | |||
19 | #include <asm-generic/dma.h> | 19 | #include <asm-generic/dma.h> |
20 | 20 | ||
21 | #ifdef CONFIG_NR_DMA_CHANNELS | 21 | #ifdef CONFIG_NR_DMA_CHANNELS |
22 | # define MAX_DMA_CHANNELS (CONFIG_NR_DMA_CHANNELS) | 22 | # define MAX_DMA_CHANNELS (CONFIG_NR_DMA_CHANNELS) |
23 | #elif defined(CONFIG_NR_ONCHIP_DMA_CHANNELS) | ||
24 | # define MAX_DMA_CHANNELS (CONFIG_NR_ONCHIP_DMA_CHANNELS) | ||
23 | #else | 25 | #else |
24 | # define MAX_DMA_CHANNELS (CONFIG_NR_ONCHIP_DMA_CHANNELS) | 26 | # define MAX_DMA_CHANNELS 0 |
25 | #endif | 27 | #endif |
26 | 28 | ||
27 | /* | 29 | /* |
diff --git a/arch/sh/include/cpu-sh4/cpu/dma-sh4a.h b/arch/sh/include/cpu-sh4/cpu/dma-sh4a.h index f0886bc880e0..c4ed660c14cf 100644 --- a/arch/sh/include/cpu-sh4/cpu/dma-sh4a.h +++ b/arch/sh/include/cpu-sh4/cpu/dma-sh4a.h | |||
@@ -19,10 +19,10 @@ | |||
19 | #elif defined(CONFIG_CPU_SUBTYPE_SH7723) || \ | 19 | #elif defined(CONFIG_CPU_SUBTYPE_SH7723) || \ |
20 | defined(CONFIG_CPU_SUBTYPE_SH7724) | 20 | defined(CONFIG_CPU_SUBTYPE_SH7724) |
21 | #define DMTE0_IRQ 48 /* DMAC0A*/ | 21 | #define DMTE0_IRQ 48 /* DMAC0A*/ |
22 | #define DMTE4_IRQ 40 /* DMAC0B */ | 22 | #define DMTE4_IRQ 76 /* DMAC0B */ |
23 | #define DMTE6_IRQ 42 | 23 | #define DMTE6_IRQ 40 |
24 | #define DMTE8_IRQ 76 /* DMAC1A */ | 24 | #define DMTE8_IRQ 42 /* DMAC1A */ |
25 | #define DMTE9_IRQ 77 | 25 | #define DMTE9_IRQ 43 |
26 | #define DMTE10_IRQ 72 /* DMAC1B */ | 26 | #define DMTE10_IRQ 72 /* DMAC1B */ |
27 | #define DMTE11_IRQ 73 | 27 | #define DMTE11_IRQ 73 |
28 | #define DMAE0_IRQ 78 /* DMA Error IRQ*/ | 28 | #define DMAE0_IRQ 78 /* DMA Error IRQ*/ |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c index a52f35117e82..d32f96c1cc15 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c | |||
@@ -23,9 +23,23 @@ | |||
23 | #include <linux/notifier.h> | 23 | #include <linux/notifier.h> |
24 | #include <asm/suspend.h> | 24 | #include <asm/suspend.h> |
25 | #include <asm/clock.h> | 25 | #include <asm/clock.h> |
26 | #include <asm/dma-sh.h> | ||
26 | #include <asm/mmzone.h> | 27 | #include <asm/mmzone.h> |
27 | #include <cpu/sh7724.h> | 28 | #include <cpu/sh7724.h> |
28 | 29 | ||
30 | /* DMA */ | ||
31 | static struct sh_dmae_pdata dma_platform_data = { | ||
32 | .mode = SHDMA_DMAOR1, | ||
33 | }; | ||
34 | |||
35 | static struct platform_device dma_device = { | ||
36 | .name = "sh-dma-engine", | ||
37 | .id = -1, | ||
38 | .dev = { | ||
39 | .platform_data = &dma_platform_data, | ||
40 | }, | ||
41 | }; | ||
42 | |||
29 | /* Serial */ | 43 | /* Serial */ |
30 | static struct plat_sci_port scif0_platform_data = { | 44 | static struct plat_sci_port scif0_platform_data = { |
31 | .mapbase = 0xffe00000, | 45 | .mapbase = 0xffe00000, |
@@ -649,6 +663,7 @@ static struct platform_device *sh7724_devices[] __initdata = { | |||
649 | &tmu3_device, | 663 | &tmu3_device, |
650 | &tmu4_device, | 664 | &tmu4_device, |
651 | &tmu5_device, | 665 | &tmu5_device, |
666 | &dma_device, | ||
652 | &rtc_device, | 667 | &rtc_device, |
653 | &iic0_device, | 668 | &iic0_device, |
654 | &iic1_device, | 669 | &iic1_device, |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c index ef26ebda6e8b..f685b9b21999 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/sh_timer.h> | 16 | #include <linux/sh_timer.h> |
17 | #include <asm/dma-sh.h> | ||
17 | #include <asm/mmzone.h> | 18 | #include <asm/mmzone.h> |
18 | 19 | ||
19 | static struct plat_sci_port scif0_platform_data = { | 20 | static struct plat_sci_port scif0_platform_data = { |
@@ -294,6 +295,18 @@ static struct platform_device tmu5_device = { | |||
294 | .num_resources = ARRAY_SIZE(tmu5_resources), | 295 | .num_resources = ARRAY_SIZE(tmu5_resources), |
295 | }; | 296 | }; |
296 | 297 | ||
298 | static struct sh_dmae_pdata dma_platform_data = { | ||
299 | .mode = (SHDMA_MIX_IRQ | SHDMA_DMAOR1), | ||
300 | }; | ||
301 | |||
302 | static struct platform_device dma_device = { | ||
303 | .name = "sh-dma-engine", | ||
304 | .id = -1, | ||
305 | .dev = { | ||
306 | .platform_data = &dma_platform_data, | ||
307 | }, | ||
308 | }; | ||
309 | |||
297 | static struct platform_device *sh7785_devices[] __initdata = { | 310 | static struct platform_device *sh7785_devices[] __initdata = { |
298 | &scif0_device, | 311 | &scif0_device, |
299 | &scif1_device, | 312 | &scif1_device, |
@@ -307,6 +320,7 @@ static struct platform_device *sh7785_devices[] __initdata = { | |||
307 | &tmu3_device, | 320 | &tmu3_device, |
308 | &tmu4_device, | 321 | &tmu4_device, |
309 | &tmu5_device, | 322 | &tmu5_device, |
323 | &dma_device, | ||
310 | }; | 324 | }; |
311 | 325 | ||
312 | static int __init sh7785_devices_setup(void) | 326 | static int __init sh7785_devices_setup(void) |
diff --git a/arch/sh/kernel/idle.c b/arch/sh/kernel/idle.c index aaff0037fcd7..6b3d706deac1 100644 --- a/arch/sh/kernel/idle.c +++ b/arch/sh/kernel/idle.c | |||
@@ -62,6 +62,7 @@ void default_idle(void) | |||
62 | clear_thread_flag(TIF_POLLING_NRFLAG); | 62 | clear_thread_flag(TIF_POLLING_NRFLAG); |
63 | smp_mb__after_clear_bit(); | 63 | smp_mb__after_clear_bit(); |
64 | 64 | ||
65 | set_bl_bit(); | ||
65 | if (!need_resched()) { | 66 | if (!need_resched()) { |
66 | local_irq_enable(); | 67 | local_irq_enable(); |
67 | cpu_sleep(); | 68 | cpu_sleep(); |
@@ -69,6 +70,7 @@ void default_idle(void) | |||
69 | local_irq_enable(); | 70 | local_irq_enable(); |
70 | 71 | ||
71 | set_thread_flag(TIF_POLLING_NRFLAG); | 72 | set_thread_flag(TIF_POLLING_NRFLAG); |
73 | clear_bl_bit(); | ||
72 | } else | 74 | } else |
73 | poll_idle(); | 75 | poll_idle(); |
74 | } | 76 | } |
diff --git a/arch/sh/mm/cache.c b/arch/sh/mm/cache.c index e9415d3ea94a..b8607fa7ae12 100644 --- a/arch/sh/mm/cache.c +++ b/arch/sh/mm/cache.c | |||
@@ -133,12 +133,8 @@ void __update_cache(struct vm_area_struct *vma, | |||
133 | page = pfn_to_page(pfn); | 133 | page = pfn_to_page(pfn); |
134 | if (pfn_valid(pfn)) { | 134 | if (pfn_valid(pfn)) { |
135 | int dirty = test_and_clear_bit(PG_dcache_dirty, &page->flags); | 135 | int dirty = test_and_clear_bit(PG_dcache_dirty, &page->flags); |
136 | if (dirty) { | 136 | if (dirty) |
137 | unsigned long addr = (unsigned long)page_address(page); | 137 | __flush_purge_region(page_address(page), PAGE_SIZE); |
138 | |||
139 | if (pages_do_alias(addr, address & PAGE_MASK)) | ||
140 | __flush_purge_region((void *)addr, PAGE_SIZE); | ||
141 | } | ||
142 | } | 138 | } |
143 | } | 139 | } |
144 | 140 | ||