Commit ef2c55e5 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'sh/for-2.6.33' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6

* 'sh/for-2.6.33' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Ensure all PG_dcache_dirty pages are written back.
  sh: mach-ecovec24: setup.c detailed correction
  serial: sh-sci: Convert tremaining ctrl_xxx I/O routines to __raw_xxx.
  serial: sh-sci: earlyprintk zero uartclk fix
  sh: Only use bl bit toggling for sleeping idle.
  sh: Restore bl bit toggling in idle loop.
  sh: Fix up MAX_DMA_CHANNELS definition when DMA is disabled.
  sh: dmaengine support for SH7785
  sh: dmaengine support for sh7724.
parents 43104716 f34548cb
...@@ -128,8 +128,6 @@ static struct platform_device nor_flash_device = { ...@@ -128,8 +128,6 @@ static struct platform_device nor_flash_device = {
/* SH Eth */ /* SH Eth */
#define SH_ETH_ADDR (0xA4600000) #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[] = { static struct resource sh_eth_resources[] = {
[0] = { [0] = {
.start = SH_ETH_ADDR, .start = SH_ETH_ADDR,
...@@ -509,6 +507,7 @@ static struct platform_device sdhi1_device = { ...@@ -509,6 +507,7 @@ static struct platform_device sdhi1_device = {
#else #else
/* MMC SPI */
static int mmc_spi_get_ro(struct device *dev) static int mmc_spi_get_ro(struct device *dev)
{ {
return gpio_get_value(GPIO_PTY6); return gpio_get_value(GPIO_PTY6);
...@@ -542,6 +541,7 @@ static struct spi_board_info spi_bus[] = { ...@@ -542,6 +541,7 @@ static struct spi_board_info spi_bus[] = {
}, },
}; };
/* MSIOF0 */
static struct sh_msiof_spi_info msiof0_data = { static struct sh_msiof_spi_info msiof0_data = {
.num_chipselect = 1, .num_chipselect = 1,
}; };
......
...@@ -20,8 +20,10 @@ ...@@ -20,8 +20,10 @@
#ifdef CONFIG_NR_DMA_CHANNELS #ifdef CONFIG_NR_DMA_CHANNELS
# define MAX_DMA_CHANNELS (CONFIG_NR_DMA_CHANNELS) # define MAX_DMA_CHANNELS (CONFIG_NR_DMA_CHANNELS)
#else #elif defined(CONFIG_NR_ONCHIP_DMA_CHANNELS)
# define MAX_DMA_CHANNELS (CONFIG_NR_ONCHIP_DMA_CHANNELS) # define MAX_DMA_CHANNELS (CONFIG_NR_ONCHIP_DMA_CHANNELS)
#else
# define MAX_DMA_CHANNELS 0
#endif #endif
/* /*
......
...@@ -19,10 +19,10 @@ ...@@ -19,10 +19,10 @@
#elif defined(CONFIG_CPU_SUBTYPE_SH7723) || \ #elif defined(CONFIG_CPU_SUBTYPE_SH7723) || \
defined(CONFIG_CPU_SUBTYPE_SH7724) defined(CONFIG_CPU_SUBTYPE_SH7724)
#define DMTE0_IRQ 48 /* DMAC0A*/ #define DMTE0_IRQ 48 /* DMAC0A*/
#define DMTE4_IRQ 40 /* DMAC0B */ #define DMTE4_IRQ 76 /* DMAC0B */
#define DMTE6_IRQ 42 #define DMTE6_IRQ 40
#define DMTE8_IRQ 76 /* DMAC1A */ #define DMTE8_IRQ 42 /* DMAC1A */
#define DMTE9_IRQ 77 #define DMTE9_IRQ 43
#define DMTE10_IRQ 72 /* DMAC1B */ #define DMTE10_IRQ 72 /* DMAC1B */
#define DMTE11_IRQ 73 #define DMTE11_IRQ 73
#define DMAE0_IRQ 78 /* DMA Error IRQ*/ #define DMAE0_IRQ 78 /* DMA Error IRQ*/
......
...@@ -23,9 +23,23 @@ ...@@ -23,9 +23,23 @@
#include <linux/notifier.h> #include <linux/notifier.h>
#include <asm/suspend.h> #include <asm/suspend.h>
#include <asm/clock.h> #include <asm/clock.h>
#include <asm/dma-sh.h>
#include <asm/mmzone.h> #include <asm/mmzone.h>
#include <cpu/sh7724.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 */ /* Serial */
static struct plat_sci_port scif0_platform_data = { static struct plat_sci_port scif0_platform_data = {
.mapbase = 0xffe00000, .mapbase = 0xffe00000,
...@@ -649,6 +663,7 @@ static struct platform_device *sh7724_devices[] __initdata = { ...@@ -649,6 +663,7 @@ static struct platform_device *sh7724_devices[] __initdata = {
&tmu3_device, &tmu3_device,
&tmu4_device, &tmu4_device,
&tmu5_device, &tmu5_device,
&dma_device,
&rtc_device, &rtc_device,
&iic0_device, &iic0_device,
&iic1_device, &iic1_device,
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/sh_timer.h> #include <linux/sh_timer.h>
#include <asm/dma-sh.h>
#include <asm/mmzone.h> #include <asm/mmzone.h>
static struct plat_sci_port scif0_platform_data = { static struct plat_sci_port scif0_platform_data = {
...@@ -294,6 +295,18 @@ static struct platform_device tmu5_device = { ...@@ -294,6 +295,18 @@ static struct platform_device tmu5_device = {
.num_resources = ARRAY_SIZE(tmu5_resources), .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 = { static struct platform_device *sh7785_devices[] __initdata = {
&scif0_device, &scif0_device,
&scif1_device, &scif1_device,
...@@ -307,6 +320,7 @@ static struct platform_device *sh7785_devices[] __initdata = { ...@@ -307,6 +320,7 @@ static struct platform_device *sh7785_devices[] __initdata = {
&tmu3_device, &tmu3_device,
&tmu4_device, &tmu4_device,
&tmu5_device, &tmu5_device,
&dma_device,
}; };
static int __init sh7785_devices_setup(void) static int __init sh7785_devices_setup(void)
......
...@@ -62,6 +62,7 @@ void default_idle(void) ...@@ -62,6 +62,7 @@ void default_idle(void)
clear_thread_flag(TIF_POLLING_NRFLAG); clear_thread_flag(TIF_POLLING_NRFLAG);
smp_mb__after_clear_bit(); smp_mb__after_clear_bit();
set_bl_bit();
if (!need_resched()) { if (!need_resched()) {
local_irq_enable(); local_irq_enable();
cpu_sleep(); cpu_sleep();
...@@ -69,6 +70,7 @@ void default_idle(void) ...@@ -69,6 +70,7 @@ void default_idle(void)
local_irq_enable(); local_irq_enable();
set_thread_flag(TIF_POLLING_NRFLAG); set_thread_flag(TIF_POLLING_NRFLAG);
clear_bl_bit();
} else } else
poll_idle(); poll_idle();
} }
......
...@@ -133,12 +133,8 @@ void __update_cache(struct vm_area_struct *vma, ...@@ -133,12 +133,8 @@ void __update_cache(struct vm_area_struct *vma,
page = pfn_to_page(pfn); page = pfn_to_page(pfn);
if (pfn_valid(pfn)) { if (pfn_valid(pfn)) {
int dirty = test_and_clear_bit(PG_dcache_dirty, &page->flags); int dirty = test_and_clear_bit(PG_dcache_dirty, &page->flags);
if (dirty) { if (dirty)
unsigned long addr = (unsigned long)page_address(page); __flush_purge_region(page_address(page), PAGE_SIZE);
if (pages_do_alias(addr, address & PAGE_MASK))
__flush_purge_region((void *)addr, PAGE_SIZE);
}
} }
} }
......
...@@ -222,9 +222,9 @@ static inline void sci_init_pins(struct uart_port *port, unsigned int cflag) ...@@ -222,9 +222,9 @@ static inline void sci_init_pins(struct uart_port *port, unsigned int cflag)
Set SCP6MD1,0 = {01} (output) */ Set SCP6MD1,0 = {01} (output) */
__raw_writew((data & 0x0fcf) | 0x1000, SCPCR); __raw_writew((data & 0x0fcf) | 0x1000, SCPCR);
data = ctrl_inb(SCPDR); data = __raw_readb(SCPDR);
/* Set /RTS2 (bit6) = 0 */ /* Set /RTS2 (bit6) = 0 */
ctrl_outb(data & 0xbf, SCPDR); __raw_writeb(data & 0xbf, SCPDR);
} }
} }
#elif defined(CONFIG_CPU_SUBTYPE_SH7722) #elif defined(CONFIG_CPU_SUBTYPE_SH7722)
...@@ -897,11 +897,21 @@ static void sci_shutdown(struct uart_port *port) ...@@ -897,11 +897,21 @@ static void sci_shutdown(struct uart_port *port)
static void sci_set_termios(struct uart_port *port, struct ktermios *termios, static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
struct ktermios *old) struct ktermios *old)
{ {
unsigned int status, baud, smr_val; unsigned int status, baud, smr_val, max_baud;
int t = -1; 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); t = SCBRR_VALUE(baud, port->uartclk);
do { do {
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment