Commit 541e40ee authored by Linus Torvalds's avatar Linus Torvalds

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

* 'sh/for-2.6.34' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Silence unintialized variable warnings in dwarf unwinder.
  sh: Tidy up a couple of section mismatches.
  sh: Fix build after dynamic PMB rework
  sh: Replace unsafe manipulation of MMUCR
  sh: Flush ITLB too in PTEAEX's flush_tlb_page()
  sh64: Remove long unused mid_sched macro
  SH: remove superfluous warning from the serial driver
  SH: fix SCIFA SCASCR register bit definitions
  serial: sh-sci: fix SH-Mobile SH breakage
  sh: Add watch-dog register address for SH7722/SH7723/SH7724
  sh: ms7724: Add tiny-document for sound
  sh: mach-ecovec24: Add i2c_put_adapter on sh_eth_init
parents 1147d0f9 4e1a2594
...@@ -836,6 +836,8 @@ static void __init sh_eth_init(struct sh_eth_plat_data *pd) ...@@ -836,6 +836,8 @@ static void __init sh_eth_init(struct sh_eth_plat_data *pd)
pd->mac_addr[i] = mac_read(a, 0x10 + i); pd->mac_addr[i] = mac_read(a, 0x10 + i);
msleep(10); msleep(10);
} }
i2c_put_adapter(a);
} }
#else #else
static void __init sh_eth_init(struct sh_eth_plat_data *pd) static void __init sh_eth_init(struct sh_eth_plat_data *pd)
......
...@@ -52,6 +52,13 @@ ...@@ -52,6 +52,13 @@
* and change SW41 to use 720p * and change SW41 to use 720p
*/ */
/*
* about sound
*
* This setup.c supports FSI slave mode.
* Please change J20, J21, J22 pin to 1-2 connection.
*/
/* Heartbeat */ /* Heartbeat */
static struct resource heartbeat_resource = { static struct resource heartbeat_resource = {
.start = PA_LED, .start = PA_LED,
...@@ -276,6 +283,7 @@ static struct clk fsimcka_clk = { ...@@ -276,6 +283,7 @@ static struct clk fsimcka_clk = {
.rate = 0, /* unknown */ .rate = 0, /* unknown */
}; };
/* change J20, J21, J22 pin to 1-2 connection to use slave mode */
struct sh_fsi_platform_info fsi_info = { struct sh_fsi_platform_info fsi_info = {
.porta_flags = SH_FSI_BRS_INV | .porta_flags = SH_FSI_BRS_INV |
SH_FSI_OUT_SLAVE_MODE | SH_FSI_OUT_SLAVE_MODE |
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
#define MMUCR 0xFF000010 /* MMU Control Register */ #define MMUCR 0xFF000010 /* MMU Control Register */
#define MMU_ITLB_ADDRESS_ARRAY 0xF2000000
#define MMU_ITLB_ADDRESS_ARRAY2 0xF2800000
#define MMU_UTLB_ADDRESS_ARRAY 0xF6000000 #define MMU_UTLB_ADDRESS_ARRAY 0xF6000000
#define MMU_UTLB_ADDRESS_ARRAY2 0xF6800000 #define MMU_UTLB_ADDRESS_ARRAY2 0xF6800000
#define MMU_PAGE_ASSOC_BIT 0x80 #define MMU_PAGE_ASSOC_BIT 0x80
......
...@@ -21,6 +21,12 @@ ...@@ -21,6 +21,12 @@
#define WTCNT 0xffcc0000 /*WDTST*/ #define WTCNT 0xffcc0000 /*WDTST*/
#define WTST WTCNT #define WTST WTCNT
#define WTBST 0xffcc0008 /*WDTBST*/ #define WTBST 0xffcc0008 /*WDTBST*/
/* Register definitions */
#elif defined(CONFIG_CPU_SUBTYPE_SH7722) || \
defined(CONFIG_CPU_SUBTYPE_SH7723) || \
defined(CONFIG_CPU_SUBTYPE_SH7724)
#define WTCNT 0xa4520000
#define WTCSR 0xa4520004
#else #else
/* Register definitions */ /* Register definitions */
#define WTCNT 0xffc00008 #define WTCNT 0xffc00008
......
...@@ -727,7 +727,7 @@ static int dwarf_parse_cie(void *entry, void *p, unsigned long len, ...@@ -727,7 +727,7 @@ static int dwarf_parse_cie(void *entry, void *p, unsigned long len,
unsigned char *end, struct module *mod) unsigned char *end, struct module *mod)
{ {
struct rb_node **rb_node = &cie_root.rb_node; struct rb_node **rb_node = &cie_root.rb_node;
struct rb_node *parent; struct rb_node *parent = *rb_node;
struct dwarf_cie *cie; struct dwarf_cie *cie;
unsigned long flags; unsigned long flags;
int count; int count;
...@@ -856,7 +856,7 @@ static int dwarf_parse_fde(void *entry, u32 entry_type, ...@@ -856,7 +856,7 @@ static int dwarf_parse_fde(void *entry, u32 entry_type,
unsigned char *end, struct module *mod) unsigned char *end, struct module *mod)
{ {
struct rb_node **rb_node = &fde_root.rb_node; struct rb_node **rb_node = &fde_root.rb_node;
struct rb_node *parent; struct rb_node *parent = *rb_node;
struct dwarf_fde *fde; struct dwarf_fde *fde;
struct dwarf_cie *cie; struct dwarf_cie *cie;
unsigned long flags; unsigned long flags;
......
...@@ -112,7 +112,7 @@ void cpu_idle(void) ...@@ -112,7 +112,7 @@ void cpu_idle(void)
} }
} }
void __cpuinit select_idle_routine(void) void __init select_idle_routine(void)
{ {
/* /*
* If a platform has set its own idle routine, leave it alone. * If a platform has set its own idle routine, leave it alone.
......
...@@ -315,7 +315,7 @@ void hw_perf_disable(void) ...@@ -315,7 +315,7 @@ void hw_perf_disable(void)
sh_pmu->disable_all(); sh_pmu->disable_all();
} }
int register_sh_pmu(struct sh_pmu *pmu) int __cpuinit register_sh_pmu(struct sh_pmu *pmu)
{ {
if (sh_pmu) if (sh_pmu)
return -EBUSY; return -EBUSY;
......
...@@ -504,13 +504,6 @@ out: ...@@ -504,13 +504,6 @@ out:
return error; return error;
} }
/*
* These bracket the sleeping functions..
*/
extern void interruptible_sleep_on(wait_queue_head_t *q);
#define mid_sched ((unsigned long) interruptible_sleep_on)
#ifdef CONFIG_FRAME_POINTER #ifdef CONFIG_FRAME_POINTER
static int in_sh64_switch_to(unsigned long pc) static int in_sh64_switch_to(unsigned long pc)
{ {
......
...@@ -323,6 +323,7 @@ static void __clear_pmb_entry(struct pmb_entry *pmbe) ...@@ -323,6 +323,7 @@ static void __clear_pmb_entry(struct pmb_entry *pmbe)
writel_uncached(data_val & ~PMB_V, data); writel_uncached(data_val & ~PMB_V, data);
} }
#ifdef CONFIG_PM
static void set_pmb_entry(struct pmb_entry *pmbe) static void set_pmb_entry(struct pmb_entry *pmbe)
{ {
unsigned long flags; unsigned long flags;
...@@ -331,6 +332,7 @@ static void set_pmb_entry(struct pmb_entry *pmbe) ...@@ -331,6 +332,7 @@ static void set_pmb_entry(struct pmb_entry *pmbe)
__set_pmb_entry(pmbe); __set_pmb_entry(pmbe);
spin_unlock_irqrestore(&pmbe->lock, flags); spin_unlock_irqrestore(&pmbe->lock, flags);
} }
#endif /* CONFIG_PM */
int pmb_bolt_mapping(unsigned long vaddr, phys_addr_t phys, int pmb_bolt_mapping(unsigned long vaddr, phys_addr_t phys,
unsigned long size, pgprot_t prot) unsigned long size, pgprot_t prot)
...@@ -802,7 +804,7 @@ void __init pmb_init(void) ...@@ -802,7 +804,7 @@ void __init pmb_init(void)
writel_uncached(0, PMB_IRMCR); writel_uncached(0, PMB_IRMCR);
/* Flush out the TLB */ /* Flush out the TLB */
__raw_writel(__raw_readl(MMUCR) | MMUCR_TI, MMUCR); local_flush_tlb_all();
ctrl_barrier(); ctrl_barrier();
} }
......
...@@ -73,5 +73,7 @@ void local_flush_tlb_one(unsigned long asid, unsigned long page) ...@@ -73,5 +73,7 @@ void local_flush_tlb_one(unsigned long asid, unsigned long page)
jump_to_uncached(); jump_to_uncached();
__raw_writel(page, MMU_UTLB_ADDRESS_ARRAY | MMU_PAGE_ASSOC_BIT); __raw_writel(page, MMU_UTLB_ADDRESS_ARRAY | MMU_PAGE_ASSOC_BIT);
__raw_writel(asid, MMU_UTLB_ADDRESS_ARRAY2 | MMU_PAGE_ASSOC_BIT); __raw_writel(asid, MMU_UTLB_ADDRESS_ARRAY2 | MMU_PAGE_ASSOC_BIT);
__raw_writel(page, MMU_ITLB_ADDRESS_ARRAY | MMU_PAGE_ASSOC_BIT);
__raw_writel(asid, MMU_ITLB_ADDRESS_ARRAY2 | MMU_PAGE_ASSOC_BIT);
back_to_cached(); back_to_cached();
} }
...@@ -123,18 +123,27 @@ void local_flush_tlb_mm(struct mm_struct *mm) ...@@ -123,18 +123,27 @@ void local_flush_tlb_mm(struct mm_struct *mm)
void local_flush_tlb_all(void) void local_flush_tlb_all(void)
{ {
unsigned long flags, status; unsigned long flags, status;
int i;
/* /*
* Flush all the TLB. * Flush all the TLB.
*
* Write to the MMU control register's bit:
* TF-bit for SH-3, TI-bit for SH-4.
* It's same position, bit #2.
*/ */
local_irq_save(flags); local_irq_save(flags);
jump_to_uncached();
status = __raw_readl(MMUCR); status = __raw_readl(MMUCR);
status |= 0x04; status = ((status & MMUCR_URB) >> MMUCR_URB_SHIFT);
__raw_writel(status, MMUCR);
if (status == 0)
status = MMUCR_URB_NENTRIES;
for (i = 0; i < status; i++)
__raw_writel(0x0, MMU_UTLB_ADDRESS_ARRAY | (i << 8));
for (i = 0; i < 4; i++)
__raw_writel(0x0, MMU_ITLB_ADDRESS_ARRAY | (i << 8));
back_to_cached();
ctrl_barrier(); ctrl_barrier();
local_irq_restore(flags); local_irq_restore(flags);
} }
...@@ -779,10 +779,6 @@ static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr) ...@@ -779,10 +779,6 @@ static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr)
if ((ssr_status & SCxSR_BRK(port)) && err_enabled) if ((ssr_status & SCxSR_BRK(port)) && err_enabled)
ret = sci_br_interrupt(irq, ptr); ret = sci_br_interrupt(irq, ptr);
WARN_ONCE(ret == IRQ_NONE,
"%s: %d IRQ %d, status %x, control %x\n", __func__,
irq, port->line, ssr_status, scr_status);
return ret; return ret;
} }
......
...@@ -31,7 +31,9 @@ ...@@ -31,7 +31,9 @@
# define SCSCR_INIT(port) (port->mapbase == SCIF2) ? 0xF3 : 0xF0 # define SCSCR_INIT(port) (port->mapbase == SCIF2) ? 0xF3 : 0xF0
#elif defined(CONFIG_CPU_SUBTYPE_SH7720) || \ #elif defined(CONFIG_CPU_SUBTYPE_SH7720) || \
defined(CONFIG_CPU_SUBTYPE_SH7721) || \ defined(CONFIG_CPU_SUBTYPE_SH7721) || \
defined(CONFIG_ARCH_SHMOBILE) defined(CONFIG_ARCH_SH7367) || \
defined(CONFIG_ARCH_SH7377) || \
defined(CONFIG_ARCH_SH7372)
# define SCSCR_INIT(port) 0x0030 /* TIE=0,RIE=0,TE=1,RE=1 */ # define SCSCR_INIT(port) 0x0030 /* TIE=0,RIE=0,TE=1,RE=1 */
# define PORT_PTCR 0xA405011EUL # define PORT_PTCR 0xA405011EUL
# define PORT_PVCR 0xA4050122UL # define PORT_PVCR 0xA4050122UL
...@@ -94,7 +96,9 @@ ...@@ -94,7 +96,9 @@
# define SCSCR_INIT(port) 0x0038 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */ # define SCSCR_INIT(port) 0x0038 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
#elif defined(CONFIG_CPU_SUBTYPE_SH7724) #elif defined(CONFIG_CPU_SUBTYPE_SH7724)
# define SCIF_ORER 0x0001 /* overrun error bit */ # define SCIF_ORER 0x0001 /* overrun error bit */
# define SCSCR_INIT(port) 0x0038 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */ # define SCSCR_INIT(port) ((port)->type == PORT_SCIFA ? \
0x30 /* TIE=0,RIE=0,TE=1,RE=1 */ : \
0x38 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */ )
#elif defined(CONFIG_CPU_SUBTYPE_SH4_202) #elif defined(CONFIG_CPU_SUBTYPE_SH4_202)
# define SCSPTR2 0xffe80020 /* 16 bit SCIF */ # define SCSPTR2 0xffe80020 /* 16 bit SCIF */
# define SCIF_ORER 0x0001 /* overrun error bit */ # define SCIF_ORER 0x0001 /* overrun error bit */
...@@ -197,6 +201,8 @@ ...@@ -197,6 +201,8 @@
defined(CONFIG_CPU_SUBTYPE_SH7786) || \ defined(CONFIG_CPU_SUBTYPE_SH7786) || \
defined(CONFIG_CPU_SUBTYPE_SHX3) defined(CONFIG_CPU_SUBTYPE_SHX3)
#define SCI_CTRL_FLAGS_REIE 0x08 /* 7750 SCIF */ #define SCI_CTRL_FLAGS_REIE 0x08 /* 7750 SCIF */
#elif defined(CONFIG_CPU_SUBTYPE_SH7724)
#define SCI_CTRL_FLAGS_REIE ((port)->type == PORT_SCIFA ? 0 : 8)
#else #else
#define SCI_CTRL_FLAGS_REIE 0 #define SCI_CTRL_FLAGS_REIE 0
#endif #endif
...@@ -230,7 +236,9 @@ ...@@ -230,7 +236,9 @@
#if defined(CONFIG_CPU_SUBTYPE_SH7705) || \ #if defined(CONFIG_CPU_SUBTYPE_SH7705) || \
defined(CONFIG_CPU_SUBTYPE_SH7720) || \ defined(CONFIG_CPU_SUBTYPE_SH7720) || \
defined(CONFIG_CPU_SUBTYPE_SH7721) || \ defined(CONFIG_CPU_SUBTYPE_SH7721) || \
defined(CONFIG_ARCH_SHMOBILE) defined(CONFIG_ARCH_SH7367) || \
defined(CONFIG_ARCH_SH7377) || \
defined(CONFIG_ARCH_SH7372)
# define SCIF_ORER 0x0200 # define SCIF_ORER 0x0200
# define SCIF_ERRORS ( SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK | SCIF_ORER) # define SCIF_ERRORS ( SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK | SCIF_ORER)
# define SCIF_RFDC_MASK 0x007f # define SCIF_RFDC_MASK 0x007f
...@@ -264,7 +272,9 @@ ...@@ -264,7 +272,9 @@
#if defined(CONFIG_CPU_SUBTYPE_SH7705) || \ #if defined(CONFIG_CPU_SUBTYPE_SH7705) || \
defined(CONFIG_CPU_SUBTYPE_SH7720) || \ defined(CONFIG_CPU_SUBTYPE_SH7720) || \
defined(CONFIG_CPU_SUBTYPE_SH7721) || \ defined(CONFIG_CPU_SUBTYPE_SH7721) || \
defined(CONFIG_ARCH_SHMOBILE) defined(CONFIG_ARCH_SH7367) || \
defined(CONFIG_ARCH_SH7377) || \
defined(CONFIG_ARCH_SH7372)
# define SCxSR_RDxF_CLEAR(port) (sci_in(port, SCxSR) & 0xfffc) # define SCxSR_RDxF_CLEAR(port) (sci_in(port, SCxSR) & 0xfffc)
# define SCxSR_ERROR_CLEAR(port) (sci_in(port, SCxSR) & 0xfd73) # define SCxSR_ERROR_CLEAR(port) (sci_in(port, SCxSR) & 0xfd73)
# define SCxSR_TDxE_CLEAR(port) (sci_in(port, SCxSR) & 0xffdf) # define SCxSR_TDxE_CLEAR(port) (sci_in(port, SCxSR) & 0xffdf)
...@@ -359,7 +369,10 @@ ...@@ -359,7 +369,10 @@
SCI_OUT(sci_size, sci_offset, value); \ SCI_OUT(sci_size, sci_offset, value); \
} }
#if defined(CONFIG_CPU_SH3) || defined(CONFIG_ARCH_SHMOBILE) #if defined(CONFIG_CPU_SH3) || \
defined(CONFIG_ARCH_SH7367) || \
defined(CONFIG_ARCH_SH7377) || \
defined(CONFIG_ARCH_SH7372)
#if defined(CONFIG_CPU_SUBTYPE_SH7710) || defined(CONFIG_CPU_SUBTYPE_SH7712) #if defined(CONFIG_CPU_SUBTYPE_SH7710) || defined(CONFIG_CPU_SUBTYPE_SH7712)
#define SCIx_FNS(name, sh3_sci_offset, sh3_sci_size, sh4_sci_offset, sh4_sci_size, \ #define SCIx_FNS(name, sh3_sci_offset, sh3_sci_size, sh4_sci_offset, sh4_sci_size, \
sh3_scif_offset, sh3_scif_size, sh4_scif_offset, sh4_scif_size, \ sh3_scif_offset, sh3_scif_size, sh4_scif_offset, sh4_scif_size, \
...@@ -370,7 +383,9 @@ ...@@ -370,7 +383,9 @@
#elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \ #elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \
defined(CONFIG_CPU_SUBTYPE_SH7720) || \ defined(CONFIG_CPU_SUBTYPE_SH7720) || \
defined(CONFIG_CPU_SUBTYPE_SH7721) || \ defined(CONFIG_CPU_SUBTYPE_SH7721) || \
defined(CONFIG_ARCH_SHMOBILE) defined(CONFIG_ARCH_SH7367) || \
defined(CONFIG_ARCH_SH7377) || \
defined(CONFIG_ARCH_SH7372)
#define SCIF_FNS(name, scif_offset, scif_size) \ #define SCIF_FNS(name, scif_offset, scif_size) \
CPU_SCIF_FNS(name, scif_offset, scif_size) CPU_SCIF_FNS(name, scif_offset, scif_size)
#else #else
...@@ -406,7 +421,9 @@ ...@@ -406,7 +421,9 @@
#if defined(CONFIG_CPU_SUBTYPE_SH7705) || \ #if defined(CONFIG_CPU_SUBTYPE_SH7705) || \
defined(CONFIG_CPU_SUBTYPE_SH7720) || \ defined(CONFIG_CPU_SUBTYPE_SH7720) || \
defined(CONFIG_CPU_SUBTYPE_SH7721) || \ defined(CONFIG_CPU_SUBTYPE_SH7721) || \
defined(CONFIG_ARCH_SHMOBILE) defined(CONFIG_ARCH_SH7367) || \
defined(CONFIG_ARCH_SH7377) || \
defined(CONFIG_ARCH_SH7372)
SCIF_FNS(SCSMR, 0x00, 16) SCIF_FNS(SCSMR, 0x00, 16)
SCIF_FNS(SCBRR, 0x04, 8) SCIF_FNS(SCBRR, 0x04, 8)
...@@ -589,7 +606,9 @@ static inline int sci_rxd_in(struct uart_port *port) ...@@ -589,7 +606,9 @@ static inline int sci_rxd_in(struct uart_port *port)
#elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \ #elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \
defined(CONFIG_CPU_SUBTYPE_SH7720) || \ defined(CONFIG_CPU_SUBTYPE_SH7720) || \
defined(CONFIG_CPU_SUBTYPE_SH7721) || \ defined(CONFIG_CPU_SUBTYPE_SH7721) || \
defined(CONFIG_ARCH_SHMOBILE) defined(CONFIG_ARCH_SH7367) || \
defined(CONFIG_ARCH_SH7377) || \
defined(CONFIG_ARCH_SH7372)
#define SCBRR_VALUE(bps, clk) (((clk*2)+16*bps)/(32*bps)-1) #define SCBRR_VALUE(bps, clk) (((clk*2)+16*bps)/(32*bps)-1)
#elif defined(CONFIG_CPU_SUBTYPE_SH7723) ||\ #elif defined(CONFIG_CPU_SUBTYPE_SH7723) ||\
defined(CONFIG_CPU_SUBTYPE_SH7724) defined(CONFIG_CPU_SUBTYPE_SH7724)
......
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